VTK  9.4.20241218
Public Types | Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | List of all members
vtkIOSSReaderInternal Class Reference

Internal methods and state for the IOSS reader. More...

#include <vtkIOSSReaderInternal.h>

Inheritance diagram for vtkIOSSReaderInternal:
[legend]
Collaboration diagram for vtkIOSSReaderInternal:
[legend]

Public Types

using EntityType = vtkIOSSReader::EntityType
 

Public Member Functions

 vtkIOSSReaderInternal (vtkIOSSReader *reader)
 
virtual ~vtkIOSSReaderInternal ()=default
 
const std::vector< double > & GetTimeSteps () const
 
vtkIOSSUtilities::DatabaseFormatType GetFormat () const
 
void SetDisplacementMagnitude (double s)
 
double GetDisplacementMagnitude ()
 
bool UpdateDatabaseNames (vtkIOSSReader *self)
 Processes filenames to populate names for Ioss databases to read.
 
bool UpdateTimeInformation (vtkIOSSReader *self)
 Read Ioss databases to generate information about timesteps / times in the databases.
 
bool NeedToUpdateEntityAndFieldSelections (vtkIOSSReader *self, const std::vector< DatabaseHandle > &dbaseHandles)
 Checks if the entity and field selections have changed.
 
bool UpdateEntityAndFieldSelections (vtkIOSSReader *self)
 Populates various vtkDataArraySelection objects on the vtkIOSSReader with names for entity-blocks, -sets, and fields defined on them.
 
bool UpdateAssembly (vtkIOSSReader *self, int *tag)
 Populates the vtkDataAssembly used for block/set selection.
 
vtkDataAssemblyGetAssembly () const
 
bool GenerateOutput (vtkPartitionedDataSetCollection *output, vtkIOSSReader *self)
 Fills up the output data-structure based on the entity blocks/sets chosen and those available.
 
bool ReadAssemblies (vtkPartitionedDataSetCollection *output, const DatabaseHandle &handle)
 Fills up the vtkDataAssembly with ioss-assemblies, if present.
 
std::vector< vtkSmartPointer< vtkDataSet > > GetDataSets (const std::string &blockname, vtkIOSSReader::EntityType vtk_entity_type, const DatabaseHandle &handle, int timestep, vtkIOSSReader *self)
 Reads datasets (meshes and fields) for the given block.
 
vtkSmartPointer< vtkDataSetGetExodusEntityDataSet (const std::vector< std::string > &blockNames, vtkIOSSReader::EntityType vtk_entity_type, const DatabaseHandle &handle, int timestep, vtkIOSSReader *self)
 Reads datasets (meshes and fields) for the given exodus entity.
 
bool GetQAAndInformationRecords (vtkFieldData *fd, const DatabaseHandle &handle)
 Read quality assurance and information data from the file.
 
bool GetGlobalFields (vtkFieldData *fd, const DatabaseHandle &handle, int timestep)
 Read global fields.
 
bool HaveRestartFiles () const
 Get if there are restart files available.
 
std::vector< DatabaseHandleGetDatabaseHandles (int piece, int npieces, int timestep) const
 Returns the list of fileids, if any to be read for a given "piece" for the chosen timestep.
 
std::string GetRawFileName (const DatabaseHandle &handle, bool shortname=false) const
 Useful for printing error messages etc.
 
int GetFileProcessor (const DatabaseHandle &handle) const
 For spatially partitioned files, this returns the partition identifier for the file identified by the handle.
 
bool HaveCreatedRegions (const std::vector< DatabaseHandle > &dbaseHandles)
 Returns if the given database handles have regions already created.
 
void ReleaseHandles ()
 Releases any open file handles.
 
void ReleaseRegions ()
 Little more aggressive than ReleaseHandles but less intense than Reset, releases all IOSS regions and thus all the meta-data IOSS may have cached as well.
 
void Reset ()
 Clear all regions, databases etc.
 
void ResetDatabaseNamesMTime ()
 
void ClearCache ()
 Cache related API.
 
void ResetCacheAccessCounts ()
 Cache related API.
 
void ClearCacheUnused ()
 Cache related API.
 

Public Attributes

Ioss::PropertyManager DatabaseProperties
 
std::set< std::string > FileNames
 
vtkTimeStamp FileNamesMTime
 
std::set< std::string > Selectors
 

Protected Types

using DatabaseNamesType = std::map< std::string, DatabasePartitionInfo >
 

Protected Member Functions

