OpenCMISS-Zinc C++ API Documentation
Public Types | Public Member Functions | Protected Attributes | List of all members
OpenCMISS::Zinc::Field Class Reference

Base field type: an abstraction of a mathematical field. More...

#include <field.hpp>

Inheritance diagram for OpenCMISS::Zinc::Field:
OpenCMISS::Zinc::FieldAbs OpenCMISS::Zinc::FieldAcos OpenCMISS::Zinc::FieldAdd OpenCMISS::Zinc::FieldAlias OpenCMISS::Zinc::FieldAnd OpenCMISS::Zinc::FieldAsin OpenCMISS::Zinc::FieldAtan OpenCMISS::Zinc::FieldAtan2 OpenCMISS::Zinc::FieldComponent OpenCMISS::Zinc::FieldConcatenate OpenCMISS::Zinc::FieldConstant OpenCMISS::Zinc::FieldCoordinateTransformation OpenCMISS::Zinc::FieldCos OpenCMISS::Zinc::FieldCrossProduct OpenCMISS::Zinc::FieldCurl OpenCMISS::Zinc::FieldDerivative OpenCMISS::Zinc::FieldDeterminant OpenCMISS::Zinc::FieldDivergence OpenCMISS::Zinc::FieldDivide OpenCMISS::Zinc::FieldDotProduct OpenCMISS::Zinc::FieldEdgeDiscontinuity OpenCMISS::Zinc::FieldEigenvalues OpenCMISS::Zinc::FieldEigenvectors OpenCMISS::Zinc::FieldElementGroup OpenCMISS::Zinc::FieldEmbedded OpenCMISS::Zinc::FieldEqualTo OpenCMISS::Zinc::FieldExp OpenCMISS::Zinc::FieldFibreAxes OpenCMISS::Zinc::FieldFindMeshLocation OpenCMISS::Zinc::FieldFiniteElement OpenCMISS::Zinc::FieldGradient OpenCMISS::Zinc::FieldGreaterThan OpenCMISS::Zinc::FieldGroup OpenCMISS::Zinc::FieldIdentity OpenCMISS::Zinc::FieldIf OpenCMISS::Zinc::FieldImage OpenCMISS::Zinc::FieldImagefilterBinaryDilate OpenCMISS::Zinc::FieldImagefilterBinaryErode OpenCMISS::Zinc::FieldImagefilterBinaryThreshold OpenCMISS::Zinc::FieldImagefilterCannyEdgeDetection OpenCMISS::Zinc::FieldImagefilterConnectedThreshold OpenCMISS::Zinc::FieldImagefilterCurvatureAnisotropicDiffusion OpenCMISS::Zinc::FieldImagefilterDiscreteGaussian OpenCMISS::Zinc::FieldImagefilterGradientMagnitudeRecursiveGaussian OpenCMISS::Zinc::FieldImagefilterHistogram OpenCMISS::Zinc::FieldImagefilterMean OpenCMISS::Zinc::FieldImagefilterRescaleIntensity OpenCMISS::Zinc::FieldImagefilterSigmoid OpenCMISS::Zinc::FieldImagefilterThreshold OpenCMISS::Zinc::FieldIsDefined OpenCMISS::Zinc::FieldIsExterior OpenCMISS::Zinc::FieldIsOnFace OpenCMISS::Zinc::FieldLessThan OpenCMISS::Zinc::FieldLog OpenCMISS::Zinc::FieldMagnitude OpenCMISS::Zinc::FieldMatrixInvert OpenCMISS::Zinc::FieldMatrixMultiply OpenCMISS::Zinc::FieldMeshIntegral OpenCMISS::Zinc::FieldMultiply OpenCMISS::Zinc::FieldNodeGroup OpenCMISS::Zinc::FieldNodeLookup OpenCMISS::Zinc::FieldNodesetMaximum OpenCMISS::Zinc::FieldNodesetMean OpenCMISS::Zinc::FieldNodesetMeanSquares OpenCMISS::Zinc::FieldNodesetMinimum OpenCMISS::Zinc::FieldNodesetSum OpenCMISS::Zinc::FieldNodesetSumSquares OpenCMISS::Zinc::FieldNodeValue OpenCMISS::Zinc::FieldNormalise OpenCMISS::Zinc::FieldNot OpenCMISS::Zinc::FieldOr OpenCMISS::Zinc::FieldPower OpenCMISS::Zinc::FieldProjection OpenCMISS::Zinc::FieldSceneviewerProjection OpenCMISS::Zinc::FieldSin OpenCMISS::Zinc::FieldSqrt OpenCMISS::Zinc::FieldStoredMeshLocation OpenCMISS::Zinc::FieldStoredString OpenCMISS::Zinc::FieldStringConstant OpenCMISS::Zinc::FieldSubtract OpenCMISS::Zinc::FieldSumComponents OpenCMISS::Zinc::FieldTan OpenCMISS::Zinc::FieldTimeLookup OpenCMISS::Zinc::FieldTimeValue OpenCMISS::Zinc::FieldTranspose OpenCMISS::Zinc::FieldVectorCoordinateTransformation OpenCMISS::Zinc::FieldXor

