Rigid Body
Overview
This class manages rigid bodies. A rigid body may be defined by a set of elements, element faces or edges or an analytic surface. A set of nodes may be added. It is possible to omit the element entities or analytic surface, in which case the rigid body motion is defined over a set of nodes. The overall motion of the rigid body follows the motion of a single reference node.
The functions associated with a RigidBody object are the following.
- Define and query rigid body type
define()- Define rigid body entity typesinquire()- Inquire rigid body entity typessetMeshInterface()- Set pointers to attribute objects
- Element entity operations
isElementEntityDefined()- Query element entity definedsetElementEntity()- Set element entity
- Node operations
- Analytic surface operations
setAnalyticSurfaceId()- Set analytic surfacegetAnalyticSurfaceId()- Get analytic surface
- Reference node operations
setReferenceNode()- Set reference nodegetReferenceNode()- Get reference node
- Property operations
setPropertyIntegerValue()- Set integer propertygetPropertyFlag()- Query property type definedgetPropertyInformation()- Query property parametersgetPropertyName()- Query property namegetPropertyIntegerValue()- Query property integer value
- List generation operations
getListOfEdges()- Edge list of element entitiesgetListOfFaces()- Face list of element entitiesgetListOfNodes()- Node list of added node entities
- General functions
hasRigidBodyEntitySpecified()- Query any specificationssetName()- Set name stringgetName()- Get name stringgetErrorCode()- Get error code
Set basic entity types using define().
Either an element entity or analytic surface must be specified.
Nodes may be added to the basic entity type. However it is entirely
possible for the rigid body to contain only nodes by not specifying
any element entities or an analytic surface.
If element entities are specified
a GridFun object must be set as an attribute object using
setMeshInterface() so that the RigidBody
object can access finite element
model information and verify element entity specifications.
Element entities are specified using setElementEntity().
An analytic surface is specified using setAnalyticSurfaceId().
Node entities are added using setNode().
The rigid body reference node is defined using setReferenceNode().
Generate a face list of element face entities using
getListOfFaces().
Generate an edge list of element edge entities using
getListOfEdges().
Generate a node list of node entities using
getListOfNodes().
A set of property types is supported for a rigid body.
Specify integer valued properties using setPropertyIntegerValue().
Each property type is identified by a defined constant.
The number of components associated with a
property type is queried using getPropertyInformation().
A long descriptive name which is hard-wired to each property type
may be queried using getPropertyName(). Finally, the property values
themselves may be recovered using getPropertyIntegerValue().
The function getPropertyFlag() is used to determine how a
property has been defined, if at all.
Class Members Descriptions
The currently available RigidBody enumerations and functions are described in detail in this section.
-
class
RigidBody Rigid body class for defining rigid body entities and constraints.
Public Types
-
enum class
NodeType Node constraint type.
Values:
-
enumerator
TIE Tied node (all DOFs constrained)
-
enumerator
PIN Pinned node (only translational DOFs constrained)
-
enumerator
-
enum class
PropertyFlag Property definition flag.
Values:
-
enumerator
UNDEFINED Property not defined.
-
enumerator
VALUE Property defined as value.
-
enumerator
CURVE Property defined as curve.
-
enumerator
Public Functions
-
ErrorCode
getErrorCode() Return the current
ErrorCodeof the RigidBody object.Returns: ErrorCode- The current error code, orNONEif no error.
-
Status
define(EntityType entityType) Set the basic entity types. The entity type may be an element, element edge or face or an analytic surface. Element entities are specified using
setElementEntity(). Analytic surface entities are specified usingsetAnalyticSurfaceId(). Nodes may be added usingsetNode().See Also
inquire()Parameters: entityType – EntityTypeReturns: Status
-
Status
inquire(EntityType *entityType) Inquire of defined entityType as an output argument
See Also
define()Parameters: entityType – [out] EntityTypeReturns: Status
-
Status
setMeshInterface(MeshInterface *functions) Set a pointer to an attribute object (MeshInterface).
Parameters: functions – Pointer to the MeshInterface object to be set. Returns: Status
-
Status
setName(const char *name) Set a name string. The name string can contain up to 81 characters including the terminating NULL. If the name is not specified it is returned as a single NULL character using
getName().See Also
getName()Parameters: name – Name string Returns: Status
-
Status
getName(char name[]) Get name string
See Also
setName()Parameters: name – [out] Name string Returns: Status
-
Status
setElementEntity(int elementIndex, int entityNumber) Set element elementIndex and face or edge number, entityNumber. A face or edge number of zero indicates that the entire element is specified.
- Errors
-
VALUEis generated if an improper elementIndex or entityNumber is specified.
Parameters: - elementIndex – Element index
- entityNumber – Element edge or face number
Returns:
-
Status
isElementEntityDefined(int index, int *elementFlag, int *elementEntityBitFlag) Return element edge or face flags given an element index. If the entity is defined the elementFlag argument is return as 1 otherwise 0.
- Errors
-
VALUEis generated if an improper index is specified.
Parameters: - index – Element index
- elementFlag – [out] Element defined flag
- elementEntityBitFlag – [out] Element edge or face flags
Returns:
-
Status
setNode(int index, NodeType type) Set node index and type.
- Errors
-
VALUEis generated if an improper index is specified.
Parameters: - index – Node index
- type –
NodeType
Returns:
-
Status
getNode(int index, NodeType *type) Get node type. If the node entity type has been defined, the type will be returned. If it has not been defined, zero is returned.
- Errors
-
VALUEis generated if an improper index is specified.
Parameters: - index – Node number
- type – [out]
NodeType
Returns:
-
Status
hasRigidBodyEntitySpecified(int *flag) Query if any element, node or analytic surface specifications of any type have been made. The return value, flag, will be zero only if no entity of any type have been specified.
Parameters: flag – [out] Flag indicating if element, analytic or node specified Returns: Status
-
Status
setReferenceNode(int index) Set reference node
See Also
getReferenceNode()- Errors
-
VALUEis generated if an improper index is specified.
Parameters: index – Reference node index Returns: Status
-
Status
getReferenceNode(int *index) Get reference node
See Also
setReferenceNode()Parameters: index – [out] Reference node index Returns: Status
-
Status
setPropertyIntegerValue(IntegerProperty type, int value) Set an integer valued property. Use
getPropertyIntegerValue()to return integer valued properties.Parameters: - type –
IntegerProperty - value – Property value
Returns: - type –
-
Status
setPropertyDoubleValue(DoubleProperty type, double *value) Set a double valued property. Use
getPropertyDoubleValue()to return double valued properties.Parameters: - type –
DoubleProperty - value – Property value
Returns: - type –
-
Status
getPropertyFlag(IntegerProperty type, PropertyFlag *flag) Query for an integer valued property definition. If a property value is not defined,
UNDEFINEDis returned, if the property has been defined by value thenVALUEis returned.Parameters: - type –
IntegerProperty - flag – [out]
PropertyFlag
Returns: - type –
-
Status
getPropertyFlag(DoubleProperty type, PropertyFlag *flag) Query for a real valued property definition. If a property value is not defined,
UNDEFINEDis returned, if the property has been defined by value thenVALUEis returned.Parameters: - type –
DoubleProperty - flag – [out]
PropertyFlag
Returns: - type –
-
Status
getPropertyInformation(IntegerProperty type, int *componentCount) Query for the number of components of a value associated with an integer property type.
Parameters: - type –
IntegerProperty - componentCount – [out] Number of components
Returns: - type –
-
Status
getPropertyInformation(DoubleProperty type, int *componentCount) Query for the number of components of a value associated with a real property type.
Parameters: - type –
DoubleProperty - componentCount – [out] Number of components
Returns: - type –
-
Status
getPropertyName(IntegerProperty type, char name[]) Query for the built-in name associated with an integer property type. The character string will not exceed 64 characters including the terminating NULL character.
Parameters: - type –
IntegerProperty - name – [out] Property name
Returns: - type –
-
Status
getPropertyName(DoubleProperty type, char name[]) Query for the built-in name associated with a real property type. The character string will not exceed 64 characters including the terminating NULL character.
Parameters: - type –
DoubleProperty - name – [out] Property name
Returns: - type –
-
Status
getPropertyDoubleValue(DoubleProperty type, double value[]) Return a defined double valued property. If the value has not been defined or the value type is not double, nothing is returned.
Parameters: - type –
DoubleProperty - values – [out] Double property.
Returns: - type –
-
Status
getPropertyIntegerValue(IntegerProperty type, int value[]) Return a defined integer valued property. If the value has not been defined or the value type is not integer, nothing is returned.
Parameters: - type –
IntegerProperty - values – [out] Integer property.
Returns: - type –
-
Status
getListOfFaces(IdTranslator *idtranslator) Derive a list of element faces which have been defined. Note that idtranslator is not cleared by this function, the derived element face entities are added to any existing element faces in the output idtranslator.
Parameters: idtranslator – [out] Pointer to derived IdTranslator object of element faces. Returns: Status
-
Status
getListOfEdges(IdTranslator *idtranslator) Derive a list of element edges which have been defined. Note that idtranslator is not cleared by this function, the derived element edge entities are added to any existing element edges in the output idtranslator.
Parameters: idtranslator – [out] Pointer to derived IdTranslator object of element edges. Returns: Status
-
Status
getListOfNodes(NodeType type, IdTranslator *idtranslator) Derive a list of nodes which have been defined with the specified type. Note that idtranslator is not cleared by this function, the derived node entities are added to any existing node in the output idtranslator.
Parameters: - type –
NodeType - idtranslator – [out] Pointer to derived IdTranslator object of nodes
Returns: - type –
-
Status
setAnalyticSurfaceId(int id) Set analytic surface id.
See Also
getAnalyticSurfaceId()- Errors
-
VALUEis generated if an improper id is specified.
Parameters: id – Analytic surface index Returns: Status
-
Status
getAnalyticSurfaceId(int *id) Inquire of analytic surface id as an output argument
See Also
setAnalyticSurfaceId()Parameters: id – [out] Analytic surface index Returns: Status
-
enum class