std::vector< int > GetFileIds (const std::string &dbasename, int myrank, int numRanks) const
 
Ioss::Region * GetRegion (const std::string &dbasename, int fileid)
 
Ioss::Region * GetRegion (const DatabaseHandle &handle)
 
std::vector< std::pair< int, vtkSmartPointer< vtkCellArray > > > GetTopology (const std::string &blockname, vtkIOSSReader::EntityType vtk_entity_type, const DatabaseHandle &handle)
 Get a vector of cell arrays and their cell type for the entity block (or set) with the given name (blockname) and type (vtk_entity_type).
 
std::pair< vtkSmartPointer< vtkUnsignedCharArray >, vtkSmartPointer< vtkCellArray > > CombineTopologies (const std::vector< std::pair< int, vtkSmartPointer< vtkCellArray > > > &topologies)
 Combine a vector cell types, cell arrays pairs into a single vtkUnsignedCharArray of cell types and a vtkCellArray.
 
bool GetTopology (vtkUnstructuredGrid *grid, const std::string &blockname, vtkIOSSReader::EntityType vtk_entity_type, const DatabaseHandle &handle)
 Fill up the grid with connectivity information for the entity block (or set) with the given name (blockname) and type (vtk_entity_type).
 
vtkSmartPointer< vtkPointsGetGeometry (const std::string &blockname, const DatabaseHandle &handle)
 Get with point coordinates aka geometry read from the block with the given name (blockname).
 
bool GetGeometry (vtkUnstructuredGrid *grid, const std::string &blockname, const DatabaseHandle &handle)
 Fill up grid with point coordinates aka geometry read from the block with the given name (blockname).
 
bool GetGeometry (vtkStructuredGrid *grid, const Ioss::StructuredBlock *groupEntity)
 GetGeometry for vtkStructuredGrid i.e.
 
bool GetMesh (vtkUnstructuredGrid *grid, const std::string &blockname, vtkIOSSReader::EntityType vtk_entity_type, const DatabaseHandle &handle, bool remove_unused_points)
 Adds geometry (points) and topology (cell) information to the grid for the entity block or set chosen using the name (blockname) and type (vtk_entity_type).
 
bool GetEntityMesh (vtkUnstructuredGrid *grid, const std::vector< std::string > &blockNames, vtkIOSSReader::EntityType vtk_entity_type, const DatabaseHandle &handle)
 Adds geometry (points) and topology (cell) information to the grid for all the entity blocks or sets chosen using the names (blockNames) and type (vtk_entity_type).
 
bool GetMesh (vtkStructuredGrid *grid, const std::string &blockname, vtkIOSSReader::EntityType vtk_entity_type, const DatabaseHandle &handle)
 Reads a structured block.
 
bool GenerateEntityIdArray (vtkCellData *cd, vtkIdType numberOfCells, const std::string &blockname, vtkIOSSReader::EntityType vtk_entity_type, const DatabaseHandle &handle)
 Add "id" array to the dataset using the id for the grouping entity, if any.
 
bool GetFields (vtkDataSetAttributes *dsa, vtkDataArraySelection *selection, Ioss::Region *region, Ioss::GroupingEntity *group_entity, const DatabaseHandle &handle, int timestep, bool read_ioss_ids, vtkIdTypeArray *ids_to_extract=nullptr, const std::string &cache_key_suffix=std::string())
 Reads selected field arrays for the given entity block or set.
 
bool GetNodeFields (vtkDataSetAttributes *dsa, vtkDataArraySelection *selection, Ioss::Region *region, Ioss::GroupingEntity *group_entity, const DatabaseHandle &handle, int timestep, bool read_ioss_ids, bool mergeExodusEntityBlocks=false)
 This reads node fields for an entity block or set.
 
bool ApplyDisplacements (vtkPointSet *grid, Ioss::Region *region, Ioss::GroupingEntity *group_entity, const DatabaseHandle &handle, int timestep, bool mergeExodusEntityBlocks=false)
 Reads node block array with displacements and then transforms the points in the grid using those displacements.
 
bool GenerateFileId (vtkDataSetAttributes *cellData, vtkIdType numberOfCells, Ioss::GroupingEntity *group_entity, const DatabaseHandle &handle)
 Adds 'file_id' array to indicate which file the dataset was read from.
 
vtkSmartPointer< vtkAbstractArrayConvertFieldForVTK (vtkAbstractArray *array)
 Fields like "ids" have to be vtkIdTypeArray in VTK.
 
