#include <dvs_element_block_interface.h>
Inheritance diagram for DVS::IElementBlock:

Public Member Functions
Public Member Functions inherited from DVS::IHash
Public Member Functions inherited from DVS::IHash
Public Member Functions inherited from DVS::IHash
Public Member Functions inherited from DVS::IVarHash
Public Member Functions inherited from DVS::IVarHash
Public Member Functions inherited from DVS::IVarHash
Detailed Description
Element blocks contain the connectivity and variable data for elements. There is one element block per element type the mesh block has data available for. Note: Structured data’s connectivity is implicit and the element block only contains variable information for elements. Structured data is also different for ghost elements as the ghost elements are represented as an elemental variable instead of as an element block as unstructured data represents it. We might want to change this in future versions so structured data is better aligned with unstructured data in DVS but currently this is how the information is represented. See DVS::IHash and DVS::IVarHash for the hash object interface. Definition at line 51 of file dvs_element_block_interface.h.Member Function Documentation
get_connectivity()
pure virtual
Get the connectivity for basic unstructured element types.
This method returns the connectivity array for a basic unstructured element. If retrieving the indices array it should be of size indices_size returned from get_connectivity_size().
Error Codes:
- DVS_NONE: No error
- DVS_INVALID_ELEMENT_TYPE: This element block is not a basic unstructured type
- DVS_INVALID_CACHE: Loading cache failed, possibly invalid cache or invalid permissions
- DVS_DATA_FAILED_LOAD: There was a failure loading data, data is either empty or missing
Returns
dvs_ret DVS_NONE on no error, see the method documentation for errors
get_connectivity_polygon()
pure virtual
Get the connectivity information for polygonal element blocks.
This method returns the different connectivity arrays for polygonal elements. The size of the arrays to allocate should be retrieved through the method get_connectivity_polygon_size().
Polygonal elements are described by 2 arrays. nodes_per_polygon is the number of nodes for each element. indices is the connectivity array for each element. So a square might look like: nodes_per_polygon: [4] (of size 1) indices: [0, 1, 2, 3] (of size 4)
Error Codes:
- DVS_NONE: No error
- DVS_INVALID_ELEMENT_TYPE: This element block is not a basic unstructured type
- DVS_INVALID_CACHE: Loading cache failed, possibly invalid cache or invalid permissions
- DVS_DATA_FAILED_LOAD: There was a failure loading data, data is either empty or missing
Returns
dvs_ret DVS_NONE on no error, see the method documentation for errors
get_connectivity_polygon_size()
pure virtual
Get the size of the connectivity arrays for polygon elements.
This method returns the size of the connectivity arrays for polygon elements. This should be used to allocate array sizes for use with get_connectivity_polygon().
nodes_per_polygon_size is the total number of elements for this element type indices_size is the size of the total connectivity array
Error Codes:
- DVS_NONE: No error
- DVS_INVALID_ELEMENT_TYPE: This element block is not a basic unstructured type
Returns
dvs_ret DVS_NONE on no error, see the method documentation for errors
get_connectivity_polyhedral()
pure virtual
Get the connectivity information for polyhedral element blocks.
This method returns the different connectivity arrays for polyhedral elements. The size of the arrays to allocate should be retrieved through the method get_connectivity_polygon_size().
Polyhedral elements are described by 3 arrays. faces_per_element is the number of faces each individual element is made up of. Nodes per face is the number of nodes within each respective face. And the indices array of the connectivity of each face. So a cube might look like: faces_per_element: [6] (of size 1) nodes_per_face: [4,4,4,4,4,4] (of size 6) indices: [0,1,2,3 … ] (of size 24)
Error Codes:
- DVS_NONE: No error
- DVS_INVALID_ELEMENT_TYPE: This element block is not a basic unstructured type
- DVS_INVALID_CACHE: Loading cache failed, possibly invalid cache or invalid permissions
- DVS_DATA_FAILED_LOAD: There was a failure loading data, data is either empty or missing
Returns
dvs_ret DVS_NONE on no error, see the method documentation for errors
get_connectivity_polyhedral_size()
pure virtual
Get size of the connectivity arrays for polyhedral elements.
This method returns the size of the connectivity arrays for polyhedral elements. This should be used to allocate array sizes for use with get_connectivity_polyhedral().
Error Codes:
- DVS_NONE: No error
- DVS_INVALID_ELEMENT_TYPE: This element block is not a basic unstructured type
Returns
dvs_ret DVS_NONE on no error, see the method documentation for errors
get_connectivity_size()
pure virtual
Get the size of the connectivity array.
This method returns the size of the connectivity array in the param indices_size. This should be used to get the connectivity via get_connectivity()
Error Codes:
- DVS_NONE: No error
- DVS_INVALID_ELEMENT_TYPE: This element block is not a basic unstructured type
Returns
dvs_ret DVS_NONE on no error, see the method documentation for errors
get_element_type()
pure virtual
Get the element type for this block.
Returns
dvs_element_type the element type for this block
get_is_ghost()
pure virtual
Get if this element block is composed of ghost elements.
This method returns if the element block is composed of ghost elements. Note: This is only for unstructured data, structured data ghost elements are stored within an elemental variable (DVS_STRUCTURED_GHOST_ELEMENTS)
Returns
true if unstructured ghost elements
get_nodes_per_element()
pure virtual
Get the number of nodes per basic unstructured element.
This method is invalid for polygonal and polyhedral elements
Error Codes:
- DVS_NONE: No error
- DVS_INVALID_ELEMENT_TYPE: Returned for polygonal/polyhedral data
- DVS_UNKNOWN: Unknown new type, should not happen
Returns
dvs_ret DVS_NONE on no error, otherwise see method documentation
get_num_elements()
pure virtual
Get the number of elements for this block.
Parameters
Returns
dvs_ret DVS_NONE on no error
get_num_variables()
pure virtual
Get the number of elemental variables this element block has data for.
This method is intended to be used in conjunction with get_variable() and get_variable_data() to retrieve elemental variable data.
Errors:
- DVS_NONE: Success
Returns
DVS_NONE on success, else see method description
get_variable()
pure virtual
Get the variable definition associates with the elemental variable for this index.
This method retrieves the variable that is associated with the elemental variable of the mesh chunk at a specific index in range [0,get_num_variables()-1]
Parameters
Returns
DVS::IVar* nullptr if out of range, otherwise the variable associated with the index
get_variable_data() [1/6]
pure virtual
Get the variable data by variable.
This method retrieves the nodal variable data based on a specific variable definitions.
Error Codes:
- DVS_NONE: No error
- DVS_PARAM_INVALID_VAR: Bad (or null) variable object passed into method
- DVS_PARAM_INVALID_VAR_ID: Mesh chunk does not have data for var passed in.
- DVS_PARAM_NULL: All parameters are null. Method will do nothing.
- DVS_INVALID_CACHE: Cache is unable to be read. Bad location or permissions
- DVS_INVALID_HASH: Hash of variable data is invalid. There is a problem with the data
- DVS_DATA_FAILED_LOAD: Data hash in metadata is missing from blockstore. Bad cache or permissions?
Returns
dvs_ret DVS_NONE on no error, otherwise see method description
get_variable_data() [2/6]
pure virtual
Get the variable data by variable.
This method retrieves the nodal variable data based on a specific variable definitions.
Error Codes:
- DVS_NONE: No error
- DVS_PARAM_INVALID_VAR: Bad (or null) variable object passed into method
- DVS_PARAM_INVALID_VAR_ID: Mesh chunk does not have data for var passed in.
- DVS_PARAM_NULL: All parameters are null. Method will do nothing.
- DVS_INVALID_CACHE: Cache is unable to be read. Bad location or permissions
- DVS_INVALID_HASH: Hash of variable data is invalid. There is a problem with the data
- DVS_DATA_FAILED_LOAD: Data hash in metadata is missing from blockstore. Bad cache or permissions?
Returns
dvs_ret DVS_NONE on no error, otherwise see method description
get_variable_data() [3/6]
pure virtual
Get the variable data on this mesh chunk by by variable definition.
This method retrieves the elemental variable data based on a specific variable definitions.
Error Codes:
- DVS_NONE: No error
- DVS_PARAM_INVALID_VAR: Bad (or null) variable object passed into method
- DVS_PARAM_INVALID_VAR_ID: Mesh chunk does not have data for var passed in.
- DVS_PARAM_NULL: All parameters are null. Method will do nothing.
- DVS_INVALID_CACHE: Cache is unable to be read. Bad location or permissions
- DVS_INVALID_HASH: Hash of variable data is invalid. There is a problem with the data
- DVS_DATA_FAILED_LOAD: Data hash in metadata is missing from blockstore. Bad cache or permissions?
Returns
dvs_ret DVS_NONE on no error, otherwise see method description
get_variable_data() [4/6]
pure virtual
Get the variable data by index.
This method retrieves nodal variable data based on an index in range [0,get_num_variables()-1]. To retrieve the variable definition associated with the index call get_variable().
Error Codes:
- DVS_NONE: No error
- DVS_PARAM_NULL: All parameters are null. Method will do nothing.
- DVS_PARAM_OUT_OF_BOUNDS: Index out of bounds of [0, get_num_variables()-1]
- DVS_PARAM_INVALID_VAR: Invalid variable found at index, should not happen
- DVS_PARAM_INVALID_VAR_ID: Invalid variable id found at index, should not happen
- DVS_INVALID_CACHE: Cache is unable to be read. Bad location or permissions
- DVS_INVALID_HASH: Hash of variable data is invalid. There is a problem with the data
- DVS_DATA_FAILED_LOAD: Data hash in metadata is missing from blockstore. Bad cache or permissions?
Returns
dvs_ret DVS_NONE on no error, otherwise see method description
get_variable_data() [5/6]
pure virtual
Get the variable data by index.
This method retrieves nodal variable data based on an index in range [0,get_num_variables()-1]. To retrieve the variable definition associated with the index call get_variable().
Error Codes:
- DVS_NONE: No error
- DVS_PARAM_NULL: All parameters are null. Method will do nothing.
- DVS_PARAM_OUT_OF_BOUNDS: Index out of bounds of [0, get_num_variables()-1]
- DVS_PARAM_INVALID_VAR: Invalid variable found at index, should not happen
- DVS_PARAM_INVALID_VAR_ID: Invalid variable id found at index, should not happen
- DVS_INVALID_CACHE: Cache is unable to be read. Bad location or permissions
- DVS_INVALID_HASH: Hash of variable data is invalid. There is a problem with the data
- DVS_DATA_FAILED_LOAD: Data hash in metadata is missing from blockstore. Bad cache or permissions?
Returns
dvs_ret DVS_NONE on no error, otherwise see method description
get_variable_data() [6/6]
pure virtual
Get the variable data on this mesh chunk by index.
This method retrieves elemental variable data based on an index in range [0,get_num_variables()-1]. To retrieve the variable definition associated with the index call get_variable().
Error Codes:
- DVS_NONE: No error
- DVS_PARAM_NULL: All parameters are null. Method will do nothing.
- DVS_PARAM_OUT_OF_BOUNDS: Index out of bounds of [0, get_num_variables()-1]
- DVS_PARAM_INVALID_VAR: Invalid variable found at index, should not happen
- DVS_PARAM_INVALID_VAR_ID: Invalid variable id found at index, should not happen
- DVS_INVALID_CACHE: Cache is unable to be read. Bad location or permissions
- DVS_INVALID_HASH: Hash of variable data is invalid. There is a problem with the data
- DVS_DATA_FAILED_LOAD: Data hash in metadata is missing from blockstore. Bad cache or permissions?
Returns
dvs_ret DVS_NONE on no error, otherwise see method description
get_variable_size() [1/2]
pure virtual
Get the variable size by variable.
This method retrieves the nodal variable data size based on a specific variable definitions.
Error Codes:
- DVS_NONE: Success
- DVS_PARAM_INVALID_VAR: Bad (or null) variable object passed into method
Returns
dvs_ret DVS_NONE on no error, otherwise see method description
get_variable_size() [2/2]
pure virtual
Get the variable size via the index and specified type.
This method retrieves the variable’s size that is associated with the nodal variable of the mesh chunk at a specific index in range [0,get_num_variables()-1] and of the specified type
Errors:
- DVS_NONE: Success
Returns
dvs_ret DVS_NONE on no error, otherwise see method description
The documentation for this class was generated from the following file:
- D:/ANSYSDev/Product-src/ensight/user_defined_src/readers/dvs/include/dvs_element_block_interface.h