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

A generic group field used for grouping local subobjects. More...

#include <fieldgroup.hpp>

Inheritance diagram for OpenCMISS::Zinc::FieldGroup:
OpenCMISS::Zinc::Field

Public Types

enum  SubelementHandlingMode { SUBELEMENT_HANDLING_MODE_INVALID = CMZN_FIELD_GROUP_SUBELEMENT_HANDLING_MODE_INVALID, SUBELEMENT_HANDLING_MODE_NONE = CMZN_FIELD_GROUP_SUBELEMENT_HANDLING_MODE_NONE, SUBELEMENT_HANDLING_MODE_FULL = CMZN_FIELD_GROUP_SUBELEMENT_HANDLING_MODE_FULL }
 
- Public Types inherited from OpenCMISS::Zinc::Field
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

 FieldGroup (cmzn_field_group_id field_group_id)
 
cmzn_field_group_id getDerivedId ()
 
bool isEmpty ()
 
bool isEmptyLocal ()
 
int clear ()
 
int clearLocal ()
 
int removeEmptySubgroups ()
 
int addLocalRegion ()
 
bool containsLocalRegion ()
 
int removeLocalRegion ()
 
int addRegion (const Region &region)
 
int removeRegion (const Region &region)
 
bool containsRegion (const Region &region)
 
SubelementHandlingMode getSubelementHandlingMode ()
 
int setSubelementHandlingMode (SubelementHandlingMode mode)
 
FieldGroup createSubregionFieldGroup (const Region &region)
 
FieldGroup getSubregionFieldGroup (const Region &region)
 
FieldNodeGroup createFieldNodeGroup (const Nodeset &nodeset)
 
FieldNodeGroup getFieldNodeGroup (const Nodeset &nodeset)
 
FieldElementGroup createFieldElementGroup (const Mesh &mesh)
 
FieldElementGroup getFieldElementGroup (const Mesh &mesh)
 
Field getSubobjectGroupFieldForDomainField (const Field &domainField)
 
FieldGroup getFirstNonEmptySubregionFieldGroup ()
 
- Public Member Functions inherited from OpenCMISS::Zinc::Field
 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 ()
 

Additional Inherited Members

- Protected Attributes inherited from OpenCMISS::Zinc::Field
cmzn_field_id id
 

Detailed Description

A generic group field used for grouping local subobjects.

A generic group field type able to record which local subobjects are in the group (recorded by attached node group and element group fields), or whether the entire local region is in the group. This field returns true/1 at domain locations in the group, false/0 otherwise. The group field also maintains links to child groups in child regions, for building subsets of entire region trees.

Member Enumeration Documentation

Enumeration controlling how subelements (faces, lines, nodes) are handled when parent elements are added or removed from subobject groups.

Enumerator
SUBELEMENT_HANDLING_MODE_INVALID 

Invalid mode

SUBELEMENT_HANDLING_MODE_NONE 

Do not add/remove faces, lines or nodes with parent elements. This is the default mode for new groups.

SUBELEMENT_HANDLING_MODE_FULL 

Ensure group contains all faces, lines and nodes for any higher dimension element added to the group; on removal of an element remove any of its faces, lines and nodes not part of any neighbour element. More expensive to maintain.

Member Function Documentation

int OpenCMISS::Zinc::FieldGroup::addLocalRegion ( )
inline

Add the local/owning region of this group field to the group, i.e. all local objects/domains. This function is not hierarchical: subregions are not added. Note that subobject groups such as node and element groups attached to this group field are left intact by this function.

Returns
Status OpenCMISS::Zinc::OK on success, any other value on failure.
int OpenCMISS::Zinc::FieldGroup::addRegion ( const Region region)
inline

Add the specified region to the group i.e. all its objects/domains. The specified region must be in the tree of this group's local/owning region and not already in the group. This function is not hierarchical: subregions are not added.

Parameters
regionHandle to region to be added.
Returns
Status OpenCMISS::Zinc::OK if successfully add region into group, any other value on failure.
int OpenCMISS::Zinc::FieldGroup::clear ( )
inline

Remove all objects from this group, clear all its subgroups, and remove & destroy them if possible.

Returns
Status OpenCMISS::Zinc::OK if group and its child groups cleared successfully, any other value on failure.
int OpenCMISS::Zinc::FieldGroup::clearLocal ( )
inline

Remove all local objects from group, but leave subregion subgroups intact.

Returns
Status OpenCMISS::Zinc::OK if group is successfully cleared locally, any other value on failure.
bool OpenCMISS::Zinc::FieldGroup::containsLocalRegion ( )
inline

Query if group contains its local/owning region, i.e. all local objects/ domains. This function is not hierarchical: subregions are not checked.

Returns
Boolean true if all of local region is in group, otherwise false.
bool OpenCMISS::Zinc::FieldGroup::containsRegion ( const Region region)
inline

Query if specified region is in the group i.e. all its objects/domains. The specified region must be in the tree of this group's local/owning region. This function is not hierarchical: subregions are not checked.

Parameters
regionHandle to region to check.
Returns
Boolean true if group contains region, otherwise false.
FieldElementGroup OpenCMISS::Zinc::FieldGroup::createFieldElementGroup ( const Mesh mesh)
inline

Create and return an element group field compatible with the supplied mesh, i.e. able to contain elements from its master mesh. The element group field is registered as a sub-object group for this group. The mesh can be from the group's own region or any subregion of it. Subregion groups for any intermediate and the final mesh-owning regions are automatically created to contain the element group, if needed. Fails if a compatible element group field already exists.

