GemaCoreLib
The GeMA Core library
Loading...
Searching...
No Matches
GmHdf5ModelReader Class Reference

A helper class used to parse and retrieve data from am hdf5 model file. Used by the mesh plugin to read mesh data and by the core to read boundary conditions & discontinuity set data. More...

#include <gmHdf5ModelReader.h>

Inheritance diagram for GmHdf5ModelReader:
Collaboration diagram for GmHdf5ModelReader:

Classes

struct  AttrInfo
 Aux structure with information for a data attribute. More...
 
struct  BcInfo
 Aux structure with information abou a boundary condition. More...
 
struct  DicInfo
 Aux structure with information for dictionary tables with associated data sets. More...
 
struct  DiscInfo
 Aux structure with information about a discontinuity. More...
 
struct  DsInfo
 Aux structure with information about a discontinuity set. More...
 
struct  MeshInfo
 General mesh information (only the "metadata" is loaded - table contents are not loaded, except for dictionaries) More...
 

Public Member Functions

 GmHdf5ModelReader (QString fileName, const GmLogCategory &logger)
 Constructor. Must be followed by a call to open()
 
 ~GmHdf5ModelReader ()
 Destructor.
 
bool open ()
 Open the file. Returns false on error.
 
QString fileName () const
 Returns the file name.
 
QStringList meshList () const
 Returns the list of meshes in the file.
 
const MeshInfosetCurrentMesh (QString mesh, bool meshInfo, bool bcInfo, bool dsInfo, const GmPCR *pcr)
 Set mesh as the current mesh for load operations. Performs a validation of the mesh data structure on file and loads information on the mesh data. Returns a pointer to the loaded information structure or NULL if the mesh was not found or there was a validation problem (logs message in that case). The three boolean parameters control which data in the MeshInfo structure will be validated and filled. If pcr is different from NULL, it will be used to convert node and cell indices. If NULL, an identity internal PCR object will be used as the current PCR object. The returned pointer is valid while the reader object exists and until a new call to setCurrentMesh() is made.
 
const MeshInfocurrentMeshInfo () const
 Returns the current mesh information structure. Equal to the pointer returned on the last call to setCurrentMesh()
 
bool loadGeometryCoordinates (GmValueAccessor *coordAc, GmValueAccessor *ghostAc) const
 Loads node coordinate data from the Geometry\NodeCoordinates table from the current mesh set with setCurrentMesh(). Assumes that the vectors that will be filled with the data through the given accessors have the correct sizes. Notice that this size might be smaller than the file table size if the mesh was partitioned. Returns false on errors.
 
bool loadGeometryCellTopology (const QStringList &propertySetOrder, const QVector< int > &propertySetSizes, int *type, int *propertySets, int *nodes, int *cellsPerType) const
 Loads cell definition data from the Geometry\CellTopology table from the current mesh set with setCurrentMesh(). Assumes that the vectors that will be filled with the data have the correct sizes. Notice that this size might be smaller than the values found in the MeshInfo structure, returned by setCurrentMesh() and detailed below (referenced as info on the description), if the mesh was partitioned. Returns false on errors.
 
bool loadAndSetMeshGhostCells (GmCellMesh *mesh) const
 Updates mesh cells, adding ghost nodes to them. Values are validated by the reader.
 
bool loadAndSetMeshInactiveCells (GmCellMesh *mesh) const
 Updates mesh cells marking inactive cells as so. Cells are validated by the reader. Expects the mesh to be in a state where GmCell::setActive() can be called.
 
bool loadCellGroupData (int groupIndex, int *data, int *realNumCells) const
 Loads into data the set of cells belonging to the cell group referenced by its index in the cell group dictionary, info->_cellGroupsDictionary (where info is the MeshInfo structure returned by setCurrentMesh()). Expects the data vector to have size equal to info->_cellGroupsDictionary[groupIndex]._n. Cell ids are validated by the reader. If the mesh was partitioned and some of the cells don't belong to the current partition, they will be removed from the set and the vector will be compacted. The realNumCells parameter will be filled with the effective number of cells for this partition. Returns false on errors.
 
bool loadNodeSetData (int groupIndex, int *data, int *realNumNodes) const
 Loads into data the set of nodes belonging to the node set referenced by its index in the node set dictionary, info->_nodeSetsDictionary (where info is the MeshInfo structure returned by setCurrentMesh()). Expects the data vector to have size equal to info->_nodeSetsDictionary[groupIndex]._n. Node ids are validated by the reader. If the mesh was partitioned and some of the nodes don't belong to the current partition, they will be removed from the set and the vector will be compacted. The realNumNodes parameter will be filled with the effective number of nodes for this partition. Returns false on errors.
 
