6. Loads and Constraints - LCase, RCase, MCase, ICase

The LCase module is designed to manage concentrated nodal loads, nodal parameters, distributed element loads and overall accelerations. The RCase module is designed to manage single point degree of freedom constraints. The MCase module is designed to manage multi point degree of freedom constraints. The ICase module is designed to manage degree of freedom initial conditions.

Note that all case modules hold floating point data internally in double precision.

6.1. Load Case - LCase

The LCase module manages concentrated nodal loads such as forces and moments and element distributed loads such as pressures, tractions, etc. It also manages nodal parameters such as temperature which may be used for thermal loading or temperature dependent material properties. Distributed loads over an element face or edge may vary over the face or edge nodes. Body forces over an element may vary over each element node. In addition, overall accelerations due to gravity or rotational effects may be stored and queried. The load values may be a general function of time or frequency. Note that complex valued concentrated node loads, distributed loads and element body loads may be specified. This is used for example in steady state structural dynamics.

The functions associated with a LCase object are the following.

Instance a LCase object initially using vis_LCaseBegin(). Complex valued concentrated, distributed and element body loads may be specified. The real and imaginary parts of a complex valued load may be specified one at a time or together depending upon the state of the complex mode of LCase. The user sets the complex mode using vis_LCaseSetComplexMode(). See section VisTools, Complex Numbers for a description of the general usage of complex valued data in Vistools modules.

Set a concentrated loads at a node using vis_LCaseSetConc() or add a load using vis_LCaseAddConc(). Generate a node group of all nodes at which concentrated loads have been defined using vis_LCaseNodeGroup(). Query for the number and type of concentrated loads at a node using vis_LCaseConcType(). The function vis_LCaseConcFlag() may be used to test for concentrated loads set at a node. Return the concentrated load value at a node using vis_LCaseConc(). Return the maximum node index for which concentrated loads have been defined using vis_LCaseConcMax().

Each concentrated load component may be assigned a separate table identifier using the function vis_LCaseSetConcTId(). These tables are represented by TCurve objects and are normally used to specify time or frequency dependent variation of the individual components of concentrated loads.

Concentrated load types are as follows.

  • LCASE_FORCE - force vector at a node.

  • LCASE_MOMENT - moment vector at a node.

  • LCASE_HEAT - heat generation at a node.

  • LCASE_TEMP - temperature at a node.

  • LCASE_CSCA - generic scalar at a node.

  • LCASE_CVEC - generic vector at a node.

The force and moment vectors are assumed to be in the global coordinate system.

Set distributed loads on element faces or edges using vis_LCaseSetDist() or add distributed loads using vis_LCaseAddDist(). At this point a GridFun object must be set as an attribute object using vis_LCaseSetObject() so that the LCase object can access finite element model information. Generate an edge or face group of all element edges or faces at which distributed loads have been defined using vis_LCaseEdgeGroup() and vis_LCaseFaceGroup(). Query for the number and type of distributed loads at an element edge or face using vis_LCaseDistType(). The function vis_LCaseDistFlag() may be used to test for distributed loads set at an element. Return the distributed load values at an element edge or face using vis_LCaseDist(). Return the maximum element index for which distributed loads have been defined using vis_LCaseDistMax(). Each distributed load on an element face or edge may be assigned a separate table identifier using the function vis_LCaseSetDistTId().

Distributed load types are as follows.

  • LCASE_TRAC - traction vector at each node on element edge or face.

  • LCASE_DMOM - distributed moment vector at each node on element edge or face.

  • LCASE_PRES - pressure scalar at each node on element face. Positive values are assumed to act in the opposite direction of the face normal.

  • LCASE_TANGFORCE - force scalar at each node on element edge.

  • LCASE_TANGMOMENT - moment scalar at each node on element edge.

  • LCASE_HEATFLUX - heat flux at each node on element edge or face.

  • LCASE_HEATCONV - heat convection sink temperature and film coefficient at each node on element edge or face.

  • LCASE_HEATRAD - heat radiation ambient temperature and emissivity at each node on element edge or face.

  • LCASE_DSCA - generic distributed scalar at each node on element edge or face.

  • LCASE_DVEC - generic distributed vector at each node on element edge or face.

Define element body loads on element node using vis_LCaseSetElem() or add element body loads using vis_LCaseAddElem(). At this point a GridFun object must be set as an attribute object using vis_LCaseSetObject() so that the LCase object can access finite element model information. Generate an element group of all elements at which element loads have been defined using vis_LCaseElemGroup(). Query for the number and type of element loads using vis_LCaseElemType(). The function vis_LCaseElemFlag() may be used to test for element loads set on an element. Return the element load values using vis_LCaseElem(). Return the maximum element index for which element loads have been defined using vis_LCaseElemMax(). Each distributed load on an element face or edge may be assigned a separate table identifier using the function vis_LCaseSetElemTId().

Element body load types are as follows.

  • LCASE_ACCLELEM - body force on element.

  • LCASE_HEATELEM - volumetric heat generation on element.

Define accelerations due to gravity, spin, etc. using vis_LCaseSetAccel(). Query for the definition of accelerations using vis_LCaseAccelFlag(). Return accelerations using vis_LCaseAccel().

6.2. Function Descriptions

The currently available LCase functions are described in detail in this section.

vis_LCase *vis_LCaseBegin(void)

create an instance of a LCase object

Create an instance of a LCase object. Memory is allocated for the object private data and the pointer to the data is returned.

Destroy an instance of a LCase object using

void vis_LCaseEnd (vis_LCase *lcase)

Return the current value of a LCase object error flag using

Vint vis_LCaseError (vis_LCase *lcase)

Returns

The function returns a pointer to the newly created LCase object. If the object creation fails, NULL is returned.

void vis_LCaseEnd(vis_LCase *p)

destroy an instance of a LCase object

See vis_LCaseBegin()

Vint vis_LCaseError(vis_LCase *p)

return the current value of a LCase object error flag

See vis_LCaseBegin()

void vis_LCaseSetObject(vis_LCase *p, Vint objecttype, Vobject *object)

set pointers to attribute objects.

Set a pointer to an attribute object. A GridFun attribute object is required before any definition or query of element distributed loads.

Errors

VIS_ERROR_OBJECTTYPE is generated if an improper objecttype is specified.

Parameters
  • p – Pointer to LCase object.

  • objecttype – The name of the object type to be set.

    x=VIS_GRIDFUN            GridFun object
    

  • object – Pointer to the object to be set.

void vis_LCaseSetComplexMode(vis_LCase *p, Vint complexmode)

set specify/query mode for complex data

Set complex mode. By default the complex mode is SYS_COMPLEX_REAL.

Get complexmode as an output argument.

void vis_LCaseGetComplexMode (const vis_LCase *lcase,
                              Vint *complexmode)

Parameters
  • p – Pointer to LCase object.

  • complexmode – Complex mode

    x=SYS_COMPLEX_REAL           Real
     =SYS_COMPLEX_IMAGINARY      Imaginary
     =SYS_COMPLEX_REALIMAGINARY  Real and imaginary
    

void vis_LCaseGetComplexMode(vis_LCase *p, Vint *complexmode)

get specify/query mode for complex data

See vis_LCaseSetComplexMode()

void vis_LCaseGetComplex(vis_LCase *p, Vint *complexflag)

query for complex data existence

Query for complex data. The complexflag will be returned as one if the complex mode set by vis_LCaseSetComplexMode() is ever SYS_COMPLEX_IMAGINARY or SYS_COMPLEX_REALIMAGINARY, otherwise it is returned as zero.

Parameters
  • p – Pointer to LCase object.

  • complexflag[out] Complex data existence flag

void vis_LCaseSetConc(vis_LCase *p, Vint index, Vint type, Vfloat value[])

