> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# DVS::IElementBlock Class Reference

Element Block Interface for DVS Reader API.

`#include <dvs_element_block_interface.h>`

Inheritance diagram for DVS::IElementBlock:

![](https://mintcdn.com/synopsys-00a47cbc/Srh1_f--TdKCLyqD/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_element_block.png?fit=max\&auto=format\&n=Srh1_f--TdKCLyqD\&q=85\&s=2acc552c5dd78142ed05fcb5d3da5c86)

## Public Member Functions

| Type | Name |
| - | - |
| | **IElementBlock** ()=default default |
|  virtual | **\~IElementBlock** ()=default default |
| | **IElementBlock** ([IElementBlock](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_element_block.md) &&)=default default |
| [IElementBlock](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_element_block.md) & | **operator=** ([IElementBlock](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_element_block.md) &&)=default default |
| | **IElementBlock** (const [IElementBlock](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_element_block.md) &)=default support copying |
| [IElementBlock](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_element_block.md) & | **operator=** (const [IElementBlock](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_element_block.md) &)=default default |
| virtual [dvs\_element\_type](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__enums_8h.md#af1c8824b29a0ab747460216716cc2895) | [get\_element\_type](#aebec4b30e0b8dcb53b4b34305fa0d61e) () const =0 Get the element type for this block. |
| virtual bool | [get\_is\_ghost](#a01c36edfb491803556b3f30483339d26) () const =0 Get if this element block is composed of ghost elements. |
| virtual [dvs\_ret](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__error__codes_8h.md#a1d7466ae72e89fe36cbf2408b4f7d9c1) | [get\_num\_variables](#a8c8e7ec1c08a472a4dcfa56cd69568d3) (uint32\_t \&num\_vars, [VAR\_TYPE](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dvs__var__interface_8h.md#a84856d33cb231d1d87a603758b8b8066) type=VAR\_TYPE::FLOAT) const =0 Get the number of elemental variables this element block has data for. |
| virtual const [DVS::IVar](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_var.md) \* | [get\_variable](#a16ed2ca6ad45b9ffb78002f95cfbf0e5) (uint32\_t index, [VAR\_TYPE](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dvs__var__interface_8h.md#a84856d33cb231d1d87a603758b8b8066) type=VAR\_TYPE::FLOAT) const =0 Get the variable definition associates with the elemental variable for this index. |
| virtual [dvs\_ret](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__error__codes_8h.md#a1d7466ae72e89fe36cbf2408b4f7d9c1) | [get\_variable\_size](#a452ed02842ece58d57c2abba34bd66ab) (uint32\_t index, uint32\_t \&num\_values, [VAR\_TYPE](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dvs__var__interface_8h.md#a84856d33cb231d1d87a603758b8b8066) type=VAR\_TYPE::FLOAT) const =0 Get the variable size via the index and specified type. |
| virtual [dvs\_ret](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__error__codes_8h.md#a1d7466ae72e89fe36cbf2408b4f7d9c1) | [get\_variable\_size](#a1c24a51dcdd6053e1b506aa5e61d79e5) (const [IVar](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_var.md) \*var, uint32\_t \&num\_values) const =0 Get the variable size by variable. |
| virtual [dvs\_ret](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__error__codes_8h.md#a1d7466ae72e89fe36cbf2408b4f7d9c1) | [get\_variable\_data](#a3e7a946f3e97334f2a2ec72fd23e0e6e) (uint32\_t index, float \*array) const =0 Get the variable data by index. |
| virtual [dvs\_ret](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__error__codes_8h.md#a1d7466ae72e89fe36cbf2408b4f7d9c1) | [get\_variable\_data](#ab60ef11cb6c4991c62fe59f71ad6bc78) (uint32\_t index, int64\_t \*array) const =0 Get the variable data by index. |
| virtual [dvs\_ret](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__error__codes_8h.md#a1d7466ae72e89fe36cbf2408b4f7d9c1) | [get\_variable\_data](#ad5c88d1a1d172caedabe84a8f302b9f2) (const [IVar](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_var.md) \*var, float \*array) const =0 Get the variable data by variable. |
| virtual [dvs\_ret](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__error__codes_8h.md#a1d7466ae72e89fe36cbf2408b4f7d9c1) | [get\_variable\_data](#aef1f01f7fd80effeeb12af064c751f01) (const [IVar](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_var.md) \*var, int64\_t \*array) const =0 Get the variable data by variable. |
| virtual [dvs\_ret](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__error__codes_8h.md#a1d7466ae72e89fe36cbf2408b4f7d9c1) | [get\_variable\_data](#a0bc52709b9440da6848d2b18751f51f4) (uint32\_t index, uint32\_t \*num\_values, float \*array)=0 Get the variable data on this mesh chunk by index. |
| virtual [dvs\_ret](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__error__codes_8h.md#a1d7466ae72e89fe36cbf2408b4f7d9c1) | [get\_variable\_data](#aff20dc24794c5dfdfe009fce86f79659) (const [IVar](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_var.md) \*var, uint32\_t \*num\_values, float \*array)=0 Get the variable data on this mesh chunk by by variable definition. |
| virtual [dvs\_ret](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__error__codes_8h.md#a1d7466ae72e89fe36cbf2408b4f7d9c1) | [get\_nodes\_per\_element](#ab95989900765aabb0eccefbe8c25fedd) (uint32\_t \&nodes\_per\_element) const =0 Get the number of nodes per basic unstructured element. |
| virtual [dvs\_ret](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__error__codes_8h.md#a1d7466ae72e89fe36cbf2408b4f7d9c1) | [get\_num\_elements](#a74e15d2c0471232fca5dda950cd5dcbb) (uint32\_t \&num\_elements) const =0 Get the number of elements for this block. |
| virtual [dvs\_ret](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__error__codes_8h.md#a1d7466ae72e89fe36cbf2408b4f7d9c1) | [get\_connectivity\_size](#a310ce04445517dd10942e7ba224ac75d) (uint32\_t \&indices\_size)=0 Get the size of the connectivity array. |
| virtual [dvs\_ret](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__error__codes_8h.md#a1d7466ae72e89fe36cbf2408b4f7d9c1) | [get\_connectivity](#a78959ba4b322598b6bb31fc205c0d3b7) (uint32\_t \*indices)=0 Get the connectivity for basic unstructured element types. |
| virtual [dvs\_ret](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__error__codes_8h.md#a1d7466ae72e89fe36cbf2408b4f7d9c1) | [get\_connectivity\_polygon\_size](#a21ddc1624e91860b6dd37c25d7bd333f) (uint32\_t \&nodes\_per\_polygon\_size, uint32\_t \&indices\_size)=0 Get the size of the connectivity arrays for polygon elements. |
| virtual [dvs\_ret](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__error__codes_8h.md#a1d7466ae72e89fe36cbf2408b4f7d9c1) | [get\_connectivity\_polygon](#a6b03d65937d395bbf9819e15b9c83288) (uint32\_t \*nodes\_per\_polygon, uint32\_t \*indices)=0 Get the connectivity information for polygonal element blocks. |
| virtual [dvs\_ret](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__error__codes_8h.md#a1d7466ae72e89fe36cbf2408b4f7d9c1) | [get\_connectivity\_polyhedral\_size](#aa9bc1541ae8c5114f133122dbbb247cd) (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](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__error__codes_8h.md#a1d7466ae72e89fe36cbf2408b4f7d9c1) | [get\_connectivity\_polyhedral](#ab47ae0f50ceab792a872a47a867134e5) (uint32\_t \*faces\_per\_element, uint32\_t \*nodes\_per\_face, uint32\_t \*indices)=0 Get the connectivity information for polyhedral element blocks. |

> [accordion] Public Member Functions inherited from DVS::IHash
>
> Public Member Functions inherited from [DVS::IHash](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_hash.md)
>
> | Type | Name |
> | - | - |
> | | **IHash** ()=default default |
> | virtual | **\~IHash** ()=default default |
> | | **IHash** ([IHash](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_hash.md) &&)=default default |
> | [IHash](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_hash.md) & | **operator=** ([IHash](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_hash.md) &&)=default default |
> | | **IHash** (const [IHash](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_hash.md) &)=default support copying |
> | [IHash](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_hash.md) & | **operator=** (const [IHash](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_hash.md) &)=default default |
> | virtual uint32\_t | [get\_hash\_size](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_hash.md#ac0dedeb8d9dfd442d49d16cb4ddfb221) () const =0 Get the size of the hash to use with [IHash::get\_hash()](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_hash.md#a51eaee86a6e2db4dda7f4326daa33874) |
> | virtual [dvs\_ret](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__error__codes_8h.md#a1d7466ae72e89fe36cbf2408b4f7d9c1) | [get\_hash](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_hash.md#a51eaee86a6e2db4dda7f4326daa33874) (char \*hash) const =0 Get the hash of the data. |

> [accordion] Public Member Functions inherited from DVS::IVarHash
>
> Public Member Functions inherited from [DVS::IVarHash](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_var_hash.md)
>
> | Type | Name |
> | - | - |
> | | **IVarHash** ()=default default |
> | virtual | **\~IVarHash** ()=default default |
> | | **IVarHash** ([IVarHash](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_var_hash.md) &&)=default default |
> | [IVarHash](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_var_hash.md) & | **operator=** ([IVarHash](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_var_hash.md) &&)=default default |
> | | **IVarHash** (const [IVarHash](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_var_hash.md) &)=default support copying |
> | [IVarHash](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_var_hash.md) & | **operator=** (const [IVarHash](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_var_hash.md) &)=default default |
> | virtual uint32\_t | [get\_var\_hash\_size](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_var_hash.md#a85c3ade756029207e15b1c8de8cd5c1b) (uint32\_t index, [VAR\_TYPE](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dvs__var__interface_8h.md#a84856d33cb231d1d87a603758b8b8066) type=VAR\_TYPE::FLOAT) const =0 Get the size of the hash to use with [IVarHash::get\_var\_hash()](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_var_hash.md#a17fff1548eb276edd326a0af08f6a7c4) |
> | virtual uint32\_t | [get\_var\_hash\_size](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_var_hash.md#a81cd99bbf69ccc0d50e8bcb7dd291046) (const [IVar](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_var.md) \*var) const =0 Get the size of the hash to use with [IVarHash::get\_var\_hash()](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_var_hash.md#a17fff1548eb276edd326a0af08f6a7c4) |
> | virtual [dvs\_ret](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__error__codes_8h.md#a1d7466ae72e89fe36cbf2408b4f7d9c1) | [get\_var\_hash](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_var_hash.md#a17fff1548eb276edd326a0af08f6a7c4) (uint32\_t index, char \*hash, [VAR\_TYPE](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dvs__var__interface_8h.md#a84856d33cb231d1d87a603758b8b8066) type=VAR\_TYPE::FLOAT) const =0 Get the hash of the variable data. |
> | virtual [dvs\_ret](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dynamic__visualization__store__error__codes_8h.md#a1d7466ae72e89fe36cbf2408b4f7d9c1) | [get\_var\_hash](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_var_hash.md#a7348be86da47ac034252a68949b21007) (const [IVar](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_var.md) \*var, char \*hash) const =0 Get the hash of the variable data. |

## Detailed Description

Element Block Interface for DVS Reader API.

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](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_hash.md) and [DVS::IVarHash](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_var_hash.md) for the hash object interface.

Definition at line [51](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dvs__element__block__interface_8h_source) of file [dvs\_element\_block\_interface.h](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dvs__element__block__interface_8h_source).

## Member Function Documentation

### get\_connectivity()

```cpp theme={null}
virtual dvs_ret DVS::IElementBlock::get_connectivity(uint32_t * indices)
```

`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()](#a310ce04445517dd10942e7ba224ac75d).

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

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[out] | indices | If not nullptr should be of size indices\_size from [get\_connectivity\_size()](#a310ce04445517dd10942e7ba224ac75d) |

**Returns**

dvs\_ret DVS\_NONE on no error, see the method documentation for errors

### get\_connectivity\_polygon()

```cpp theme={null}
virtual dvs_ret DVS::IElementBlock::get_connectivity_polygon(
    uint32_t * nodes_per_polygon,
    uint32_t * indices
)
```

`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()](#a21ddc1624e91860b6dd37c25d7bd333f).

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

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[out] | nodes\_per\_polygon | an ouput array of size nodes\_per\_polygon\_size from [get\_connectivity\_polygon\_size()](#a21ddc1624e91860b6dd37c25d7bd333f) |
| \[out] | indices | an output array of size indices\_size from [get\_connectivity\_polygon\_size()](#a21ddc1624e91860b6dd37c25d7bd333f) |

**Returns**

dvs\_ret DVS\_NONE on no error, see the method documentation for errors

### get\_connectivity\_polygon\_size()

```cpp theme={null}
virtual dvs_ret DVS::IElementBlock::get_connectivity_polygon_size(
    uint32_t & nodes_per_polygon_size,
    uint32_t & indices_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()](#a6b03d65937d395bbf9819e15b9c83288).

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

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[out] | nodes\_per\_polygon\_size | the number of nodes per polygon, this is also the total number of elements |
| \[out] | indices\_size | the total size of the connectivity array |

**Returns**

dvs\_ret DVS\_NONE on no error, see the method documentation for errors

### get\_connectivity\_polyhedral()

```cpp theme={null}
virtual dvs_ret DVS::IElementBlock::get_connectivity_polyhedral(
    uint32_t * faces_per_element,
    uint32_t * nodes_per_face,
    uint32_t * indices
)
```

`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()](#a21ddc1624e91860b6dd37c25d7bd333f).

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

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[out] | faces\_per\_element | and output array of size faces\_per\_element\_size from [get\_connectivity\_polyhedral\_size()](#aa9bc1541ae8c5114f133122dbbb247cd) |
| \[out] | nodes\_per\_face | an output array of size nodes\_per\_face\_size from [get\_connectivity\_polyhedral\_size()](#aa9bc1541ae8c5114f133122dbbb247cd) |
| \[out] | indices | an output array of size indices\_size from [get\_connectivity\_polyhedral\_size()](#aa9bc1541ae8c5114f133122dbbb247cd) |

**Returns**

dvs\_ret DVS\_NONE on no error, see the method documentation for errors

### get\_connectivity\_polyhedral\_size()

```cpp theme={null}
virtual dvs_ret DVS::IElementBlock::get_connectivity_polyhedral_size(
    uint32_t & faces_per_element_size,
    uint32_t & nodes_per_face_size,
    uint32_t & indices_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()](#ab47ae0f50ceab792a872a47a867134e5).

Error Codes:

* DVS\_NONE: No error
* DVS\_INVALID\_ELEMENT\_TYPE: This element block is not a basic unstructured type

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[out] | faces\_per\_element\_size | the number of faces per element, this is also the total number of elements |
| \[out] | nodes\_per\_face\_size | the number of nodes for each face in an element |
| \[out] | indices\_size | the total number of indices in the connectivity array |

**Returns**

dvs\_ret DVS\_NONE on no error, see the method documentation for errors

### get\_connectivity\_size()

```cpp theme={null}
virtual dvs_ret DVS::IElementBlock::get_connectivity_size(uint32_t & indices_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()](#a78959ba4b322598b6bb31fc205c0d3b7)

Error Codes:

* DVS\_NONE: No error
* DVS\_INVALID\_ELEMENT\_TYPE: This element block is not a basic unstructured type

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[out] | indices\_size | the size of the connectivity array for this element block |

**Returns**

dvs\_ret DVS\_NONE on no error, see the method documentation for errors

### get\_element\_type()

```cpp theme={null}
virtual dvs_element_type DVS::IElementBlock::get_element_type() const
```

`pure virtual`

Get the element type for this block.

**Returns**

dvs\_element\_type the element type for this block

### get\_is\_ghost()

```cpp theme={null}
virtual bool DVS::IElementBlock::get_is_ghost() const
```

`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()

```cpp theme={null}
virtual dvs_ret DVS::IElementBlock::get_nodes_per_element(uint32_t & nodes_per_element) const
```

`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

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[out] | nodes\_per\_element | the number of nodes per element |

**Returns**

dvs\_ret DVS\_NONE on no error, otherwise see method documentation

### get\_num\_elements()

```cpp theme={null}
virtual dvs_ret DVS::IElementBlock::get_num_elements(uint32_t & num_elements) const
```

`pure virtual`

Get the number of elements for this block.

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[out] | num\_elements | the number of elements for this block |

**Returns**

dvs\_ret DVS\_NONE on no error

### get\_num\_variables()

```cpp theme={null}
virtual dvs_ret DVS::IElementBlock::get_num_variables(
    uint32_t & num_vars,
    VAR_TYPE type = VAR_TYPE::FLOAT
) const
```

`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()](#a16ed2ca6ad45b9ffb78002f95cfbf0e5) and [get\_variable\_data()](#a3e7a946f3e97334f2a2ec72fd23e0e6e) to retrieve elemental variable data.

Errors:

* DVS\_NONE: Success

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[out] | num\_vars | if success, returns the number of variables on this element block |
| \[in] | type | the enum type. By default, VAR\_TYPE::FLOAT |

**Returns**

DVS\_NONE on success, else see method description

### get\_variable()

```cpp theme={null}
virtual const DVS::IVar * DVS::IElementBlock::get_variable(
    uint32_t index,
    VAR_TYPE type = VAR_TYPE::FLOAT
) const
```

`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()](#a8c8e7ec1c08a472a4dcfa56cd69568d3)-1]

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | index | index of variable definition to get in range \[0, [get\_num\_variables()](#a8c8e7ec1c08a472a4dcfa56cd69568d3)-1] |
| \[in] | type | the enum type. By default, VAR\_TYPE::FLOAT |

**Returns**

[DVS::IVar](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/class_d_v_s_1_1_i_var.md)\* nullptr if out of range, otherwise the variable associated with the index

### get\_variable\_data() \[1/6]

```cpp theme={null}
virtual dvs_ret DVS::IElementBlock::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**

| Direction | Name | Description |
| - | - | - |
| \[in] | var | the variable definition to retrieve nodal variable data for |
| \[out] | array | an array whose size should be returned from [get\_variable\_size()](#a452ed02842ece58d57c2abba34bd66ab). Overloaded for float and int64. |

**Returns**

dvs\_ret DVS\_NONE on no error, otherwise see method description

### get\_variable\_data() \[2/6]

```cpp theme={null}
virtual dvs_ret DVS::IElementBlock::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**

| Direction | Name | Description |
| - | - | - |
| \[in] | var | the variable definition to retrieve nodal variable data for |
| \[out] | array | an array whose size should be returned from [get\_variable\_size()](#a452ed02842ece58d57c2abba34bd66ab). Overloaded for float and int64. |

**Returns**

dvs\_ret DVS\_NONE on no error, otherwise see method description

### get\_variable\_data() \[3/6]

```cpp theme={null}
virtual dvs_ret DVS::IElementBlock::get_variable_data(
    const IVar * var,
    uint32_t * num_values,
    float * array
)
```

`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?

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | var | the variable definition to retrieve elemental variable data for |
| \[out] | num\_values | if not nullptr returns the number of values to allocate for array |
| \[out] | array | if 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]

```cpp theme={null}
virtual dvs_ret DVS::IElementBlock::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()](#a8c8e7ec1c08a472a4dcfa56cd69568d3)-1]. To retrieve the variable definition associated with the index call [get\_variable()](#a16ed2ca6ad45b9ffb78002f95cfbf0e5).

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()](#a8c8e7ec1c08a472a4dcfa56cd69568d3)-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**

| Direction | Name | Description |
| - | - | - |
| \[in] | index | index of the variable data in range \[0,[get\_num\_variables()](#a8c8e7ec1c08a472a4dcfa56cd69568d3)-1] |
| \[out] | array | an array whose size should be returned from [get\_variable\_size()](#a452ed02842ece58d57c2abba34bd66ab). Overloaded for float and int64. |

**Returns**

dvs\_ret DVS\_NONE on no error, otherwise see method description

### get\_variable\_data() \[5/6]

```cpp theme={null}
virtual dvs_ret DVS::IElementBlock::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()](#a8c8e7ec1c08a472a4dcfa56cd69568d3)-1]. To retrieve the variable definition associated with the index call [get\_variable()](#a16ed2ca6ad45b9ffb78002f95cfbf0e5).

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()](#a8c8e7ec1c08a472a4dcfa56cd69568d3)-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**

| Direction | Name | Description |
| - | - | - |
| \[in] | index | index of the variable data in range \[0,[get\_num\_variables()](#a8c8e7ec1c08a472a4dcfa56cd69568d3)-1] |
| \[out] | array | an array whose size should be returned from [get\_variable\_size()](#a452ed02842ece58d57c2abba34bd66ab). Overloaded for float and int64. |

**Returns**

dvs\_ret DVS\_NONE on no error, otherwise see method description

### get\_variable\_data() \[6/6]

```cpp theme={null}
virtual dvs_ret DVS::IElementBlock::get_variable_data(
    uint32_t index,
    uint32_t * num_values,
    float * array
)
```

`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()](#a8c8e7ec1c08a472a4dcfa56cd69568d3)-1]. To retrieve the variable definition associated with the index call [get\_variable()](#a16ed2ca6ad45b9ffb78002f95cfbf0e5).

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()](#a8c8e7ec1c08a472a4dcfa56cd69568d3)-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**

| Direction | Name | Description |
| - | - | - |
| \[in] | index | index of the variable data in range \[0,[get\_num\_variables()](#a8c8e7ec1c08a472a4dcfa56cd69568d3)-1] |
| \[out] | num\_values | if not nullptr returns the number of values to allocate for array |
| \[out] | array | if 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]

```cpp theme={null}
virtual dvs_ret DVS::IElementBlock::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**

| Direction | Name | Description |
| - | - | - |
| \[in] | var | the variable definition to retrieve nodal variable data for |
| \[out] | num\_values | a 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]

```cpp theme={null}
virtual dvs_ret DVS::IElementBlock::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()](#a8c8e7ec1c08a472a4dcfa56cd69568d3)-1] and of the specified type

Errors:

* DVS\_NONE: Success

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | index | index of variable definition to get in range \[0, [get\_num\_variables()](#a8c8e7ec1c08a472a4dcfa56cd69568d3)-1] |
| \[out] | num\_values | a reference to a uint32\_t, representing the number of values of the variable |
| \[in] | type | the enum type. By default, VAR\_TYPE::FLOAT |

**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](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/dvs__element__block__interface_8h_source)
