# Elements¶

You must be careful with the signification of the word “element”, when it is used with singular or plural form :

• The class “Element” is a basic class. The classes Vertex, Edge, Quad an Hexa inherit from the Element Class. This class is used to call common function like getName(), setName() …

• The class “Elements” (plural) represents a set of Elements (vertices, edges, quads an hexaedras). This class is used to implements grids or result of ome complex operations (join, prism, …)

## Element¶

Set a name of an element:

```elt.setName(name)
```

Get a name of an element:

```elt.getName()
```

Print the name of an element:

```elt.printName()
```

Dump an element:

```elt.dump()
```

## Elements¶

Remove a set of elements from a document:

```doc.removeElements(elts)
```

Number of vertices in a set of elements:

```nb_vertices = elts.countVertex()
```

Number of edges in a set of elements:

```nb_edges = elts.countEdge()
```

Number of quads in a set of elements:

```nb_quads = elts.countQuad()
```

Number of hexahedrons in a set of elements:

```nb_hexas = elts.countHexa()
```

Get the vertex number i:

```vertex_i = elts.getVertex(i)
```

Get the edge number i:

```edge_i = elts.getEdge(i)
```

```quad_i = elts.getQuad(i)
```

Get the hexahedron number i:

```hexa_i = elts.getHexa(i)
```

```ve_xyz = elts.getVertexIJK(i, j, k)
```
with:

0 <= i < ni+1, 0 <= j < nj+1, 0 <= k < nk+1

```ed_a = elts.getEdgeI(i, j, k)
```
with:

0 <= i < ni, 0 <= j < nj+1, 0 <= k < nk+1

```ed_b = elts.getEdgeJ(i, j, k)
```
with:

0 <= i < ni+1, 0 <= j < nj, 0 <= k < nk+1

```ed_c = elts.getEdgeK(i, j, k)
```
with:

0 <= i < ni+1, 0 <= j < nj+1, 0 <= k < nk

```qu_a = elts.getQuadIJ(i, j, k)
```
with:

0 <= i < ni, 0 <= j < nj, 0 <= k < nk+1

```qu_b = elts.getQuadIK(i, j, k)
```
with:

0 <= i < ni, 0 <= j < nj+1, 0 <= k < nk

```qu_c = elts.getQuadJK(i, j, k)
```
with:

0 <= i < ni+1, 0 <= j < nj, 0 <= k < nk

```he_xyz = elts.getHexaIJK(i, j, k)
```
with:

0 <= i < ni, 0 <= j < nj, 0 <= k < nk

## Cross Elements¶

CrossElements inherits Elements. So you have all Elements functions available to CrossElements, plus the following functions:

part argument specifies the block of the cross elements where to search the vertex, the edge, the quad or the hexa.

```ve_xyz = elts.getVertexIJK(part, i, j, k)
```
with:

0 <= i < ni+1, 0 <= j < nj+1, 0 <= k < nk+1

```ed_a = elts.getEdgeI(part, i, j, k)
```
with:

0 <= i < ni, 0 <= j < nj+1, 0 <= k < nk+1

```ed_b = elts.getEdgeJ(part, i, j, k)
```
with:

0 <= i < ni+1, 0 <= j < nj, 0 <= k < nk+1

```ed_c = elts.getEdgeK(part, i, j, k)
```
with:

0 <= i < ni+1, 0 <= j < nj+1, 0 <= k < nk

```qu_a = elts.getQuadIJ(part, i, j, k)
```
with:

0 <= i < ni, 0 <= j < nj, 0 <= k < nk+1

```qu_b = elts.getQuadIK(part, i, j, k)
```
with:

0 <= i < ni, 0 <= j < nj+1, 0 <= k < nk

```qu_c = elts.getQuadJK(part, i, j, k)
```
with:

0 <= i < ni+1, 0 <= j < nj, 0 <= k < nk

```he_xyz = elts.getHexaIJK(part, i, j, k)