OpenCMISS-Zinc C++ API Documentation
 All Classes Namespaces Files Functions Typedefs Enumerations Enumerator Pages
Public Member Functions | List of all members
OpenCMISS::Zinc::Fieldmodule Class Reference

Container/manager of fields and domains within a region. More...

#include <fieldmodule.hpp>

Public Member Functions

 Fieldmodule (cmzn_fieldmodule_id field_module_id)
 
 Fieldmodule (const Fieldmodule &fieldModule)
 
Fieldmoduleoperator= (const Fieldmodule &fieldModule)
 
bool isValid () const
 
cmzn_fieldmodule_id getId () const
 
int beginChange ()
 
int endChange ()
 
int defineAllFaces ()
 
Field findFieldByName (const char *fieldName)
 
Fieldcache createFieldcache ()
 
Fielditerator createFielditerator ()
 
Fieldmodulenotifier createFieldmodulenotifier ()
 
Fieldsmoothing createFieldsmoothing ()
 
Elementbasis createElementbasis (int dimension, enum Elementbasis::FunctionType functionType)
 
Nodeset findNodesetByFieldDomainType (Field::DomainType domainType)
 
Nodeset findNodesetByName (const char *nodeset_name)
 
Mesh findMeshByDimension (int dimension)
 
Mesh findMeshByName (const char *meshName)
 
char * writeDescription ()
 
int readDescription (const char *description)
 
Timesequence getMatchingTimesequence (int timesCount, const double *timesIn)
 
Region getRegion () const
 
Optimisation createOptimisation ()
 
FieldAlias createFieldAlias (const Field &sourceField)
 
FieldAdd createFieldAdd (const Field &sourceField1, const Field &sourceField2)
 
FieldPower createFieldPower (const Field &sourceField1, const Field &sourceField2)
 
FieldMultiply createFieldMultiply (const Field &sourceField1, const Field &sourceField2)
 
FieldDivide createFieldDivide (const Field &sourceField1, const Field &sourceField2)
 
FieldSubtract createFieldSubtract (const Field &sourceField1, const Field &sourceField2)
 
FieldSumComponents createFieldSumComponents (const Field &sourceField)
 
FieldLog createFieldLog (const Field &sourceField)
 
FieldSqrt createFieldSqrt (const Field &sourceField)
 
FieldExp createFieldExp (const Field &sourceField)
 
FieldAbs createFieldAbs (const Field &sourceField)
 
FieldIdentity createFieldIdentity (const Field &sourceField)
 
FieldComponent createFieldComponent (const Field &sourceField, int sourceComponentIndex)
 
FieldComponent createFieldComponent (const Field &sourceField, int sourceComponentIndexesCount, const int *sourceComponentIndexesIn)
 
FieldConcatenate createFieldConcatenate (int fieldsCount, const Field *sourceFields)
 
FieldIf createFieldIf (const Field &sourceField1, const Field &sourceField2, const Field &sourceField3)
 
FieldConstant createFieldConstant (int valuesCount, const double *valuesIn)
 
FieldStringConstant createFieldStringConstant (const char *stringConstant)
 
FieldCoordinateTransformation createFieldCoordinateTransformation (const Field &sourceField)
 
FieldVectorCoordinateTransformation createFieldVectorCoordinateTransformation (const Field &vectorField, const Field &coordinateField)
 
FieldFibreAxes createFieldFibreAxes (const Field &fibreField, const Field &coordinateField)
 
FieldFiniteElement createFieldFiniteElement (int numberOfComponents)
 
FieldEmbedded createFieldEmbedded (const Field &sourceField, const Field &embeddedLocationField)
 
FieldEdgeDiscontinuity createFieldEdgeDiscontinuity (const Field &sourceField)
 
FieldFindMeshLocation createFieldFindMeshLocation (const Field &sourceField, const Field &meshField, const Mesh &mesh)
 
FieldNodeValue createFieldNodeValue (const Field &sourceField, Node::ValueLabel nodeValueLabel, int versionNumber)
 
FieldStoredMeshLocation createFieldStoredMeshLocation (const Mesh &mesh)
 
FieldStoredString createFieldStoredString ()
 
FieldIsExterior createFieldIsExterior ()
 
FieldIsOnFace createFieldIsOnFace (Element::FaceType face)
 
FieldGroup createFieldGroup ()
 
FieldImage createFieldImage ()
 
FieldImage createFieldImageFromSource (const Field &sourceField)
 
FieldAnd createFieldAnd (const Field &sourceField1, const Field &sourceField2)
 
FieldEqualTo createFieldEqualTo (const Field &sourceField1, const Field &sourceField2)
 
FieldGreaterThan createFieldGreaterThan (const Field &sourceField1, const Field &sourceField2)
 
FieldIsDefined createFieldIsDefined (const Field &sourceField)
 
FieldLessThan createFieldLessThan (const Field &sourceField1, const Field &sourceField2)
 
FieldOr createFieldOr (const Field &sourceField1, const Field &sourceField2)
 
FieldNot createFieldNot (const Field &sourceField)
 
FieldXor createFieldXor (const Field &sourceField1, const Field &sourceField2)
 
FieldDeterminant createFieldDeterminant (const Field &sourceField)
 
FieldEigenvalues createFieldEigenvalues (const Field &sourceField)
 
FieldEigenvectors createFieldEigenvectors (const FieldEigenvalues &eigenValuesField)
 
FieldMatrixInvert createFieldMatrixInvert (const Field &sourceField)
 
FieldMatrixMultiply createFieldMatrixMultiply (int numberOfRows, const Field &sourceField1, const Field &sourceField2)
 
FieldProjection createFieldProjection (const Field &sourceField, const Field &projectionMatrixField)
 
FieldTranspose createFieldTranspose (int sourceNumberOfRows, const Field &sourceField)
 
FieldMeshIntegral createFieldMeshIntegral (const Field &integrandField, const Field &coordinateField, const Mesh &mesh)
 
FieldMeshIntegralSquares createFieldMeshIntegralSquares (const Field &integrandField, const Field &coordinateField, const Mesh &mesh)
 
FieldNodesetSum createFieldNodesetSum (const Field &sourceField, const Nodeset &nodeset)
 
FieldNodesetMean createFieldNodesetMean (const Field &sourceField, const Nodeset &nodeset)
 
FieldNodesetSumSquares createFieldNodesetSumSquares (const Field &sourceField, const Nodeset &nodeset)
 
FieldNodesetMeanSquares createFieldNodesetMeanSquares (const Field &sourceField, const Nodeset &nodeset)
 
FieldNodesetMinimum createFieldNodesetMinimum (const Field &sourceField, const Nodeset &nodeset)
 
FieldNodesetMaximum createFieldNodesetMaximum (const Field &sourceField, const Nodeset &nodeset)
 
FieldNodeGroup createFieldNodeGroup (const Nodeset &nodeset)
 
FieldElementGroup createFieldElementGroup (const Mesh &mesh)
 
FieldTimeLookup createFieldTimeLookup (const Field &sourceField, const Field &timeField)
 
FieldTimeValue createFieldTimeValue (const Timekeeper &timeKeeper)
 
FieldDerivative createFieldDerivative (const Field &sourceField, int xi_index)
 
FieldCurl createFieldCurl (const Field &vectorField, const Field &coordinateField)
 
FieldDivergence createFieldDivergence (const Field &vectorField, const Field &coordinateField)
 