set a single concentrated load

Set a single concentrated load at node index, replacing any previously existing concentrated load at node index. Use vis_LCaseConcType() to return the number and type of loads defined at a node. Use vis_LCaseConc() to return the applied values of a given type of concentrated load at a node.

Errors

  • SYS_ERROR_VALUE is generated if an improper index is specified.

  • SYS_ERROR_ENUM is generated if an improper type is specified.

Parameters
  • p – Pointer to LCase object.

  • index – Node number

  • type – Concentrated load type

    x=LCASE_FORCE             Vector of applied force
     =LCASE_MOMENT            Vector of applied moment
     =LCASE_HEAT              Scalar applied heat
     =LCASE_TEMP              Scalar temperature
     =LCASE_CSCA              Generic scalar
     =LCASE_CVEC              Generic vector
    

  • value – Load values

void vis_LCaseSetConcdv(vis_LCase *p, Vint index, Vint type, Vdouble val[])

set a single concentrated load

See vis_LCaseSetConc()

void vis_LCaseSetConcTId(vis_LCase *p, Vint index, Vint type, Vint tid[])

set a concentrated load table id

Set concentrated load table identifiers at node index. A concentrated load value must have been previously set using vis_LCaseSetConc(). A table identifier is set for each component of the concentrated load.

Errors

  • SYS_ERROR_VALUE is generated if an improper index is specified.

  • SYS_ERROR_ENUM is generated if an improper type is specified.

  • SYS_ERROR_OPERATION is generated if a concentrated load value for this type has not been previously specified.

Parameters
  • p – Pointer to LCase object.

  • index – Node number

  • type – Concentrated load type

  • tid – Table identifiers

void vis_LCaseAddConc(vis_LCase *p, Vint index, Vint type, Vfloat value[3])

add a single concentrated load

Add a single concentrated load at node index. Use vis_LCaseSetConc() to set a concentrated load.

Errors

  • SYS_ERROR_VALUE is generated if an improper index is specified.

  • SYS_ERROR_ENUM is generated if an improper type is specified.

Parameters
  • p – Pointer to LCase object.

  • index – Node number

  • type – Concentrated load type

    x=LCASE_FORCE             Vector of applied force
     =LCASE_MOMENT            Vector of applied moment
     =LCASE_HEAT              Scalar applied heat
     =LCASE_TEMP              Scalar temperature
     =LCASE_CSCA              Generic scalar
     =LCASE_CVEC              Generic vector
    

  • value – Load values

void vis_LCaseAddConcdv(vis_LCase *p, Vint index, Vint type, Vdouble val[3])

add a single concentrated load

See vis_LCaseAddConc()

void vis_LCaseConcMax(vis_LCase *p, Vint type, Vint *maxindex)

query maximum node index

Return the maximum node number for which a concentrated load of type has been defined. If no concentrated loads of type have been defined then maxindex is returned as zero.

Parameters
  • p – Pointer to LCase object.

  • type – Concentrated load type

  • maxindex[out] Maximum node number

void vis_LCaseConcFlag(vis_LCase *p, Vint index, Vint type, Vint *flag)

query concentrated load set given a type

Query for a concentrated load having been set for a specified load type at a node index. If a concentrated load has been defined at the node then flag is set to 1 otherwise it is set to 0.

Errors

  • SYS_ERROR_VALUE is generated if an improper index is specified.

  • SYS_ERROR_ENUM is generated if an improper type is specified.

Parameters
  • p – Pointer to LCase object.

  • index – Node number

  • type – Concentrated load type

  • flag[out] Flag indicating if concentrated load set

void vis_LCaseConcType(vis_LCase *p, Vint index, Vint *ntypes, Vint type[])

query concentrated load types at a node

Return number of concentrated load types, ntypes, and types, type, of all defined concentrated load types at node index.

Errors

SYS_ERROR_VALUE is generated if an improper index is specified.

Parameters
  • p – Pointer to LCase object.

  • index – Node number

  • ntypes[out] Number of types of concentrated loads

  • type[out] Array of concentrated load types

void vis_LCaseConc(vis_LCase *p, Vint index, Vint type, Vfloat value[])

query concentrated load given a type

Query for concentrated load values for a specified load type at a node index.

Errors

  • SYS_ERROR_VALUE is generated if an improper index is specified.

  • SYS_ERROR_ENUM is generated if an improper type is specified.

Parameters
  • p – Pointer to LCase object.

  • index – Node number

  • type – Concentrated load type

  • value[out] Applied values

void vis_LCaseConcdv(vis_LCase *p, Vint index, Vint type, Vdouble val[])

query concentrated load given a type

See vis_LCaseConc()

void vis_LCaseConcTId(vis_LCase *p, Vint index, Vint type, Vint tid[])

query concentrated load table id given type

Query for concentrated load table identifiers for a specified load type at a node index.

Errors

  • SYS_ERROR_VALUE is generated if an improper index is specified.

  • SYS_ERROR_ENUM is generated if an improper type is specified.

Parameters
  • p – Pointer to LCase object.

  • index – Node number

  • type – Concentrated load type

  • tid[out] Table identifier

void vis_LCaseSetDist(vis_LCase *p, Vint enttype, Vint index, Vint no, Vint type, Vfloat value[])

set a distributed load

Set a distributed load at an edge or face, no, of element index. Traction, tangent force and moment, and heat flux, heat radiation and heat convection may be specified on element edges. Distributed loads applied to edges are per unit length for 3D elements and per unit area for 2D elements (such as 2D axisymmetric solid elements). Traction, pressure and heat flux, heat radiation and heat convection may be specified on element faces. Distributed loads applied to faces are per unit area. Use vis_LCaseDistType() to return the number and type of loads defined at an element edge or face. Use vis_LCaseDist() to return the applied values of a given type of distribute load at an element edge or face.

Errors

  • SYS_ERROR_VALUE is generated if an improper index or no is specified.

  • SYS_ERROR_ENUM is generated if an improper enttype or type is specified.

  • VIS_ERROR_NULLOBJECT is generated if a GridFun object has not been set.

Parameters
  • p – Pointer to LCase object.

  • enttype – Entity type on which load is applied

    =SYS_EDGE     Element edge
    =SYS_FACE     Element face
    

  • index – Element number

  • no – Element edge or face number

  • type – Distributed load type

    x=LCASE_TRAC              Vector of tractions at each node
     =LCASE_DMOM              Vector of moments at each node
     =LCASE_PRES              Scalar pressure at each node
     =LCASE_TANGFORCE         Scalar tangential force at each node
     =LCASE_TANGMOMENT        Scalar tangential moment at each node
     =LCASE_HEATCONV          Scalars heat convection at each node
     =LCASE_HEATRAD           Scalars heat radiation at each node
     =LCASE_HEATFLUX          Scalar heat flux at each node
     =LCASE_DSCA              Scalar at each node
     =LCASE_DVEC              Vector at each node
    

  • value – Load values

void vis_LCaseSetDistdv(vis_LCase *p, Vint enttype, Vint index, Vint no, Vint type, Vdouble val[])

set a distributed load

See vis_LCaseSetDist()

void vis_LCaseSetDistTId(vis_LCase *p, Vint enttype, Vint index, Vint no, Vint type, Vint tid[])

set a distributed load table id

Set a distributed load table identifiers at an edge or face, no, of element index. A distributed load value must have been previously set using vis_LCaseSetDist().

Errors

  • SYS_ERROR_VALUE is generated if an improper index or no is specified.

  • SYS_ERROR_ENUM is generated if an improper enttype or type is specified.

  • VIS_ERROR_NULLOBJECT is generated if a GridFun object has not been set.

  • SYS_ERROR_OPERATION is generated if a distributed load value for this type has not been previously specified.

