VTK: IO/Exodus/vtkCPExodusIIInSituReader.h Source File

| 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
23 #include "vtkMultiBlockDataSetAlgorithm.h"
24 #include "vtkNew.h" // For vtkNew
25 #include <string> // For std::string
26 #include <vector> // For std::vector
27
28 VTK_ABI_NAMESPACE_BEGIN
29 class vtkDataArrayCollection;
30 class vtkPointData;
31 class vtkPoints;
32
33 class VTKIOEXODUS_EXPORT vtkCPExodusIIInSituReader : public vtkMultiBlockDataSetAlgorithm
34 {
35 public:
36 static vtkCPExodusIIInSituReader* New();
37 vtkTypeMacro(vtkCPExodusIIInSituReader, vtkMultiBlockDataSetAlgorithm);
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:
70 vtkCPExodusIIInSituReader();
71 ~vtkCPExodusIIInSituReader() override;
72
73 vtkTypeBool ProcessRequest(vtkInformation* request, vtkInformationVector** inputVector,
74 vtkInformationVector* outputVector) override;
75 int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
76 int RequestInformation(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
77
78 private:
79 vtkCPExodusIIInSituReader(const vtkCPExodusIIInSituReader&) = delete;
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
vtkCPExodusIIInSituReader
Read an Exodus II file into data structures that map the raw arrays returned by the Exodus II library...
Definition: vtkCPExodusIIInSituReader.h:34
vtkCPExodusIIInSituReader::vtkCPExodusIIInSituReader
vtkCPExodusIIInSituReader()
vtkCPExodusIIInSituReader::vtkGetFilePathMacro
vtkGetFilePathMacro(FileName)
Get/Set the name of the Exodus file to read.
vtkCPExodusIIInSituReader::GetTimeStepValue
double GetTimeStepValue(int step)
Get the floating point tag associated with the timestep at 'step'.
Definition: vtkCPExodusIIInSituReader.h:67
vtkCPExodusIIInSituReader::~vtkCPExodusIIInSituReader
~vtkCPExodusIIInSituReader() override
vtkCPExodusIIInSituReader::vtkSetFilePathMacro
vtkSetFilePathMacro(FileName)
Get/Set the name of the Exodus file to read.
vtkCPExodusIIInSituReader::New
static vtkCPExodusIIInSituReader * New()
vtkCPExodusIIInSituReader::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkCPExodusIIInSituReader::RequestInformation
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkCPExodusIIInSituReader::ProcessRequest
vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
see vtkAlgorithm for details
vtkCPExodusIIInSituReader::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkDataArrayCollection
maintain an ordered list of dataarray objects
Definition: vtkDataArrayCollection.h:24
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkMultiBlockDataSetAlgorithm
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
Definition: vtkMultiBlockDataSetAlgorithm.h:25
vtkNew< vtkPoints >
vtkPointData
represent and manipulate point attribute data
Definition: vtkPointData.h:39
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:38
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:64
vtkMultiBlockDataSetAlgorithm.h
vtkNew.h