VTK  9.2.6
vtkPIOReader.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPIOReader.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 =========================================================================*/
29 #ifndef vtkPIOReader_h
30 #define vtkPIOReader_h
31 
32 #include "vtkIOPIOModule.h" // For export macro
34 #include "vtkStdString.h" // for vtkStdString
35 
36 class vtkCallbackCommand;
38 class vtkFloatArray;
39 class vtkInformation;
42 class vtkStringArray;
43 
44 class PIOAdaptor;
45 class PIO_DATA;
46 
47 class VTKIOPIO_EXPORT vtkPIOReader : public vtkMultiBlockDataSetAlgorithm
48 {
49 public:
50  static vtkPIOReader* New();
52  void PrintSelf(ostream& os, vtkIndent indent) override;
53 
55 
58  vtkSetFilePathMacro(FileName);
59  vtkGetFilePathMacro(FileName);
61 
63 
66  vtkSetMacro(CurrentTimeStep, int);
67  vtkGetMacro(CurrentTimeStep, int);
69 
71 
74  vtkGetMacro(HyperTreeGrid, bool);
75  vtkSetMacro(HyperTreeGrid, bool);
77 
79 
82  vtkSetMacro(Tracers, bool);
83  vtkGetMacro(Tracers, bool);
85 
87 
90  vtkSetMacro(Float64, bool);
91  vtkGetMacro(Float64, bool);
93 
95 
101 
103 
108  int GetNumberOfCellArrays();
109  const char* GetCellArrayName(int index);
110  int GetCellArrayStatus(const char* name);
111  void SetCellArrayStatus(const char* name, int status);
112  void DisableAllCellArrays();
113  void EnableAllCellArrays();
114  vtkGetObjectMacro(CellDataArraySelection, vtkDataArraySelection);
116 
118 
121  int GetNumberOfTimeDataArrays() const;
122  const char* GetTimeDataArray(int idx) const;
123  vtkGetObjectMacro(TimeDataStringArray, vtkStringArray);
125 
127 
132  vtkGetStringMacro(ActiveTimeDataArrayName);
133  vtkSetStringMacro(ActiveTimeDataArrayName);
135 
136 protected:
137  vtkPIOReader();
138  ~vtkPIOReader() override;
139 
140  char* FileName; // First field part file giving path
141 
142  int Rank; // Number of this processor
143  int TotalRank; // Number of processors
144 
145  PIOAdaptor* pioAdaptor; // Adapts data format to VTK
146 
147  int NumberOfVariables; // Number of variables to display
148 
149  int NumberOfTimeSteps; // Temporal domain
150  double* TimeSteps; // Times available for request
151  int CurrentTimeStep; // Time currently displayed
152 
153  bool HyperTreeGrid; // Create HTG rather than UnstructuredGrid
154  bool Tracers; // Create UnstructuredGrid for tracer info
155  bool Float64; // Load variable data as 64 bit float
156 
157  // Controls initializing and querrying MPI
158  void SetController(vtkMultiProcessController*);
160 
161  // Selected field of interest
163 
164  // Time array selection
166 
167  // Active index of array used for time. If no time array is used, value should be -1.
170 
171  // Observer to modify this object when array selections are modified
173 
175  int RequestInformation(
177 
178  static void SelectionModifiedCallback(
179  vtkObject* caller, unsigned long eid, void* clientdata, void* calldata);
180 
181 private:
182  vtkPIOReader(const vtkPIOReader&) = delete;
183  void operator=(const vtkPIOReader&) = delete;
184 };
185 
186 #endif
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:38
char * FileName
Definition: vtkPIOReader.h:140
vtkStdString CurrentTimeDataArrayName
Definition: vtkPIOReader.h:169
abstract base class for most VTK objects
Definition: vtkObject.h:62
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:41
a vtkAbstractArray subclass for strings
vtkStringArray * TimeDataStringArray
Definition: vtkPIOReader.h:165
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:147
supports function callbacks
a simple class to control print indentation
Definition: vtkIndent.h:39
double * TimeSteps
Definition: vtkPIOReader.h:150
Store on/off settings for data arrays, etc.
vtkMultiProcessController * Controller
Definition: vtkPIOReader.h:159
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
bool HyperTreeGrid
Definition: vtkPIOReader.h:153
char * ActiveTimeDataArrayName
Definition: vtkPIOReader.h:168
PIOAdaptor * pioAdaptor
Definition: vtkPIOReader.h:145
vtkCallbackCommand * SelectionObserver
Definition: vtkPIOReader.h:172
Composite dataset that organizes datasets into blocks.
class for reading PIO (Parallel Input Output) data files
Definition: vtkPIOReader.h:47
Store zero or more vtkInformation instances.
int NumberOfTimeSteps
Definition: vtkPIOReader.h:149
vtkDataArraySelection * CellDataArraySelection
Definition: vtkPIOReader.h:162
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Multiprocessing communication superclass.