rheolef  6.3
Functions | Variables
cxx_reference_element.cc File Reference
#include "rheolef/point.h"
#include "point.icc"
#include "edge.icc"
#include "triangle.icc"
#include "quadrangle.icc"
#include "tetrahedron.icc"
#include "prism.icc"
#include "hexahedron.icc"
Include dependency graph for cxx_reference_element.cc:

Go to the source code of this file.

Functions

void init_generic_0d (size_t E, size_t d, size_t nv, Float meas)
template<int Dimension>
void init_generic_1d (size_t E, size_t d, size_t nv, const Float v[][Dimension], Float meas)
template<int Dimension>
void init_generic_2d (size_t E, size_t d, size_t nv, const Float v[][Dimension], size_t ne, const size_t e[][2], Float meas)
template<size_t NEdgePerFaceMax>
void init_generic_3d (size_t E, size_t d, size_t nv, const Float v[][3], size_t nfac, const size_t f[][NEdgePerFaceMax], size_t nedg, const size_t e[][2], Float meas)
void init_p (size_t p)
void init_e (size_t e)
void init_t (size_t t)
void init_q (size_t q)
void init_T (size_t T)
void init_P (size_t P)
void init_H (size_t H)
void licence ()
void cxx_reference_element_header ()
void cxx_reference_element_body ()
int main (int argc, char **argv)

Variables

static const size_t max_size_t = size_t(-1)
static const size_t max_variant = 7
static const char * table_name [max_variant] = { "p", "e", "t", "q", "T", "P", "H" }
size_t table_dimension [max_variant]
Float table_measure [max_variant]
size_t table_n_vertex [max_variant]
static const size_t max_face = 8
static const size_t max_face_vertex = 4
size_t table_n_face [max_variant]
size_t table_n_face_vertex_max [max_variant]
size_t table_n_face_vertex [max_variant][max_face]
size_t table_fac2edg_idx [max_variant][max_face][max_face_vertex]
int table_fac2edg_ori [max_variant][max_face][max_face_vertex]

Function Documentation

void init_generic_0d ( size_t  E,
size_t  d,
size_t  nv,
Float  meas 
)

Definition at line 23 of file cxx_reference_element.cc.

template<int Dimension>
void init_generic_1d ( size_t  E,
size_t  d,
size_t  nv,
const Float  v[][Dimension],
Float  meas 
)

Definition at line 29 of file cxx_reference_element.cc.

template<int Dimension>
void init_generic_2d ( size_t  E,
size_t  d,
size_t  nv,
const Float  v[][Dimension],
size_t  ne,
const size_t  e[][2],
Float  meas 
)

Definition at line 33 of file cxx_reference_element.cc.

template<size_t NEdgePerFaceMax>
void init_generic_3d ( size_t  E,
size_t  d,
size_t  nv,
const Float  v[][3],
size_t  nfac,
const size_t  f[][NEdgePerFaceMax],
size_t  nedg,
const size_t  e[][2],
Float  meas 
)

Definition at line 38 of file cxx_reference_element.cc.

void init_p ( size_t  p)

point - Point reference element

The point reference element is defined for convenience. It is a 0-dimensional element with measure equal to 1.

Definition at line 69 of file cxx_reference_element.cc.

void init_e ( size_t  e)

edge - Edge reference element

The edge reference element is K = [0,1].

0---------1 x

Curved high order Pk edges (k >= 1), in 2d or 3d geometries, are supported. These edges have internal nodes, numbered as:

0----2----1 0--2--3--1 0-2-3-4-1
P2 P3 P4

Definition at line 73 of file cxx_reference_element.cc.

void init_t ( size_t  t)

triangle - Triangle reference element

The triangle reference element is

K = { 0 < x < 1 and 0 < y < 1-x }

NUMBERING

y
2
| +
| +
| +
| +
0---------1 x

Curved high order Pk triangles (k >= 1), in 2d or 3d geometries, are supported. These triangles have additional edge-nodes and face-nodes.

THESE NODES ARE NUMBERED AS first vertex, then edge-node, following the edge numbering order and orientation, and finally the face internal nodes, following the triangle lattice. See below for edge numbering and orientation.

2 2 2
| + | + | +
| + 7 6 9 8
5 4 | + 10 14 7
| + 8 9 5 11 12 13 6
| + | + | +
0-----3-----1 0---3---4---1 0--3--4--5--1
P2 P3 P4

Definition at line 77 of file cxx_reference_element.cc.

void init_q ( size_t  q)

quadrangle - Quadrangular reference element

The quadrangular reference element is [-1,1]^2.

NUMBERING

y
3---------2
| |
| |
| |
| |
0---------1 x

Curved high order Pk quadrangles (k >= 1), in 2d or 3d geometries, are supported. These quadrangles have additional edge-nodes and face-nodes.

THESE NODES ARE NUMBERED AS first vertex, then edge-node, following the edge numbering order and orientation, and finally the face internal nodes, following the quadrangle lattice. See below for edge numbering and orientation.

3-----6-----2 3---9---8---2
| | | |
| | 10 14 15 7
7 8 5 | |
| | 11 12 13 6
| | | |
0-----4-----1 0---4---5---1
P2 P3

Definition at line 81 of file cxx_reference_element.cc.

void init_T ( size_t  T)

tetrahedron - Tetraedron reference element

The tetrahedron reference element is

