VTK  9.2.5
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 
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 
109  const char* GetCellArrayName(int index);
110  int GetCellArrayStatus(const char* name);
111  void SetCellArrayStatus(const char* name, int status);
114  vtkGetObjectMacro(CellDataArraySelection, vtkDataArraySelection);
116 
118 
122  const char* GetTimeDataArray(int idx) const;
123  vtkGetObjectMacro(TimeDataStringArray, vtkStringArray);
125 
127 
132  vtkGetStringMacro(ActiveTimeDataArrayName);
133  vtkSetStringMacro(ActiveTimeDataArrayName);
135 
136 protected:
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
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 
177 
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
supports function callbacks
Store on/off settings for data arrays, etc.
dynamic, self-adjusting array of float
a simple class to control print indentation
Definition: vtkIndent.h:119
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
Composite dataset that organizes datasets into blocks.
Multiprocessing communication superclass.
abstract base class for most VTK objects
Definition: vtkObject.h:82
class for reading PIO (Parallel Input Output) data files
Definition: vtkPIOReader.h:48
void DisableAllCellArrays()
The following methods allow selective reading of solutions fields.
~vtkPIOReader() override
vtkMultiBlockDataSet * GetOutput(int index)
Get the reader's output.
vtkMultiProcessController * Controller
Definition: vtkPIOReader.h:159
int NumberOfVariables
Definition: vtkPIOReader.h:147
PIOAdaptor * pioAdaptor
Definition: vtkPIOReader.h:145
vtkStringArray * TimeDataStringArray
Definition: vtkPIOReader.h:165
void SetController(vtkMultiProcessController *)
char * ActiveTimeDataArrayName
Definition: vtkPIOReader.h:168
int GetCellArrayStatus(const char *name)
The following methods allow selective reading of solutions fields.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkMultiBlockDataSet * GetOutput()
Get the reader's output.
static vtkPIOReader * New()
double * TimeSteps
Definition: vtkPIOReader.h:150
static void SelectionModifiedCallback(vtkObject *caller, unsigned long eid, void *clientdata, void *calldata)
const char * GetTimeDataArray(int idx) const
Getters for time data array candidates.
vtkDataArraySelection * CellDataArraySelection
Definition: vtkPIOReader.h:162
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
int RequestInformation(vtkInformation *, vtkInformationVector **inVector, vtkInformationVector *) override
This is called by the superclass.
vtkGetFilePathMacro(FileName)
Specify file name of PIO data file to read.
void SetCellArrayStatus(const char *name, int status)
The following methods allow selective reading of solutions fields.
int GetNumberOfCellArrays()
The following methods allow selective reading of solutions fields.
vtkStdString CurrentTimeDataArrayName
Definition: vtkPIOReader.h:169
const char * GetCellArrayName(int index)
The following methods allow selective reading of solutions fields.
bool HyperTreeGrid
Definition: vtkPIOReader.h:153
char * FileName
Definition: vtkPIOReader.h:140
void EnableAllCellArrays()
The following methods allow selective reading of solutions fields.
vtkCallbackCommand * SelectionObserver
Definition: vtkPIOReader.h:172
vtkSetFilePathMacro(FileName)
Specify file name of PIO data file to read.
int GetNumberOfTimeDataArrays() const
Getters for time data array candidates.
int NumberOfTimeSteps
Definition: vtkPIOReader.h:149
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:108
a vtkAbstractArray subclass for strings
@ name
Definition: vtkX3D.h:225
@ index
Definition: vtkX3D.h:252