Skip to main content

Post-processing tools 2024 R2

dvs_element_block_interface

Last update: 16.07.2025
Go to the documentation of this file.
1/**************************************************************
2*
3* (C) 2022 ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited.
4*
5* Restricted Rights Legend
6*
7* Use, duplication, or disclosure of this
8* software and its documentation by the
9* Government is subject to restrictions as
10* set forth in subdivision [(b)(3)(ii)] of
11* the Rights in Technical Data and Computer
12* Software clause at 52.227-7013.
13*
14**************************************************************
15*/
16
24#ifndef ___DVS_ELEMENT_BLOCK_INTERFACE_H___
25#define ___DVS_ELEMENT_BLOCK_INTERFACE_H___
26
31
32namespace DVS
33{
34
52{
53public:
54
55 IElementBlock() = default;
56 virtual ~IElementBlock() = default;
59 IElementBlock(const IElementBlock&) = default;
61
68
78 virtual bool get_is_ghost() const = 0;
79
93 virtual dvs_ret get_num_variables(uint32_t& num_vars, VAR_TYPE type = VAR_TYPE::FLOAT) const = 0;
94
105 virtual const DVS::IVar* get_variable(uint32_t index, VAR_TYPE type = VAR_TYPE::FLOAT) const = 0;
106
121 virtual dvs_ret get_variable_size(uint32_t index, uint32_t& num_values, VAR_TYPE type = VAR_TYPE::FLOAT) const = 0;
122
136 virtual dvs_ret get_variable_size(const IVar* var, uint32_t& num_values) const = 0;
137
159 virtual dvs_ret get_variable_data(uint32_t index, float* array) const = 0;
160
182 virtual dvs_ret get_variable_data(uint32_t index, int64_t* array) const = 0;
183
203 virtual dvs_ret get_variable_data(const IVar* var, float* array) const = 0;
204
224 virtual dvs_ret get_variable_data(const IVar* var, int64_t* array) const = 0;
225
247 [[deprecated("Use dvs_ret get_variable_data(uint32_t index, float* array) instead.")]]
248 virtual dvs_ret get_variable_data(uint32_t index, uint32_t* num_values, float* array) = 0;
249
269 [[deprecated("Use dvs_ret get_variable_data(const IVar* var, float* array) instead.")]]
270 virtual dvs_ret get_variable_data(const IVar* var, uint32_t* num_values, float* array) = 0;
271
285 virtual dvs_ret get_nodes_per_element(uint32_t& nodes_per_element) const = 0;
286
293 virtual dvs_ret get_num_elements(uint32_t& num_elements) const = 0;
294
308 virtual dvs_ret get_connectivity_size(uint32_t& indices_size) = 0;
309
326 virtual dvs_ret get_connectivity(uint32_t* indices) = 0;
327
345 virtual dvs_ret get_connectivity_polygon_size(uint32_t& nodes_per_polygon_size, uint32_t& indices_size) = 0;
346
368 virtual dvs_ret get_connectivity_polygon(uint32_t* nodes_per_polygon, uint32_t* indices) = 0;
369
385 virtual dvs_ret get_connectivity_polyhedral_size(uint32_t& faces_per_element_size,
386 uint32_t& nodes_per_face_size,
387 uint32_t& indices_size) = 0;
388
413 virtual dvs_ret get_connectivity_polyhedral(uint32_t* faces_per_element,
414 uint32_t* nodes_per_face,
415 uint32_t* indices) = 0;
416};
417
418}//namespace DVS
419
420#endif //___DVS_ELEMENT_BLOCK_INTERFACE_H___
Element Block Interface for DVS Reader API.
virtual bool get_is_ghost() const =0
Get if this element block is composed of ghost elements.
virtual dvs_ret get_variable_data(uint32_t index, uint32_t *num_values, float *array)=0
Get the variable data on this mesh chunk by index.
virtual const DVS::IVar * get_variable(uint32_t index, VAR_TYPE type=VAR_TYPE::FLOAT) const =0
Get the variable definition associates with the elemental variable for this index.
virtual dvs_ret get_variable_size(const IVar *var, uint32_t &num_values) const =0
Get the variable size by variable.
virtual dvs_ret get_connectivity_polygon_size(uint32_t &nodes_per_polygon_size, uint32_t &indices_size)=0
Get the size of the connectivity arrays for polygon elements.
virtual dvs_ret get_connectivity_size(uint32_t &indices_size)=0
Get the size of the connectivity array.
virtual dvs_ret get_variable_data(uint32_t index, float *array) const =0
Get the variable data by index.
virtual dvs_ret get_variable_size(uint32_t index, uint32_t &num_values, VAR_TYPE type=VAR_TYPE::FLOAT) const =0
Get the variable size via the index and specified type.
IElementBlock(IElementBlock &&)=default
default
IElementBlock(const IElementBlock &)=default
support copying
virtual dvs_ret get_connectivity_polygon(uint32_t *nodes_per_polygon, uint32_t *indices)=0
Get the connectivity information for polygonal element blocks.
virtual ~IElementBlock()=default
default
virtual dvs_ret get_num_elements(uint32_t &num_elements) const =0
Get the number of elements for this block.
virtual dvs_ret get_connectivity(uint32_t *indices)=0
Get the connectivity for basic unstructured element types.
virtual dvs_ret get_num_variables(uint32_t &num_vars, VAR_TYPE type=VAR_TYPE::FLOAT) const =0
Get the number of elemental variables this element block has data for.
virtual dvs_ret get_connectivity_polyhedral_size(uint32_t &faces_per_element_size, uint32_t &nodes_per_face_size, uint32_t &indices_size)=0
Get size of the connectivity arrays for polyhedral elements.
virtual dvs_ret get_connectivity_polyhedral(uint32_t *faces_per_element, uint32_t *nodes_per_face, uint32_t *indices)=0
Get the connectivity information for polyhedral element blocks.
virtual dvs_ret get_variable_data(uint32_t index, int64_t *array) const =0
Get the variable data by index.
virtual dvs_ret get_nodes_per_element(uint32_t &nodes_per_element) const =0
Get the number of nodes per basic unstructured element.
IElementBlock & operator=(IElementBlock &&)=default
default
IElementBlock & operator=(const IElementBlock &)=default
default
virtual dvs_ret get_variable_data(const IVar *var, float *array) const =0
Get the variable data by variable.
virtual dvs_element_type get_element_type() const =0
Get the element type for this block.
virtual dvs_ret get_variable_data(const IVar *var, int64_t *array) const =0
Get the variable data by variable.
IElementBlock()=default
default
virtual dvs_ret get_variable_data(const IVar *var, uint32_t *num_values, float *array)=0
Get the variable data on this mesh chunk by by variable definition.
Interface to get hash information from DVS objects.
Interface to get variable hash information from DVS objects.
Interface for variables for the DVS Reader API.
DVS Reader API Hash Interface.
DVS Reader API Variable Hash Interface.
VAR_TYPE
Variable type enum definition.
Contains enums used in C/C++ API.
dvs_element_type
List of macro generated enums.
Contains errors used in the DVS C/C++ API.
int32_t dvs_ret
Return value of methods, TODO.

Connect with Ansys