VTK  9.3.1
vtkCPExodusIIInSituReader.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
3 
19 #ifndef vtkCPExodusIIInSituReader_h
20 #define vtkCPExodusIIInSituReader_h
21 
22 #include "vtkIOExodusModule.h" // For export macro
24 #include "vtkNew.h" // For vtkNew
25 #include <string> // For std::string
26 #include <vector> // For std::vector
27 
28 VTK_ABI_NAMESPACE_BEGIN
30 class vtkPointData;
31 class vtkPoints;
32 
34 {
35 public:
38  void PrintSelf(ostream& os, vtkIndent indent) override;
39 
41 
44  vtkSetFilePathMacro(FileName);
45  vtkGetFilePathMacro(FileName);
47 
49 
52  vtkGetMacro(CurrentTimeStep, int);
53  vtkSetMacro(CurrentTimeStep, int);
55 
57 
61  vtkGetVector2Macro(TimeStepRange, int);
63 
67  double GetTimeStepValue(int step) { return TimeSteps.at(step); }
68 
69 protected:
71  ~vtkCPExodusIIInSituReader() override;
72 
74  vtkInformationVector* outputVector) override;
77 
78 private:
80  void operator=(const vtkCPExodusIIInSituReader&) = delete;
81 
82  bool ExOpen();
83  char* FileName;
84  int FileId;
85 
86  bool ExGetMetaData();
87  int NumberOfDimensions;
88  int NumberOfNodes;
89  int NumberOfElementBlocks;
90  std::vector<std::string> NodalVariableNames;
91  std::vector<std::string> ElementVariableNames;
92  std::vector<int> ElementBlockIds;
93  std::vector<double> TimeSteps;
94  int TimeStepRange[2];
95 
96  bool ExGetCoords();
97  vtkNew<vtkPoints> Points;
98 
99  bool ExGetNodalVars();
100  vtkNew<vtkPointData> PointData;
101 
102  bool ExGetElemBlocks();
103  vtkNew<vtkMultiBlockDataSet> ElementBlocks;
104 
105  void ExClose();
106 
107  int CurrentTimeStep;
108 };
109 
110 VTK_ABI_NAMESPACE_END
111 #endif // vtkCPExodusIIInSituReader_h
Read an Exodus II file into data structures that map the raw arrays returned by the Exodus II library...
represent and manipulate point attribute data
Definition: vtkPointData.h:29
double GetTimeStepValue(int step)
Get the floating point tag associated with the timestep at 'step'.
Store vtkAlgorithm input/output information.
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 vtkTypeBool
Definition: vtkABI.h:64
a simple class to control print indentation
Definition: vtkIndent.h:28
vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
see vtkAlgorithm for details
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
maintain an ordered list of dataarray objects
Store zero or more vtkInformation instances.
represent and manipulate 3D points
Definition: vtkPoints.h:28
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.