VTK  9.3.1
vtkPIOReader.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
17 #ifndef vtkPIOReader_h
18 #define vtkPIOReader_h
19 
20 #include "vtkIOPIOModule.h" // For export macro
22 #include "vtkStdString.h" // for vtkStdString
23 
24 VTK_ABI_NAMESPACE_BEGIN
25 class vtkCallbackCommand;
27 class vtkFloatArray;
28 class vtkInformation;
31 class vtkStringArray;
32 
33 class PIOAdaptor;
34 class PIO_DATA;
35 
36 class VTKIOPIO_EXPORT vtkPIOReader : public vtkMultiBlockDataSetAlgorithm
37 {
38 public:
39  static vtkPIOReader* New();
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
44 
47  vtkSetFilePathMacro(FileName);
48  vtkGetFilePathMacro(FileName);
50 
52 
55  vtkSetMacro(CurrentTimeStep, int);
56  vtkGetMacro(CurrentTimeStep, int);
58 
60 
63  vtkGetMacro(HyperTreeGrid, bool);
64  vtkSetMacro(HyperTreeGrid, bool);
66 
68 
71  vtkSetMacro(Tracers, bool);
72  vtkGetMacro(Tracers, bool);
74 
76 
79  vtkSetMacro(Float64, bool);
80  vtkGetMacro(Float64, bool);
82 
84 
90 
92 
97  int GetNumberOfCellArrays();
98  const char* GetCellArrayName(int index);
99  int GetCellArrayStatus(const char* name);
100  void SetCellArrayStatus(const char* name, int status);
101  void DisableAllCellArrays();
102  void EnableAllCellArrays();
103  vtkGetObjectMacro(CellDataArraySelection, vtkDataArraySelection);
105 
107 
110  int GetNumberOfTimeDataArrays() const;
111  const char* GetTimeDataArray(int idx) const;
112  vtkGetObjectMacro(TimeDataStringArray, vtkStringArray);
114 
116 
121  vtkGetStringMacro(ActiveTimeDataArrayName);
122  vtkSetStringMacro(ActiveTimeDataArrayName);
124 
125 protected:
126  vtkPIOReader();
127  ~vtkPIOReader() override;
128 
129  char* FileName; // First field part file giving path
130 
131  int Rank; // Number of this processor
132  int TotalRank; // Number of processors
133 
134  PIOAdaptor* pioAdaptor; // Adapts data format to VTK
135 
136  int NumberOfVariables; // Number of variables to display
137 
138  int NumberOfTimeSteps; // Temporal domain
139  double* TimeSteps; // Times available for request
140  int CurrentTimeStep; // Time currently displayed
141 
142  bool HyperTreeGrid; // Create HTG rather than UnstructuredGrid
143  bool Tracers; // Create UnstructuredGrid for tracer info
144  bool Float64; // Load variable data as 64 bit float
145 
146  // Controls initializing and querrying MPI
147  void SetController(vtkMultiProcessController*);
149 
150  // Selected field of interest
152 
153  // Time array selection
155 
156  // Active index of array used for time. If no time array is used, value should be -1.
159 
160  // Observer to modify this object when array selections are modified
162 
164  int RequestInformation(
166 
167  static void SelectionModifiedCallback(
168  vtkObject* caller, unsigned long eid, void* clientdata, void* calldata);
169 
170 private:
171  vtkPIOReader(const vtkPIOReader&) = delete;
172  void operator=(const vtkPIOReader&) = delete;
173 };
174 
175 VTK_ABI_NAMESPACE_END
176 #endif
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:28
char * FileName
Definition: vtkPIOReader.h:129
vtkStdString CurrentTimeDataArrayName
Definition: vtkPIOReader.h:158
abstract base class for most VTK objects
Definition: vtkObject.h:51
vtkMultiBlockDataSet * GetOutput()
Get the output data object for a port on this algorithm.
Store vtkAlgorithm input/output information.
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:30
a vtkAbstractArray subclass for strings
vtkStringArray * TimeDataStringArray
Definition: vtkPIOReader.h:154
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
static vtkMultiBlockDataSetAlgorithm * New()
int NumberOfVariables
Definition: vtkPIOReader.h:136
supports function callbacks
a simple class to control print indentation
Definition: vtkIndent.h:28
double * TimeSteps
Definition: vtkPIOReader.h:139
Store on/off settings for data arrays, etc.
vtkMultiProcessController * Controller
Definition: vtkPIOReader.h:148
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
bool HyperTreeGrid
Definition: vtkPIOReader.h:142
char * ActiveTimeDataArrayName
Definition: vtkPIOReader.h:157
PIOAdaptor * pioAdaptor
Definition: vtkPIOReader.h:134
vtkCallbackCommand * SelectionObserver
Definition: vtkPIOReader.h:161
Composite dataset that organizes datasets into blocks.
class for reading PIO (Parallel Input Output) data files
Definition: vtkPIOReader.h:36
Store zero or more vtkInformation instances.
int NumberOfTimeSteps
Definition: vtkPIOReader.h:138
vtkDataArraySelection * CellDataArraySelection
Definition: vtkPIOReader.h:151
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Multiprocessing communication superclass.