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) VTK_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() VTK_OVERRIDE;
84 
85  int ProcessRequest(vtkInformation *request,
86  vtkInformationVector **inputVector,
87  vtkInformationVector *outputVector) VTK_OVERRIDE;
88  int RequestData(vtkInformation *, vtkInformationVector **,
89  vtkInformationVector *) VTK_OVERRIDE;
90  int RequestInformation(vtkInformation *, vtkInformationVector **,
91  vtkInformationVector *) VTK_OVERRIDE;
92 
93 private:
94  vtkCPExodusIIInSituReader(const vtkCPExodusIIInSituReader &) VTK_DELETE_FUNCTION;
95  void operator=(const vtkCPExodusIIInSituReader &) VTK_DELETE_FUNCTION;
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
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:31
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
static vtkMultiBlockDataSetAlgorithm * New()
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
Allocate and hold a VTK object.
Definition: vtkNew.h:61
maintain an ordered list of dataarray objects
Composite dataset that organizes datasets into blocks.
Store zero or more vtkInformation instances.
represent and manipulate 3D points
Definition: vtkPoints.h:33