VTK  9.3.20240421
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
28VTK_ABI_NAMESPACE_BEGIN
30class vtkPointData;
31class vtkPoints;
32
34{
35public:
38 void PrintSelf(ostream& os, vtkIndent indent) override;
39
41
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
69protected:
72
74 vtkInformationVector* outputVector) override;
77
78private:
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
110VTK_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...
vtkGetFilePathMacro(FileName)
Get/Set the name of the Exodus file to read.
double GetTimeStepValue(int step)
Get the floating point tag associated with the timestep at 'step'.
~vtkCPExodusIIInSituReader() override
vtkSetFilePathMacro(FileName)
Get/Set the name of the Exodus file to read.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
static vtkCPExodusIIInSituReader * New()
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
maintain an ordered list of dataarray objects
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.
Allocate and hold a VTK object.
Definition vtkNew.h:160
represent and manipulate point attribute data
represent and manipulate 3D points
Definition vtkPoints.h:139
int vtkTypeBool
Definition vtkABI.h:64