Skip to main content

Post-processing tools 2025 R1

DVS::IMeshChunk Class Reference

Last update: 16.07.2025

#include <dvs_mesh_chunk_interface.h>

Inheritance diagram for DVS::IMeshChunk:
DVS::IHashDVS::IVarHash

Public Types

enum  MeshType { UNKNOWN = 0 , UNSTRUCTURED = 1 , PARALLELEPIPED = 2 , CURVILINEAR = 3 }
 
enum  Axis { X = 0 , Y = 1 , Z = 2 }
 

Public Member Functions

 IMeshChunk ()=default
 
virtual ~IMeshChunk ()=default
 
 IMeshChunk (IMeshChunk &&)=default
 
IMeshChunkoperator= (IMeshChunk &&)=default
 
 IMeshChunk (const IMeshChunk &)=default
 
IMeshChunkoperator= (const IMeshChunk &)=default
 
virtual MeshType get_type () const =0
 
virtual const DVS::IObjectget_object () const =0
 
virtual float get_time () const =0
 
virtual uint32_t get_rank () const =0
 
virtual uint32_t get_chunk () const =0
 
virtual dvs_ret get_coords_size (uint32_t &component_size)=0
 
virtual dvs_ret get_coords (float *x_coords, float *y_coords, float *z_coords)=0
 
virtual dvs_ret get_coords_interleaved (float *coords)=0
 
virtual dvs_ret get_coords_curv_size (uint32_t &component_size)=0
 
virtual dvs_ret get_coords_curv (float local_ijk_min[3], float local_ijk_max[3], float global_ijk_max[3], float *x_coords, float *y_coords, float *z_coords)=0
 
virtual dvs_ret get_coords_curv_interleaved (float local_ijk_min[3], float local_ijk_max[3], float global_ijk_max[3], float *coords)=0
 
virtual dvs_ret get_coords_parallele_size (uint32_t &i_vals_size, uint32_t &j_vals_size, uint32_t &k_vals_size)=0
 
virtual dvs_ret get_coords_parallele (float origin[3], float dir_vec_i[3], float dir_vec_j[3], float dir_vec_k[3], float local_ijk_min[3], float local_ijk_max[3], float global_ijk_max[3], float *i_vals, float *j_vals, float *k_vals)=0
 
virtual dvs_ret get_num_variables (uint32_t &num_vars, VAR_TYPE type=VAR_TYPE::FLOAT) const =0
 
virtual const DVS::IVarget_variable (uint32_t index, VAR_TYPE type=VAR_TYPE::FLOAT) const =0
 
virtual dvs_ret get_variable_size (uint32_t index, uint32_t &num_values, VAR_TYPE type=VAR_TYPE::FLOAT) const =0
 
virtual dvs_ret get_variable_size (const IVar *var, uint32_t &num_values) const =0
 
virtual dvs_ret get_variable_data (uint32_t index, float *array) const =0
 
virtual dvs_ret get_variable_data (uint32_t index, int64_t *array) const =0
 
virtual dvs_ret get_variable_data (const IVar *var, float *array) const =0
 
virtual dvs_ret get_variable_data (const IVar *var, int64_t *array) const =0
 
virtual dvs_ret get_variable_data (uint32_t index, uint32_t *num_values, float *array)=0
 
virtual dvs_ret get_variable_data (const IVar *var, uint32_t *num_values, float *array)=0
 
virtual dvs_ret get_num_element_blocks (uint32_t &num_elem_blocks) const =0
 
virtual dvs_ret get_element_block_types (dvs_element_type *element_types) const =0
 
virtual DVS::IElementBlockget_element_block (uint32_t index)=0
 
virtual DVS::IElementBlockget_element_block_by_type (dvs_element_type type)=0
 
- Public Member Functions inherited from DVS::IHash
 IHash ()=default
 
virtual ~IHash ()=default
 
 IHash (IHash &&)=default
 
IHashoperator= (IHash &&)=default
 
 IHash (const IHash &)=default
 
IHashoperator= (const IHash &)=default
 
virtual uint32_t get_hash_size () const =0
 
