The mesh
In FEAT2, a mesh is a set of cells on top of a set of vertices. The following figure visualises a simple mesh in 2D. It contains 16 cells and 25 vertices.
The FEAT2 representation of a mesh is carried out with the structure t_triangulation
. From within this structure, all necessary information about the mesh can be accessed.
Dimension variables
The following table depicts the most important variables describing dimensions of the mesh:
Variable | Meaning |
---|---|
ndim | Dimension. 1=1D, 2=2D, 3=3D |
NVT | Total number of vertices (1D, 2D, 3D) |
NMT | Total number of edges (2D, 3D) |
NAT | Total number of faces (3D) |
NEL | Total number of cells/elements (1D, 2D, 3D) |
-------- | |
NVBD | Total number of vertices on the boundary (1D, 2D, 3D) |
NMBD | Total number of edges on the boundary (2D, 3D) |
-------- | |
NNVE | Maximum number of vertices per element (1D, 2D, 3D). 3 for 2D triangles, 4 for 2D quads or 3D tetrahedrons, 12 for 3D hexas |
NNEE | Maximum number of edges per element (2D, 3D). 3 for 2D triangles, 4 for 2D quads or 3D tetrahedrons, 12 for 3D hexas |
NNAE | Maximum number of faces per element (3D); ne hexa has e.g. 6 areas |
NNVA | Maximum number of vertices per face (3D). 3 for 3D tetraheral meshes, 4 for 3D hexahedral meshes |
NNelAtVertex | Maximum number of elements adjacent to a vertex |
NNelAtEdge | Maximum number of elements adjacent to an edge |
-------- | |
InelOfType | Number of elements with a defined number of vertices per element. InelOfType(TRIA_NVELINE1D) = number of lines in the mesh (1D). InelOfType(TRIA_NVETRI2D) = number of triangles in the mesh (2D). InelOfType(TRIA_NVEQUAD2D) = number of quads in the mesh (2D). InelOfType(TRIA_NVEPYR3D) = number of pyramides in the mesh (3D). InelOfType(TRIA_NVEPRIS3D) = number of prisms in the mesh (3D). InelOfType(TRIA_NVETET3D) = number of tetrahedra in the mesh (3D). InelOfType(TRIA_NVEHEXA3D) = number of hexahedra in the mesh (3D). |
Structural arrays
The structure furthermode contains a set of handles which point to different arrays encapsuling mesh information. Pointer to such arrays can be obtained using the usual storage management routines. For example, a pointer p_DvertexCoords
to an array DvertexCoords
can be obtained from the handle h_DvertexCoords
in the structure using the following command:
call storage_getbase_double2d (rtriangulation%h_DvertexCoords, p_DvertexCoords)
provided that rtriangulation
is the name of the t_triangulation
structure. The following sections describe the basic arrays inside of the triangulation.
DvertexCoords: Vertex coordinates
The array DvertexCoords(:,:)
contains for every vertex the (x,y) coordinates:
DvertexCoords(1,i)
= x-coordinate of vertex iDvertexCoords(2,i)
= y-coordinate of vertex iDvertexCoords(3,i)
= z-coordinate of vertex i
Example: In the above mesh there are 25 vertices with an (x,y)-coordinate associated to each.
The array is defined as
real(DP), dimension(2,25) :: DvertexCoords
IverticesAtElement: Vertices on each cell
The array IverticesAtElement(:,i)
contains for element i the associated vertices.
For example, for the above mesh there is
IverticesAtElement(:,6) = (/ 7, 8, 13, 12/)
Special case: 2D mesh
- The vertices are stored in counterclockwise order.
Remarks:
For mixed meshes, not all positions in
IverticesAtElement
are used. Unused vertex numbers are filled with zero. For example, a if triangles and quadrilaterals are mixed in a mesh, there isIverticesAtElement(:,i) = (/ ..., ..., ..., .../)
if cell i is a quad (all positions used)IverticesAtElement(:,i) = (/ ..., ..., ..., 0 /)
if cell i is a triangle (last entry zero)
IedgesAtElement: Edges on each cell
The array IedgesAtElement(:,i)
contains for element i the associated edges.
For example, for the above mesh there is
IedgesAtElement(:,6) = (/ 7, 17, 18, 15/)
Special case: 2D mesh
- The edges are stored in counterclockwise order.
IedgesAtElement(i,j)
is always the edge following vertexIverticesAtElement(i,j)
on element j.
Remarks:
For mixed meshes, not all positions in
IedgesAtElement
are used. Unused vertex numbers are filled with zero. For example, a if triangles and quadrilaterals are mixed in a mesh, there isIegdesAtElement(:,i) = (/ ..., ..., ..., .../)
if cell i is a quad (all positions used)IedgesAtElement(:,i) = (/ ..., ..., ..., 0 /)
if cell i is a triangle (last entry zero)
IfacesAtElement: Faces on each cell
The array IfacesAtElement(:,i)
contains for element i the associated faces.
Remarks:
For mixed meshes, not all positions in
IfacesAtElement
are used. Unused vertex numbers are filled with zero. For example, a if tetras and hexas are mixed in a mesh, there isIfacesAtElement(:,i) = (/ ..., ..., ..., ..., ..., ..., ..., .../)
if cell i is a hex (all positions used)IfacesAtElement(:,i) = (/ ..., ..., ..., ..., 0, 0, 0, 0 /)
if cell i is a tetra (last entries zero)
IneighboursAtElement: Element neighbours
The array IneighboursAtElement(:,i)
contains for element i the neighbouring elements:
- 2D: Neighbours associated via the edges
- 3D: Neighbours associated via the faces.
For example, for the above mesh there is
IneighboursAtElement(:,6) = (/ 2, 7, 10, 5/)
Special case: 2D mesh
- The elements are stored in counterclockwise order.
IneighboursAtElement(i,j)
is always the element associated to element j via edgeIedgesAtElement(i,j)
.
Special case: 3D mesh
IneighboursAtElement(i,j)
is always the element associated to element j via faceIfacesAtElement(i,j)
.
Remarks:
For mixed meshes, not all positions in
IedgesAtElement
are used. Unused vertex numbers are filled with zero. For example, a if triangles and quadrilaterals are mixed in a mesh, there isIneighboursAtElement(:,i) = (/ ..., ..., ..., .../)
if cell i is a hex (all positions used)IneighboursAtElement(:,i) = (/ ..., ..., ..., 0 /)
if cell i is a tetra (last entry zero)
IelementsAtEdge: Elements on an edge (only 2D)
The array IelementsAtEdge(1:2,i)
contains for a 2D mesh for edge i the associated elements.
In the above example, there is for edge i
IelementsAtEdge(:,i) = (/ 6, 7 /)
IverticesAtEdge: Vertices on an edge
The array IverticesAtEdge(1:2,i)
contains for edge i the associated vertices.
In the above example, there is for edge 18
IelementsAtEdge(:,18) = (/ 13, 12 /)
InodalProperty
The nodal property array defines for every vertex, every edge and every face whether it is on the boudary or not. There is:
InodalProperty(...) = 0
if the vertex/edge/face is in the domainInodalProperty(...) = k > 0
if the vertex/edge/face is on the boundary on boundary componentk
.
The array is organised as follows:
InodalProperty (1:NVT)
= nodal property for the vertices.InodalProperty (NVT+1:NVT+NMT)
= nodal property for the edges (2D, 3D).InodalProperty (NVT+NMT+1:NVT+NMT+NAT)
= nodal property for the faces (3D).
In this example, there is InodalProperty(i)=1
for the boudary vertices
For all other vertices j<>i, there is InodalProperty(j)=0.
DelementVolume
DelementVolume(i)
is the volume of cell i.DelementVolume(NEL+1)
is the volume of the complete domain.