Result group binding a geometry and results (scalar, vector, displacement and/or transformation) More...
Public Member Functions | |
const DataGeometry * | geometry () const |
Returns the geometry associated with this results group. More... | |
size_t | scalarCount () const |
Returns number of scalar results for this group. More... | |
const DataResultScalar * | scalar (size_t resultIndex) const |
Returns the scalar result at the given index. More... | |
DataResultScalar * | scalar (size_t resultIndex) |
Returns the scalar result at the given index. More... | |
size_t | scalarIndex (int resultId) const |
Returns the index of the result with the given id. More... | |
void | addScalar (DataResultScalar *scalarResult) |
Adds a scalar result object to the group. More... | |
void | removeAllScalars () |
Removes all scalar results from the group. More... | |
size_t | vectorCount () const |
Returns number of vector results for this group. More... | |
const DataResultVector * | vector (size_t resultIndex) const |
Returns the vector result at the given index. More... | |
DataResultVector * | vector (size_t resultIndex) |
Returns the vector result at the given index. More... | |
size_t | vectorIndex (int resultId) const |
Returns the index of the result with the given id. More... | |
void | addVector (DataResultVector *vectorResult) |
Adds a vector result object to the group. More... | |
void | removeAllVectors () |
Removes all vector results from the group. More... | |
size_t | displacementCount () const |
Returns number of displacement results for this group. More... | |
const DataResultDisplacement * | displacement (size_t resultIndex) const |
Returns the displacement result at the given index. More... | |
DataResultDisplacement * | displacement (size_t resultIndex) |
Returns the displacement result at the given index. More... | |
size_t | displacementIndex (int resultId) const |
Returns the index of the result with the given id. More... | |
void | addDisplacement (DataResultDisplacement *displacementResult) |
Adds a displacement result object to the group. More... | |
void | removeAllDisplacements () |
Removes all displacement results from the group. More... | |
size_t | symmetricTensorCount () const |
Returns number of symmetricTensor results for this group. More... | |
const DataResultSymmetricTensor * | symmetricTensor (size_t resultIndex) const |
Returns the symmetricTensor result at the given index. More... | |
DataResultSymmetricTensor * | symmetricTensor (size_t resultIndex) |
Returns the symmetricTensor result at the given index. More... | |
size_t | symmetricTensorIndex (int resultId) const |
Returns the index of the result with the given id. More... | |
void | addSymmetricTensor (DataResultSymmetricTensor *symmetricTensorResult) |
Adds a symmetricTensor result object to the group. More... | |
void | removeAllSymmetricTensors () |
Removes all symmetricTensor results from the group. More... | |
const DataResultTransformation * | transformation () const |
Returns the transformation result. More... | |
DataResultTransformation * | transformation () |
Returns the transformation result. More... | |
void | setTransformation (DataResultTransformation *transformationResult) |
Sets the transformation result. More... | |
void | removeTransformation () |
Removes the transformation result form the group. More... | |
const DataResultVisibility * | visibility () const |
Returns the visibility result. More... | |
DataResultVisibility * | visibility () |
Returns visibility result. More... | |
void | setVisibility (DataResultVisibility *visibilityResult) |
Sets the visibility result. More... | |
void | removeVisibility () |
Removes the visibility result form the group. More... | |
![]() | |
void | addRef () const |
Increments the reference count for this object. More... | |
void | release () const |
Decrements the reference count for this object. More... | |
int | refCount () const |
Returns the reference count for this object. More... | |
void | setRefCountZero () const |
Sets the ref count to zero, but DOES NOT delete the object. More... | |
Result group binding a geometry and results (scalar, vector, displacement and/or transformation)
A state owns a set of geometries and a DataResultGroup is the binding between a geometry and it's results. Each geometry in the state have one (and only one) corresponding result group.
DataResultGroup has no public constructor and will always exist for each geometry in a state. Get the requested result group by calling DataState::results(const DataGeometry* geometry).
Get the data result group for a given geometry:
The DataResultGroup object contains all available results for a given geometry. Result types are:
Add a scalar result using addScalar(). Remove all using removeAllScalars(). Use scalarCount() to return number of scalar results for this result group. Access individual scalar results using scalar() with the requested index. To convert from a scalar id to a scalar index, use scalarIndex(). Vector results, Displacement results and Symmetric Tensor results use the same structure and naming convention as shown above for scalar. Transformation and visibility results differ slightly from the other since a result group only can have one of each of these results. Set the transformation result using setTransformation() and get the existing one using transformation(). Same syntax applies to visibility results.
Example of how to add a node based scalar result to a geometry consisting of only one triangle.
Create a scalar result object with a unique id and node based result mapping.
The result array must have one value for each node coordinate in the triangle. Remember that the array must be resized before inserting the results.
Number of parts in the DataResultScalar must match number of parts in the geometry. Scalar values must also fit the corresponding part in the geometry. Here the part is a single triangle with three nodes and a node mapped result, hence a results array with three values will fit.
For each geometry in a state there is a result group binding the geometry and results.
Add the result scalar to the state's result group for the corresponding geometry (DataGeometry) geo
void cee::ug::DataResultGroup::addDisplacement | ( | DataResultDisplacement * | displacementResult | ) |
Adds a displacement result object to the group.
void cee::ug::DataResultGroup::addScalar | ( | DataResultScalar * | scalarResult | ) |
Adds a scalar result object to the group.
void cee::ug::DataResultGroup::addSymmetricTensor | ( | DataResultSymmetricTensor * | symmetricTensorResult | ) |
Adds a symmetricTensor result object to the group.
void cee::ug::DataResultGroup::addVector | ( | DataResultVector * | vectorResult | ) |
Adds a vector result object to the group.
const DataResultDisplacement * cee::ug::DataResultGroup::displacement | ( | size_t | resultIndex | ) | const |
Returns the displacement result at the given index.
Use displacementIndex() to map from a displacement id if needed.
DataResultDisplacement * cee::ug::DataResultGroup::displacement | ( | size_t | resultIndex | ) |
Returns the displacement result at the given index.
Use displacementIndex() to map from a displacement id if needed.
size_t cee::ug::DataResultGroup::displacementCount | ( | ) | const |
Returns number of displacement results for this group.
size_t cee::ug::DataResultGroup::displacementIndex | ( | int | resultId | ) | const |
Returns the index of the result with the given id.
Returns cee::UNDEFINED_SIZE_T if no matching id was found.
const DataGeometry * cee::ug::DataResultGroup::geometry | ( | ) | const |
Returns the geometry associated with this results group.
void cee::ug::DataResultGroup::removeAllDisplacements | ( | ) |
Removes all displacement results from the group.
void cee::ug::DataResultGroup::removeAllScalars | ( | ) |
Removes all scalar results from the group.
void cee::ug::DataResultGroup::removeAllSymmetricTensors | ( | ) |
Removes all symmetricTensor results from the group.
void cee::ug::DataResultGroup::removeAllVectors | ( | ) |
Removes all vector results from the group.
void cee::ug::DataResultGroup::removeTransformation | ( | ) |
Removes the transformation result form the group.
Same effect as doing setTransformation(NULL).
void cee::ug::DataResultGroup::removeVisibility | ( | ) |
Removes the visibility result form the group.
Same effect as doing setVisibility(NULL).
const DataResultScalar * cee::ug::DataResultGroup::scalar | ( | size_t | resultIndex | ) | const |
Returns the scalar result at the given index.
Use scalarIndex() to map from a scalar id if needed.
DataResultScalar * cee::ug::DataResultGroup::scalar | ( | size_t | resultIndex | ) |
Returns the scalar result at the given index.
Use scalarIndex() to map from a scalar id if needed.
size_t cee::ug::DataResultGroup::scalarCount | ( | ) | const |
Returns number of scalar results for this group.
size_t cee::ug::DataResultGroup::scalarIndex | ( | int | resultId | ) | const |
Returns the index of the result with the given id.
Returns cee::UNDEFINED_SIZE_T if no matching id was found.
void cee::ug::DataResultGroup::setTransformation | ( | DataResultTransformation * | transformationResult | ) |
Sets the transformation result.
void cee::ug::DataResultGroup::setVisibility | ( | DataResultVisibility * | visibilityResult | ) |
Sets the visibility result.
const DataResultSymmetricTensor * cee::ug::DataResultGroup::symmetricTensor | ( | size_t | resultIndex | ) | const |
Returns the symmetricTensor result at the given index.
Use symmetricTensorIndex() to map from a symmetricTensor id if needed.
DataResultSymmetricTensor * cee::ug::DataResultGroup::symmetricTensor | ( | size_t | resultIndex | ) |
Returns the symmetricTensor result at the given index.
Use symmetricTensorIndex() to map from a symmetricTensor id if needed.
size_t cee::ug::DataResultGroup::symmetricTensorCount | ( | ) | const |
Returns number of symmetricTensor results for this group.
size_t cee::ug::DataResultGroup::symmetricTensorIndex | ( | int | resultId | ) | const |
Returns the index of the result with the given id.
Returns cee::UNDEFINED_SIZE_T if no matching id was found.
const DataResultTransformation * cee::ug::DataResultGroup::transformation | ( | ) | const |
Returns the transformation result.
DataResultTransformation * cee::ug::DataResultGroup::transformation | ( | ) |
Returns the transformation result.
const DataResultVector * cee::ug::DataResultGroup::vector | ( | size_t | resultIndex | ) | const |
Returns the vector result at the given index.
Use vectorIndex() to map from a vector id if needed.
DataResultVector * cee::ug::DataResultGroup::vector | ( | size_t | resultIndex | ) |
Returns the vector result at the given index.
Use vectorIndex() to map from a vector id if needed.
size_t cee::ug::DataResultGroup::vectorCount | ( | ) | const |
Returns number of vector results for this group.
size_t cee::ug::DataResultGroup::vectorIndex | ( | int | resultId | ) | const |
Returns the index of the result with the given id.
Returns cee::UNDEFINED_SIZE_T if no matching id was found.
const DataResultVisibility * cee::ug::DataResultGroup::visibility | ( | ) | const |
Returns the visibility result.
DataResultVisibility * cee::ug::DataResultGroup::visibility | ( | ) |
Returns visibility result.