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:
52  static vtkAMReXParticlesReader* New();
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 
79  vtkDataArraySelection* GetPointDataArraySelection() const;
80 
84  static int CanReadFile(const char* fname, const char* particlesType = nullptr);
85 
87 
91  void SetController(vtkMultiProcessController* controller);
92  vtkGetObjectMacro(Controller, vtkMultiProcessController);
94 
95 protected:
97  ~vtkAMReXParticlesReader() override;
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
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 for a vtkSource.
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.
Store zero or more vtkInformation instances.
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Multiprocessing communication superclass.