VTK
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 {
51 public:
54  void PrintSelf(ostream& os, vtkIndent indent) override;
55 
57 
61  void SetPlotFileName(const char* fname);
62  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(const char* fname, const char* particlesType = nullptr);
85 
87 
92  vtkGetObjectMacro(Controller, vtkMultiProcessController);
94 
95 protected:
98 
101 
105 
106 private:
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
vtkMultiPieceDataSet
composite dataset to encapsulates pieces of dataset.
Definition: vtkMultiPieceDataSet.h:44
vtkAMReXParticlesReader::RequestInformation
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkAMReXParticlesReader::GetParticleType
const std::string & GetParticleType() const
Definition: vtkAMReXParticlesReader.h:70
vtkAMReXParticlesReader::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkAMReXParticlesReader::vtkAMReXParticlesReader
vtkAMReXParticlesReader()
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:36
vtkAMReXParticlesReader::GetPlotFileName
const char * GetPlotFileName() const
vtkAMReXParticlesReader::Controller
vtkMultiProcessController * Controller
Definition: vtkAMReXParticlesReader.h:102
vtkAMReXParticlesReader::PlotFileName
std::string PlotFileName
Definition: vtkAMReXParticlesReader.h:103
vtkAMReXParticlesReader::~vtkAMReXParticlesReader
~vtkAMReXParticlesReader() override
vtkAMReXParticlesReader::GetPointDataArraySelection
vtkDataArraySelection * GetPointDataArraySelection() const
Get vtkDataArraySelection instance to select point arrays to read.
vtkAMReXParticlesReader::SetParticleType
void SetParticleType(const std::string &str)
Get/Set the particle type to read.
vtkDataArraySelection
Store on/off settings for data arrays for a vtkSource.
Definition: vtkDataArraySelection.h:38
vtkAMReXParticlesReader::GenerateGlobalIds
bool GenerateGlobalIds
Definition: vtkAMReXParticlesReader.h:104
vtkX3D::level
@ level
Definition: vtkX3D.h:395
vtkAMReXParticlesReader
reader for AMReX plotfiles particle data.
Definition: vtkAMReXParticlesReader.h:50
vtkMultiProcessController
Multiprocessing communication superclass.
Definition: vtkMultiProcessController.h:83
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkAMReXParticlesReader::SetPlotFileName
void SetPlotFileName(const char *fname)
Get/Set the AMReX plotfile.
vtkNew< vtkDataArraySelection >
vtkMultiBlockDataSetAlgorithm.h
vtkAMReXParticlesReader::New
static vtkAMReXParticlesReader * New()
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkX3D::string
@ string
Definition: vtkX3D.h:490
vtkNew.h
vtkAMReXParticlesReader::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkAMReXParticlesReader::CanReadFile
static int CanReadFile(const char *fname, const char *particlesType=nullptr)
Returns 1 is fname refers to a plotfile that the reader can read.
vtkAMReXParticlesReader::SetController
void SetController(vtkMultiProcessController *controller)
Get/Set the controller to use.
vtkMultiBlockDataSetAlgorithm
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
Definition: vtkMultiBlockDataSetAlgorithm.h:36