virtual dvs_ret get_hash (char *hash) const =0
 
- Public Member Functions inherited from DVS::IVarHash
 IVarHash ()=default
 
virtual ~IVarHash ()=default
 
 IVarHash (IVarHash &&)=default
 
IVarHashoperator= (IVarHash &&)=default
 
 IVarHash (const IVarHash &)=default
 
IVarHashoperator= (const IVarHash &)=default
 
virtual uint32_t get_var_hash_size (uint32_t index, VAR_TYPE type=VAR_TYPE::FLOAT) const =0
 
virtual uint32_t get_var_hash_size (const IVar *var) const =0
 
virtual dvs_ret get_var_hash (uint32_t index, char *hash, VAR_TYPE type=VAR_TYPE::FLOAT) const =0
 
virtual dvs_ret get_var_hash (const IVar *var, char *hash) const =0
 

Detailed Description

A mesh chunk in DVS contains the underlying mesh coordinates and nodal variable information for a specific timestep/rank/chunk. It also is the parent object for IElementBlock objects which contain the element / connectivity information. Mesh chucks can be unstructured or structured (paralellepiped or curvilinear). See DVS::IHash and DVS::IVarHash for the hash object interface.

Definition at line 48 of file dvs_mesh_chunk_interface.h.

Member Enumeration Documentation

◆ Axis

The AXIS or IJK component to request.

Enumerator

The X axis (or i component for structured parts)

The X axis (or j component for structured parts)

The Z axis (or k component for structured parts)

Definition at line 75 of file dvs_mesh_chunk_interface.h.

◆ MeshType

The different mesh types allowed.

Enumerator
UNKNOWN 

Unknown, a problem occurred.

UNSTRUCTURED 

Unstructured mesh data.

PARALLELEPIPED 

Parallelepiped structured mesh data.

CURVILINEAR 

Curvilinear structured mesh data.

Definition at line 63 of file dvs_mesh_chunk_interface.h.

Member Function Documentation

◆ get_chunk()

virtual uint32_t DVS::IMeshChunk::get_chunk ( ) const
pure virtual

Get the chunk for this mesh chunk.

Returns
uint32_t the chunk this mesh chunk is associated with (zero based)

◆ get_coords()

virtual dvs_ret DVS::IMeshChunk::get_coords ( float * x_coords,
float * y_coords,
float * z_coords )
pure virtual

Get the coordinates for an unstructured mesh.

Retrieves the coordinates for an unstructured mesh. To get the coordinates interleaved in a single array call get_coords_interleaved().

Errors:

  • DVS_NO_DATA: No data for this mesh, not an error
  • DVS_PARAM_NULL: nullptr passed into method, method did nothing
  • DVS_INVALID_MESH_TYPE: Mesh type is not DVS::IMeshChunk::MeshType::UNSTRUCTURED
  • 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
  • DVS_INVALID_HASH: Hash of variable data is invalid. There is a problem with the data.
Parameters
[out]x_coordsoutput array for x coordinates (must not be nullptr) size to allocate from get_coords_size()
[out]y_coordsoutput array for y coordinates (must not be nullptr) size to allocate from get_coords_size()
[out]z_coordsoutput array for z coordiantes (must not be nullptr) size to allocate from get_coords_size()
Returns
dvs_ret DVS_NONE on success, see method documentation for errors

◆ get_coords_curv()

virtual dvs_ret DVS::IMeshChunk::get_coords_curv ( float local_ijk_min[3],
float local_ijk_max[3],
float global_ijk_max[3],
float * x_coords,
float * y_coords,
float * z_coords )
pure virtual

Get coordinate data for a structured curvilinear mesh.

Structured curvilinear meshes have the XYZ information for every node in the IJK array for flexibility in defining the nodes. The connectivity for the mesh is implied so there are no connectivity arrays in the DVS::IElemBlock. If you'd like the XYZ coordinates interleaved in a single array call get_coords_curv_interleaved().

