VTK
vtkExodusModel.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkExodusModel.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 /*----------------------------------------------------------------------------
16  Copyright (c) Sandia Corporation
17  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
18 ----------------------------------------------------------------------------*/
19 
54 #ifndef __vtkExodusModel_h
55 #define __vtkExodusModel_h
56 
57 #include "vtkIOExodusModule.h" // For export macro
58 #include "vtkObject.h"
59 
60 #include "vtkModelMetadata.h" // So those who include vtkExodusModel don't
61  // need to know anything about ModelMetadata
62 
63 class vtkIdTypeArray;
65 
67 {
68 public:
70  virtual void PrintSelf(ostream &os, vtkIndent indent);
71 
72  static vtkExodusModel *New();
73 
83  int SetGlobalInformation(int fid, int compute_word_size);
84 
97  int AddUGridElementVariable(char *ugridVarName, char *origName, int numComponents);
98  int RemoveUGridElementVariable(char *ugridVarName);
99 
100  int AddUGridNodeVariable(char *ugridVarName, char *origName, int numComponents);
101  int RemoveUGridNodeVariable(char *ugridVarName);
102 
103  void SetElementVariableInfo(int numOrigNames, char **origNames,
104  int numNames, char **names, int *numComp, int *map);
105  void SetNodeVariableInfo(int numOrigNames, char **origNames,
106  int numNames, char **names, int *numComp, int *map);
107 
121  int SetLocalInformation(vtkUnstructuredGrid *ugrid,
122  int fid, int timeStep, int newGeometry, int compute_word_size);
123 
127  static int HasMetadata(vtkUnstructuredGrid *grid);
128 
131  vtkModelMetadata *GetModelMetadata();
132  void SetModelMetadata(vtkModelMetadata *emData);
133 
143  int UnpackExodusModel(vtkUnstructuredGrid *grid, int deleteIt);
144 
149  int MergeExodusModel(vtkExodusModel *em);
150 
158  vtkExodusModel *ExtractExodusModel(vtkIdTypeArray *globalCellIdList,
159  vtkUnstructuredGrid *grid);
160 
166  void PackExodusModel(vtkUnstructuredGrid *grid);
167 
170  void Reset();
171 
172 protected:
173 
174  vtkExodusModel();
175  ~vtkExodusModel();
176 
177 private:
178 
179  vtkModelMetadata *CheckSetModelMetadata();
180 
181  static void CopyDoubleToFloat(float *f, double *d, int len);
182 
183  int SetLocalBlockInformation(
184  int fid, int use_floats, int *blockIds , int *cellIds, int ncells);
185  int SetLocalNodeSetInformation(
186  int fid, int use_floats, int *pointIds, int npoints);
187  int SetLocalSideSetInformation(
188  int fid, int use_floats, int *cellIds, int ncells);
189 
190  void RemoveBeginningAndTrailingSpaces(char **names, int len);
191 
192  vtkModelMetadata *ModelMetadata;
193 
194  int GeometryCount;
195 
196  vtkExodusModel(const vtkExodusModel&); // Not implemented
197  void operator=(const vtkExodusModel&); // Not implemented
198 };
199 #endif
GLclampf f
Definition: vtkgl.h:14181
abstract base class for most VTK objects
Definition: vtkObject.h:61
GLenum GLsizei len
Definition: vtkgl.h:13010
dynamic, self-adjusting array of vtkIdType
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:619
Exodus Model.
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:38
dataset represents arbitrary combinations of all possible cell types
#define VTKIOEXODUS_EXPORT
GLuint GLuint * names
Definition: vtkgl.h:19215
This class encapsulates the metadata that appear in mesh-based file formats but do not appear in vtkU...
static vtkObject * New()