VTK  9.0.2
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 
32 class vtkCallbackCommand;
34 class vtkFloatArray;
35 class vtkInformation;
38 class vtkStdString;
39 
40 class PIOAdaptor;
41 class PIO_DATA;
42 
43 class VTKIOPIO_EXPORT vtkPIOReader : public vtkMultiBlockDataSetAlgorithm
44 {
45 public:
46  static vtkPIOReader* New();
48  void PrintSelf(ostream& os, vtkIndent indent) override;
49 
51 
54  vtkSetStringMacro(FileName);
55  vtkGetStringMacro(FileName);
57 
59 
62  vtkSetMacro(CurrentTimeStep, int);
63  vtkGetMacro(CurrentTimeStep, int);
65 
67 
70  vtkGetMacro(HyperTreeGrid, bool);
71  vtkSetMacro(HyperTreeGrid, bool);
73 
75 
78  vtkSetMacro(Tracers, bool);
79  vtkGetMacro(Tracers, bool);
81 
83 
86  vtkSetMacro(Float64, bool);
87  vtkGetMacro(Float64, bool);
89 
91 
97 
99 
105  const char* GetCellArrayName(int index);
106  int GetCellArrayStatus(const char* name);
107  void SetCellArrayStatus(const char* name, int status);
111 
112 protected:
114  ~vtkPIOReader() override;
115 
116  char* FileName; // First field part file giving path
117 
118  int Rank; // Number of this processor
119  int TotalRank; // Number of processors
120 
121  PIOAdaptor* pioAdaptor; // Adapts data format to VTK
122 
123  int NumberOfVariables; // Number of variables to display
124 
125  int NumberOfTimeSteps; // Temporal domain
126  double* TimeSteps; // Times available for request
127  int CurrentTimeStep; // Time currently displayed
128  int LastTimeStep; // Last time displayed
129 
130  bool HyperTreeGrid; // Create HTG rather than UnstructuredGrid
131  bool Tracers; // Create UnstructuredGrid for tracer info
132  bool Float64; // Load variable data as 64 bit float
133 
134  // Controls initializing and querrying MPI
136 
137  // Selected field of interest
139 
140  // Observer to modify this object when array selections are modified
142 
146 
148  vtkObject* caller, unsigned long eid, void* clientdata, void* calldata);
149 
150 private:
151  vtkPIOReader(const vtkPIOReader&) = delete;
152  void operator=(const vtkPIOReader&) = delete;
153 };
154 
155 #endif
supports function callbacks
Store on/off settings for data arrays for a vtkSource.
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:36
a simple class to control print indentation
Definition: vtkIndent.h:34
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:63
class for reading PIO (Parallel Input Output) data files
Definition: vtkPIOReader.h:44
void DisableAllCellArrays()
~vtkPIOReader() override
vtkMultiBlockDataSet * GetOutput(int index)
int NumberOfVariables
Definition: vtkPIOReader.h:123
PIOAdaptor * pioAdaptor
Definition: vtkPIOReader.h:121
int GetCellArrayStatus(const char *name)
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:126
static void SelectionModifiedCallback(vtkObject *caller, unsigned long eid, void *clientdata, void *calldata)
vtkDataArraySelection * CellDataArraySelection
Definition: vtkPIOReader.h:138
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.
void SetCellArrayStatus(const char *name, int status)
int GetNumberOfCellArrays()
The following methods allow selective reading of solutions fields.
vtkMultiProcessController * MPIController
Definition: vtkPIOReader.h:135
const char * GetCellArrayName(int index)
bool HyperTreeGrid
Definition: vtkPIOReader.h:130
char * FileName
Definition: vtkPIOReader.h:116
void EnableAllCellArrays()
vtkCallbackCommand * SelectionObserver
Definition: vtkPIOReader.h:141
int NumberOfTimeSteps
Definition: vtkPIOReader.h:125
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:35
@ name
Definition: vtkX3D.h:225
@ index
Definition: vtkX3D.h:252