VTK  9.3.0
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
24VTK_ABI_NAMESPACE_BEGIN
27class vtkFloatArray;
28class vtkInformation;
31class vtkStringArray;
32
33class PIOAdaptor;
34class PIO_DATA;
35
36class VTKIOPIO_EXPORT vtkPIOReader : public vtkMultiBlockDataSetAlgorithm
37{
38public:
39 static vtkPIOReader* New();
41 void PrintSelf(ostream& os, vtkIndent indent) override;
42
44
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
98 const char* GetCellArrayName(int index);
99 int GetCellArrayStatus(const char* name);
100 void SetCellArrayStatus(const char* name, int status);
103 vtkGetObjectMacro(CellDataArraySelection, vtkDataArraySelection);
105
107
111 const char* GetTimeDataArray(int idx) const;
112 vtkGetObjectMacro(TimeDataStringArray, vtkStringArray);
114
116
121 vtkGetStringMacro(ActiveTimeDataArrayName);
122 vtkSetStringMacro(ActiveTimeDataArrayName);
124
125protected:
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
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
166
168 vtkObject* caller, unsigned long eid, void* clientdata, void* calldata);
169
170private:
171 vtkPIOReader(const vtkPIOReader&) = delete;
172 void operator=(const vtkPIOReader&) = delete;
173};
174
175VTK_ABI_NAMESPACE_END
176#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:29
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:49
class for reading PIO (Parallel Input Output) data files
void DisableAllCellArrays()
The following methods allow selective reading of solutions fields.
~vtkPIOReader() override
vtkMultiProcessController * Controller
PIOAdaptor * pioAdaptor
vtkStringArray * TimeDataStringArray
void SetController(vtkMultiProcessController *)
char * ActiveTimeDataArrayName
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.
double * TimeSteps
const char * GetCellArrayName(int index)
The following methods allow selective reading of solutions fields.
vtkMultiBlockDataSet * GetOutput()
Get the reader's output.
static void SelectionModifiedCallback(vtkObject *caller, unsigned long eid, void *clientdata, void *calldata)
vtkMultiBlockDataSet * GetOutput(int index)
Get the reader's output.
vtkDataArraySelection * CellDataArraySelection
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
const char * GetTimeDataArray(int idx) const
Getters for time data array candidates.
void EnableAllCellArrays()
The following methods allow selective reading of solutions fields.
vtkCallbackCommand * SelectionObserver
vtkSetFilePathMacro(FileName)
Specify file name of PIO data file to read.
int GetNumberOfTimeDataArrays() const
Getters for time data array candidates.
static vtkPIOReader * New()
Wrapper around std::string to keep symbols short.
a vtkAbstractArray subclass for strings