Public Types

enum  ChangeFlag {
  CHANGE_FLAG_NONE = CMZN_FIELD_CHANGE_FLAG_NONE, CHANGE_FLAG_ADD = CMZN_FIELD_CHANGE_FLAG_ADD, CHANGE_FLAG_REMOVE = CMZN_FIELD_CHANGE_FLAG_REMOVE, CHANGE_FLAG_IDENTIFIER = CMZN_FIELD_CHANGE_FLAG_IDENTIFIER,
  CHANGE_FLAG_DEFINITION = CMZN_FIELD_CHANGE_FLAG_DEFINITION, CHANGE_FLAG_FULL_RESULT = CMZN_FIELD_CHANGE_FLAG_FULL_RESULT, CHANGE_FLAG_PARTIAL_RESULT = CMZN_FIELD_CHANGE_FLAG_PARTIAL_RESULT, CHANGE_FLAG_RESULT = CMZN_FIELD_CHANGE_FLAG_RESULT,
  CHANGE_FLAG_FINAL = CMZN_FIELD_CHANGE_FLAG_FINAL
}
 
enum  CoordinateSystemType {
  COORDINATE_SYSTEM_TYPE_INVALID = CMZN_FIELD_COORDINATE_SYSTEM_TYPE_INVALID, COORDINATE_SYSTEM_TYPE_RECTANGULAR_CARTESIAN = CMZN_FIELD_COORDINATE_SYSTEM_TYPE_RECTANGULAR_CARTESIAN, COORDINATE_SYSTEM_TYPE_CYLINDRICAL_POLAR = CMZN_FIELD_COORDINATE_SYSTEM_TYPE_CYLINDRICAL_POLAR, COORDINATE_SYSTEM_TYPE_SPHERICAL_POLAR = CMZN_FIELD_COORDINATE_SYSTEM_TYPE_SPHERICAL_POLAR,
  COORDINATE_SYSTEM_TYPE_PROLATE_SPHEROIDAL = CMZN_FIELD_COORDINATE_SYSTEM_TYPE_PROLATE_SPHEROIDAL, COORDINATE_SYSTEM_TYPE_OBLATE_SPHEROIDAL = CMZN_FIELD_COORDINATE_SYSTEM_TYPE_OBLATE_SPHEROIDAL, COORDINATE_SYSTEM_TYPE_FIBRE = CMZN_FIELD_COORDINATE_SYSTEM_TYPE_FIBRE
}
 