unsigned int GetDataSetIndexForEntity (const Ioss::GroupingEntity *entity) const
 
void GenerateElementAndSideIds (vtkDataSet *dataset, Ioss::SideSet *sideSet, const DatabaseHandle &handle, const std::string &blockname, vtkIOSSReader::EntityType vtk_entity_type)
 Add field-data arrays holding side-set specifications (i.e., (cell-id, side-id) tuples) for use by the UnstructuredGridToCellGrid conversion filter.
 
bool BuildAssembly (Ioss::Region *region, vtkDataAssembly *assembly, int root, bool add_leaves)
 
DatabaseNamesType GenerateSubset (const DatabaseNamesType &databases, vtkIOSSReader *self)
 Generate a subset based the readers current settings for FileRange and FileStride.
 
vtkSmartPointer< vtkAbstractArrayGetField (const std::string &fieldname, Ioss::Region *region, const Ioss::GroupingEntity *group_entity, const DatabaseHandle &handle, int timestep, vtkIdTypeArray *ids_to_extract=nullptr, const std::string &cache_key_suffix=std::string())
 Reads a field with name fieldname from entity block or set with chosen name (blockname) and type (vtk_entity_type).
 
std::vector< vtkSmartPointer< vtkDataSet > > GetExodusDataSets (const std::string &blockname, vtkIOSSReader::EntityType vtk_entity_type, const DatabaseHandle &handle, int timestep, vtkIOSSReader *self)
 Called by GetDataSets to process each type of dataset.
 
std::vector< vtkSmartPointer< vtkDataSet > > GetCGNSDataSets (const std::string &blockname, vtkIOSSReader::EntityType vtk_entity_type, const DatabaseHandle &handle, int timestep, vtkIOSSReader *self)
 Called by GetDataSets to process each type of dataset.
 

Protected Attributes

Ioss::Init::Initializer io
 
double DisplacementMagnitude = 1.
 
DatabaseNamesType UnfilteredDatabaseNames
 
DatabaseNamesType DatabaseNames
 
vtkTimeStamp DatabaseNamesMTime
 
std::map< std::string, std::vector< std::pair< int, double > > > DatabaseTimes
 
std::vector< double > TimestepValues
 
vtkTimeStamp TimestepValuesMTime
 
std::array< std::set< vtkIOSSUtilities::EntityNameType >, vtkIOSSReader::NUMBER_OF_ENTITY_TYPESEntityNames
 
vtkTimeStamp SelectionsMTime
 
std::map< std::pair< Ioss::EntityType, std::string >, unsigned int > DatasetIndexMap
 
std::map< DatabaseHandle, std::shared_ptr< Ioss::Region > > RegionMap
 
vtkIOSSUtilities::Cache Cache
 
vtkIOSSUtilities::DatabaseFormatType Format = vtkIOSSUtilities::DatabaseFormatType::UNKNOWN
 
vtkIOSSReaderIOSSReader = nullptr
 
vtkSmartPointer< vtkDataAssemblyAssembly
 
vtkTimeStamp AssemblyMTime
 

Detailed Description

Internal methods and state for the IOSS reader.

Note that this class is not part of the public API of VTK and thus has no export macros. It has been put in a separate file so that a subclass of the reader local to this module (vtkIOSSCellGridReader) can access it and so it can be subclassed.

Definition at line 74 of file vtkIOSSReaderInternal.h.

Member Typedef Documentation

◆ DatabaseNamesType

using vtkIOSSReaderInternal::DatabaseNamesType = std::map<std::string, DatabasePartitionInfo>
protected

Definition at line 82 of file vtkIOSSReaderInternal.h.

◆ EntityType

Definition at line 110 of file vtkIOSSReaderInternal.h.

Constructor & Destructor Documentation

◆ vtkIOSSReaderInternal()

vtkIOSSReaderInternal::vtkIOSSReaderInternal ( vtkIOSSReader reader)
inline

Definition at line 112 of file vtkIOSSReaderInternal.h.

◆ ~vtkIOSSReaderInternal()

virtual vtkIOSSReaderInternal::~vtkIOSSReaderInternal ( )
virtualdefault

Member Function Documentation

◆ GetTimeSteps()

const std::vector< double > & vtkIOSSReaderInternal::GetTimeSteps ( ) const
inline

Definition at line 124 of file vtkIOSSReaderInternal.h.

◆ GetFormat()

vtkIOSSUtilities::DatabaseFormatType vtkIOSSReaderInternal::GetFormat ( ) const
inline