bool loadBoundaryData (int groupIndex, const GmCellMesh *mesh, int *data, int *realNumCells, GmCellBoundaryType type) const
 Loads into data the set of edge or face border definitions referenced by its index in the boundary edges / faces dictionary, info->_boundaryEdgesDictionary or info->_boundaryFacesDictionary (where info is the MeshInfo structure returned by setCurrentMesh()). The type of boundary is given by the type parameter. Expects the data vector to have size equal to 2 * info->_boundaryXxxxDictionary[groupIndex]._n. If the mesh was partitioned and some of the cells don't belong to the current partition, they will be removed from the set and the vector will be compacted. The realNumCells parameter will be filled with the effective number of cells for this partition.
 
bool loadNodeData (int attrIndex, GmValueAccessor *ac) const
 Loads the attribute data associated with the given node accessor. The attribute is identified by its index inside the info->_nodeInitialData vector (where info is the MeshInfo structure returned by setCurrentMesh()). Assumes that the accessor associated value set has already been resized to the correct size. Also assumes that the accessor does NOT do any unit conversion.
 
bool loadCellData (int attrIndex, GmCellAccessor *ac) const
 Similar to loadNodeData() for cell attributes. Cell indices are translated with the current PCR object.
 
bool loadGaussData (int attrIndex, GmGaussAccessor *ac, const QVector< int > &cellTypeList) const
 Similar to loadNodeData() for Gauss attributes. Cell indices are translated with the current PCR object. If the mesh was partitioned, cellTypeList should be a vector with size equal to the number of cells in the global, unpartitioned, mesh, filled with cell types in their original mesh order. Otherwise, it should be empty.
 
bool loadBcApplicationPoints (int bcIndex, const GmMesh *mesh, int *data, QVector< int > &skipList) const
 Loads the application point data associated with the given boundary condition. The bc is identified by its index inside the info->_bcList vector (where info is the MeshInfo structure returned by setCurrentMesh()). The full data is stored at the provided data buffer, assuming that it has a size equal to info->_bcList[bcIndex]._n * info->_bcList[bcIndex]._d.
 
bool loadBcData (int bcIndex, int attrIndex, GmValueAccessor *ac, const QVector< int > &skipList) const
 Similar to loadNodeData() for boundary condition attributes. Entries in skip list should be ignored when filling the accessor. The list should be ordered.
 
bool loadDsCoordinateData (int dsIndex, int dIndex, double *data) const
 Loads the coordinate data for either a polyline or a surface discontinuity set. The set is identified by its index inside the info->_dsList vector (where info is the MeshInfo structure returned by setCurrentMesh()). The discontinuity is identified by its index inside the _discData vector belonging to the discontinuity set.
 
bool loadDsBorderData (int dsIndex, int dIndex, const GmCellMesh *mesh, int *data, int *realNumCells) const
 Loads the cell+border data pair for either an edge or face list discontinuity set. The set is identified by its index inside the info->_dsList vector (where info is the MeshInfo structure returned by setCurrentMesh()). The discontinuity is identified by its index inside the _discData vector belonging to the discontinuity set.
 
bool loadDsTriangleData (int dsIndex, int dIndex, int *data) const
 Loads the triangle incidences for a surface discontinuity set. The set is identified by its index inside the info->_dsList vector (where info is the MeshInfo structure returned by setCurrentMesh()). The discontinuity is identified by its index inside the _discData vector belonging to the discontinuity set.
 
- Public Member Functions inherited from GmHdf5Model
QString dictionaryTableName (DictionaryType type) const
 Returns the name on the HDF5 file for the given dictionary type.
 
GroupType dictionaryGeometryGroup (DictionaryType type) const
 Returns the associated geometry group type associated with the dictionary or GM_HDF5MODEL_INVALID if there is none.
 
QString groupName (QString meshName, GroupType group, QString subGroupName) const
 Returns the group name for the given mesh / group type. If type is GM_HDF5MODEL_BC_GROUP or GM_HDF5MODEL_DS_GROUP, the subGroupName should contain the boundary condition / discontinuity set name (if empty, the path to the root bc/ds group will be returned).
 