enum  DomainType {
  DOMAIN_TYPE_INVALID = CMZN_FIELD_DOMAIN_TYPE_INVALID, DOMAIN_TYPE_POINT = CMZN_FIELD_DOMAIN_TYPE_POINT, DOMAIN_TYPE_NODES = CMZN_FIELD_DOMAIN_TYPE_NODES, DOMAIN_TYPE_DATAPOINTS = CMZN_FIELD_DOMAIN_TYPE_DATAPOINTS,
  DOMAIN_TYPE_MESH1D = CMZN_FIELD_DOMAIN_TYPE_MESH1D, DOMAIN_TYPE_MESH2D = CMZN_FIELD_DOMAIN_TYPE_MESH2D, DOMAIN_TYPE_MESH3D = CMZN_FIELD_DOMAIN_TYPE_MESH3D, DOMAIN_TYPE_MESH_HIGHEST_DIMENSION = CMZN_FIELD_DOMAIN_TYPE_MESH_HIGHEST_DIMENSION
}
 
enum  ValueType { VALUE_TYPE_INVALID = CMZN_FIELD_VALUE_TYPE_INVALID, VALUE_TYPE_REAL = CMZN_FIELD_VALUE_TYPE_REAL, VALUE_TYPE_STRING = CMZN_FIELD_VALUE_TYPE_STRING, VALUE_TYPE_MESH_LOCATION = CMZN_FIELD_VALUE_TYPE_MESH_LOCATION }
 
typedef int ChangeFlags
 
typedef int DomainTypes
 

Public Member Functions

 Field (cmzn_field_id field_id)
 
 Field (const Field &field)
 
Fieldoperator= (const Field &field)
 
bool isValid () const
 
cmzn_field_id getId () const
 
Fieldassignment createFieldassignment (const Field &sourceField)
 
bool isManaged ()
 
int setManaged (bool value)
 
char * getComponentName (int componentNumber)
 
int setComponentName (int componentNumber, const char *name)
 
double getCoordinateSystemFocus ()
 
int setCoordinateSystemFocus (double focus)
 
CoordinateSystemType getCoordinateSystemType ()
 
int setCoordinateSystemType (CoordinateSystemType coordinateSystemType)
 
int getNumberOfComponents ()
 
char * getName ()
 
int setName (const char *name)
 
int getNumberOfSourceFields ()
 
Field getSourceField (int index)
 
bool isTypeCoordinate ()
 
int setTypeCoordinate (bool value)
 
ValueType getValueType ()
 
Fieldmodule getFieldmodule () const
 
int assignMeshLocation (const Fieldcache &cache, const Element &element, int coordinatesCount, const double *coordinatesIn)
 
int assignReal (const Fieldcache &cache, int valuesCount, const double *valuesIn)
 
int assignString (const Fieldcache &cache, const char *stringValue)
 
Element evaluateMeshLocation (const Fieldcache &cache, int coordinatesCount, double *coordinatesOut)
 
int evaluateReal (const Fieldcache &cache, int valuesCount, double *valuesOut)
 
char * evaluateString (const Fieldcache &cache)
 
int evaluateDerivative (const Differentialoperator&differentialOperator, const Fieldcache &cache, int valuesCount, double *valuesOut)
 
bool isDefinedAtLocation (const Fieldcache &cache)
 
int smooth (const Fieldsmoothing &fieldsmoothing)
 
FieldComponent castComponent ()
 
FieldEdgeDiscontinuity castEdgeDiscontinuity ()
 
FieldEigenvalues castEigenvalues ()
 
FieldElementGroup castElementGroup ()
 
FieldFindMeshLocation castFindMeshLocation ()
 
FieldFiniteElement castFiniteElement ()
 
FieldGroup castGroup ()
 
FieldImage castImage ()
 
FieldImagefilterBinaryThreshold castImagefilterBinaryThreshold ()
 
FieldImagefilterDiscreteGaussian castImagefilterDiscreteGaussian ()
 
FieldImagefilterHistogram castImagefilterHistogram ()
 
FieldImagefilterThreshold castImagefilterThreshold ()
 
FieldMeshIntegral castMeshIntegral ()
 
FieldNodeGroup castNodeGroup ()
 
FieldStoredMeshLocation castStoredMeshLocation ()
 
FieldStoredString castStoredString ()
 

Protected Attributes

cmzn_field_id id
 

Detailed Description

Base field type: an abstraction of a mathematical field.

