VTK  9.0.1
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 
104  int GetNumberOfCellArrays();
105  const char* GetCellArrayName(int index);
106  int GetCellArrayStatus(const char* name);
107  void SetCellArrayStatus(const char* name, int status);
108  void DisableAllCellArrays();
109  void EnableAllCellArrays();
111 
112 protected:
113  vtkPIOReader();
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 
144  int RequestInformation(
146 
147  static void SelectionModifiedCallback(
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
Wrapper around std::string to keep symbols short.
Definition: vtkStdString.h:34
char * FileName
Definition: vtkPIOReader.h:116
abstract base class for most VTK objects
Definition: vtkObject.h:62
vtkMultiBlockDataSet * GetOutput()
Get the output data object for a port on this algorithm.
Store vtkAlgorithm input/output information.
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:35
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
static vtkMultiBlockDataSetAlgorithm * New()
int NumberOfVariables
Definition: vtkPIOReader.h:123
supports function callbacks
a simple class to control print indentation
Definition: vtkIndent.h:33
double * TimeSteps
Definition: vtkPIOReader.h:126
Store on/off settings for data arrays for a vtkSource.
vtkMultiProcessController * MPIController
Definition: vtkPIOReader.h:135
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
bool HyperTreeGrid
Definition: vtkPIOReader.h:130
PIOAdaptor * pioAdaptor
Definition: vtkPIOReader.h:121
vtkCallbackCommand * SelectionObserver
Definition: vtkPIOReader.h:141
Composite dataset that organizes datasets into blocks.
class for reading PIO (Parallel Input Output) data files
Definition: vtkPIOReader.h:43
Store zero or more vtkInformation instances.
int NumberOfTimeSteps
Definition: vtkPIOReader.h:125
vtkDataArraySelection * CellDataArraySelection
Definition: vtkPIOReader.h:138
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Multiprocessing communication superclass.