QPair< QString, int > splitAttributeName (QString attrName) const
 Splits an attribute name formatted as 'attr_name[state]' or 'attr_name' into its components. State will be 0 if missing from the input string.
 

Private Member Functions

bool loadSharedDictionariesInfo ()
 Loads functions, node sets and boundary dictionary information into the current mesh info data structure. Returns false on failure.
 
bool loadMeshInfo ()
 Loads mesh information into the current mesh info data structure. Returns false on failure.
 
bool loadBcInfo ()
 Loads boundary conditions information into the current mesh info data structure. Returns false on failure.
 
bool loadDsInfo ()
 Loads discontinuity set information into the current mesh info data structure. Returns false on failure.
 
bool loadAttributeInfo (GroupType group, QString subGroupName, QVector< AttrInfo > &data, QString excludedTable="")
 Loads into data the information about every attribute table listed as a child of the given group (and sub group for the BC group). If given, the excludedTable is ignored. Returns false on errors.
 
QString groupName (GroupType group, QString subGroupName) const
 Returns the group name for the given group type. If type is GM_HDF5MODEL_BC_GROUP or GM_HDF5MODEL_DS_GROUP, the subGroupName should contain the boundary condition / discontinuity set name. The returned name INCLUDES the root mesh group.
 
int checkTableLayout (QString tablePath, int ncol, const H5::DataType &type, bool required, int *nlines=NULL, int *ncolumns=NULL) const
 Returns 0 if the table specified by the given complete path exists, has the given number of columns and the given data type. Returns -1 if the table is missing and required is true or if the table exists but the layout is wrong. Returns 1 if the table is missing and required is false.
 
bool loadDictionary (DictionaryType type, QStringList &data, bool required) const
 Loads the data from the given dictionary type for the current mesh, filling data. Results on an empty list if the requested dictionary was not found at the current mesh. Returns true if the table was found and loaded or if the table is missing and required is false. On any invalid layout or other access errors, returns false (and logs the error).
 
bool loadDictionary (DictionaryType type, QVector< DicInfo > &data, bool required) const
 Similar to loadDictionary(DictionaryType, QStringList&, bool), it also loads the number of entries from the associated tables to each dictionary entry. Returns false if any of those tables don't exist or have the wrong format. Should not be called for functions or property set dictionaries since they don't have an associated table per entry.
 
bool loadDictionaryData (int groupIndex, GroupType group, QVector< DicInfo > &dictionary, int *data) const
 Aux function with common code for the loadXxxxData(int groupIndex, ...) family of functions.
 
bool loadAccessorData (const AttrInfo &attrInfo, GroupType group, QString subGroupName, GmValueAccessor *ac, const GmMeshGaussIndex *gindex=NULL, const QVector< int > &bcSkipOrCellTypeList=QVector< int >()) const
 Loads the data associated with the node, cell, gauss or boundary condition initial data referenced by the given attribute information into the attribute associated with the given accessor. Assumes that the associated value set has already been resized to the correct size (number of nodes, cells or Gauss points). Also assumes that the accessor does NOT do any unit conversion.
 
bool isFunctionValue (double v) const
 Returns true if v stores a nan encoded function value index.
 
unsigned nanToDindex (double v) const
 Returns the encoded index into the given nan encoded value.
 

Private Attributes

QString _fileName
 The saved file name.
 
const GmLogCategory_logger
 The logger used to emmit error messages.
 
H5::H5File * _fileh
 The hdf5 file handle.
 
QString _currentMesh
 The current mesh set by setCurrentMesh()
 
MeshInfo_info
 The current mesh info data.
 
const GmPCR_pcr
 The PCR object used to translate indices for the current mesh. Will point to either the user given pcr object or to _defPcr.
 
const GmPCR_defPcr
 Set to an identity GmDefaultPCR object when the user didn't gave us his own PCR object.
 

Additional Inherited Members

- Public Types inherited from GmHdf5Model
enum  DictionaryType {
  GM_HDF5MODEL_FUNCTIONS , GM_HDF5MODEL_PROPERTYSETS , GM_HDF5MODEL_CELLGROUPS , GM_HDF5MODEL_NODESETS ,
  GM_HDF5MODEL_EDGES , GM_HDF5MODEL_FACES , GM_HDF5MODEL_NUMDICTIONARIES
}
 
