VTK  9.1.0
vtkCPExodusIIInSituReader.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkCPExodusIIInSituReader.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=========================================================================*/
15
28#ifndef vtkCPExodusIIInSituReader_h
29#define vtkCPExodusIIInSituReader_h
30
31#include "vtkIOExodusModule.h" // For export macro
33#include "vtkNew.h" // For vtkNew
34#include <string> // For std::string
35#include <vector> // For std::vector
36
38class vtkPointData;
39class vtkPoints;
40
42{
43public:
46 void PrintSelf(ostream& os, vtkIndent indent) override;
47
49
55
57
60 vtkGetMacro(CurrentTimeStep, int);
61 vtkSetMacro(CurrentTimeStep, int);
63
65
69 vtkGetVector2Macro(TimeStepRange, int);
71
75 double GetTimeStepValue(int step) { return TimeSteps.at(step); }
76
77protected:
80
82 vtkInformationVector* outputVector) override;
85
86private:
88 void operator=(const vtkCPExodusIIInSituReader&) = delete;
89
90 bool ExOpen();
91 char* FileName;
92 int FileId;
93
94 bool ExGetMetaData();
95 int NumberOfDimensions;
96 int NumberOfNodes;
97 int NumberOfElementBlocks;
98 std::vector<std::string> NodalVariableNames;
99 std::vector<std::string> ElementVariableNames;
100 std::vector<int> ElementBlockIds;
101 std::vector<double> TimeSteps;
102 int TimeStepRange[2];
103
104 bool ExGetCoords();
105 vtkNew<vtkPoints> Points;
106
107 bool ExGetNodalVars();
108 vtkNew<vtkPointData> PointData;
109
110 bool ExGetElemBlocks();
111 vtkNew<vtkMultiBlockDataSet> ElementBlocks;
112
113 void ExClose();
114
115 int CurrentTimeStep;
116};
117
118#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
see vtkAlgorithm for details
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:113
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
represent and manipulate point attribute data
Definition: vtkPointData.h:142
represent and manipulate 3D points
Definition: vtkPoints.h:143
int vtkTypeBool
Definition: vtkABI.h:69