> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Element Class Reference

Part of [Data](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/group__data)

Repesents the geometry of a finite element within a mesh.

## Public Types

| Type | Name |
| - | - |
|  typedef size\_t | [count\_type](#ace35addae6fb3e124dac4815a1f64fc8) a large numbereger for index algebra |
|  typedef std::vector\< Edge \*> | [edge\_ptr\_vector\_type](#ab5c8f4002db20163549090ce34e235e2) a *Edge* pointer vector |
|  typedef [Element](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_element.md) \* | [element\_ptr\_type](#a6ea0951108d01e59ea59cafe4f639e03) a pointer to *[Element](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_element.md)* |
|  typedef element::ElementData \* | [elementdata\_const\_ptr\_type](#a0d16b56c12710f1a510e3f39c0aa1b02) a pointer to a const-address of *ElementData* |
|  typedef element::ElementData \* | [elementdata\_ptr\_type](#a33133509c918336b6be12d2ee65bb9d0) a pointer to *ElementData* |
|  typedef element::ET \* | [elementtype\_const\_ptr\_type](#ac5dc1cdb71455f062cd6a1b1ef8b2eb4) a pointer to element types *ET* |
|  typedef std::vector\< Face \*> | [face\_ptr\_vector\_type](#a0ec8ff821248940465b7f41205bb9a49) a *Face* pointer vector |
|  typedef number | [float\_type](#a09c479e08416cdc288b05648e59dabda) floating point number type for algebra |
|  typedef number | [index\_type](#a1745e2fb27a3a3783ac48a53630635aa) unsigned index type |
|  typedef Point \* | [point\_ptr\_type](#a5625d94f603e3a8e2192980fd1f77128) a pointer of *Point* |
|  typedef std::vector\< [point\_ptr\_type](#a5625d94f603e3a8e2192980fd1f77128) > | [point\_ptr\_vector\_type](#a17cb737c35782749b46d495181a6400f) a *Point* pointer vector |
|  typedef std::vector\< unsigned short > | [small\_index\_vector\_type](#a884f8c89c3e02a91b0ec3f3759972156) a vector of small unsigned index types |
|  typedef number | [uint](#a2c83b7348a2acedf114ab5847ad3ffcd) number type |

## Public Member Functions

| Type | Name |
| - | - |
| | [computeLinearNodeCoordinates](#a47f2e02383929d07eb975a848ea01356) (Eigen::MatrixXd input\_coors, Eigen::MatrixXd output\_coors) |
| number | [computeSurfaceArea](#a3e5ccd0faa3aedb8a9f9d0ae7f5f9297) () Computes the surface area of the element Collects all the element faces, checks which of them are on the elements surface, gets the triangulation of these faces and computes the sum of these triangle areas. |
| | [Element](#ab6edd5ea4f400b450f07203f432d1c81) () default constructor, DO NOT USE - provided for SWIG |
| [edge\_ptr\_vector\_type](#ab5c8f4002db20163549090ce34e235e2) | [elementEdges](#aa35c3670a02548beed064776203aa0ca) () const returns the edges of the element |
| [face\_ptr\_vector\_type](#a0ec8ff821248940465b7f41205bb9a49) | [elementFaces](#abb46a6ca856f3f251832897c0419d056) () const returns the faces of the element |
| [point\_ptr\_vector\_type](#a17cb737c35782749b46d495181a6400f) | [elementNodes](#a014c5ec371249375b31d6378ff93eba7) () const returns the nodes of the element |
| element::ET | [elementType](#aa9dbef11fb7319aa9b3444c9aa3d73fd) () const returns the element type: |
| string | [elementTypeString](#abae7f86c1e3df38d6b23c7e56d1d3d50) () returns the element type: |
| | [getNormal](#acff0007b5fcfc9d757bf7f27581589cd) (Eigen::Vector3d output\_normal) |
| [index\_type](#a1745e2fb27a3a3783ac48a53630635aa) | [index](#a5c8a964dee50273444cc6f3890a93458) () returns the element index: |
| bool | [isDegenerated](#a9504141fc8f8598f2336e3dbc26955d3) () |
| [small\_index\_vector\_type](#a884f8c89c3e02a91b0ec3f3759972156) | [localElementAtNode](#a6e72cb8299f6b4d213df02a198b02b38) () a getter for m\_local\_element\_at\_node |
| [small\_index\_vector\_type](#a884f8c89c3e02a91b0ec3f3759972156) | [localElementAtNodeRef](#a92d374554c062ca6f9a8f8165946b7ae) () a setter for m\_local\_element\_at\_node |
| Point | [nodeAt](#a517d742794bc4eb1f10038ebc9497544) (number id) accesses inidividual connected nodes |
| number | [numNodes](#aee2c59027bd4da1512c12b2cc36e3d9f) () const |
| [index\_type](#a1745e2fb27a3a3783ac48a53630635aa) | [part\_index](#afcb99d683aa8cefa53d9410e03372c17) () returns the part index: |
| | [recomputeNodeCoordinatesMidEdge](#a1129b572ed4e9f2aad058ad02291832b) (Eigen::MatrixXd input\_coors, Eigen::MatrixXd output\_coors) |
| Section | [section](#af609878599acc1e49f529281ee7af924) () const a getter for the element section: |

## Detailed Description

Repesents the geometry of a finite element within a mesh.

This class represents the geometrical instance of a finite element contained in a FEM mesh. The class associates the geometry and the topology of the mesh (and the finite element type). It does not provide information/methods on the underlying physical process.

## Member Function Documentation

### computeLinearNodeCoordinates()

```cpp theme={null}
computeLinearNodeCoordinates(
    Eigen::MatrixXd input_coors,
    Eigen::MatrixXd output_coors
)
```

recomputes the given node coordinates by linear shape functions The computation is done by assumption of an isoparametric approach.

**Parameters**

| Name | Description |
| - | - |
| input\_coors | a 3\*n matrix containing the coordinates |
| output\_coors | a 3\*n matrix containing the new coordinates |

### computeSurfaceArea()

```cpp theme={null}
number computeSurfaceArea()
```

Computes the surface area of the element Collects all the element faces, checks which of them are on the elements surface, gets the triangulation of these faces and computes the sum of these triangle areas.

**Returns**

The surface area.

> [!NOTE]
>
> [Element](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_element.md) surface: An element face is recognized as a surface if the face in question reports to be onSurface() and the ident of the [elementType()](#aa9dbef11fb7319aa9b3444c9aa3d73fd) face in question is not SNEG

### elementEdges()

```cpp theme={null}
edge_ptr_vector_type elementEdges() const
```

returns the edges of the element

**Returns**

a reference to m\_edges

### elementFaces()

```cpp theme={null}
face_ptr_vector_type elementFaces() const
```

returns the faces of the element

**Returns**

a reference to m\_faces

### elementNodes()

```cpp theme={null}
point_ptr_vector_type elementNodes() const
```

returns the nodes of the element

**Returns**

a reference to m\_nodes

### elementType()

```cpp theme={null}
element::ET elementType() const
```

returns the element type:

**Returns**

a reference to \*m\_type

### elementTypeString()

```cpp theme={null}
string elementTypeString()
```

returns the element type:

**Returns**

a string describing the element number

### getNormal()

```cpp theme={null}
getNormal(Eigen::Vector3d output_normal)
```

define the normal by average of triangles defined on the element

**Returns**

the normalized vector

### index()

```cpp theme={null}
index_type index()
```

returns the element index:

**Returns**

a reference to m\_index

### isDegenerated()

```cpp theme={null}
bool isDegenerated()
```

**Returns**

true if the element is degenerated An element is degenerated if there are at most 3 non degenerated faces (in this case, there is no volume being spanned).

### localElementAtNode()

```cpp theme={null}
small_index_vector_type localElementAtNode()
```

a getter for m\_local\_element\_at\_node

**Returns**

a reference to m\_local\_element\_at\_node

### localElementAtNodeRef()

```cpp theme={null}
small_index_vector_type localElementAtNodeRef()
```

a setter for m\_local\_element\_at\_node

**Returns**

a reference to m\_local\_element\_at\_node

### nodeAt()

```cpp theme={null}
Point nodeAt(number id)
```

accesses inidividual connected nodes

**Parameters**

| Name | Description |
| - | - |
| id | the index 0..[numNodes()](#aee2c59027bd4da1512c12b2cc36e3d9f)-1 |

**Returns**

a const-reference to the connected node

### numNodes()

```cpp theme={null}
number numNodes() const
```

**Returns**

the number of connected nodes

### part\_index()

```cpp theme={null}
index_type part_index()
```

returns the part index:

**Returns**

a reference to m\_part\_index

### recomputeNodeCoordinatesMidEdge()

```cpp theme={null}
recomputeNodeCoordinatesMidEdge(
    Eigen::MatrixXd input_coors,
    Eigen::MatrixXd output_coors
)
```

recomputes the given node coordinates by placing the mid-edge nodes in the center of the edges The computation is done by assumption of an isoparametric approach.

**Parameters**

| Name | Description |
| - | - |
| input\_coors | a 3\*n matrix containing the coordinates |
| output\_coors | a 3\*n matrix containing the new coordinates |

### section()

```cpp theme={null}
Section section() const
```

a getter for the element section:

**Returns**

a reference to m\_section
