VTK  9.2.5
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{
54public:
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
83
87 static int CanReadFile(VTK_FILEPATH const char* fname, const char* particlesType = nullptr);
88
90
95 vtkGetObjectMacro(Controller, vtkMultiProcessController);
97
98protected:
101
104
106 std::string PlotFileName;
108
109private:
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.
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:40
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:62
record modification and/or execution time
Definition: vtkTimeStamp.h:36
#define VTK_FILEPATH