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 
31 #ifndef vtkCPExodusIIInSituReader_h
32 #define vtkCPExodusIIInSituReader_h
33 
34 #include "vtkIOExodusModule.h" // For export macro
36 #include "vtkNew.h" // For vtkNew
37 #include <string> // For std::string
38 #include <vector> // For std::vector
39 
41 class vtkPointData;
42 class vtkPoints;
43 
44 class VTKIOEXODUS_EXPORT vtkCPExodusIIInSituReader :
46 {
47 public:
50  void PrintSelf(ostream &os, vtkIndent indent) override;
51 
53 
56  vtkSetStringMacro(FileName)
57  vtkGetStringMacro(FileName)
59 
61 
64  vtkGetMacro(CurrentTimeStep, int)
65  vtkSetMacro(CurrentTimeStep, int)
67 
69 
73  vtkGetVector2Macro(TimeStepRange, int)
75 
79  double GetTimeStepValue(int step)
80  {
81  return TimeSteps.at(step);
82  }
83 
84 protected:
86  ~vtkCPExodusIIInSituReader() override;
87 
88  int ProcessRequest(vtkInformation *request,
89  vtkInformationVector **inputVector,
90  vtkInformationVector *outputVector) override;
92  vtkInformationVector *) override;
94  vtkInformationVector *) override;
95 
96 private:
98  void operator=(const vtkCPExodusIIInSituReader &) = delete;
99 
100  bool ExOpen();
101  char *FileName;
102  int FileId;
103 
104  bool ExGetMetaData();
105  int NumberOfDimensions;
106  int NumberOfNodes;
107  int NumberOfElementBlocks;
108  std::vector<std::string> NodalVariableNames;
109  std::vector<std::string> ElementVariableNames;
110  std::vector<int> ElementBlockIds;
111  std::vector<double> TimeSteps;
112  int TimeStepRange[2];
113 
114  bool ExGetCoords();
115  vtkNew<vtkPoints> Points;
116 
117  bool ExGetNodalVars();
118  vtkNew<vtkPointData> PointData;
119 
120  bool ExGetElemBlocks();
121  vtkNew<vtkMultiBlockDataSet> ElementBlocks;
122 
123  void ExClose();
124 
125  int CurrentTimeStep;
126 };
127 
128 #endif //vtkCPExodusIIInSituReader_h
Read an Exodus II file into data structures that map the raw arrays returned by the Exodus II library...
represent and manipulate point attribute data
Definition: vtkPointData.h:37
Store vtkAlgorithm input/output information.
int ProcessRequest(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
see vtkAlgorithm for details
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
static vtkMultiBlockDataSetAlgorithm * New()
a simple class to control print indentation
Definition: vtkIndent.h:39
maintain an ordered list of dataarray objects
Store zero or more vtkInformation instances.
represent and manipulate 3D points
Definition: vtkPoints.h:39
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.