VTK  9.0.1
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 
38 class vtkPointData;
39 class vtkPoints;
40 
42 {
43 public:
46  void PrintSelf(ostream& os, vtkIndent indent) override;
47 
49 
52  vtkSetStringMacro(FileName);
53  vtkGetStringMacro(FileName);
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 
77 protected:
79  ~vtkCPExodusIIInSituReader() override;
80 
82  vtkInformationVector* outputVector) override;
85 
86 private:
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
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:33
vtkPointData
represent and manipulate point attribute data
Definition: vtkPointData.h:31
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:35
vtkDataArrayCollection
maintain an ordered list of dataarray objects
Definition: vtkDataArrayCollection.h:31
vtkCPExodusIIInSituReader
Read an Exodus II file into data structures that map the raw arrays returned by the Exodus II library...
Definition: vtkCPExodusIIInSituReader.h:41
vtkMultiBlockDataSetAlgorithm::New
static vtkMultiBlockDataSetAlgorithm * New()
vtkMultiBlockDataSetAlgorithm::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Definition: vtkMultiBlockDataSetAlgorithm.h:89
vtkMultiBlockDataSetAlgorithm::ProcessRequest
vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
see vtkAlgorithm for details
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkNew< vtkPoints >
vtkMultiBlockDataSetAlgorithm.h
vtkCPExodusIIInSituReader::GetTimeStepValue
double GetTimeStepValue(int step)
Get the floating point tag associated with the timestep at 'step'.
Definition: vtkCPExodusIIInSituReader.h:75
vtkMultiBlockDataSetAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:73
vtkNew.h
vtkMultiBlockDataSetAlgorithm::RequestInformation
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Definition: vtkMultiBlockDataSetAlgorithm.h:80
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkMultiBlockDataSetAlgorithm
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
Definition: vtkMultiBlockDataSetAlgorithm.h:32