Errors:

  • DVS_NO_DATA: No data for this mesh, not an error
  • DVS_PARAM_NULL: nullptr passed into method, method did nothing
  • DVS_INVALID_MESH_TYPE: Mesh type is not DVS::IMeshChunk::MeshType::CURVILINEAR
  • 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
  • DVS_INVALID_HASH: Hash of variable data is invalid. There is a problem with the data.
  • DVS_INVALID_STRUCTURED_DATA: Invalid structured data. There is a problem with the data.
Parameters
[out]local_ijk_minarray of size 3, returns 0 based ijk min for this chunk
[out]local_ijk_maxarray of size 3, returns 0 based ijk max for this chunk
[out]global_ijk_maxarray of size 3, returns 1 based global ijk max, this is the total ijk dimension across all mesh chunks
[out]x_coordsoutput array for x coordinates (must not be nullptr) size to allocate from get_coords_curv_size()
[out]y_coordsoutput array for y coordinates (must not be nullptr) size to allocate from get_coords_curv_size()
[out]z_coordsoutput array for z coordinates (must not be nullptr) size to allocate from get_coords_curv_size()
Returns
dvs_ret DVS_NONE on success, see method documentation for errors

◆ get_coords_curv_interleaved()

virtual dvs_ret DVS::IMeshChunk::get_coords_curv_interleaved ( float local_ijk_min[3],
float local_ijk_max[3],
float global_ijk_max[3],
float * coords )
pure virtual

Get the coords for structured curvilinear meshes interleaved in a single array.

Structured curvilinear meshes have the XYZ information for every node in the IJK array for flexibility in defining the nodes. The connectivity for the mesh is implied so there are no connectivity arrays in the DVS::IElemBlock. This method returns the XYZ coordinates interleaved in a single array of the format [X0 Y0 Z0 X1 Y1 Z1]. If you'd like the XYZ coordinates in separate x,y,z arrays call get_coords_curv().

Errors:

  • DVS_NO_DATA: No data for this mesh, not an error
  • DVS_PARAM_NULL: nullptr passed into method, method did nothing
  • DVS_INVALID_MESH_TYPE: Mesh type is not DVS::IMeshChunk::MeshType::CURVILINEAR
  • 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
  • DVS_INVALID_HASH: Hash of variable data is invalid. There is a problem with the data.
  • DVS_INVALID_STRUCTURED_DATA: Invalid structured data. There is a problem with the data.
Parameters
[out]local_ijk_minarray of size 3, returns 0 based ijk min for this chunk
[out]local_ijk_maxarray of size 3, returns 0 based ijk max for this chunk
[out]global_ijk_maxarray of size 3, returns 1 based global ijk max, this is the total ijk dimension across all mesh chunks
[out]coordsoutput array of interleaved coords for form [X0 Y0 Z0 X1 Y0 Z0] size to allocate component_size*3 from get_coords_size()
Returns
dvs_ret DVS_NONE on success, see method documentation for errors

◆ get_coords_curv_size()

virtual dvs_ret DVS::IMeshChunk::get_coords_curv_size ( uint32_t & component_size)
pure virtual

Get the size of each coordinate component for structured curvilinear meshes.

Returns the size of each component of a curvilinear mesh. This is used with the method get_coords_curv(). For get_coords_curv_interleaved() use the size component_size*3 to allocate the array.

Errors:

  • DVS_NO_DATA: No data for this mesh, not an error
  • DVS_INVALID_MESH_TYPE: Mesh type is not DVS::IMeshChunk::MeshType::CURVILINEAR
  • DVS_INVALID_STRUCTURED_DATA: Structured data is invalid, should not happen
Parameters
[out]component_sizethe size of each x/y/z coordinate components
Returns
dvs_ret DVS_NONE on success, see method documentation for errors

◆ get_coords_interleaved()

virtual dvs_ret DVS::IMeshChunk::get_coords_interleaved ( float * coords)
pure virtual

Get the coords for a unstructured meshes interleaved in a single array.

Retrieves the coordinates for an unstructured mesh interleaved ([X0 Y0 Z0 X1 Y1 Z1]) instead of as separate X Y Z arrays as the method get_coords() returns. The coords array should be of size component_size*3 returned from get_coords_size().

