OpenCMISS-Zinc C++ API Documentation
|
A template defining field parameter mapping and interpolation over an element chart. More...
#include <elementfieldtemplate.hpp>
Public Types | |
enum | ParameterMappingMode { PARAMETER_MAPPING_MODE_INVALID = CMZN_ELEMENTFIELDTEMPLATE_PARAMETER_MAPPING_MODE_INVALID, PARAMETER_MAPPING_MODE_ELEMENT = CMZN_ELEMENTFIELDTEMPLATE_PARAMETER_MAPPING_MODE_ELEMENT, PARAMETER_MAPPING_MODE_FIELD = CMZN_ELEMENTFIELDTEMPLATE_PARAMETER_MAPPING_MODE_FIELD, PARAMETER_MAPPING_MODE_NODE = CMZN_ELEMENTFIELDTEMPLATE_PARAMETER_MAPPING_MODE_NODE } |
enum | ScaleFactorType { SCALE_FACTOR_TYPE_INVALID = CMZN_ELEMENTFIELDTEMPLATE_SCALE_FACTOR_TYPE_INVALID, SCALE_FACTOR_TYPE_ELEMENT_GENERAL = CMZN_ELEMENTFIELDTEMPLATE_SCALE_FACTOR_TYPE_ELEMENT_GENERAL, SCALE_FACTOR_TYPE_ELEMENT_PATCH = CMZN_ELEMENTFIELDTEMPLATE_SCALE_FACTOR_TYPE_ELEMENT_PATCH, SCALE_FACTOR_TYPE_GLOBAL_GENERAL = CMZN_ELEMENTFIELDTEMPLATE_SCALE_FACTOR_TYPE_GLOBAL_GENERAL, SCALE_FACTOR_TYPE_GLOBAL_PATCH = CMZN_ELEMENTFIELDTEMPLATE_SCALE_FACTOR_TYPE_GLOBAL_PATCH, SCALE_FACTOR_TYPE_NODE_GENERAL = CMZN_ELEMENTFIELDTEMPLATE_SCALE_FACTOR_TYPE_NODE_GENERAL, SCALE_FACTOR_TYPE_NODE_PATCH = CMZN_ELEMENTFIELDTEMPLATE_SCALE_FACTOR_TYPE_NODE_PATCH } |
Public Member Functions | |
Elementfieldtemplate (cmzn_elementfieldtemplate_id elementfieldtemplate_id) | |
Elementfieldtemplate (const Elementfieldtemplate &elementfieldtemplate) | |
Elementfieldtemplate & | operator= (const Elementfieldtemplate &elementfieldemplate) |
bool | isValid () const |
cmzn_elementfieldtemplate_id | getId () const |
Elementbasis | getElementbasis () const |
int | getFunctionNumberOfTerms (int functionNumber) const |
int | setFunctionNumberOfTerms (int functionNumber, int newNumberOfTerms) |
int | getNumberOfFunctions () const |
int | getNumberOfLocalNodes () const |
int | setNumberOfLocalNodes (int number) |
int | getNumberOfLocalScaleFactors () const |
int | setNumberOfLocalScaleFactors (int number) |
ParameterMappingMode | getParameterMappingMode () const |
int | setParameterMappingMode (ParameterMappingMode mode) |
int | getScaleFactorIdentifier (int localScaleFactorIndex) const |
int | setScaleFactorIdentifier (int localScaleFactorIndex, int identifier) |
ScaleFactorType | getScaleFactorType (int localScaleFactorIndex) const |
int | setScaleFactorType (int localScaleFactorIndex, ScaleFactorType type) |
int | getTermLocalNodeIndex (int functionNumber, int term) const |
Node::ValueLabel | getTermNodeValueLabel (int functionNumber, int term) const |
int | getTermNodeVersion (int functionNumber, int term) const |
int | setTermNodeParameter (int functionNumber, int term, int localNodeIndex, Node::ValueLabel nodeValueLabel, int version) |
int | getTermScaling (int functionNumber, int term, int indexesCount, int *indexesOut) const |
int | setTermScaling (int functionNumber, int term, int indexesCount, const int *indexesIn) |
bool | validate () |
A template defining field parameter mapping and interpolation over an element chart.
A template defining parameter mapping and interpolation for a scalar quantity over an element chart, to apply to field components across elements of a mesh. Consists of an element basis, plus how to evaluate the parameter multiplying each function in the basis. The element parameter for each basis function is defined as a sum of zero or more terms, with each term multiplied by zero or more scale factors given by their local indexes. Depending on the parameter mapping mode, the terms map node parameters, element parameters or spatially constant field parameters. For node parameters each term extracts a node value/derivative version for a local node. When used on the mesh, a local-to-global node map for this template is applied to give different parameters for each element field component, and element scale factors are similarly indexed for each element.
Modes for how element parameters are mapped from global DOFs.
Enumerator | |
---|---|
PARAMETER_MAPPING_MODE_INVALID |
Invalid mapping mode |
PARAMETER_MAPPING_MODE_ELEMENT |
Element parameters are mapped directly by element |
PARAMETER_MAPPING_MODE_FIELD |
Constant value for field component |
PARAMETER_MAPPING_MODE_NODE |
Element parameters are mapped from nodes via local-to-global node map |
Unique types for element scale factors which together with node/element and scale factor identifier allow merging of common scale factors in neighbouring elements, or for different templates in the same element. Note that types with the PATCH suffix are intended to be used for rescaling, e.g. scaling arc-length derivatives to be with respect to element chart. Note that a NODE type scale factor must scale parameters from exactly one local node. Note that ELEMENT types are currently limited to using scale factor identifier 0, meaning unique to a given element and element field template.
|
inline |
Get the element basis used by this element field template.
The parameter mapping mode or INVALID on error.
|
inline |
Get the number of terms that are summed to give the element parameter weighting the given function number.
functionNumber | Basis function number from 1 to number of functions. |
|
inline |
Return the C handle of the Elementfieldtemplate object.
|
inline |
Get the number of basis functions in the element basis used by the template.
|
inline |
Get the number of local nodes this element field template uses.
|
inline |
Get the number of local scale factors this element field template uses.
|
inline |
Get the parameter mapping mode used for all parameters in the template.
|
inline |
Get the identifier of the scale factor mapped to the local scale factor index. Used to match common scale factors between elements and fields.
localScaleFactorIndex | The local scale factor index from 1 to number of local scale factors. |
|
inline |
Get the type of scale factor mapped to the local scale factor index. Used to match common scale factors between elements and fields.
localScaleFactorIndex | The local scale factor index from 1 to number of local scale factors. |
|
inline |
Get the local node index from which a node parameter is extracted for the given term for the function number. For parameter mapping mode NODE only.
functionNumber | Basis function number from 1 to number of functions. |
term | The term number, from 1 to function number of terms. |
|
inline |
Get the node parameter value label mapped to the given term for the function number. For parameter mapping mode NODE only.
functionNumber | Basis function number from 1 to number of functions. |
term | The term number, from 1 to function number of terms. |
|
inline |
Get the node parameter version mapped to the given term for the function number. For parameter mapping mode NODE only.
functionNumber | Basis function number from 1 to number of functions. |
term | The term number, from 1 to function number of terms. |
|
inline |
Get the number and local indexes of scale factors multiplying the given term for the function number. For parameter mapping mode NODE only.
functionNumber | Basis function number from 1 to number of functions. |
term | The term number, from 1 to function number of terms. |
indexesCount | The size of the indexes array; can be more or less than the number of indexes in use. |
indexesOut | Array to store indexesCount indexes. Can be NULL if indexesCount is zero. |
|
inline |
Check if this is a valid Elementfieldtemplate object.
|
inline |
Set the number of terms that are summed to give the element parameter weighting the given basis function number. Currently only supported for node mapping - other parameter mapping modes are fixed at 1 term. If reducing number, existing mappings for higher terms are discarded. If increasing number, new mappings must be completely specified by subsequent calls; new mappings are unscaled by default.
functionNumber | Basis function number from 1 to number of functions. |
newNumberOfTerms | New number of terms to be summed, >= 0. |
|
inline |
Set the number of local nodes this element field template uses. If reducing number, template is only valid once all indexes are in the range [1..number]. Only valid in node mapping mode.
number | The number of local nodes to set, > 0. |
|
inline |
Set the number of local scale factors this element field template uses. If reducing number, template is only valid once all indexes are in the range [1..number]. Only valid in node mapping mode. New local scale factors default to type LOCAL_GENERAL, version 1.
number | The number of local scale factors to set, >= 0. |
|
inline |
Set the parameter mapping mode used for all parameters in the template. A current restriction is that all parameters are mapped by NODE, ELEMENT or FIELD. Note this resets the mapping to the default for the given mapping mode: one term per basis function with no scaling hence should be the first setting changed.
mode | The parameter mapping mode to set. |
|
inline |
Set the identifier of the scale factor mapped to the local scale factor index. Used to match common scale factors between elements and fields. Global scale factors are matched by type and as appropriate global node/element and local or global scale factor identifier. For each global scale factor type, the identifier is globally unique. For each node-based scale factor type, the identifier is unique at each node. For each element-based scale factor, only the special identifier 0 is currently permitted, and scale factors are private to each element and element field template. To tie node-based scale factor identifiers to node value labels/derivatives, the recommended convention is to use an identifier matching the numerical value of the node value label enumeration, and for each distinct version of the scale factor, add 100 times the version number (to allow for new node value labels in future). New scale factors default to ELEMENT GENERAL type with identifier 0.
localScaleFactorIndex | The local scale factor index from 1 to number of local scale factors. |
identifier | The identifier >= 0. Special value 0 is only permitted for element type scale factors, but this is not checked until final validation. |
|
inline |
Set the type of scale factor mapped to the local scale factor index. Used to match common scale factors between elements and fields. Global scale factors are matched by type and as appropriate global node/element and local or global scale factor identifier. New scale factors default to ELEMENT GENERAL type.
localScaleFactorIndex | The local scale factor index from 1 to number of local scale factors. |
type | The element scale factor type. |
|
inline |
Set the node parameter mapped to the given term for the function number, via the local node index, node value label and node parameter version. For parameter mapping mode NODE only.
functionNumber | Basis function number from 1 to number of functions. |
term | The term number, from 1 to function number of terms. |
localNodeIndex | The local node index from 1 to number of local nodes. |
nodeValueLabel | The node parameter value label. |
version | The node parameter version >= 1. |
|
inline |
Set scaling of the function term by the product of scale factors at the given local scale factor indexes. Must have set positive number of local scale factors before calling. For parameter mapping mode NODE only.
functionNumber | Basis function number from 1 to number of functions. |
term | The term number, from 1 to function number of terms. |
indexesCount | The size of the indexes array; can be more or less than the number of indexes in use. |
indexesIn | Array of indexesCount indexes, each from 1 to number of local scale factors. Can be NULL if indexesCount is zero. |
|
inline |
Query whether element field template passes validation. Failure typically results from local node or scale factor indexes being out of range, or use of combinations of values that are not supported, e.g. scale factor identifiers have various restrictions for each type. Refer to the respective API help to determine what is valid. Validation errors are sent to the logger; clients may either inspect logger output or query template to determine source of error.