Results Manipulation
Overview
The State class supports the management of solution results data for scalar, vector, six dof vector (translations and rotations), tensor (symmetric tensor) and general tensor fields defined over a solution domain. The results data may be located at nodes, elements, element nodes, element faces, element edges, element face nodes and element edge nodes. The additional, non element or node related locations, are particle and mode. For element and element node results, data may also be present for several “sections” at each element location. Sections most often represent stress results for several layers in a composite shell element or points throughout a beam cross section. The State class contains functions for mapping results quantities between node, element and element node locations. For example, solution results based at element centroids may be mapped to a state in which the results quantities are represented at the nodes. In addition, the State class provides a set of derived quantities for vector and tensor fields which may be automatically calculated, such as vector magnitude for tensor principal values. These derived quantities, such as vector magnitude for tensor principal values, are generally based on the invariants of the vector or tensor. The functions associated with a State object are the following.
- Definition and options
define()- Define parent and child entitiesinquire()- Inquire parent and child entitiessetPrecision()- Specify precision of state datagetPrecision()- Query precision of state datasetIntegerParameter()- Set integer parameterssetComplexMode()- Set mode for complex datagetComplexMode()- Get mode for complex dataisComplex()- Query for complex data existencesetEngineeringStrainFlag()- Set engineering strain flaggetEngineeringStrainFlag()- Get engineering strain flagsetMagnitudePhaseFlag()- Set magnitude phase flaggetMagnitudePhaseFlag()- Get magnitude phase flag
- Internal objects
setMeshInterface()- Set pointers to a MeshInterface objectgetMeshInterface()- Get pointers to a MeshInterface objectsetLocalCoordinateSystemIds()- Set pointers to a IdTranslator objectgetLocalCoordinateSystemIds()- Get pointers to a IdTranslator objectsetLocalCoordinateSystemDirectionCosines()- Set pointers to a State objectgetLocalCoordinateSystemDirectionCosines()- Get pointers to a State objectsetRotationAngleVectors()- Set pointers to a State objectgetRotationAngleVectors()- Get pointers to a State objectsetCoordinateSystems()- Set pointers to a HashTable object of CoordinateSystemgetCoordinateSystems()- Get pointers to a HashTable object of CoordinateSystemsetElementData()- Set pointers to a HashTable object of ElementDatagetElementData()- Get pointers to a HashTable object of ElementData
- Section
setSection()- Set section numbergetSection()- Get current section numbersetSectionLayerPositionType()- Set section layer position typegetSectionLayerPositionType()- Get section layer position typesetLayerInformation()- Set section layer number and positiongetLayerInformation()- Get section layer number and positionsetSectionCount()- Set number of results data sectionsgetSectionCount()- Get number of results data sectionsisSectionDefined()- Check if any sections defined
- Derived quantity
getDerivedQuantityComponentCount()- Get number of data componentssetDerivedQuantity()- Set derived quantity typegetDerivedQuantity()- Get derived quantity typegetPrimitiveDerivedQuantity()- Get data type of derived quantity
- Coordinate system
setCoordinateSystem()- Set coordinate system stategetCoordinateSystem()- Get coordinate system stategetCoordinateSystemIdAtEntity()- Get coordinate system identifier used in system state for an entitysetCoordinateSystemEntityType()- Set coordinate system entity typegetCoordinateSystemEntityType()- Get coordinate system entity typetransformToCoordinateSystem()- Perform coordinate system transformations (parallel)getLocalDirectionCosineMatrices()- Get local direction cosine matrix
- Set and query results
clear()- Clear all results dataclearDataAtEntity()- Clear results data for a single entitygetDefinedDataCount()- Get overall number of results datagetData()- Get results data at a set of entitiesgetDataAtElement()- Get results data at elementsetDataAtElementEntity()- Set element face or edge results datagetDataAtElementEntity()- Get results data at element entitiesgetDataAtElementNaturalCoordinates()- Get results data at given natural coordinatesgetDataCountAtEntity()- Get number of results values and locationssetDataAtEntity()- Set results datagetDataAtEntities()- Get results data at entitiesgetMaxDataCount()- Get max number of results values and locationssetElementEntities()- Set results data element faces or edgesgetElementEntities()- Get results data element faces or edgesgetStatus()- Get results data statusgetStatusAtElementEntity()- Get element face or edge results data statusgetExtent()- Minimum and maximum values (parallel)getExtentWithLocation()- Minimum and maximum values and locationsgetExtentWithLocationAndSection()- Minimum and maximum values,locations,sections
- Manipulate results
convertComplexData()- Convert complex dataconvertStrainData()- Convert strain datadeformState()- Create deformed node vector of coordinatesderivative()- Perform differential operations on a statemap()- Map results data to another locationmapToElementNode()- Map results data to element node locationprocessMidSideNodes()- Process results data at midside nodesoperateBinary()- Operate on a state as a function of two statesoperateUnary()- Operate on a state as a function of one statecomputeSum()- Sum results data
- Extract entity sets
setGroupParameter()- Set group derivation parametersgenerateNodeGroup()- Derive sets of nodesgenerateElementGroup()- Derive sets of elementsgenerateSortedEntities()- Sort entities into an IdTranslator object
- General functions
getErrorCode()- Return the current error codedemonstrate()- Create “demo” node vector displacement resultscopy()- Copy a State
Once a State
is instanced, the user may specify the precision used to maintain the
state data using setPrecision().
By default, state data are held in single precision.
Define parent and child entity types and parent size using define().
The function is also used to specify the data type (scalar, vector,
etc.) of the solution results data to be maintained by the State
object. Use setDataAtEntity() to enter solution results into a
State
object at specified entity indices. If results data is not specified at
a specific entity index it is assumed to be zero. Use
clear() to clear (set to zero) all results data.
Complex valued element data may be specified. The real and imaginary
parts of a complex value may be specified one at a time or together
depending upon the value of the complex mode of State.
The user sets the complex mode using setComplexMode().
See section Complex Numbers
for a description of the general usage of complex valued data.
Complex data in State
may be held as real and imaginary components or magnitude phase
components. By default, complex data is assumed to be in real and
imaginary form. If complex data has been entered in magnitude and phase
form, use the function setMagnitudePhaseFlag()
to flag this fact. The function convertComplexData()
can be used to convert complex data from real/imaginary to/from
magnitude/phase. The function setMagnitudePhaseFlag()
will be called appropriately internally to flag the current form of
complex data. Note that the units of the phase angles are degrees.
Results data is maintained at nodes, element centroids or element nodes
by a state object. The number of data locations per entity for node and
element states is one, for element node states, the number of data
locations is the number of nodes in an element. Element and element node
states may also carry data for any number of sections at each data
location. These sections usually represent layers in a composite shell
element or points throughout a beam cross section. If data is to be
represented at sections, then the number of sections for each element
must be defined using setSectionCount()
before data may be set using setDataAtEntity().
Use getSectionCount()
to query the number of sections at an element. By default the number of
sections is 1. The layer position type of the sections at an element may
be set as an option using setSectionLayerPositionType().
The layer position type specifies more detail concerning the position of
a section within a layer, i.e. top, middle, bottom, etc. More detailed
information about layer number and layer position of each section can be
set using the function setLayerInformation().
The function getLayerInformation()
can retrieve the layer numbers and positions. If explicit layer numbers
and positions are not defined for each section index, then the layer
numbers are assumed to start from 1 and increment sequentially with a
layer number multiplicity dependent upon the layer position type. If
there are several sections of data at an element, use
setSection()
to control whether all sections or only a selected section of data are
returned using getData().
By default section 1 is set.
For element face, element face node, element edge and element edge node
locations, the element faces or edges for which data will be defined
must be specified using function setElementEntities()
before the actual data is set. Use the function
setDataAtElementEntity()
to set data at a specific element face or element edge.
By convention, vector data is assumed to be ordered by (x,y,z)
components, six dof vector data by (tx,ty,tz,rx,ry,rz) components,
symmetric tensor data by (xx,yy,zz,xy,yz,zx) components, and general
tensor data by (xx,xy,xz,yx,yy,yz,zx,zy,zz) components, Use
getData() to query for results data for some entity subset. A
State object will automatically return a derived quantity when
getData() is called by setting a derived quantity with
setDerivedQuantity().
The function getDataAtElement()
is a convenient function to use for returning data at an element
regardless of the parent and child entity types of the State
object. This function is sensitive to the mapping options which are used
to map element node data to elements.
The function getDataAtElementEntity()
is a convenient function to use for returning data for all element
nodes, element face nodes or element edge nodes regardless of the parent
and child entity types of the State object. Use
getDataAtElementNaturalCoordinates()
to retrieve interpolated values at a given natural coordinates location
within an element. The function getStatus()
may be used to determine if the data for a given set of entities has been
specified using setDataAtEntity().
The function getStatusAtElementEntity()
may be used for element face and element edge states to determine data
defined at a specific element face or element edge.
Vectoral derived quantities include only the vector magnitude.
VECTOR_MAGNITUDE, Magnitudev(mag) = sqrt(vx**2 + vy**2 + vz**2)
Tensoral derived quantities include the following. The quantities tmax,tmid and tmin are the maximum, middle and minimum principal values.
TENSOR_MEAN, Meant(mean) = 1/3*(txx+tyy+tzz);
TENSOR_VONMISES_STRESS, Von Misest(vonmises) = sqrt(1/2*((txx-tyy)**2 + (tyy-tzz)**2 + (tzz-txx)**2) + 3*(txy**2 + tyz**2 + tzx**2))TENSOR_VONMISES_STRAIN, Von Mises Straint(vonmises) = 2./3.*sqrt(1/2*((txx-tyy)**2 + (tyy-tzz)**2 + (tzz-txx)**2) + 3*(txy**2 + tyz**2 + tzx**2))TENSOR_OCTAHEDRAL, Octahedralt(octahedral) = sqrt(1/9*((txx-tyy)**2 + (tyy-tzz)**2 + (tzz-txx)**2) + 2/3*(txy**2 + tyz**2 + tzx**2))TENSOR_MAXSHEAR, Max Sheart(max shear) = 1/2*(tmax - tmin)
TENSOR_EQUAL_DIRECT, Equal direct stress in Max Shear directionst(equ direct) = 1/2*(tmax + tmin)
TENSOR_INTENSITY, Intensityt(intensity) = MAX((tmax-tmin),(tmid-tmin),(tmax-tmid))
If Von Mises strain is requested, it will be computed as 2/3 of the value of Von Mises stress. This is a special case (Nu=0.5) of a more general formula in which Von Mises strain is 1./(1.+Nu) of the Von Mises stress where Nu is an effective Poisson’s ratio.
If tensor principal values are requested, the values are sorted by numeric value, not absolute value.
Note that in the direction of max shear stress, two of the direct
stresses are equal and may be derived using TENSOR_EQUAL_DIRECT,
the other stress is equal to the middle principal value and may be
derived using TENSOR_MID_PRINCIPAL. The maximum shear is derived
using TENSOR_MAXSHEAR, the other two shear stresses are zero.
The maximum shear angle, TENSOR_SHEAR_ANGLE, is the angle formed by
the direction of maximum shear with the x axis in degrees.
Note that the tensor intensity definition is taken directly from ANSYS documentation. Since (tmax-tmin) is always the maximum, the other terms are unnecessary. It is always equal to twice the maximum shear.
A practical note should be made concerning representing shear strains as
a tensor-valued quantity with the State
class. In many commercial finite element programs shear strain is
reported as engineering strain rather than tensor strain. The shear
strain components of engineering strain are twice the value of the
corresponding components of tensor strain. The user may enable the
State
class to treat the engineering strain variant of a tensor by calling
setEngineeringStrainFlag().
This is required so that all invariant calculations, transformations,
etc. are properly performed. Note that the Max Shear derived value for
engineering strain will be returned as twice the tensoral value. The
function convertStrainData()
can be used to convert strain data from tensor to/from engineering
strain. The function setEngineeringStrainFlag()
will be called appropriately internally to flag the current form of
strain data.
The getExtent()
function returns the minimum and maximum results data values over a
specified subset of the solution domain. The domain subset is defined by
an input Group object.
Results data is maintained at nodes, element centroids or element nodes
by a state object. It is often useful to be able to interpolate or
extrapolate results data from one location to another. The
map()
function is designed to perform this operation. The mapping of data from
elements or element nodes to nodes may be performed using a
topologically or geometrically based weighting. A topological weighting
assigns an equal weight to each element contribution connected to a
node. A geometric weighting assigns a weight proportional to the
reciprocal of the volume of the element (area for 2D elements, length
for 1D elements and unity for 0D elements).
A specific function, mapToElementNode(),
is available for averaging and mapping element centroid or element node
data to element nodes in which averaging is performed only within user
specified regions. For example, it is common for element stress results
to be output at element nodes in which the stresses have been computed
using local element methods. This results in general stress
discontinuities between all elements. A typical post processing function
is to average the element nodal stresses at nodes within regions of
homogeneous elements. This will result in removing the element stress
discontinuities between elements in the same region but preserving the
discontinuity at the boundaries between regions. The resulting data
location must be element nodal to represent the region discontinuity.
The function, processMidSideNodes(),
is available for specialized processing of data at element midside nodes
as a function of the element corner nodes. Options include linear
interpolation of the data at midside nodes and clamping the data at midside
nodes. Only edge midside nodes are affected, midface and midbody nodes
are not processed.
Local Coordinate Systems
The State
class may also be used to maintain local coordinate system information
for vector, sixdof vector, tensor and general tensor states and perform
transformations of the state data between the local system and the
global coordinate system. Use transformToCoordinateSystem()
to transform state data between the local and global systems. The
coordinate system state (local or global) of the data is specified by
setCoordinateSystem().
The current coordinate system state of the data may be queried using
getCoordinateSystem().
There are two basic types of local coordinate systems: 1) local systems
in the undeformed coordinates and 2) local systems in deformed
coordinates. The function getLocalDirectionCosineMatrices()
may be used to obtain the direction cosine matrix of the current
coordinate system of any node and/or element.
The local undeformed coordinate system information may be maintained by any combination of user defined local coordinate systems represented by a HashTable of CoordinateSystem objects and element local coordinates systems which are computed using a specified algorithm, usually as a function of element geometry. The element geometry consists of the element node coordinates and an optional HashTable of ElementData objects which contain vectors to orient local coordinate systems.
The way in which local undeformed coordinate system information is
maintained at each node or element is specified by a set of integer
flags. By default, these coordinate system identifiers are defined by
the node COORDINATE_SYSTEM_ID or element COORDINATE_SYSTEM_ID association. However an option is
provided to specify integer flags contained in an
IdTranslator attribute object. Use the function
setLocalCoordinateSystemIds() to register the IdTranslator
object. Normally element node states assume that the coordinate system
identifiers are associated with elements, however the user can specify
that the coordinate system identifiers be associated with the element
nodes. Set this option using setCoordinateSystemEntityType().
Use the function setCoordinateSystems() to register the
HashTable of CoordinateSystem
objects and setElementData() for HashTable of
ElementData objects.
The local undeformed coordinate system flags are assigned as follows: See section Element Coordinate Systems for a description of element coordinate systems.
| =0 | Global coordinate system |
| >0 | Identifier of local coordinate system defined by CoordinateSystem object. All CoordinateSystem objects referenced in this way must be installed in a HashTable attribute object. |
| <0 | Identifier of element geometry dependent algorithm. The algorithm may require the geometry information contained in an ElementData object. All ElementData objects referenced in this way must be installed in a HashTable attribute object. |
The local deformed coordinate system information is maintained as an
associated State
object containing the rotation angle vectors which define the coordinate
systems of each entity. Use the function setRotationAngleVectors()
to register the State object of rotation angle vectors.
Parallel Functions
The following functions are optimized to take full advantage of OpenMP parallelization:
MeshInterface member
A State class uses a MeshInterface member to access finite element data from the host application. This member is required for any operations which relate elements to nodes or vice versa. For example, storing element node results in a State object or performing any mapping operation requires a MeshInterface member to be set.
The State class calls the following MeshInterface functions set in the MeshInterface member.
getCoordinates()getElementEntityConnectivity()getElementEntityConnectionNumbers()getElementNodes()getElementEntityCount()getElementAssociation()getExtent()(Only indemonstrate())getNodeAssociation()getEntityCount()getTopology()
A IdTranslator member is required for specifying local coordinate system flags for each entity, node or element, contained in the State object. Depending upon how the coordinate system information is maintained, either a HashTable attribute of CoordinateSystem class and/or a State attribute of direction cosine matrices may be required.
Class Members Descriptions
The currently available State enumerations and functions are described in detail in this section.
-
class
State Results Data management.
Public Types
-
enum class
Operation Operation type.
Values:
-
enumerator
EQUAL Operation =.
-
enumerator
PLUS_EQUAL Operation +=.
-
enumerator
MINUS_EQUAL Operation -=.
-
enumerator
MULTIPLY_EQUAL Operation *=.
-
enumerator
DIVIDE_EQUAL Operation /=.
-
enumerator
-
enum class
System System state type.
Values:
-
enumerator
GLOBAL Global.
-
enumerator
LOCAL_UNDEFORMED Local undeformed.
-
enumerator
LOCAL_DEFORMED Local deformed.
-
enumerator
MATERIAL Material system.
-
enumerator
-
enum class
UnaryFunction Unary function type.
Values:
-
enumerator
IDENTITY Identity function.
-
enumerator
SIN Sine function.
-
enumerator
COS Cosine function.
-
enumerator
TAN Tangent function.
-
enumerator
ASIN Arcsine function.
-
enumerator
ACOS Arccosine function.
-
enumerator
ATAN Arctangent function.
-
enumerator
SQRT Square root function.
-
enumerator
LOG Natural logarithm function.
-
enumerator
EXP Exponential function.
-
enumerator
ABS Absolute value function.
-
enumerator
RECIPROCAL Reciprocal function.
-
enumerator
UNITY Value of 1.
-
enumerator
-
enum class
BinaryFunction Binary function type.
Values:
-
enumerator
MIN Minimum function.
-
enumerator
MAX Maximum function.
-
enumerator
AVERAGE Average function.
-
enumerator
CROSS Vector cross product function.
-
enumerator
DOT Vector dot product function.
-
enumerator
SUM Sum function.
-
enumerator
-
enum class
DifferentialOperation Differential operation type.
Values:
-
enumerator
GRADIENT Gradient function.
-
enumerator
GRADIENT_NORMALIZED Normalized Gradient function.
-
enumerator
DIVERGENCE Divergence function.
-
enumerator
CURL Curl function.
-
enumerator
STRAIN Infinitesimal strain function.
-
enumerator
VECTOR_GRADIENT Vector gradient function.
-
enumerator
-
enum class
GroupOperation Group operation type.
Values:
-
enumerator
EXTENT Elements lying within an interval.
-
enumerator
DEFINED Elements with defined data.
-
enumerator
NONZERO Elements with non zero value.
-
enumerator
OUTBOUND Elements lying outside an interval.
-
enumerator
LOCAL_MIN Elements with local minimum.
-
enumerator
LOCAL_MAX Elements with local maximum.
-
enumerator
LOCAL_MINMAX Elements with local min or max.
-
enumerator
-
enum class
IntegerParameter Integer parameter types.
Values:
-
enumerator
MAPPING_ELEMENT Select element mapping type.
-
enumerator
MAPPING_NODE Select node mapping type.
-
enumerator
MAPPING_DEFINED Enable mapping defined entities only.
-
enumerator
MAPPING_NONZERO Enable mapping nonzero contributions.
-
enumerator
MIDSIDE Select midside node processing.
-
enumerator
SORT_DESCENDING Enable high to low sort.
-
enumerator
SORT_ABSOLUTE_VALUE Enable absolute value sort.
-
enumerator
SORT_ELEMENT_AVERAGE Enable element-average sorting.
-
enumerator
EXTENT_IGNORE_ZERO Ignore zero-valued entities in extent.
-
enumerator
LIST_WIDTH Listing field width.
-
enumerator
-
enum class
ElementMappingParameter Element mapping parameter types.
Values:
-
enumerator
AVERAGE Average to element.
-
enumerator
MINIMUM Minimum to element.
-
enumerator
MAXIMUM Maximum to element.
-
enumerator
ABSOLUTE_MINIMUM Absolute minimum to element.
-
enumerator
ABSOLUTE_MAXIMUM Absolute maximum to element.
-
enumerator
CENTROIDAL Centroidal value to element.
-
enumerator
-
enum class
NodeMappingParameter Node mapping parameter types.
Values:
-
enumerator
AVERAGE Average to node.
-
enumerator
GEOMETRY Geometry weighted average to node.
-
enumerator
MINIMUM Minimum to node.
-
enumerator
MAXIMUM Maximum to node.
-
enumerator
ABSOLUTE_MINIMUM Absolute minimum to node.
-
enumerator
ABSOLUTE_MAXIMUM Absolute maximum to node.
-
enumerator
DIFF_TO_NODE Difference to node.
-
enumerator
-
enum class
MidsideParameter Midside node processing parameter types.
Values:
-
enumerator
MIDSIDE_AVERAGE Average midside node values.
-
enumerator
MIDSIDE_CLAMP Clamp midside node values.
-
enumerator
-
enum class
DerivedType Derived quantity types.
Values:
-
enumerator
VECTOR_X Vector x component.
-
enumerator
VECTOR_Y Vector y component.
-
enumerator
VECTOR_Z Vector z component.
-
enumerator
VECTOR_MAGNITUDE Vector magnitude.
-
enumerator
VECTOR Vector.
-
enumerator
SIX_DOF Six dof vector.
-
enumerator
SIX_DOF_TX Six dof x translational component.
-
enumerator
SIX_DOF_TY Six dof y translational component.
-
enumerator
SIX_DOF_TZ Six dof z translational component.
-
enumerator
SIX_DOF_RX Six dof x rotational component.
-
enumerator
SIX_DOF_RY Six dof y rotational component.
-
enumerator
SIX_DOF_RZ Six dof z rotational component.
-
enumerator
SIX_DOF_TRANSLATIONAL_MAGNITUDE Six dof translation magnitude.
-
enumerator
SIX_DOF_ROTATIONAL_MAGNITUDE Six dof rotation magnitude.
-
enumerator
SIX_DOF_TRANSLATION_VECTOR Six dof translation vector.
-
enumerator
SIX_DOF_ROTATION_VECTOR Six dof rotation vector.
-
enumerator
TENSOR_XX Tensor xx component.
-
enumerator
TENSOR_YY Tensor yy component.
-
enumerator
TENSOR_ZZ Tensor zz component.
-
enumerator
TENSOR_XY Tensor xy component.
-
enumerator
TENSOR_YZ Tensor yz component.
-
enumerator
TENSOR_ZX Tensor zx component.
-
enumerator
TENSOR_MEAN Tensor mean.
-
enumerator
TENSOR_VONMISES_STRESS Tensor Von Mises stress.
-
enumerator
TENSOR_VONMISES_STRAIN Tensor Von Mises strain.
-
enumerator
TENSOR_OCTAHEDRAL Tensor octahedral shear.
-
enumerator
TENSOR_DETERMINANT Tensor determinant.
-
enumerator
TENSOR_INTENSITY Tensor intensity.
-
enumerator
TENSOR_SHEAR_ANGLE Tensor max shear angle in degrees.
-
enumerator
TENSOR_MAXSHEAR Tensor max shear.
-
enumerator
TENSOR_EQUAL_DIRECT Tensor equal direct at max shear.
-
enumerator
TENSOR_MIN_PRINCIPAL Tensor minimum principal value.
-
enumerator
TENSOR_MID_PRINCIPAL Tensor middle principal value.
-
enumerator
TENSOR_MAX_PRINCIPAL Tensor maximum principal value.
-
enumerator
TENSOR_MIN_PRINCIPAL_DEVIATORIC Tensor minimum principal deviatoric value.
-
enumerator
TENSOR_MID_PRINCIPAL_DEVIATORIC Tensor middle principal deviatoric value.
-
enumerator
TENSOR_MAX_PRINCIPAL_DEVIATORIC Tensor maximum principal deviatoric value.
-
enumerator
TENSOR_PRINCIPAL_VALUES Tensor principal values.
-
enumerator
TENSOR_PRINCIPAL_DIRECTIONS Tensor principal directions.
-
enumerator
TENSOR Tensor.
-
enumerator
GENERALTENSOR General tensor.
-
enumerator
TENSOR_GENERAL_XX General tensor xx component.
-
enumerator
TENSOR_GENERAL_XY General tensor xy component.
-
enumerator
TENSOR_GENERAL_XZ General tensor xz component.
-
enumerator
TENSOR_GENERAL_YX General tensor yx component.
-
enumerator
TENSOR_GENERAL_YY General tensor yy component.
-
enumerator
TENSOR_GENERAL_YZ General tensor yz component.
-
enumerator
TENSOR_GENERAL_ZX General tensor zx component.
-
enumerator
TENSOR_GENERAL_ZY General tensor zy component.
-
enumerator
TENSOR_GENERAL_ZZ General tensor zz component.
-
enumerator
TENSOR_GENERAL_SYMMETRIZED General tensor symmetrized tensor.
-
enumerator
TENSOR_GENERAL_FIRST_ROW General tensor first row vector.
-
enumerator
TENSOR_GENERAL_SECOND_ROW General tensor second row vector.
-
enumerator
TENSOR_GENERAL_THIRD_ROW General tensor third row vector.
-
enumerator
SHELL_NXX Shell Nxx component.
-
enumerator
SHELL_NYY Shell Nyy component.
-
enumerator
SHELL_NXY Shell Nxy component.
-
enumerator
SHELL_MXX Shell Mxx component.
-
enumerator
SHELL_MYY Shell Myy component.
-
enumerator
SHELL_MXY Shell Mxy component.
-
enumerator
SHELL_QXZ Shell Qxz component.
-
enumerator
SHELL_QYZ Shell Qyz component.
-
enumerator
BEAM_NXX Beam Nxx component.
-
enumerator
BEAM_MYY Beam Myy component.
-
enumerator
BEAM_MZZ Beam Mzz component.
-
enumerator
BEAM_T Beam Torque component.
-
enumerator
BEAM_QXY Beam Qxy component.
-
enumerator
BEAM_QZX Beam Qzx component.
-
enumerator
BEAM_TB Beam Bimoment component.
-
enumerator
SPRINGDASHPOT_F SpringDashpot Force component.
-
enumerator
SPRINGDASHPOT_FX SpringDashpot Force X component.
-
enumerator
SPRINGDASHPOT_FY SpringDashpot Force Y component.
-
enumerator
SPRINGDASHPOT_FZ SpringDashpot Force Z component.
-
enumerator
SPRINGDASHPOT_MX SpringDashpot Moment X component.
-
enumerator
SPRINGDASHPOT_MY SpringDashpot Moment Y component.
-
enumerator
SPRINGDASHPOT_MZ SpringDashpot Moment Z component.
-
enumerator
SCALAR Scalar.
-
enumerator
SCALARS_0 Zeroth scalar.
-
enumerator
SCALARS_1 First scalar.
-
enumerator
SCALARS_2 Second scalar.
-
enumerator
SCALARS_3 Third scalar.
-
enumerator
SCALARS_4 Fourth scalar.
-
enumerator
SCALARS_5 Fifth scalar.
-
enumerator
SCALARS_6 Sixth scalar.
-
enumerator
SCALARS_7 Seventh scalar.
-
enumerator
SCALARS_8 Eighth scalar.
-
enumerator
SCALARS_9 Ninth scalar.
-
enumerator
SCALARS_10 Tenth scalar.
-
enumerator
SCALARS_11 Eleventh scalar.
-
enumerator
SCALARS_12 Twelfth scalar.
-
enumerator
Public Functions
-
ErrorCode
getErrorCode() Return the current
ErrorCodeof the State object.Returns: ErrorCode- The current error code, orNONEif no error.
-
Status
setPrecision(Precision precisionType) Specify the precision used to maintain State data. All previously defined data is cleared by this function. The function should be called before
define(). By default, State data are held in single precision.See Also
getPrecision()Parameters: precisionType – PrecisionReturns: Status
-
Status
getPrecision(Precision *precisionType) Get precision used to maintain State data.
See Also
setPrecision()Parameters: precisionType – [out] PrecisionReturns: Status
-
Status
setMeshInterface(MeshInterface *functions) Set a pointer to a MeshInterface attribute object. If a MeshInterface attribute object is set then all finite element topology, connectivity, node coordinate and node and element association queries will be made through the MeshInterface interface. To deactivate the MeshInterface interface, set a NULL MeshInterface object pointer. A MeshInterface attribute object is required to store element node results data or to perform any mapping operation using
map().See Also
getMeshInterface()Parameters: functions – Pointer to the MeshInterface object to be set. Returns: Status
-
Status
getMeshInterface(MeshInterfacePtr &functions) Get pointer to MeshInterface attribute object.
See Also
setMeshInterface()Parameters: functions – [out] Pointer to the MeshInterface object Returns: Status
-
Status
setLocalCoordinateSystemIds(IdTranslator *localCoordinateSystemIds) Set a pointer to an IdTranslator object containing local coordinate system flags. The IdTranslator object is required if local coordinate system is to be maintained for the State data. Depending upon the local coordinate system flags contained in the IdTranslator object, HashTable objects and/or a State may also be required. Local coordinate systems are used by the
transformToCoordinateSystem()function.See Also
getLocalCoordinateSystemIds()Parameters: localCoordinateSystemIds – Pointer to the IdTranslator object containing local coordinate system flags Returns: Status
-
Status
getLocalCoordinateSystemIds(IdTranslatorPtr &localCoordinateSystemIds) Get pointer to IdTranslator object containing local coordinate system flags.
See Also
setLocalCoordinateSystemIds()Parameters: localCoordinateSystemIds – [out] Pointer to the IdTranslator object Returns: Status
-
Status
setLocalCoordinateSystemDirectionCosines(State *localCoordinateSystemDirectionCosines) Set a pointer to a State object containing local coordinate system direction cosines.
See Also
getLocalCoordinateSystemDirectionCosines()Parameters: localCoordinateSystemDirectionCosines – Pointer to the State object containing direction cosines Returns: Status
-
Status
getLocalCoordinateSystemDirectionCosines(StatePtr &localCoordinateSystemDirectionCosines) Get pointer to State object containing local coordinate system direction cosines.
See Also
setLocalCoordinateSystemDirectionCosines()Parameters: localCoordinateSystemDirectionCosines – [out] Pointer to the State object Returns: Status
-
Status
setRotationAngleVectors(State *rotationAngleVectors) Set a pointer to a State object containing rotation angle vectors.
See Also
getRotationAngleVectors()Parameters: rotationAngleVectors – Pointer to the State object containing rotation angle vectors Returns: Status
-
Status
getRotationAngleVectors(StatePtr &rotationAngleVectors) Get pointer to State object containing rotation angle vectors.
See Also
setRotationAngleVectors()Parameters: rotationAngleVectors – [out] Pointer to the State object Returns: Status
-
Status
setCoordinateSystems(HashTable<CoordinateSystem> *coordinateSystems) Set a pointer to a HashTable object containing coordinate system objects.
See Also
getCoordinateSystems()Parameters: coordinateSystems – Pointer to the HashTable of CoordinateSystem objects to be set Returns: Status
-
Status
getCoordinateSystems(HashTablePtr<CoordinateSystem> &coordinateSystems) Get pointer to HashTable object containing coordinate system objects.
See Also
setCoordinateSystems()Parameters: coordinateSystems – [out] Pointer to the HashTable of CoordinateSystem objects Returns: Status
-
Status
setElementData(HashTable<ElementData> *elementData) Set a pointer to a HashTable object containing element data objects.
See Also
getElementData()Parameters: elementData – Pointer to the HashTable of ElementData objects to be set Returns: Status
-
Status
getElementData(HashTablePtr<ElementData> &elementData) Get pointer to HashTable object containing element data objects.
See Also
setElementData()Parameters: elementData – [out] Pointer to the HashTable of ElementData objects Returns: Status
-
template<auto
IntegerParameterEnumerator, typenameValueType>
StatussetIntegerParameter(ValueType value) Specify State parameters. See
setComplexMode()for complex mode parameters.The parameter
MAPPING_ELEMENTselects the type of element mapping from nodes or element nodes to elements. The average (AVERAGE), minimum (MINIMUMorABSOLUTE_MINIMUM), maximum (MAXIMUMorABSOLUTE_MAXIMUM), or element centroidal (CENTROIDAL) contribution may be selected on a component basis. Using minimum or maximum for anything other than scalar data should be done with care. The absolute-value options test on absolute value but set the signed value. The element centroidal value generally differs from the element average for higher order elements only. By defaultMAPPING_ELEMENTisAVERAGE.The parameter
MAPPING_NODEselects the type of node mapping from elements or element nodes to nodes. The average (AVERAGE), element geometry weighted average (GEOMETRY), minimum, maximum, absolute minimum/maximum, or maximum difference (DIFFER) contribution may be selected. Using minimum or maximum for non-scalar data should be done with care. IfAVERAGEis used, adjacent elements are equally weighted when averaging at shared nodes. IfGEOMETRYis used, contributions are weighted by element size, which is more accurate when adjacent elements have significantly different sizes. The default forMAPPING_NODEisAVERAGE.The parameter
MAPPING_NONZEROenables mapping of non-zero element quantities only to nodes. If disabled all connected elements contribute; if enabled, elements whose quantities are all zero are ignored. The parameter is disabled by default.The parameter
MAPPING_DEFINEDenables mapping of defined entities only. If disabled, undefined node or element data is assumed to be zero. If enabled, undefined node and element data is ignored; undefined elements are skipped when mapping to nodes and undefined node contributions cause the element to be skipped when mapping to elements. The parameter is enabled by default.The parameter
MIDSIDEcontrols how midside node values are processed byprocessMidSideNodes().MIDSIDE_AVERAGEaverages the corner node values on the edge, whileMIDSIDE_CLAMPclamps midside values to the corner values. The default isMIDSIDE_AVERAGE.The parameter
SORT_DESCENDINGenables sorting from positive to negative order ingenerateSortedEntities(). The parameter is disabled by default.The parameter
SORT_ABSOLUTE_VALUEenables sorting by absolute value ingenerateSortedEntities(). The parameter is disabled by default.The parameter
SORT_ELEMENT_AVERAGEenables sorting of the element average of element-node quantities ingenerateSortedEntities(). The parameter is enabled by default.The parameter
EXTENT_IGNORE_ZEROcauses the extent calculations performed bygetExtent(),getExtentWithLocation(), andgetExtentWithLocationAndSection()to ignore entities whose contributions are all zero. The parameter is disabled by default.The parameter
LIST_WIDTHspecifies the field width (between 9 and 25 characters) used when writing textual listings of State data. The default is 13.Template Parameters: - IntegerParameterEnumerator – Template parameter specifying the
IntegerParameter - ValueType – Type of the value
Parameters: value – The value to set. Type depends on the parameter:
ElementMappingParameter,NodeMappingParameter,MidsideParameter, or int.Returns: - IntegerParameterEnumerator – Template parameter specifying the
-
Status
setComplexMode(ComplexMode mode) Set complex mode. By default the complex mode is
REAL. UsegetComplexMode()to query the complex mode.Parameters: mode – ComplexModeReturns: Status
-
Status
getComplexMode(ComplexMode *mode) Get complex mode for State data.
See Also
setComplexMode()Parameters: mode – [out] ComplexModeReturns: Status
-
Status
isComplex(int *flag) Query for complex data. The flag will be returned as one if the complex mode set by
setComplexMode()is everIMAGINARYorREAL_IMAGINARY, otherwise it is returned as zero.Parameters: flag – [out] Complex data existence flag Returns: Status
-
Status
define(int entityCount, EntityType entityType, EntityType subentityType, DataLayout layout) Specify the number of parent entities, and type of parent and child entities and data type. A child entity type may be specified if element node results are to be managed by the state. If purely node, particle, mode or element, element face or element edge results data are to be managed by the state, then subEntityType should be set to
NONE. This function call initializes all data to zero.See Also
inquire()Parameters: - entityCount – Number of parent entities
- entityType –
EntityTypeof parent entity - subEntityType –
EntityTypeof child entity - layout –
DataLayouttype
Returns:
-
Status
inquire(int *entityCount, EntityType *entityType, EntityType *subentityType, DataLayout *layout) Inquire of defined entityCount, entityType, subEntityType and dataType as output arguments.
See Also
define()Parameters: - entityCount – [out] Number of parent entities
- entityType – [out]
EntityTypeof parent entity - subEntityType – [out]
EntityTypeof child entity - layout – [out]
DataLayouttype
Returns:
-
Status
setEngineeringStrainFlag(int flag) Set engineering strain interpretation of tensor data type. If this flag is enabled then the shear (off diagonal) components of a tensor data type, as set by
define(), are assumed to be twice the standard tensor values. The Max Shear derived value is also returned as twice the standard tensor value. By default the engineering strain flag is disabled. Note that this flag is automatically set when converting strain data usingconvertStrainData().See Also
getEngineeringStrainFlag()Parameters: flag – Engineering strain flag. 0 for Tensor strain, and 1 for Engineering strain. Returns: Status
-
Status
getEngineeringStrainFlag(int *flag) Get engineering strain flag.
See Also
setEngineeringStrainFlag()Parameters: flag – [out] Engineering strain flag Returns: Status
-
Status
setMagnitudePhaseFlag(int flag) Set magnitude phase interpretation of complex data type. By default the magnitude phase flag is disabled and complex data is interpreted as real imaginary. Note that this flag is automatically set when converting complex data using
convertComplexData().See Also
getMagnitudePhaseFlag()Parameters: flag – Magnitude phase flag. 0 for real imaginary, and 1 for magnitude phase. Returns: Status
-
Status
getMagnitudePhaseFlag(int *flag) Get magnitude phase flag.
See Also
setMagnitudePhaseFlag()Parameters: flag – [out] Magnitude phase flag Returns: Status
-
Status
clear() Clear all results data to zero.
- Errors
-
OPERATIONis generated if no entities have been defined or if the number of entities in the associated MeshInterface does not match the State definition. -
NULLOBJECTis generated if face/edge or element-node data is managed and no MeshInterface object has been set.
-
Returns: Status
-
Status
getDefinedDataCount(int *count) Get the number of entities with defined data.
Parameters: count – [out] Number of entities with defined data Returns: Status
-
Status
getStatus(int entityCount, int entityIndices[], int status[]) Get results data status, status, for a set of entities, entityIndices. The data status will be 1 if the data for a given entity has been defined and the current section number defined using
setSection()is less than or equal to the number of sections defined usingsetSectionCount().Conversely, the data status will be 0 if the data for a given entity has not been defined using
setDataAtEntity()or the section number defined usingsetSection()is greater than the number of sections defined usingsetSectionCount().Parameters: - entityCount – Number of entities to return results
- entityIndices – Array of entity indices
- status – [out] Array of returned results data status
Returns:
-
Status
getStatusAtElementEntity(int elementId, int elementEntityNumber, int *status) Get element face or element edge results data status, status, for a given element, elementId and face or edge number, elementEntityNumber. The data status will be 1 if the data has been defined, otherwise 0.
Parameters: - elementId – Element index
- elementEntityNumber – Element face or edge number
- status – [out] Returned results data status
Returns:
-
Status
setElementEntities(int elementId, int elementEntityCount, int entityIndices[]) Set element faces or edges at which data is to be specified. Use
getStatusAtElementEntity()to query if data is specified for a particular element face or element edge.- Errors
-
OPERATIONis generated if not an element face or element edge state.
Parameters: - elementId – Element index to set number of results sections
- elementEntityCount – Number of element faces or element edges
- elementEntityNumbers – Array of element face or element edge numbers
Returns:
-
Status
getElementEntities(int elementId, int *elementEntityCount, int entityIndices[]) Get element faces or edges at which data has been specified.
- Errors
-
OPERATIONis generated if not an element face or element edge state.
Parameters: - elementId – Element index
- entitiesCount – [out] Number of element faces or element edges
- entityIndices – [out] Array of element face or element edge numbers
Returns:
-
Status
setSectionCount(int entityIndex, int sectionCount) Set number of results sections, sectionCount, for a specified entityIndex. Section results may only be specified for element or element node states. Use
getSectionCount()to retrieve the number of sections.- Errors
Parameters: - entityIndex – Entity index
- sectionCount – Number of results sections
Returns:
-
Status
getSectionCount(int entityCount, int entityIndices[], int sectionCounts[]) Get number of results sections, sectionCounts, for a set of entities, entityIndices. If an element has no sections, 0 is returned.
Parameters: - entityCount – Number of entities to return
- entityIndices – Array of entity indices
- sectionCounts – [out] Array of returned number of results sections
Returns:
-
Status
isSectionDefined(int *flag) Query if section data has been defined. The return value flag = 0 if no sections have been defined, else 1 is returned.
Parameters: flag – [out] Section data defined flag Returns: Status
-
Status
setSectionLayerPositionType(int index, LayerPosition layerPosition) Set layer position type for a specified index. Layer position types can only be specified for element or element node states. This value does not affect the operation of the State object, it is used for query only. Use
getSectionLayerPositionType()to retrieve the layer position type.- Errors
Parameters: - index – Entity index to set layer position type
- layerPosition – Section
LayerPositiontype (NONE,MIDDLE,BOTTOM_TOP,BOTTOM_MIDDLE_TOP, orINTEGRATION_POINT).
Returns:
-
Status
getSectionLayerPositionType(int entityCount, int indices[], LayerPosition layerPositions[]) Get layer position types for a set of entities. If no layer position types have been defined for an element, 0 is returned.
Parameters: - entityCount – Number of entities to return
- indices – Array of entity indices
- layerPositions – [out] Array of returned section layer position types
Returns:
-
Status
setLayerInformation(int index, LayerPosition layerPositions[], int layerNumbers[]) Set layer position and layer number for each section for a specified index. The number of layer positions and layer numbers in the layerPositions and layerNumbers arguments is equal to the number of sections specified for index using
setSectionCount(). Layer position types can only be specified for element or element node states. This value does not affect the operation of the State object, it is used for query only. UsegetLayerInformation()to retrieve the layer number and position.- Errors
Parameters: - index – Entity index
- layerPositions – Section
LayerPositiontype (NONE,BOTTOM,MIDDLE,TOP, orINTEGRATION_POINT). - layerNumbers – Section layer numbers
Returns:
-
Status
getLayerInformation(int index, LayerPosition layerPositions[], int layerNumbers[]) Get layer position and layer number for each section for a specified index. The number of layer positions and layer numbers returned in the layerPositions and layerNumbers arguments is equal to the number of sections specified for index using
setSectionCount().- Errors
Parameters: - index – Entity index
- layerPositions – [out] Section
LayerPositiontype (NONE,BOTTOM,MIDDLE,TOP, orINTEGRATION_POINT). - layerNumbers – [out] Section layer numbers
Returns:
-
Status
clearDataAtEntity(int index) Clear results data for entity index. The results data is set to zero and the data status is set to zero.
- Errors
-
VALUEis generated if an improper index is specified.
Parameters: index – Entity index Returns: Status
-
Status
setDataAtElementEntity(int elementId, int elementEntityNumber, float data[]) Set results data, data, for a specified element elementId and element face or edge number, elementEntityNumber. The functions
getDataAtElementEntity()are specifically designed to retrieve element face and element edge data.- Errors
-
VALUEis generated if an improper elementId is specified. -
NULLOBJECTis generated if a MeshInterface attribute object has not been set and the State manages element node results data. -
OPERATIONis generated if not an element face or element edge state.
-
Parameters: - elementId – Element index
- elementEntityNumber – Element face or edge number
- data – Array of element data to be set
Returns:
-
Status
setDataAtElementEntity(int elementId, int elementEntityNumber, double data[]) Set results data, data, for a specified element elementId and element face or edge number, elementEntityNumber. The functions
getDataAtElementEntity()are specifically designed to retrieve element face and element edge data.- Errors
-
VALUEis generated if an improper elementId is specified. -
NULLOBJECTis generated if a MeshInterface attribute object has not been set and the State manages element node results data. -
OPERATIONis generated if not an element face or element edge state.
-
Parameters: - elementId – Element index
- elementEntityNumber – Element face or edge number
- data – Array of element data to be set
Returns:
-
Status
setDataAtEntity(int index, float data[]) Set results data, data, for a specified index. Use
getData()to retrieve State data. If the State object manages node or element centroid data, the array data contains 1, 3, 6 or 9 components corresponding to scalar, vector, six dof vector, tensor or general tensor data types. If element node data is managed, data contains 1, 3, 6 or 9 components for each element node.- Errors
-
VALUEis generated if an improper index is specified. -
NULLOBJECTis generated if a MeshInterface attribute object has not been set and the State manages element node results data. -
OPERATIONis generated if the State manages element node results data and the MeshInterface attribute object returns a total number of entities which does not match the number of entities declared indefine().
-
Parameters: - index – Entity index
- data – Array of State data to be set
Returns:
-
Status
setDataAtEntity(int index, double data[]) Set results data, data, for a specified index. Use
getData()to retrieve State data. If the State object manages node or element centroid data, the array data contains 1, 3, 6 or 9 components corresponding to scalar, vector, six dof vector, tensor or general tensor data types. If element node data is managed, data contains 1, 3, 6 or 9 components for each element node.- Errors
-
VALUEis generated if an improper index is specified. -
NULLOBJECTis generated if a MeshInterface attribute object has not been set and the State manages element node results data. -
OPERATIONis generated if the State manages element node results data and the MeshInterface attribute object returns a total number of entities which does not match the number of entities declared indefine().
-
Parameters: - index – Entity index
- data – Array of State data to be set
Returns:
-
Status
setDerivedQuantity(DerivedType type) Set current derived quantity type. All subsequent queries of the State will return the specified derived quantity. These query functions include
getData()andgetExtent(). UsegetDerivedQuantityComponentCount()to return the number of components in the current derived quantity type.The relationship
SCALARS_n=SCALARS_1+ n-1 always holds.See Also
getDerivedQuantity()Parameters: type – DerivedTypequantityReturns: Status
-
Status
getDerivedQuantity(DerivedType *type) Get derived quantity type.
See Also
setDerivedQuantity()Parameters: type – [out] DerivedTypeReturns: Status
-
Status
getDerivedQuantityComponentCount(int *count) Return the number of components in the current derived quantity type.
Parameters: count – [out] Number of components in the current derived quantity type Returns: Status
-
Status
getPrimitiveDerivedQuantity(DataLayout *layout) Return the primitive data type of the current derived quantity type. For example, the primitive data type of
VECTOR_MAGNITUDEisSCALAR.Parameters: layout – [out] DataLayoutReturns: Status
-
Status
setSection(int section) Set current section. All subsequent queries of the State will return data for the specified section. If the section number is set to
NONEthen data will be returned for all sections. Setting section toBOTTOMwill return the first section for each element and is the same as setting section to 1. Setting section toTOPwill return the last section defined for each element. By default the section number is set to 1. These query functions includegetData()andgetExtent().See Also
getSection()- Errors
-
VALUEis generated if an improper section is specified.
Parameters: section – The section number to select data ( NONE,BOTTOM,TOP, or > 0).Returns: Status
-
Status
getSection(int *section) Get section number.
See Also
setSection()Parameters: section – [out] Section number Returns: Status
-
Status
setCoordinateSystem(System system) Specify the coordinate system State of the State object. The coordinate system State is changed by the
transformToCoordinateSystem()function. By default the coordinate system State isGLOBAL.See Also
getCoordinateSystem()Parameters: system – System(GLOBAL,LOCAL_UNDEFORMED, orLOCAL_DEFORMED)Returns: Status
-
Status
getCoordinateSystem(System *system) Get coordinate system.
See Also
setCoordinateSystem()Parameters: system – [out] SystemReturns: Status
-
Status
setCoordinateSystemEntityType(EntityType type) Specify the coordinate system entity type of the State object. By default the coordinate system entity type is the same as the parent entity type. Note that this is needed in the case of element node State in which the nodal data is in a node based coordinate system.
See Also
getCoordinateSystemEntityType()- Errors
Parameters: type – EntityTypeReturns: Status
-
Status
getCoordinateSystemEntityType(EntityType *type) Get the coordinate system entity type of the State object.
See Also
setCoordinateSystemEntityType()Parameters: type – [out] EntityTypeReturns: Status
-
Status
transformToCoordinateSystem(System system, Group *group) Transform vector, six dof vector, tensor or general tensor data from the current coordinate system State to global coordinates or vice versa. The coordinate system State of the data is set using
setCoordinateSystem(). The current coordinate system State may be queried usinggetCoordinateSystem(). If the current coordinate system State is the same as system, this function returns immediately. If the State data type is scalar this function returns immediately.- Errors
-
VALUEis generated if group is not the same entity type as the state. -
NULLOBJECTis generated if the MeshInterface, IdTranslator, HashTable or State attribute objects have not been set. -
OPERATIONis generated if not a node or element state. -
OPERATIONis generated if an element integration point state does not involve aLOCAL_DEFORMEDsystem.
-
Parameters: - system –
Systemto transform to (GLOBAL,LOCAL_UNDEFORMED, orLOCAL_DEFORMED). - group – Pointer to Group object of entities to transform. If NULL, then all entities are assumed.
Returns:
-
Status
convertStrainData(StrainType type) Convert strain data from tensor to/from engineering form. If strainType is not
TENSORorENGINEERINGor the type matches the current internal type, this function returns. The functionsetEngineeringStrainFlag()is called internally to set the current State of the strain data after conversion.Parameters: type – StrainTypetypeReturns: Status
-
Status
convertComplexData(ComplexMode complexType) Convert complex data from real/imaginary to/from magnitude/phase form. If the data is not complex, complexType is not
REAL_IMAGINARYorMAGNITUDE_PHASEor the complexType matches the current internal type, this function returns. The functionsetMagnitudePhaseFlag()is called internally to set the current State of the complex data after conversion.Parameters: complexType – ComplexMode(REAL_IMAGINARYorMAGNITUDE_PHASE)Returns: Status
-
Status
demonstrate(DemonstrationType operation, float factor, Group *group) Create “demo” node vector displacement results. Set the contents of the State object to a vector of node displacements which resemble either beam or plate bending. The maximum displacement magnitude is factor times one half of the maximum model extent along the global axes. The undeformed coordinates are accessed from the MeshInterface attribute object. Set the MeshInterface attribute object using
setMeshInterface().- Errors
-
VALUEis generated if group is not the same entity type as the state. -
OPERATIONis generated if the State is not a node vector state. -
NULLOBJECTis generated if a MeshInterface object has not been set.
-
Parameters: - operation – Operation
DemonstrationTypespecified to create displacement results - factor – Floating point factor
- group – Pointer to Group object. If NULL, then all entities are assumed.
Returns:
-
Status
deformState(float factor, State *displacements, Group *group) Create deformed node vector of coordinates. Set the contents of the State object to the sum of the undeformed coordinates plus some factor, factor, times the displacements contained in displacements. The undeformed coordinates are accessed from the MeshInterface attribute object. Set the MeshInterface attribute object using
setMeshInterface(). The states must be node states. The State object must be a vector state, the displacements object must be a node vector or node sixdof state. This routine implements the following equation,State = undeformed_coordinates + factor * displacements
- Errors
-
VALUEis generated if group is not the same entity type as the state. -
OPERATIONis generated if the State is not a node vector state or displacements is not a node vector or node sixdof state. -
NULLOBJECTis generated if a MeshInterface object has not been set.
-
Parameters: Returns:
-
Status
getData(int entityCount, int indices[], float data[]) Get results data, data, for a set of entities, indices. The results data is subject to the current derived quantity specified by
setDerivedQuantity()and the current section set bysetSection(). The results data returned in array data is ordered as results data for entity indices[0] followed by results data for indices[1],…,indices[entityCount-1]. If the current section is greater than the number of sections for a particular entity, then zeros are returned for that section.Use
setDataAtEntity()to set results data.- Errors
-
VALUEis generated if an improper entityCount or indices are specified.
Parameters: - entityCount – Number of entities to return results
- indices – Array of entity indices
- data – [out] Array of returned results data
Returns:
-
Status
getData(int entityCount, int indices[], double data[]) Get results data, data, for a set of entities, indices. The results data is subject to the current derived quantity specified by
setDerivedQuantity()and the current section set bysetSection(). The results data returned in array data is ordered as results data for entity indices[0] followed by results data for indices[1],…,indices[entityCount-1]. If the current section is greater than the number of sections for a particular entity, then zeros are returned for that section.Use
setDataAtEntity()to set results data.- Errors
-
VALUEis generated if an improper entityCount or indices are specified.
Parameters: - entityCount – Number of entities to return results
- indices – Array of entity indices
- data – [out] Array of returned results data
Returns:
-
Status
getDataAtElement(int elementId, float data[]) Get results data, data, for element elementId. The results data is subject to the current derived quantity specified by
setDerivedQuantity()and the current section set bysetSection(). The results data is also sensitive to theMAPPING_ELEMENTmapping options which are set usingsetIntegerParameter().- Errors
-
NULLOBJECTis generated if a MeshInterface object has not been set.
Parameters: - elementId – Element index
- data – [out] Array of returned results data
Returns:
-
Status
getDataAtElement(int elementId, double data[]) Get results data, data, for element elementId. The results data is subject to the current derived quantity specified by
setDerivedQuantity()and the current section set bysetSection(). The results data is also sensitive to theMAPPING_ELEMENTmapping options which are set usingsetIntegerParameter().- Errors
-
NULLOBJECTis generated if a MeshInterface object has not been set.
Parameters: - elementId – Element index
- data – [out] Array of returned results data
Returns:
-
Status
getDataAtElementEntity(EntityType type, int elementId, int elementEntityNumber, float data[]) Get results data, data, for a set of nodes connected to element elementId. The nodes may include all the element nodes or only those nodes connected to a specified, elementEntityNumber, element face or edge. If type is set to
ELEMENTthen the argument, elementEntityNumber, is ignored. The results data is subject to the current derived quantity specified bysetDerivedQuantity(). If the State is element or element node, the results data is subject to the current section set bysetSection().- Errors
-
NULLOBJECTis generated if a MeshInterface object has not been set.
Parameters: - type –
EntityType - elementId – Element index
- elementEntityNumber – Element face or edge number
- data – [out] Array of returned results data
Returns:
-
Status
getDataAtElementEntity(EntityType type, int elementId, int elementEntityNumber, double data[]) Get results data, data, for a set of nodes connected to element elementId. The nodes may include all the element nodes or only those nodes connected to a specified, elementEntityNumber, element face or edge. If type is set to
ELEMENTthen the argument, elementEntityNumber, is ignored. The results data is subject to the current derived quantity specified bysetDerivedQuantity(). If the State is element or element node, the results data is subject to the current section set bysetSection().- Errors
-
NULLOBJECTis generated if a MeshInterface object has not been set.
Parameters: - type –
EntityType - elementId – Element index
- elementEntityNumber – Element face or edge number
- data – [out] Array of returned results data
Returns:
-
Status
getDataAtElementNaturalCoordinates(int elementId, float naturalCoordinates[], float data[]) Get results data, data, for a natural coordinate value naturalCoordinates at element elementId. Like other retrieval methods, the results data is subject to the current derived quantity specified by
setDerivedQuantity()and the current section set bysetSection().- Errors
-
NULLOBJECTis generated if a MeshInterface object has not been set.
Parameters: - elementId – Element index
- naturalCoordinates – Element natural coordinates
- data – [out] Array of returned results data
Returns:
-
Status
getDataAtElementNaturalCoordinates(int elementId, double naturalCoordinates[], double data[]) Get results data, data, for a natural coordinate value naturalCoordinates at element elementId. Like other retrieval methods, the results data is subject to the current derived quantity specified by
setDerivedQuantity()and the current section set bysetSection().- Errors
-
NULLOBJECTis generated if a MeshInterface object has not been set.
Parameters: - elementId – Element index
- naturalCoordinates – Element natural coordinates
- data – [out] Array of returned results data
Returns:
-
Status
getDataAtEntities(int entityCount, int indices[], double data[]) Get results data, data, for a set of entities, indices. The results data is subject to the current derived quantity specified by
setDerivedQuantity()and the current section set bysetSection().Use
setDataAtEntity()to set results data.- Errors
-
VALUEis generated if an improper entityCount or indices are specified.
Parameters: - entityCount – Number of entities to return results
- indices – Array of entity indices
- data – [out] Array of returned results data
Returns:
-
Status
getDataCountAtEntity(int index, int *totalDataCount, int *locationCount, int *sectionCount) Return the number of data values, locations and sections returned by subsequent queries of the state. These query functions include
getData()andgetExtent(). The number of sections, sectionCount, depends upon the number of sections defined for the element and the current returned section option specified bysetSection(). The number of locations, locationCount, will be 1 for node and element sections and equal to the number of element nodes for element node sections. The total number of data values, totalDataCount, will be the product of the number of components in the current derived quantity with the number of locations and the number of sections. Note that if the data is complex and the complex mode isREAL_IMAGINARYthe number of data values, totalDataCount, is multiplied by 2.- Errors
-
VALUEis generated if an improper index is specified.
Parameters: - index – Entity index to query
- totalDataCount – [out] Total number of data values
- locationCount – [out] Number of data locations
- sectionCount – [out] Number of data sections
Returns:
-
Status
getMaxDataCount(int *totalDataCount, int *locationCount, int *sectionCount) Return the maximum number of data values, locations and sections. The totalDataCount value can be used to allocate memory which is guaranteed to hold the data returned by any call to
getData(). The sectionCount value can be used to determine if any section data has been defined on any element.Parameters: - totalDataCount – [out] Maximum number of data values
- locationCount – [out] Maximum number of data locations
- sectionCount – [out] Maximum number of data sections
Returns:
-
Status
getLocalDirectionCosineMatrices(int index, float cosineMatricesArray[][3][3]) Get direction cosine matrices, cosineMatricesArray, for an entity, index. The direction cosine matrices are the local system of the node, element or element nodes used in the
transformToCoordinateSystem()function.- Errors
-
NULLOBJECTis generated if the MeshInterface or IdTranslator attribute objects have not been set.
Parameters: - index – Entity index
- cosineMatricesArray – [out] Array of returned direction cosine matrices
Returns:
-
Status
getExtent(Group *group, float extent[]) Compute minimum and maximum values of results data for a set of entities specified by an optional input group. The extent array contains the minimum results data values followed by the maximum results data values. The minimum and maximum are calculated for the current derived quantity. For example for a vector State a total of 6 values (minimum x,y,z followed by maximum x,y,z) will be returned in extent. Any entities for which data has not been defined are skipped.
- Errors
-
VALUEis generated if group parent entity size and type does not match the parent entity size and type of the State object.
Parameters: - group – Pointer to Group object. If NULL, then all entities are assumed.
- extent – [out] Minimum and maximum values of results data
Returns:
-
Status
getExtentWithLocation(Group *group, float extent[], int indices[], int elementEntityNumbers[]) Compute minimum and maximum values of results data for a set of entities specified by an optional input group and return the corresponding locations at which the extremes occur. The extent array contains the minimum results data values followed by the maximum results data values. The minimum and maximum are calculated for the current derived quantity. The indices array contains the node or element indices corresponding to the extreme values in extent. The elementEntityNumbers array is filled only if the State is an element node state. It contains the element connectivity index of the element node. Any entities for which data has not been defined are skipped.
- Errors
-
VALUEis generated if group parent entity size and type does not match the parent entity size and type of the State object.
Parameters: - group – Pointer to Group object. If NULL, then all entities are assumed.
- extent – [out] Minimum and maximum values of results data
- indices – [out] Entity indices at which extremes occur
- elementEntityNumbers – [out] Element node connectivity indices
Returns:
-
Status
getExtentWithLocationAndSection(Group *group, float extent[], int indices[], int elementEntityNumbers[], int sections[]) Compute minimum and maximum values of results data for a set of entities specified by an optional input group and return the corresponding locations and sections at which the extremes occur. This function is similar to
getExtentWithLocation()except that section numbers are also returned.- Errors
-
VALUEis generated if group parent entity size and type does not match the parent entity size and type of the State object.
Parameters: - group – Pointer to Group object. If NULL, then all entities are assumed.
- extent – [out] Minimum and maximum values of results data
- indices – [out] Entity indices at which extremes occur
- elementEntityNumbers – [out] Element node connectivity indices
- sections – [out] Section numbers
Returns:
-
Status
computeSum(Group *group, double sum[]) Sum results data, sum, for a set of entities specified by an optional input group. The sum is calculated for the current derived quantity.
- Errors
-
VALUEis generated if group parent entity size and type does not match the parent entity size and type of the State object.
Parameters: - group – Pointer to Group object. If NULL, then all entities are assumed.
- sum – [out] Array of summed results data
Returns:
-
Status
map(State *source, Group *group) Map results quantities between node, element and element node locations. This function maps results data from the entity locations of the source source object to the entity locations of the State object. The source object is unchanged by this function. The quantity mapped from the source is dependent upon the current derived quantity in source, see
setDerivedQuantity(). The mapping process is subject to an optional group which determines the element entities which are to be mapped to the State object. The State and source objects must be distinct.Note that a MeshInterface attribute object must be set in any element or element node states for any mapping operation. Set this attribute object using
setMeshInterface().The algorithm used to map quantities to elements from nodes or element nodes may select an average quantity, geometry weighted average quantity, maximum difference quantity or minimum or maximum quantities. Use
setIntegerParameter()withMAPPING_NODEto set the node mapping type. UsesetIntegerParameter()withMAPPING_ELEMENTto set the element mapping type.- Errors
-
VALUEis generated if group parent entity type is notELEMENTor size does not match the number of elements. -
NULLOBJECTis generated if a MeshInterface attribute object has not been set. -
OPERATIONis generated if the parent and child entity types of the State and source objects are identical.
-
Parameters: Returns:
-
Status
processMidSideNodes(Group *group) Provide specialized processing for data at the midside nodes of elements as a function of the corner nodes (edge endpoint nodes) of the element. Only edge midside nodes are affected, midface and midbody nodes are not processed. Note that a MeshInterface attribute object must be set in the object. Set this attribute object using
setMeshInterface().Processing options include linearly interpolating the midside node data as a function of the edge endpoint node data or clamping the midside node data to the minimum and maximum of the edge endpoint node data. By default, the midside node data is linearly interpolated. Use
setIntegerParameter()withMIDSIDEto control the processing option.- Errors
-
VALUEis generated if group parent entity type is notELEMENTor size does not match the number of elements. -
NULLOBJECTis generated if a MeshInterface attribute object has not been set. -
OPERATIONis generated if sections are defined.
-
Parameters: group – Pointer to Group object of elements. If NULL, then all elements are assumed. Returns: Status
-
Status
mapToElementNode(State *source, Group *group, IdTranslator *elementRegionNumber) Map results data to element node locations. This function maps results data from the entity locations of the source source object to the entity locations of the State object. The source object is unchanged by this function. The quantity mapped from the source is dependent upon the current derived quantity in source, see
setDerivedQuantity(). The input elementRegionNumber object must contain a region number for each element. Data is averaged at element nodes using only elements within the same region. If elementRegionNumber is NULL, then all elements are assumed to be in a single mapping region. The mapping process is subject to an optional group which determines the element entities which are to be mapped to the State object.Note that a MeshInterface attribute object must be set in any element or element node states for any mapping operation. Set this attribute object using
setMeshInterface().Use
setIntegerParameter()withMAPPING_NODEto set the node mapping type. UsesetIntegerParameter()withMAPPING_ELEMENTto set the element mapping type.- Errors
-
VALUEis generated if group parent entity type is notELEMENTor size does not match the number of elements. -
NULLOBJECTis generated if a MeshInterface attribute object has not been set.
-
Parameters: - source – Pointer to source State object
- group – Pointer to Group object of elements. If NULL, then all elements are assumed.
- elementRegionNumber – Pointer to IdTranslator object of element region numbers
Returns:
-
Status
operateUnary(Operation operation, float factor, UnaryFunction function, State *statex, Group *group) Modify the contents of the State object as a function of a single state, statex. The function, function is performed upon the state, statex. This result is scaled by a specified constant factor, factor. The result then modifies the destination State object in some way depending upon operation. Any entities for which data has not been defined are skipped. Note that function of
UNITYignores statex.If the State object has no prior data set, then it is initialized with the derived section configuration of statex.
This routine implements the following equation,
The State and statex objects may be the same.State operation factor*function(statex)
- Errors
-
VALUEis generated if group is not the same entity type as the state. -
OPERATIONis generated if the State and statex entity types are not identical or the derived data type of statex does not match the basic data type of the State object. -
OPERATIONis generated if the State and statex have incompatible section configurations.
-
Parameters: - operation –
Operation - factor – Floating point coefficient
- function –
UnaryFunction - statex – Pointer to State operand object
- group – Pointer to Group object. If NULL, then all entities are assumed.
Returns:
-
Status
operateUnary(Operation operation, double factor, UnaryFunction function, State *statex, Group *group) Modify the contents of the State object as a function of a single state, statex. The function, function is performed upon the state, statex. This result is scaled by a specified constant factor, factor. The result then modifies the destination State object in some way depending upon operation. Any entities for which data has not been defined are skipped. Note that function of
UNITYignores statex.If the State object has no prior data set, then it is initialized with the derived section configuration of statex.
This routine implements the following equation,
The State and statex objects may be the same.State operation factor*function(statex)
- Errors
-
VALUEis generated if group is not the same entity type as the state. -
OPERATIONis generated if the State and statex entity types are not identical or the derived data type of statex does not match the basic data type of the State object. -
OPERATIONis generated if the State and statex have incompatible section configurations.
-
Parameters: - operation –
Operation - factor – Floating point coefficient
- function –
UnaryFunction - statex – Pointer to State operand object
- group – Pointer to Group object. If NULL, then all entities are assumed.
Returns:
-
Status
operateBinary(Operation operation, float factor, BinaryFunction function, State *statex, State *statey, Group *group) Modify the contents of the State object as a function of two states, statex and statey. The function, function is performed upon the states, statex and statey. This result is scaled by a specified constant factor, factor. The result then modifies the destination State object in some way depending upon operation. Any entities for which data has not been defined are skipped.
If the State object has no prior data set, then it is initialized with the derived section configuration of statex.
This routine implements the following equation,
The State, statex and statey objects may be the same.State operation factor*function(statex,statey)
- Errors
-
VALUEis generated if group is not the same entity type as the state. -
OPERATIONis generated if the State, statex and statey entity types are not identical. -
OPERATIONis generated for theCROSSoperation if the derived data types of the State, statex and statey are not vector. -
OPERATIONis generated for theDOToperation if the basic data type of the State object is not scalar and the derived data types of statex and statey are not vector. -
OPERATIONis generated if the State, statex and statey have incompatible section configurations.
-
Parameters: - operation –
Operation - factor – Floating point coefficient
- function –
BinaryFunction - statex – Pointer to first State operand object
- statey – Pointer to second State operand object
- group – Pointer to Group object. If NULL, then all entities are assumed.
Returns:
-
Status
operateBinary(Operation operation, double factor, BinaryFunction function, State *statex, State *statey, Group *group) Modify the contents of the State object as a function of two states, statex and statey. The function, function is performed upon the states, statex and statey. This result is scaled by a specified constant factor, factor. The result then modifies the destination State object in some way depending upon operation. Any entities for which data has not been defined are skipped.
If the State object has no prior data set, then it is initialized with the derived section configuration of statex.
This routine implements the following equation,
The State, statex and statey objects may be the same.State operation factor*function(statex,statey)
- Errors
Parameters: - operation –
Operation - factor – Floating point coefficient
- function –
BinaryFunction - statex – Pointer to first State operand object
- statey – Pointer to second State operand object
- group – Pointer to Group object. If NULL, then all entities are assumed.
Returns:
-
Status
derivative(Operation operation, float factor, DifferentialOperation function, State *statex, Group *group) Modify the contents of the State object as a function of a single state, statex. The function, function is performed upon the state, statex. This result is scaled by a specified constant factor, factor. The result then modifies the destination State object in some way depending upon operation. The source state, statex must be a node or element node state. The destination State object may be either an element or element node state. The data type of the State object and the derived type of statex depend upon the specified function, function as follows:
This routine implements the following equation,function State statex ------------------------------------------ CURL vector vector DIVERGENCE scalar vector GRADIENT vector scalar GRADIENT_NORMALIZED vector scalar STRAIN tensor vector VECTOR_GRADIENT generaltensor vector
For example the call,State operation factor*function(statex)
executes the following equation,derivative(PLUSEQUAL,2.,DIVERGENCE,statex,NULL);
State += 2.*DIVERGENCE(statex)
In particular the
GRADIENT_NORMALIZEDoperator may be used to compute normals to a scalar field for use in smooth shading of isosurfaces. Assume that a node State object contains a continuous scalar field. Smoothly varying node normals to the scalar field may be generated by first usingderivative()to compute normal vectors at element nodes and then usingmap()to map the element node normals to nodes. The mapping operation is required since the computation of gradient normals at element nodes will, in general, result in discontinuous values of the gradients between elements.- Errors
-
VALUEis generated if group is not the same entity type as the state. -
OPERATIONis generated if the State and statex entity types are not proper or the derived data type of statex does not match the proper data type for the function. -
NULLOBJECTis generated if the State object does not have a MeshInterface attribute object.
-
Parameters: - operation –
Operation - factor – Floating point coefficient
- function –
DifferentialOperation - statex – Pointer to State operand object
- group – Pointer to Group object. If NULL, then all entities are assumed.
Returns:
-
Status
setGroupParameter(GroupOperation type, float param[]) Set group derivation parameters. The
EXTENTparameters are two float values specifying scalar state extent, minimum scalar value followed by maximum scalar value. The extent check includes the extreme values.Parameters: - type – Parameter type (
EXTENT) - param – Specifies the float values that type will be set to
Returns: - type – Parameter type (
-
Status
generateSortedEntities(Group *group, IdTranslator *sortedEntities) Generate a list of entity indices and output in the sortedEntities object. The entities are placed in the sortedEntities object sorted by their scalar derived value in the State object. The previous contents of the State object are lost.
By default, for element node states, the average of the element node values is used as the sorting value. Optionally, the individual element node values can be used as the sorting value by setting
SORT_ELEMENT_AVERAGEoff insetIntegerParameter().By default, the values are sorted from negative to positive. The sorting can be changed from positive to negative by setting
SORT_DESCENDINGinsetIntegerParameter(). The absolute value can be sorted by settingSORT_ABSOLUTE_VALUEinsetIntegerParameter().- Errors
Parameters: - group – Pointer to Group object. If NULL, then all entities are assumed.
- sortedEntities – [out] Pointer to IdTranslator object of sorted entities
Returns:
-
Status
generateElementGroup(GroupOperation operation, Group *group, Group *generatedGroup) Derive a group of elements from an input group of elements using a specified operation. The output generatedGroup must have been previously created and defined as an element group. Note that generatedGroup is not cleared by this function, the derived element entities are added to any existing elements in the output generatedGroup. Any entities for which data has not been defined are skipped.
For the operation
EXTENTandOUTBOUNDthe extent limits are specified usingsetGroupParameter(). If any of the data components at an element satisfy the test condition then the element is added to the group.The operation
DEFINEDadds all elements for which data has been defined.The operations
LOCAL_MIN,LOCAL_MAXorLOCAL_MINMAXadds all elements which are a local data minimum, maximum or either minimum or maximum. The State must either be a scalar State or the current derived quantity is a scalar.- Errors
Parameters: - operation –
GroupOperation - group – Pointer to Group object of elements. If NULL, then all elements are assumed.
- generatedGroup – [out] Pointer to Group object to hold generated elements
Returns:
-
Status
generateNodeGroup(GroupOperation operation, Group *group, Group *generatedGroup) Derive a group of nodes from an input group of nodes using a specified operation. The output generatedGroup must have been previously created and defined as a node group. Note that generatedGroup is not cleared by this function, the derived node entities are added to any existing nodes in the output generatedGroup. Any entities for which data has not been defined are skipped.
For the operation
EXTENTandOUTBOUNDthe extent limits are specified usingsetGroupParameter(). If any of the data components at a node satisfy the test condition then the node is added to the group.The operation
DEFINEDadds all nodes for which data has been defined.The operations
LOCAL_MIN,LOCAL_MAXorLOCAL_MINMAXadds all nodes which are a local data minimum, maximum or either minimum or maximum. The State must either be a scalar State or the current derived quantity is a scalar.- Errors
Parameters: - operation –
GroupOperation - group – Pointer to Group object of nodes. If NULL, then all nodes are assumed.
- generatedGroup – [out] Pointer to Group object to hold generated nodes
Returns:
-
Status
copy(State *source) Make a copy of a State object. The contents of the source object are copied to this State object.
Parameters: source – Pointer to the source State object to copy from Returns: Status
-
Status
getCoordinateSystemIdAtEntity(int index, int *coordinateSystemId) Get coordinate system identifier coordinateSystemId used in the system state for entity index.
Parameters: - index – Entity index to get coordinate system identifier
- coordinateSystemId – [out] Coordinate system identifier used for entity index
Returns:
-
enum class