Definition at line 125 of file vtkIOSSReaderInternal.h.

◆ SetDisplacementMagnitude()

void vtkIOSSReaderInternal::SetDisplacementMagnitude ( double  s)
inline

Definition at line 127 of file vtkIOSSReaderInternal.h.

◆ GetDisplacementMagnitude()

double vtkIOSSReaderInternal::GetDisplacementMagnitude ( )
inline

Definition at line 128 of file vtkIOSSReaderInternal.h.

◆ ClearCache()

void vtkIOSSReaderInternal::ClearCache ( )
inline

Cache related API.

Definition at line 134 of file vtkIOSSReaderInternal.h.

◆ ResetCacheAccessCounts()

void vtkIOSSReaderInternal::ResetCacheAccessCounts ( )
inline

Cache related API.

Definition at line 135 of file vtkIOSSReaderInternal.h.

◆ ClearCacheUnused()

void vtkIOSSReaderInternal::ClearCacheUnused ( )
inline

Cache related API.

Definition at line 136 of file vtkIOSSReaderInternal.h.

◆ UpdateDatabaseNames()

bool vtkIOSSReaderInternal::UpdateDatabaseNames ( vtkIOSSReader self)

Processes filenames to populate names for Ioss databases to read.

A file collection representing files partitioned across ranks where each rank generate a separate file (spatial partitioning) are all represented by a single Ioss database.

Multiple Ioss databases are generated when the files are a temporal in nature or represent restarts.

This method simply uses the filenames to determine what type of files we are encountering. For spatial partitions, the filenames must end with '{processor-count}.{rank}'.

Returns
false to indicate failure.

◆ UpdateTimeInformation()

bool vtkIOSSReaderInternal::UpdateTimeInformation ( vtkIOSSReader self)

Read Ioss databases to generate information about timesteps / times in the databases.

This is called after successful call to UpdateDatabaseNames which should populate the list of Ioss databases. This method iterates over all databases and gathers information about timesteps available in those databases. When running in parallel, only the root node opens the Ioss databases and reads the time information. That information is then exchanged with all ranks thus at the end of this method all ranks should have their time information updated.

Returns
false on failure.

◆ NeedToUpdateEntityAndFieldSelections()

bool vtkIOSSReaderInternal::NeedToUpdateEntityAndFieldSelections ( vtkIOSSReader self,
const std::vector< DatabaseHandle > &  dbaseHandles 
)

Checks if the entity and field selections have changed.

◆ UpdateEntityAndFieldSelections()

bool vtkIOSSReaderInternal::UpdateEntityAndFieldSelections ( vtkIOSSReader self)

Populates various vtkDataArraySelection objects on the vtkIOSSReader with names for entity-blocks, -sets, and fields defined on them.

◆ UpdateAssembly()

bool vtkIOSSReaderInternal::UpdateAssembly ( vtkIOSSReader self,
int *  tag 
)

Populates the vtkDataAssembly used for block/set selection.

◆ GetAssembly()

vtkDataAssembly * vtkIOSSReaderInternal::GetAssembly ( ) const

◆ GenerateOutput()

bool vtkIOSSReaderInternal::GenerateOutput ( vtkPartitionedDataSetCollection output,
vtkIOSSReader self 
)

Fills up the output data-structure based on the entity blocks/sets chosen and those available.

◆ ReadAssemblies()

bool vtkIOSSReaderInternal::ReadAssemblies ( vtkPartitionedDataSetCollection output,
const DatabaseHandle handle 
)

Fills up the vtkDataAssembly with ioss-assemblies, if present.

◆ GetDataSets()

std::vector< vtkSmartPointer< vtkDataSet > > vtkIOSSReaderInternal::GetDataSets ( const std::string &  blockname,
vtkIOSSReader::EntityType  vtk_entity_type,
const DatabaseHandle handle,
int  timestep,
vtkIOSSReader self 
)

Reads datasets (meshes and fields) for the given block.

◆ GetExodusEntityDataSet()

vtkSmartPointer< vtkDataSet > vtkIOSSReaderInternal::GetExodusEntityDataSet ( const std::vector< std::string > &  blockNames,
vtkIOSSReader::EntityType  vtk_entity_type,
const DatabaseHandle handle,
int  timestep,
vtkIOSSReader self 
)

Reads datasets (meshes and fields) for the given exodus entity.

This method is only invoked when MergeExodusEntityBlocks is true (which is not the default).