enum  GroupType {
  GM_HDF5MODEL_D_GROUP , GM_HDF5MODEL_G_GROUP , GM_HDF5MODEL_GCG_GROUP , GM_HDF5MODEL_GNS_GROUP ,
  GM_HDF5MODEL_GBE_GROUP , GM_HDF5MODEL_GBF_GROUP , GM_HDF5MODEL_ND_GROUP , GM_HDF5MODEL_CD_GROUP ,
  GM_HDF5MODEL_GD_GROUP , GM_HDF5MODEL_BC_GROUP , GM_HDF5MODEL_DS_GROUP , GM_HDF5MODEL_NUMGROUPS ,
  GM_HDF5MODEL_INVALID
}
 

Detailed Description

A helper class used to parse and retrieve data from am hdf5 model file. Used by the mesh plugin to read mesh data and by the core to read boundary conditions & discontinuity set data.

Member Function Documentation

◆ checkTableLayout()

int GmHdf5ModelReader::checkTableLayout ( QString tablePath,
int ncol,
const H5::DataType & type,
bool required,
int * nlines = NULL,
int * ncolumns = NULL ) const
private

Returns 0 if the table specified by the given complete path exists, has the given number of columns and the given data type. Returns -1 if the table is missing and required is true or if the table exists but the layout is wrong. Returns 1 if the table is missing and required is false.

If nlines is not NULL and the table exists, it will be filled with the table size (otherwise it will be filled with -1). If ncol is 0, any number of columns will be accepted and, if ncolumns is not NULL, it will be filled with the real number of mesh columns. When returning -1, logs the appropriate error message.

◆ loadAccessorData()

bool GmHdf5ModelReader::loadAccessorData ( const AttrInfo & attrInfo,
GroupType group,
QString subGroupName,
GmValueAccessor * ac,
const GmMeshGaussIndex * gindex = NULL,
const QVector< int > & bcSkipOrCellTypeList = QVector<int>() ) const
private

Loads the data associated with the node, cell, gauss or boundary condition initial data referenced by the given attribute information into the attribute associated with the given accessor. Assumes that the associated value set has already been resized to the correct size (number of nodes, cells or Gauss points). Also assumes that the accessor does NOT do any unit conversion.

If the given accessor is tied to a Gauss attribute, gindex should provide the associated Gauss index. Also, if the mesh was partitioned, bcSkipOrCellTypeList should be a vector with size equal to the number of cells in the global, unpartitioned, mesh, filled with cell types in their original mesh order.

If the given accessor is tied to a boundary condition attribute and bcSkipOrCellTypeList is not empty,
the entries in that list will be ignored while reading. They MUST be ordered.

At present, bcSkipOrCellTypeList is used only when loading Gauss or BC data for partitioned meshes, and should be empty otherwise.

If possible, the data is loaded directly into the associated value set data buffer. Otherwise, an auxiliar buffer is used to read the data and the standard accessor API used to set it. Either way, if the attribute contains function references, they will be automatically translated.

IMPORTANT: Node and cell indices are translated with the current PCR object whenever needed, depending o the accessor type. If the mesh was partitioned, values that don't belong to the current partition are discarded.

◆ loadAndSetMeshGhostCells()

bool GmHdf5ModelReader::loadAndSetMeshGhostCells ( GmCellMesh * mesh) const

Updates mesh cells, adding ghost nodes to them. Values are validated by the reader.

IMPORTANT: Node and cell indices are translated with the current PCR object.

◆ loadAndSetMeshInactiveCells()

bool GmHdf5ModelReader::loadAndSetMeshInactiveCells ( GmCellMesh * mesh) const

Updates mesh cells marking inactive cells as so. Cells are validated by the reader. Expects the mesh to be in a state where GmCell::setActive() can be called.

IMPORTANT: Cell indices are translated with the current PCR object.

◆ loadBcApplicationPoints()

bool GmHdf5ModelReader::loadBcApplicationPoints ( int bcIndex,
const GmMesh * mesh,
int * data,
QVector< int > & skipList ) const

Loads the application point data associated with the given boundary condition. The bc is identified by its index inside the info->_bcList vector (where info is the MeshInfo structure returned by setCurrentMesh()). The full data is stored at the provided data buffer, assuming that it has a size equal to info->_bcList[bcIndex]._n * info->_bcList[bcIndex]._d.

Dimension d will be either 2 or 3 depending on the bc type. The first integer per application point is its type (0 for an explicit value (node, cell or border pair), 1 for a node set index, 2 for an edge border index or 3 for a face border index). Following values are the data itself which can be a node index, cell index, cell/border pair or a node set / boundary index.

