cee::ug::ResultsQuery Class Reference

A query object to retrieve results from a given DataSource. More...

Public Member Functions

 ResultsQuery (DataSource *dataSource)
 Creates a query object from a data source. More...
 
bool scalars (int scalarId, int stateId, size_t geometryIndex, const std::vector< ResultsQueryItem > *items, std::vector< ResultsQueryResult > *results)
 Returns scalar results values for given items (nodes, elements). More...
 
bool vectors (int vectorId, int stateId, size_t geometryIndex, const std::vector< ResultsQueryItem > *items, std::vector< ResultsQueryResult > *results)
 Returns vector results values for given items (nodes, elements). More...
 
bool tensors (int tensorId, int stateId, size_t geometryIndex, const std::vector< ResultsQueryItem > *items, std::vector< ResultsQueryResult > *results)
 Returns vector results values for given items (nodes, elements). More...
 
bool minimumAndMaximumScalar (int scalarId, int stateId, size_t geometryIndex, ResultsQueryResultPosition *minScalarPositionAndResult, ResultsQueryResultPosition *maxScalarPositionAndResult)
 Searches for the minimum and maximum scalar value. Reports their positions, node/element ids, part ids and values. More...
 
bool minimumScalars (size_t scalarsCount, int scalarId, int stateId, size_t geometryIndex, std::vector< ResultsQueryResultPosition > *minScalarPositionAndResults)
 Searches for the minimum scalar values. Reports their positions, node/element ids, part ids and values. More...
 
bool maximumScalars (size_t scalarsCount, int scalarId, int stateId, size_t geometryIndex, std::vector< ResultsQueryResultPosition > *maxScalarPositionAndResults)
 Searches for the maximum scalar values. Reports their positions, node/element ids, part ids and values. More...
 
bool minimumAndMaximumVector (int vectorId, int stateId, size_t geometryIndex, ResultsQueryResultPosition *minVectorPositionAndResult, ResultsQueryResultPosition *maxVectorPositionAndResult)
 Searches for the minimum and maximum vector value. Reports their positions, node/element ids, part ids and values. More...
 
bool minimumVectors (size_t vectorsCount, int vectorId, int stateId, size_t geometryIndex, std::vector< ResultsQueryResultPosition > *minVectorPositionAndResults)
 Search the minimums vector values. Reports their positions, node/element ids, part ids and values. More...
 
bool maximumVectors (size_t vectorsCount, int vectorId, int stateId, size_t geometryIndex, std::vector< ResultsQueryResultPosition > *maxVectorPositionAndResults)
 Search the maximums scalar values. Reports their positions, node/element ids, part ids and values. More...
 

Detailed Description

A query object to retrieve results from a given DataSource.

Create the ResultsQuery by assigning its data source in the constructor, and then use its methods to retrieve results from it.

Classes related to ResultsQuery are ResultsQueryItem, which is used to define specific nodes or elements to perform the query on, and ResultsQueryResult, which is a container associated to one of the items and holds the values found by the query.

Constructor & Destructor Documentation

cee::ug::ResultsQuery::ResultsQuery ( DataSource dataSource)

Creates a query object from a data source.

Member Function Documentation

bool cee::ug::ResultsQuery::maximumScalars ( size_t  searchCounts,
int  scalarId,
int  stateId,
size_t  geometryIndex,
std::vector< ResultsQueryResultPosition > *  queryPositions 
)

Searches for the maximum scalar values. Reports their positions, node/element ids, part ids and values.

searchCounts parameter determines how many values are going to be reported.

The position reported depended on the result mapping. If being a node or element-node result, the position is the node position. For elements, the element centroid position is reported, and for PER_ELEMENT_SURFACE result mapping, the element surface centroid is reported.

The itemId within is expressed accordingly to the result mapping. If node/element does not have ids, the index is used.

bool cee::ug::ResultsQuery::maximumVectors ( size_t  searchCounts,
int  vectorId,
int  stateId,
size_t  geometryIndex,
std::vector< ResultsQueryResultPosition > *  queryPositions 
)

Search the maximums scalar values. Reports their positions, node/element ids, part ids and values.