◆ GetQAAndInformationRecords()

bool vtkIOSSReaderInternal::GetQAAndInformationRecords ( vtkFieldData fd,
const DatabaseHandle handle 
)

Read quality assurance and information data from the file.

◆ GetGlobalFields()

bool vtkIOSSReaderInternal::GetGlobalFields ( vtkFieldData fd,
const DatabaseHandle handle,
int  timestep 
)

Read global fields.

◆ HaveRestartFiles()

bool vtkIOSSReaderInternal::HaveRestartFiles ( ) const
inline

Get if there are restart files available.

Definition at line 233 of file vtkIOSSReaderInternal.h.

◆ GetDatabaseHandles()

std::vector< DatabaseHandle > vtkIOSSReaderInternal::GetDatabaseHandles ( int  piece,
int  npieces,
int  timestep 
) const

Returns the list of fileids, if any to be read for a given "piece" for the chosen timestep.

◆ GetRawFileName()

std::string vtkIOSSReaderInternal::GetRawFileName ( const DatabaseHandle handle,
bool  shortname = false 
) const
inline

Useful for printing error messages etc.

Definition at line 244 of file vtkIOSSReaderInternal.h.

◆ GetFileProcessor()

int vtkIOSSReaderInternal::GetFileProcessor ( const DatabaseHandle handle) const
inline

For spatially partitioned files, this returns the partition identifier for the file identified by the handle.

Definition at line 268 of file vtkIOSSReaderInternal.h.

◆ HaveCreatedRegions()

bool vtkIOSSReaderInternal::HaveCreatedRegions ( const std::vector< DatabaseHandle > &  dbaseHandles)
inline

Returns if the given database handles have regions already created.

Definition at line 289 of file vtkIOSSReaderInternal.h.

◆ ReleaseHandles()

void vtkIOSSReaderInternal::ReleaseHandles ( )
inline

Releases any open file handles.

Definition at line 304 of file vtkIOSSReaderInternal.h.

◆ ReleaseRegions()

void vtkIOSSReaderInternal::ReleaseRegions ( )
inline

Little more aggressive than ReleaseHandles but less intense than Reset, releases all IOSS regions and thus all the meta-data IOSS may have cached as well.

Definition at line 319 of file vtkIOSSReaderInternal.h.

◆ Reset()

void vtkIOSSReaderInternal::Reset ( )
inline

Clear all regions, databases etc.

Definition at line 324 of file vtkIOSSReaderInternal.h.

◆ ResetDatabaseNamesMTime()

void vtkIOSSReaderInternal::ResetDatabaseNamesMTime ( )
inline

Definition at line 335 of file vtkIOSSReaderInternal.h.

◆ GetFileIds()

std::vector< int > vtkIOSSReaderInternal::GetFileIds ( const std::string &  dbasename,
int  myrank,
int  numRanks 
) const
protected

◆ GetRegion() [1/2]

Ioss::Region * vtkIOSSReaderInternal::GetRegion ( const std::string &  dbasename,
int  fileid 
)
protected

◆ GetRegion() [2/2]

Ioss::Region * vtkIOSSReaderInternal::GetRegion ( const DatabaseHandle handle)
inlineprotected

Definition at line 340 of file vtkIOSSReaderInternal.h.

◆ GetField()

vtkSmartPointer< vtkAbstractArray > vtkIOSSReaderInternal::GetField ( const std::string &  fieldname,
Ioss::Region *  region,
const Ioss::GroupingEntity *  group_entity,
const DatabaseHandle handle,
int  timestep,
vtkIdTypeArray ids_to_extract = nullptr,
const std::string &  cache_key_suffix = std::string() 
)
protected

Reads a field with name fieldname from entity block or set with chosen name (blockname) and type (vtk_entity_type).

Field may be a result field which can be time-varying. In that case, timestep is used to identify the timestep to read.

Returns non-null array on success. Returns nullptr if block or field is missing (which is not an error condition).

On error, std::runtime_error is thrown.

◆ GetTopology() [1/2]

std::vector< std::pair< int, vtkSmartPointer< vtkCellArray > > > vtkIOSSReaderInternal::GetTopology ( const std::string &  blockname,
vtkIOSSReader::EntityType  vtk_entity_type,
const DatabaseHandle handle 
)
protected

Get a vector of cell arrays and their cell type for the entity block (or set) with the given name (blockname) and type (vtk_entity_type).

handle is the database / file handle for the current piece / rank obtained by calling GetDatabaseHandles.