Parameters
  • p – Pointer to LCase object.

  • enttype – Entity type on which load is applied

    =SYS_EDGE     Element edge
    =SYS_FACE     Element face
    

  • index – Element number

  • no – Element edge or face number

  • type – Distributed load type

  • tid – Table identifiers

void vis_LCaseAddDist(vis_LCase *p, Vint enttype, Vint index, Vint no, Vint type, Vfloat value[])

add a distributed load

Add a distributed load at an edge or face, no, of element index. Traction, tangent force and moment, and heat flux, heat convection and heat radiation may be specified on element edges. vis_LCaseSetDist() to set a distributed load.

Errors

  • SYS_ERROR_VALUE is generated if an improper index or no is specified.

  • SYS_ERROR_ENUM is generated if an improper enttype or type is specified.

  • VIS_ERROR_NULLOBJECT is generated if a GridFun object has not been set.

Parameters
  • p – Pointer to LCase object.

  • index – Element number

  • enttype – Entity type on which load is applied

    =SYS_EDGE     Element edge
    =SYS_FACE     Element face
    

  • no – Element edge or face number

  • type – Distributed load type

    x=LCASE_TRAC              Vector of tractions at each node
     =LCASE_DMOM              Vector of moments at each node
     =LCASE_PRES              Scalar pressure at each node
     =LCASE_TANGFORCE         Scalar tangential force at each node
     =LCASE_TANGMOMENT        Scalar tangential moment at each node
     =LCASE_HEATCONV          Scalars heat convection at each node
     =LCASE_HEATRAD           Scalars heat radiation at each node
     =LCASE_HEATFLUX          Scalar heat flux at each node
     =LCASE_DSCA              Scalar at each node
     =LCASE_DVEC              Vector at each node
    

  • value – Load values

void vis_LCaseAddDistdv(vis_LCase *p, Vint enttype, Vint index, Vint no, Vint type, Vdouble val[])

add a distributed load

See vis_LCaseAddDist()

void vis_LCaseDistMax(vis_LCase *p, Vint enttype, Vint type, Vint *maxindex)

query maximum element index

Return the maximum element number for which a distributed load of type applied to entity type, enttype, has been defined. If no distributed loads have been defined then maxindex is returned as zero.

Parameters
  • p – Pointer to LCase object.

  • enttype – Entity type on which load is applied

    =SYS_EDGE     Element edge
    =SYS_FACE     Element face
    

  • type – Distributed load type

  • maxindex[out] Maximum element number

void vis_LCaseDistFlag(vis_LCase *p, Vint enttype, Vint index, Vint type, Vint *flag)

query distributed load set given a type

Get bit flags, encoded in flag, for element index indicating which element entities have had distributed loads of type set. The flags for element faces are returned encoded in the low order 6 bits. The flags for element edges are returned encoded in the low order 12 bits.

Parameters
  • p – Pointer to LCase object.

  • enttype – Entity type on which load is applied

    =SYS_EDGE     Element edge
    =SYS_FACE     Element face
    

  • index – Element number

  • type – Distributed load type

  • flag[out] Flags indicating entities for which distributed load set

void vis_LCaseDistType(vis_LCase *p, Vint enttype, Vint index, Vint no, Vint *ntypes, Vint type[])

query distributed load types

Return number of distributed load types, ntypes, and types, type, of all defined distributed load types at edge or face, no, of element index.

Parameters
  • p – Pointer to LCase object.

  • index – Element number

  • enttype – Entity type on which load is applied

    =SYS_EDGE     Element edge
    =SYS_FACE     Element face
    

  • no – Element edge or face number

  • ntypes[out] Number of types of distributed loads

  • type[out] Array of distributed load types

void vis_LCaseDist(vis_LCase *p, Vint enttype, Vint index, Vint no, Vint type, Vint enflag, Vfloat value[])

query distributed load given a type

Query for distributed load values for a specified load type at an edge or face, no, of element index. If the element node flag, enflag, is set then the distributed load values will be returned at element nodes rather than element edge or face nodes.

Errors

VIS_ERROR_NULLOBJECT is generated if a GridFun object has not been set.

Parameters
  • p – Pointer to LCase object.

  • enttype – Entity type on which load is applied

    =SYS_EDGE     Element edge
    =SYS_FACE     Element face
    

  • index – Element number

  • no – Element edge or face number

  • type – Distributed load type

  • enflag – Flag to return distributed loads at element nodes

  • value[out] Applied distributed load values at nodes

void vis_LCaseDistdv(vis_LCase *p, Vint enttype, Vint index, Vint no, Vint type, Vint enflag, Vdouble val[])

query distributed load given a type

See vis_LCaseDist()

void vis_LCaseDistTId(vis_LCase *p, Vint enttype, Vint index, Vint no, Vint type, Vint tid[])

query distributed load table id given a type

Query for distributed load table identifiers for a specified load type at an edge or face, no, of element index.

Errors

VIS_ERROR_NULLOBJECT is generated if a GridFun object has not been set.

Parameters
  • p – Pointer to LCase object.

  • enttype – Entity type on which load is applied

    =SYS_EDGE     Element edge
    =SYS_FACE     Element face
    

  • index – Element number

  • no – Element edge or face number

  • type – Distributed load type

  • tid[out] Table identifiers

void vis_LCaseSetElem(vis_LCase *p, Vint index, Vint type, Vfloat value[])

set an element load

Set an element load on element index. Accelerations and volumetric heat generation may be specified on element nodes. Use vis_LCaseElemType() to return the number and type of loads defined at an element. Use vis_LCaseElem() to return the applied values of a given type of load at an element.

Errors

  • SYS_ERROR_VALUE is generated if an improper index is specified.

  • SYS_ERROR_ENUM is generated if an improper type is specified.

  • VIS_ERROR_NULLOBJECT is generated if a GridFun object has not been set.

Parameters
  • p – Pointer to LCase object.

  • index – Element number

  • type – Element body load type

    x=LCASE_ACCLELEM          Vector of accelerations at each node
     =LCASE_HEATELEM          Scalar heat generation at each node 
    

  • value – Load values

void vis_LCaseSetElemdv(vis_LCase *p, Vint index, Vint type, Vdouble val[])

set an element load

See vis_LCaseSetElem()

void vis_LCaseSetElemTId(vis_LCase *p, Vint index, Vint type, Vint tid[])

set an element load table id

Set an element load table identifier on element index. An element load value must have been previously set using vis_LCaseSetElem().

Errors

  • SYS_ERROR_VALUE is generated if an improper index is specified.

  • SYS_ERROR_ENUM is generated if an improper type is specified.

  • VIS_ERROR_NULLOBJECT is generated if a GridFun object has not been set.

  • SYS_ERROR_OPERATION is generated if an element load value for this type has not been previously specified.

Parameters
  • p – Pointer to LCase object.

  • index – Element number

  • type – Element body load type

  • tid – Table identifiers

void vis_LCaseAddElem(vis_LCase *p, Vint index, Vint type, Vfloat value[])

add an element load

Add a single element load at element index. Use vis_LCaseSetElem() to set an element load.

Errors

  • SYS_ERROR_VALUE is generated if an improper index is specified.

  • SYS_ERROR_ENUM is generated if an improper type is specified.

  • VIS_ERROR_NULLOBJECT is generated if a GridFun object has not been set.

Parameters
  • p – Pointer to LCase object.

  • index – Node number

  • type – Element body load type

    x=LCASE_ACCLELEM          Vector of accelerations at each node
     =LCASE_HEATELEM          Scalar heat generation at each node 
    

  • value – Load values

void vis_LCaseAddElemdv(vis_LCase *p, Vint index, Vint type, Vdouble val[])

add an element load

See vis_LCaseAddElem()

