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

A set of basis functions that can apply over an element of a given dimension. More...

#include <elementbasis.hpp>

Public Types

enum  FunctionType {
  FUNCTION_TYPE_INVALID = CMZN_ELEMENTBASIS_FUNCTION_TYPE_INVALID, FUNCTION_TYPE_CONSTANT = CMZN_ELEMENTBASIS_FUNCTION_TYPE_CONSTANT, FUNCTION_TYPE_LINEAR_LAGRANGE = CMZN_ELEMENTBASIS_FUNCTION_TYPE_LINEAR_LAGRANGE, FUNCTION_TYPE_QUADRATIC_LAGRANGE = CMZN_ELEMENTBASIS_FUNCTION_TYPE_QUADRATIC_LAGRANGE,
  FUNCTION_TYPE_CUBIC_LAGRANGE = CMZN_ELEMENTBASIS_FUNCTION_TYPE_CUBIC_LAGRANGE, FUNCTION_TYPE_LINEAR_SIMPLEX = CMZN_ELEMENTBASIS_FUNCTION_TYPE_LINEAR_SIMPLEX, FUNCTION_TYPE_QUADRATIC_SIMPLEX = CMZN_ELEMENTBASIS_FUNCTION_TYPE_QUADRATIC_SIMPLEX, FUNCTION_TYPE_CUBIC_HERMITE = CMZN_ELEMENTBASIS_FUNCTION_TYPE_CUBIC_HERMITE
}
 

Public Member Functions

 Elementbasis (cmzn_elementbasis_id element_basis_id)
 
 Elementbasis (const Elementbasis &elementBasis)
 
Elementbasisoperator= (const Elementbasis &elementBasis)
 
bool isValid () const
 
cmzn_elementbasis_id getId () const
 
int getDimension ()
 
enum FunctionType getFunctionType (int chartComponent)
 
int setFunctionType (int chartComponent, FunctionType functionType)
 
int getNumberOfNodes ()
 
int getNumberOfFunctions ()
 
int getNumberOfFunctionsPerNode (int nodeNumber)
 

Detailed Description

A set of basis functions that can apply over an element of a given dimension.

A set of basis functions that can apply over an element of a given dimension. The element basis can be a tensor product of different basis function types, with the parameters of the resulting basis cycling over lower element 'xi' coordinates fastest.

Member Enumeration Documentation

Common 1-D or linked-dimension basis function types.

See also
Elementbasis
Enumerator
FUNCTION_TYPE_INVALID 

Invalid or unspecified basis function type

FUNCTION_TYPE_CONSTANT 

Constant value, 1 parameter

FUNCTION_TYPE_LINEAR_LAGRANGE 

Linear Lagrange interpolation over xi in [0,1] with 2 parameters ordered in increasing xi: xi=0, xi=1

FUNCTION_TYPE_QUADRATIC_LAGRANGE 

Quadratic Lagrange interpolation over xi in [0,1] with 3 parameters ordered in increasing xi: xi=0, xi=0.5, xi=1

FUNCTION_TYPE_CUBIC_LAGRANGE 

Cubic Lagrange interpolation over xi in [0,1] with 4 parameters ordered in increasing xi: xi=0, xi=1/3, xi=2/3, xi=1

FUNCTION_TYPE_LINEAR_SIMPLEX 

Linear Lagrange simplex basis linked on 2 or more dimensions over chart xi >= 0, and sum of linked xi coordinates <= 1. 2 linked dimensions gives a linear triangle with 3 parameters with lowest xi cycling fastest: xi (0,0) (1,0) (0,1) 3 linked dimensions gives a linear tetrahedron with 4 parameters with lowest xi cycling fastest: xi (0,0,0) (1,0,0) (0,1,0) (0,0,1)

FUNCTION_TYPE_QUADRATIC_SIMPLEX 

Quadratic Lagrange simplex basis linked on 2 or more dimensions over chart xi >= 0, and sum of linked xi coordinates <= 1. 2 linked dimensions gives a quadratic triangle with 6 parameters with lowest xi cycling fastest: xi (0,0) (0.5,0) (1,0) (0,0.5) (0.5,0.5) (0,1) 3 linked dimensions gives a quadratic tetrahedron with 10 parameters with lowest xi cycling fastest: xi (0,0,0) (0.5,0,0) (1,0,0) (0,0.5,0) (0.5,0.5,0) (0,1,0) (0,0,0.5) (0.5,0,0.5) (0,0.5,0.5) (0,0,1)

FUNCTION_TYPE_CUBIC_HERMITE 

Cubic Hermite basis over xi in [0,1] with 4 parameters: x at xi=0, dx/dxi at xi=0, x at xi=1. dx/dxi at xi=1.

Member Function Documentation

int OpenCMISS::Zinc::Elementbasis::getDimension ( )
inline

Gets the number of dimensions of the elements this basis works with.

Returns
The number of dimensions.
enum FunctionType OpenCMISS::Zinc::Elementbasis::getFunctionType ( int  chartComponent)
inline

Gets the basis function type for a chart component of the basis.

Parameters
chartComponentThe chart component to get the function for from 1 to dimension, or -1 to request function type if homogeneous for all components.
Returns
The basis function type, or INVALID type if failed, including if chart_component -1 is used and basis is not homogeneous.
cmzn_elementbasis_id OpenCMISS::Zinc::Elementbasis::getId ( ) const
inline

Return the C handle of the Elementbasis object.

Returns
C handle of Elementbasis if this objects is valid, 0 otherwise.
int OpenCMISS::Zinc::Elementbasis::getNumberOfFunctions ( )
inline

If the basis is valid, gets the number of functions it has, which equals the number of parameters required. Note that with Hermite bases the parameters are grouped by nodes, i.e. all parameters for the first node are first, followed by those for the second node, and so on. Within the parameters for each node, parameters are ordered by the value/derivative type: the value is first, then DS1 derivatives cycle fastest followed by DS2 then DS3.

Returns
Number of parameters expected, or 0 if basis is incomplete or invalid.
int OpenCMISS::Zinc::Elementbasis::getNumberOfFunctionsPerNode ( int  nodeNumber)
inline

Gets the number of functions / parameters for a given basis node.

See also
Elementbasis::getNumberOfNodes
Parameters
nodeNumberThe basis node index starting at 1, up to number used by basis.
Returns
The number of functions/parameters, or 0 if invalid arguments.
int OpenCMISS::Zinc::Elementbasis::getNumberOfNodes ( )
inline

If the basis is valid, gets the number of nodes the basis expects.

Returns
number of nodes expected, or 0 if basis is incomplete or invalid.
bool OpenCMISS::Zinc::Elementbasis::isValid ( ) const
inline

Check if this is a valid Elementbasis object.

Returns
Status True if object is valid, false otherwise.
int OpenCMISS::Zinc::Elementbasis::setFunctionType ( int  chartComponent,
FunctionType  functionType 
)
inline

Sets a simple basis function type for a component of the basis.

Parameters
chartComponentThe chart component to set the function for from 1 to dimension, or -1 to set all components to use the same function type.
functionTypeThe basis function type to set for the component.
Returns
Result OK on success, any other value on failure.

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