Returns a vector of cell arrays and their cell type.

On file reading error, std::runtime_error is thrown.

◆ CombineTopologies()

std::pair< vtkSmartPointer< vtkUnsignedCharArray >, vtkSmartPointer< vtkCellArray > > vtkIOSSReaderInternal::CombineTopologies ( const std::vector< std::pair< int, vtkSmartPointer< vtkCellArray > > > &  topologies)
protected

Combine a vector cell types, cell arrays pairs into a single vtkUnsignedCharArray of cell types and a vtkCellArray.

◆ GetTopology() [2/2]

bool vtkIOSSReaderInternal::GetTopology ( vtkUnstructuredGrid grid,
const std::string &  blockname,
vtkIOSSReader::EntityType  vtk_entity_type,
const DatabaseHandle handle 
)
protected

Fill up the grid with connectivity information for the entity block (or set) with the given name (blockname) and type (vtk_entity_type).

handle is the database / file handle for the current piece / rank obtained by calling GetDatabaseHandles.

Returns true on success. false will be returned when the handle doesn't have the chosen blockname/entity.

On file reading error, std::runtime_error is thrown.

◆ GetGeometry() [1/3]

vtkSmartPointer< vtkPoints > vtkIOSSReaderInternal::GetGeometry ( const std::string &  blockname,
const DatabaseHandle handle 
)
protected

Get with point coordinates aka geometry read from the block with the given name (blockname).

The point coordinates are always read from a block of type NODEBLOCK.

handle is the database / file handle for the current piece / rank obtained by calling GetDatabaseHandles.

Returns points on success.

On file reading error, std::runtime_error is thrown.

◆ GetGeometry() [2/3]

bool vtkIOSSReaderInternal::GetGeometry ( vtkUnstructuredGrid grid,
const std::string &  blockname,
const DatabaseHandle handle 
)
protected

Fill up grid with point coordinates aka geometry read from the block with the given name (blockname).

The point coordinates are always read from a block of type NODEBLOCK.

handle is the database / file handle for the current piece / rank obtained by calling GetDatabaseHandles.

Returns true on success.

On file reading error, std::runtime_error is thrown.

◆ GetGeometry() [3/3]

bool vtkIOSSReaderInternal::GetGeometry ( vtkStructuredGrid grid,
const Ioss::StructuredBlock *  groupEntity 
)
protected

GetGeometry for vtkStructuredGrid i.e.

CGNS.

◆ GetMesh() [1/2]

bool vtkIOSSReaderInternal::GetMesh ( vtkUnstructuredGrid grid,
const std::string &  blockname,
vtkIOSSReader::EntityType  vtk_entity_type,
const DatabaseHandle handle,
bool  remove_unused_points 
)
protected

Adds geometry (points) and topology (cell) information to the grid for the entity block or set chosen using the name (blockname) and type (vtk_entity_type).

handle is the database / file handle for the current piece / rank obtained by calling GetDatabaseHandles.

If remove_unused_points is true, any points that are not used by the cells are removed. When that is done, an array called __vtk_mesh_original_pt_ids__ is added to the cache for the entity which can be used to identify which points were passed through.

This method is only invoked when MergeExodusEntityBlocks is false (which is the default).

◆ GetEntityMesh()

bool vtkIOSSReaderInternal::GetEntityMesh ( vtkUnstructuredGrid grid,
const std::vector< std::string > &  blockNames,
vtkIOSSReader::EntityType  vtk_entity_type,
const DatabaseHandle handle 
)
protected

Adds geometry (points) and topology (cell) information to the grid for all the entity blocks or sets chosen using the names (blockNames) and type (vtk_entity_type).

handle is the database / file handle for the current piece / rank obtained by calling GetDatabaseHandles.

This method is only invoked when MergeExodusEntityBlocks is true (which is not the default).

◆ GetMesh() [2/2]

bool vtkIOSSReaderInternal::GetMesh ( vtkStructuredGrid grid,
const std::string &  blockname,
vtkIOSSReader::EntityType  vtk_entity_type,
const DatabaseHandle handle 
)
protected

Reads a structured block.

vtk_entity_type must be vtkIOSSReader::STRUCTUREDBLOCK.

This method is only invoked when MergeExodusEntityBlocks is false (which is the default).

◆ GenerateEntityIdArray()

bool vtkIOSSReaderInternal::GenerateEntityIdArray ( vtkCellData cd,
vtkIdType  numberOfCells,
const std::string &  blockname,
vtkIOSSReader::EntityType  vtk_entity_type,
const DatabaseHandle handle 
)
protected