void vis_LCaseElemMax(vis_LCase *p, Vint type, Vint *maxindex)

query maximum element index

Return the maximum element number for which an element load of type has been defined. If no element loads have been defined then maxindex is returned as zero.

Parameters
  • p – Pointer to LCase object.

  • type – Element load type

  • maxindex[out] Maximum element number

void vis_LCaseElemFlag(vis_LCase *p, Vint index, Vint type, Vint *flag)

query element load set given a type

Query for an element load having been set for a specified load type at an element index. If an element load has been defined at the element then flag is set to 1 otherwise it is set to 0.

Errors

VIS_ERROR_NULLOBJECT is generated if a GridFun object has not been set.

Parameters
  • p – Pointer to LCase object.

  • index – Element number

  • type – Element load type

  • flag[out] Flag indicating if element load set

void vis_LCaseElemType(vis_LCase *p, Vint index, Vint *ntypes, Vint type[])

query element load types

Return number of element load types, ntypes, and types, type, of all defined element load types on element index.

Errors

VIS_ERROR_NULLOBJECT is generated if a GridFun object has not been set.

Parameters
  • p – Pointer to LCase object.

  • index – Element number

  • ntypes[out] Number of types of element loads

  • type[out] Array of element load types

void vis_LCaseElem(vis_LCase *p, Vint index, Vint type, Vfloat value[])

query element load given a type

Query for applied values for a specified load type on element index.

Errors

VIS_ERROR_NULLOBJECT is generated if a GridFun object has not been set.

Parameters
  • p – Pointer to LCase object.

  • index – Element number

  • type – Element load type

  • value[out] Applied distributed load values at nodes

void vis_LCaseElemdv(vis_LCase *p, Vint index, Vint type, Vdouble val[])

query element load given a type

See vis_LCaseElem()

void vis_LCaseElemTId(vis_LCase *p, Vint index, Vint type, Vint tid[])

query element load table id given a type

Query for element load table identifiers for a specified load type on element index.

Errors

VIS_ERROR_NULLOBJECT is generated if a GridFun object has not been set.

Parameters
  • p – Pointer to LCase object.

  • index – Element number

  • type – Element load type

  • tid[out] Table identifiers

void vis_LCaseSetAccel(vis_LCase *p, Vfloat grav[3], Vfloat cent[3], Vfloat w[3], Vfloat wdot[3])

set overall accelerations

Set accelerations due to translational accelerations and rotations. Translational accelerations are input as a “gravity” field defined as a vector, grav. Accelerations due to rotations are input as an angular velocity vector (radians/second), w, and acceleration vector (radians/second**2), wdot, passing through a point, cent. Use vis_LCaseAccelFlag() to query whether accelerations have been defined and query for the defined accelerations using vis_LCaseAccel().

Parameters
  • p – Pointer to LCase object.

  • grav – Gravity vector

  • cent – Center of rotation

  • w – Angular velocity vector

  • wdot – Angular acceleration vector

void vis_LCaseSetAcceldv(vis_LCase *p, Vdouble grav[3], Vdouble cent[3], Vdouble w[3], Vdouble wdot[3])

set overall accelerations

See vis_LCaseSetAccel()

void vis_LCaseAccelFlag(vis_LCase *p, Vint *accelflag)

query definition of accelerations

Query if accelerations have been defined using vis_LCaseSetAccel().

Parameters
  • p – Pointer to LCase object.

  • accelflag[out] Accelerations defined flag.

void vis_LCaseAccel(vis_LCase *p, Vfloat grav[3], Vfloat cent[3], Vfloat w[3], Vfloat wdot[3])

query overall accelerations

Query for translational and rotational accelerations. Use vis_LCaseAccelFlag() to query whether accelerations have been defined. If accelerations have not been defined all quantities are returned as zero.

Parameters
  • p – Pointer to LCase object.

  • grav[out] Gravity vector

  • cent[out] Center of rotation

  • w[out] Angular velocity vector

  • wdot[out] Angular acceleration vector

void vis_LCaseAcceldv(vis_LCase *p, Vdouble grav[3], Vdouble cent[3], Vdouble w[3], Vdouble wdot[3])

query overall accelerations

See vis_LCaseAccel()

void vis_LCaseNodeGroup(vis_LCase *p, vis_Group *group, vis_Group *groupdst)

node group of concentrated loads

Derive a group of nodes from an input group of nodes which have concentrated loads defined.

The output a groupdst must have been previously created and defined as a node group. Note that groupdst is not cleared by this function, the derived node entities are added to any existing nodes in the output groupdst.

Errors

VIS_ERROR_VALUE is generated if group is not a node group.

Parameters
  • p – Pointer to LCase object.

  • group – Pointer to Group object of nodes. If NULL, then all nodes are assumed.

  • groupdst[out] Pointer to derived Group object of nodes.

void vis_LCaseElemGroup(vis_LCase *p, vis_Group *group, vis_Group *groupdst)

element group of element loads

Derive a group of elements from an input group of elements which have element loads defined.

The output groupdst must have been previously created and defined as an element group. Note that groupdst is not cleared by this function, the derived element entities are added to any existing elements in the output groupdst.

Errors

VIS_ERROR_VALUE is generated if group is not an element edge group.

Parameters
  • p – Pointer to LCase object.

  • group – Pointer to Group object of element. If NULL, then all elements are assumed.

  • groupdst[out] Pointer to derived Group object of elements.

void vis_LCaseFaceGroup(vis_LCase *p, vis_Group *group, vis_Group *groupdst)

face group of distributed loads

Derive a group of element faces from an input group of element faces which have distributed loads defined.

The output groupdst must have been previously created and defined as an element face group. Note that groupdst is not cleared by this function, the derived element face entities are added to any existing element faces in the output groupdst.

Errors

VIS_ERROR_VALUE is generated if group is not an element face group.

Parameters
  • p – Pointer to LCase object.

  • group – Pointer to Group object of element faces. If NULL, then all element faces are assumed.

  • groupdst[out] Pointer to derived Group object of element faces.

void vis_LCaseEdgeGroup(vis_LCase *p, vis_Group *group, vis_Group *groupdst)

edge group of distributed loads

Derive a group of element edges from an input group of element edges which have distributed loads defined.

The output groupdst must have been previously created and defined as an element edge group. Note that groupdst is not cleared by this function, the derived element edge entities are added to any existing element edges in the output groupdst.

Errors

VIS_ERROR_VALUE is generated if group is not an element edge group.

Parameters
  • p – Pointer to LCase} object.

  • group – Pointer to Group object of element edges. If NULL, then all element edges are assumed.

  • groupdst[out] Pointer to derived Group object of element edges.

void vis_LCaseClearConc(vis_LCase *p, Vint type)

clear all concentrated loads

Clear all concentrated loads if type is zero. Clear the specified type otherwise.

Parameters
  • p – Pointer to LCase object.

  • type – Type of concentrated load.

void vis_LCaseClearDist(vis_LCase *p, Vint type)

clear all distributed loads

Clear all distributed loads if type is zero. Clear the specified type otherwise.

Parameters
  • p – Pointer to LCase object.

  • type – Type of distributed load.

void vis_LCaseClearElem(vis_LCase *p, Vint type)

clear all element loads

Clear all element loads if type is zero. Clear the specified type otherwise.

Parameters
  • p – Pointer to LCase object.

  • type – Type of element load.

void vis_LCaseClearAccel(vis_LCase *p)

clear all accelerations

Clear all accelerations.

Parameters

p – Pointer to LCase object.

void vis_LCaseClear(vis_LCase *p)

clear all loads and accelerations

Clear all defined loads and accelerations.

Parameters

p – Pointer to LCase object.

void vis_LCaseSpecFlag(vis_LCase *p, Vint *flag)

