Skip to main content
This class represents is an instance of a reader that is actively reading a dataset. Inherits from:
  • IReader

Members

Friends

Friend ReaderInfo

Private attributes

Variable m_reader_info

the ReaderInfo used to construct this object Type: ReaderInfo

Variable m_part_metatags

Type: std::map< const std::string, std::string >

Variable m_var_metatags

Type: std::map< const std::string, std::string >

Variable m_query_metatags

Type: std::map< const std::string, std::string >

Public functions

Function parts

parts The list of part objects (mesh blocks) defined by this dataset. ?> The returned Part pointers must be deleted by the caller. Parameters:
  • std::vector<IPart: * > & part_list
Returns: ErrorCode Parameters:
  • std::vector< IPart * > & part_list
Return type: ErrorCode

Function variables

variables The list of variables defined by this dataset. ?> The returned Variable pointers must be deleted by the caller. Parameters:
  • std::vector<IVariable: * > & variable_list
Returns: ErrorCode Parameters:
  • std::vector< IVariable * > & variable_list
Return type: ErrorCode

Function queries

queries The list of queries present in this dataset. ?> The returned Query pointers must be deleted by the caller. Parameters:
  • std::vector<IQuery: * > & query_list
Returns: ErrorCode Parameters:
  • std::vector< IQuery * > & query_list
Return type: ErrorCode

Function get_number_of_time_sets

timevalues The list of valid timeset values Parameters:
  • uint32_t: number_of_time_sets is the total number of timesets available in this dataset
Returns: ErrorCode Parameters:
  • uint32_t & number_of_time_sets
Return type: ErrorCode

Function timevalues

timevalues The list of valid timestep values. Parameters:
  • std::vector<float>: & timevalues The “time” values available in this dataset
  • 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 Parameters:
  • std::vector< float > & timevalues
  • uint32_t timeset_number = 0
Return type: ErrorCode

Function set_timevalue

timevalue The time value to change the reader to. Parameters:
  • float: timevalue The time value. Note: this value must be present in timesteps();
  • 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 Parameters:
  • float timevalue
  • uint32_t timeset_number = 0
Return type: ErrorCode

Function set_timestep

set_timestep The timestep index to change the reader to. Parameters:
  • uint32_t: timestep This is the time value index: [0,timevalues.size()-1]
  • 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 Parameters:
  • uint32_t timestep
  • uint32_t timeset_number = 0
Return type: ErrorCode

Function variable_value

variable_value For DATASET variables, return the value for a DATASET constant at the current timestep. Parameters:
  • const: IVariable & var The Variable corresponding to a DATASET constant
  • float: & value The value of the variable
  • int32_t: rank The rank number to return values for. Unimplemented, use 0.
Returns: ErrorCode Parameters:
  • const IVariable * var
  • float & value
  • int32_t rank = 0
Return type: ErrorCode

Function dynamic_update_check

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.
?> : 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:
  • UpdateHints: changes_allowed Bitfield of the types of changes that are allowed.
Returns: libuserd::UpdateHints What aspects of the dataset has changed. Parameters:
  • UpdateHints changes_allowed
Return type: UpdateHints

Function is_geometry_changing

is_geometry_changing Parameters:
  • bool: - returns true if the geometry is changing (timestep dependent) and false otherwise
Returns: ErrorCode Return type: bool

Function info

info Get the ReaderInfo class used to create this Reader instance. Returns: const libuserd::IReaderInfo* Return type: const IReaderInfo *

Public static functions

Function get_geometry_info

Parameters:
  • int reader_id
  • int part_index
  • std::vector< int > & geoms_vector
Return type: ErrorCode

Function number_of_geometries

Parameters:
  • int reader_id
  • int part_index
  • int & number_of_geoms
Return type: ErrorCode

Private functions

Function Reader

Parameters:
  • ReaderInfo info
Return type:

Function get_meta_data_string

Return type: ErrorCode

Function parse_metatags

Parameters:
  • std::map< const std::string, std::string > & map
  • const char * section_name
Return type: void

Function get_part_hints

Parameters:
  • int reader_id
  • int part_index
  • PartHints & part_hints
Return type: ErrorCode