Add "id" array to the dataset using the id for the grouping entity, if any.

The array named "object_id" is added as a cell-data array to follow the pattern used by vtkExodusIIReader.

◆ GetFields()

bool vtkIOSSReaderInternal::GetFields ( vtkDataSetAttributes dsa,
vtkDataArraySelection selection,
Ioss::Region *  region,
Ioss::GroupingEntity *  group_entity,
const DatabaseHandle handle,
int  timestep,
bool  read_ioss_ids,
vtkIdTypeArray ids_to_extract = nullptr,
const std::string &  cache_key_suffix = std::string() 
)
protected

Reads selected field arrays for the given entity block or set.

If read_ioss_ids is true, then element ids are read as applicable.

ids_to_extract, when specified, is a vtkIdTypeArray identifying the subset of indices to produce in the output. This is used for point data fields when the mesh was generated with remove_unused_points on. This ensures that point data arrays match the points. When ids_to_extract is provided, for the caching to work correctly, the cache_key_suffix must be set to the name of the entity block (or set) which provided the cells to determine which points to extract.

Returns true on success.

On error, std::runtime_error is thrown.

◆ GetNodeFields()

bool vtkIOSSReaderInternal::GetNodeFields ( vtkDataSetAttributes dsa,
vtkDataArraySelection selection,
Ioss::Region *  region,
Ioss::GroupingEntity *  group_entity,
const DatabaseHandle handle,
int  timestep,
bool  read_ioss_ids,
bool  mergeExodusEntityBlocks = false 
)
protected

This reads node fields for an entity block or set.

Internally calls GetFields() with correct values for ids_to_extract and cache_key_suffix.

◆ ApplyDisplacements()

bool vtkIOSSReaderInternal::ApplyDisplacements ( vtkPointSet grid,
Ioss::Region *  region,
Ioss::GroupingEntity *  group_entity,
const DatabaseHandle handle,
int  timestep,
bool  mergeExodusEntityBlocks = false 
)
protected

Reads node block array with displacements and then transforms the points in the grid using those displacements.

◆ GenerateFileId()

bool vtkIOSSReaderInternal::GenerateFileId ( vtkDataSetAttributes cellData,
vtkIdType  numberOfCells,
Ioss::GroupingEntity *  group_entity,
const DatabaseHandle handle 
)
protected

Adds 'file_id' array to indicate which file the dataset was read from.

◆ ConvertFieldForVTK()

vtkSmartPointer< vtkAbstractArray > vtkIOSSReaderInternal::ConvertFieldForVTK ( vtkAbstractArray array)
protected

Fields like "ids" have to be vtkIdTypeArray in VTK.

This method does the conversion if needed.

◆ GetDataSetIndexForEntity()

unsigned int vtkIOSSReaderInternal::GetDataSetIndexForEntity ( const Ioss::GroupingEntity *  entity) const
inlineprotected

Definition at line 538 of file vtkIOSSReaderInternal.h.

◆ GenerateElementAndSideIds()

void vtkIOSSReaderInternal::GenerateElementAndSideIds ( vtkDataSet dataset,
Ioss::SideSet *  sideSet,
const DatabaseHandle handle,
const std::string &  blockname,
vtkIOSSReader::EntityType  vtk_entity_type 
)
protected

Add field-data arrays holding side-set specifications (i.e., (cell-id, side-id) tuples) for use by the UnstructuredGridToCellGrid conversion filter.

◆ GetExodusDataSets()

std::vector< vtkSmartPointer< vtkDataSet > > vtkIOSSReaderInternal::GetExodusDataSets ( const std::string &  blockname,
vtkIOSSReader::EntityType  vtk_entity_type,
const DatabaseHandle handle,
int  timestep,
vtkIOSSReader self 
)
protected

Called by GetDataSets to process each type of dataset.

There's slight difference in how they are handled and hence these separate methods.

◆ GetCGNSDataSets()

std::vector< vtkSmartPointer< vtkDataSet > > vtkIOSSReaderInternal::GetCGNSDataSets ( const std::string &  blockname,
vtkIOSSReader::EntityType  vtk_entity_type,
const DatabaseHandle handle,
int  timestep,
vtkIOSSReader self 
)
protected

Called by GetDataSets to process each type of dataset.

There's slight difference in how they are handled and hence these separate methods.

◆ BuildAssembly()

