VTK
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 
41 class VTKIOEXODUS_EXPORT vtkCPExodusIIInSituReader :
43 {
44 public:
47  void PrintSelf(ostream &os, vtkIndent indent) override;
48 
50 
53  vtkSetStringMacro(FileName)
54  vtkGetStringMacro(FileName)
56 
58 
61  vtkGetMacro(CurrentTimeStep, int)
62  vtkSetMacro(CurrentTimeStep, int)
64 
66 
70  vtkGetVector2Macro(TimeStepRange, int)
72 
76  double GetTimeStepValue(int step)
77  {
78  return TimeSteps.at(step);
79  }
80 
81 protected:
83  ~vtkCPExodusIIInSituReader() override;
84 
85  int ProcessRequest(vtkInformation *request,
86  vtkInformationVector **inputVector,
87  vtkInformationVector *outputVector) override;
89  vtkInformationVector *) override;
91  vtkInformationVector *) override;
92 
93 private:
95  void operator=(const vtkCPExodusIIInSituReader &) = delete;
96 
97  bool ExOpen();
98  char *FileName;
99  int FileId;
100 
101  bool ExGetMetaData();
102  int NumberOfDimensions;
103  int NumberOfNodes;
104  int NumberOfElementBlocks;
105  std::vector<std::string> NodalVariableNames;
106  std::vector<std::string> ElementVariableNames;
107  std::vector<int> ElementBlockIds;
108  std::vector<double> TimeSteps;
109  int TimeStepRange[2];
110 
111  bool ExGetCoords();
112  vtkNew<vtkPoints> Points;
113 
114  bool ExGetNodalVars();
115  vtkNew<vtkPointData> PointData;
116 
117  bool ExGetElemBlocks();
118  vtkNew<vtkMultiBlockDataSet> ElementBlocks;
119 
120  void ExClose();
121 
122  int CurrentTimeStep;
123 };
124 
125 #endif //vtkCPExodusIIInSituReader_h
vtkPoints
represent and manipulate 3D points
Definition: vtkPoints.h:33
double
double
Definition: vtkVectorOperators.h:166
vtkMultiBlockDataSetAlgorithm::ProcessRequest
int ProcessRequest(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
see vtkAlgorithm for details
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:88
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkNew< vtkPoints >
vtkMultiBlockDataSetAlgorithm.h
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:80
vtkNew.h
vtkMultiBlockDataSetAlgorithm::RequestInformation
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Definition: vtkMultiBlockDataSetAlgorithm.h:80
vtkMultiBlockDataSetAlgorithm
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
Definition: vtkMultiBlockDataSetAlgorithm.h:32