VTK  9.3.20241006
vtkAMReXParticlesReader.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
27#ifndef vtkAMReXParticlesReader_h
28#define vtkAMReXParticlesReader_h
29
30#include "vtkIOAMRModule.h" // For export macro
32#include "vtkNew.h" // for vtkNew
33
34#include <string> // for std::string.
35
36VTK_ABI_NAMESPACE_BEGIN
40
42{
43public:
46 void PrintSelf(ostream& os, vtkIndent indent) override;
47
49
53 void SetPlotFileName(VTK_FILEPATH const char* fname);
54 VTK_FILEPATH const char* GetPlotFileName() const;
56
58
61 void SetParticleType(const std::string& str);
62 const std::string& GetParticleType() const { return this->ParticleType; }
64
72
76 static int CanReadFile(VTK_FILEPATH const char* fname, const char* particlesType = nullptr);
77
79
84 vtkGetObjectMacro(Controller, vtkMultiProcessController);
86
87protected:
90
93
95 std::string PlotFileName;
97
98private:
100 void operator=(const vtkAMReXParticlesReader&) = delete;
101
105 bool ReadMetaData();
106
111 bool ReadLevel(int level, vtkMultiPieceDataSet* pdataset, int piece_idx, int num_pieces) const;
112
113 vtkTimeStamp PlotFileNameMTime;
114 vtkTimeStamp MetaDataMTime;
115 std::string ParticleType;
116 double dataTimeStep;
117 vtkNew<vtkDataArraySelection> PointDataArraySelection;
118
119 class AMReXParticleHeader;
120 AMReXParticleHeader* Header;
121 friend class AMReXParticleHeader;
122};
123
124VTK_ABI_NAMESPACE_END
125#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, etc.
a simple class to control print indentation
Definition vtkIndent.h:108
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.
Allocate and hold a VTK object.
Definition vtkNew.h:167
record modification and/or execution time
#define VTK_FILEPATH