Cache for setting domain locations at which fields are evaluated or assigned.
More...
#include <fieldcache.hpp>
Cache for setting domain locations at which fields are evaluated or assigned.
Cache for setting domain locations at which fields are to be evaluated or assigned, and for storing intermediate values and data structures so that multiple evaluations are more efficient.
int OpenCMISS::Zinc::Fieldcache::clearLocation |
( |
| ) |
|
|
inline |
Clears domain locations held in the field cache. Call this function before evaluating fields in a different domain (e.g. nodes <-> elements <-> point) to ensure false field values at the last domain location are not returned. Note that all domain locations are cleared by this function including time which is reset to 0.0, so these need to be set again if needed.
- Returns
- Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.
cmzn_fieldcache_id OpenCMISS::Zinc::Fieldcache::getId |
( |
| ) |
const |
|
inline |
Return the C handle of the Fieldcache object.
- Returns
- C handle of Fieldcache if this objects is valid, 0 otherwise.
bool OpenCMISS::Zinc::Fieldcache::isValid |
( |
| ) |
const |
|
inline |
Check if this is a valid Fieldcache object.
- Returns
- Status True if object is valid, false otherwise.
int OpenCMISS::Zinc::Fieldcache::setElement |
( |
const Element & |
element | ) |
|
|
inline |
Prescribes an element location without specifying the location in its local 'xi' chart coordinates (which are all reset to 0). Suitable only for evaluating or assigning to fields that are constant across the element. Note: replaces any other spatial location in cache (e.g. node.) but time is unchanged.
- Parameters
-
element | The element to set. Must belong to same region as cache. |
- Returns
- Status OpenCMISS::Zinc::OK on success, any other value on failure.
int OpenCMISS::Zinc::Fieldcache::setFieldReal |
( |
const Field & |
referenceField, |
|
|
int |
valuesCount, |
|
|
const double * |
valuesIn |
|
) |
| |
|
inline |
Prescribes a value of a field for subsequent evaluation and assignment with the cache. Note: currently treated as a spatial location, replacing any other spatial location in cache (e.g. element, node) but time is unchanged.
- Parameters
-
referenceField | The field whose values are to be prescribed. |
valuesInCount | The size of the values array. Can be less than the number of field components, and if so it is padded with zeroes. |
valuesIn | The field values to set. |
- Returns
- Status OpenCMISS::Zinc::OK on success, any other value on failure.
int OpenCMISS::Zinc::Fieldcache::setMeshLocation |
( |
const Element & |
element, |
|
|
int |
coordinatesCount, |
|
|
const double * |
coordinatesIn |
|
) |
| |
|
inline |
Prescribes a location in a mesh as an element plus local 'xi' chart coordinates, for field evaluation or assignment with the cache. Note: replaces any other spatial location in cache (e.g. node.) but time is unchanged.
- Parameters
-
element | The element the location is in. Must belong to same region as cache. |
coordinatesCount | The size of the local coordinates array, checked to be not less than the element dimension. |
coordinatesIn | Location in element's local 'xi' coordinate chart. Value is not checked; caller is responsible for supplying locations within the bounds of the element shape. |
- Returns
- Status OpenCMISS::Zinc::OK on success, any other value on failure.
int OpenCMISS::Zinc::Fieldcache::setNode |
( |
const Node & |
node | ) |
|
|
inline |
Prescribes a node location for field evaluation or assignment with the cache. Note: replaces any other spatial location in cache (e.g. element) but time is unchanged.
- Parameters
-
node | The node to set as spatial location. Must belong to same region as cache. |
- Returns
- Status OpenCMISS::Zinc::OK on success, any other value on failure.
int OpenCMISS::Zinc::Fieldcache::setTime |
( |
double |
time | ) |
|
|
inline |
Prescribes the time for field evaluation or assignment with the cache.
- Parameters
-
time | The time value to be set. |
- Returns
- Status OpenCMISS::Zinc::OK on success, any other value on failure.
The documentation for this class was generated from the following file: