cee::ug::DataStateSpec Class Reference

Specification of data to load for a state. More...

Public Member Functions

 DataStateSpec ()
 Constructs an empty object. More...
 
std::vector< int > scalarResultIds () const
 Returns an array of all scalar result ids in the spec. More...
 
void setScalarResultIds (const std::vector< int > &scalarIds)
 Sets all scalar results to load. More...
 
std::vector< int > vectorResultIds () const
 Returns an array of all vector result ids in the spec. More...
 
void setVectorResultIds (const std::vector< int > &vectorIds)
 Sets all vector result to load. More...
 
std::vector< int > displacementResultIds () const
 Returns an array of all displacement result ids in the spec. More...
 
void setDisplacementResultIds (const std::vector< int > &displacementIds)
 Sets all displacement results to load. More...
 
std::vector< int > symmetricTensorResultIds () const
 Returns an array of all symmetric tensor result ids in the spec. More...
 
void setSymmetricTensorResultIds (const std::vector< int > &symmetricTensorIds)
 Sets all the symmetric tensor results to load. More...
 
void setResultIds (const std::vector< ResultInfo > &resultInfos)
 Sets the results to load using ResultInfos. More...
 
bool loadTransformationResult () const
 Returns true if the transformation result is set to be loaded. More...
 
void setLoadTransformationResult (bool load)
 Toggles loading of the transformation result. More...
 
std::vector< int > setIds () const
 Returns an array of all set ids in the spec. More...
 
void setSetIds (const std::vector< int > &setIds)
 Sets all the sets to load. More...
 

Detailed Description

Specification of data to load for a state.

The data state spec describes the data to load when using DataSourceInterface::loadState(). Loading a state manually is useful to get access to result data without loading the results into the data model. For instance, UnstructGridModel::scalarRange() will not return a valid minimum and maximum if the scalar has not been loaded.

Available results for a data source is found by querying the metadata directory found in the data source. DataSource::directory().

Example

This example loads a single scalar result for a given state.

Define the state and result id to load

int scalarId = 4;
int stateId = 1;

Create an array of the scalar id(s) to load

std::vector<int> scalarIds(1);

Create a data state spec object and set the scalar id array.

stateSpec.setScalarResultIds(scalarIds);

Load the state at the given state id and defined data state spec

source->loadState(stateId, stateSpec, NULL);

See also
DataSourceDirectory
DataSource
UnstructGridModel

Constructor & Destructor Documentation

cee::ug::DataStateSpec::DataStateSpec ( )

Constructs an empty object.

Member Function Documentation

std::vector< int > cee::ug::DataStateSpec::displacementResultIds ( ) const

Returns an array of all displacement result ids in the spec.

bool cee::ug::DataStateSpec::loadTransformationResult ( ) const

Returns true if the transformation result is set to be loaded.

std::vector< int > cee::ug::DataStateSpec::scalarResultIds ( ) const

Returns an array of all scalar result ids in the spec.

void cee::ug::DataStateSpec::setDisplacementResultIds ( const std::vector< int > &  displacementIds)

Sets all displacement results to load.

std::vector< int > cee::ug::DataStateSpec::setIds ( ) const

Returns an array of all set ids in the spec.

void cee::ug::DataStateSpec::setLoadTransformationResult ( bool  load)

Toggles loading of the transformation result.

void cee::ug::DataStateSpec::setResultIds ( const std::vector< ResultInfo > &  resultInfos)

Sets the results to load using ResultInfos.

void cee::ug::DataStateSpec::setScalarResultIds ( const std::vector< int > &  scalarIds)

Sets all scalar results to load.

void cee::ug::DataStateSpec::setSetIds ( const std::vector< int > &  setIds)

Sets all the sets to load.

void cee::ug::DataStateSpec::setSymmetricTensorResultIds ( const std::vector< int > &  symmetricTensorIds)

Sets all the symmetric tensor results to load.

void cee::ug::DataStateSpec::setVectorResultIds ( const std::vector< int > &  vectorIds)

Sets all vector result to load.

std::vector< int > cee::ug::DataStateSpec::symmetricTensorResultIds ( ) const

Returns an array of all symmetric tensor result ids in the spec.

std::vector< int > cee::ug::DataStateSpec::vectorResultIds ( ) const

Returns an array of all vector result ids in the spec.