FieldGradient createFieldGradient (const Field &sourceField, const Field &coordinateField)
 
FieldSin createFieldSin (const Field &sourceField)
 
FieldCos createFieldCos (const Field &sourceField)
 
FieldTan createFieldTan (const Field &sourceField)
 
FieldAsin createFieldAsin (const Field &sourceField)
 
FieldAcos createFieldAcos (const Field &sourceField)
 
FieldAtan createFieldAtan (const Field &sourceField)
 
FieldAtan2 createFieldAtan2 (const Field &sourceField1, const Field &sourceField2)
 
FieldCrossProduct createFieldCrossProduct (int fieldsCount, const Field *sourceFields)
 
FieldCrossProduct createFieldCrossProduct (const Field &sourceField1, const Field &sourceField2)
 
FieldDotProduct createFieldDotProduct (const Field &sourceField1, const Field &sourceField2)
 
FieldMagnitude createFieldMagnitude (const Field &sourceField)
 
FieldNodeLookup createFieldNodeLookup (const Field &sourceField, const Node &lookupNode)
 
FieldNormalise createFieldNormalise (const Field &sourceField)
 
FieldImagefilterBinaryDilate createFieldImagefilterBinaryDilate (const Field &sourceField, int radius, double dilate_value)
 
FieldImagefilterBinaryErode createFieldImagefilterBinaryErode (const Field &sourceField, int radius, double erode_value)
 
FieldImagefilterBinaryThreshold createFieldImagefilterBinaryThreshold (const Field &sourceField)
 
FieldImagefilterCannyEdgeDetection createFieldImagefilterCannyEdgeDetection (const Field &sourceField, double variance, double maximumError, double upperThreshold, double lowerThreshold)
 
FieldImagefilterConnectedThreshold createFieldImagefilterConnectedThreshold (const Field &sourceField, double lowerThreshold, double upperThreshold, double replaceValue, int dimension, int seedPointsCount, const double *seedPoints)
 
FieldImagefilterCurvatureAnisotropicDiffusion createFieldImagefilterCurvatureAnisotropicDiffusion (const Field &sourceField, double timeStep, double conductance, int numIterations)
 
FieldImagefilterDiscreteGaussian createFieldImagefilterDiscreteGaussian (const Field &sourceField)
 
FieldImagefilterHistogram createFieldImagefilterHistogram (const Field &sourceField)
 
FieldImagefilterMean createFieldImagefilterMean (const Field &sourceField, int radiusSizesCount, const int *radiusSizesIn)
 
FieldImagefilterGradientMagnitudeRecursiveGaussian createFieldImagefilterGradientMagnitudeRecursiveGaussian (const Field &sourceField, double sigma)
 
FieldImagefilterRescaleIntensity createFieldImagefilterRescaleIntensity (const Field &sourceField, double outputMin, double outputMax)
 
FieldImagefilterSigmoid createFieldImagefilterSigmoid (const Field &sourceField, double min, double max, double alpha, double beta)
 
FieldImagefilterThreshold createFieldImagefilterThreshold (const Field &sourceField)
 
FieldSceneviewerProjection createFieldSceneviewerProjection (const Sceneviewer &sceneviewer, Scenecoordinatesystem fromCoordinateSystem, Scenecoordinatesystem toCoordinateSystem)
 

Detailed Description

Container/manager of fields and domains within a region.

Container/manager of fields and domains within a region.

