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 "vtkObject.h"
58 
59 #include "vtkModelMetadata.h" // So those who include vtkExodusModel don't
60  // need to know anything about ModelMetadata
61 
62 class vtkIdTypeArray;
64 
66 {
67 public:
68  vtkTypeMacro(vtkExodusModel, vtkObject);
69  virtual void PrintSelf(ostream &os, vtkIndent indent);
70 
71  static vtkExodusModel *New();
72 
82  int SetGlobalInformation(int fid, int compute_word_size);
83 
96  int AddUGridElementVariable(char *ugridVarName, char *origName, int numComponents);
97  int RemoveUGridElementVariable(char *ugridVarName);
98 
99  int AddUGridNodeVariable(char *ugridVarName, char *origName, int numComponents);
100  int RemoveUGridNodeVariable(char *ugridVarName);
101 
102  void SetElementVariableInfo(int numOrigNames, char **origNames,
103  int numNames, char **names, int *numComp, int *map);
104  void SetNodeVariableInfo(int numOrigNames, char **origNames,
105  int numNames, char **names, int *numComp, int *map);
106 
120  int SetLocalInformation(vtkUnstructuredGrid *ugrid,
121  int fid, int timeStep, int newGeometry, int compute_word_size);
122 
126  static int HasMetadata(vtkUnstructuredGrid *grid);
127 
130  vtkModelMetadata *GetModelMetadata();
131  void SetModelMetadata(vtkModelMetadata *emData);
132 
142  int UnpackExodusModel(vtkUnstructuredGrid *grid, int deleteIt);
143 
148  int MergeExodusModel(vtkExodusModel *em);
149 
157  vtkExodusModel *ExtractExodusModel(vtkIdTypeArray *globalCellIdList,
158  vtkUnstructuredGrid *grid);
159 
165  void PackExodusModel(vtkUnstructuredGrid *grid);
166 
169  void Reset();
170 
171 protected:
172 
173  vtkExodusModel();
174  ~vtkExodusModel();
175 
176 private:
177 
178  vtkModelMetadata *CheckSetModelMetadata();
179 
180  static void CopyDoubleToFloat(float *f, double *d, int len);
181 
182  int SetLocalBlockInformation(
183  int fid, int use_floats, int *blockIds , int *cellIds, int ncells);
184  int SetLocalNodeSetInformation(
185  int fid, int use_floats, int *pointIds, int npoints);
186  int SetLocalSideSetInformation(
187  int fid, int use_floats, int *cellIds, int ncells);
188 
189  void RemoveBeginningAndTrailingSpaces(char **names, int len);
190 
191  vtkModelMetadata *ModelMetadata;
192 
193  int GeometryCount;
194 
195  vtkExodusModel(const vtkExodusModel&); // Not implemented
196  void operator=(const vtkExodusModel&); // Not implemented
197 };
198 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:60
dynamic, self-adjusting array of vtkIdType
Exodus Model.
virtual void PrintSelf(ostream &os, vtkIndent indent)
a simple class to control print indentation
Definition: vtkIndent.h:37
dataset represents arbitrary combinations of all possible cell types
This class encapsulates the metadata that appear in mesh-based file formats but do not appear in vtkU...
static vtkObject * New()
#define VTK_HYBRID_EXPORT