query any load specifications

Query if any load specifications of any type have been made. The return value, flag, will be zero only if no loads have been specified of any type.

Parameters
  • p – Pointer to LCase object.

  • flag[out] Flag indicating if any load set

void vis_LCaseAdd(vis_LCase *p, vis_LCase *addlcase)

add two load cases

Add the load case addlcase to p.

Parameters
  • p – Pointer to LCase object.

  • addlcase – Pointer to LCase object to add

void vis_LCaseSetName(vis_LCase *p, Vchar *name)

set name string

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 vis_LCaseGetName().

Get name as an output argument.

void vis_LCaseGetName (const vis_LCase *lcase,
                       Vchar name[])

Parameters
  • p – Pointer to LCase object.

  • name – Name string

void vis_LCaseGetName(vis_LCase *p, Vchar name[])

get name string

See vis_LCaseSetName()

6.3. Restraint Case - RCase

The RCase module manages degree of freedom constraints in the form of single point constraints (SPC’s) defined at nodes or element constraints defined at elements. A single point constraint may consist of a simple fixity, a constraint to a specified value or an equivalence to another node. An element constraint may consist of a simple fixity or a constraint to a specified value. The specified constraint value may be applied to the primary degree of freedom or a time derivative. The constraint value may be a general function of time or frequency. Note that complex valued single point applied constraints may be specified. This is used for example in steady state structural dynamics.

The functions associated with a RCase object are the following.

Instance a RCase object initially using vis_RCaseBegin(). Complex valued constraints may be specified. The real and imaginary parts of a complex valued constraint may be specified one at a time or together depending upon the state of the complex mode of RCase. The user sets the complex mode using vis_RCaseSetComplexMode(). See section VisTools, Complex Numbers <ComplexNumbers> for a description of the general usage of complex valued data in Vistools modules.

Define single point constraints at a node using vis_RCaseSetSPC(). Generate a node group of all nodes at which single point constraints have been defined using vis_RCaseNodeGroup(). Query for the number and type of degrees of freedom at a node which have single point constraints using vis_RCaseSPCTag(). Return the single point constraint value and/or equivalencing information at a node using vis_RCaseSPC(). Return the maximum node index for which single point constraints have been defined using vis_RCaseSPCMax(). Similar functions exist for setting and querying contraints at elements. vis_RCaseSetElemC(), vis_RCaseElemC(), etc. Note that the RCASE_MASTER option does not exist for element constraints.

Each applied constraint value component may be assigned a separate table identifier using the function vis_RCaseSetSPCTId(). These tables are represented by TCurve objects and are normally used to specify time or frequency dependent variation of the individual components of applied constraint.

For dynamics applications the applied constraint may be a time derivative of the primary degree of freedom value. This is done using the function vis_RCaseSetSPCDot(). For example, applied velocities and/or accelerations may be specified.

Single point constraint types are as follows.

  • RCASE_FREE - release a constraint

  • RCASE_FIXED - define a simple fixity at a degree of freedom. The degree of freedom is assumed to be constrained to equal zero.

  • RCASE_APPLIED - constrain a degree of freedom to be a specified value.

  • RCASE_MASTER - constrain a degree of freedom at a node to be equivalent to the same degree of freedom at a master node.

6.4. Function Descriptions

The currently available RCase functions are described in detail in this section.

vis_RCase *vis_RCaseBegin(void)

create an instance of an RCase object

Create an instance of a RCase object. Memory is allocated for the object private data and the pointer to the data is returned.

Destroy an instance of a RCase object using

void vis_RCaseEnd (vis_RCase *rcase)

Return the current value of a RCase object error flag using

Vint vis_RCaseError (vis_RCase *rcase)

Returns

The function returns a pointer to the newly created RCase object. If the object creation fails, NULL is returned.

void vis_RCaseEnd(vis_RCase *p)

destroy an instance of an RCase object

See vis_RCaseBegin()

Vint vis_RCaseError(vis_RCase *p)

return the current value of an RCase object error flag

See vis_RCaseBegin()

void vis_RCaseSetComplexMode(vis_RCase *p, Vint complexmode)

set specify/query mode for complex data

Set complex mode. By default the complex mode is SYS_COMPLEX_REAL.

Get complexmode as an output argument.

void vis_RCaseGetComplexMode (const vis_RCase *rcase,
                              Vint *complexmode)

Parameters
  • p – Pointer to RCase object.

  • complexmode – Complex mode

    x=SYS_COMPLEX_REAL           Real
     =SYS_COMPLEX_IMAGINARY      Imaginary
     =SYS_COMPLEX_REALIMAGINARY  Real and imaginary
    

void vis_RCaseGetComplexMode(vis_RCase *p, Vint *complexmode)

get specify/query mode for complex data

See vis_RCaseSetComplexMode()

void vis_RCaseGetComplex(vis_RCase *p, Vint *complexflag)

query for complex data existence

Query for complex data. The complexflag will be returned as one if the complex mode set by vis_RCaseSetComplexMode() is ever SYS_COMPLEX_IMAGINARY or SYS_COMPLEX_REALIMAGINARY, otherwise it is returned as zero.

Parameters
  • p – Pointer to RCase object.

  • complexflag[out] Complex data existence flag

void vis_RCaseSetSPC(vis_RCase *p, Vint index, Vint tag, Vint type, Vfloat value[], Vint master)

set a single point constraint

Set a single point constraint at a degree of freedom, tag at a node index. Depending upon the type of single point constraint, the applied value or master node must be supplied. A type of RCASE_FREE will remove any previously defined single point constraint. Use vis_RCaseSPCTag() to return the number and type of single point constraints defined at a node. Use vis_RCaseSPC() to return the applied value and/or master node of a single point constraint. Note that the applied value is an array in case the applied value is a complex number in which real and imaginary values must be supplied.

Errors

  • SYS_ERROR_VALUE is generated if an improper index is specified.

  • SYS_ERROR_ENUM is generated if an improper tag or type is specified.

Parameters
  • p – Pointer to RCase object.

  • index – Node number, index >= 1

  • tag – Degree of freedom type

  • type – Single point constraint type

    x=RCASE_FREE              Free
     =RCASE_FIXED             Simple fixity
     =RCASE_APPLIED           Constraint to applied value
     =RCASE_MASTER            Equivalence to another master node
    

  • value – Applied value

  • master – Master node

void vis_RCaseSetSPCdv(vis_RCase *p, Vint index, Vint tag, Vint type, Vdouble value[], Vint master)

set a single point constraint

See vis_RCaseSetSPC()

void vis_RCaseSetSPCTId(vis_RCase *p, Vint index, Vint tag, Vint tid[])

set a single point constraint table id

Set a single point applied constraint value time derivative. The applied constraint value must have been previously defined using vis_RCaseSetSPC().

Errors

  • SYS_ERROR_VALUE is generated if an improper index is specified.

  • SYS_ERROR_ENUM is generated if an improper tag is specified.

  • SYS_ERROR_OPERATION is generated if an applied constraint value has not been previously specified.

Parameters
  • p – Pointer to RCase object.

  • index – Node number, index >= 1

  • tag – Degree of freedom type

  • tid – Table identifiers

void vis_RCaseSetSPCDot(vis_RCase *p, Vint index, Vint tag, Vint dottype)

set a single point constraint derivative

Set a single point applied constraint value time derivative. The applied constraint value must have been previously defined using vis_RCaseSetSPC().

Errors

  • SYS_ERROR_VALUE is generated if an improper index is specified.

  • SYS_ERROR_ENUM is generated if an improper tag or dottype is specified.

  • SYS_ERROR_OPERATION is generated if an applied constraint value has not been previously specified.

