 |
VTK
9.0.1
|
Go to the documentation of this file. 1 #ifndef vtkExodusIIReaderPrivate_h
2 #define vtkExodusIIReaderPrivate_h
4 #ifndef VTK_WRAPPING_CXX
12 #include "vtkToolkits.h"
13 #include "vtksys/RegularExpression.hxx"
18 #include "vtkIOExodusModule.h"
19 #include "vtk_exodusII.h"
24 class vtkTypeInt64Array;
85 vtkGetMacro(CacheSize,
double);
95 vtkGetMacro(SqueezePoints,
int);
103 vtkBooleanMacro(SqueezePoints,
int);
237 vtkSetMacro(FileId,
int);
238 vtkGetMacro(FileId,
int);
247 vtkGetMacro(DisplacementMagnitude,
double);
249 vtkSetMacro(HasModeShapes,
int);
250 vtkGetMacro(HasModeShapes,
int);
252 vtkSetMacro(ModeShapeTime,
double);
253 vtkGetMacro(ModeShapeTime,
double);
255 vtkSetMacro(AnimateModeShapes,
int);
256 vtkGetMacro(AnimateModeShapes,
int);
258 vtkSetMacro(IgnoreFileTime,
bool);
259 vtkGetMacro(IgnoreFileTime,
bool);
263 const struct ex_init_params*
GetModelParams()
const {
return &this->ModelParameters; }
429 this->SkipUpdateTimeInformation =
true;
460 this->FastPathObjectType =
type;
463 vtkSetStringMacro(FastPathIdType);
517 void GlomArrayNames(
int i,
int num_obj,
int num_vars,
char** var_names,
int* truth_tab);
741 std::map<int, std::vector<SetInfoType> >
SetInfo;
747 std::map<int, std::vector<MapInfoType> >
MapInfo;
787 struct ex_init_params ModelParameters;
867 #endif // vtkExodusIIReaderPrivate_h
void SetPartStatus(const vtkStdString &name, int flag)
internal parser used by vtkExodusIIReader.
BlockSetInfoType & operator=(const BlockSetInfoType &block)
vtkUnstructuredGrid * CachedConnectivity
Cached cell connectivity arrays for mesh.
vtkTypeBool GenerateGlobalNodeIdArray
int GetNumberOfNodes()
Return the number of nodes in the output (depends on SqueezePoints)
void PrepareGeneratedArrayInfo()
Add generated array information to array info lists.
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.
vtkTypeBool AnimateModeShapes
std::vector< int > BlockIndices
static const char * GetImplicitElementIdArrayName()
vtkExodusIIReader::ObjectType FastPathObjectType
int GetNumberOfObjectAttributes(int objectType, int objectIndex)
Unlike object arrays, attributes are only defined over blocks (not sets) and are defined on a per-blo...
int UpdateTimeInformation()
vtkMutableDirectedGraph * SIL
An editable directed graph.
void InsertBlockPolyhedra(BlockInfoType *binfo, vtkIntArray *facesPerCell, vtkIdTypeArray *exoCellConn)
Insert polyhedral cells (called from InsertBlockCells when a block is polyhedral).
double ModeShapeTime
The time value.
GlomTypes
Tags to indicate how single-component Exodus arrays are glommed (aggregated) into multi-component VTK...
vtkExodusIICache * Cache
A least-recently-used cache to hold raw arrays.
int AssembleOutputProceduralArrays(vtkIdType timeStep, int otyp, int oidx, vtkUnstructuredGrid *output)
Add procedurally generated arrays to an output mesh.
void InsertSetSides(vtkIdTypeArray *refs, int otyp, int obj, SetInfoType *sinfo)
Insert cells referenced by a side set.
int GetPartStatus(int idx)
int AssembleOutputPointMaps(vtkIdType timeStep, BlockSetInfoType *bsinfop, vtkUnstructuredGrid *output)
Add maps to an output mesh.
std::vector< vtkStdString > OriginalNames
The name of each component of the array as defined by the Exodus file.
bool ProducedFastPathOutput
int StorageType
Storage type of array (a type that can be passed to vtkDataArray::Create())
int GetMaterialStatus(int idx)
void SetObjectArrayStatus(int otype, int i, int stat)
For a given object type, sets the status of the i-th array.
void PrintData(ostream &os, vtkIndent indent)
virtual void SetDisplacementMagnitude(double s)
virtual void SetApplyDisplacements(vtkTypeBool d)
int GetObjectId(int otype, int i)
For a given object type, return the user-assigned ID of the i-th object.
int GetObjectArrayStatus(int otype, int i)
For a given object type, returns the status of the i-th array.
void SetPartStatus(int idx, int on)
int GetNumberOfObjectsOfType(int otype)
Returns the number of objects of a given type (e.g., EX_ELEM_BLOCK, EX_NODE_SET, ....
record modification and/or execution time
void SetFastPathObjectId(vtkIdType id)
void SetTimesOverrides(const std::vector< double > ×)
int AppWordSize
These aren't the variables you're looking for.
int GetObjectTypeIndexFromObjectType(int otyp)
Return the index of an object type (in a private list of all object types).
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.
Read exodus 2 files .ex2.
int Id
User-assigned identification number.
vtkExodusIIReader * Parent
Pointer to owning reader...
std::vector< double > Times
A list of time steps for which results variables are stored.
void ClearConnectivityCaches()
Delete any cached connectivity information (for all blocks and sets)
abstract base class for most VTK objects
vtkExodusIIReaderParser * Parser
int Status
Whether or not the array should be loaded by RequestData.
int IsObjectTypeBlock(int otyp)
Does the specified object type match? Avoid using these...
A struct to hold information about Exodus objects (blocks, sets, maps)
vtkTypeBool GenerateObjectIdArray
int IsObjectTypeSet(int otyp)
abstract superclass for arrays of numeric data
void SetAssemblyStatus(int idx, int on)
int GetMapTypeFromObjectType(int otyp)
A struct to hold information about Exodus blocks.
int GetAssemblyStatus(const vtkStdString &name)
void Reset()
Clear all the structure members.
ArrayInfoType * FindArrayInfoByName(int otyp, const char *name)
Find an ArrayInfo object for a specific object type using the name as a key.
vtkDataArray * FindDisplacementVectors(int timeStep)
Composite dataset that organizes datasets into blocks.
std::map< vtkIdType, vtkIdType > PointMap
A map from nodal IDs in an Exodus file to nodal IDs in the output mesh.
void ResetCache()
Clears out any data in the cache and restores it to its initial state.
int GetNumberOfObjectArraysOfType(int otype)
Returns the number of arrays defined over objects of a given type (e.g., EX_ELEM_BLOCK,...
ObjectInfoType * GetSortedObjectInfo(int objectType, int objectIndex)
Return a pointer to the ObjectInfo of the specified type and index, but using indices sorted by objec...
void Reset()
Reset the class so that another file may be read.
static const char * GetGlobalVariableNamesArrayName()
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.
A struct to hold information about Exodus sets.
std::map< int, std::vector< ArrayInfoType > > ArrayInfo
Maps an object type (EX_ELEM_BLOCK, EX_NODE_SET, ...) to a list of arrays.
void SetMaterialStatus(const vtkStdString &name, int flag)
int GetBlockConnTypeFromBlockType(int btyp)
Given a block type (EDGE_BLOCK, ...), return the associated block connectivity type (EDGE_BLOCK_CONN,...
void SetObjectStatus(int otype, int i, int stat)
For a given object type, sets the status of the i-th object.
std::vector< int > OriginalIndices
The index of each component of the array as ordered by the Exodus file.
void InsertBlockCells(int otyp, int obj, int conn_type, int timeStep, BlockInfoType *binfop)
Insert cells from a specified block into a mesh.
bool IsXMLMetadataValid()
void ResetSettings()
Return user-specified variables to their default values.
static const char * GetGlobalElementIdArrayName()
Read Exodus II files (.exii)
std::vector< int > AttributeStatus
int GetConnTypeIndexFromConnType(int ctyp)
Return the index of an object type (in a private list of all object types).
int GetObjectTypeFromMapType(int mtyp)
Given a map type (NODE_MAP, EDGE_MAP, ...) return the associated object type (NODAL,...
std::vector< MaterialInfoType > MaterialInfo
const struct ex_init_params * GetModelParams() const
int GetObjectAttributeIndex(int objectType, int objectIndex, const char *attribName)
int GetUnsortedObjectStatus(int otype, int i)
For a given object type, returns the status of the i-th object, where i is an index into the unsorted...
int GetNumberOfObjectArrayComponents(int otype, int i)
For a given object type, returns the number of components of the i-th array.
std::map< int, std::vector< int > > SortedObjectIndices
Maps an object type to vector of indices that reorder objects of that type by their IDs.
int GetNumberOfMaterials()
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.
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,...
void SetFastPathObjectType(vtkExodusIIReader::ObjectType type)
A struct to hold information about Exodus blocks.
const char * GetPartBlockInfo(int idx)
vtkDataArray * GetCacheOrRead(vtkExodusIICacheKey)
Return an array for the specified cache key.
int AssembleOutputPointArrays(vtkIdType timeStep, BlockSetInfoType *bsinfop, vtkUnstructuredGrid *output)
Add the requested arrays to the output grid's point data.
int GetTemporalTypeFromObjectType(int otyp)
int AssembleOutputCellArrays(vtkIdType timeStep, int otyp, int oidx, BlockSetInfoType *bsinfop, vtkUnstructuredGrid *output)
Add the requested arrays to the output grid's cell data.
int AssembleArraysOverTime(vtkMultiBlockDataSet *output)
Add fast-path time-varying data to field data of an output block or set.
void InsertSetCellCopies(vtkIdTypeArray *refs, int otyp, int obj, SetInfoType *sinfo)
Insert cells referenced by an edge, face, or element set.
const char * GetObjectArrayName(int otype, int i)
For a given object type, returns the name of the i-th array.
int SqueezePoints
Should the reader output only points used by elements in the output mesh, or all the points.
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.
const char * GetAssemblyName(int idx)
float DisplacementMagnitude
BlockInfoType * GetBlockFromFileGlobalId(int otyp, int refId)
Get the block containing the entity referenced by the specified file-global ID.
float ExodusVersion
The version of Exodus that wrote the currently open file (or a negative number otherwise).
vtkTypeBool HasModeShapes
vtkIdType FastPathObjectId
int AssembleOutputCellMaps(vtkIdType timeStep, int otyp, int oidx, BlockSetInfoType *bsinfop, vtkUnstructuredGrid *output)
int OpenFile(const char *filename)
Open an ExodusII file for reading. Returns 0 on success.
a simple class to control print indentation
void InsertSetNodeCopies(vtkIdTypeArray *refs, int otyp, int obj, SetInfoType *sinfo)
Insert cells referenced by a node set.
int Exoid
The handle of the currently open file.
dynamic, self-adjusting array of int
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.
void SetSqueezePoints(int sp)
Set whether subsequent RequestData() calls will produce the minimal point set required to represent t...
int Status
Should the reader load this block?
void SetUnsortedObjectStatus(int otype, int i, int stat)
For a given object type, sets the status of the i-th object, where i is an index into the unsorted ob...
int GetMaterialStatus(const vtkStdString &name)
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.
vtkIdType AttributesPerEntry
ObjectInfoType * GetObjectInfo(int typeIndex, int objectIndex)
Return a pointer to the ObjectInfo of the specified type and index.
void RemoveBeginningAndTrailingSpaces(int len, char **names, int maxNameLength)
Function to trim space from names retrieved with ex_get_var_names.
This class holds metadata for an Exodus file.
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.
vtkIdType GetPolyhedronFaceConnectivity(vtkIdType fileLocalFaceId, vtkIdType *&facePtIds)
Fetch the face-connectivity for one face of one polyhedron.
void DetermineVtkCellType(BlockInfoType &binfo)
Determine the VTK cell type for a given edge/face/element block.
void InsertSetCells(int otyp, int obj, int conn_type, int timeStep, SetInfoType *sinfop)
Insert cells from a specified set into a mesh.
ArraySourceTypes
Tags to indicate the source of values for an array.
int IsObjectTypeMap(int otyp)
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,...
std::vector< int > BlockIndices
vtkTypeBool GenerateImplicitNodeIdArray
void SetMaterialStatus(int idx, int on)
int GlomType
The type of "glomming" performed.
int RequestInformation()
Get metadata for an open file with handle exoid.
const char * GetPartName(int idx)
A struct to hold information about time-varying arrays.
static const char * GetGlobalNodeIdArrayName()
void SetAssemblyStatus(const vtkStdString &name, int flag)
int GetNumberOfAssemblies()
A struct to hold information about Exodus blocks or sets (they have some members in common)
vtkIdType GetSqueezePointId(BlockSetInfoType *bsinfop, int i)
Find or create a new SqueezePoint ID (unique sequential list of points referenced by cells in blocks/...
vtkTypeBool GenerateGlobalIdArray
dynamic, self-adjusting array of vtkIdType
vtkTypeBool ApplyDisplacements
const char * GetObjectAttributeName(int objectType, int objectIndex, int attributeIndex)
int Components
The number of components in the array.
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 GetObjectAttributeStatus(int objectType, int objectIndex, int attribIndex)
double CacheSize
The size of the cache in MiB.
static vtkExodusIIReaderPrivate * New()
vtkIdType NextSqueezePoint
The next vtk ID to use for a connectivity entry when point squeezing is on and no point ID exists.
vtkTypeBool GenerateImplicitElementIdArray
int GetNumberOfObjectsAtTypeIndex(int typeIndex)
Return the number of objects of the given type.
static const char * GetFileIdArrayName()
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.
std::vector< int > BlockIndices
void FreePolyhedronFaceArrays()
Free any arrays held by PolyhedralFaceConnArrays (for polyhedral-face-connectivity lookup).
int Source
The source of the array (Result or Attribute)
vtkMutableDirectedGraph * GetSIL()
Returns the SIL. This valid only after BuildSIL() has been called.
void BuildSIL()
Build SIL. This must be called only after RequestInformation().
vtkIdType FileOffset
Id (1-based) of first entry in file-local list across all blocks in file.
bool SkipUpdateTimeInformation
void SetObjectAttributeStatus(int objectType, int objectIndex, int attribIndex, int status)
~vtkExodusIIReaderPrivate() override
vtkStdString Name
The name of the array.
vtkTimeStamp InformationTimeStamp
Time stamp from last time we were in RequestInformation.
int SetUpEmptyGrid(vtkMultiBlockDataSet *output)
Description: Prepare a data set with the proper structure and arrays but no cells.
dataset represents arbitrary combinations of all possible cell types
int GetPartStatus(const vtkStdString &name)
ObjectInfoType * GetUnsortedObjectInfo(int objectType, int objectIndex)
Return a pointer to the ObjectInfo of the specified type and index, but using indices sorted by objec...
static const char * GetObjectIdArrayName()
vtkStdString OriginalName
int RequestData(vtkIdType timeStep, vtkMultiBlockDataSet *output)
Read requested data and store in unstructured grid.
std::map< int, std::vector< std::vector< vtkIdType > > > PolyhedralFaceConnArrays
Face connectivity for polyhedra.
int GetObjectSize(int otype, int i)
For a given object type, return the size of the i-th object.
vtkStdString Name
User-assigned name.
Wrapper around std::string to keep symbols short.
BlockSetInfoType(const BlockSetInfoType &block)
std::map< vtkIdType, vtkIdType > ReversePointMap
A map from nodal ids in the output mesh to those in an Exodus file.
void SetCacheSize(double size)
Set the size of the cache in MiB.
A struct to hold information about Exodus maps.
std::vector< vtkStdString > AttributeNames
vtkTypeBool GenerateGlobalElementIdArray
std::vector< int > ObjectTruth
A map describing which objects the variable is defined on.
int GetNumberOfTimeSteps()
Return the number of time steps in the open file.
std::vector< AssemblyInfoType > AssemblyInfo
int GetObjectStatus(int otype, int i)
For a given object type, returns the status of the i-th object.
int AssembleOutputPoints(vtkIdType timeStep, BlockSetInfoType *bsinfop, vtkUnstructuredGrid *output)
Fill the output grid's point coordinates array.
std::vector< PartInfoType > PartInfo
void AddPointArray(vtkDataArray *src, BlockSetInfoType *bsinfop, vtkUnstructuredGrid *output)
Add a point array to an output grid's point data, squeezing if necessary.
int GetSetTypeFromSetConnType(int sctyp)
Given a set connectivity type (NODE_SET_CONN, ...), return the associated object type (NODE_SET,...
static const char * GetGlobalVariableValuesArrayName()
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.
const char * GetObjectName(int otype, int i)
For a given object type, returns the name of the i-th object.
int CloseFile()
Close any ExodusII file currently open for reading. Returns 0 on success.
vtkExodusIIReaderPrivate()
const char * GetMaterialName(int idx)
int Size
Number of entries in this block.
int GetAssemblyStatus(int idx)
static const char * GetImplicitNodeIdArrayName()
virtual void SetParser(vtkExodusIIReaderParser *)
vtkTypeBool GenerateFileIdArray