VTK  9.2.6
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 =========================================================================*/
39 #ifndef vtkAMReXParticlesReader_h
40 #define vtkAMReXParticlesReader_h
41 
42 #include "vtkIOAMRModule.h" // For export macro
44 #include "vtkNew.h" // for vtkNew
45 
46 #include <string> // for std::string.
47 
51 
53 {
54 public:
55  static vtkAMReXParticlesReader* New();
57  void PrintSelf(ostream& os, vtkIndent indent) override;
58 
60 
64  void SetPlotFileName(VTK_FILEPATH const char* fname);
65  VTK_FILEPATH const char* GetPlotFileName() const;
67 
69 
72  void SetParticleType(const std::string& str);
73  const std::string& GetParticleType() const { return this->ParticleType; }
75 
82  vtkDataArraySelection* GetPointDataArraySelection() const;
83 
87  static int CanReadFile(VTK_FILEPATH const char* fname, const char* particlesType = nullptr);
88 
90 
94  void SetController(vtkMultiProcessController* controller);
95  vtkGetObjectMacro(Controller, vtkMultiProcessController);
97 
98 protected:
100  ~vtkAMReXParticlesReader() override;
101 
104 
108 
109 private:
111  void operator=(const vtkAMReXParticlesReader&) = delete;
112 
116  bool ReadMetaData();
117 
122  bool ReadLevel(const int level, vtkMultiPieceDataSet* pdataset, const int piece_idx,
123  const int num_pieces) const;
124 
125  vtkTimeStamp PlotFileNameMTime;
126  vtkTimeStamp MetaDataMTime;
127  std::string ParticleType;
128  vtkNew<vtkDataArraySelection> PointDataArraySelection;
129 
130  class AMReXParticleHeader;
131  AMReXParticleHeader* Header;
132  friend class AMReXParticleHeader;
133 };
134 
135 #endif
reader for AMReX plotfiles particle data.
Store vtkAlgorithm input/output information.
vtkMultiProcessController * Controller
record modification and/or execution time
Definition: vtkTimeStamp.h:35
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
static vtkMultiBlockDataSetAlgorithm * New()
a simple class to control print indentation
Definition: vtkIndent.h:39
Store on/off settings for data arrays, etc.
composite dataset to encapsulates pieces of dataset.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
const std::string & GetParticleType() const
Get/Set the particle type to read.
#define VTK_FILEPATH
Store zero or more vtkInformation instances.
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Multiprocessing communication superclass.