Parameters
  • p – Pointer to RCase object.

  • index – Node number, index >= 1

  • tag – Degree of freedom type

  • dottype – Derivative type

    x=RCASE_DOF               Degree of freedom
     =RCASE_DOFDOT            First time derivative
     =RCASE_DOFDOTDOT         Second time derivative
    

void vis_RCaseSPCMax(vis_RCase *p, Vint *maxindex)

query maximum node index

Return the maximum node number for which single point constraints have been defined. If no single point constraints have been defined then maxindex is returned as zero.

Parameters
  • p – Pointer to RCase object.

  • maxindex[out] Maximum node number

void vis_RCaseSPCUseTag(vis_RCase *p, Vint *ntags, Vint tag[])

query used constraint tags

Return the number, ntags, and types, tag, of all the degrees of freedom used at nodes to define single point constraints.

Parameters
  • p – Pointer to RCase object.

  • ntags[out] Number of degrees of freedom types used at nodes

  • tag[out] Vector of degree of freedom types

void vis_RCaseSPCTag(vis_RCase *p, Vint index, Vint *ntags, Vint tag[])

query constraint tags at a node

Return number of degrees of freedom, ntags, and types, tag, of all degrees of freedom at node index at which single point constraints have been defined.

Errors

SYS_ERROR_VALUE is generated if an improper index is specified.

Parameters
  • p – Pointer to RCase object.

  • index – Node number, index >= 1

  • ntags[out] Number of degrees of freedom with single point constraints

  • tag[out] Vector of degree of freedom types

void vis_RCaseSPC(vis_RCase *p, Vint index, Vint tag, Vint *type, Vfloat value[], Vint *master)

query single point constraint

Query for single point constraint type, applied value and master node for a specified degree of freedom type, tag at a node index. If a single point constraint has not been defined for a node index and/or tag the type is returned as RCASE_FREE and value and master are undefined.

Errors

SYS_ERROR_VALUE is generated if an improper index is specified.

Parameters
  • p – Pointer to RCase object.

  • index – Node number, index >= 1

  • tag – Degree of freedom type

  • type[out] Single point constraint type

  • value[out] Applied value

  • master[out] Master node

void vis_RCaseSPCdv(vis_RCase *p, Vint index, Vint tag, Vint *type, Vdouble value[], Vint *master)

query single point constraint

See vis_RCaseSPC()

void vis_RCaseSPCTId(vis_RCase *p, Vint index, Vint tag, Vint tid[])

query single point constraint table id

Query for single point constraint applied value table identifiers for a specified degree of freedom type, tag at a node index. If a single point applied constraint has not been defined for a node index and/or tag, tid entries are returned as 0.

Errors

SYS_ERROR_VALUE is generated if an improper index is specified.

Parameters
  • p – Pointer to RCase object.

  • index – Node number, index >= 1

  • tag – Degree of freedom type

  • tid[out] Table identifiers

void vis_RCaseSPCDot(vis_RCase *p, Vint index, Vint tag, Vint *dottype)

query single point constraint derivative

Query for single point constraint applied value time derivative for a specified degree of freedom type, tag at a node index. If a single point applied constraint has not been defined for a node index and/or tag, doftype is returned as 0.

Errors

SYS_ERROR_VALUE is generated if an improper index is specified.

Parameters
  • p – Pointer to RCase object.

  • index – Node number, index >= 1

  • tag – Degree of freedom type

  • dottype[out] Derivative type

void vis_RCaseNodeGroup(vis_RCase *p, vis_Group *group, vis_Group *groupdst)

node group of single point constraints

Derive a group of nodes from an input group of nodes which have single point constraints defined.

The output groupdst must have been previously created and defined as a node group. Note that groupdst is not cleared by this function, the derived node entities are added to any existing nodes in the output groupdst.

Errors

VIS_ERROR_VALUE is generated if group is not a node group.

Parameters
  • p – Pointer to RCase object.

  • group – Pointer to Group object of nodes. If NULL, then all nodes are assumed.

  • groupdst[out] Pointer to derived Group object of nodes.

void vis_RCaseSetElemC(vis_RCase *p, Vint index, Vint tag, Vint type, Vfloat value[])

set an element constraint

Set a constraint at a degree of freedom, tag at an element index. Depending upon the type of constraint, the applied value must be supplied. A type of RCASE_FREE will remove any previously defined constraint. Use vis_RCaseElemCTag() to return the number and type of constraints defined at an element. Use vis_RCaseElemC() to return the applied value of a constraint.

Errors

  • SYS_ERROR_VALUE is generated if an improper index is specified.

  • SYS_ERROR_ENUM is generated if an improper tag or type is specified.

Parameters
  • p – Pointer to RCase object.

  • index – Element number, index >= 1

  • tag – Degree of freedom type

  • type – Constraint type

    x=RCASE_FREE              Free
     =RCASE_FIXED             Simple fixity
     =RCASE_APPLIED           Constraint to applied value
    

  • value – Applied value

void vis_RCaseSetElemCdv(vis_RCase *p, Vint index, Vint tag, Vint type, Vdouble value[])

set an element constraint

See vis_RCaseSetElemC()

void vis_RCaseElemCMax(vis_RCase *p, Vint *maxindex)

query maximum element index

Return the maximum element number for which constraints have been defined. If no element constraints have been defined then maxindex is returned as zero.

Parameters
  • p – Pointer to RCase object.

  • maxindex[out] Maximum element number

void vis_RCaseElemCUseTag(vis_RCase *p, Vint *ntags, Vint tag[])

query used constraint tags

Return the number, ntags, and types, tag, of all the degrees of freedom used at elements to define constraints.

Parameters
  • p – Pointer to RCase object.

  • ntags[out] Number of degrees of freedom types used at elements

  • tag[out] Vector of degree of freedom types

void vis_RCaseElemCTag(vis_RCase *p, Vint index, Vint *ntags, Vint tag[])

query constraint tags at an element

Return number of degrees of freedom, ntags, and types, tag, of all degrees of freedom at element index at which constraints have been defined.

Errors

SYS_ERROR_VALUE is generated if an improper index is specified.

Parameters
  • p – Pointer to RCase object.

  • index – Element number, index >= 1

  • ntags[out] Number of degrees of freedom with constraints

  • tag[out] Vector of degree of freedom types

void vis_RCaseElemC(vis_RCase *p, Vint index, Vint tag, Vint *type, Vfloat *value)

query element constraint

Query for element constraint type and applied value for a specified degree of freedom type, tag at a node index.

Errors

SYS_ERROR_VALUE is generated if an improper index is specified.

Parameters
  • p – Pointer to RCase object.

  • index – Element number, index >= 1

  • tag – Degree of freedom type

  • type[out] Constraint type

  • value[out] Applied value

void vis_RCaseElemCdv(vis_RCase *p, Vint index, Vint tag, Vint *type, Vdouble *value)

query element constraint

See vis_RCaseElemC()

void vis_RCaseElemGroup(vis_RCase *p, vis_Group *group, vis_Group *groupdst)

element group of constraints

Derive a group of elements from an input group of elements which have element constraints defined.

The output groupdst must have been previously created and defined as a element group. Note that groupdst is not cleared by this function, the derived element entities are added to any existing element in the output groupdst.

Errors

VIS_ERROR_VALUE is generated if group is not a element group.

Parameters
  • p – Pointer to RCase object.

  • group – Pointer to Group object of elements. If NULL, then all elements are assumed.

  • groupdst[out] Pointer to derived Group object of nodes.

void vis_RCaseClear(vis_RCase *p)

clear all constraints

Clear all defined constraints.

Parameters

p – Pointer to RCase object.

void vis_RCaseSpecFlag(vis_RCase *p, Vint *flag)

query any restraint specifications

Query if any restraint specifications of any type have been made. The return value, flag, will be zero only if no restraints have been specified of any type.