searchCounts parameter determines how many values are going to be reported.

The position reported depended on the result mapping. If being a node or element-node result, the position is the node position. For elements, the element centroid position is reported, and for PER_ELEMENT_SURFACE result mapping, the element surface centroid is reported.

The itemId within is expressed accordingly to the result mapping. If node/element does not have ids, the index is used.

bool cee::ug::ResultsQuery::minimumAndMaximumScalar ( int  scalarId,
int  stateId,
size_t  geometryIndex,
ResultsQueryResultPosition minScalarPositionAndResult,
ResultsQueryResultPosition maxScalarPositionAndResult 
)

Searches for the minimum and maximum scalar value. Reports their positions, node/element ids, part ids and values.

The position reported depended on the result mapping. If being a node or element-node result, the position is the node position. For elements, the element centroid position is reported, and for PER_ELEMENT_SURFACE result mapping, the element surface centroid is reported.

The itemId within is expressed accordingly to the result mapping. If node/element does not have ids, the index is used.

bool cee::ug::ResultsQuery::minimumAndMaximumVector ( int  vectorId,
int  stateId,
size_t  geometryIndex,
ResultsQueryResultPosition minVectorPositionAndResult,
ResultsQueryResultPosition maxVectorPositionAndResult 
)

Searches for the minimum and maximum vector value. Reports their positions, node/element ids, part ids and values.

The position reported depended on the result mapping. If being a node or element-node result, the position is the node position. For elements, the element centroid position is reported, and for PER_ELEMENT_SURFACE result mapping, the element surface centroid is reported.

The itemId within is expressed accordingly to the result mapping. If node/element does not have ids, the index is used.

bool cee::ug::ResultsQuery::minimumScalars ( size_t  searchCounts,
int  scalarId,
int  stateId,
size_t  geometryIndex,
std::vector< ResultsQueryResultPosition > *  queryPositions 
)

Searches for the minimum scalar values. Reports their positions, node/element ids, part ids and values.

searchCounts parameter determines how many values are going to be reported.

The position reported depended on the result mapping. If being a node or element-node result, the position is the node position. For elements, the element centroid position is reported, and for PER_ELEMENT_SURFACE result mapping, the element surface centroid is reported.

The itemId within is expressed accordingly to the result mapping. If node/element does not have ids, the index is used.

bool cee::ug::ResultsQuery::minimumVectors ( size_t  searchCounts,
int  vectorId,
int  stateId,
size_t  geometryIndex,
std::vector< ResultsQueryResultPosition > *  queryPositions 
)

Search the minimums vector values. Reports their positions, node/element ids, part ids and values.

searchCounts parameter determines how many values are going to be reported.

The position reported depended on the result mapping. If being a node or element-node result, the position is the node position. For elements, the element centroid position is reported, and for PER_ELEMENT_SURFACE result mapping, the element surface centroid is reported.

The itemId within is expressed accordingly to the result mapping. If node/element does not have ids, the index is used.

bool cee::ug::ResultsQuery::scalars ( int  scalarId,
int  stateId,
size_t  geometryIndex,
const std::vector< ResultsQueryItem > *  items,
std::vector< ResultsQueryResult > *  results 
)

Returns scalar results values for given items (nodes, elements).

The items must be defined according to the mapping of the queried result: nodes for node-mapped results, or elements for element, element-node- or element-surface-mapped results

bool cee::ug::ResultsQuery::tensors ( int  tensorId,
int  stateId,
size_t  geometryIndex,
const std::vector< ResultsQueryItem > *  items,
std::vector< ResultsQueryResult > *  results 
)

Returns vector results values for given items (nodes, elements).

The items must be defined according to the mapping of the queried result: nodes for node-mapped results, or elements for element, element-node- or element-surface-mapped results

bool cee::ug::ResultsQuery::vectors ( int  vectorId,
int  stateId,
size_t  geometryIndex,
const std::vector< ResultsQueryItem > *  items,
std::vector< ResultsQueryResult > *  results 
)

Returns vector results values for given items (nodes, elements).

The items must be defined according to the mapping of the queried result: nodes for node-mapped results, or elements for element, element-node- or element-surface-mapped results