VTK  9.4.20241121
Public Member Functions | List of all members
ensight_gold::EnSightDataSet Class Reference

Handles reading a full EnSight Gold dataset. More...

#include <EnSightDataSet.h>

Public Member Functions

bool CheckVersion (const char *casefilename)
 Parses through case file until version information is found.
 
bool ParseCaseFile (const char *casefilename)
 Parses all sections of a case file to get information such as filenames.
 
std::vector< double > GetTimeSteps ()
 returns a vector containing all time steps in the dataset
 
bool ReadGeometry (vtkPartitionedDataSetCollection *output, vtkDataArraySelection *selection, bool outputStructureOnly)
 Reads Geometry file, caching the data if not transient.
 
bool ReadMeasuredGeometry (vtkPartitionedDataSetCollection *output, vtkDataArraySelection *selection, bool outputStructureOnly)
 Reads Measured Geometry file.
 
bool ReadRigidBodyGeometryFile ()
 Read the rigid body file.
 
bool GetPartInfo (vtkDataArraySelection *partSelection, vtkDataArraySelection *pointArraySelection, vtkDataArraySelection *cellArraySelection, vtkDataArraySelection *fieldArraySelection, vtkStringArray *partNames)
 Only grabs Part (block) information from the Geometry file to be used in a vtkDataArraySelection to enable user to choose which parts to load.
 
bool ReadVariables (vtkPartitionedDataSetCollection *output, vtkDataArraySelection *partSelection, vtkDataArraySelection *pointArraySelection, vtkDataArraySelection *cellArraySelection, vtkDataArraySelection *fieldArraySelection)
 Reads Variable file(s)
 
bool HasRigidBodyFile ()
 Returns true if a rigid body file is specified in the case file.
 
bool UseRigidBodyTimeSteps ()
 Returns true if the time steps specified in the rigid body files should be used.
 
std::vector< double > GetEulerTimeSteps ()
 Get the array of time steps from the rigid body files.
 
void SetActualTimeValue (double time)
 Set the time value to be used in the next read.
 
bool UseStaticMeshCache () const
 Returns true if the static mesh cache will be used.
 
vtkDataObjectMeshCacheGetMeshCache ()
 
void SetPartOfSOSFile (bool partOfSOS)
 
void SetPDCInfoForLoadedParts (vtkSmartPointer< vtkIdTypeArray > indices, vtkSmartPointer< vtkStringArray > names)
 Sets information about parts to be loaded.
 

Detailed Description

Handles reading a full EnSight Gold dataset.

Uses the EnSightFile class for opening the individual files that make up the ensight dataset.

Definition at line 144 of file EnSightDataSet.h.

Member Function Documentation

◆ CheckVersion()

bool ensight_gold::EnSightDataSet::CheckVersion ( const char *  casefilename)

Parses through case file until version information is found.

Returns true if the file is an EnSight Gold file

◆ ParseCaseFile()

bool ensight_gold::EnSightDataSet::ParseCaseFile ( const char *  casefilename)

Parses all sections of a case file to get information such as filenames.

◆ GetTimeSteps()

std::vector< double > ensight_gold::EnSightDataSet::GetTimeSteps ( )

returns a vector containing all time steps in the dataset

◆ ReadGeometry()

bool ensight_gold::EnSightDataSet::ReadGeometry ( vtkPartitionedDataSetCollection output,
vtkDataArraySelection selection,
bool  outputStructureOnly 
)

Reads Geometry file, caching the data if not transient.

◆ ReadMeasuredGeometry()

bool ensight_gold::EnSightDataSet::ReadMeasuredGeometry ( vtkPartitionedDataSetCollection output,
vtkDataArraySelection selection,
bool  outputStructureOnly 
)

Reads Measured Geometry file.

◆ ReadRigidBodyGeometryFile()

bool ensight_gold::EnSightDataSet::ReadRigidBodyGeometryFile ( )

Read the rigid body file.

◆ GetPartInfo()

bool ensight_gold::EnSightDataSet::GetPartInfo ( vtkDataArraySelection partSelection,
vtkDataArraySelection pointArraySelection,
vtkDataArraySelection cellArraySelection,
vtkDataArraySelection fieldArraySelection,
vtkStringArray partNames 
)

Only grabs Part (block) information from the Geometry file to be used in a vtkDataArraySelection to enable user to choose which parts to load.

Outputs all part names found in this casefile in partNames array.

◆ ReadVariables()

bool ensight_gold::EnSightDataSet::ReadVariables ( vtkPartitionedDataSetCollection output,
vtkDataArraySelection partSelection,
vtkDataArraySelection pointArraySelection,
vtkDataArraySelection cellArraySelection,
vtkDataArraySelection fieldArraySelection 
)

Reads Variable file(s)

◆ HasRigidBodyFile()

bool ensight_gold::EnSightDataSet::HasRigidBodyFile ( )

Returns true if a rigid body file is specified in the case file.

◆ UseRigidBodyTimeSteps()

bool ensight_gold::EnSightDataSet::UseRigidBodyTimeSteps ( )

Returns true if the time steps specified in the rigid body files should be used.

◆ GetEulerTimeSteps()

std::vector< double > ensight_gold::EnSightDataSet::GetEulerTimeSteps ( )

Get the array of time steps from the rigid body files.

◆ SetActualTimeValue()

void ensight_gold::EnSightDataSet::SetActualTimeValue ( double  time)

Set the time value to be used in the next read.

◆ UseStaticMeshCache()

bool ensight_gold::EnSightDataSet::UseStaticMeshCache ( ) const

Returns true if the static mesh cache will be used.

◆ GetMeshCache()

vtkDataObjectMeshCache * ensight_gold::EnSightDataSet::GetMeshCache ( )

◆ SetPartOfSOSFile()

void ensight_gold::EnSightDataSet::SetPartOfSOSFile ( bool  partOfSOS)

◆ SetPDCInfoForLoadedParts()

void ensight_gold::EnSightDataSet::SetPDCInfoForLoadedParts ( vtkSmartPointer< vtkIdTypeArray indices,
vtkSmartPointer< vtkStringArray names 
)

Sets information about parts to be loaded.

This must be called when loading data through a SOS file. It's possible that some casefiles may not include info on all parts (even as an empty part). The vtkEnSightSOSGoldReader looks at which parts are to be loaded, assigns them ids in the output vtkPartitionedDataSetCollection, and provides the part names, since they may not be available in the current casefile. This ensures that all ranks will have the same structure for the output PDC and matching name metadata.

Parameters
indicesProvides the index into the output vtkPartitionedDataSetCollection for all parts. It should be the same size as the total number of parts across all casefiles being loaded by an SOS file. If a part is not to be loaded, its value should be -1.
namesThis should be only for the parts being loaded. This is indexed by its index in the output PDC.

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