Parameters
  • p – Pointer to RCase object.

  • flag[out] Flag indicating if any restraints set

void vis_RCaseAdd(vis_RCase *p, vis_RCase *addrcase)

add two restraint cases

Add the restraint case addrcase to p. If the restraint case addrcase contains restraints at the same entity and degree of freedom as p then the restraint definition in addrcase takes precedence.

Errors

SYS_ERROR_OPERATION is generated if addrcase is the same object as p

Parameters
  • p – Pointer to RCase object.

  • addrcase – Pointer to RCase object to add

void vis_RCaseSetName(vis_RCase *p, Vchar *name)

set name string

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 vis_RCaseGetName().

Get name as an output argument.

void vis_RCaseGetName (const vis_RCase *rcase,
                       Vchar name[])

Parameters
  • p – Pointer to RCase object.

  • name – Name string

void vis_RCaseGetName(vis_RCase *p, Vchar name[])

get name string

See vis_RCaseSetName()

6.5. Multipoint Constraint Case - MCase

The MCase module manages multipoint constraints defined at a nodes. There are two basic classes of multipoint constraints: 1) general multipoint degree of freedom constraint equations (MPC) and 2) built-in node based constraints such as pin joint, link connection, etc.

The functions associated with a MCase object are the following.

Instance a MCase object initially using vis_MCaseBegin(). Define general multipoint degree of freedom constraints using vis_MCaseSetMPC(). Multipoint constraints (type MCASE_MPC) are a series of n terms of the form:

C1*U1 + C2*U2 + ... + Ci*Ui + ... + Cn*Un = R

where Ui represents a degree of freedom at a node and Ci is the associated coefficient. The multipoint constraint may be contain an inhomogeneity, R. Query for the degrees of freedom, coefficients and inhomogeneity associated with an MPC using vis_MCaseMPC().

Define built-in constraints using vis_MCaseSetCon(). Query for the built-in constraint information using vis_MCaseCon(). Current built-in constraint types are as follows.

  • MCASE_PIN - pin joint between 2 nodes. The translational freedoms are equal.

  • MCASE_TIE - tie between 2 nodes. All active freedoms are equal.

  • MCASE_LINK - inextensional link between 2 nodes. The translational freedoms are constrained to provide an inextensional pinned joint.

  • MCASE_BEAM - rigid beam between 2 nodes. The translational and rotational freedoms are constrained to provide a rigid beam joint.

Query for the maximum number of constraints defined using vis_MCaseMax(). Query for constraint type using vis_MCaseType(). Query for number of terms in a constraint using vis_MCaseNum(). Delete a constraint using vis_MCaseDel().

6.6. Function Descriptions

The currently available MCase functions are described in detail in this section.

vis_MCase *vis_MCaseBegin(void)

create an instance of an MCase object

Create an instance of an MCase object. Memory is allocated for the object private data and the pointer to the data is returned.

Destroy an instance of an MCase object using

void vis_MCaseEnd (vis_MCase *mcase)

Return the current value of an MCase object error flag using

Vint vis_MCaseError (vis_MCase *mcase)

Returns

The function returns a pointer to the newly created MCase object. If the object creation fails, NULL is returned.

void vis_MCaseEnd(vis_MCase *p)

destroy an instance of an MCase object

See vis_MCaseBegin()

Vint vis_MCaseError(vis_MCase *p)

return the current value of an MCase object error flag

See vis_MCaseBegin()

void vis_MCaseSetMPC(vis_MCase *p, Vint index, Vint nterms, Vint ix[], Vint tag[], Vfloat c[], Vfloat r)

set a multipoint constraint

Set a multipoint constraint, index, at a series of nterms degrees of freedom, tag, at a node numbers ix with associated coefficients, c. The inhomogeneity, r, is specified. Return the maximum MPC index defined and the maximum number of terms defined using vis_MCaseMPC(). Query an MPC using vis_MCaseMPC()

Errors

  • SYS_ERROR_VALUE is generated if an improper index or nterms is specified.

  • SYS_ERROR_ENUM is generated if an improper tag is specified.

Parameters
  • p – Pointer to MCase object.

  • index – Constraint number, index >= 1

  • nterms – Number of terms in series

  • ix – Node numbers.

  • tag – Degree of freedom tags

  • c – Coefficients

  • r – Inhomogeneity

void vis_MCaseSetMPCdv(vis_MCase *p, Vint index, Vint numterms, Vint ix[], Vint ig[], Vdouble c[], Vdouble rhs)

set a multipoint constraint

See vis_MCaseSetMPC()

void vis_MCaseSetRHS(vis_MCase *p, Vint index, Vfloat r)

set a multipoint dof constraint inhomogeneity

Set inhomogeneity, r for a multipoint constraint, index, The multipoint constraint must have already been defined using vis_MCaseSetMPC().

Errors

SYS_ERROR_VALUE is generated if an improper index is specified.

Parameters
  • p – Pointer to MCase object.

  • index – Constraint number, index >= 1

  • r – Inhomogeneity

void vis_MCaseSetRHSdv(vis_MCase *p, Vint index, Vdouble rhs)

set a multipoint dof constraint inhomogeneity

See vis_MCaseSetRHS()

void vis_MCaseSetCon(vis_MCase *p, Vint index, Vint type, Vint ix[])

set a built-in constraint

Set a constraint, index, of type, type at a node numbers ix. Query a built-in constraint using vis_MCaseCon()

Errors

SYS_ERROR_VALUE is generated if an improper index or nterms is specified.

Parameters
  • p – Pointer to MCase object.

  • index – Constraint number, index >= 1

  • type – Type of constraint

    x=MCASE_BEAM              Rigid beam between 2 nodes. The translational and rotational freedoms are constrained to provide a rigid beam joint.
     =MCASE_LINK              Inextensional link between 2 nodes. The translational freedoms are constrained to provide an inextensional pinned joint.
     =MCASE_PIN               Pin joint between 2 nodes. The translational freedoms are equal.
     =MCASE_TIE               Tie between 2 nodes. All active freedoms are equal.
    

  • ix – Node numbers.

void vis_MCaseNum(vis_MCase *p, Vint index, Vint *nterms)

query for number of terms in constraint

Query for the number of terms in a given constraint index.

Errors

SYS_ERROR_VALUE is generated if an improper index is specified.

Parameters
  • p – Pointer to MCase object.

  • index – Constraint number, index >= 1

  • nterms[out] Number of terms in constraint

void vis_MCaseMPC(vis_MCase *p, Vint index, Vint *nterms, Vint ix[], Vint tag[], Vfloat c[], Vfloat *r)

query multipoint constraint

Query for constraint index. If the MPC has not been defined the number of terms, nterms is returned as zero. The maximum number of terms defined in any MPC can be queried using vis_MCaseMax().

Errors

SYS_ERROR_VALUE is generated if an improper index is specified.

Parameters
  • p – Pointer to MCase object.

  • index – Constraint number, index >= 1

  • nterms[out] Number of terms in series

  • ix[out] Node numbers.

  • tag[out] Degree of freedom tags

  • c[out] Coefficients

  • r[out] Inhomogeneity

void vis_MCaseMPCdv(vis_MCase *p, Vint index, Vint *numterms, Vint ix[], Vint ig[], Vdouble c[], Vdouble *rhs)

query multipoint constraint

See vis_MCaseMPC()

void vis_MCaseCon(vis_MCase *p, Vint index, Vint *type, Vint *nterms, Vint ix[])

query built-in constraint

Query for constraint index. If the constraint has not been defined the number of terms, nterms is returned as zero.

Errors

SYS_ERROR_VALUE is generated if an improper index is specified.

