VTK  9.1.0
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=========================================================================*/
26#ifndef vtkPIOReader_h
27#define vtkPIOReader_h
28
29#include "vtkIOPIOModule.h" // For export macro
31#include "vtkStdString.h" // for vtkStdString
32
35class vtkFloatArray;
36class vtkInformation;
39class vtkStringArray;
40
41class PIOAdaptor;
42class PIO_DATA;
43
44class VTKIOPIO_EXPORT vtkPIOReader : public vtkMultiBlockDataSetAlgorithm
45{
46public:
47 static vtkPIOReader* New();
49 void PrintSelf(ostream& os, vtkIndent indent) override;
50
52
58
60
63 vtkSetMacro(CurrentTimeStep, int);
64 vtkGetMacro(CurrentTimeStep, int);
66
68
71 vtkGetMacro(HyperTreeGrid, bool);
72 vtkSetMacro(HyperTreeGrid, bool);
74
76
79 vtkSetMacro(Tracers, bool);
80 vtkGetMacro(Tracers, bool);
82
84
87 vtkSetMacro(Float64, bool);
88 vtkGetMacro(Float64, bool);
90
92
98
100
106 const char* GetCellArrayName(int index);
107 int GetCellArrayStatus(const char* name);
108 void SetCellArrayStatus(const char* name, int status);
111 vtkGetObjectMacro(CellDataArraySelection, vtkDataArraySelection);
113
115
119 const char* GetTimeDataArray(int idx) const;
120 vtkGetObjectMacro(TimeDataStringArray, vtkStringArray);
122
124
129 vtkGetStringMacro(ActiveTimeDataArrayName);
130 vtkSetStringMacro(ActiveTimeDataArrayName);
132
133protected:
135 ~vtkPIOReader() override;
136
137 char* FileName; // First field part file giving path
138
139 int Rank; // Number of this processor
140 int TotalRank; // Number of processors
141
142 PIOAdaptor* pioAdaptor; // Adapts data format to VTK
143
144 int NumberOfVariables; // Number of variables to display
145
146 int NumberOfTimeSteps; // Temporal domain
147 double* TimeSteps; // Times available for request
148 int CurrentTimeStep; // Time currently displayed
149
150 bool HyperTreeGrid; // Create HTG rather than UnstructuredGrid
151 bool Tracers; // Create UnstructuredGrid for tracer info
152 bool Float64; // Load variable data as 64 bit float
153
154 // Controls initializing and querrying MPI
156
157 // Selected field of interest
159
160 // Time array selection
162
163 // Active index of array used for time. If no time array is used, value should be -1.
166
167 // Observer to modify this object when array selections are modified
169
173
175 vtkObject* caller, unsigned long eid, void* clientdata, void* calldata);
176
177private:
178 vtkPIOReader(const vtkPIOReader&) = delete;
179 void operator=(const vtkPIOReader&) = delete;
180};
181
182#endif
supports function callbacks
Store on/off settings for data arrays for a vtkSource.
dynamic, self-adjusting array of float
a simple class to control print indentation
Definition: vtkIndent.h:113
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:45
void DisableAllCellArrays()
The following methods allow selective reading of solutions fields.
~vtkPIOReader() override
vtkMultiProcessController * Controller
Definition: vtkPIOReader.h:155
int NumberOfVariables
Definition: vtkPIOReader.h:144
PIOAdaptor * pioAdaptor
Definition: vtkPIOReader.h:142
vtkStringArray * TimeDataStringArray
Definition: vtkPIOReader.h:161
char * ActiveTimeDataArrayName
Definition: vtkPIOReader.h:164
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
Definition: vtkPIOReader.h:147
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
Definition: vtkPIOReader.h:158
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:165
const char * GetTimeDataArray(int idx) const
Getters for time data array candidates.
bool HyperTreeGrid
Definition: vtkPIOReader.h:150
char * FileName
Definition: vtkPIOReader.h:137
void EnableAllCellArrays()
The following methods allow selective reading of solutions fields.
vtkCallbackCommand * SelectionObserver
Definition: vtkPIOReader.h:168
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:146
static vtkPIOReader * New()
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:105
a vtkAbstractArray subclass for strings