Initial Condition Case
Overview
This class manages degree of freedom of initial conditions in the form of single point values defined at nodes. An initial condition may consist of a degree of freedom value or the time derivative of a degree of freedom value.
The functions associated with an InitialConditionCase object are the following:
- Set and query initial condition values
setSinglePointValue()- Set a single point initial condition value at a nodegetSinglePointValue()- Query initial conditions given a type at a nodegetSinglePointValueType()- Query initial condition types at a nodegetSinglePointValueMaxNodeIndex()- Query maximum node index for which initial conditions have been definedgetSinglePointValueNodeGroup()- Node group of initial conditions defined nodeshasInitialConditionSpecified()- Query any initial condition specifications
- General functions
Define single point initial condition values at a node using setSinglePointValue().
Query for the number and type of initial conditions at a node using getSinglePointValueType().
Return the initial condition degree of freedom types and associated
values at a node using getSinglePointValue().
Return the maximum node index for which initial conditions have been defined using getSinglePointValueMaxNodeIndex().
Generate a node group of all nodes at which initial conditions have been
defined using getSinglePointValueNodeGroup().
Clear all defined single point initial conditions using clear().
Class Members Descriptions
The currently available InitialConditionCase enumerations and functions are described in detail in this section.
-
class
InitialConditionCase Initial condition case object for managing degree of freedom of initial conditions in the form of single point values defined at nodes.
Public Types
Public Functions
-
ErrorCode
getErrorCode() Return the current
ErrorCodeof the InitialConditionCase object.Returns: ErrorCode- The current error code, orNONEif no error.
-
Status
setSinglePointValue(int nodeIndex, TimeDerivative type, int dofCount, int dofs[], double values[]) Set initial conditions at dofCount degree of freedom types, dofs, with associated values, values, at a node nodeIndex. Use
getSinglePointValueType()to return the number and type of initial conditions defined at a node. UsegetSinglePointValue()to query for the degree of freedom types and values of defined initial conditions.- Errors
-
VALUEis generated if an improper dofCount is specified.
Parameters: - nodeIndex – Node number
- type –
TimeDerivative - dofCount – Number of degree of freedom types
- dofs – Array of degree of freedom types
- values – Array of values
Returns:
-
Status
getSinglePointValueMaxNodeIndex(TimeDerivative type, int *maxNodeIndex) Return the maximum node number for which single point initial conditions have been defined. If no single point initial conditions have been defined then maxNodeIndex is returned as zero.
Parameters: - type –
TimeDerivative - maxNodeIndex – [out] Maximum node number
Returns: - type –
-
Status
getSinglePointValueType(int nodeIndex, int *typeCount, TimeDerivative types[]) Return number of initial condition types, typeCount, and types, types, of all defined initial condition types at node nodeIndex.
Parameters: - nodeIndex – Node number
- typeCount – [out] Number of types of initial conditions
- types – [out]
TimeDerivativeArray of initial condition types
Returns:
-
Status
getSinglePointValue(int nodeIndex, TimeDerivative type, int *dofCount, int dofs[], double values[]) Query for number of degrees of freedom, dofCount, degree of freedom types, dofs and associated initial condition values, values, for a specified initial condition type, type at a node nodeIndex.
Parameters: - nodeIndex – Node number
- type –
TimeDerivative - dofCount – [out] Number of degree of freedom types
- dofs – [out] Array of degree of freedom types
- values – [out] Array of values
Returns:
-
Status
getSinglePointValueNodeGroup(Group *inputNodeGroup, Group *outputNodeGroup) Derive a group of nodes from an input group of nodes which have initial conditions defined. The output outputNodeGroup must have been previously created and defined as a node group. Note that outputNodeGroup is not cleared by this function, the derived node entities are added to any existing nodes in the output outputNodeGroup.
- Errors
-
VALUEis generated if inputNodeGroup is not a node group.
Parameters: Returns:
-
Status
hasInitialConditionSpecified(int *flag) Query if any initial condition specifications of any type have been made. The return value, flag, will be zero only if no initial conditions have been specified of any type.
Parameters: flag – [out] Flag indicating if any initial conditions set Returns: Status
-
Status
setId(int id) Set the identifier for the InitialConditionCase object.
Parameters: id – Identifier value Returns: Status
-
Status
getId(int *id) Get the identifier of the InitialConditionCase object.
Parameters: id – [out] Identifier value Returns: Status
-
Status
setName(const char *name) Set the name for the InitialConditionCase object.
Parameters: name – Name string Returns: Status
-
Status
getName(char name[]) Get the name of the InitialConditionCase object.
Parameters: name – [out] Name string buffer Returns: Status
-
Status
print() Print information about the InitialConditionCase object to standard output.
Returns: Status
-
ErrorCode