VTK  9.4.20241016
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
26VTK_ABI_NAMESPACE_BEGIN
29class vtkFloatArray;
30class vtkInformation;
33class vtkStringArray;
34
35class PIOAdaptor;
36class PIO_DATA;
37
38class VTKIOPIO_EXPORT vtkPIOReader : public vtkMultiBlockDataSetAlgorithm
39{
40public:
41 static vtkPIOReader* New();
43 void PrintSelf(ostream& os, vtkIndent indent) override;
44
46
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
100 const char* GetCellArrayName(int index);
101 int GetCellArrayStatus(const char* name);
102 void SetCellArrayStatus(const char* name, int status);
105 vtkGetObjectMacro(CellDataArraySelection, vtkDataArraySelection);
107
109
113 const char* GetTimeDataArray(int idx) const;
114 vtkGetObjectMacro(TimeDataStringArray, vtkStringArray);
116
118
123 vtkGetStringMacro(ActiveTimeDataArrayName);
124 vtkSetStringMacro(ActiveTimeDataArrayName);
126
127protected:
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 querrying MPI
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
168
170 vtkObject* caller, unsigned long eid, void* clientdata, void* calldata);
171
172private:
173 vtkPIOReader(const vtkPIOReader&) = delete;
174 void operator=(const vtkPIOReader&) = delete;
175};
176
177VTK_ABI_NAMESPACE_END
178#endif
class for reading PIO (Parallel Input Output) data files
Definition PIOAdaptor.h:45
class for reading PIO (Parallel Input Output) data files
Definition PIOData.h:66
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:108
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:162
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