1 #ifndef vtkExodusIIReaderPrivate_h 2 #define vtkExodusIIReaderPrivate_h 7 #include "vtkToolkits.h" 9 #include "vtksys/RegularExpression.hxx" 14 #include "vtk_exodusII.h" 15 #include "vtkIOExodusModule.h" 18 class vtkTypeInt64Array;
27 void PrintData( ostream& os,
vtkIndent indent );
32 int OpenFile(
const char* filename );
38 int RequestInformation();
76 void SetCacheSize(
double size);
79 vtkGetMacro(CacheSize,
double);
90 vtkGetMacro(SqueezePoints,
int);
94 void SetSqueezePoints(
int sp );
98 vtkBooleanMacro(SqueezePoints,
int);
101 int GetNumberOfNodes();
107 int GetNumberOfObjectsOfType(
int otype );
119 int GetNumberOfObjectArraysOfType(
int otype );
125 const char* GetObjectName(
int otype,
int i );
131 int GetObjectId(
int otype,
int i );
139 int GetObjectSize(
int otype,
int i );
145 int GetObjectStatus(
int otype,
int i );
152 int GetUnsortedObjectStatus(
int otype,
int i );
158 void SetObjectStatus(
int otype,
int i,
int stat );
165 void SetUnsortedObjectStatus(
int otype,
int i,
int stat );
171 const char* GetObjectArrayName(
int otype,
int i );
177 int GetNumberOfObjectArrayComponents(
int otype,
int i );
183 int GetObjectArrayStatus(
int otype,
int i );
189 void SetObjectArrayStatus(
int otype,
int i,
int stat );
197 int GetNumberOfObjectAttributes(
int objectType,
int objectIndex );
198 const char* GetObjectAttributeName(
int objectType,
200 int attributeIndex );
201 int GetObjectAttributeIndex(
int objectType,
203 const char* attribName );
204 int GetObjectAttributeStatus(
int objectType,
207 void SetObjectAttributeStatus(
int objectType,
209 int attribIndex,
int status );
216 vtkSetMacro(GenerateGlobalElementIdArray,
vtkTypeBool);
217 vtkGetMacro(GenerateGlobalElementIdArray,
vtkTypeBool);
220 vtkSetMacro(GenerateGlobalNodeIdArray,
vtkTypeBool);
221 vtkGetMacro(GenerateGlobalNodeIdArray,
vtkTypeBool);
224 vtkSetMacro(GenerateImplicitElementIdArray,
vtkTypeBool);
225 vtkGetMacro(GenerateImplicitElementIdArray,
vtkTypeBool);
228 vtkSetMacro(GenerateImplicitNodeIdArray,
vtkTypeBool);
229 vtkGetMacro(GenerateImplicitNodeIdArray,
vtkTypeBool);
240 vtkSetMacro(FileId,
int);
241 vtkGetMacro(FileId,
int);
244 {
return "GlobalVariableValues"; }
246 {
return "GlobalVariableNames"; }
248 virtual void SetApplyDisplacements(
vtkTypeBool d );
251 virtual void SetDisplacementMagnitude(
double s );
252 vtkGetMacro(DisplacementMagnitude,
double);
254 vtkSetMacro(HasModeShapes,
int);
255 vtkGetMacro(HasModeShapes,
int);
257 vtkSetMacro(ModeShapeTime,
double);
258 vtkGetMacro(ModeShapeTime,
double);
260 vtkSetMacro(AnimateModeShapes,
int);
261 vtkGetMacro(AnimateModeShapes,
int);
263 vtkSetMacro(IgnoreFileTime,
bool);
264 vtkGetMacro(IgnoreFileTime,
bool);
269 {
return &this->ModelParameters; }
424 this->SkipUpdateTimeInformation =
true;
454 {this->FastPathObjectType =
type;};
456 vtkSetStringMacro(FastPathIdType);
508 vtksys::RegularExpression& re,
612 int otyp,
int obj,
int conn_type,
int timeStep,
BlockInfoType* binfop );
616 int otyp,
int obj,
int conn_type,
int timeStep,
SetInfoType* sinfop );
751 std::map<int,std::vector<SetInfoType> >
SetInfo;
757 std::map<int,std::vector<MapInfoType> >
MapInfo;
797 struct ex_init_params ModelParameters;
874 #endif // vtkExodusIIReaderPrivate_h std::map< int, std::vector< ArrayInfoType > > ArrayInfo
Maps an object type (EX_ELEM_BLOCK, EX_NODE_SET, ...) to a list of arrays.
void InsertSetCells(int otyp, int obj, int conn_type, int timeStep, SetInfoType *sinfop)
Insert cells from a specified set into a mesh.
Wrapper around std::string to keep symbols short.
std::vector< int > OriginalIndices
The index of each component of the array as ordered by the Exodus file.
std::vector< MaterialInfoType > MaterialInfo
std::map< vtkIdType, vtkIdType > ReversePointMap
A map from nodal ids in the output mesh to those in an Exodus file.
int Components
The number of components in the array.
static const char * GetObjectIdArrayName()
vtkMutableDirectedGraph * SIL
const char * GetAssemblyName(int idx)
void SetFastPathObjectType(vtkExodusIIReader::ObjectType type)
void RemoveBeginningAndTrailingSpaces(int len, char **names, int maxNameLength)
Function to trim space from names retrieved with ex_get_var_names.
const char * GetPartName(int idx)
abstract base class for most VTK objects
A struct to hold information about Exodus objects (blocks, sets, maps)
vtkTypeBool ApplyDisplacements
std::map< int, std::vector< std::vector< vtkIdType > > > PolyhedralFaceConnArrays
Face connectivity for polyhedra.
std::map< int, std::vector< BlockInfoType > > BlockInfo
Maps a block type (EX_ELEM_BLOCK, EX_FACE_BLOCK, ...) to a list of blocks of that type...
std::vector< int > BlockIndices
void SetFastPathObjectId(vtkIdType id)
int GetNumberOfTimeSteps()
Return the number of time steps in the open file.
void GetInitialObjectStatus(int otype, ObjectInfoType *info)
For a given object type, looks for an object in the collection of initial objects of the same name...
void InsertSetNodeCopies(vtkIdTypeArray *refs, int otyp, int obj, SetInfoType *sinfo)
Insert cells referenced by a node set.
void PrepareGeneratedArrayInfo()
Add generated array information to array info lists.
int GetMapTypeFromObjectType(int otyp)
int AssembleOutputPoints(vtkIdType timeStep, BlockSetInfoType *bsinfop, vtkUnstructuredGrid *output)
Fill the output grid's point coordinates array.
int GetObjectTypeFromMapType(int mtyp)
Given a map type (NODE_MAP, EDGE_MAP, ...) return the associated object type (NODAL, EDGE_BLOCK, ...) or vice-versa.
int GetNumberOfObjectsAtTypeIndex(int typeIndex)
Return the number of objects of the given type.
record modification and/or execution time
std::vector< int > ObjectTruth
A map describing which objects the variable is defined on.
A struct to hold information about Exodus maps.
void SetTimesOverrides(const std::vector< double > ×)
void FreePolyhedronFaceArrays()
Free any arrays held by PolyhedralFaceConnArrays (for polyhedral-face-connectivity lookup)...
BlockInfoType * GetBlockFromFileGlobalId(int otyp, int refId)
Get the block containing the entity referenced by the specified file-global ID.
vtkExodusIIReader * Parent
Pointer to owning reader...
int GetNumberOfAssemblies()
vtkTypeBool AnimateModeShapes
std::vector< vtkStdString > AttributeNames
void DetermineVtkCellType(BlockInfoType &binfo)
Determine the VTK cell type for a given edge/face/element block.
vtkIdType AttributesPerEntry
int AssembleOutputPointArrays(vtkIdType timeStep, BlockSetInfoType *bsinfop, vtkUnstructuredGrid *output)
Add the requested arrays to the output grid's point data.
dynamic, self-adjusting array of vtkIdType
void ClearConnectivityCaches()
Delete any cached connectivity information (for all blocks and sets)
ObjectType
Extra cell data array that can be generated.
vtkTypeBool GenerateImplicitElementIdArray
This class holds metadata for an Exodus file.
vtkUnstructuredGrid * CachedConnectivity
Cached cell connectivity arrays for mesh.
vtkMutableDirectedGraph * GetSIL()
Returns the SIL. This valid only after BuildSIL() has been called.
void GlomArrayNames(int i, int num_obj, int num_vars, char **var_names, int *truth_tab)
Aggregate Exodus array names into VTK arrays with multiple components.
int GetBlockConnTypeFromBlockType(int btyp)
Given a block type (EDGE_BLOCK, ...), return the associated block connectivity type (EDGE_BLOCK_CONN...
std::map< int, std::vector< ObjectInfoType > > InitialObjectInfo
Maps an object type (EX_ELEM_BLOCK, EX_NODE_SET, ...) to a list of objects defined on that type...
vtkTypeBool GenerateImplicitNodeIdArray
std::map< int, std::vector< int > > SortedObjectIndices
Maps an object type to vector of indices that reorder objects of that type by their IDs...
void InsertSetSides(vtkIdTypeArray *refs, int otyp, int obj, SetInfoType *sinfo)
Insert cells referenced by a side set.
static const char * GetGlobalVariableValuesArrayName()
float DisplacementMagnitude
double CacheSize
The size of the cache in MiB.
void InsertBlockPolyhedra(BlockInfoType *binfo, vtkIntArray *facesPerCell, vtkIdTypeArray *exoCellConn)
Insert polyhedral cells (called from InsertBlockCells when a block is polyhedral).
vtkTimeStamp InformationTimeStamp
Time stamp from last time we were in RequestInformation.
void GetInitialObjectArrayStatus(int otype, ArrayInfoType *info)
For a given array type, looks for an object in the collection of initial objects of the same name...
int Source
The source of the array (Result or Attribute)
dynamic, self-adjusting array of int
int AssembleOutputProceduralArrays(vtkIdType timeStep, int otyp, int oidx, vtkUnstructuredGrid *output)
Add procedurally generated arrays to an output mesh.
ObjectInfoType * GetObjectInfo(int typeIndex, int objectIndex)
Return a pointer to the ObjectInfo of the specified type and index.
int AssembleOutputGlobalArrays(vtkIdType timeStep, int otyp, int oidx, BlockSetInfoType *bsinfop, vtkUnstructuredGrid *output)
Add mesh-global field data such as QA records to the output mesh.
void BuildSIL()
Build SIL. This must be called only after RequestInformation().
static const char * GetFileIdArrayName()
int StorageType
Storage type of array (a type that can be passed to vtkDataArray::Create())
bool IsXMLMetadataValid()
double ModeShapeTime
The time value.
std::vector< AssemblyInfoType > AssemblyInfo
vtkExodusIIReaderPrivate()
vtkStdString Name
The name of the array.
a simple class to control print indentation
float ExodusVersion
The version of Exodus that wrote the currently open file (or a negative number otherwise).
bool SkipUpdateTimeInformation
Read Exodus II files (.exii)
int GetSetTypeFromSetConnType(int sctyp)
Given a set connectivity type (NODE_SET_CONN, ...), return the associated object type (NODE_SET...
std::map< vtkIdType, vtkIdType > PointMap
A map from nodal IDs in an Exodus file to nodal IDs in the output mesh.
GlomTypes
Tags to indicate how single-component Exodus arrays are glommed (aggregated) into multi-component VTK...
dataset represents arbitrary combinations of all possible cell types
vtkIdType FileOffset
Id (1-based) of first entry in file-local list across all blocks in file.
abstract superclass for arrays of numeric data
static const char * GetGlobalElementIdArrayName()
void SetAssemblyStatus(int idx, int on)
vtkIdType GetPolyhedronFaceConnectivity(vtkIdType fileLocalFaceId, vtkIdType *&facePtIds)
Fetch the face-connectivity for one face of one polyhedron.
An editable directed graph.
vtkTypeBool GenerateGlobalElementIdArray
int IsObjectTypeBlock(int otyp)
Does the specified object type match? Avoid using these...
int GetPartStatus(int idx)
vtkExodusIIReader::ObjectType FastPathObjectType
int Status
Whether or not the array should be loaded by RequestData.
int GetMaterialStatus(int idx)
vtkIdType GetSqueezePointId(BlockSetInfoType *bsinfop, int i)
Find or create a new SqueezePoint ID (unique sequential list of points referenced by cells in blocks/...
virtual void SetParser(vtkExodusIIReaderParser *)
vtkStdString OriginalName
~vtkExodusIIReaderPrivate() override
int IsObjectTypeSet(int otyp)
A struct to hold information about Exodus blocks.
int VerifyIntegrationPointGlom(int nn, char **np, vtksys::RegularExpression &re, vtkStdString &field, vtkStdString &ele)
Returns true when order and text of names are consistent with integration points. ...
int Id
User-assigned identification number.
int AssembleOutputPointMaps(vtkIdType timeStep, BlockSetInfoType *bsinfop, vtkUnstructuredGrid *output)
Add maps to an output mesh.
int GetAssemblyStatus(int idx)
A struct to hold information about Exodus blocks or sets (they have some members in common) ...
std::vector< int > BlockIndices
static const char * GetImplicitElementIdArrayName()
internal parser used by vtkExodusIIReader.
vtkTypeBool GenerateGlobalNodeIdArray
vtkTypeBool GenerateObjectIdArray
std::map< int, std::vector< ArrayInfoType > > InitialArrayInfo
Maps an object type (EX_ELEM_BLOCK, EX_NODE_SET, ...) to a list of arrays defined on that type...
int AssembleOutputCellArrays(vtkIdType timeStep, int otyp, int oidx, BlockSetInfoType *bsinfop, vtkUnstructuredGrid *output)
Add the requested arrays to the output grid's cell data.
Read exodus 2 files .ex2.
vtkTypeBool GenerateGlobalIdArray
std::vector< vtkStdString > OriginalNames
The name of each component of the array as defined by the Exodus file.
vtkStdString Name
User-assigned name.
vtkExodusIICache * Cache
A least-recently-used cache to hold raw arrays.
void SetInitialObjectArrayStatus(int otype, const char *name, int stat)
For a given array type, creates and stores an ArrayInfoType object using the given name and status...
int UpdateTimeInformation()
ObjectInfoType * GetUnsortedObjectInfo(int objectType, int objectIndex)
Return a pointer to the ObjectInfo of the specified type and index, but using indices sorted by objec...
int GetTemporalTypeFromObjectType(int otyp)
int GetConnTypeIndexFromConnType(int ctyp)
Return the index of an object type (in a private list of all object types).
Composite dataset that organizes datasets into blocks.
static const char * GetGlobalNodeIdArrayName()
void SetPartStatus(int idx, int on)
std::vector< int > BlockIndices
const struct ex_init_params * GetModelParams() const
int GetNumberOfMaterials()
std::map< int, std::vector< MapInfoType > > MapInfo
Maps a map type (EX_ELEM_MAP, ..., EX_NODE_MAP) to a list of maps of that type.
int Status
Should the reader load this block?
vtkIdType FastPathObjectId
A struct to hold information about Exodus sets.
vtkTypeBool HasModeShapes
static const char * GetImplicitNodeIdArrayName()
bool ProducedFastPathOutput
ObjectInfoType * GetSortedObjectInfo(int objectType, int objectIndex)
Return a pointer to the ObjectInfo of the specified type and index, but using indices sorted by objec...
A struct to hold information about Exodus blocks.
vtkDataArray * GetCacheOrRead(vtkExodusIICacheKey)
Return an array for the specified cache key.
int GetObjectTypeIndexFromObjectType(int otyp)
Return the index of an object type (in a private list of all object types).
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
std::map< int, std::vector< SetInfoType > > SetInfo
Maps a set type (EX_ELEM_SET, ..., EX_NODE_SET) to a list of sets of that type.
int AppWordSize
These aren't the variables you're looking for.
int AssembleOutputCellMaps(vtkIdType timeStep, int otyp, int oidx, BlockSetInfoType *bsinfop, vtkUnstructuredGrid *output)
void AddPointArray(vtkDataArray *src, BlockSetInfoType *bsinfop, vtkUnstructuredGrid *output)
Add a point array to an output grid's point data, squeezing if necessary.
int SqueezePoints
Should the reader output only points used by elements in the output mesh, or all the points...
ArraySourceTypes
Tags to indicate the source of values for an array.
int Exoid
The handle of the currently open file.
const char * GetPartBlockInfo(int idx)
std::vector< double > Times
A list of time steps for which results variables are stored.
vtkIdType NextSqueezePoint
The next vtk ID to use for a connectivity entry when point squeezing is on and no point ID exists...
int Size
Number of entries in this block.
int IsObjectTypeMap(int otyp)
std::vector< PartInfoType > PartInfo
vtkExodusIIReaderParser * Parser
ArrayInfoType * FindArrayInfoByName(int otyp, const char *name)
Find an ArrayInfo object for a specific object type using the name as a key.
void InsertBlockCells(int otyp, int obj, int conn_type, int timeStep, BlockInfoType *binfop)
Insert cells from a specified block into a mesh.
void SetMaterialStatus(int idx, int on)
A struct to hold information about time-varying arrays.
int AssembleOutputConnectivity(vtkIdType timeStep, int otyp, int oidx, int conntypidx, BlockSetInfoType *bsinfop, vtkUnstructuredGrid *output)
Read connectivity information and populate an unstructured grid with cells corresponding to a single ...
int GetBlockIndexFromFileGlobalId(int otyp, int refId)
Get the index of the block containing the entity referenced by the specified file-global ID...
BlockSetInfoType & operator=(const BlockSetInfoType &block)
int GlomType
The type of "glomming" performed.
static const char * GetGlobalVariableNamesArrayName()
void SetInitialObjectStatus(int otype, const char *name, int stat)
For a given object type, creates and stores an ObjectInfoType object using the given name and status...
void InsertSetCellCopies(vtkIdTypeArray *refs, int otyp, int obj, SetInfoType *sinfo)
Insert cells referenced by an edge, face, or element set.
int AssembleArraysOverTime(vtkMultiBlockDataSet *output)
Add fast-path time-varying data to field data of an output block or set.
const char * GetMaterialName(int idx)
std::vector< int > AttributeStatus
vtkTypeBool GenerateFileIdArray