VTK  9.1.0
vtkAMReXParticlesReader.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkAMReXParticlesReader.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
36#ifndef vtkAMReXParticlesReader_h
37#define vtkAMReXParticlesReader_h
38
39#include "vtkIOAMRModule.h" // For export macro
41#include "vtkNew.h" // for vtkNew
42
43#include <string> // for std::string.
44
48
50{
51public:
54 void PrintSelf(ostream& os, vtkIndent indent) override;
55
57
61 void SetPlotFileName(VTK_FILEPATH const char* fname);
62 VTK_FILEPATH const char* GetPlotFileName() const;
64
66
69 void SetParticleType(const std::string& str);
70 const std::string& GetParticleType() const { return this->ParticleType; }
72
80
84 static int CanReadFile(VTK_FILEPATH const char* fname, const char* particlesType = nullptr);
85
87
92 vtkGetObjectMacro(Controller, vtkMultiProcessController);
94
95protected:
98
101
105
106private:
108 void operator=(const vtkAMReXParticlesReader&) = delete;
109
113 bool ReadMetaData();
114
119 bool ReadLevel(const int level, vtkMultiPieceDataSet* pdataset, const int piece_idx,
120 const int num_pieces) const;
121
122 vtkTimeStamp PlotFileNameMTime;
123 vtkTimeStamp MetaDataMTime;
124 std::string ParticleType;
125 vtkNew<vtkDataArraySelection> PointDataArraySelection;
126
127 class AMReXParticleHeader;
128 AMReXParticleHeader* Header;
129 friend class AMReXParticleHeader;
130};
131
132#endif
reader for AMReX plotfiles particle data.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void SetPlotFileName(VTK_FILEPATH const char *fname)
Get/Set the AMReX plotfile.
vtkMultiProcessController * Controller
static int CanReadFile(VTK_FILEPATH const char *fname, const char *particlesType=nullptr)
Returns 1 is fname refers to a plotfile that the reader can read.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkAMReXParticlesReader() override
void SetParticleType(const std::string &str)
Get/Set the particle type to read.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
VTK_FILEPATH const char * GetPlotFileName() const
Get/Set the AMReX plotfile.
static vtkAMReXParticlesReader * New()
const std::string & GetParticleType() const
Get/Set the particle type to read.
vtkDataArraySelection * GetPointDataArraySelection() const
Get vtkDataArraySelection instance to select point arrays to read.
void SetController(vtkMultiProcessController *controller)
Get/Set the controller to use.
Store on/off settings for data arrays for a vtkSource.
a simple class to control print indentation
Definition: vtkIndent.h:113
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
composite dataset to encapsulates pieces of dataset.
Multiprocessing communication superclass.
record modification and/or execution time
Definition: vtkTimeStamp.h:52
@ level
Definition: vtkX3D.h:401
@ string
Definition: vtkX3D.h:496
#define VTK_FILEPATH