If the mesh was partitioned, lines relative to nodes and cells that don't belong to the current partition are not included in the result vector an their indices are added to the provided skipList (that should be empty on the call) in order.

Cell and node ids, border pairs and node set / boundary indices are validated by the reader. The mesh parameter is used for validating cell borders. Returns false on errors.

IMPORTANT: Node and cell indices are translated with the current PCR object.

◆ loadBoundaryData()

bool GmHdf5ModelReader::loadBoundaryData ( int groupIndex,
const GmCellMesh * mesh,
int * data,
int * realNumCells,
GmCellBoundaryType type ) const

Loads into data the set of edge or face border definitions referenced by its index in the boundary edges / faces dictionary, info->_boundaryEdgesDictionary or info->_boundaryFacesDictionary (where info is the MeshInfo structure returned by setCurrentMesh()). The type of boundary is given by the type parameter. Expects the data vector to have size equal to 2 * info->_boundaryXxxxDictionary[groupIndex]._n. If the mesh was partitioned and some of the cells don't belong to the current partition, they will be removed from the set and the vector will be compacted. The realNumCells parameter will be filled with the effective number of cells for this partition.

Cell ids and border indices are validated by the reader (the mesh is used to check border numbers). Returns false on errors.

IMPORTANT: Cell indices are translated with the current PCR object.

◆ loadCellGroupData()

bool GmHdf5ModelReader::loadCellGroupData ( int groupIndex,
int * data,
int * realNumCells ) const

Loads into data the set of cells belonging to the cell group referenced by its index in the cell group dictionary, info->_cellGroupsDictionary (where info is the MeshInfo structure returned by setCurrentMesh()). Expects the data vector to have size equal to info->_cellGroupsDictionary[groupIndex]._n. Cell ids are validated by the reader. If the mesh was partitioned and some of the cells don't belong to the current partition, they will be removed from the set and the vector will be compacted. The realNumCells parameter will be filled with the effective number of cells for this partition. Returns false on errors.

IMPORTANT: Cell indices are translated with the current PCR object.

◆ loadDsBorderData()

bool GmHdf5ModelReader::loadDsBorderData ( int dsIndex,
int dIndex,
const GmCellMesh * mesh,
int * data,
int * realNumCells ) const

Loads the cell+border data pair for either an edge or face list discontinuity set. The set is identified by its index inside the info->_dsList vector (where info is the MeshInfo structure returned by setCurrentMesh()). The discontinuity is identified by its index inside the _discData vector belonging to the discontinuity set.

The full data is stored at the provided data buffer, assuming that it has a size equal to info->_dcList[dcIndex]._discData[dIndex]._n1 * 2. Cell and border ids are checked by the function with the help of the mesh parameter. If the mesh was partitioned and some of the cell borders don't belong to the current partition, they will be removed from the set and the vector will be compacted. The realNumCells parameter will be filled with the effective number of borders for this partition. Returns false on errors.

IMPORTANT: Cell indices are translated with the current PCR object.

◆ loadDsCoordinateData()

bool GmHdf5ModelReader::loadDsCoordinateData ( int dsIndex,
int dIndex,
double * data ) const

Loads the coordinate data for either a polyline or a surface discontinuity set. The set is identified by its index inside the info->_dsList vector (where info is the MeshInfo structure returned by setCurrentMesh()). The discontinuity is identified by its index inside the _discData vector belonging to the discontinuity set.

The full data is stored at the provided data buffer, assuming that it has a size equal to info->_dcList[dcIndex]._discData[dIndex]._n1 * info->_dcList[dcIndex]._discData[dIndex]._n2 for a polyline data set and equal to info->_dcList[dcIndex]._discData[dIndex]._n1 * 3 for a surface data set. Returns false on errors.

◆ loadDsTriangleData()

bool GmHdf5ModelReader::loadDsTriangleData ( int dsIndex,
int dIndex,
int * data ) const

Loads the triangle incidences for a surface discontinuity set. The set is identified by its index inside the info->_dsList vector (where info is the MeshInfo structure returned by setCurrentMesh()). The discontinuity is identified by its index inside the _discData vector belonging to the discontinuity set.

The full data is stored at the provided data buffer, assuming that it has a size equal to info->_dcList[dcIndex]._discData[dIndex]._n2 * 3. Node ids are checked by the function. Returns false on errors.