Base field type: an abstraction of a mathematical field, a function giving values at locations in a domain (mesh, nodeset, over time). Instances of derived field types give the actual expression in terms of other fields or locations in the domain, all from the same region.

Member Typedef Documentation

Type for passing logical OR of ChangeFlag

See also
Fieldmoduleevent::getFieldChangeFlags

Type for passing logical OR of DomainType

Member Enumeration Documentation

Bit flags summarising changes to a field or fields in a fieldmodule.

Enumerator
CHANGE_FLAG_NONE 

field(s) not changed

CHANGE_FLAG_ADD 

one or more fields added

CHANGE_FLAG_REMOVE 

one or more fields removed

CHANGE_FLAG_IDENTIFIER 

field identifier changed

CHANGE_FLAG_DEFINITION 

change to field attributes other than identifier. If change affects result, CMZN_FIELD_CHANGE_FLAG_FULL_RESULT will also be set; metadata changes do not flag result as changed.

CHANGE_FLAG_FULL_RESULT 

all resultant values of field changed, by its definition changing or by change to a field or other object it depends on.

CHANGE_FLAG_PARTIAL_RESULT 

change to field values on subset of domain: nodes, elements etc. If this flag is set but not CHANGE_FLAG_FULL_RESULT then nodeset and mesh changes describe where on the domain its values have changed.

CHANGE_FLAG_RESULT 

convenient value representing any change affecting result

CHANGE_FLAG_FINAL 

final notification: owning field module i.e. region has been destroyed

Field attribute describing the type of space that its values are to be interpreted in. Although it is usually set for all fields (default is rectangular cartesian, RC), the attribute is only relevant when field is used to supply coordinates or vector values, e.g. to graphics, where it prompts automatic conversion to the underlying RC coordinate system.

Enumerator
COORDINATE_SYSTEM_TYPE_INVALID 

Unspecified coordinate system type

COORDINATE_SYSTEM_TYPE_RECTANGULAR_CARTESIAN 

Default rectangular Cartesian coordinate system

COORDINATE_SYSTEM_TYPE_CYLINDRICAL_POLAR 

Cylindrical polar coordinate system with components r, theta, z. Converts to rectangular Cartesian via: x = r*cos(theta) y = r*sin(theta) z = z

COORDINATE_SYSTEM_TYPE_SPHERICAL_POLAR 

Spherical polar coordinate system with components r, theta, phi. Converts to rectangular Cartesian via: x = r*cos(phi)*cos(theta) y = r*cos(phi)*sin(theta) z = r*sin(phi)

COORDINATE_SYSTEM_TYPE_PROLATE_SPHEROIDAL 

Prolate spheroidal coordinate system with components lambda, mu, theta, with a focus value giving scale. Converts to rectangular Cartesian via: x = focus*cosh(lambda)*cos(mu) y = focus*sinh(lambda)*sin(mu)*cos(theta) z = focus*sinh(lambda)*sin(mu)*sin(theta)

See also
Field::setCoordinateSystemFocus
COORDINATE_SYSTEM_TYPE_OBLATE_SPHEROIDAL 

Oblate spheroidal coordinate system with components lambda, mu, theta, with a focus value giving scale. Converts to rectangular Cartesian via: x = focus*cosh(lambda)*cos(mu)*sin(theta) y = focus*sinh(lambda)*sin(mu) z = focus*cosh(lambda)*cos(mu)*cos(theta)

See also
Field::setCoordinateSystemFocus
COORDINATE_SYSTEM_TYPE_FIBRE 

A fibre/material orthonormal reference coordinate system defined within elements by Euler angle rotations of a coordinate system initially oriented with the derivatives of RC coordinates w.r.t. element 'xi' coordinates: initial fibre vector = normalised dx/dxi1. initial sheet vector = unit vector normal to fibre in xi1-xi2 plane, calculated as: normal (x) fibre. initial normal vector = unit vector normal to xi1-xi2 plane, calculated as: dx/dxi1 (x) dx/dxi2, then normalised. Up to three fibre angles (components of fibre field) are applied as rotations in radians in the following sequence (later steps omitted for fewer components):

  1. fibre angle = anticlockwise (right-hand) rotation of initial fibre & sheet vectors about initial normal vector.
  2. imbrication angle = anticlockwise rotation of initial normal and rotated fibre vectors about the rotated sheet vector.
  3. sheet angle = anticlockwise rotation of the rotated sheet and rotated normal vectors about the rotated fibre vector.

