VTK  9.7.1
vtkPIOReader.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright (c) 2021, Triad National Security, LLC
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-LANL-Triad-USGov
19 #ifndef vtkPIOReader_h
20 #define vtkPIOReader_h
21 
22 #include "vtkIOPIOModule.h" // For export macro
24 #include "vtkStdString.h" // for vtkStdString
25 
26 VTK_ABI_NAMESPACE_BEGIN
27 class vtkCallbackCommand;
29 class vtkFloatArray;
30 class vtkInformation;
33 class vtkStringArray;
34 
35 class PIOAdaptor;
36 class PIO_DATA;
37 
38 class VTKIOPIO_EXPORT vtkPIOReader : public vtkMultiBlockDataSetAlgorithm
39 {
40 public:
41  static vtkPIOReader* New();
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
46 
49  vtkSetFilePathMacro(FileName);
50  vtkGetFilePathMacro(FileName);
52 
54 
57  vtkSetMacro(CurrentTimeStep, int);
58  vtkGetMacro(CurrentTimeStep, int);
60 
62 
65  vtkGetMacro(HyperTreeGrid, bool);
66  vtkSetMacro(HyperTreeGrid, bool);
68 
70 
73  vtkSetMacro(Tracers, bool);
74  vtkGetMacro(Tracers, bool);
76 
78 
81  vtkSetMacro(Float64, bool);
82  vtkGetMacro(Float64, bool);
84 
86 
92 
94 
99  int GetNumberOfCellArrays();
100  const char* GetCellArrayName(int index);
101  int GetCellArrayStatus(const char* name);
102  void SetCellArrayStatus(const char* name, int status);
103  void DisableAllCellArrays();
104  void EnableAllCellArrays();
105  vtkGetObjectMacro(CellDataArraySelection, vtkDataArraySelection);
107 
109 
112  int GetNumberOfTimeDataArrays() const;
113  const char* GetTimeDataArray(int idx) const;
114  vtkGetObjectMacro(TimeDataStringArray, vtkStringArray);
116 
118 
123  vtkGetStringMacro(ActiveTimeDataArrayName);
124  vtkSetStringMacro(ActiveTimeDataArrayName);
126 
127 protected:
128  vtkPIOReader();
129  ~vtkPIOReader() override;
130 
131  char* FileName; // First field part file giving path
132 
133  int Rank; // Number of this processor
134  int TotalRank; // Number of processors
135 
136  PIOAdaptor* pioAdaptor; // Adapts data format to VTK
137 
138  int NumberOfVariables; // Number of variables to display
139 
140  int NumberOfTimeSteps; // Temporal domain
141  double* TimeSteps; // Times available for request
142  int CurrentTimeStep; // Time currently displayed
143 
144  bool HyperTreeGrid; // Create HTG rather than UnstructuredGrid
145  bool Tracers; // Create UnstructuredGrid for tracer info
146  bool Float64; // Load variable data as 64 bit float
147 
148  // Controls initializing and querying MPI
149  void SetController(vtkMultiProcessController*);
151 
152  // Selected field of interest
154 
155  // Time array selection
157 
158  // Active index of array used for time. If no time array is used, value should be -1.
161 
162  // Observer to modify this object when array selections are modified
164 
166  int RequestInformation(
168 
169  static void SelectionModifiedCallback(
170  vtkObject* caller, unsigned long eid, void* clientdata, void* calldata);
171 
172 private:
173  vtkPIOReader(const vtkPIOReader&) = delete;
174  void operator=(const vtkPIOReader&) = delete;
175 };
176 
177 VTK_ABI_NAMESPACE_END
178 #endif
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:27
char * FileName
Definition: vtkPIOReader.h:131
vtkStdString CurrentTimeDataArrayName
Definition: vtkPIOReader.h:160
abstract base class for most VTK objects
Definition: vtkObject.h:52
vtkMultiBlockDataSet * GetOutput()
Get the output data object for a port on this algorithm.
Store vtkAlgorithm input/output information.
class for reading PIO (Parallel Input Output) data files
Definition: PIOAdaptor.h:44
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:31
a vtkAbstractArray subclass for strings
vtkStringArray * TimeDataStringArray
Definition: vtkPIOReader.h:156
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:138
supports function callbacks
a simple class to control print indentation
Definition: vtkIndent.h:28
double * TimeSteps
Definition: vtkPIOReader.h:141
Store on/off settings for data arrays, etc.
vtkMultiProcessController * Controller
Definition: vtkPIOReader.h:150
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
bool HyperTreeGrid
Definition: vtkPIOReader.h:144
char * ActiveTimeDataArrayName
Definition: vtkPIOReader.h:159
class for reading PIO (Parallel Input Output) data files
Definition: PIOData.h:65
PIOAdaptor * pioAdaptor
Definition: vtkPIOReader.h:136
vtkCallbackCommand * SelectionObserver
Definition: vtkPIOReader.h:163
Composite dataset that organizes datasets into blocks.
class for reading PIO (Parallel Input Output) data files
Definition: vtkPIOReader.h:38
Store zero or more vtkInformation instances.
int NumberOfTimeSteps
Definition: vtkPIOReader.h:140
vtkDataArraySelection * CellDataArraySelection
Definition: vtkPIOReader.h:153
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Multiprocessing communication superclass.