K = { 0 < x < 1 and 0 < y < 1-x and 0 < z < 1-x-y }
z
.
,/
/
3
,/|`\\
,/ | `\\
,/ '. `\\
,/ | `\\
,/ | `\\
0-----------'.--------2 --> y
`\\. | ,/
`\\. | ,/
`\\. '. ,/
`\\. |/
`1
`\\.
` x

Curved high order Pk tetrahedra (k >= 1) in 3d geometries are supported. These tetrahedra have additional edge-nodes, face-nodes and internal volume-nodes.

THESE NODES ARE NUMBERED AS first vertex, then edge-node, following the edge numbering order and orientation, then face-nodes following the face numbering order and orientation, and finally the face internal nodes, following the tetrahedron lattice. See below for edges and faces numbering and orioentation.

3
,/|`\\
,/ | `\\
,7 '. `9
,/ | `\\
,/ 8 `\\
0--------6--'.--------2
`\\. | ,/
`\\. | ,5
`4. '. ,/
`\\. |/
`1
P2

NUMBERING

The orientation is such that triedra (01, 02, 03) is direct, and all faces, see from exterior, are in the direct sens. References: P. L. Georges, "Generation automatique de maillages", page 24-, coll RMA, 16, Masson, 1994. Notice that the edge-nodes and face-nodes numbering slighly differ from those used in the gmsh mesh generator when using high-order elements. This difference is handled by the msh2geo mesh file converter (see msh2geo command).

Definition at line 85 of file cxx_reference_element.cc.

void init_P ( size_t  P)

prism - Prism reference element

The prism reference element is

K = { 0 < x < 1 and 0 < y < 1-x and -1 < z < 1 }

NUMBERING

The orientation is such that triedra (01, 02, 03) is direct and all faces, see from exterior, are in the direct sens. References: P. L. Georges, "Generation automatique de maillages", page 24-, coll RMA, 16, Masson, 1994.

z
3 ---- 5
' | . |
4 . '| |
| | |
| | |
| 0 . . .2 y
| ' .
1 . '
x

Definition at line 89 of file cxx_reference_element.cc.

void init_H ( size_t  H)

hexahedron - Hexaedron reference element

The hexahedron reference element is [-1,1]^3.

^ z
|
4----------7
|\\ |\\
| \\ | \\
| \\ | \\
| 5------+---6
| | | |
0---+------3 - | ---> y
\\ | \\ |
\\ | \\ |
\\| \\|
1----------2
\\
x

Curved high order Pk hexaedra (k >= 1) in 3d geometries are supported. These hexaedra have additional edge-nodes, face-nodes and internal volume-nodes.

THESE NODES ARE NUMBERED AS first vertex, then edge-node, following the edge numbering order and orientation, then face-nodes following the face numbering order and orientation, and finally the face internal nodes, following the hexaedron lattice. See below for edges and faces numbering and orioentation.

4----19----7
|\\ |\\
|16 23 | 18
12 \\ 21 15 \\
| 5----17+---6
|22 | 26 | 25|
0---+-11---3 |
\\ 13 24 \\ 14
8 | 20 10|
\\| \\|
1-----9----2
P2

NUMBERING

The orientation is such that triedra (01, 03, 04) is direct and all faces, see from exterior, are in the direct sens. References: P. L. Georges, "Generation automatique de maillages", page 24-, coll RMA, 16, Masson, 1994. Notice that the edge-nodes and face-nodes numbering slighly differ from those used in the gmsh mesh generator when using high-order elements. This difference is handled by the msh2geo mesh file converter (see msh2geo command).

Definition at line 93 of file cxx_reference_element.cc.

void licence ( )

Definition at line 97 of file cxx_reference_element.cc.

void cxx_reference_element_header ( )

Definition at line 122 of file cxx_reference_element.cc.

void cxx_reference_element_body ( )

Definition at line 130 of file cxx_reference_element.cc.

int main ( int  argc,
char **  argv 
)

Definition at line 225 of file cxx_reference_element.cc.

Variable Documentation

const size_t max_size_t = size_t(-1)
static

Definition at line 6 of file cxx_reference_element.cc.

const size_t max_variant = 7
static

Definition at line 7 of file cxx_reference_element.cc.

const char* table_name[max_variant] = { "p", "e", "t", "q", "T", "P", "H" }
static

Definition at line 8 of file cxx_reference_element.cc.

size_t table_dimension[max_variant]

Definition at line 10 of file cxx_reference_element.cc.

Float table_measure[max_variant]

Definition at line 11 of file cxx_reference_element.cc.

size_t table_n_vertex[max_variant]

Definition at line 12 of file cxx_reference_element.cc.

const size_t max_face = 8
static

Definition at line 14 of file cxx_reference_element.cc.

const size_t max_face_vertex = 4
static

Definition at line 15 of file cxx_reference_element.cc.

size_t table_n_face[max_variant]

Definition at line 17 of file cxx_reference_element.cc.

size_t table_n_face_vertex_max[max_variant]

Definition at line 18 of file cxx_reference_element.cc.

size_t table_n_face_vertex[max_variant][max_face]

Definition at line 19 of file cxx_reference_element.cc.

size_t table_fac2edg_idx[max_variant][max_face][max_face_vertex]

Definition at line 20 of file cxx_reference_element.cc.

int table_fac2edg_ori[max_variant][max_face][max_face_vertex]

Definition at line 21 of file cxx_reference_element.cc.