bool vtkIOSSReaderInternal::BuildAssembly ( Ioss::Region *  region,
vtkDataAssembly assembly,
int  root,
bool  add_leaves 
)
protected

◆ GenerateSubset()

DatabaseNamesType vtkIOSSReaderInternal::GenerateSubset ( const DatabaseNamesType databases,
vtkIOSSReader self 
)
protected

Generate a subset based the readers current settings for FileRange and FileStride.

Member Data Documentation

◆ io

Ioss::Init::Initializer vtkIOSSReaderInternal::io
protected

Definition at line 78 of file vtkIOSSReaderInternal.h.

◆ DisplacementMagnitude

double vtkIOSSReaderInternal::DisplacementMagnitude = 1.
protected

Definition at line 80 of file vtkIOSSReaderInternal.h.

◆ UnfilteredDatabaseNames

DatabaseNamesType vtkIOSSReaderInternal::UnfilteredDatabaseNames
protected

Definition at line 83 of file vtkIOSSReaderInternal.h.

◆ DatabaseNames

DatabaseNamesType vtkIOSSReaderInternal::DatabaseNames
protected

Definition at line 84 of file vtkIOSSReaderInternal.h.

◆ DatabaseNamesMTime

vtkTimeStamp vtkIOSSReaderInternal::DatabaseNamesMTime
protected

Definition at line 85 of file vtkIOSSReaderInternal.h.

◆ DatabaseTimes

std::map<std::string, std::vector<std::pair<int, double> > > vtkIOSSReaderInternal::DatabaseTimes
protected

Definition at line 87 of file vtkIOSSReaderInternal.h.

◆ TimestepValues

std::vector<double> vtkIOSSReaderInternal::TimestepValues
protected

Definition at line 88 of file vtkIOSSReaderInternal.h.

◆ TimestepValuesMTime

vtkTimeStamp vtkIOSSReaderInternal::TimestepValuesMTime
protected

Definition at line 89 of file vtkIOSSReaderInternal.h.

◆ EntityNames

std::array<std::set<vtkIOSSUtilities::EntityNameType>, vtkIOSSReader::NUMBER_OF_ENTITY_TYPES> vtkIOSSReaderInternal::EntityNames
protected

Definition at line 93 of file vtkIOSSReaderInternal.h.

◆ SelectionsMTime

vtkTimeStamp vtkIOSSReaderInternal::SelectionsMTime
protected

Definition at line 94 of file vtkIOSSReaderInternal.h.

◆ DatasetIndexMap

std::map<std::pair<Ioss::EntityType, std::string>, unsigned int> vtkIOSSReaderInternal::DatasetIndexMap
protected

Definition at line 97 of file vtkIOSSReaderInternal.h.

◆ RegionMap

std::map<DatabaseHandle, std::shared_ptr<Ioss::Region> > vtkIOSSReaderInternal::RegionMap
protected

Definition at line 99 of file vtkIOSSReaderInternal.h.

◆ Cache

vtkIOSSUtilities::Cache vtkIOSSReaderInternal::Cache
protected

Definition at line 101 of file vtkIOSSReaderInternal.h.

◆ Format

Definition at line 103 of file vtkIOSSReaderInternal.h.

◆ IOSSReader

vtkIOSSReader* vtkIOSSReaderInternal::IOSSReader = nullptr
protected

Definition at line 104 of file vtkIOSSReaderInternal.h.

◆ Assembly

vtkSmartPointer<vtkDataAssembly> vtkIOSSReaderInternal::Assembly
protected

Definition at line 106 of file vtkIOSSReaderInternal.h.

◆ AssemblyMTime

vtkTimeStamp vtkIOSSReaderInternal::AssemblyMTime
protected

Definition at line 107 of file vtkIOSSReaderInternal.h.

◆ DatabaseProperties

Ioss::PropertyManager vtkIOSSReaderInternal::DatabaseProperties

Definition at line 118 of file vtkIOSSReaderInternal.h.

◆ FileNames

std::set<std::string> vtkIOSSReaderInternal::FileNames

Definition at line 119 of file vtkIOSSReaderInternal.h.

◆ FileNamesMTime

vtkTimeStamp vtkIOSSReaderInternal::FileNamesMTime

Definition at line 120 of file vtkIOSSReaderInternal.h.

◆ Selectors

std::set<std::string> vtkIOSSReaderInternal::Selectors

Definition at line 122 of file vtkIOSSReaderInternal.h.


The documentation for this class was generated from the following file: