CDPElementGroup

Functions

~CDPElementGroup

void

addSingleTypeElements

void

addMultipleTypeElements

void

addPolyhedronData

void

setElementPartIds

void

setPrescribedElementOrdering

Detailed Description

class CDPElementGroup

The element group defines a group of elements within one geometry.

This group will either result in one single part in the host or a number of parts if setElementPartIds() are used. See CDPGeometryInfo for information and limitations on how parts are generated.

Note

Make sure the meta data provided in CDPGeometryInfo or CDPElementGroupInfo matches what you populate in this method.

Public Functions

inline virtual ~CDPElementGroup()
virtual void addSingleTypeElements(CDPElementType elementType, cdp_size_t elementCount, const cdp_int_t *elementNodeArr, cdp_size_t elementNodeCount, const cdp_int_t *elementIdArr) = 0

Adds elements with the same element type to this group.

Use this method to add elements to this group, all having the same element type. You provide the number of elements, the array of element nodes (zero based indices into the corresponding node group), number of element nodes and optionally an id per element.

Restrictions

  • elementNodeArr must have the size elementNodeCount

  • elementNodeArr must match element type and count. So if you specify 5 CDP_ELT_TETRAHEDRONS elements, elementNodeCount must be 20 (5*4).

  • elementIdArr must either be NULL or have the size elementCount

See also

CDPElementType

Note

For polyhedron elements (CDP_ELT_POLYHEDRONS) you have to specify the extra information about the polyhedrons with the addPolyhedronData method (element face info).

virtual void addMultipleTypeElements(const CDPElementType *elementTypeArr, cdp_size_t elementCount, const cdp_int_t *elementNodeArr, cdp_size_t elementNodeCount, const cdp_int_t *elementIdArr) = 0

Adds elements with different element types to this group.

Use this method to add an array of elements of different types to this group. You specify one element type per element using the elementTypeArr array. You then provide the number of elements, the array of element nodes (zero based indices into the corresponding node group), number of element nodes and optionally an id per element.

Restrictions

  • elementTypeArr must have the size elementCount

  • elementNodeArr must have the size elementNodeCount

  • elementNodeArr must match element type and count. So if you specify 5 CDP_ELT_TETRAHEDRONS elements, elementNodeCount must be 20 (5*4).

  • elementIdArr must either be NULL or have the size elementCount

See also

CDPElementType

Note

For polyhedron elements (CDP_ELT_POLYHEDRONS) you have to specify the extra information about the polyhedrons with the addPolyhedronData method (element face info).

virtual void addPolyhedronData(const cdp_ubyte_t *numNodesPerPolyhedronArr, const cdp_ubyte_t *numFacesPerPolyhedronArr, cdp_size_t polyhedronCount, const cdp_ubyte_t *numNodesPerFaceArr, cdp_size_t totalFaceCount, const cdp_int_t *faceNodeIndicesArr, cdp_size_t faceNodeIndicesCount) = 0

Adds information about polyhedrons in this element group.

Use this method (in addition to addSingleTypeElements or addMultipleTypeElements) to define all the polyhedron elements in the group.

Polyhedrons can have any shape: any number of surface and any number of nodes per surface. This method adds the topology of a set of polyhedrons in this group. The number of nodes per polyhedron is specified in numNodesPerPolyhedronArr array. The number of faces per polyhedron is specified in the numFacesPerPolyhedronArr array. The number of nodes per face for all faces are specified in the numNodesPerFaceArr array. Finally, the topology of each face is specified in faceNodeIndicesArr (which contains zero based node indices into the associated node group, same as the element nodes).

Restrictions

  • numNodesPerPolyhedronArr must have the size polyhedronCount

  • numFacesPerPolyhedronArr must have the size polyhedronCount

  • numNodesPerFaceArr must have the size totalFaceCount

  • faceNodeIndicesArr must have the size faceNodeIndicesCount

virtual void setElementPartIds(const cdp_int_t *partIdArr, cdp_size_t elementCount) = 0

Specifies part ids for the elements.

Use this method to create more than one part in the host from a group. Each element is assigned a part id, and the resulting number of parts is the set of unique part ids provided.

This is optional, and if not specified, all the elements in the group will become one part.

Note

The part ids provided here must match the ones specified in the meta data using CDPElementGroupInfo::addPartInfo. Some restrictions apply to part ids, see CDPGeometryInfo for more information.

virtual void setPrescribedElementOrdering(const cdp_int_t *elementTargetIndices, cdp_size_t elementCount) = 0

Specifies a custom ordering of the provided elements.

Use this method if you want the elements to get a custom ordering. This is optional, and if specified, the elements will be ordered as specified in the elementTargetIndices. Note that any per element index (e.g. per element results etc.) will use this custom order if specified.

elementCount must match the number of elements in the group, and the elementTargetIndices must contain values 0..elementCount - 1, and all array members must be unique. So no holes or duplicates are allowed.