An enumeration specifying the field domain (without domain objects) Also used as bit flags.

Enumerator
DOMAIN_TYPE_INVALID 

Unspecified domain type

DOMAIN_TYPE_POINT 

A single point for the region

DOMAIN_TYPE_NODES 

The set of node points

DOMAIN_TYPE_DATAPOINTS 

The set of data points

DOMAIN_TYPE_MESH1D 

The set of 1-D elements and edge lines of 2-D or 3-D elements

DOMAIN_TYPE_MESH2D 

The set of 2-D elements and faces of 3-D elements

DOMAIN_TYPE_MESH3D 

The set of 3-D elements

DOMAIN_TYPE_MESH_HIGHEST_DIMENSION 

The set of elements of highest dimension in region

The types of values fields may produce.

See also
Field::getValueType
Enumerator
VALUE_TYPE_INVALID 

Unspecified value type

VALUE_TYPE_REAL 

Real value type

VALUE_TYPE_STRING 

String value type

VALUE_TYPE_MESH_LOCATION 

Mesh location value type

Member Function Documentation

int OpenCMISS::Zinc::Field::assignMeshLocation ( const Fieldcache cache,
const Element element,
int  coordinatesCount,
const double *  coordinatesIn 
)
inline

Assign mesh_location field values at location specified in cache. Only supported by stored_mesh_location field type.

Parameters
cacheStore of location to assign at and intermediate field values.
elementThe element to set.
coordinatesCountSize of following element local coordinates array. Must be at least the dimension of the element.
coordinatesInArray containing location to set in element's local 'xi' coordinate chart.
Returns
Status OpenCMISS::Zinc::OK on success, any other value on failure.
int OpenCMISS::Zinc::Field::assignReal ( const Fieldcache cache,
int  valuesCount,
const double *  valuesIn 
)
inline

Assign real values to field at location specified in cache. Only supported for some field types, notably finite_element, node_value, and field operators where only one operand is assignable: these back-calculate value of that operand and assign to it (includes types: offset, scale, coordinate_transformation, vector_coordinate_transformation; latter assumes coordinate field is not assignable.) Only supported for some cache locations: node, or anywhere for constants.

Parameters
cacheStore of location to assign at and intermediate field values.
valuesInCountSize of values array. Checked that it equals or exceeds the number of components of field.
valuesInArray of real values to assign to field.
Returns
Status OpenCMISS::Zinc::OK on success, any other value on failure.
int OpenCMISS::Zinc::Field::assignString ( const Fieldcache cache,
const char *  stringValue 
)
inline

Assign a string value to a field at location specified in cache. Only supported for legacy stored 'finite element' string at node locations, and string_constant at any cache location.

Parameters
cacheStore of location to assign at and intermediate field values.
stringValueThe string value to assign to field.
Returns
Status OpenCMISS::Zinc::OK on success, any other value on failure.
FieldComponent OpenCMISS::Zinc::Field::castComponent ( )
inline

If the field is of component type, then this function returns the derived component field handle.

Returns
Handle to derived component field, or NULL/invalid handle if wrong type or failed.
FieldEdgeDiscontinuity OpenCMISS::Zinc::Field::castEdgeDiscontinuity ( )
inline

If the field is edge discontinuity type then returns the derived edge discontinuity field handle.

Returns
Handle to derived edge discontinuity field, or NULL/invalid handle if wrong type or failed.
FieldEigenvalues OpenCMISS::Zinc::Field::castEigenvalues ( )
inline

If the field is a eigenvalues type field, return the derived field handle.