Errors:

  • DVS_NO_DATA: No data for this mesh, not an error
  • DVS_PARAM_NULL: nullptr passed into method, method did nothing
  • DVS_INVALID_MESH_TYPE: Mesh type is not DVS::IMeshChunk::MeshType::UNSTRUCTURED
  • 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
  • DVS_INVALID_HASH: Hash of variable data is invalid. There is a problem with the data.
    Parameters
    [out]coordsoutput array of interleaved coords for form [X0 Y0 Z0 X1 Y0 Z0] size to allocate component_size*3 from get_coords_size()
    Returns
    dvs_ret DVS_NONE on success, see method documentation for errors

◆ get_coords_parallele()

virtual dvs_ret DVS::IMeshChunk::get_coords_parallele ( float origin[3],
float dir_vec_i[3],
float dir_vec_j[3],
float dir_vec_k[3],
float local_ijk_min[3],
float local_ijk_max[3],
float global_ijk_max[3],
float * i_vals,
float * j_vals,
float * k_vals )
pure virtual

Get the ijk mesh information for structured parallelepiped mesh chunks.

Retrieves the mesh information for a structured parallelepiped mush chunk. Parallelepiped structured meshes are described by an origin, XYZ direction vectors for each dimension and the amount of distance between the origin at each I, K and K increment. To get the size to allocate for i_vals, j_vals, and k_vals call get_coords_parallele_size().

Errors:

  • DVS_NO_DATA: No data for this mesh, not an error
  • DVS_PARAM_NULL: nullptr passed into method, method did nothing
  • DVS_INVALID_MESH_TYPE: Mesh type is not DVS::IMeshChunk::MeshType::CURVILINEAR
  • 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
  • DVS_INVALID_HASH: Hash of variable data is invalid. There is a problem with the data.
  • DVS_INVALID_STRUCTURED_DATA: Invalid structured data. There is a problem with the data.
Parameters
[out]originThe XYZ origin of the mesh
[out]dir_vec_iarray of size 3, returns the XYZ direction vector for I dimension
[out]dir_vec_jarray of size 3, returns the XYZ direction vector for J dimension
[out]dir_vec_karray of size 3, returns the XYZ direction vector for K dimension
[out]local_ijk_minarray of size 3, returns 0 based ijk min for this chunk
[out]local_ijk_maxarray of size 3, returns 0 based ijk max for this chunk
[out]global_ijk_maxarray of size 3, returns 1 based global ijk max, this is the total ijk dimension across all mesh chunks
[out]i_valsthe distance at each I increment from the origin size to allocate from get_coords_parallele_size()
[out]j_valsthe distance at each J increment from the origin size to allocate from get_coords_parallele_size()
[out]k_valsthe distance at each K increment from the origin size to allocate from get_coords_parallele_size()
Returns
dvs_ret DVS_NONE on success, see method documentation for errors

◆ get_coords_parallele_size()

virtual dvs_ret DVS::IMeshChunk::get_coords_parallele_size ( uint32_t & i_vals_size,
uint32_t & j_vals_size,
uint32_t & k_vals_size )
pure virtual

Get the size of each ijk component for structured parallelpiped meshes.

Returns the size of each component of a parallelpiped mesh. This is used with the method get_coords_parallele(). Use the sizes returned to allocate the arrays for get_coords_parallele().

Errors:

  • DVS_NO_DATA: No data for this mesh, not an error
  • DVS_INVALID_MESH_TYPE: Mesh type is not DVS::IMeshChunk::MeshType::CURVILINEAR
  • DVS_INVALID_STRUCTURED_DATA: Structured data is invalid, There is a problem with the data.
Parameters
i_vals_sizesize of the i dimension array to allocate for get_coords_parallele()
j_vals_sizesize of the j dimension array to allocate for get_coords_parallele()
k_vals_sizesize of the k dimension array to allocate for get_coords_parallele()
Returns
dvs_ret DVS_NONE on success, see method documentation for errors

◆ get_coords_size()

virtual dvs_ret DVS::IMeshChunk::get_coords_size ( uint32_t & component_size)
pure virtual

