Mesh
Overview
The Mesh class provides comprehensive functionality for managing finite element mesh topology, geometry, and connectivity. It supports both structured and unstructured grids with capabilities for defining nodes, elements, element topology, associations, and adjacency queries.
The Mesh module is designed to manage finite element connectivities and generate information which is dependent upon the adjacency properties of the finite element mesh. For example, the Mesh module can provide sets of the external faces and unique edges of any element subset. Element adjacencies may be be queried across element faces, edges or nodes.
Element adjacency properties are not immediately accessible from standard finite element node connectivity lists. The Mesh
module generates and maintains a data structure, termed the connection “kernel”, which is approximately the same size as the element node
connectivity list. This single data structure provides efficient query of all the above mentioned adjacency related data. The
Mesh object can manage the adjacency kernel information in one of two ways,
1) statically, optimized for unchanging element connections such as in post-processing (STATIC) and 2) dynamically, optimized for a frequently changing
element connections such as can occur in pre-processing (DYNAMIC).
The Mesh module may optionally allocate and manage the basic element node connectivities or access this information from host application data structures via a MeshInterface object. This feature gives the software designer the option of retaining element node connectivity data structures within the host application or yielding the management of this data to a Mesh object. The functions associated with a Mesh object are the following.
- Error handling
getErrorCode()- Get current error code
- Mesh definition and configuration
setPrecision()- Set precision of node coordinatesgetPrecision()- Get current precisiondefine()- Define number of nodes and elementsinquire()- Inquire number of nodes and elementssetOperatingMode()- SetSTATICorDYNAMICsetDimension()- Set spatial dimensiongetDimension()- Determine spatial dimension
- External object management
setState()- Set State object for node coordinatesgetState()- Get State objectsetMeshInterface()- Set MeshInterface objectgetMeshInterface()- Get MeshInterface object
- Parameters
setFloatParameter()- Set floating point parameterssetIntegerParameter()- Set integer parameters
- Entity counting
getEntityCount()- Get number of nodes, elements, faces, or edges
- Element topology
setTopology()- Set element topologygetTopology()- Get element topology
- Element management
deleteElement()- Delete an elementisElementDefined()- Query if element is definedgenerateElement()- Generate an element indexsetIntegrationPointCount()- Set number of element integration pointsgetIntegrationPointCount()- Get number of element integration points
- Element connectivity
setElementNodes()- Set element node connectivitygetElementNodes()- Get element node connectivitygetMaxElementNodes()- Get maximum nodes connected to any elementgetElementNodeCount()- Get number of nodes in an element
- Node coordinates
setCoordinates()- Set node coordinates (float and double overloads)getCoordinates()- Get node coordinates (float and double overloads)
- Node management
deleteNode()- Delete a nodeisNodeDefined()- Query if node is definedgenerateNode()- Generate a node index
- Index translation
getNodeIndex()- Get node index from user IDgetElementIndex()- Get element index from user ID
- Part management
setPartName()- Set part name stringgetPartName()- Get part name stringgetPartNameCount()- Get number of part namesgetPartInformation()- Get specific part name and IDsetPartIJK()- Set IJK block parameters for partgetPartIJK()- Get IJK block parameters for partgetPartIJKCount()- Get number of part IJK blocksgetPartIJKFromPartIndex()- Get specific part IJK block
- Node associations
setNodeAssociation- Set node associationgetNodeAssociation- Get node associationsaddNodeAssociation- Add additional node associationdeleteNodeAssociation- Delete added node associationsgetNodeAssociationCount- Get number of node associationsgetAllNodeAssociations- Get all node associations
- Element associations
setElementAssociation- Set element associationgetElementAssociation- Get element associationsaddElementAssociation- Add additional element associationdeleteElementAssociation- Delete added element associationsgetElementAssociationCount- Get number of element associationsgetAllElementAssociations- Get all element associations
- Element entity associations
setElementEntityAssociation()- Set element face/edge associationgetElementEntityAssociation()- Get element face/edge associationaddElementEntityAssociation()- Add element face/edge associationdeleteElementEntityAssociation()- Delete element face/edge associationsgetElementEntityAssociationCount()- Get number of element entity associationsgetAllElementEntityAssociations()- Get all element entity associations
- Element entity topology and connectivity
getElementEntityCount()- Get number of element faces, edges, or nodesgetElementEntityConnectivity()- Get element face/edge node connectivitygetElementEntityConnectionNumbers()- Get element face/edge connection numbersgetElementEntityCornerConnectionNumbers()- Get element face/edge corner connectionsgetElementEntityTopology()- Get element face/edge topology
- Element face normals
setElementFaceNormals()- Set element face normals (float and double overloads)isElementFaceNormalsDefined()- Query if face normals are definedgetElementFaceNormals()- Get element face normals (float and double overloads)
- Element edge tangents
setElementEdgeTangent()- Set element edge tangents (float and double overloads)isElementEdgeTangentDefined()- Query if edge tangents are definedgetElementEdgeTangent()- Get element edge tangents (float and double overloads)
- Kernel generation and management
generateKernel()- Generate connection kernelclearKernel()- Clear connection kernelkernelExists()- Check if kernel exists
- Element adjacency queries
getMaxElementCountConnectedToNode()- Get max elements connected to any nodegetElementCountConnectedToNode()- Get number of elements connected to nodegetElementsConnectedToNode()- Get elements connected to nodegetAdjacentElements()- Get elements adjacent to elementgetAdjacentElementsToFace()- Get adjacent elements with face IDsgetAdjacentElementEntities()- Get adjacent elements with entitiesgetAdjacentElementEntitiesUsingCornerNodesOnly()- Get adjacent elements (corner nodes only)getElementsAdjacentToNodes()- Get elements adjacent to nodes
- Extent operations
getExtent()- Get coordinate extent (float and double overloads)getExtentLocation()- Get extent with node indicesgetExtentLocationInCoordinateSystem()- Get extent in coordinate system
- Group derivation parameters
setGroupFloatParameter()- Set group float parametersetGroupFloatParameterArray()- Set group float parameter arraysetGroupIntegerParameter()- Set group integer parametersetGroupElementAssociationType()- Set group element association typesetGroupNodeAssociationType()- Set group node association typesetSeedGroup()- Set seed group for operations
- Group derivation operations
getElementGroup()- Derive element groupgetFaceGroup()- Derive face groupgetEdgeGroup()- Derive edge groupgetNodeGroup()- Derive node groupgetElementRegion()- Derive element regionsgetNodeRegion()- Derive node regions
- Mesh modification operations
mergeWithNodeMapping()- Merge nodes with mappingmerge()- Merge coincident nodessplitElement()- Split simplex elementcopy()- Copy entire meshappend()- Append meshextractSubset()- Extract mesh subsetextractSubsetWithElementMapping()- Extract subset with element mappingtesselate()- Convert higher order to linear elements
- Mesh analysis operations
getElementSize()- Compute element volume/area/lengthgetIntersectionPlane()- Compute plane intersectionscheckElementIndex()- Validate element index
- Utility operations
print()- Print detailed mesh informationprintSummary()- Print mesh statisticsgetMeshInterfacePointers()- Get internal function pointers
- I/O operations
- Threading
setThreadCount()- Set OpenMP thread count
Mesh Initialization and Configuration
Create a Mesh object instance. Once instantiated, the user may specify the precision used to maintain node coordinates using
setPrecision(). By default, node coordinates are held in single precision. The number of nodes and elements to be represented
by the object is defined using define(). At this stage, only a very small amount of memory has been allocated by the
Mesh object for internal pointer and attribute
variables. If the exact number of nodes and/or elements is not known, then make initial estimates (0 is allowed) and call
define() with these estimates. The Mesh module will adjust memory as required.
The primary data managed by the Mesh object is element topology and connectivity and node coordinates. The
Mesh object can obtain access to this data in two ways:
- Implement a
MeshInterfacewith element connectivity and node coordinate query functions and set this usingsetMeshInterface() - Load element topology, connectivity and node coordinates directly into the
Meshobject usingsetTopology(),setElementNodes()andsetCoordinates()respectively.
The first option requires that the host application “own” the element connectivity and
geometry; the Mesh object allocates no memory for it.
All element connectivity information required by the Mesh object is obtained from the host application via
the MeshInterface query functions. The second option
requires that the host application load element topology, connectivity and node coordinates into the Mesh object. Once
Mesh has access to the primary element and node
information, the functions getTopology(), getElementNodes() and getCoordinates() which query element connectivity
and node coordinate information may be called.
Node and Element Editing and Element Adjacency Query
If the primary element and node information has been loaded directly into the Mesh object (rather than using a
MeshInterface), there are two ways to manage the data depending upon the volatility of the data. The internal data structures
used are optimized for these two modes. If the primary element and node information is unchanging, as in a post-processing application, this is termed
the STATIC mode; if the primary element and node information is volatile, as in a pre-processing application, this is termed the DYNAMIC mode. By default
the Mesh object is in the STATIC mode. Use the function setOperatingMode() to change from STATIC
to DYNAMIC mode or vice versa. If the primary element and node information is accessed using a MeshInterface, only the STATIC mode
is supported.
In the DYNAMIC mode, the Mesh object supports element and node editing using the functions deleteElement(),
isElementDefined(), generateElement() and corresponding functions for
nodes, deleteNode(), isNodeDefined(),
generateNode(). Deleting an element or node marks it as undefined and releases internal memory for use to define other elements
or nodes. By default an element is undefined until it is entered using
setTopology() or queried using generateElement(). A node is undefined until it is
entered explicitly using setCoordinates(), referenced in the element connectivity list of an element using
setElementNodes(), or queried using generateNode(). The functions
isElementDefined() and isNodeDefined() return a flag indicating whether
an element or node has been defined. The functions generateElement() and
generateNode() return an available undefined element or node index and in the process change its status to a defined
element or node. Elements and nodes may be redefined by calling setTopology() and
setCoordinates() respectively.
In addition to the primary element and node information, the Mesh object can derive element adjacency information
from the primary element connectivity. Providing element adjacency information requires additional memory and processing effort. The data structure used to
provide the adjacency information is termed the “kernel”. In the STATIC mode, the kernel must be generated explicitly using
generateKernel(). This function allocates a quantity of memory approximately equal to the number of entries in the element
node connection list. This function also is the most compute intensive Mesh method. The algorithm to create the connection
kernel has the quality of being linear with respect to the number of elements. In the DYNAMIC mode, the kernel is maintained implicitly as each element or
node is generated and/or deleted. The function call to generateKernel() is not required.
Once the kernel is created, adjacency requests may be made. Use getAdjacentElements() to return a list of elements
adjacent to a given element through a face, edge or node. Use getAdjacentElementEntities() to return a list of
elements and their associated edges or faces adjacent to a given element through a face, edge or node. Use
getElementsAdjacentToNodes() to return a list of elements adjacent to a given set of nodes.
Sets of element edges and faces with important properties (external faces, free edges or unique edges) may be
returned for any element subset encoded in a Group object using getEdgeGroup() and
getFaceGroup() respectively.
Node and Element Associations
Nodes, elements, and element edges and faces may be assigned integer values called “associations”.
Associations provide metadata and identifiers for mesh entities. The C++ API defines separate
enumeration types for node and element associations to provide type safety and clarity. These enumerations are defined as follows:
NodeAssociationType and ElementAssociationType.
Common Association Types
Some association types are available for both nodes and elements:
- PART_ID - Part identifier
- COORDINATE_SYSTEM_ID - Solution coordinate system identifier
- IBLANK - Iblank code
- USER_ID - User defined identifier
- MISCELLANEOUS_ID0 through MISCELLANEOUS_ID8 - Generic miscellaneous identifiers
The miscellaneous identifiers (MISCELLANEOUS_ID0 through MISCELLANEOUS_ID8) are provided for generic use and can store application-specific metadata.
Working with Associations
A single association of a particular type can be assigned to a node or element. This single association
is set at nodes and elements using setNodeAssociation and
setElementAssociation respectively. It may be queried using
getNodeAssociation and getElementAssociation.
If a particular association has not been set, its value will be returned as 0 when queried.
Element Entity Associations
Associations may be set for individual element edges and faces. This type of association is termed
an element entity association. Element entity associations are set using
setElementEntityAssociation() and queried using
getElementEntityAssociation(). Element edge and face associations are
most often used to associate these features with underlying geometry edge and face identifiers
(using GEOMETRY_EDGE_ID and GEOMETRY_FACE_ID).
Multiple Associations
It is possible to specify multiple associations of a particular type at a single entity. Multiple
node associations are managed using addNodeAssociation,
deleteNodeAssociation, getNodeAssociationCount
and getAllNodeAssociations. Similarly, multiple element associations
are managed using addElementAssociation,
deleteElementAssociation, getElementAssociationCount
and getAllElementAssociations.
The function addNodeAssociation will specify associations at a node
in addition to the single association (which may have a value of 0) always present at a node. Any
additional node associations may be deleted using deleteNodeAssociation.
This function only affects node associations added using addNodeAssociation.
The total number of associations of a type specified at a node may be queried using
getNodeAssociationCount. The number returned is 1 plus the number of
associations added using addNodeAssociation. All associations defined
at a node may be queried using getAllNodeAssociations, which returns
the single association set using setNodeAssociation and all additional
associations specified using addNodeAssociation.
Part Names and IJK Structure
The PART_ID association is designed to be used with the naming capability of the
Mesh object. The function setPartName()
can be used to associate a character string with each PART_ID value. Use
getPartName() to retrieve the name character string given the
PART_ID value.
It is also possible to specify the block IJK structure of a part. Use the function
setPartIJK() to associate a block IJK structure with each PART_ID
value. Use getPartIJK() to retrieve the IJK block structure given
the PART_ID value. If a part has a block IJK structure, the nodes and elements of the block
will be sequentially ordered in the I direction first, followed by the J and K directions
respectively.
Deriving Element, Face, Edge and Node Groups
The Mesh class provides four functions to generate Group
objects containing elements, element faces, element edges, and nodes. These group derivation functions are:
getElementGroup()- Derive element groupsgetFaceGroup()- Derive face groupsgetEdgeGroup()- Derive edge groupsgetNodeGroup()- Derive node groups
Examples of generated groups include: element groups of intersecting elements, element face groups of
external faces, element edge groups of feature edges, and node groups of nodes connected to the corner
nodes of higher order elements. Each function accepts an optional input seed Group
(set via setSeedGroup()) to limit the operation to the entities in the seed group.
Group Derivation Parameters
Before calling group derivation functions, various parameters can be configured:
setGroupFloatParameter()- Set floating-point parameters for group operationssetGroupFloatParameterArray()- Set floating-point parameter arrayssetGroupIntegerParameter()- Set integer parameters for group operationssetGroupElementAssociationType()- Specify element association type for partitioningsetGroupNodeAssociationType()- Specify node association type for partitioning
Face Groups for Display
A particularly useful operation prepares sets of element faces for graphical display purposes. These operations use a specified element association type to partition the full set of elements.
Use getFaceGroup() with appropriate parameters to generate element faces
which lie on elements with an adjacent element across the face having a differing association value.
This is typically used with association types MATERIAL_ID,
PROPERTY_ID,
or PART_ID to generate the
faces which bound elements in each material, property, or part region. By default, free faces of each
region are not included in the generated Group. The inclusion of free faces
can be controlled using setGroupIntegerParameter().
Edge Groups for Display
Use getEdgeGroup() with an input element face group (generated as described
above) to generate the unique edges or feature edges of the element faces in the source group. These
groups are useful for graphical display of element mesh edges or element mesh feature edges of bounding
element faces. Using getEdgeGroup() with an element source group can
generate all the unique edges of sets of elements which share an edge association value. This group is
useful for graphical display of all mesh edges of each material, property, or part region.
Element Face Normals and Edge Tangents
The Mesh class contains functions to refine the geometry of elements by
specifying optional element face normals and element edge tangents.
setElementFaceNormals()- Set element face normals (float and double overloads)getElementFaceNormals()- Get element face normals (float and double overloads)isElementFaceNormalsDefined()- Query if face normals are definedsetElementEdgeTangent()- Set element edge tangents (float and double overloads)getElementEdgeTangent()- Get element edge tangents (float and double overloads)isElementEdgeTangentDefined()- Query if edge tangents are defined
If the face normals or edge tangents have not been set using setElementFaceNormals()
or setElementEdgeTangent(), then the normals and tangents are computed automatically
using the element node coordinate geometry. Use isElementFaceNormalsDefined() and
isElementEdgeTangentDefined() to query whether face normals or edge tangents have
been explicitly set.
Geometric Tessellation
The tesselate() function can be used to tessellate higher-order elements,
converting them into linear elements. This operation is useful for visualization and analysis purposes
where linear elements are preferred or required.
The tessellation process can be controlled using mesh parameters set via
setFloatParameter() and setIntegerParameter().
Parameters such as tolerance values and subdivision sizes can influence the tessellation behavior.
When elements are tessellated, the resulting linear elements inherit all element associations from the original higher-order elements, preserving material, property, and part identifiers.
Using MeshInterface for External Data
A Mesh object can use a MeshInterface object to
optionally access finite element data from the host application without duplicating the data in memory.
The MeshInterface should implement callback functions to provide:
- Node coordinates (single and double precision)
- Element node connectivity
- Element topology information
- Node and element associations
- Maximum element node counts
- Entity numbering/indexing
Set the MeshInterface using setMeshInterface().
The mesh object will then query data through the interface rather than maintaining its own internal copies.
Class Members Descriptions
The currently available Mesh enumerations and functions are described in detail in this section.
-
class
Mesh Mesh class for creating and managing mesh connectivity, properties and mesh operations.
Public Types
-
enum class
IntegerParameter Integer properties for mesh configuration.
Values:
-
enumerator
REDEFINE_TOPOLOGY Redefine mesh topology after initial definition.
-
enumerator
EXACT_ADJACENCY Use exact adjacency for element connectivity.
-
enumerator
LAYER_ASSOCIATION Enable layer association for mesh entities.
-
enumerator
ZERO_USER_ID Use zero-based user IDs for mesh entities.
-
enumerator
-
enum class
FloatParameter Floating point properties for mesh configuration.
Values:
-
enumerator
TOLERANCE Tolerance for geometric operations.
-
enumerator
SIZE Arc length or size parameter for mesh entities.
-
enumerator
-
enum class
Mode Operating mode for the mesh.
Values:
-
enumerator
STATIC Static mode (no dynamic updates).
-
enumerator
DYNAMIC Dynamic mode (supports updates).
-
enumerator
-
enum class
RegionOperation Operations for extracting mesh regions.
Values:
-
enumerator
UNCONNECTED_REGIONS Extract unconnected regions (free bodies).
-
enumerator
TOPOLOGICALLY_SIMILAR_BODIES Extract topologically similar bodies.
-
enumerator
NODAL_AVERAGING_REGIONS Extract regions for nodal averaging.
-
enumerator
USER_ID Extract regions by user-defined ID.
-
enumerator
-
enum class
GroupOperation Operations for creating or querying mesh groups.
Values:
-
enumerator
FIRST_ENTITY_OCCURRENCE Select first occurrence of each entity.
-
enumerator
FREE_ENTITIES Select entities not connected to others.
-
enumerator
CONNECTED_ENTITIES Select entities connected to elements.
-
enumerator
FEATURE Select feature entities (e.g., sharp edges).
-
enumerator
ASSOCIATION Select entities by association value.
-
enumerator
ELEMENTS_OF_SHAPE Select elements of a given shape.
-
enumerator
ELEMENTS_OF_DIMENSION Select elements of a given dimension.
-
enumerator
WITHIN_EXTENT Select entities within a spatial extent.
-
enumerator
ENTITIES_WITH_ALL_NODES_IN_GROUP Entities with all nodes in a group.
-
enumerator
ENTITIES_USED_BY_N_ELEMENTS Entities used by N elements.
-
enumerator
CONNECTED_TO_N_NODES Entities connected to N nodes.
-
enumerator
INCONSISTENT_2D_ELEMENTS 2D elements with inconsistent orientation.
-
enumerator
CURVATURE_DISCONTINUITY Entities at curvature discontinuity.
-
enumerator
ENTITIES_PROPAGATING_FROM_SEED Entities reached by flood fill from a seed.
-
enumerator
NONMANIFOLD Nonmanifold entities.
-
enumerator
CORNER_NODES Corner nodes in the mesh.
-
enumerator
ENTITIES_WITH_ANY_ASSOCIATION_VALUE Entities with any association value.
-
enumerator
DIFFERING_ASSOCIATION Entities with differing association values.
-
enumerator
ELEMENTS_WITH_EDGE_FACE_INTERSECTIONS Elements with edge/face intersections.
-
enumerator
FIRST_ENTITY_OCCURRENCE_PER_FACE_ASSOCIATION First entity per face association.
-
enumerator
FEATURE_ENTITY_PER_ASSOCIATION Feature entity per association.
-
enumerator
FIRST_ENTITY_OCCURRENCE_PER_ENTITY_ASSOCIATION First entity per entity association.
-
enumerator
FEATURE_BOUND_FLOOD_FILL_ENTITIES Entities from feature-bound flood fill.
-
enumerator
-
enum class
GroupIntegerParameter Integer parameters for mesh groups.
Values:
-
enumerator
ASSOCIATION_ID Association ID for group selection.
-
enumerator
USE_NORMALS_IN_FEATURE_DETECTION Use normals for feature detection.
-
enumerator
USED_ENTITY_COUNT Number of used entities in group.
-
enumerator
SEED_NODE Seed node for region growing.
-
enumerator
ONLY_CURVATURE_FROM_FLAT Only use curvature from flat regions.
-
enumerator
SEED_ELEMENT Seed element for region growing.
-
enumerator
SEED_EDGE Seed edge for region growing.
-
enumerator
SEED_FACE Seed face for region growing.
-
enumerator
NONMANIFOLD_EDGES_AS_FEATURE Treat nonmanifold edges as features.
-
enumerator
INCLUDE_FREE_ENTITIES Include free entities in group.
-
enumerator
-
enum class
GroupFloatParameter Floating point parameters for mesh groups.
Values:
-
enumerator
FEATURE_ANGLE Feature angle threshold for detection.
-
enumerator
TOLERANCE Tolerance for group operations.
-
enumerator
CURVATURE_CHANGE Curvature change threshold.
-
enumerator
-
enum class
GroupFloatArrayParameter Floating point array parameters for mesh groups.
Values:
-
enumerator
EXTENT Extent (bounding box) for group selection.
-
enumerator
-
enum class
DemoShape Built-In shapes for mesh generation.
Values:
-
enumerator
CUBE Cube shape.
-
enumerator
CYLINDER Cylinder shape.
-
enumerator
SPHERE Sphere shape.
-
enumerator
-
enum class
ReadFormat Supported formats for mesh reading.
Values:
-
enumerator
ASCII ASCII format.
-
enumerator
BINARY Binary format.
-
enumerator
STL STL format (ASCII).
-
enumerator
STL_BINARY STL format (binary).
-
enumerator
OBJ OBJ format.
-
enumerator
-
enum class
WriteFormat Supported formats for mesh writing.
Values:
-
enumerator
ASCII ASCII format.
-
enumerator
BINARY Binary format.
-
enumerator
ABAQUS_INPUT ABAQUS input file.
-
enumerator
ANSYS_INPUT ANSYS input file.
-
enumerator
LS_DYNA_INPUT LS-DYNA input file.
-
enumerator
NASTRAN_BULKDATA NASTRAN bulk data file.
-
enumerator
PATRAN_NEUTRAL PATRAN neutral file.
-
enumerator
SDRC_UNIVERSAL SDRC universal file.
-
enumerator
Public Functions
-
ErrorCode
getErrorCode() Return the current
ErrorCodeof the Mesh object.Returns: ErrorCode- The current error code, orNONEif no error.
-
Status
setPrecision(Precision precision) Specify the precision used to maintain node coordinates. All previously defined nodes and elements are cleared by this function. This function should be called before
define(). By default, node coordinates are held in single precision.See Also
getPrecision()Parameters: precision – Precision value (see Precision)Returns: Status
-
Status
getPrecision(Precision *precision) Get the current floating point precision for mesh calculations.
See Also
setPrecision()Parameters: precision – [out] Precision value (see Precision)Returns: Status
-
Status
define(int nodeCount, int elementCount) Specify the number of nodes and elements to be managed in the mesh object. If the exact number of nodes and/or elements is not known, then make initial estimates. The mesh object will adjust memory as required. If the exact number of nodes and elements is entered, then memory adjustment overhead will be a minimum. This function must be called before any node or element data may be set in the object. All previously defined nodes and elements are cleared by this function. Inquire of defined nodeCount or elementCount as output arguments using
inquire().See Also
inquire()- Errors
-
VALUEis generated if either nodeCount or elementCount is less than zero.
Parameters: - nodeCount – Number of nodes
- elementCount – Number of elements
Returns:
-
Status
inquire(int *nodeCount, int *elementCount) Inquire of defined nodeCount and elementCount as output arguments
See Also
define()Parameters: - nodeCount – [out] Number of nodes
- elementCount – [out] Number of elements
Returns:
-
Status
setOperatingMode(Mode mode) Set the current operating mode. If mode is set to
DYNAMIC, all current elements and nodes are converted to the dynamic mode and the element kernel is made current. If mode is set toSTATIC, all current elements and nodes are converted to the static mode and the element kernel is destroyed. Call generateKernel() to create the adjacency kernel in this case. By default the operating mode isSTATIC.- Errors
-
OPERATIONis generated if mode is set toDYNAMICand a GridFun has been set using setMeshInterface().
-
Parameters: mode – Set static or dynamic mode (see Mode)Returns: Status
-
Status
setState(State *state) Set a pointer to a State object. If a State object is set, node coordinates are assumed to be defined as a vector quantity in the State object. All node coordinate queries performed using
getCoordinates()will access the results from the State object for the applied configuration of State. If both MeshInterface and State attribute object have been set, the MeshInterface object is used.See Also
getState()- Errors
-
OBJECTTYPEis generated if an improper object type is specified.
Parameters: state – State object Returns: Status
-
Status
getState(StatePtr &state) Get the state object set for the mesh.
See Also
setState()Parameters: state – State object Returns: Status
-
Status
setMeshInterface(MeshInterface *functions) Set a pointer to a MeshInterface object. If a MeshInterface object is set, all finite element topology, connectivity, node coordinate, and node and element association queries will be made through the MeshInterface. To deactivate the MeshInterface, set a NULL MeshInterface object pointer. While a MeshInterface object is active, do not attempt to set any of the associated node or element data.
See Also
getMeshInterface()- Errors
-
OBJECTTYPEis generated if an improper object type is specified.
Parameters: functions – Mesh interface functions Returns: Status
-
Status
getMeshInterface(MeshInterfacePtr &functions) Get pointer to MeshInterface object
See Also
setMeshInterface()- Errors
-
OBJECTTYPEis generated if an improper object type is specified.
Parameters: functions – Mesh interface functions (MeshInterface object) Returns: Status
-
Status
setFloatParameter(FloatParameter type, float parameter) Set floating point parameters. For example,
TOLERANCEis used to control the distance tolerance for merging coincident nodes using merge(). It is also used in tesselate() for merging nodes and closely spaced lines. The default value is 0.0001.SIZEsets the arc length used to tesselate arcs with tesselate(). The default value is 1.Parameters: - parameter – Type of parameter to set (see
FloatParameter) - value – Specifies the value that parameter will be set to
Returns: - parameter – Type of parameter to set (see
-
Status
setIntegerParameter(IntegerParameter type, int parameter) Set integer parameters. For example,
EXACT_ADJACENCYcontrols the algorithm used for element adjacency calculations. If not enabled, an element is said to be adjacent to a given element face if it contains all the nodes of the given element face. If enabled, an element is said to be adjacent to a given element face if a face contains only the nodes of the given element face. Enabling this option can result in a significant performance penalty. The default value is off.ZERO_USER_IDtoggles the value returned for a zero valued node or element user id association. If enabled, a zero valued user id association is returned as zero. If not enabled, a zero valued user id association is returned equal to the node or element index value. The default value is off.Parameters: - type – Type of parameter to set (see
IntegerParameter) - parameter – Specifies the value that type will be set to
Returns: - type – Type of parameter to set (see
-
Status
getEntityCount(EntityType type, int *count) Return the number of entities of the requested type. If type is unrecognizable, count is returned as zero.
Parameters: - type – Entity type (see
EntityType) - count – [out] Number of entities of requested type
Returns: - type – Entity type (see
-
Status
setDimension(int count) Set spatial dimension. Query the spatial dimension using getDimension(). The input value of count must be between 0 and 3. If a value of 0 is input, getDimension() will guess the spatial dimension from the element type and topology. The default value of count is 0.
See Also
getDimension()- Errors
-
VALUEis generated if count is not valid.
Parameters: count – Spatial dimension (0-3) Returns: Status
-
Status
kernelExists(bool *kernelExists) Check if the mesh kernel exists.
- Errors
-
OPERATIONis generated if kernel check fails.
Parameters: kernelExists – [out] True if kernel exists, false otherwise Returns: Status
-
Status
setTopology(int index, ElementShape shape, int maxi, int maxj, int maxk) Set element topology. This function must be called for an element before element connectivity may be defined using setElementNodes(). Use getTopology() to retrieve element topology. When the topology of an element is specified with this function, the associated element type is set according to the shape.
- Errors
-
VALUEis generated if an improper element index is specified.
-
Parameters: - index – Element index to set topology
- shape – Element shape parameter (see
ElementShape) - maxi – Topology parameter
- maxj – Topology parameter
- maxk – Topology parameter
-
Status
getTopology(int index, ElementShape *shape, int *maxi, int *maxj, int *maxk) Get element topology for a specified element index. Use setTopology() to set the topology of an element.
- Errors
-
VALUEis generated if an improper element index is specified.
-
Parameters: - index – Element index to get topology
- shape – [out] Cell shape parameter (see
ElementShape) - maxi – [out] The number of points along the i direction
- maxj – [out] The number of points along the j direction
- maxk – [out] The number of points along the k direction
Returns:
-
Status
deleteElement(int index) Delete an element. The element association
ElementTypeis set toUNDEFINEDand the index is made available to be returned by a subsequent call to generateElement().- Errors
-
OPERATIONis generated if an improper element index is specified.
-
Parameters: index – Element index to delete Returns: Status
-
Status
isElementDefined(int index, int *flag) Query for element definition. The flag is returned as 0 if the element has not been defined or has been deleted, otherwise it is returned as 1.
Parameters: - index – Element index
- flag – [out] Defined flag
Returns:
-
Status
generateElement(int *index) Generate an element. An undefined element index is returned and it is marked as defined.
- Errors
-
OPERATIONis generated if the current mode is static.
Parameters: index – [out] Generated element index Returns: Status
-
Status
setIntegrationPointCount(int index, int count) Set the number of element integration points at a specified element, index. Query for the number of integration points using getIntegrationPointCount().
- Errors
-
VALUEis generated if an improper element index or a negative element count is specified.
-
Parameters: - index – Element index
- count – Number of element integration points
Returns:
-
Status
getIntegrationPointCount(int index, int *count) Query for the number of element integration points at a specified element, index. If the number of element integration points at an element has not been set using setIntegrationPointCount(), then zero is returned.
- Errors
-
VALUEis generated if an improper element index is specified.
Parameters: - index – Element index
- count – [out] Number of element integration points
Returns:
-
Status
setElementNodes(int index, int nodeIndexes[]) Set element connectivity. Before this function may be called, the element topology must be defined using setTopology(). Use getElementNodes() to retrieve element connectivity. By convention element node connectivities use a 1 based sequential index for nodes.
- Errors
-
VALUEis generated if an improper element index is specified.
Parameters: - index – Element index to set connected nodes
- nodeIndexes – Vector of connected node indices.
Returns:
-
Status
getMaxElementNodes(int *max) Get the maximum number of nodes connected to any element in the Mesh object. The number of nodes connected to any element is a function of the element topology.
Parameters: max – [out] Maximum number of nodes connected to any element. Returns: Status
-
Status
getElementNodeCount(int index, int *count) Get the number of nodes connected to an element. The number of nodes connected to an element will never exceed the maximum number of nodes connected to any element as returned by the getMaxElementNodes() function.
Parameters: - index – Element index to get connected nodes.
- count – [out] Number of nodes connected to element.
Returns:
-
Status
getElementNodes(int index, int *nodeCount, int nodeIndexes[]) Get the node indices connected to an element. This function returns the number of nodes and node indices. The number of nodes connected to an element will never exceed the maximum number of nodes connected to any element as returned by the getMaxElementNodes() function. Use setElementNodes() to set the element node connectivity.
Parameters: - index – Element index to get connected nodes.
- nodeCount – [out] Number of nodes connected to element.
- nodeIndexes – [out] Vector of connected nodes.
Returns:
-
Status
setCoordinates(int index, float coordinates[3]) Set x,y,z world coordinates, coordinates, for a specified node index. Use getCoordinates() to retrieve node coordinates. When the coordinates of a node are specified with this function, the associated node type is set to
GRID. Use getNodeAssociation() to get the associated node type for any node.- Errors
-
VALUEis generated if an improper node index is specified.
Parameters: - index – Node index to set coordinates
- coordinates – World coordinates of node (x,y,z)
Returns:
-
Status
setCoordinates(int index, double coordinates[3]) Set x,y,z world coordinates in double precision.
Parameters: - index – Node index to set coordinates
- coordinates – World coordinates of node (x,y,z)
Returns:
-
Status
getCoordinates(int indexCount, int indexes[], float coordinates[][3]) Gather node coordinates, coordinates for a set of nodes, indexes. Use setCoordinates() to set the coordinates of a node.
Parameters: - indexCount – Number of nodes
- indexes – Array of node indices
- coordinates – [out] Array of world coordinates of nodes (x,y,z)
Returns:
-
Status
getCoordinates(int indexCount, int indexes[], double coordinates[][3]) Gather node coordinates in double precision.
Parameters: - indexCount – Number of nodes
- indexes – Array of node indices
- coordinates – [out] Array of world coordinates of nodes (x,y,z)
Returns:
-
Status
getNodeIndex(int id, int *index) Return node index given the node user id, ie the node
USER_IDassociated with it.Parameters: - id – User identifier
- index – [out] Node index
Returns:
-
Status
getElementIndex(int id, int *index) Return element index given the element user id, ie the element
USER_IDassociated with it.Parameters: - id – User identifier
- index – [out] Element index
Returns:
-
Status
setPartName(int partId, const char *name) Set the name string associated with partId. Only the first 80 characters of the name string will be set.
- Errors
-
VALUEis generated if a zero partId is input.
Parameters: - partId – Part identifier
- name – Name string
Returns:
-
Status
getPartName(int partId, char name[]) Get the name string associated with partId. If no name string has been set for partId, then a single null character is returned in name. The part identifier is the value associated with the
PART_IDelement association.Parameters: - partId – Part identifier
- name – [out] Name string
Returns:
-
Status
getPartNameCount(int *count) Get the number of part names defined. Use getPartInformation() to get a specific part name and associated part identifier.
Parameters: count – [out] Number of part names Returns: Status
-
Status
getPartInformation(int index, int *partId, char name[]) Get a specific part name and the associated part identifier. The part identifier is the value associated with the
PART_IDelement association. Use getPartNameCount() to get the number of part names, count.Parameters: - index – Ith part name 1 <= index <= count
- partId – [out] Part identifier
- name – [out] Name string
Returns:
-
Status
setPartIJK(int partId, int ijk[3]) Set the IJK block parameters associated with partId.
- Errors
-
VALUEis generated if a zero partId is input.
Parameters: - partId – Part identifier
- ijk – IJK block parameters
Returns:
-
Status
getPartIJK(int partId, int ijk[]) Get the IJK block parameters associated with partId. If no block parameters have been set for partId, then zeros are returned in ijk. The part identifier is the value associated with the
PART_IDelement association.Parameters: - partId – Part identifier
- ijk – [out] IJK block parameters
Returns:
-
Status
getPartIJKCount(int *count) Get the number of part IJK blocks defined. Use getPartIJKFromPartIndex() to get a specific part IJK block and associated part identifier.
Parameters: count – [out] Number of part IJK blocks Returns: Status
-
Status
getPartIJKFromPartIndex(int index, int *partId, int ijk[]) Get a specific part IJK block and the associated part identifier. The part identifier is the value associated with the
PART_IDelement association. Use getPartIJKCount() to get the number of part IJK blocks, count.Parameters: - index – Ith part IJK block 1 <= index <= count
- partId – [out] Part identifier
- ijk – [out] IJK block parameters
Returns:
-
Status
deleteNode(int index) Delete a node. The node association
NODE_TYPEis set toUNDEFINEDand the index is made available to be returned by a subsequent call to generateNode().- Errors
-
OPERATIONis generated if the current mode is static.
Parameters: index – Node index to delete Returns: Status
-
Status
isNodeDefined(int index, int *flag) Query for node definition. The flag is returned as 0 if the node has not been defined or has been deleted, otherwise it is returned as 1.
Parameters: - index – Node index
- flag – [out] Defined flag
Returns:
-
Status
generateNode(int *index) Generate a node. An undefined node index is returned and it is marked as defined.
- Errors
-
OPERATIONis generated if the current mode is static.
Parameters: index – [out] Generated node index Returns: Status
-
Status
setElementEntityAssociation(ElementAssociationType type, EntityType entityType, int index, int entityNumber, int association) Set element entity association, association, of type, type for a specified element edge or face. Element face and edge numbers are 1 based. Use getElementEntityAssociation() to retrieve element entity associations.
- Errors
-
VALUEis generated if an improper element index or entityNumber is specified.
-
Parameters: - type –
ElementAssociationType - entityType – Type of element entity
- index – Element index
- entityNumber – Element face or edge number
- association – Element entity association
Returns:
-
Status
addElementEntityAssociation(ElementAssociationType type, EntityType entityType, int index, int entityNumber, int association) Add an element entity association, association, of type, type for a specified element, index, at face or edge entityNumber. Use deleteElementEntityAssociation() to delete any added associations at an element entity.
- Errors
-
VALUEis generated if an improper element index or entityNumber is specified.
-
Parameters: - type –
ElementAssociationType - entityType – Type of element entity
- index – Element index
- entityNumber – Element face or edge number
- association – Association
Returns:
-
Status
getElementEntityAssociationCount(ElementAssociationType type, EntityType entityType, int index, int entityNumber, int *count) Query for the total number, count >= 1 of element entity associations of type, type at a specified element, index and edge or face number entityNumber. The number, count, is returned as 1 if no additional associations have been added for type at the element entity using
addElementEntityAssociation().- Errors
-
VALUEis generated if an improper element index or entityNumber is specified.
-
Parameters: - type –
ElementAssociationType - entityType – Type of element entity
- index – Element index
- entityNumber – Element face or edge number
- count – [out] Total number of element associations
Returns:
-
Status
deleteElementEntityAssociation(ElementAssociationType type, EntityType entityType, int index, int entityNumber) Delete any element entity associations of type, type added at a specified element, index, and edge or face number entityNumber. Only those associations specified by addElementEntityAssociation() are deleted.
- Errors
-
VALUEis generated if an improper element index or entityNumber is specified.
-
Parameters: - type –
ElementAssociationType - entityType – Type of element entity
- index – Element index
- entityNumber – Element face or edge number
Returns:
-
Status
getElementEntityAssociation(ElementAssociationType type, EntityType entityType, int index, int entityNumber, int *association) Get element entity association, association, for a specified element edge or face. Element face and edge numbers are 1 based. If an element entity association has not been defined, zero is returned. Use setElementEntityAssociation() to set element entity associations.
Parameters: - type – Type of element association (see
ElementAssociationType) - entityType – Type of element entity
- index – Element index
- entityNumber – Element face or edge number
- association – [out] Element entity association
Returns: - type – Type of element association (see
-
Status
getAllElementEntityAssociations(ElementAssociationType type, EntityType entityType, int index, int entityNumber, int *count, int associations[]) Query for all element entity associations of type, type at a specified element, index, and edge or face number entityNumber. The total number of element entity associations, count >= 1 is returned as well as count associations in vector associations. The single association set using setElementEntityAssociation() is always the first entry in associations. The number, count, is returned as 1 if no additional associations have been added for type at the element entity using addElementEntityAssociation().
- Errors
-
VALUEis generated if an improper element index or entityNumber is specified.
-
Parameters: - type –
ElementAssociationType - entityType – Type of element entity
- index – Element index
- entityNumber – Element face or edge number
- count – [out] Total number of element associations
- associations – [out] Associations
Returns:
-
Status
getDimension(int *count) Determine dimensionality of finite element model. If count = 2 the finite element model is a 2 dimensional model. This is used for 2D planar or 2D axisymmetric models. If count = 3 the finite element model is a full 3 dimensional model.
If the dimension has not been explicitly set to a positive value, then the dimensionality of the model is determined by checking the shape topology of solid, shell and beam element types.
See Also
setDimension().Parameters: count – [out] Number of spatial dimensions Returns: Status
-
Status
runDemo(DemoShape shape, float factor, ElementShape elementShape, int numi, int numj, int numk) Generate a finite element model of 1D, 2D or 3D finite elements. The shape and size of the model are specified by shape and factor. If shape is
CUBEthen a cube of edge length factor is generated. If shape isCYLINDERthen a cylinder with a 270 degree circumferential angle and an inner radius, thickness and height of factor is generated. If shape isSPHEREthen a cylinder with a 270 degree circumferential angle, a 67.5 elevation angle and an inner radius and thickness of factor is generated.If 1D elements are implied by the cell shape, then elements are generated along the i direction only at j = 1 and k = 1. If 2D elements are implied by the cell shape, then elements are generated along the i direction first and j direction second only at k = 1.
The i, j, k directions for a cube are along the global x,y and z axes; for a cylinder, along the circumferential direction (global x,y plane), the global z axis and the radial direction; and for a sphere, along the circumferential direction (global x,y plane), the azimuthal direction and the radial direction.
- Errors
-
VALUEis generated if an improper number of points numi, numj or numk is specified.
-
Parameters: - shape – Demo shape (see
DemoShape) - factor – Floating point size factor
- elementShape – Cell shape parameter
- numi – The number of points along the i direction
- numj – The number of points along the j direction
- numk – The number of points along the k direction
Returns:
-
Status
read(ReadFormat format, const char *path) Read models from simple file formats. The
STLandSTL_BINARYformats result in a set of completely unconnected triangles. Use merge() to merge coincident nodes together. TheSTLformat will attempt to determine if the input file is ASCII or binary. If it detects a binary file it will automatically switch to reading a binary STL file.The
ASCIIandBINARYformats are the internal formats. Use write() to write mesh data to a file format.- Errors
Parameters: - format – File type (see
ReadFormat) - path – File path
Returns:
-
Status
generateKernel() Generate a mesh kernel. This call must be made before the following functions may be called: getFaceGroup(), getEdgeGroup(), getNodeGroup(), getAdjacentElements(), getMaxElementCountConnectedToNode() and getElementsConnectedToNode().
The mesh kernel is a data structure which allows for efficient query of adjacency information derived from the basic element node connectivity. The generation of the mesh kernel is a computationally intensive operation. If the kernel exists and no new nodes have been defined and no existing element connectivity changed or new element connectivity added, then this function will return without regenerating the kernel. Use clearKernel() to clear and deallocate a mesh kernel.
Returns: Status
-
Status
clearKernel() Clear and deallocate the internal mesh kernel. A mesh kernel is generated using generateKernel().
Returns: Status
-
Status
write(WriteFormat format, const char *path) Write models to simple file formats. Use read() to read mesh data from a file.
- Errors
-
FILEis generated if the file cannot be opened.
-
Parameters: - format – File type (see
WriteFormat) - path – File path
Returns:
-
Status
getMaxElementCountConnectedToNode(int *max) Get the maximum number of elements connected to any node in the Mesh. The number of elements connected to any node may only be queried after generateKernel() is called.
- Errors
-
OPERATIONis generated if generateKernel() has not been previously called.
Parameters: max – [out] Maximum number of elements connected to any node Returns: Status
-
Status
getElementCountConnectedToNode(int nodeIndex, int *count) Get the number of elements connected to a node. The number of elements connected to a node will never exceed the maximum number of elements connected to any node as returned by getMaxElementCountConnectedToNode().
Parameters: - nodeIndex – Node index to get connected elements
- count – [out] Number of elements connected to node
Returns:
-
Status
getElementsConnectedToNode(int nodeIndex, int *elementCount, int elementIndexes[]) Get the element indices connected to a node. This function returns the number of elements and element indices. The number of elements connected to a node will never exceed the maximum number of elements connected to any node as returned by getMaxElementCountConnectedToNode().
If generateKernel() has not been previously called then elementCount is returned as zero. If an improper node nodeIndex is input then the operation of this function is undefined.
Parameters: - nodeIndex – Node index to get connected elements
- elementCount – [out] Number of elements connected to node
- elementIndexes – [out] Vector of connected elements
Returns:
-
Status
getAdjacentElements(EntityType entityType, int elementIndex, int entityNumber, int *elementCount, int elementIndexes[]) Get the element indices connected to a specified element. This function returns elements adjacent to (connected to) a specified element across an element face, edge or node. The type of element feature across which adjacent elements are requested is specified by entityType. The element is specified by elementIndex and the element face, edge or node is specified by entityNumber. The number of connected elements, elementCount, and the vector of connected elements, elementIndexes, do not contain the element elementIndex. The number of elements connected to a specified element will never exceed the maximum number of elements connected to any node as returned by getMaxElementCountConnectedToNode().
If generateKernel() has not been previously called then elementCount is returned as zero. If an improper element feature, elementFeature, is input then elementCount is returned as zero. If an improper element elementIndex or entityNumber is input then the operation of this function is undefined.
- Errors
-
VALUEis generated if an improper element index is specified.
-
Parameters: Returns:
-
Status
getAdjacentElementsToFace(EntityType entityType, int elementIndex, int entityNumber, int *elementCount, int elementIndexes[], int localFaceIds[]) Get the element indices and local face ids connected to a specified element face with exact adjacency. This function is similar to getAdjacentElements() but also returns the local face IDs of the adjacent elements when the
EXACT_ADJACENCYparameter is enabled.- Errors
-
VALUEis generated if an improper element index is specified.
-
Parameters: - entityType – Type of element feature
- elementIndex – Element index to get connected elements
- entityNumber – Element face number
- elementCount – [out] Number of elements connected to specified element
- elementIndexes – [out] Vector of connected elements
- localFaceIds – [out] Vector of local face IDs for each adjacent element
Returns:
-
Status
getAdjacentElementEntities(EntityType entityType, int elementIndex, int entityNumber, int *elementCount, int elementIndexes[], int elementEntityNumbers[]) Get the element indices and entities connected to a specified element. This function returns elements adjacent to (connected to) a specified element across an element face, edge or node. The type of element feature across which adjacent elements are requested is specified by entityType. The element is specified by elementIndex and the element face, edge or node is specified by entityNumber. The number of connected elements, elementCount, and the vector of connected elements, elementIndexes, do not contain the element elementIndex. The vector, elementEntityNumbers, will contain the face, edge or node of the connected element. The number of elements connected to a specified element will never exceed the maximum number of elements connected to any node as returned by getMaxElementCountConnectedToNode(). All nodes (corner nodes, and mid-side and mid-face nodes) are taken into account when finding adjacent elements.
- Errors
-
VALUEis generated if an improper element index is specified.
-
Parameters: - entityType – Type of element feature
- elementIndex – Element index to get connected elements
- entityNumber – Element face, edge or node number
- elementCount – [out] Number of elements connected to specified element
- elementIndexes – [out] Vector of connected elements
- elementEntityNumbers – [out] Vector of connected element entities
Returns:
-
Status
getAdjacentElementEntitiesUsingCornerNodesOnly(EntityType entityType, int elementIndex, int entityNumber, int *elementCount, int elementIndexes[], int elementEntityNumbers[], int cornerNodesOnlyFlag) Get the element indices and entities connected to a specified element with optional corner nodes only mode. This function returns elements adjacent to (connected to) a specified element across an element face, edge or node. The type of element feature across which adjacent elements are requested is specified by entityType. The element is specified by elementIndex and the element face, edge or node is specified by entityNumber. The cornerNodesOnlyFlag flag is used to determine if mid-side nodes should be taken into account while finding adjacent elements. The number of connected elements, elementCount, and the vector of connected elements, elementIndexes, do not contain the element elementIndex. The vector, elementEntityNumbers, will contain the face, edge or node of the connected element. The number of elements connected to a specified element will never exceed the maximum number of elements connected to any node as returned by getMaxElementCountConnectedToNode().
- Errors
-
VALUEis generated if an improper element index is specified.
-
Parameters: - entityType – Type of element feature
- elementIndex – Element index to get connected elements
- entityNumber – Element face, edge or node number
- elementCount – [out] Number of elements connected to specified element
- elementIndexes – [out] Vector of connected elements
- elementEntityNumbers – [out] Vector of connected element entities
- cornerNodesOnlyFlag – Flag to take into account only corner nodes while finding adjacent elements
Returns:
-
Status
getElementsAdjacentToNodes(int nodeIndexCount, int nodeIndexes[], int *elementIndexCount, int elementIndexes[]) Get the element indices connected to a set of nodes. Each returned element will contain the complete set of input nodes in its node connectivity. The number of elements connected to a set of nodes will never exceed the maximum number of elements connected to any node as returned by getMaxElementCountConnectedToNode().
If generateKernel() has not been previously called then elementIndexCount is returned as zero.
Parameters: - nodeIndexCount – Number of node indices
- nodeIndexes – Vector of node indices
- elementIndexCount – [out] Number of elements connected to specified nodes
- elementIndexes – [out] Vector of connected elements
Returns:
-
Status
getElementEntityCount(EntityType entityType, int index, int *count) Get the number of faces, edges or nodes in an element. For example, the number of faces in a hexahedral element is 6. If an improper element feature, entityType, is input then count is returned as zero. If an improper element index is input then the operation of this function is undefined.
- Errors
-
VALUEis generated if an improper element index is specified.
-
Parameters: Returns:
-
Status
getElementEntityConnectivity(EntityType entityType, int index, int entityNumber, int *nodeCount, int nodeIndexes[]) Get the node indices connected to a specified element, element face, edge or node. If an improper element feature, entityType, is input then nodeCount is returned as zero. If an improper element index or entityNumber is input then the operation of this function is undefined.
The value of entityNumber is ignored if entityType is
ELEMENT. In this case the complete element connectivity is returned. If entityType isNODEthen the value of entityNumber is the node connection number. The first position in the element node connectivity has a connection number of 1.- Errors
-
VALUEis generated if an improper element index is specified.
-
Parameters: - entityType –
EntityType - index – Element index to get connected nodes
- entityNumber – Element face, edge or node number
- nodeCount – [out] Number of nodes connected to specified element entity
- nodeIndexes – [out] Vector of connected nodes
Returns:
-
Status
getElementEntityConnectionNumbers(EntityType entityType, int index, int entityNumber, int *nodeCount, int connectionNumbers[]) Get the node connection numbers of a specified element face or edge. Node connection numbers specify positions of nodes in the element node connectivity list. The first position in the element node connectivity has a connection number of 1. If an improper element feature, entityType, is input then nodeCount is returned as zero. If an improper element index or entityNumber is input then the operation of this function is undefined. Element face and edge numbers are 1 based. If entityType is
ELEMENT, then entityNumber is ignored.- Errors
-
VALUEis generated if an improper element index is specified.
-
Parameters: Returns:
-
Status
getElementEntityCornerConnectionNumbers(EntityType entityType, int index, int entityNumber, int *nodeCount, int connectionNumbers[]) Get the corner node connection numbers of a specified element face or edge. Node corner connection numbers specify positions of nodes in the element node connectivity list. The first position in the element node connectivity has a node connection number of 1. If an improper element feature, entityType, is input then nodeCount is returned as zero. If an improper element index or entityNumber is input then the operation of this function is undefined. Element face and edge numbers are 1 based. If entityType is
ELEMENT, then entityNumber is ignored.- Errors
-
VALUEis generated if an improper element index is specified.
-
Parameters: Returns:
-
Status
getElementEntityTopology(EntityType entityType, int index, int entityNumber, ElementShape *shape, int *maxi, int *maxj) Query for the topology of an element face or edge. For element edges, maxj is always returned as zero. Use getTopology() to get the element topology. If an improper element feature, entityType, is input then shape is returned as
UNDEFINED. If an improper element index or entityNumber is input then the operation of this function is undefined. Element face and edge numbers are 1 based.Parameters: - entityType – Type of element feature
- index – Element index to get topology of faces or edges
- entityNumber – Element face or edge number
- shape – [out] Face shape parameter (see
ElementShape) - maxi – [out] The number of points along the i direction
- maxj – [out] The number of points along the j direction
Returns:
-
Status
setElementFaceNormals(int elementIndex, int faceNumber, float normals[][3]) Set the normals to an element face at the element face nodes. The element face node connectivity order is as returned by getElementEntityConnectivity().
See Also
getElementFaceNormals()Parameters: - elementIndex – Element index
- faceNumber – Element face number
- normals – Normal vectors at face nodes
Returns:
-
Status
setElementFaceNormals(int elementIndex, int faceNumber, double normals[][3]) Set the normals to an element face at the element face nodes in double precision.
See Also
getElementFaceNormals()Parameters: - elementIndex – Element index
- faceNumber – Element face number
- normals – Normal vectors at face nodes
Returns:
-
Status
isElementFaceNormalsDefined(int elementIndex, int faceNumber, int *flag) Query for element face normal definition. The flag is returned as 0 if the element face normals have not been set using setElementFaceNormals(), otherwise it is returned as 1.
Parameters: - elementIndex – Element index
- faceNumber – Element face number
- flag – [out] Defined flag
Returns:
-
Status
getElementFaceNormals(int elementIndex, int faceNumber, float normals[][3]) Get the normals to an element face at the element face nodes. The element face node connectivity order is as returned by getElementEntityConnectivity(). If the element face normals have not been previously set using setElementFaceNormals() then the face node normals are computed from the element geometry. Use isElementFaceNormalsDefined() to query if the face node normals have been previously set.
See Also
getElementFaceNormals()Parameters: - elementIndex – Element index
- faceNumber – Element face number
- normals – [out] Normal vectors at face nodes
Returns:
-
Status
getElementFaceNormals(int elementIndex, int faceNumber, double normals[][3]) Get the normals to an element face at the element face nodes in double precision.
See Also
getElementFaceNormals()Parameters: - elementIndex – Element index
- faceNumber – Element face number
- normals – [out] Normal vectors at face nodes
Returns:
-
Status
setElementEdgeTangent(int elementIndex, int edgeNumber, float tangents[][3]) Set the tangents to an element edge at the element edge nodes. The element edge node connectivity order is as returned by getElementEntityConnectivity().
See Also
setElementEdgeTangent()Parameters: - elementIndex – Element index
- edgeNumber – Element edge number
- tangents – Tangent vectors at edge nodes
Returns:
-
Status
setElementEdgeTangent(int elementIndex, int edgeNumber, double tangents[][3]) Set the tangents to an element edge at the element edge nodes in double precision.
See Also
setElementEdgeTangent()Parameters: - elementIndex – Element index
- edgeNumber – Element edge number
- tangents – Tangent vectors at edge nodes
Returns:
-
Status
isElementEdgeTangentDefined(int elementIndex, int edgeNumber, int *flag) Query for element edge tangent definition. The flag is returned as 0 if the element edge tangents have not been set using setElementEdgeTangent(), otherwise it is returned as 1.
Parameters: - elementIndex – Element index
- edgeNumber – Element edge number
- flag – [out] Defined flag
Returns:
-
Status
getElementEdgeTangent(int elementIndex, int edgeNumber, float tangents[][3]) Get the tangents to an element edge at the element edge nodes. The element edge node connectivity order is as returned by getElementEntityConnectivity(). If the element edge tangents have not been previously set using setElementEdgeTangent() then the edge node tangents are computed from the element geometry. Use isElementEdgeTangentDefined() to query if the edge node tangents have been previously set.
See Also
getElementEdgeTangent()Parameters: - elementIndex – Element index
- edgeNumber – Element edge number
- tangents – [out] Tangent vectors at edge nodes
Returns:
-
Status
getElementEdgeTangent(int elementIndex, int edgeNumber, double tangents[][3]) Get the tangents to an element edge at the element edge nodes in double precision.
See Also
getElementEdgeTangent()Parameters: - elementIndex – Element index
- edgeNumber – Element edge number
- tangents – [out] Tangent vectors at edge nodes
Returns:
-
Status
getExtent(Group *group, float extent[2][3]) Compute node coordinate extent. Return the coordinates of two points defining the world coordinate extent box of a set of nodes. The point extent[0] is the minimum and the point extent[1] is the maximum. If no node point coordinates have been specified, then the contents of extent are undefined. Use setCoordinates() to define node coordinates.
See Also
getExtent()- Errors
-
VALUEis generated if group is not a node group.
Parameters: - group – Pointer to Group object of nodes. If NULL, then all nodes are assumed.
- extent – [out] World coordinates of points at minimum x,y,z and maximum x,y,z
Returns:
-
Status
getExtent(Group *group, double extent[2][3]) Compute node coordinate extent in double precision.
See Also
getExtent()- Errors
-
VALUEis generated if group is not a node group.
Parameters: - group – Pointer to Group object of nodes. If NULL, then all nodes are assumed.
- extent – [out] World coordinates of points at minimum x,y,z and maximum x,y,z
Returns:
-
Status
getExtentLocation(Group *group, float extent[2][3], int nodeIndexes[2][3]) Get node coordinate extent and indices. Return the coordinates of two points defining the world coordinate extent box of a set of nodes. The point extent[0] is the minimum and the point extent[1] is the maximum. The nodeIndexes array contains the node indices corresponding to the extreme values in extent.
- Errors
-
VALUEis generated if group is not a node group.
Parameters: - group – Pointer to Group object of nodes. If NULL, then all nodes are assumed.
- extent – [out] World coordinates of points at minimum x,y,z and maximum x,y,z
- nodeIndexes – [out] Node indices corresponding to extreme values
Returns:
-
Status
getExtentLocationInCoordinateSystem(Group *group, CoordinateSystem *coordinateSystem, float extent[2][3], int nodeIndexes[2][3]) Get node coordinate extent and indices in a local coordinate system. Return the coordinates of two points defining the local coordinate extent of a set of nodes. The local coordinate system is specified by the input CoordinateSystem object. The point extent[0] is the minimum and the point extent[1] is the maximum. The nodeIndexes array contains the node indices corresponding to the extreme values in extent.
- Errors
-
VALUEis generated if group is not a node group. -
NULLOBJECTis generated if coordinateSystem is NULL.
-
Parameters: - group – Pointer to Group object of nodes. If NULL, then all nodes are assumed.
- coordinateSystem – Pointer to CoordinateSystem object
- extent – [out] World coordinates of points at minimum x,y,z and maximum x,y,z
- nodeIndexes – [out] Node indices corresponding to extreme values
Returns:
-
Status
setGroupFloatParameter(GroupFloatParameter parameter, float value) Set group derivation floating point parameter. Set group derivation parameters that affect the generation of element, face, edge and node groups.
Parameters: - parameter – Type of group parameter to set (see
GroupFloatParameter) - value – Floating point parameter value
Returns: - parameter – Type of group parameter to set (see
-
Status
setGroupFloatParameterArray(GroupFloatArrayParameter parameter, float values[]) Set group derivation floating point array parameter. Set group derivation parameters that require multiple floating point values, such as coordinate extents.
Parameters: - parameter – Type of group array parameter to set (see
GroupFloatArrayParameter) - values – Floating point parameter values
Returns: - parameter – Type of group array parameter to set (see
-
Status
setGroupIntegerParameter(GroupIntegerParameter parameter, int value) Set group derivation integer parameter. Set group derivation parameters that affect the generation of element, face, edge and node groups.
Parameters: - parameter – Type of group parameter to set (see
GroupIntegerParameter) - value – Integer parameter value
Returns: - parameter – Type of group parameter to set (see
-
Status
setGroupElementAssociationType(ElementAssociationType type) Set group integer element association type for group derivation operations. The association type affects the generation of element groups by matching an association id of a particular type.
Parameters: type – Element association type (see ElementAssociationType)Returns: Status
-
Status
setGroupNodeAssociationType(NodeAssociationType type) Set group integer node association type for group derivation operations. The association type affects the generation of node groups by matching an association id of a particular type.
Parameters: type – Node association type (see NodeAssociationType)Returns: Status
-
Status
setSeedGroup(Group *object) Set seed group for group derivation operations. A seed group bounds the adjacency neighborhood for SEED operations in group derivation functions.
The seed group is a Group object which bounds
ENTITIES_PROPAGATING_FROM_SEEDoperations. The Group must be an element edge group when performing a face group derivation withgetFaceGroup(). The Group must be a node group when performing an edge group derivation withgetEdgeGroup().Parameters: object – Pointer to Group object used as seed group Returns: Status
-
Status
mergeWithNodeMapping(Group *group, IdTranslator *previousToNewNodeIndices) Merge coincident nodes and return node mapping. Merge coincident nodes. The distance tolerance is set using setGroupFloatParameter() with parameter type
TOLERANCE. The node coordinates and node associations are merged with coincident nodes. The lowest numbered node of a set of coincident nodes retains the node coordinates and associations for the set. The total number of nodes is reduced by the number of coincident nodes. Element connectivity is reordered to reflect the node renumbering. If an input node group is specified only the nodes appearing in the group are merged.See Also
merge()- Errors
-
VALUEis generated if group is not a node group.
Parameters: - group – Pointer to Group object of nodes. If NULL, then all nodes are assumed.
- previousToNewNodeIndices – Pointer to IdTranslator object, mapping previous node indices to new indices
Returns:
-
Status
merge(Group *group) Merge coincident nodes. Merge coincident nodes. The distance tolerance is set using setGroupFloatParameter() with parameter type
TOLERANCE. The node coordinates and node associations are merged with coincident nodes. The lowest numbered node of a set of coincident nodes retains the node coordinates and associations for the set. The total number of nodes is reduced by the number of coincident nodes. Element connectivity is reordered to reflect the node renumbering. If an input node group is specified only the nodes appearing in the group are merged.- Errors
-
VALUEis generated if group is not a node group.
Parameters: group – Pointer to Group object of nodes. If NULL, then all nodes are assumed. Returns: Status
-
Status
getElementGroup(GroupOperation operation, Group *inputGroup, Group *outputGroup) Derive a group of elements from an input group. Derive a group of elements from an input group of elements using a specified operation. The output outputGroup must have been previously created and defined as an element group. Note that outputGroup is not cleared by this function, in other words the derived element entities are added to any existing elements in the output outputGroup. The mesh kernel must be generated using generateKernel() before calling this function.
- Errors
-
VALUEis generated if inputGroup is not an element group.
-
Parameters: - operation – Operation specified to derive group (see
GroupOperation)-
ASSOCIATIONElements with an association value -
ENTITIES_WITH_ANY_ASSOCIATION_VALUEElements with any association value -
CONNECTED_TO_N_NODESElement connections to nodes -
ENTITIES_WITH_ALL_NODES_IN_GROUPElement contained entirely by nodes -
ELEMENTS_OF_DIMENSIONElements of a given dimensionality -
WITHIN_EXTENTElements lying in a coordinate box -
INCONSISTENT_2D_ELEMENTSInconsistent connectivity -
ELEMENTS_WITH_EDGE_FACE_INTERSECTIONSIntersecting elements -
ELEMENTS_OF_SHAPEElements of a given shape
-
- inputGroup – Pointer to source Group object of elements or nodes. If NULL, then all elements are assumed.
- outputGroup – [out] Pointer to derived Group object of elements
Returns:
-
Status
getFaceGroup(GroupOperation operation, Group *inputGroup, Group *outputGroup) Derive a group of element faces from an input group. Derive a group of element faces from an input group of elements using a specified operation. The output outputGroup must have been previously created and defined as an element face group. The derived element face entities are added to any existing face entities in the output outputGroup. The mesh kernel must be generated using generateKernel() before calling this function.
- Errors
-
OPERATIONis generated if generateKernel() has not been previously called. -
VALUEis generated if inputGroup is not an element group.
-
Parameters: - operation – Operation specified to derive group (see
GroupOperation)-
ASSOCIATIONFaces with an association value. Only valid for source element groups. The association type and id are specified using setGroupElementAssociationType() and setGroupIntegerParameter() withASSOCIATION_ID. -
ENTITIES_WITH_ANY_ASSOCIATION_VALUEFaces with any association value. Only valid for source element groups. The association type is specified using setGroupElementAssociationType(). Any non-zero value of the specified association type will flag the face. -
DIFFERING_ASSOCIATIONFaces where connected elements have differing association values. Only valid for source element groups. The association type is specified using setGroupElementAssociationType(). If any elements connected to a face have differing association values the face will be flagged. An option may be enabled to include free faces using setGroupIntegerParameter() withINCLUDE_FREE_ENTITIES. -
CONNECTED_TO_N_NODESFaces connected to a specified number of nodes. Only valid for source node groups. The number of node connections is specified using setGroupIntegerParameter() withUSED_ENTITY_COUNT. -
ENTITIES_WITH_ALL_NODES_IN_GROUPFaces with all nodes in the source node group. Only valid for source node groups. -
CONNECTED_ENTITIESFaces of 2D elements. Only valid for source element groups. A 2D element is any element with a shape ofTRIANGLEorQUADRILATERAL. -
FREE_ENTITIESFaces connected to only one element. Valid for source element groups. -
ENTITIES_PROPAGATING_FROM_SEEDFaces propagating from a seed. Valid for source element face groups. A face is selected if it is connected to the specified seed node or seed element face, or is adjacent to a selected face and is in the source face group. The face adjacency neighborhood is bounded by a specified element edge seed group. A seed node is specified using setGroupIntegerParameter() withSEED_NODE. A seed element face is specified using setGroupIntegerParameter() withSEED_ELEMENTandSEED_FACE. A non-zero specified seed node takes priority over a specified element face. The bounding element edge group is specified using setSeedGroup(). -
FIRST_ENTITY_OCCURRENCEFirst occurrence of each element face. Valid for source element groups. If two or more element faces are connected to the same nodes then only the element face of the lower numbered element is selected. -
ENTITIES_USED_BY_N_ELEMENTSFaces connected to a specified number of elements. Only valid for source element groups. The number of element uses is specified using setGroupIntegerParameter() withUSED_ENTITY_COUNT. -
FEATURE_BOUND_FLOOD_FILL_ENTITIESFaces propagating from seed without crossing feature edges. Only valid for source element face groups. A face is selected if it is a free face, adjacent to a selected face or the seed element face without crossing a feature edge, and is in the source face group if not NULL. A seed element face is specified using setGroupIntegerParameter() withSEED_ELEMENTandSEED_FACE. The bounding element edge group is computed based on theFEATURE_ANGLEandUSE_NORMALS_IN_FEATURE_DETECTIONparameters.
-
- inputGroup – Pointer to source Group object of elements or nodes. If NULL, then all elements are assumed.
- outputGroup – [out] Pointer to derived Group object of element faces
Returns:
-
Status
getEdgeGroup(GroupOperation operation, Group *inputGroup, Group *outputGroup) Derive a group of element edges from an input group. Derive a group of element edges from an input group of elements or element faces using a specified operation. The output outputGroup must have been previously created and defined as an element edge group. The derived element edge entities are added to any existing edge entities in the output outputGroup. The mesh kernel must be generated using generateKernel() before calling this function.
- Errors
-
OPERATIONis generated if generateKernel() has not been previously called. -
VALUEis generated if inputGroup is not an element or element face group.
-
Parameters: - operation – Operation specified to derive group (see
GroupOperation)-
ASSOCIATIONEdges with an association value. Only valid for source element groups. The association type and id are specified using setGroupElementAssociationType() and setGroupIntegerParameter() withASSOCIATION_ID. -
ENTITIES_WITH_ANY_ASSOCIATION_VALUEEdges with any association value. Only valid for source element groups. The association type is specified using setGroupElementAssociationType(). Any non-zero value of the specified association type will flag the edge. -
DIFFERING_ASSOCIATIONEdges where connected elements have differing association values. Only valid for source element groups. The association type is specified using setGroupElementAssociationType(). If any elements connected to an edge have differing association values the edge will be flagged. An option may be enabled to include free edges using setGroupIntegerParameter() withINCLUDE_FREE_ENTITIES. -
CONNECTED_TO_N_NODESEdges connected to a specified number of nodes. Only valid for source node groups. The number of node connections is specified using setGroupIntegerParameter() withUSED_ENTITY_COUNT. -
ENTITIES_WITH_ALL_NODES_IN_GROUPEdges with all nodes in the source node group. Only valid for source node groups. -
CURVATURE_DISCONTINUITYEdges at curvature discontinuity. Only valid for source element face groups. The curvature discontinuity tolerance is specified using setGroupFloatParameter() withCURVATURE_CHANGE. -
FEATUREFeature edges based on dihedral angle. Only valid for source element face groups. The feature angle tolerance is specified using setGroupFloatParameter() withFEATURE_ANGLE. -
FEATURE_ENTITY_PER_ASSOCIATIONFeature edges per association value. Valid for source element face groups. All edges are flagged which satisfy the feature angle specifications connected to element faces sharing each association value. -
CONNECTED_ENTITIESEdges of 1D elements. Only valid for source element groups. A 1D element is any element with a shape ofLINE. -
FREE_ENTITIESEdges connected to only one element or element face. Valid for source element and element face groups. -
FIRST_ENTITY_OCCURRENCEEdges connected to exactly two element faces. Valid for source element and element face groups. -
FIRST_ENTITY_OCCURRENCE_PER_ENTITY_ASSOCIATIONUnique edges per association value. Valid for source element groups. All unique edges are flagged connected to elements sharing each association value. -
FIRST_ENTITY_OCCURRENCE_PER_FACE_ASSOCIATIONUnique edges per face association value. Valid for source element face groups. All unique edges are flagged connected to element faces sharing each association value. -
ENTITIES_PROPAGATING_FROM_SEEDEdges propagating from a seed. Valid for source element edge groups. An edge is selected if it is connected to the specified seed node or seed element edge, or is adjacent to a selected edge and is in the source edge group. The edge adjacency neighborhood is bounded by a specified node seed group. A seed node is specified using setGroupIntegerParameter() withSEED_NODE. A seed element edge is specified using setGroupIntegerParameter() withSEED_ELEMENTandSEED_EDGE. A non-zero specified seed node takes priority over a specified element edge. The bounding node group is specified using setSeedGroup(). -
ENTITIES_USED_BY_N_ELEMENTSEdges connected to a specified number of elements. Only valid for source element groups. The number of element uses is specified using setGroupIntegerParameter() withUSED_ENTITY_COUNT.
-
- inputGroup – Pointer to source Group object of elements, element faces, or nodes. If NULL, then all elements are assumed.
- outputGroup – [out] Pointer to derived Group object of element edges
Returns:
-
Status
getNodeGroup(GroupOperation operation, Group *inputGroup, Group *outputGroup) Derive a group of nodes from an input group. Derive a group of nodes from an input group of elements, element faces, element edges or nodes using a specified operation. The output outputGroup must have been previously created and defined as a node group. The derived node entities are added to any existing node entities in the output outputGroup.
- Errors
- If operation is
CONNECTED_ENTITIES,FEATURE,FREE_ENTITIESorFIRST_ENTITY_OCCURRENCEthenOPERATIONis generated if generateKernel() has not been previously called. -
VALUEis generated if inputGroup is not an element, element face or element edge group. - If operation is
ASSOCIATION,ENTITIES_WITH_ANY_ASSOCIATION_VALUEorWITHIN_EXTENTthenVALUEis generated if inputGroup is not a node group.
- If operation is
Parameters: - operation – Operation specified to derive group (see
GroupOperation)-
ASSOCIATIONNodes with an association value. Only valid for source node groups. The association type and id are specified using setGroupNodeAssociationType() and setGroupIntegerParameter() withASSOCIATION_ID. -
ENTITIES_WITH_ANY_ASSOCIATION_VALUENodes with any association value. Only valid for source node groups. The association type is specified using setGroupNodeAssociationType(). Any non-zero value of the specified association type will flag the node. -
WITHIN_EXTENTNodes within a coordinate box. Only valid for source node groups. The extent limits are specified using setGroupFloatParameterArray() withEXTENT. -
CORNER_NODESCorner nodes of elements. Valid for source element, element face and element edge groups. A node is selected if it is connected to the corner (as opposed to midside, midface or midbody) of an element, element face or element edge respectively. All nodes of linear elements are assumed to be corners. -
CONNECTED_ENTITIESNodes connected to 0D elements. Only valid for source element groups. A node is selected if it is connected to a 0D element. A 0D element is any element with a shape ofPOINT. -
FEATUREFeature nodes based on angle between edges. Only valid for source element edge groups. The feature angle tolerance is specified using setGroupFloatParameter() withFEATURE_ANGLE. -
FREE_ENTITIESFree nodes. Valid for source element, element face and element edge groups. A node is selected if it is connected to only one element, element face or element edge respectively. -
FIRST_ENTITY_OCCURRENCENodes connected to any entity. Valid for source element, element face and element edge groups. A node is selected if it is connected to any element, element face or element edge respectively. -
ENTITIES_USED_BY_N_ELEMENTSNodes used by a specified number of elements. Only valid for source element groups. The number of node uses is specified using setGroupIntegerParameter() withUSED_ENTITY_COUNT.
-
- inputGroup – Pointer to source Group object of elements, element faces, element edges or nodes. If NULL, then all elements or nodes are assumed.
- outputGroup – [out] Pointer to derived Group object of nodes
Returns:
-
Status
getElementRegion(RegionOperation operation, Group *inputGroup, IdTranslator *elementRegion) Derive regions of elements from an input group of elements using a specified operation. The regions are numbered sequentially from 1. The
UNCONNECTED_REGIONSoperation creates regions of connected elements which are not connected to any elements in any other region. TheTOPOLOGICALLY_SIMILAR_BODIESoperation creates regions of connected elements which are connected to topologically similar elements. TheNODAL_AVERAGING_REGIONSoperation creates regions of connected elements which are suitable for averaging element based result quantities to nodes.Parameters: - operation – Operation specified to derive regions (see
RegionOperation) - inputGroup – Pointer to source Group object of elements. If NULL, then all elements are assumed.
- elementRegion – [out] Pointer to IdTranslator of element regions
Returns: - operation – Operation specified to derive regions (see
-
Status
getNodeRegion(RegionOperation operation, Group *inputGroup, IdTranslator *elementRegion) Derive regions of nodes from an input group of nodes or elements using a specified operation. The regions are numbered sequentially from 1. The
UNCONNECTED_REGIONSoperation creates regions of connected nodes which are not connected to any nodes in any other region (connectivity determined by element connectivity). TheTOPOLOGICALLY_SIMILAR_BODIESoperation creates regions of connected nodes which are connected via topologically similar elements.Parameters: - operation – Operation specified to derive regions (see
RegionOperation) - inputGroup – Pointer to source Group object of nodes or elements. If NULL, then all nodes are assumed.
- elementRegion – [out] Pointer to IdTranslator of node regions
Returns: - operation – Operation specified to derive regions (see
-
Status
splitElement(EntityType entityType, int elementIndex, int entityNumber, int nodeINdex) Split element using a node index. Elements which may be split include 2 node lines, 3 node triangles and 4 node tetrahedra. The element connectivity is replaced by one of the elements resulting from the split. If the element is split then for lines one additional line element is generated, for triangles two additional triangle elements are generated, and for tetrahedra three additional tetrahedral elements are generated. If the element edge is split then all elements adjacent to the element across the specified edge are split. An adjacent element is not split if the element is not a simplex of the same shape.
- Errors
Parameters: Returns:
-
Status
getElementSize(EntityType entityType, int elementIndex, int entityNumber, double *size) Compute a measure of element size for the specified element. For volume elements, the size is the volume. For surface elements, the size is the area. For line elements, the size is the length.
- Errors
-
VALUEis generated if an improper elementIndex or nodeIndex is specified.
-
Parameters: Returns:
-
Status
copy(Mesh *from) Copy all nodes, elements, topology, connectivity, and associations from the source Mesh object.
Parameters: from – Pointer to source Mesh object Returns: Status
-
Status
append(Mesh *from) Append the contents of the source Mesh object to this Mesh. If the user node or element identifiers in the source are equal to the node or element index respectively, then the user node or element identifiers are offset by the maximum user node or element identifiers in this object. If the identifiers are not equal to the index, then the user node or element identifiers from the source are set directly.
Parameters: from – Pointer to source Mesh object Returns: Status
-
Status
extractSubset(Group *group, Mesh *subset, IdTranslator *childToParentNodeIndices) Extract a subset of this Mesh and place it in the subset Mesh. The subset is specified by the source group of elements. All nodes connected to the specified elements are extracted. The node IdTranslator object is filled with the parent node indices of the extracted nodes.
Parameters: - group – Pointer to source Group object of elements
- subset – Pointer to subset Mesh object
- childToParentNodeIndices – Pointer to node IdTranslator object of parent node indices
Returns:
-
Status
extractSubsetWithElementMapping(Group *group, Mesh *subset, IdTranslator *childToParentNodeIndices, IdTranslator *childToParentElementIndices) Extract a subset of this Mesh and place it in the subset Mesh. The subset is specified by the source group of elements. All nodes connected to the specified elements are extracted. The node IdTranslator object is filled with the parent node indices of the extracted nodes. The element IdTranslator object is filled with the parent element indices of the extracted elements.
Parameters: - group – Pointer to source Group object of elements
- subset – Pointer to subset Mesh object
- childToParentNodeIndices – Pointer to node IdTranslator object of parent node indices
- childToParentElementIndices – Pointer to element IdTranslator object of parent element indices
Returns:
-
Status
print() Print detailed mesh information including nodes, elements, topology, and connectivity.
Returns: Status
-
Status
printSummary() Print a summary of mesh statistics including node count, element count, and element type distribution.
Returns: Status
-
Status
tesselate(Mesh *input) Tesselate higher order elements (quadratic, cubic) in the input Mesh to linear elements (with straight edges) in this Mesh. The tesselation process subdivides each higher order element into multiple linear elements.
Parameters: input – Pointer to input Mesh object containing higher order elements Returns: Status
-
Status
getMeshInterfacePointers(MeshInterface *functions) Retrieve function pointers to the internal mesh interface functions.
Parameters: functions – Pointer to MeshInterface object Returns: Status
-
int
checkElementIndex(int index, const char *errorFunction) Check if the specified element index is valid and defined.
Parameters: - index – Element index to check
- errorFunction – Name of calling function for error reporting
Returns: 1 if element is valid, 0 otherwise
-
Status
getIntersectionPlane(double planeEquation[4], Group *inputGroup, Group *outputGroup) Compute the intersection of elements in the input group with a plane defined by a plane equation. The intersection creates a group of element faces or edges.
Parameters: Returns:
-
Status
setThreadCount(int count) Set the number of threads to use for parallel mesh operations.
Parameters: count – Number of threads to use Returns: Status
-
template<auto
AssociationType, typenameAssociationValue>
StatussetNodeAssociation(int index, AssociationValue association) Set node association, association, for a specified node index. The association type is specified as a template parameter to ensure type safety. Use getNodeAssociation() to retrieve node associations. Note that setCoordinates() sets a default node type. The node type,
NODE_TYPE, association should be set to one of thecae::core::NodeTypeconstants.Example usage:
mesh->setNodeAssociation<NodeAssociationType::USER_ID>(nodeIndex, userId); mesh->setNodeAssociation<NodeAssociationType::NODE_TYPE>(nodeIndex, NodeType::GRID);
- Errors
Template Parameters: - AssociationType –
NodeAssociationType - AssociationValue – Type of the association value (int,
NodeType, etc.)
Parameters: - index – Node index to set association
- association – Node association value
Returns:
-
template<auto
AssociationType, typenameAssociationValue>
StatusgetNodeAssociation(int indexCount, int indexes[], AssociationValue associations[]) Get node associations, associations, for a set of specified nodes indexes. If a node association has not been defined for a node index, zero is returned, except for the case
USER_ID. In this case the return value is dependent upon theZERO_USER_IDparameter set using setIntegerParameter(). By default if the value has not been set or has been set to zero the node index is returned as the association. Use setNodeAssociation() to set node associations.Example usage:
mesh->getNodeAssociation<NodeAssociationType::USER_ID>(count, nodeIndices, associations); mesh->getNodeAssociation<NodeAssociationType::NODE_TYPE>(count, nodeIndices, nodeTypes);
Template Parameters: - AssociationType – from
NodeAssociationType - AssociationValue – Type of the association value (int,
NodeType, etc.)
Parameters: - indexCount – Number of node indices to get associations
- indexes – Vector of node indices.
- associations – [out] Vector of node associations
Returns: - AssociationType – from
-
template<auto
AssociationType, typenameAssociationValue>
StatusaddNodeAssociation(int index, AssociationValue association) Add a node association, association, for a specified node, index. Use deleteNodeAssociation() to delete any added associations at a node.
Example usage:
mesh->addNodeAssociation<NodeAssociationType::PART_ID>(nodeIndex, partId);
- Errors
Template Parameters: - AssociationType – from
NodeAssociationType - AssociationValue – Type of the association value (int,
NodeType, etc.)
Parameters: - index – Node index
- association – Association value
Returns:
-
template<auto
AssociationType>
StatusdeleteNodeAssociation(int index) Delete any node associations added at a specified node, index. The association type is specified as a template parameter to ensure type safety. Only those associations specified by addNodeAssociation() are deleted.
Example usage:
mesh->deleteNodeAssociation<NodeAssociationType::PART_ID>(nodeIndex);
- Errors
-
VALUEis generated if an improper node index is specified.
-
Template Parameters: AssociationType – from NodeAssociationTypeParameters: index – Node index Returns: Status
-
template<auto
AssociationType>
StatusgetNodeAssociationCount(int index, int *count) Query for the total number, count >= 1 of node associations at a specified node, index. The number, count, is returned as 1 if no additional associations have been added at the node using addNodeAssociation().
Example usage:
mesh->getNodeAssociationCount<NodeAssociationType::USER_ID>(nodeIndex, &count);
- Errors
-
VALUEis generated if an improper node index is specified.
-
Template Parameters: AssociationType – from
NodeAssociationTypeParameters: - index – Node index
- count – [out] Total number of node associations
Returns:
-
template<auto
AssociationType, typenameAssociationValue>
StatusgetAllNodeAssociations(int index, int *count, AssociationValue associations[]) Query for all node associations at a specified node, index. The total number of node associations, count >= 1 is returned as well as count associations in vector associations. The single association set using setNodeAssociation() is always the first entry in associations. The number, count, is returned as 1 if no additional associations have been added at the node using addNodeAssociation().
Example usage:
mesh->getAllNodeAssociations<NodeAssociationType::PART_ID>(nodeIndex, &count, associations); mesh->getAllNodeAssociations<NodeAssociationType::NODE_TYPE, NodeType>(nodeIndex, &count, nodeTypes);
- Errors
-
VALUEis generated if an improper node index is specified.
-
Template Parameters: - AssociationType – from
NodeAssociationType - AssociationValue – Type of the association value (int,
NodeType, etc.)
Parameters: - index – Node index
- count – [out] Total number of node associations
- associations – [out] Associations
Returns:
-
template<auto
AssociationType, typenameAssociationValue>
StatussetElementAssociation(int index, AssociationValue association) Set element association, association, for a specified element index. The association type is specified as a template parameter to ensure type safety. Use getElementAssociation() to retrieve element associations. Note that setTopology() sets a default element type. The element type,
ELEMENT_TYPE, association should be set to one of the ElementType constantsElementType. The end connection,ELEMENT_END_A_CONNECTIONorELEMENT_END_B_CONNECTION, associations specify certain point and line connections. These associations are required if the geometric location of an element end point is offset in some respect from the geometric location of the node connectivity at which the degrees of freedom are located. An example would be beam element offset vectors. A positive value indicates a node number. A zero value means that the element end point is colocated with the node connectivity A negative value is identified by one of theElementEndType. The element type,ELEMENT_TYPE, association should be set to one of the following constantsElementType. The specific element type,SpecificType, association should be set to one of the following constants depending upon the element type. For 2-D elements, the element two dimension type,ELEMENT_TYPE_2D, association should be set to one of the following non-zero constantsAnalysisType2D. Any element which is not a 2-D element will have an association value of zero. The element technology,ELEMENT_TECHNOLOGY, association is designed to be set to one of the following constantsElementTechnology.Example usage:
mesh->setElementAssociation<ElementAssociationType::USER_ID>(elemIndex, userId); mesh->setElementAssociation<ElementAssociationType::ELEMENT_TYPE>(elemIndex, cae::core::ElementType::SPRING_DASHPOT); mesh->setElementAssociation<ElementAssociationType::ELEMENT_SPECIFIC_TYPE>(elemIndex, cae::core::SpecificType::SPRINGDASHPOT_BUSH);
- Errors
-
VALUEis generated if an improper element index is specified.
-
Template Parameters: - AssociationType – from
ElementAssociationType - AssociationValue – Type of the association value (int,
ElementType,SpecificType, etc.)
Parameters: - index – Element index to set association
- association – Element association value
Returns:
-
template<auto
AssociationType, typenameAssociationValue>
StatusgetElementAssociation(int indexCount, int indexes[], AssociationValue associations[]) Get element associations, associations, for a set of specified elements indexes. The association type is specified as a template parameter to ensure type safety. If an element association has not been defined for an element index, zero is returned, except for the case
USER_ID. In this case the return value is dependent upon theZERO_USER_IDparameter set using setIntegerParameter(). By default if the value has not been set or has been set to zero the element index is returned as the association. Use setElementAssociation() to set element associations.Example usage:
mesh->getElementAssociation<ElementAssociationType::PROPERTY_ID>(count, elemIndices, associations); mesh->getElementAssociation<ElementAssociationType::ELEMENT_TYPE>(count, elemIndices, elemTypes);
Template Parameters: - AssociationType – from
ElementAssociationType - AssociationValue – Type of the association value (int,
ElementType,SpecificType, etc.)
Parameters: - indexCount – Number of element indices to get associations
- indexes – Vector of element indices.
- associations – [out] Vector of element associations
Returns: - AssociationType – from
-
template<auto
AssociationType, typenameAssociationValue>
StatusaddElementAssociation(int index, AssociationValue association) Add an element association, association, for a specified element, index. Use deleteElementAssociation() to delete any added associations at an element.
Example usage:
mesh->addElementAssociation<ElementAssociationType::MATERIAL_ID>(elemIndex, materialId);
- Errors
-
VALUEis generated if an improper element index is specified.
-
Template Parameters: - AssociationType – from
ElementAssociationType - AssociationValue – Type of the association value (int,
ElementType,SpecificType, etc.)
Parameters: - index – Element index
- association – Association value
Returns:
-
template<auto
AssociationType>
StatusdeleteElementAssociation(int index) Delete any element associations added at a specified element, index. Only those associations specified by addElementAssociation() are deleted.
Example usage:
mesh->deleteElementAssociation<ElementAssociationType::MATERIAL_ID>(elemIndex);
- Errors
-
VALUEis generated if an improper element index is specified.
-
Template Parameters: AssociationType – from ElementAssociationTypeParameters: index – Element index Returns: Status
-
template<auto
AssociationType>
StatusgetElementAssociationCount(int index, int *count) Query for the total number, count >= 1 of element associations at a specified element, index. The number, count, is returned as 1 if no additional associations have been added at the element using addElementAssociation().
Example usage:
mesh->getElementAssociationCount<ElementAssociationType::PROPERTY_ID>(elemIndex, &count);
- Errors
-
VALUEis generated if an improper element index is specified.
-
Template Parameters: AssociationType – from
ElementAssociationTypeParameters: - index – Element index
- count – [out] Total number of element associations
Returns:
-
template<auto
AssociationType, typenameAssociationValue>
StatusgetAllElementAssociations(int index, int *count, AssociationValue associations[]) Query for all element associations at a specified element, index. The total number of element associations, count >= 1 is returned as well as count associations in vector associations. The single association set using setElementAssociation() is always the first entry in associations. The number, count, is returned as 1 if no additional associations have been added at the element using addElementAssociation().
Example usage:
mesh->getAllElementAssociations<ElementAssociationType::PART_ID>(elemIndex, &count, associations); mesh->getAllElementAssociations<ElementAssociationType::ELEMENT_TYPE>(elemIndex, &count, elemTypes);
- Errors
-
VALUEis generated if an improper element index is specified.
-
Template Parameters: - AssociationType – from
ElementAssociationType - AssociationValue – Type of the association value (int,
ElementType,SpecificType, etc.)
Parameters: - index – Element index
- count – [out] Total number of element associations
- associations – [out] Associations
Returns:
-
enum class