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 
30 #ifndef vtkCPExodusIIInSituReader_h
31 #define vtkCPExodusIIInSituReader_h
32 
33 #include "vtkIOExodusModule.h" // For export macro
35 #include "vtkNew.h" // For vtkNew
36 #include <string> // For std::string
37 #include <vector> // For std::vector
38 
40 class vtkPointData;
41 class vtkPoints;
42 
45 {
46 public:
49  virtual void PrintSelf(ostream &os, vtkIndent indent);
50 
52 
53  vtkSetStringMacro(FileName)
54  vtkGetStringMacro(FileName)
56 
58 
59  vtkGetMacro(CurrentTimeStep, int)
60  vtkSetMacro(CurrentTimeStep, int)
62 
64 
67  vtkGetVector2Macro(TimeStepRange, int)
69 
71 
72  double GetTimeStepValue(int step)
73  {
74  return TimeSteps.at(step);
75  }
77 
78 protected:
81 
82  int ProcessRequest(vtkInformation *request,
83  vtkInformationVector **inputVector,
84  vtkInformationVector *outputVector);
89 
90 private:
91  vtkCPExodusIIInSituReader(const vtkCPExodusIIInSituReader &); // Not implemented.
92  void operator=(const vtkCPExodusIIInSituReader &); // Not implemented.
93 
94  bool ExOpen();
95  char *FileName;
96  int FileId;
97 
98  bool ExGetMetaData();
99  int NumberOfDimensions;
100  int NumberOfNodes;
101  int NumberOfElementBlocks;
102  std::vector<std::string> NodalVariableNames;
103  std::vector<std::string> ElementVariableNames;
104  std::vector<int> ElementBlockIds;
105  std::vector<double> TimeSteps;
106  int TimeStepRange[2];
107 
108  bool ExGetCoords();
109  vtkNew<vtkPoints> Points;
110 
111  bool ExGetNodalVars();
112  vtkNew<vtkPointData> PointData;
113 
114  bool ExGetElemBlocks();
115  vtkNew<vtkMultiBlockDataSet> ElementBlocks;
116 
117  void ExClose();
118 
119  int CurrentTimeStep;
120 };
121 
122 #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:36
Store vtkAlgorithm input/output information.
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
static vtkMultiBlockDataSetAlgorithm * New()
a simple class to control print indentation
Definition: vtkIndent.h:38
#define VTKIOEXODUS_EXPORT
maintain an unordered list of dataarray objects
Store zero or more vtkInformation instances.
represent and manipulate 3D points
Definition: vtkPoints.h:38
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)