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:

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

enum class TimeDerivative

Time derivative type for initial condition.

Values:

enumerator ZERO

Degree of freedom value.

enumerator FIRST

Time derivative value.

Public Functions

ErrorCode getErrorCode()

Return the current ErrorCode of the InitialConditionCase object.

Returns: ErrorCode - The current error code, or NONE if 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. Use getSinglePointValue() to query for the degree of freedom types and values of defined initial conditions.

Errors
VALUE is 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

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:
Returns:

Status

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] TimeDerivative Array of initial condition types
Returns:

Status

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

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
VALUE is generated if inputNodeGroup is not a node group.

Parameters:
  • inputNodeGroup – Pointer to Group object of nodes. If NULL, then all nodes are assumed.
  • outputNodeGroup[out] Pointer to derived Group object of nodes.
Returns:

Status

Status clear()

Clear all defined single point initial conditions.

Returns:Status
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