Returns
Handle to derived eigenvalues field, or NULL/invalid handle if wrong type or failed.
FieldElementGroup OpenCMISS::Zinc::Field::castElementGroup ( )
inline

If field can be cast to an element group return a handle to the derived field.

Returns
Handle to derived element group field, or NULL/invalid handle if wrong type or failed.
FieldFindMeshLocation OpenCMISS::Zinc::Field::castFindMeshLocation ( )
inline

If the field is of type find_mesh_location then this function returns the derived find mesh location field handle.

Returns
Handle to derived find mesh location field, or NULL/invalid handle if wrong type or failed.
FieldFiniteElement OpenCMISS::Zinc::Field::castFiniteElement ( )
inline

If the field is real-valued interpolated finite element then this function returns the derived finite element field handle.

Returns
Handle to derived finite element field, or NULL/invalid handle if wrong type or failed.
FieldGroup OpenCMISS::Zinc::Field::castGroup ( )
inline

If the field is of group type, then this function returns the derived group field handle.

Returns
Handle to derived group field, or NULL/invalid handle if wrong type or failed.
FieldImage OpenCMISS::Zinc::Field::castImage ( )
inline

If the image_field is of type image field then this function returns the derived image field handle.

Returns
Handle to derived image field, or NULL/invalid handle if wrong type or failed.
FieldImagefilterBinaryThreshold OpenCMISS::Zinc::Field::castImagefilterBinaryThreshold ( )
inline

If field can be cast to an imagefilter binary threshold do so and return a handle to the derived field.

Returns
Handle to derived image filter binary threshold field, or NULL/invalid handle if wrong type or failed.
FieldImagefilterDiscreteGaussian OpenCMISS::Zinc::Field::castImagefilterDiscreteGaussian ( )
inline

If field can be cast to an imagefilter discrete gaussian do so and return a handle to the derived field.

Returns
Handle to derived image filter discrete gaussian field, or NULL/invalid handle if wrong type or failed.
FieldImagefilterHistogram OpenCMISS::Zinc::Field::castImagefilterHistogram ( )
inline

If field can be cast to an imagefilter histogram do so and return a handle to the derived field.

Returns
Handle to derived image filter histogram field, or NULL/invalid handle if wrong type or failed.
FieldImagefilterThreshold OpenCMISS::Zinc::Field::castImagefilterThreshold ( )
inline

If field can be cast to an imagefilter threshold do so and return a handle to the derived field.

Returns
Handle to derived image filter threshold field, or NULL/invalid handle if wrong type or failed.
FieldMeshIntegral OpenCMISS::Zinc::Field::castMeshIntegral ( )
inline

If the field is a mesh integral type field, return the derived field handle.

Returns
Handle to derived mesh integral field, or NULL/invalid handle if wrong type or failed.
FieldNodeGroup OpenCMISS::Zinc::Field::castNodeGroup ( )
inline

If field can be cast to a node group return a handle to the derived field.

Returns
Handle to derived node group field, or NULL/invalid handle if wrong type or failed.
FieldStoredMeshLocation OpenCMISS::Zinc::Field::castStoredMeshLocation ( )
inline

If the field is stored_mesh_location type, return type-specific handle to it.

Returns
Handle to derived stored mesh location field, or NULL/invalid handle if wrong type or failed.
FieldStoredString OpenCMISS::Zinc::Field::castStoredString ( )
inline

If the field is stored_string type, return type-specific handle to it.

Returns
Handle to derived stored string field, or NULL/invalid handle if wrong type or failed.
Fieldassignment OpenCMISS::Zinc::Field::createFieldassignment ( const Field sourceField)
inline

Create a field assignment object for assigning values of the target field, from values of the source field.

Parameters
sourceFieldThe source field to assign values from.
Returns
Handle to new field assignment object, or NULL/invalid handle on failure.
int OpenCMISS::Zinc::Field::evaluateDerivative ( const Differentialoperator differentialOperator,
const Fieldcache cache,
int  valuesCount,
double *  valuesOut 
)
inline