Get the size of each coordinate component for unstructured meshes.

Used for unstructured meshes. Returns the size of each x/y/z coordinate array to be used with get_coords() or component_size*3 for get_coords_interleaved().

Errors:

Parameters
[out]component_sizethe size of each x/y/z coordinate components
Returns
dvs_ret DVS_NONE on no error, see method documentation for errors

◆ get_element_block()

virtual DVS::IElementBlock * DVS::IMeshChunk::get_element_block ( uint32_t index)
pure virtual

Get the element block by index.

Get the element block according to it's index in the mesh chunk. This range is from [0, get_num_element_blocks()-1]. Every mesh chunk has a number of element blocks for each element type it has data for.

Parameters
[in]indexthe zero based index of the element block range: [0, get_num_element_blocks()-1]
Returns
DVS::IElementBlock* nullptr if index is out of bounds, otherwise the element block

◆ get_element_block_by_type()

virtual DVS::IElementBlock * DVS::IMeshChunk::get_element_block_by_type ( dvs_element_type type)
pure virtual

Get the element block by element type.

Get the element block by dvs_element_type from this mesh chunk, the valid types for this mesh chunk may be obtained via the method get_element_block_types().

Every mesh chunk has an element block for each element type it has data available for. These types are defined by the enum dvs_element_type in dynamic_visualization_store_enums.h with a macro FOREACH_ELEM_ENUM.

Parameters
[in]typethe type of element block to retrieve
Returns
DVS::IElementBlock* nullptr if invalid, otherwise the element block

◆ get_element_block_types()

virtual dvs_ret DVS::IMeshChunk::get_element_block_types ( dvs_element_type * element_types) const
pure virtual

Get an array of the element block types for this mesh chunk.

This returns an array of dvs_element_type for every block this mesh chunk contains. These types are defined by the enum dvs_element_type in dynamic_visualization_store_enums.h with a macro FOREACH_ELEM_ENUM.

Parameters
[out]element_typesan array of size get_num_element_blocks() to fill out
Returns
dvs_ret DVS_NONE on no errors, DVS_PARAM_NULL if element types nullptr

◆ get_num_element_blocks()

virtual dvs_ret DVS::IMeshChunk::get_num_element_blocks ( uint32_t & num_elem_blocks) const
pure virtual

Get the number of element blocks for this mesh chunk.

Every mesh chunk has an element block for each element type it has data available for. These types are defined by the enum dvs_element_type in dynamic_visualization_store_enums.h with a macro FOREACH_ELEM_ENUM.

Errors:

  • DVS_NONE: Success
Parameters
[out]num_elem_blocksif success, returns number of element blocks for this mesh chunk
Returns
DVS_NONE on success, else see method description

◆ get_num_variables()

virtual dvs_ret DVS::IMeshChunk::get_num_variables ( uint32_t & num_vars,
VAR_TYPE type = VAR_TYPE::FLOAT ) const
pure virtual

Get the number of nodal variables this mesh chunk has data for, based on the specified type.

This method is intended to be used in conjunction with get_variable() and get_variable_data() to retrieve nodal variable data.

Errors:

  • DVS_NONE: Success
Parameters
[out]num_varsif success, returns the number of nodal variables for this mesh chunk
[in]typeThe enum type. By default, VAR_TYPE::FLOAT
Returns
dvs_ret DVS_NONE if success, else see method description

◆ get_object()

virtual const DVS::IObject * DVS::IMeshChunk::get_object ( ) const
pure virtual

Get the object definiton this mesh chunk is associated with.

Returns
const DVS::IObject* the object definition

◆ get_rank()

virtual uint32_t DVS::IMeshChunk::get_rank ( ) const
pure virtual

Get the rank for the mesh chunk.

Returns
uint32_t the rank this mesh chunk is associated with (zero based)

◆ get_time()

virtual float DVS::IMeshChunk::get_time ( ) const
pure virtual

Get the time for this mesh chunk.

Returns
float the time this mesh chunk is associated with

◆ get_type()

virtual MeshType DVS::IMeshChunk::get_type ( ) const
pure virtual