Note that fieldmodule create field methods documented as supporting 'automatic scalar broadcast' for their source field arguments work as follows: if given a mix of scalar and vector source fields, the scalar value is applied to each component of the vector, e.g. the result of ADD(CONSTANT([1 2 3 4], CONSTANT([10]) is [11 12 13 14]. Internally it works by substituing the scalar operand with a concatenate field with the same number of components as the vector operand, but filled with the scalar value.

Member Function Documentation

int OpenCMISS::Zinc::Fieldmodule::beginChange ( )
inline

Begin caching or increment cache level for this field module. Call this function before making multiple changes to fields, nodes, elements etc. from this field module to minimise number of change messages sent to clients. Must call matching fieldmodule end change method after making changes. Note that field module changes are always cached when the region changes are being cached. Can be nested.

See Also
Fieldmodule::endChange
Region::beginChange
Returns
Status OpenCMISS::Zinc::OK on success, any other value on failure.
Elementbasis OpenCMISS::Zinc::Fieldmodule::createElementbasis ( int  dimension,
enum Elementbasis::FunctionType  functionType 
)
inline

Creates an element_basis object for describing element basis functions.

used to define fields in any field module of the region tree.

Parameters
dimensionThe dimension of element chart the basis is for.
functionTypeThe basis function type to use in each dimension i.e. basis function is initially homogeneous.
Returns
Handle to new element basis, or NULL/invalid handle on failure.
FieldAbs OpenCMISS::Zinc::Fieldmodule::createFieldAbs ( const Field sourceField)
inline

Creates a field where the field components are the absolute value of each component in the source field.

Parameters
sourceFieldThe input field
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldAcos OpenCMISS::Zinc::Fieldmodule::createFieldAcos ( const Field sourceField)
inline

Creates a field where the components are the arccosine value (using radians) of the components of the source_field.

Parameters
sourceFieldInput field
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldAdd OpenCMISS::Zinc::Fieldmodule::createFieldAdd ( const Field sourceField1,
const Field sourceField2 
)
inline

Creates a field where the which adds the components of source_field_one and source_field_two. Automatic scalar broadcast will apply, see field.h.

Parameters
sourceField1First input field
sourceField2Second input field
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldAlias OpenCMISS::Zinc::Fieldmodule::createFieldAlias ( const Field sourceField)
inline

Creates a zinc field which is an alias for another field, possibly from another region. This is the main mechanism for reusing field definitions from other regions.

Parameters
sourceFieldThe field which the new field will be an alias for. Can be from a different region.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldAnd OpenCMISS::Zinc::Fieldmodule::createFieldAnd ( const Field sourceField1,
const Field sourceField2 
)
inline

Creates a field whose component values are 1 if that component of source_field_one AND source_field_two is non-zero, 0 otherwise. Automatic scalar broadcast will apply, see field.h.

Parameters
sourceField1First input field
sourceField2Second input field
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldAsin OpenCMISS::Zinc::Fieldmodule::createFieldAsin ( const Field sourceField)
inline

Creates a field where the components are the arcsine value (using radians) of the components of the source_field.

Parameters
sourceFieldInput field (components in radians)
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldAtan OpenCMISS::Zinc::Fieldmodule::createFieldAtan ( const Field sourceField)
inline

Creates a field where the components are the arctangent value (using radians) of the components of the source_field.

Parameters
sourceFieldInput field
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldAtan2 OpenCMISS::Zinc::Fieldmodule::createFieldAtan2 ( const Field sourceField1,
const Field sourceField2 
)
inline

Creates a field where the components are calculated using the atan2 c function, so that the angle returned (in radians) is the angle between a positive x axis in a plane and the vector (x,y) where x is the source_field_one component and y is the source_field_two component.

Parameters
sourceField1First input field
sourceField2Second input field
Returns
Handle to new field, or NULL/invalid handle on failure.
Fieldcache OpenCMISS::Zinc::Fieldmodule::createFieldcache ( )
inline

Creates a field cache for storing a known location and field values and derivatives at that location. Required to evaluate and assign field values.

Returns
Handle to new field cache, or NULL/invalid handle on failure.
FieldComponent OpenCMISS::Zinc::Fieldmodule::createFieldComponent ( const Field sourceField,
int  sourceComponentIndex 
)
inline

Creates a component-type field returning a single component of the source field.

Parameters
sourceFieldThe field the component value is copied from.
sourceComponentIndexThe component index from 1 to number of components of the source field.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldComponent OpenCMISS::Zinc::Fieldmodule::createFieldComponent ( const Field sourceField,
int  sourceComponentIndexesCount,
const int *  sourceComponentIndexesIn 
)
inline

Creates a component-type field returning a single component of the source field.

Parameters
sourceFieldThe field the component value is copied from.
sourceComponentIndexesCountThe component index from 1 to number of components of the source field.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldConcatenate OpenCMISS::Zinc::Fieldmodule::createFieldConcatenate ( int  fieldsCount,
const Field sourceFields 
)
inline

Creates a field which concatenates the components of all source fields, in order, into a single vector.

Parameters
fieldsCountThe number of source fields in the array.
sourceFieldsThe array of fields to be concatenating together.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldConstant OpenCMISS::Zinc::Fieldmodule::createFieldConstant ( int  valuesCount,
const double *  valuesIn 
)
inline

Creates a field with the components specified in the array values. Internally this a composite field.

Parameters
valuesInCountThe number of values in the array.
valuesInThe array of constant values
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldCoordinateTransformation OpenCMISS::Zinc::Fieldmodule::createFieldCoordinateTransformation ( const Field sourceField)
inline

Creates a field which performs a coordinate transformation from the source field values in their coordinate system type into the coordinate system type of this field. Returned field has 3 components.

See Also
Field::setCoordinateSystemType
Parameters
sourceFieldSource field with values in its own coordinate system. Must have 1 to 3 components.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldCos OpenCMISS::Zinc::Fieldmodule::createFieldCos ( const Field sourceField)
inline

Creates a field where the components are the cosine value (using radians) of the components of the source_field.

Parameters
sourceFieldInput field (components in radians)
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldCrossProduct OpenCMISS::Zinc::Fieldmodule::createFieldCrossProduct ( int  fieldsCount,
const Field sourceFields 
)
inline

Creates a vector field which is the cross product of the source_fields. The number of source fields determines the number of components i.e. dimension of the source_fields and the result. Allowable numbers: 1 : single 2-D vector source field. Returns orthogonal vector in 2-D plane given by 90 degree rotation anticlockwise. 2 : two 3-D vector source fields. Returns familiar 3-D cross product vector orthogonal to both source vectors in a right hand sense, whose magnitude is the area of the parallelogram formed by the source vectors on 2 sides. 3 : cross product of three 4-D vector source fields.

Parameters
fieldsCountThe size of the source_fields array, one less than the dimension i.e. number of components of each source_field and the result. Only 1, 2 and 3 fields i.e. 2-D, 3-D and 4-D are supported.
sourceFieldsArray of fields with number of components equal to the dimension i.e. one more than the number_of_source_fields.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldCrossProduct OpenCMISS::Zinc::Fieldmodule::createFieldCrossProduct ( const Field sourceField1,
const Field sourceField2 
)
inline

Creates a vector field which is the cross product of the source_fields. The number of source fields determines the number of components i.e. dimension of the source_fields and the result. Allowable numbers: 1 : single 2-D vector source field. Returns orthogonal vector in 2-D plane given by 90 degree rotation anticlockwise. 2 : two 3-D vector source fields. Returns familiar 3-D cross product vector orthogonal to both source vectors in a right hand sense, whose magnitude is the area of the parallelogram formed by the source vectors on 2 sides. 3 : cross product of three 4-D vector source fields.

Parameters
sourceField1The size of the source_fields array, one less than the dimension i.e. number of components of each source_field and the result. Only 1, 2 and 3 fields i.e. 2-D, 3-D and 4-D are supported.
sourceField2Array of fields with number of components equal to the dimension i.e. one more than the number_of_source_fields.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldCurl OpenCMISS::Zinc::Fieldmodule::createFieldCurl ( const Field vectorField,
const Field coordinateField 
)
inline

Creates a field returning the curl of vector_field at location given by coordinate_field. All fields including return field have 3 components.

Parameters
vectorFieldVector field from which curl is evaluated. Must have rectangular cartesian coordinate system.
coordinateFieldField supplying location.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldDerivative OpenCMISS::Zinc::Fieldmodule::createFieldDerivative ( const Field sourceField,
int  xi_index 
)
inline

Creates a field returning the derivative of the field with respect to element xi_index as its primary value. Returned field has same number of components as source field.

Parameters
sourceFieldSource field to get derivative number.
xi_indexElement coordinate system index for derivative, from 1 to element dimension.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldDeterminant OpenCMISS::Zinc::Fieldmodule::createFieldDeterminant ( const Field sourceField)
inline

Creates a field returning the scalar real determinant of a square matrix source field. Only supports up to 3x3 matrix.

Parameters
sourceFieldField supplying square matrix up to 3x3. May only have 1, 4 or 9 components.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldDivergence OpenCMISS::Zinc::Fieldmodule::createFieldDivergence ( const Field vectorField,
const Field coordinateField 
)
inline

Creates a scalar field returning the divergence of vector field within coordinate field. The number of components of <vector_field> and <coordinate_field> must be the same and less than or equal to 3.

Parameters
vectorFieldVector field from which divergence is evaluated. Must have rectangular cartesian coordinate system.
coordinateFieldField supplying location.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldDivide OpenCMISS::Zinc::Fieldmodule::createFieldDivide ( const Field sourceField1,
const Field sourceField2 
)
inline

Creates a field where the which divides the components of source_field_one by source_field_two. Automatic scalar broadcast will apply, see field.h.

Parameters
sourceField1First input field
sourceField2Second input field
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldDotProduct OpenCMISS::Zinc::Fieldmodule::createFieldDotProduct ( const Field sourceField1,
const Field sourceField2 
)
inline

Creates a scalar field whose value is the dot product of the two supplied source fields, which must have equal numbers of components.

Parameters
sourceField1First source field.
sourceField2Second source field.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldEdgeDiscontinuity OpenCMISS::Zinc::Fieldmodule::createFieldEdgeDiscontinuity ( const Field sourceField)
inline

Creates a field producing a value on 1-D line elements with as many components as the source field, which gives the discontinuity of that field between two adjacent surfaces by a chosen measure. An optional conditional field restricts which adjacent surfaces qualify, with the first two used. The field values are zero when the surfaces are continuous by the chosen measure, and when there are fewer than two qualifying adjacent surfaces. The default measure of discontinuity is C1. In optimisation problems, adding an objective field consisting of the integral of [squares of] this field over a 1-D mesh will favour high- continuity solutions.

See Also
FieldEdgeDiscontinuity::Measure
FieldEdgeDiscontinuity::setMeasure
FieldEdgeDiscontinuity::setConditionalField
Parameters
sourceFieldThe source field to measure discontinuity of.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldEigenvalues OpenCMISS::Zinc::Fieldmodule::createFieldEigenvalues ( const Field sourceField)
inline

Creates a field returning the N eigenvalues of symmetric N*N component source field.

Parameters
sourceFieldN*N component square symmetric matrix field.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldEigenvectors OpenCMISS::Zinc::Fieldmodule::createFieldEigenvectors ( const FieldEigenvalues eigenValuesField)
inline

Creates a field returning the N, N-dimensional eigenvectors computed with the source eigenvalues field. Sets the number of components equal to N*N, where N is the number of components in the <eigenvalues_field>.

Parameters
eigenValuesFieldEigenvalues type field.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldElementGroup OpenCMISS::Zinc::Fieldmodule::createFieldElementGroup ( const Mesh mesh)
inline

Creates an element group field which defines a mesh group i.e. a subset of elements from a master mesh. As a field it evaluates to 1 for elements in the mesh group and 0 elsewhere, i.e. it is the predicate for the sub-domain, and this Boolean value can be combined in logical operations with other fields.

See Also
MeshGroup
Parameters
meshHandle to a finite element mesh the element group is to be compatible with. If it is not a master mesh, the master is obtained from it. Mesh must be from the same region as field_module.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldEmbedded OpenCMISS::Zinc::Fieldmodule::createFieldEmbedded ( const Field sourceField,
const Field embeddedLocationField 
)
inline

Creates a field returning a value of a source field at an embedded location. The new field has the same value type as the source field.

Parameters
sourceFieldField to evaluate at the embedded location. Currently restricted to having numerical values.
embeddedLocationFieldField returning an embedded location, i.e. find_mesh_location or stored mesh location fields.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldEqualTo OpenCMISS::Zinc::Fieldmodule::createFieldEqualTo ( const Field sourceField1,
const Field sourceField2 
)
inline

Creates a field whose component values are 1 if that component of source_field_one EQUALS that component of source_field_two, 0 otherwise. Automatic scalar broadcast will apply, see field.h.

Parameters
sourceField1First input field
sourceField2Second input field
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldExp OpenCMISS::Zinc::Fieldmodule::createFieldExp ( const Field sourceField)
inline

Creates a field where the field components are the natural exponent of each component in the source field.

Parameters
sourceFieldThe input field
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldFibreAxes OpenCMISS::Zinc::Fieldmodule::createFieldFibreAxes ( const Field fibreField,
const Field coordinateField 
)
inline

Creates a "fibre axes" field type which returns a 9-component (3 x 3 vector) field representing an orthonormal coordinate system which is rotated by 3 Euler angles supplied by a fibre field. Three resulting 3 axes are: fibre = fibre direction sheet = fibre normal in the plane of the sheet normal = normal to the fibre sheet Both the fibre and coordinate fields must have no more than 3 components. The fibre field is expected to have a FIBRE coordinate_system, although this is not enforced. Note that this initial orientation of the coordinate system (i.e. for all Euler angles zero) is right handed coordinate system: fibre axis = aligned with d(coordinates)/dxi1 sheet axis = in plane of fibre axis and d(coordinates)/dxi2 but corrected to be closest vector to d(coordinates)/dxi2 which is normal to fibre axes. normal axis = cross product fibre (x) sheet How the components of the fibre angles rotate the above system is described with the FIBRE coordinate system.

See Also
Field::CoordinateSystemType
Parameters
fibreFieldThe (numerical) fibre field with at most 3 components
coordinateFieldThe (numerical) coordinate system with at most 3 components
Returns
Handle to new 9-component field, or NULL/invalid handle on failure.
FieldFindMeshLocation OpenCMISS::Zinc::Fieldmodule::createFieldFindMeshLocation ( const Field sourceField,
const Field meshField,
const Mesh mesh 
)
inline

Creates a field returning the location in a mesh at which the calculated source_field value equals the mesh_field value. Its values consist of an element and coordinates in the element's local 'xi' coordinate chart. Type-specific functions allow the search to find the nearest value and set a conditional field.

Parameters
sourceFieldSource field whose value is to be searched for. Must have the same number of numerical components as the mesh_field, and at least as many as mesh dimension.
meshFieldField defined over the mesh which is to be matched with source_field. Must have the same number of numerical components as the source_field, and at least as many as mesh dimension.
meshThe mesh to find locations in.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldFiniteElement OpenCMISS::Zinc::Fieldmodule::createFieldFiniteElement ( int  numberOfComponents)
inline

Creates a real-valued finite_element field which can be interpolated over a finite element mesh with parameters indexed by nodes.

Parameters
numberOfComponentsThe number of components for the new field.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldGradient OpenCMISS::Zinc::Fieldmodule::createFieldGradient ( const Field sourceField,
const Field coordinateField 
)
inline

Creates a field returning the gradient of a source field with respect to a given coordinate field. Calculation will only succeed in any element with xi-dimension equal to the number of components in the <coordinate_field>. Sets the number of components in return field to the product of the number of components in the <source_field> and <coordinate_field>. Note the <source_field> does not have to be a scalar. If it has more than 1 component, all the derivatives of its first component w.r.t. the components of <coordinate_field> will be returned first, followed by those of the second component, etc. Hence, this function can return the standard gradient of a scalar source_field, and the deformation gradient if a deformed coordinate field is passed as the source_field.

Parameters
sourceFieldField to calculate gradients for.
coordinateFieldField supplying location.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldGreaterThan OpenCMISS::Zinc::Fieldmodule::createFieldGreaterThan ( const Field sourceField1,
const Field sourceField2 
)
inline

Creates a field whose component values are 1 if that component of source_field_one is greater than the component value in source_field_two. Automatic scalar broadcast will apply, see field.h.

Parameters
sourceField1First input field
sourceField2Second input field
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldGroup OpenCMISS::Zinc::Fieldmodule::createFieldGroup ( )
inline

Creates a group field which can contain an arbitrary set of subregions or region subobjects, and works as a boolean-valued field returning 1 on domains in the group, 0 otherwise.

Returns
Handle to new field, or NULL/invalid handle on failure.
FieldIdentity OpenCMISS::Zinc::Fieldmodule::createFieldIdentity ( const Field sourceField)
inline

Creates a field with the single source field. This field is useful as a placeholder candidate for replacement with more complicated operations later on. Internally this a composite field.

Parameters
sourceFieldThe field the values are copied from.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldIf OpenCMISS::Zinc::Fieldmodule::createFieldIf ( const Field sourceField1,
const Field sourceField2,
const Field sourceField3 
)
inline

Creates a conditional field with the same number of components as each of the source_fields. For each component, if the value of source_field_one is TRUE (non-zero) then the result will be the value of source_field_two, otherwise the component result will be taken from source_field_three.

Parameters
sourceField1Conditional field.
sourceField2TRUE = non-zero conditional component results.
sourceField3FALSE = zero conditional component results.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldImage OpenCMISS::Zinc::Fieldmodule::createFieldImage ( )
inline

Creates a new image field. The new field has no image data; this must be set by calling image field specific methods, e.g. read(). The new field is given a default domain field which one can get (or set) with image field functions. To evaluate the image field you will need to set values of the domain field to texture coordinate locations.

See Also
FieldImage::read
Returns
Handle to new image field, or NULL/invalid handle on failure.
FieldImagefilterBinaryDilate OpenCMISS::Zinc::Fieldmodule::createFieldImagefilterBinaryDilate ( const Field sourceField,
int  radius,
double  dilate_value 
)
inline

Creates a field performing ITK binary dilate image filter on scalar source field image. Sets number of components to same number as <source_field>. The <radius> and <dilate_value> specify the radius of pixels to use for dilation and what pixel value to use for dilation

Returns
Handle to new field, or NULL/invalid handle on failure.
FieldImagefilterBinaryErode OpenCMISS::Zinc::Fieldmodule::createFieldImagefilterBinaryErode ( const Field sourceField,
int  radius,
double  erode_value 
)
inline

Creates a field performing ITK binary erode image filter on scalar source field image. Sets number of components to same number as <source_field>. The <radius> and <erode_value> specify the radius of pixels to use for dilation and what pixel value to use for dilation

Returns
Handle to new field, or NULL/invalid handle on failure.
FieldImagefilterBinaryThreshold OpenCMISS::Zinc::Fieldmodule::createFieldImagefilterBinaryThreshold ( const Field sourceField)
inline

Creates a field which applies an ITK binary threshold image filter on source. The newly created field consists of binary values (either 0 or 1) which are determined by applying the threshold range to the source field. Input values with an intensity range between lower_threshold and the upper_threshold are set to 1, the rest are set to 0.

Parameters
sourceFieldThe field to be filtered
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldImagefilterCannyEdgeDetection OpenCMISS::Zinc::Fieldmodule::createFieldImagefilterCannyEdgeDetection ( const Field sourceField,
double  variance,
double  maximumError,
double  upperThreshold,
double  lowerThreshold 
)
inline

Creates a field returning result of ITK canny edge detection filter on the source field image. Sets number of components to same number as source field.

Returns
Handle to new field, or NULL/invalid handle on failure.
FieldImagefilterConnectedThreshold OpenCMISS::Zinc::Fieldmodule::createFieldImagefilterConnectedThreshold ( const Field sourceField,
double  lowerThreshold,
double  upperThreshold,
double  replaceValue,
int  dimension,
int  seedPointsCount,
const double *  seedPoints 
)
inline

Creates a field performing ITK connected threshold image filter on scalar source field image. Sets number of components to same number as source field.

Returns
Handle to new field, or NULL/invalid handle on failure.
FieldImagefilterCurvatureAnisotropicDiffusion OpenCMISS::Zinc::Fieldmodule::createFieldImagefilterCurvatureAnisotropicDiffusion ( const Field sourceField,
double  timeStep,
double  conductance,
int  numIterations 
)
inline

Creates a field performing ITK curvature anisotropic diffusion image filter on scalar source field image. Sets number of components to same number as <source_field>.

Parameters
sourceFieldThe field to be filtered
timeStepThe time step
conductanceThe conductance
numIterationsThe number of iterations to be performed
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldImagefilterDiscreteGaussian OpenCMISS::Zinc::Fieldmodule::createFieldImagefilterDiscreteGaussian ( const Field sourceField)
inline

Creates a field applying the ITK discrete gaussian image filter to the source field. This means that each pixel value in the new field is based on a weighted average of the pixel and the surrounding pixel values from the source field. Pixels further away are given a lower weighting. Increasing the variance increases the width of the gaussian distribution used and hence the number of pixels used to calculate the weighted average. This smooths the image more. A limit is set on the max_kernel_width used to approximate the guassian to ensure the calculation completes.

Parameters
sourceFieldThe field to be filtered
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldImagefilterGradientMagnitudeRecursiveGaussian OpenCMISS::Zinc::Fieldmodule::createFieldImagefilterGradientMagnitudeRecursiveGaussian ( const Field sourceField,
double  sigma 
)
inline

Creates a field performing ITK gradient magnitude recursive gaussian image filter on scalar source field image. Sets number of components to same number as <source_field>.

Returns
Handle to new field, or NULL/invalid handle on failure.
FieldImagefilterHistogram OpenCMISS::Zinc::Fieldmodule::createFieldImagefilterHistogram ( const Field sourceField)
inline

Creates a field performing ITK histogram image filter on source field image. If neither histogramMinimum or histogramMaximum are specified then the minimums and maximums are calculated based on the minimum and maximum values in the input image.

Parameters
sourceFieldThe field to generate the histogram for.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldImagefilterMean OpenCMISS::Zinc::Fieldmodule::createFieldImagefilterMean ( const Field sourceField,
int  radiusSizesCount,
const int *  radiusSizesIn 
)
inline

Creates a field performing ITK mean image filter on source_field image. Sets number of components to same number as <source_field>.

Parameters
sourceFieldThe source field to be processed.
radiusSizesCountThe size of the radius sizes array.
radiusSizesInArray of radius sizes to use in each image axis. If there are fewer sizes than image dimension the last value is used on subsequent image axes.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldImagefilterRescaleIntensity OpenCMISS::Zinc::Fieldmodule::createFieldImagefilterRescaleIntensity ( const Field sourceField,
double  outputMin,
double  outputMax 
)
inline

Creates a field performing ITK rescale intensity image filter on scalar source field image. Sets number of components to same number as source field.

Returns
Handle to new field, or NULL/invalid handle on failure.
FieldImagefilterSigmoid OpenCMISS::Zinc::Fieldmodule::createFieldImagefilterSigmoid ( const Field sourceField,
double  min,
double  max,
double  alpha,
double  beta 
)
inline

Creates a field performing ITK sigmoid image filter on scalar source field image. Sets number of components to same number as <source_field>.

Returns
Handle to new field, or NULL/invalid handle on failure.
FieldImagefilterThreshold OpenCMISS::Zinc::Fieldmodule::createFieldImagefilterThreshold ( const Field sourceField)
inline

Creates a field applying the ITK threshold image filter to the source field. The newly created field replaces certain values with a specified outside value, based on which threshold mode and the threshold values.

Parameters
sourceFieldThe field to be filtered
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldImage OpenCMISS::Zinc::Fieldmodule::createFieldImageFromSource ( const Field sourceField)
inline

Creates a new image field whose image data is sampled from the source field. The source field is typically an image or image-processing field, and its dimension, native resolution and domain field are used as defaults for the new field, or may be changed via image field functions. Non-image source fields give an initial resolution of 1 texel in each image dimension. Texture format will depend on the number of components of the source field: 1 component field creates a LUMINANCE image 2 component field creates a LUMINANCE_ALPHA image 3 component field creates an RGB image 4 component field creates an RGBA image

Parameters
sourceFieldSource field providing image pixel values. Must be image-based with up to 4 components.
Returns
Handle to new image field, or NULL/invalid handle on failure.
FieldIsDefined OpenCMISS::Zinc::Fieldmodule::createFieldIsDefined ( const Field sourceField)
inline

Creates a field returning 1 (true) at locations where the source field is defined and 0 (false) elsewhere.

Parameters
sourceFieldField to check whether defined at location.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldIsExterior OpenCMISS::Zinc::Fieldmodule::createFieldIsExterior ( )
inline

Creates a field which returns 1 on 2-D faces and 1-D lines considered as exterior to their top-level element, and 0 elsewhere.

Returns
Handle to new field, or NULL/invalid handle on failure.
FieldIsOnFace OpenCMISS::Zinc::Fieldmodule::createFieldIsOnFace ( Element::FaceType  face)
inline

Creates a field which returns 1 on 2-D faces and 1-D lines considered to lie on a specified face of their top-level element, and 0 elsewhere.

Parameters
faceThe enumerated face type, defined with respect to the top-level element.
Returns
Handle to new field, or NULL/invalid handle on failure.
Fielditerator OpenCMISS::Zinc::Fieldmodule::createFielditerator ( )
inline

Create a field iterator object for iterating through the fields in the field module, in alphabetical order of name. The iterator initially points at the position before the first field, so the first call to the field iterator next() method returns the first field and advances the iterator. Iterator becomes invalid if fields are added, removed or renamed while in use.

See Also
Fielditerator::next

iterated over.

Returns
Handle to field iterator, or NULL/invalid handle on failure.
FieldLessThan OpenCMISS::Zinc::Fieldmodule::createFieldLessThan ( const Field sourceField1,
const Field sourceField2 
)
inline

Creates a field whose component values are 1 if that component of source_field_one is less than the component value in source_field_two. Automatic scalar broadcast will apply, see field.h.

Parameters
sourceField1First input field
sourceField2Second input field
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldLog OpenCMISS::Zinc::Fieldmodule::createFieldLog ( const Field sourceField)
inline

Creates a field where the field components are the natural logarithm of each component in the source field.

Parameters
sourceFieldThe input field
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldMagnitude OpenCMISS::Zinc::Fieldmodule::createFieldMagnitude ( const Field sourceField)
inline

Creates a scalar field returning the magnitude of the vector source field.

Parameters
sourceFieldSource field to normalise.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldMatrixInvert OpenCMISS::Zinc::Fieldmodule::createFieldMatrixInvert ( const Field sourceField)
inline

Creates a field returning the inverse of N*N symmetric matrix valued source field.

Parameters
sourceFieldN*N component square symmetric matrix field.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldMatrixMultiply OpenCMISS::Zinc::Fieldmodule::createFieldMatrixMultiply ( int  numberOfRows,
const Field sourceField1,
const Field sourceField2 
)
inline

Creates a field returning the values resulting from matrix multiplication <source_field1> x <source_field2>, with <number_of_rows> rows in both <source_field1> and the result. From the <number_of_rows> the columns in <source_field1>, rows in <source_field2> and then columns in <source_field2> are implied and checked.

Parameters
numberOfRowsNumber of rows N in source_field1 and result.
sourceField1N rows * M columns component matrix field 1.
sourceField2M rows * P columns component matrix field 2.
Returns
Handle to new field with N*P components, or NULL/invalid handle on failure.
FieldMeshIntegral OpenCMISS::Zinc::Fieldmodule::createFieldMeshIntegral ( const Field integrandField,
const Field coordinateField,
const Mesh mesh 
)
inline

Creates a field which calculates the numerical integral over the mesh of integrand.dV for volume in 3-D, dA for area in 2-D, dL for length in 1-D. Returned field has same number of components as the integrand field, with each component integrated separately. By default, the integral is calculated by 1-point Gaussian quadrature, sufficient only for linear interpolation. Separate methods are available to set the numbers of quadrature points. Note: uses absolute value of dV/dA/dL so works with right- or left- handed element local coordinate systems. However, cannot handle elements that are partly or completely inverted from expected handedness.

See Also
FieldMeshIntegral::setNumbersOfPoints
Parameters
integrandFieldField to integrate. An integrand of constant value 1 gives the volume/area/length of the mesh.
coordinateFieldField supplying coordinates; must have at least as many components as the mesh, up to a maximum of 3. It is up to the user to supply a field giving values in a Rectangular Cartesian coordinate system, using a coordinate transformation field conversion if needed.
meshThe mesh to integrate over.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldMeshIntegralSquares OpenCMISS::Zinc::Fieldmodule::createFieldMeshIntegralSquares ( const Field integrandField,
const Field coordinateField,
const Mesh mesh 
)
inline

Creates a specialisation of the mesh integral field that integrates the squares of the components of the integrand field. Note that the volume/area/length and weights are not squared in the integral. This field type supports least-squares optimisation by giving individual terms being squared and summed. This field can be cast to a mesh integral field to set type-specific attributes.

See Also
Fieldmodule::createFieldMeshIntegral
FieldMeshIntegral
Parameters
integrandFieldField to integrate the square of.
coordinateFieldField supplying coordinates; must have at least as many components as the mesh, up to a maximum of 3. It is up to the user to supply a field giving values in a Rectangular Cartesian coordinate system, using a coordinate transformation field conversion if needed.
meshThe mesh to integrate over.
Returns
Handle to new field, or NULL/invalid handle on failure.
Fieldmodulenotifier OpenCMISS::Zinc::Fieldmodule::createFieldmodulenotifier ( )
inline

Create a notifier for getting callbacks for changes to the fields and related objects in the field module.

Returns
Handle to new field module notifier, or NULL/invalid handle on failure.
FieldMultiply OpenCMISS::Zinc::Fieldmodule::createFieldMultiply ( const Field sourceField1,
const Field sourceField2 
)
inline

Creates a field where the which multiplies the components of source_field_one and source_field_two. Automatic scalar broadcast will apply, see field.h.

Parameters
sourceField1First input field
sourceField2Second input field
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldNodeGroup OpenCMISS::Zinc::Fieldmodule::createFieldNodeGroup ( const Nodeset nodeset)
inline

Creates a node group field which defines a nodeset group i.e. a subset of nodes from a master nodeset. As a field it evaluates to 1 for nodes in the nodeset group and 0 elsewhere, i.e. it is the predicate for the sub- domain, and this Boolean value can be combined in logical operations with other fields.

See Also
NodesetGroup
Parameters
nodesetHandle to a nodeset the node group is to be compatible with. If it is not a master nodeset, the master is obtained from it. Nodeset must be from the same region as field_module.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldNodeLookup OpenCMISS::Zinc::Fieldmodule::createFieldNodeLookup ( const Field sourceField,
const Node lookupNode 
)
inline

Creates a field whose value equals source field calculated at the lookup node instead of the domain location requested.

Parameters
sourceFieldField to evaluate.
lookupNodeThe node to evaluate the source field at.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldNodesetMaximum OpenCMISS::Zinc::Fieldmodule::createFieldNodesetMaximum ( const Field sourceField,
const Nodeset nodeset 
)
inline

Creates a field which computes the maximum of each source field component over all nodes in the nodeset for which it is defined. Returned field has same number of components as the source field.

Parameters
sourceFieldField to obtain maximum values for.
nodesetThe set of nodes to obtain maximum over.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldNodesetMean OpenCMISS::Zinc::Fieldmodule::createFieldNodesetMean ( const Field sourceField,
const Nodeset nodeset 
)
inline

Creates a field which computes the mean of each source field component over all nodes in the nodeset for which it is defined. Returned field has same number of components as the source field.

Parameters
sourceFieldField to obtain mean component values for.
nodesetThe set of nodes to obtain mean over.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldNodesetMeanSquares OpenCMISS::Zinc::Fieldmodule::createFieldNodesetMeanSquares ( const Field sourceField,
const Nodeset nodeset 
)
inline

Creates a field which computes the mean of the squares of each source field component over all nodes in the nodeset for which it is defined. Returned field has same number of components as the source field. This field type supports least-squares optimisation by giving individual terms being squared and summed, each divided by the square root of the number of terms.

See Also
Optimisation::addObjectiveField
Parameters
sourceFieldField to obtain mean squared component values for.
nodesetThe set of nodes to obtain mean over.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldNodesetMinimum OpenCMISS::Zinc::Fieldmodule::createFieldNodesetMinimum ( const Field sourceField,
const Nodeset nodeset 
)
inline

Creates a field which computes the minimum of each source field component over all nodes in the nodeset for which it is defined. Returned field has same number of components as the source field.

Parameters
sourceFieldField to obtain minimum values for.
nodesetThe set of nodes to obtain minimum over.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldNodesetSum OpenCMISS::Zinc::Fieldmodule::createFieldNodesetSum ( const Field sourceField,
const Nodeset nodeset 
)
inline

Creates a field which computes the sum of each source field component over all nodes in the nodeset for which it is defined. Returned field has same number of components as the source field.

Parameters
sourceFieldField to sum.
nodesetThe set of nodes to sum field over.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldNodesetSumSquares OpenCMISS::Zinc::Fieldmodule::createFieldNodesetSumSquares ( const Field sourceField,
const Nodeset nodeset 
)
inline

Creates a field which computes the sum of the squares of each source field component over all nodes in the nodeset for which it is defined. Returned field has same number of components as the source field. This field type supports least-squares optimisation by giving individual terms being squared and summed.

See Also
Optimisation::addObjectiveField
Parameters
sourceFieldField to sum squared component values of.
nodesetThe set of nodes to sum field over.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldNodeValue OpenCMISS::Zinc::Fieldmodule::createFieldNodeValue ( const Field sourceField,
Node::ValueLabel  nodeValueLabel,
int  versionNumber 
)
inline

Creates a field which represents and returns node values/derivatives.

Parameters
sourceFieldThe field for which the nodal values are stored, this must be a finite element field.
nodeValueLabelThe label of the node value/derivative to return.
versionNumberThe version number of the value or derivative to return, starting from 1.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldNormalise OpenCMISS::Zinc::Fieldmodule::createFieldNormalise ( const Field sourceField)
inline

Creates a field returning the values of source vector field normalised to unit length.

Parameters
sourceFieldSource field to normalise.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldNot OpenCMISS::Zinc::Fieldmodule::createFieldNot ( const Field sourceField)
inline

Creates a field whose component values are 1 if that component of the source_field is zero, 0 otherwise; effectively a component-wise logical not operator. Returned field has same number of components as source field.

Parameters
sourceFieldThe source field.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldOr OpenCMISS::Zinc::Fieldmodule::createFieldOr ( const Field sourceField1,
const Field sourceField2 
)
inline

Creates a field whose component values are 1 if that component of source_field_one OR source_field_two is non-zero, 0 otherwise. Automatic scalar broadcast will apply, see field.h.

Parameters
sourceField1First input field
sourceField2Second input field
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldPower OpenCMISS::Zinc::Fieldmodule::createFieldPower ( const Field sourceField1,
const Field sourceField2 
)
inline

Creates a field where the which calculates the components of source_field_one raised to the power of the components in source_field_two. Automatic scalar broadcast will apply, see field.h.

Parameters
sourceField1First input field
sourceField2Second input field
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldProjection OpenCMISS::Zinc::Fieldmodule::createFieldProjection ( const Field sourceField,
const Field projectionMatrixField 
)
inline

Creates a projection field returning the result of a matrix multiplication with perspective division on the source field vector. The source_field vector is expanded to a homogeneous coordinate by appending a component of value 1, which is multiplied by the projection_matrix_field, and the extra calculated value resulting from the unit component is used to divide through each of the other components to give a perspective projection in the resulting field. The projection_matrix_field must have have a multiple of (source_field->number_of_components + 1) components forming a matrix with that many columns and the resulting (number_of_components + 1) rows. The first values in the projection_matrix are across the first row, followed by the next row and so on. Hence a 4x4 matrix transforms a 3-component vector to a 3-component vector: [x'] = [m1 m2 m3 m4 ][x] [y'] = [m5 m6 m7 m8 ][y] [z'] = [m9 m10 m11 m12][z] [h'] = [m13 m14 m15 m16][1] The resulting field returns 3 components [x'/h', y'/h', z'/h']

Parameters
sourceFieldSource vector field to project.
projectionMatrixFieldField supplying projection matrix.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldSceneviewerProjection OpenCMISS::Zinc::Fieldmodule::createFieldSceneviewerProjection ( const Sceneviewer sceneviewer,
Scenecoordinatesystem  fromCoordinateSystem,
Scenecoordinatesystem  toCoordinateSystem 
)
inline

Creates a field whose values are the 4x4 transformation matrix mapping coordinates between two scene coordinate systems for a scene viewer. The matrix maps homogeneous coordinates (x,y,z,1) to (x',y',z',h') suitable for passing to a projection field. The values are continuously updated with changes to the scene viewer and become invalid if the scene viewer is destroyed. Note CMZN_SCENECOORDINATESYSTEM_LOCAL gives the local coordinate system of the scene for the owning region of field, which is transformed from world coordinates by the cumulative transformation matrices of all scenes down from the root region of the scene viewer's scene.

See Also
Fieldmodule::createFieldProjection.
Parameters
sceneviewerHandle to sceneviewer object.
fromCoordinateSystemThe input coordinate system for the transformation.
toCoordinateSystemThe output coordinate system for the transformation.
Returns
Handle to new field with 16 components, or NULL/invalid handle on failure.
FieldSin OpenCMISS::Zinc::Fieldmodule::createFieldSin ( const Field sourceField)
inline

Creates a field where the components are the sine value (using radians) of the components of the source_field.

Parameters
sourceFieldInput field
Returns
Handle to new field, or NULL/invalid handle on failure.
Fieldsmoothing OpenCMISS::Zinc::Fieldmodule::createFieldsmoothing ( )
inline

Create a new field smoothing object using the default algorithm.

See Also
cmzn_fieldsmoothing_algorithm
Fieldsmoothing::setAlgorithm
Field::smooth
Returns
Handle to new field smoothing, or NULL/invalid handle on failure.
FieldSqrt OpenCMISS::Zinc::Fieldmodule::createFieldSqrt ( const Field sourceField)
inline

Creates a field where the field components are the square root of each component in the source field.

Parameters
sourceFieldThe input field
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldStoredMeshLocation OpenCMISS::Zinc::Fieldmodule::createFieldStoredMeshLocation ( const Mesh mesh)
inline

Creates a field which stores and returns mesh location values at nodes. Its values consists of an element and coordinates in the element's local 'xi' coordinate chart.

Parameters
meshThe mesh for which locations are stored.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldStoredString OpenCMISS::Zinc::Fieldmodule::createFieldStoredString ( )
inline

Creates a field which stores and returns string values at nodes.

Returns
Handle to new field, or NULL/invalid handle on failure.
FieldStringConstant OpenCMISS::Zinc::Fieldmodule::createFieldStringConstant ( const char *  stringConstant)
inline

Creates a string constant field with the supplied string value in <string_constant>.

Parameters
stringConstantThe constant char string.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldSubtract OpenCMISS::Zinc::Fieldmodule::createFieldSubtract ( const Field sourceField1,
const Field sourceField2 
)
inline

Creates a field which gives the result of subtracting source_field_two from source_field_one. Automatic scalar broadcast will apply, see field.h.

Parameters
sourceField1First input field
sourceField2Second input field
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldSumComponents OpenCMISS::Zinc::Fieldmodule::createFieldSumComponents ( const Field sourceField)
inline

Creates a field which has one component equal to the sum of all components of the source field. Also called the L1, taxicab or manhattan norm. For weighted sum of components use a dot_product with a constant weights field.

See Also
Fieldmodule::createFieldDotProduct
Parameters
sourceFieldThe field whose components are to be summed.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldTan OpenCMISS::Zinc::Fieldmodule::createFieldTan ( const Field sourceField)
inline

Creates a field where the components are the trigonometric tangent value (using radians) of the components of the source_field.

Parameters
sourceFieldInput field (components in radians)
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldTimeLookup OpenCMISS::Zinc::Fieldmodule::createFieldTimeLookup ( const Field sourceField,
const Field timeField 
)
inline

Creates a field whose value equals the source_field evaluated at the time given by time_field, overriding any time prescribed for field evaluation.

Parameters
sourceFieldField to evaluate.
timeFieldField providing time value to evaluate at.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldTimeValue OpenCMISS::Zinc::Fieldmodule::createFieldTimeValue ( const Timekeeper timeKeeper)
inline

Creates a field which returns the current time from the supplied time keeper.

Parameters
timeKeepercmzn_timekeeper object.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldTranspose OpenCMISS::Zinc::Fieldmodule::createFieldTranspose ( int  sourceNumberOfRows,
const Field sourceField 
)
inline

Creates a field returning the transpose of N*M matrix source_field. The source_number_of_rows is specified; source_number_of_columns is computed as source_field->number_of_components / <source_number_of_rows>; this division must have no remainder.

Parameters
sourceNumberOfRowsNumber of rows N in source_field.
sourceFieldN rows * M columns component matrix field.
Returns
Handle to new field with M*N matrix components transposed, or NULL/invalid handle on failure.
FieldVectorCoordinateTransformation OpenCMISS::Zinc::Fieldmodule::createFieldVectorCoordinateTransformation ( const Field vectorField,
const Field coordinateField 
)
inline

Creates a field which performs a coordinate transformation of vectors from their original coordinate system and coordinate positions, to the coordinate system of this field. Sets the number of components in returned field to 3 times the number of vectors expected from the source vector_field.

Parameters
vectorFieldVector field to be transformed. Can be a single vector (1,2 or 3 components), two vectors (4 or 6 components) or three vectors (9 components).
coordinateFieldField giving location where vector value is from.
Returns
Handle to new field, or NULL/invalid handle on failure.
FieldXor OpenCMISS::Zinc::Fieldmodule::createFieldXor ( const Field sourceField1,
const Field sourceField2 
)
inline

Creates a field whose component values are 1 if that component of source_field_one OR source_field_two is non-zero (but not both), 0 otherwise. Automatic scalar broadcast will apply, see field.h.

Parameters
sourceField1First input field
sourceField2Second input field
Returns
Handle to new field, or NULL/invalid handle on failure.
Optimisation OpenCMISS::Zinc::Fieldmodule::createOptimisation ( )
inline

Create an optimisation object for optimising values and parameters of fields from a field module.

Returns
Handle to new optimisation, or NULL/invalid handle on failure.
int OpenCMISS::Zinc::Fieldmodule::defineAllFaces ( )
inline

Defines, for all elements of all meshes in field module, face elements of dimension one lower in the associated face mesh, and all their faces recursively down to 1 dimensional lines.

faces for.

Returns
Status OpenCMISS::Zinc::OK on success, any other value on failure.
int OpenCMISS::Zinc::Fieldmodule::endChange ( )
inline

Decrement cache level or end caching of changes for this field module. Call matching fieldmodule begin change method before making multiple changes and call this afterwards. When change level is restored to zero, cached change messages are sent out to clients.

See Also
Fieldmodule::beginChange
Returns
Status OpenCMISS::Zinc::OK on success, any other value on failure.
Field OpenCMISS::Zinc::Fieldmodule::findFieldByName ( const char *  fieldName)
inline

Returns the field of the specified name from the field module.

Parameters
fieldNameThe name of the field to find.
Returns
Handle to field, or NULL/invalid handle if not found or failed.
Mesh OpenCMISS::Zinc::Fieldmodule::findMeshByDimension ( int  dimension)
inline

Get a handle to the default mesh of a given dimension. Cmgui is currently limited to 1 mesh of each dimension from 1 to 3. These meshes have default names of "mesh_Nd", where "N" is the dimension.

Parameters
dimensionThe dimension of the mesh from 1 to 3.
Returns
Handle to the mesh, or NULL/invalid handle on failure.
Mesh OpenCMISS::Zinc::Fieldmodule::findMeshByName ( const char *  meshName)
inline

Get a handle to a finite element mesh from its name. A mesh is the container of elements of a fixed dimension. Valid names may be any element_group field, or any of the following special names: "mesh3d" = 3-D elements. "mesh2d" = 2-D elements including faces of 3-D elements. "mesh1d" = 1-D elements including faces (lines) of 2-D elements. Note that the default names for element group fields created from a group is GROUP_NAME.MESH_NAME, with mesh names as above.

Parameters
meshNameThe name of the finite element mesh.
Returns
Handle to the mesh, or NULL/invalid handle if not found or failed.
Nodeset OpenCMISS::Zinc::Fieldmodule::findNodesetByFieldDomainType ( Field::DomainType  domainType)
inline

Get a handle to a nodeset by its field domain type, either CMZN_FIELD_DOMAIN_TYPE_NODES or CMZN_FIELD_DOMAIN_TYPE_DATAPOINTS.

Parameters
domainTypeCMZN_FIELD_DOMAIN_TYPE_NODES or CMZN_FIELD_DOMAIN_TYPE_DATAPOINTS.
Returns
Handle to the nodeset, or NULL/invalid handle on failure.
Nodeset OpenCMISS::Zinc::Fieldmodule::findNodesetByName ( const char *  nodeset_name)
inline

Get a handle to a nodeset from its name in the field module. A nodeset is the container of nodes - i.e. cmzn_node objects. Valid names may be any node_group field, or the following special names: "nodes" = the primary set of nodes for a region, able to be indexed by elements for storing or mapping to finite element field parameters. "datapoints" = an additional set of nodes generally used to represent data points, not for finite element field parameters. Note that the default names for node group fields created from a group is GROUP_NAME.NODESET_NAME, with nodeset names as above.

Parameters
nodeset_nameThe name of the nodeset.
Returns
Handle to the nodeset, or NULL/invalid handle if not found or failed.
cmzn_fieldmodule_id OpenCMISS::Zinc::Fieldmodule::getId ( ) const
inline

Return the C handle of the Fieldmodule object.

Returns
C handle of Fieldmodule if this objects is valid, 0 otherwise.
Timesequence OpenCMISS::Zinc::Fieldmodule::getMatchingTimesequence ( int  timesCount,
const double *  timesIn 
)
inline

Finds or creates a time sequence in the field module which matches the sequence of times provided.

Parameters
timesInCountThe size of the times array.
timesInArray of times. Note later times must not be less than earlier times.
Returns
Handle to time sequence matching times array, or NULL/invalid handle on failure.
Region OpenCMISS::Zinc::Fieldmodule::getRegion ( ) const
inline

Gets the region this field module can create fields for.

Returns
Handle to owning region, or NULL/invalid handle on failure.
bool OpenCMISS::Zinc::Fieldmodule::isValid ( ) const
inline

Check if this is a valid Fieldmodule object.

Returns
Status True if object is valid, false otherwise.
int OpenCMISS::Zinc::Fieldmodule::readDescription ( const char *  description)
inline

Write the json file describing the fields in this fieldmodule. This may change the current fields' definition.

The string containing json description

Returns
OpenCMISS::Zinc::OK on success, otherwise ERROR status.
char* OpenCMISS::Zinc::Fieldmodule::writeDescription ( )
inline

Write the json file describing the fields in this fieldmodule, which can be used to store the current cmzn_field settings.

Returns
c string containing the json description of fieldmodule, otherwise 0;

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