Parameters
  • p – Pointer to MCase object.

  • index – Constraint number, index >= 1

  • type[out] Type of constraint

  • nterms[out] Number of terms in series

  • ix[out] Node numbers.

void vis_MCaseDel(vis_MCase *p, Vint index)

delete a constraint

Delete constraint index. If the constraint index has not been defined the function returns without error.

Errors

SYS_ERROR_VALUE is generated if an improper index is specified.

Parameters
  • p – Pointer to MCase object.

  • index – Constraint number, index >= 1

void vis_MCaseType(vis_MCase *p, Vint index, Vint *type)

query for constraint type

Query for the type type of constraint index. If the constraint has not been defined then type is returned as 0.

Errors

SYS_ERROR_VALUE is generated if an improper index is specified.

Parameters
  • p – Pointer to MCase object.

  • index – Constraint number, index >= 1

  • type[out] Type of constraint

void vis_MCaseMax(vis_MCase *p, Vint *maxindex, Vint *maxterms, Vint *maxrhs)

query for number of constraints defined

Query for the maximum constraint index and maximum number of terms defined in any constraint. Use maxindex to loop over constraint indices and maxterms to allocate sufficient memory to query for constraint information using vis_MCaseMPC(), or vis_MCaseCon().

Parameters
  • p – Pointer to MCase object.

  • maxindex[out] Maximum constraint number

  • maxterms[out] Maximum number of terms defined in any constraint

  • maxrhs[out] Maximum number of non-zero right hand sides defined

void vis_MCaseInitIter(vis_MCase *p)

prepare to successively visit each constraint

Initialize the successive return of each constraint index.

Sequential access to each constraint index

void vis_MCaseNextIter (vis_MCase *mcase, Vint *index)

Parameters

p – Pointer to MCase object.

void vis_MCaseClear(vis_MCase *p)

clear all constraints

Clear all defined constraints

Parameters

p – Pointer to MCase object.

void vis_MCaseSpecFlag(vis_MCase *p, Vint *flag)

query any constraint specifications

Query if any constraint specifications of any type have been made. The return value, flag, will be zero only if no constraints have been specified of any type.

Parameters
  • p – Pointer to MCase object.

  • flag[out] Flag indicating if any constraint set

void vis_MCaseAdd(vis_MCase *p, vis_MCase *addmcase)

add two constraint cases

Add the constraint case addmcase to p. The resulting p has the constraints of addmcase concatenated to p starting with a constraint index one greater than the maximum index in p.

Errors

SYS_ERROR_OPERATION is generated if addmcase is the same object as p

Parameters
  • p – Pointer to MCase object.

  • addmcase – Pointer to MCase object to add

6.7. Initial Condition Case - ICase

The ICase module manages degree of freedom 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 ICase object are the following.

Instance an ICase object initially using vis_ICaseBegin(). Define single point initial condition values at a node using vis_ICaseSetSPV(). Generate a node group of all nodes at which initial conditions have been defined using vis_ICaseNodeGroup(). Query for the number and type of initial conditions at a node using vis_ICaseSPVType(). Return the initial condition degree of freedom types and associated values at a node using vis_ICaseSPV(). Return the maximum node index for which single point initial conditions have been defined using vis_ICaseSPVMax().

Initial condition types are as follows.

  • ICASE_DOF value of degree of freedom at a node.

  • ICASE_DOFDOT time derivative of value of degree of freedom at a node.

6.8. Function Descriptions

The currently available ICase functions are described in detail in this section.

vis_ICase *vis_ICaseBegin(void)

create an instance of an ICase object

Create an instance of an ICase object. Memory is allocated for the object private data and the pointer to the data is returned.

Destroy an instance of an ICase object using

void vis_ICaseEnd (vis_ICase *icase)

Return the current value of an ICase object error flag using

Vint vis_ICaseError (vis_ICase *icase)

Returns

The function returns a pointer to the newly created ICase object. If the object creation fails, NULL is returned.

void vis_ICaseEnd(vis_ICase *p)

destroy an instance of an ICase object

See vis_ICaseBegin()

Vint vis_ICaseError(vis_ICase *p)

return the current value of an ICase object error flag

See vis_ICaseBegin()

void vis_ICaseSetSPV(vis_ICase *p, Vint index, Vint type, Vint ntags, Vint tag[], Vfloat value[])

set a single point initial condition value

Set initial conditions at ntags degree of freedom types, tag, with associated values, value, at a node index. Use vis_ICaseSPVType() to return the number and type of initial conditions defined at a node. Use vis_ICaseSPV() to query for the degree of freedom types and values of defined initial conditions.

Errors

  • SYS_ERROR_ENUM is generated if an improper tag or type is specified.

  • SYS_ERROR_VALUE is generated if an improper ntags is specified.

Parameters
  • p – Pointer to ICase object.

  • index – Node number

  • type – Initial condition type

    x=ICASE_DOF               Degree of freedom value
     =ICASE_DOFDOT            Time derivative value
    

  • ntags – Number of degree of freedom types

  • tag – Vector of degree of freedom types

  • value – Vector of values

void vis_ICaseSetSPVdv(vis_ICase *p, Vint index, Vint type, Vint ntags, Vint tag[], Vdouble val[])

set a single point initial condition value

See vis_ICaseSetSPV()

void vis_ICaseSPVMax(vis_ICase *p, Vint type, Vint *maxindex)

query maximum node index

Return the maximum node number for which single point initial conditions have been defined. If no single point initial conditions have been defined then maxindex is returned as zero.

Parameters
  • p – Pointer to ICase object.

  • type – Type of single point initial condition.

  • maxindex[out] Maximum node number

void vis_ICaseSPVType(vis_ICase *p, Vint index, Vint *ntypes, Vint type[])

query initial condition types at a node

Return number of initial condition types, ntypes, and types, type, of all defined initial condition types at node index.

Parameters
  • p – Pointer to ICase object.

  • index – Node number

  • ntypes[out] Number of types of initial conditions

  • type[out] Array of initial condition types

void vis_ICaseSPV(vis_ICase *p, Vint index, Vint type, Vint *ntags, Vint tag[], Vfloat value[])

query initial conditions given a type

Query for number of degrees of freedom, ntags, degree of freedom types, tag and associated initial condition values, value, for a specified initial condition type, type at a node index.

Parameters
  • p – Pointer to ICase object.

  • index – Node number

  • type – Initial condition type

    x=ICASE_DOF               Degree of freedom value
     =ICASE_DOFDOT            Time derivative value
    

  • ntags[out] Number of degree of freedom types

  • tag[out] Vector of degree of freedom types

  • value[out] Vector of values

void vis_ICaseSPVdv(vis_ICase *p, Vint index, Vint type, Vint *ntags, Vint tag[], Vdouble val[])

query initial conditions given a type

See vis_ICaseSPV()

void vis_ICaseNodeGroup(vis_ICase *p, vis_Group *group, vis_Group *groupdst)

node group of initial conditions

Derive a group of nodes from an input group of nodes which have initial conditions defined.

The output groupdst must have been previously created and defined as a node group. Note that groupdst is not cleared by this function, the derived node entities are added to any existing nodes in the output groupdst.

Errors

VIS_ERROR_VALUE is generated if group is not a node group.

Parameters
  • p – Pointer to ICase object.

  • group – Pointer to Group object of nodes. If NULL, then all nodes are assumed.

  • groupdst[out] Pointer to derived Group object of nodes.

void vis_ICaseClear(vis_ICase *p)

clear all single point initial conditions

Clear all defined single point initial conditions.

Parameters

p – Pointer to ICase object.

void vis_ICaseSpecFlag(vis_ICase *p, Vint *flag)

query any initial condition specifications

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
  • p – Pointer to ICase object.

  • flag[out] Flag indicating if any initial conditions set