◆ loadGeometryCellTopology()

bool GmHdf5ModelReader::loadGeometryCellTopology ( const QStringList & propertySetOrder,
const QVector< int > & propertySetSizes,
int * type,
int * propertySets,
int * nodes,
int * cellsPerType ) const

Loads cell definition data from the Geometry\CellTopology table from the current mesh set with setCurrentMesh(). Assumes that the vectors that will be filled with the data have the correct sizes. Notice that this size might be smaller than the values found in the MeshInfo structure, returned by setCurrentMesh() and detailed below (referenced as info on the description), if the mesh was partitioned. Returns false on errors.

IMPORTANT: Node indices are translated with the current PCR object. No translation is done regarding cell indices but their existence in the mesh is verified with the PCR object.

Parameters
propertySetOrder- A table with the names of the property sets in the same order as they should appear, per cell, in the propertySets vector. Should have the same size as info->_nPSets and the same contents (although possibly in a different order) as the info->_propertySetsDictionary table
propertySetSizes- A table with the sizes of the property sets, used for validation purposes. Sizes should be given in the same order as the sets appear at propertySetOrder.
type- Vector to be filled with cell types. Should have size equal to info->_nCells unless the mesh was partitioned. Values are validated by the reader.
propertySets- Vector to be filled with the per cell property indices, in the order defined by propertySetOrder. Should have size equal to info->_nCells * info->_nPSets unless the mesh was partitioned. Values are validated by the reader.
nodes- Vector to be filled with the per cell node indices. Should have size equal to info->_nCellNodes unless the mesh was partitioned. Values are validated by the reader.
cellsPerType- A vector with size equal to GM_NUM_CELL_TYPES that will be filled with the number of cells for each entries associated type.
Returns
Returns true on success, false on errors. Keep in mind that the table existence and its layout where already validated by the setCurrentMesh() call, so the only error possibilities are a read error or an invalid contents error.

◆ loadGeometryCoordinates()

bool GmHdf5ModelReader::loadGeometryCoordinates ( GmValueAccessor * coordAc,
GmValueAccessor * ghostAc ) const

Loads node coordinate data from the Geometry\NodeCoordinates table from the current mesh set with setCurrentMesh(). Assumes that the vectors that will be filled with the data through the given accessors have the correct sizes. Notice that this size might be smaller than the file table size if the mesh was partitioned. Returns false on errors.

Parameters
coordAc- Accessor to the vector to be filled with node coordinates for geometric nodes. Should have size equal to info->_nGeometryNodes * info->_d unless the mesh was partitioned. Can be NULL for not reading geometry nodes.
ghostAc- Accessor to the vector to be filled with node coordinates for ghost nodes. Should have size equal to info->_nGhostNodes * info->_d unless the mesh was partitioned. Can be NULL for not reading ghost nodes.
Returns
Returns true on success, false on errors. Keep in mind that the table existence and its layout where already validated by the setCurrentMesh() call, so the only error possibility is a read error.

◆ loadNodeData()

bool GmHdf5ModelReader::loadNodeData ( int attrIndex,
GmValueAccessor * ac ) const

Loads the attribute data associated with the given node accessor. The attribute is identified by its index inside the info->_nodeInitialData vector (where info is the MeshInfo structure returned by setCurrentMesh()). Assumes that the accessor associated value set has already been resized to the correct size. Also assumes that the accessor does NOT do any unit conversion.

If possible, the data is loaded directly into the associated value set data buffer. Otherwise, an auxiliar buffer is used to read the data and the standard accessor API used to set it. Either way, if the attribute contains function references, they will be automatically translated.

IMPORTANT: Node indices are translated with the current PCR object.

◆ loadNodeSetData()

bool GmHdf5ModelReader::loadNodeSetData ( int groupIndex,
int * data,
int * realNumNodes ) const

Loads into data the set of nodes belonging to the node set referenced by its index in the node set dictionary, info->_nodeSetsDictionary (where info is the MeshInfo structure returned by setCurrentMesh()). Expects the data vector to have size equal to info->_nodeSetsDictionary[groupIndex]._n. Node ids are validated by the reader. If the mesh was partitioned and some of the nodes don't belong to the current partition, they will be removed from the set and the vector will be compacted. The realNumNodes parameter will be filled with the effective number of nodes for this partition. Returns false on errors.

IMPORTANT: Node indices are translated with the current PCR object.


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