Evaluate derivatives of a real-valued field. CURRENT LIMITATIONS:

  1. Can only evaluate at an element location.
  2. Differential operator must be obtained from mesh owning element. It is not yet possible to evaluate derivatives with respect to parent element chart. NOTE: It is currently more efficient to evaluate derivatives before field values since values are cached simultaneously.
Parameters
differentialOperatorThe differential operator identifying which derivative to evaluate. Currently must be obtained from mesh owning element from element location in cache.
cacheStore of location to evaluate at and intermediate field values. Only element locations are supported by this function.
valuesOutCountSize of values array, must equal number of components of field.
valuesOutArray of real values to evaluate derivatives into.
Returns
Status OpenCMISS::Zinc::OK on success, any other value on failure including if field is not defined at cache location.
Element OpenCMISS::Zinc::Field::evaluateMeshLocation ( const Fieldcache cache,
int  coordinatesCount,
double *  coordinatesOut 
)
inline

Evaluate mesh_location field values at location specified in cache.

Parameters
cacheStore of location to evaluate at and intermediate field values.
coordinatesCountSize of following element local coordinates array. Must be at least the dimension of the returned element.
coordinatesOutArray to receive the location in the element's local 'xi' coordinate chart.
Returns
Handle to element, or NULL/invalid handle on failure including field not defined at cache location.
int OpenCMISS::Zinc::Field::evaluateReal ( const Fieldcache cache,
int  valuesCount,
double *  valuesOut 
)
inline

Evaluate real field values at location specified in cache.

Parameters
cacheStore of location to evaluate at and intermediate field values.
valuesOutCountSize of values array. Checked that it equals or exceeds the number of components of field.
valuesOutArray of real values to evaluate into.
Returns
Status OpenCMISS::Zinc::OK on success, any other value on failure including if field is not defined at cache location.
char * OpenCMISS::Zinc::Field::evaluateString ( const Fieldcache cache)
inline

Evaluate field as string at location specified in cache. Numerical valued fields are written to a string with comma separated components. Caller must free returned string with cmzn_deallocate().

Parameters
cacheStore of location to evaluate at and intermediate field values.
Returns
Allocated string value, or NULL on failure including if field is not defined at cache location.
char* OpenCMISS::Zinc::Field::getComponentName ( int  componentNumber)
inline

Get the name of a component of the field. This is only meaningful for finite element fields; all other fields' component names are the string equivalent of the component number, e.g. 1 -> "1" etc. Also, node_value and basis_derivative fields return the base finite element field component names.

Parameters
componentNumberComponent number from 1 to number of components.
Returns
On success: allocated string containing field component name. Up to caller to free using cmzn_deallocate().
double OpenCMISS::Zinc::Field::getCoordinateSystemFocus ( )
inline

Get the coordinate system focus value, used for prolate and oblate spheroidal coordinate system types only.

Returns
The focus length, or 0 if invalid field or current coordinate system type.
CoordinateSystemType OpenCMISS::Zinc::Field::getCoordinateSystemType ( )
inline

Get the coordinate system type to interpret field values in.

Returns
The type of coordinate system.
Fieldmodule OpenCMISS::Zinc::Field::getFieldmodule ( ) const
inline

Returns a handle to the field module which owns this field.

Returns
Handle to owning field module, or NULL/invalid handle on failure.
cmzn_field_id OpenCMISS::Zinc::Field::getId ( ) const
inline

Return the C handle of the Field object.

Returns
C handle of Field if this objects is valid, 0 otherwise.
char* OpenCMISS::Zinc::Field::getName ( )
inline

Return the name of the field.

Returns
On success: allocated string containing field name. Up to caller to free using cmzn_deallocate().
int OpenCMISS::Zinc::Field::getNumberOfComponents ( )
inline

Get the number of components of the field.

Returns
The number of components of the field.
int OpenCMISS::Zinc::Field::getNumberOfSourceFields ( )
inline

Get the number of source fields of this field.

Returns
The number of source fields of the field.
Field OpenCMISS::Zinc::Field::getSourceField ( int  index)
inline

