cee::ug::ResultsQueryResultPosition Class Reference

A ResultsQueryResultPosition object contains the position and the ResultsQueryResult of a specific value. More...

Public Member Functions

 ResultsQueryResultPosition ()
 Constructs and empty results query result position. More...
 
 ResultsQueryResultPosition (const ResultsQueryResultPosition &other)
 Constructs a result position as a copy of other. More...
 
ResultsQueryResultPositionoperator= (const ResultsQueryResultPosition &other)
 Assigns other to this position and returns a reference to this position. More...
 
bool operator== (const ResultsQueryResultPosition &other) const
 Returns true if two result positions are equal. More...
 
void initialize (Vec3d position, const double *resultData, size_t dimension, int partId, int itemId, ResultMapping mapping)
 Initializes this position with the given parameters. More...
 
double scalar () const
 Returns the scalar value. More...
 
Vec3d vector () const
 Returns the vector. More...
 
SymmetricTensor tensor () const
 Returns the tensor. More...
 
const double * rawValuePointer () const
 Returns a raw pointer to the result positions. More...
 
void setRawPointer (const double *resultData, size_t dataSize)
 Sets the result data as a raw pointer. More...
 
size_t resultSize () const
 Returns the size of the result. More...
 
Vec3d position () const
 Returns the node coordinate position or element centroid depending on the result mapping type. More...
 
void setPosition (const Vec3d &position)
 Sets the position. More...
 
int partId () const
 Returns the part id. More...
 
void setPartId (int partId)
 Sets the part id. More...
 
int itemId () const
 Returns the item id. More...
 
void setItemId (int itemId)
 Sets the item id. More...
 
ResultMapping mapping () const
 Returns the result mapping type. More...
 
void setMapping (ResultMapping mapping) const
 Sets the results mapping type. More...
 
ResultType type () const
 Returns the result type. More...
 

Detailed Description

A ResultsQueryResultPosition object contains the position and the ResultsQueryResult of a specific value.

It holds the part id and the item id (node or element). If node/element don't have ids, the index is used instead.

For node results -> the position is the node coordinate For element, element node or element surface results -> the position is the element centroid

For node result -> the reference value is the node result For element result -> the reference value is the element result For element node/element surface -> the reference value is the average in the element

Example:

ResultsQuery query(dataSource.get()); // the ResultsQuery object that will fetch the result values
// Use the individual container to request and receive the data from the ResultsQuery.
int scalarId = 1;
int stateId = 2;
size_t geoIndex = 0;
query.minimumAndMaximumScalar(scalarId, stateId, geoIndex, &minScalar, &maxScalar); // Request the position of the min/max result
// the to access the data in the container
Vec3d positionSmallestScalar = minScalar.position();
const double* referenceValue = minScalar.result(); // pointer to double
std::vector<ResultsQueryResultPosition> queryMinValues;
std::vector<ResultsQueryResultPosition> queryMaxValues;
int itemCount = 5; // get the 5 highest values and the 5 lowest values of the given result id
query.minimumScalars(itemCount, scalarId, stateId, geoIndex, &queryMinValues);
query.maximumScalars(itemCount, scalarId, stateId, geoIndex, &queryMaxValues);

Constructor & Destructor Documentation

cee::ug::ResultsQueryResultPosition::ResultsQueryResultPosition ( )

Constructs and empty results query result position.

cee::ug::ResultsQueryResultPosition::ResultsQueryResultPosition ( const ResultsQueryResultPosition other)

Constructs a result position as a copy of other.

Member Function Documentation

void cee::ug::ResultsQueryResultPosition::initialize ( Vec3d  position,
const double *  resultData,
size_t  dimension,
int  partId,
int  itemId,
ResultMapping  mapping 
)

Initializes this position with the given parameters.

int cee::ug::ResultsQueryResultPosition::itemId ( ) const

Returns the item id.

Returns index if node/element has no ids

ResultMapping cee::ug::ResultsQueryResultPosition::mapping ( ) const

Returns the result mapping type.

ResultsQueryResultPosition & cee::ug::ResultsQueryResultPosition::operator= ( const ResultsQueryResultPosition other)

Assigns other to this position and returns a reference to this position.

bool cee::ug::ResultsQueryResultPosition::operator== ( const ResultsQueryResultPosition other) const

Returns true if two result positions are equal.

int cee::ug::ResultsQueryResultPosition::partId ( ) const

Returns the part id.

Returns index if part has no id

Vec3d cee::ug::ResultsQueryResultPosition::position ( ) const

Returns the node coordinate position or element centroid depending on the result mapping type.

const double * cee::ug::ResultsQueryResultPosition::rawValuePointer ( ) const

Returns a raw pointer to the result positions.

size_t cee::ug::ResultsQueryResultPosition::resultSize ( ) const

Returns the size of the result.

double cee::ug::ResultsQueryResultPosition::scalar ( ) const

Returns the scalar value.

void cee::ug::ResultsQueryResultPosition::setItemId ( int  itemId)

Sets the item id.

void cee::ug::ResultsQueryResultPosition::setMapping ( ResultMapping  mapping) const

Sets the results mapping type.

void cee::ug::ResultsQueryResultPosition::setPartId ( int  partId)

Sets the part id.

void cee::ug::ResultsQueryResultPosition::setPosition ( const Vec3d position)

Sets the position.

void cee::ug::ResultsQueryResultPosition::setRawPointer ( const double *  resultData,
size_t  dataSize 
)

Sets the result data as a raw pointer.

SymmetricTensor cee::ug::ResultsQueryResultPosition::tensor ( ) const

Returns the tensor.

ResultType cee::ug::ResultsQueryResultPosition::type ( ) const

Returns the result type.

Vec3d cee::ug::ResultsQueryResultPosition::vector ( ) const

Returns the vector.