Get the type of mesh chunk.

Returns
MeshType the type of mesh

◆ get_variable()

virtual const DVS::IVar * DVS::IMeshChunk::get_variable ( uint32_t index,
VAR_TYPE type = VAR_TYPE::FLOAT ) const
pure virtual

Get the variable definition associates with the nodal variable for this index and the specified type.

This method retrieves the variable 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

Parameters
[in]indexindex of variable definition to get in range [0, get_num_variables()-1]
[in]typeThe enum type. By default, VAR_TYPE::FLOAT
Returns
DVS::IVar* nullptr if out of range, otherwise the variable associated with the index

◆ get_variable_data() [1/6]

virtual dvs_ret DVS::IMeshChunk::get_variable_data ( const IVar * var,
float * array ) const
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?
Parameters
[in]varthe variable definition to retrieve nodal variable data for
[out]arrayan array whose size should be returned from get_variable_size(). Overloaded for float and int64.
Returns
dvs_ret DVS_NONE on no error, otherwise see method description

◆ get_variable_data() [2/6]

virtual dvs_ret DVS::IMeshChunk::get_variable_data ( const IVar * var,
int64_t * array ) const
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?
Parameters
[in]varthe variable definition to retrieve nodal variable data for
[out]arrayan array whose size should be returned from get_variable_size(). Overloaded for float and int64.
Returns
dvs_ret DVS_NONE on no error, otherwise see method description

◆ get_variable_data() [3/6]

virtual dvs_ret DVS::IMeshChunk::get_variable_data ( const IVar * var,
uint32_t * num_values,
float * array )
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?
Parameters
[in]varthe variable definition to retrieve nodal variable data for
[out]num_valuesif not nullptr returns the number of values to allocate for array
[out]arrayif not nullptr should be of size num_values
Returns
dvs_ret DVS_NONE on no error, otherwise see method description

◆ get_variable_data() [4/6]

virtual dvs_ret DVS::IMeshChunk::get_variable_data ( uint32_t index,
float * array ) const
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?
Parameters
[in]indexindex of the variable data in range [0,get_num_variables()-1]
[out]arrayan array whose size should be returned from get_variable_size(). Overloaded for float and int64.
Returns
dvs_ret DVS_NONE on no error, otherwise see method description

◆ get_variable_data() [5/6]

virtual dvs_ret DVS::IMeshChunk::get_variable_data ( uint32_t index,
int64_t * array ) const
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?
Parameters
[in]indexindex of the variable data in range [0,get_num_variables()-1]
[out]arrayan array whose size should be returned from get_variable_size(). Overloaded for float and int64.
Returns
dvs_ret DVS_NONE on no error, otherwise see method description

◆ get_variable_data() [6/6]

virtual dvs_ret DVS::IMeshChunk::get_variable_data ( uint32_t index,
uint32_t * num_values,
float * array )
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?
Parameters
[in]indexindex of the variable data in range [0,get_num_variables()-1]
[out]num_valuesif not nullptr returns the number of values to allocate for array
[out]arrayif not nullptr must be of size num_values
Returns
dvs_ret DVS_NONE on no error, otherwise see method description

◆ get_variable_size() [1/2]

virtual dvs_ret DVS::IMeshChunk::get_variable_size ( const IVar * var,
uint32_t & num_values ) const
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
Parameters
[in]varthe variable definition to retrieve nodal variable data for
[out]num_valuesa reference to a uint32_t, representing the number of values of the variable
Returns
dvs_ret DVS_NONE on no error, otherwise see method description

◆ get_variable_size() [2/2]

virtual dvs_ret DVS::IMeshChunk::get_variable_size ( uint32_t index,
uint32_t & num_values,
VAR_TYPE type = VAR_TYPE::FLOAT ) const
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
Parameters
[in]indexindex of variable definition to get in range [0, get_num_variables()-1]
[out]num_valuesa reference to a uint32_t, representing the number of values of the variable
[in]typethe enum type. By default, VAR_TYPE::FLOAT
Returns
dvs_ret DVS_NONE if success, else see method description

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

Connect with Ansys