Return a source field of this field at a given index. Source fields are in the order presented in the field constructor followed by any optional source fields set by type-specific API.

Parameters
indexThe index from 1 to number of source fields.
Returns
Handle to source field, or NULL/invalid handle on failure.
ValueType OpenCMISS::Zinc::Field::getValueType ( )
inline

Gets the type of values produced by the field.

Returns
Value type produced by field
bool OpenCMISS::Zinc::Field::isDefinedAtLocation ( const Fieldcache cache)
inline

Determines if the field is defined at the location specified in the field cache, and hence can be evaluated there. Note that a finite element field will return false for this function at a node location where it has parameters, but cannot be evaluated due to not having a complete set of VALUE parameters for all components. The finite element field has a special function for querying whether it has parameters at a location.

See also
FieldFiniteElement::hasParametersAtLocation
Parameters
cacheStore of location to check, and intermediate field values.
Returns
True if defined, false if not defined or error.
bool OpenCMISS::Zinc::Field::isManaged ( )
inline

Get managed status of field in its owning field module.

See also
Field::setManaged
Returns
true if field is managed, otherwise false.
bool OpenCMISS::Zinc::Field::isTypeCoordinate ( )
inline

Get whether the field is marked as coordinate type i.e. appropriate for giving geometric location of a domain.

Returns
True if the field is coordinate type, otherwise false.
bool OpenCMISS::Zinc::Field::isValid ( ) const
inline

Check if this is a valid Field object.

Returns
Status True if object is valid, false otherwise.
int OpenCMISS::Zinc::Field::setComponentName ( int  componentNumber,
const char *  name 
)
inline

Set the name of a component of the field. This is only meaningful for finite element fields, which can be serialised.

Parameters
componentNumberComponent number from 1 to number of components.
nameThe new name of the field component.
Returns
On success, OpenCMISS::Zinc::OK, otherwise any other error code.
int OpenCMISS::Zinc::Field::setCoordinateSystemFocus ( double  focus)
inline

Get the coordinate system focus value, used for prolate and oblate spheroidal coordinate system types only.

See also
Field::setCoordinateSystemType
Parameters
focusThe new focus value, > 0.
Returns
Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.
int OpenCMISS::Zinc::Field::setCoordinateSystemType ( CoordinateSystemType  coordinateSystemType)
inline

Set the coordinate system type to interpret field values in. Note PROLATE_SPHEROIDAL and OBLATE_SPHEROIDAL coordinate system types also require the focus to be set to a positive value.

See also
Field::setCoordinateSystemFocus
Parameters
coordinateSystemTypeThe type of coordinate system.
Returns
Status OpenCMISS::Zinc::OK if successfully set, any other value if failed.
int OpenCMISS::Zinc::Field::setManaged ( bool  value)
inline

Set managed status of field in its owning field module. If set (managed) the field will remain indefinitely in the field module even if no external references are held. If not set (unmanaged) the field will be automatically removed from the module when no longer referenced externally, effectively marking it as pending destruction. All new objects are unmanaged unless stated otherwise.

Parameters
valueThe new value for the managed flag: true or false.
Returns
Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.
int OpenCMISS::Zinc::Field::setName ( const char *  name)
inline

Set the name of the field. Fails if the new name is in use by any other field in the same field module.

Parameters
nameThe new name for the field.
Returns
Status OpenCMISS::Zinc::OK on success, any other value on failure.
int OpenCMISS::Zinc::Field::setTypeCoordinate ( bool  value)
inline

Set whether the field is marked as coordinate type i.e. appropriate for giving geometric location of a domain. Can only be set for some fields e.g. finite_element where its default is false. Other fields may be fixed at either state.

Parameters
valueThe new state of the coordinate type flag.
Returns
Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.
int OpenCMISS::Zinc::Field::smooth ( const Fieldsmoothing fieldsmoothing)
inline

Smooth the field according to the supplied smoothing specification.

are supported by this function.

Returns
Status OpenCMISS::Zinc::OK on success, otherwise any other error code.

The documentation for this class was generated from the following files: