> ## 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.

# libuserd::Reader Class Reference

Part of [LibUserd](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/group__userd.md)

`#include <libuserd_interface.h>`

Inheritance diagram for libuserd::Reader:

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

## Public Member Functions

| Type | Name |
| - | - |
| ErrorCode | [parts](#a9af836eaf529c4b15dd72dcdacbe9ee5) (std::vector\< IPart \* > \&part\_list) override parts |
| ErrorCode | [variables](#a41de518241c05fa09f65e64feeed9b45) (std::vector\< IVariable \* > \&variable\_list) override variables |
| ErrorCode | [queries](#a363a7851bf38059c82a467d332707a1b) (std::vector\< IQuery \* > \&query\_list) override queries |
| ErrorCode | [get\_number\_of\_time\_sets](#ac718bff5521bb117682365c0b4736c62) (uint32\_t \&number\_of\_time\_sets) override timevalues |
| ErrorCode | [timevalues](#a09cfa421c471be3c98c779633a0dd8e2) (std::vector\< float > \&timevalues, uint32\_t timeset\_number=0) override timevalues |
| ErrorCode | [set\_timevalue](#abe71a1756dd41d6234d4c0afcaf27dc9) (float timevalue, uint32\_t timeset\_number=0) override timevalue |
| ErrorCode | [set\_timestep](#a46d51aa0cada0a873605f070e974c6ae) (uint32\_t timestep, uint32\_t timeset\_number=0) override set\_timestep |
| ErrorCode | [variable\_value](#a8bc9be5f6cb37f6893b9a5ce9ccd5352) (const IVariable \*var, float \&value, int32\_t rank=0) override variable\_value |
| UpdateHints | [dynamic\_update\_check](#acc74635760c8d32bcf419742b045a5ac) (UpdateHints changes\_allowed) override dynamic\_update\_check |
| bool | [is\_geometry\_changing](#a4959411676a96742b9aab19159ee05a7) () override is\_geometry\_changing |
| const IReaderInfo \* | [info](#a43cd80ff9eaeb8facddfe4d210e4da7a) () override info |

## Static Public Member Functions

| Type | Name |
| - | - |
|  static ErrorCode | **get\_geometry\_info** (int reader\_id, int part\_index, std::vector\< int > \&geoms\_vector) |
|  static ErrorCode | **number\_of\_geometries** (int reader\_id, int part\_index, int \&number\_of\_geoms) |

## Friends

| Type | Name |
| - | - |
| class | [ReaderInfo](#a73671c5be9cbf13d42ff337755c2af76) |

## Detailed Description

This class represents is an instance of a reader that is actively reading a dataset.

Definition at line [362](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/libuserd__interface_8h_source) of file [libuserd\_interface.h](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/libuserd__interface_8h_source).

## Member Function Documentation

### dynamic\_update\_check()

```cpp theme={null}
UpdateHints libuserd::Reader::dynamic_update_check(UpdateHints changes_allowed)
```

`override`

dynamic\_update\_check

When this call is made, the active reader is allowed to change the current data values (e.g. variable values, connectivity, etc) as well as the structure of the data (e.g. part\_list, var\_list, query\_list). The returned value describes what things changed. For example, an in situ reader might change the mesh and variable values in response to this call. \


> [!NOTE]
>
> : a reader is not allowed to change the underlying data nor structure if this method is never called and only the bits set in the input flags are allowed to change.

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | UpdateHints | changes\_allowed Bitfield of the types of changes that are allowed. |

**Returns**

libuserd::UpdateHints What aspects of the dataset has changed.

### get\_number\_of\_time\_sets()

```cpp theme={null}
ErrorCode libuserd::Reader::get_number_of_time_sets(uint32_t & number_of_time_sets)
```

`override`

timevalues

The list of valid timeset values

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[out] | uint32\_t | number\_of\_time\_sets is the total number of timesets available in this dataset |

**Returns**

ErrorCode

### info()

```cpp theme={null}
const IReaderInfo * libuserd::Reader::info()
```

`override`

info

Get the [ReaderInfo](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/classlibuserd_1_1_reader_info.md) class used to create this [Reader](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/classlibuserd_1_1_reader.md) instance.

**Returns**

const libuserd::IReaderInfo\*

### is\_geometry\_changing()

```cpp theme={null}
bool libuserd::Reader::is_geometry_changing()
```

`override`

is\_geometry\_changing

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[out] | bool | - returns true if the geometry is changing (timestep dependent) and false otherwise |

**Returns**

ErrorCode

### parts()

```cpp theme={null}
ErrorCode libuserd::Reader::parts(std::vector< IPart * > & part_list)
```

`override`

parts

The list of part objects (mesh blocks) defined by this dataset.

> [!NOTE]
>
> The returned [Part](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/classlibuserd_1_1_part.md) pointers must be deleted by the caller.

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[out] | std::vector\<IPart | \* > & part\_list |

**Returns**

ErrorCode

### queries()

```cpp theme={null}
ErrorCode libuserd::Reader::queries(std::vector< IQuery * > & query_list)
```

`override`

queries

The list of queries present in this dataset.

> [!NOTE]
>
> The returned [Query](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/classlibuserd_1_1_query.md) pointers must be deleted by the caller.

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[out] | std::vector\<IQuery | \* > & query\_list |

**Returns**

ErrorCode

### set\_timestep()

```cpp theme={null}
ErrorCode libuserd::Reader::set_timestep(
    uint32_t timestep,
    uint32_t timeset_number = 0
)
```

`override`

set\_timestep

The timestep index to change the reader to.

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | uint32\_t | timestep This is the time value index: \[0,timevalues.size()-1] |
| \[in] | uint32\_t | timeset\_number This optional argument can be ignored for v1.0 but needs to be supplied for version 2 & 3 (otherwise it would be defaulted to 0th timeset) |

**Returns**

ErrorCode

### set\_timevalue()

```cpp theme={null}
ErrorCode libuserd::Reader::set_timevalue(
    float timevalue,
    uint32_t timeset_number = 0
)
```

`override`

timevalue

The time value to change the reader to.

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | float | timevalue The time value. Note: this value must be present in timesteps(); |
| \[in] | uint32\_t | timeset\_number This optional argument can be ignored for v1.0 but needs to be supplied for version 2 & 3 (otherwise it would be defaulted to 0th timeset) |

**Returns**

ErrorCode

### timevalues()

```cpp theme={null}
ErrorCode libuserd::Reader::timevalues(
    std::vector< float > & timevalues,
    uint32_t timeset_number = 0
)
```

`override`

timevalues

The list of valid timestep values.

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[out] | std::vector\<float> | & timevalues The "time" values available in this dataset |
| \[in] | uint32\_t | timeset\_number This optional argument can be ignored for v1.0 but needs to be supplied for version 2 & 3 (otherwise it would be defaulted to 0th timeset) |

**Returns**

ErrorCode

### variable\_value()

```cpp theme={null}
ErrorCode libuserd::Reader::variable_value(
    const IVariable * var,
    float & value,
    int32_t rank = 0
)
```

`override`

variable\_value

For DATASET variables, return the value for a DATASET constant at the current timestep.

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | const | IVariable & var The [Variable](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/classlibuserd_1_1_variable.md) corresponding to a DATASET constant |
| \[out] | float | & value The value of the variable |
| \[in] | int32\_t | rank The rank number to return values for. Unimplemented, use 0. |

**Returns**

ErrorCode

### variables()

```cpp theme={null}
ErrorCode libuserd::Reader::variables(std::vector< IVariable * > & variable_list)
```

`override`

variables

The list of variables defined by this dataset.

> [!NOTE]
>
> The returned [Variable](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/classlibuserd_1_1_variable.md) pointers must be deleted by the caller.

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[out] | std::vector\<IVariable | \* > & variable\_list |

**Returns**

ErrorCode

## Friends And Related Symbol Documentation

### ReaderInfo

```cpp theme={null}
friend class ReaderInfo
```

`friend`

Definition at line [503](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/libuserd__interface_8h_source) of file [libuserd\_interface.h](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/libuserd__interface_8h_source).

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

* D:/ANSYSDev/Product-src/ensight/server/userd/include/[libuserd\_interface.h](https://developer.synopsys.com/docs/ensight/ensight-apis/2025-r2/libuserd__interface_8h_source)
