Skip to main content

EnSight 2025 R2

libuserd::Reader Class Reference

Last update: 16.07.2025

#include <libuserd_interface.h>

Inheritance diagram for libuserd::Reader:

Public Member Functions

ErrorCode parts (std::vector< IPart * > &part_list) override
 parts
 
ErrorCode variables (std::vector< IVariable * > &variable_list) override
 variables
 
ErrorCode queries (std::vector< IQuery * > &query_list) override
 queries
 
ErrorCode get_number_of_time_sets (uint32_t &number_of_time_sets) override
 timevalues
 
ErrorCode timevalues (std::vector< float > &timevalues, uint32_t timeset_number=0) override
 timevalues
 
ErrorCode set_timevalue (float timevalue, uint32_t timeset_number=0) override
 timevalue
 
ErrorCode set_timestep (uint32_t timestep, uint32_t timeset_number=0) override
 set_timestep
 
ErrorCode variable_value (const IVariable *var, float &value, int32_t rank=0) override
 variable_value
 
UpdateHints dynamic_update_check (UpdateHints changes_allowed) override
 dynamic_update_check
 
bool is_geometry_changing () override
 is_geometry_changing
 
const IReaderInfo * info () override
 info
 

Static Public Member Functions

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

class ReaderInfo
 

Detailed Description

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

Definition at line 362 of file libuserd_interface.h.

Member Function Documentation

◆ dynamic_update_check()

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
[in]UpdateHintschanges_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()

ErrorCode libuserd::Reader::get_number_of_time_sets ( uint32_t & number_of_time_sets)
override

timevalues

The list of valid timeset values

Parameters
[out]uint32_tnumber_of_time_sets is the total number of timesets available in this dataset
Returns
ErrorCode

◆ info()

const IReaderInfo * libuserd::Reader::info ( )
override

info

Get the ReaderInfo class used to create this Reader instance.

Returns
const libuserd::IReaderInfo*

◆ is_geometry_changing()

bool libuserd::Reader::is_geometry_changing ( )
override

is_geometry_changing

Parameters
[out]bool- returns true if the geometry is changing (timestep dependent) and false otherwise
Returns
ErrorCode

◆ parts()

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 pointers must be deleted by the caller.
Parameters
[out]std::vector<IPart* > & part_list
Returns
ErrorCode

◆ queries()

ErrorCode libuserd::Reader::queries ( std::vector< IQuery * > & query_list)
override

queries

The list of queries present in this dataset.

Note
The returned Query pointers must be deleted by the caller.
Parameters
[out]std::vector<IQuery* > & query_list
Returns
ErrorCode

◆ set_timestep()

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
[in]uint32_ttimestep This is the time value index: [0,timevalues.size()-1]
[in]uint32_ttimeset_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()

ErrorCode libuserd::Reader::set_timevalue ( float timevalue,
uint32_t timeset_number = 0 )
override

timevalue

The time value to change the reader to.

Parameters
[in]floattimevalue The time value. Note: this value must be present in timesteps();
[in]uint32_ttimeset_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()

ErrorCode libuserd::Reader::timevalues ( std::vector< float > & timevalues,
uint32_t timeset_number = 0 )
override

timevalues

The list of valid timestep values.

Parameters
[out]std::vector<float>& timevalues The "time" values available in this dataset
[in]uint32_ttimeset_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()

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
[in]constIVariable & var The Variable corresponding to a DATASET constant
[out]float& value The value of the variable
[in]int32_trank The rank number to return values for. Unimplemented, use 0.
Returns
ErrorCode

◆ variables()

ErrorCode libuserd::Reader::variables ( std::vector< IVariable * > & variable_list)
override

variables

The list of variables defined by this dataset.

Note
The returned Variable pointers must be deleted by the caller.
Parameters
[out]std::vector<IVariable* > & variable_list
Returns
ErrorCode

Friends And Related Symbol Documentation

◆ ReaderInfo

friend class ReaderInfo
friend

Definition at line 503 of file libuserd_interface.h.


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

Connect with Ansys