Parameters
meshHandle to a mesh the element group is to be compatible with. If not already a master mesh, the master is obtained from it.
Returns
Handle to new, empty element group field, or NULL/invalid handle on failure.
FieldNodeGroup OpenCMISS::Zinc::FieldGroup::createFieldNodeGroup ( const Nodeset nodeset)
inline

Create and return a node group field compatible with the supplied nodeset, i.e. able to contain nodes from its master nodeset. The node group field is registered as a sub-object group for this group. The nodeset can be from the group's own region or any subregion of it. Subregion groups for any intermediate and the final nodeset-owning regions are automatically created to contain the node group, if needed. Fails if a compatible node group field already exists.

Parameters
nodesetHandle to a nodeset the node group is to be compatible with. If not already a master nodeset, the master is obtained from it.
Returns
Handle to new, empty node group field, or NULL/invalid handle on failure.
FieldGroup OpenCMISS::Zinc::FieldGroup::createSubregionFieldGroup ( const Region region)
inline

Create a group field for the specified subregion, include it in the specified group and return a handle to the newly created sub-group field. The specified region must be in the tree of this group's local/owning region and not already in the group.

Parameters
regionHandle to region to create a subgroup for.
Returns
Handle to new, empty subregion group field, or NULL/invalid handle on failure.
cmzn_field_group_id OpenCMISS::Zinc::FieldGroup::getDerivedId ( )
inline

Return the C handle of the derived FieldGroup object.

Returns
C handle of the derived FieldGroup if this objects is valid, 0 otherwise.
FieldElementGroup OpenCMISS::Zinc::FieldGroup::getFieldElementGroup ( const Mesh mesh)
inline

Find and return handle to the sub-object element group compatible with the specified mesh, if one exists for the group. The mesh can be from the group's own region or any subregion of it.

Parameters
meshHandle to a mesh the element group is to be compatible with. If not already a master mesh, the master is obtained from it.
Returns
Handle to element group field, or NULL/invalid handle if none or failed.
FieldNodeGroup OpenCMISS::Zinc::FieldGroup::getFieldNodeGroup ( const Nodeset nodeset)
inline

Find and return handle to the sub-object node group compatible with the specified nodeset, if one exists for the group. The nodeset can be from the group's own region or any subregion of it.

Parameters
nodesetHandle to a nodeset the node group is to be compatible with. If not already a master nodeset, the master is obtained from it.
Returns
Handle to node group field, or NULL/invalid handle if none or failed.
FieldGroup OpenCMISS::Zinc::FieldGroup::getFirstNonEmptySubregionFieldGroup ( )
inline

Return the first non-empty subregion group in the group tree including itself.

Returns
Handle to first non-empty subregion group field, or NULL/invalid handle if none or failed.
SubelementHandlingMode OpenCMISS::Zinc::FieldGroup::getSubelementHandlingMode ( )
inline

Get mode controlling how subelements (faces, lines, nodes) are handled when parent elements are added or removed from subobject groups.

Returns
The subelement handling mode, or SUBELEMENT_HANDLING_MODE_INVALID on error.
Field OpenCMISS::Zinc::FieldGroup::getSubobjectGroupFieldForDomainField ( const Field domainField)
inline

Get a subgroup of the given group for the specified domain.

Parameters
domainFieldthe domain field
Returns
Handle to field representing subobject group, or NULL/invalid handle if none or failed.
FieldGroup OpenCMISS::Zinc::FieldGroup::getSubregionFieldGroup ( const Region region)
inline

Get the group field for subregion in the specified group if it exists. The specified region must be in the tree of this group's local/owning region.

Parameters
regionHandle to region to get the subgroup for.
Returns
Handle to subregion group field, or NULL/invalid handle if not found or failed.
bool OpenCMISS::Zinc::FieldGroup::isEmpty ( )
inline

Query if this group and all its subregion and sub-object groups are empty.

Returns
Boolean true if group and its subgroups are empty, otherwise false.
bool OpenCMISS::Zinc::FieldGroup::isEmptyLocal ( )
inline

Query if this group contains no objects from the local region.

Returns
Boolean true if group is empty locally, otherwise false.
int OpenCMISS::Zinc::FieldGroup::removeEmptySubgroups ( )
inline

Remove and destroy all empty subregion and subobject groups of this group. Empty subgroups in use by other clients may remain after call.

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

Remove the local/owning region of this group field from the group, i.e. all local objects/domains. This function is not hierarchical: subregions are not removed. Note that subobject groups such as node and element groups attached to this group field are left intact by this function.

Returns
Status OpenCMISS::Zinc::OK on success, any other value on failure.
int OpenCMISS::Zinc::FieldGroup::removeRegion ( const Region region)
inline

Remove specified region from group if currently in it. The specified region must be in the tree of this group's local/owning region. This function is not hierarchical: subregions are not removed.

Parameters
regionHandle to region to be removed.
Returns
Status OpenCMISS::Zinc::OK if region successfully removed from group, any other value on failure.
int OpenCMISS::Zinc::FieldGroup::setSubelementHandlingMode ( SubelementHandlingMode  mode)
inline

Set mode controlling how subelements (faces, lines, nodes) are handled when parent elements are added or removed from subobject groups. Note this mode only affects what happens for subsequently added or removed elements - it does not change the contents of the group.

Parameters
modeThe new subelement handling mode.
Returns
Status OpenCMISS::Zinc::OK on success, otherwise OpenCMISS::Zinc::ERROR_ARGUMENT.

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