DNDSR 0.1.0.dev1+gcd065ad
Distributed Numeric Data Structure for CFV
Loading...
Searching...
No Matches
QuadratureBase.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "Geom/Geometric.hpp"
4
5namespace DNDS::Geom::Elem
6{
7 // ===================================================================
8 // Integration Scheme Constants
9 // ===================================================================
10 // These constants define the number of quadrature points for each
11 // integration scheme. The naming convention is:
12 // INT_SCHEME_<Shape>_<N> = N points
13 //
14 // Expected orders of exactness (polynomial degree):
15 // Line: Gauss-Legendre, exact for degree 2n-1
16 // Quad: Product of 1D Gauss-Legendre
17 // Hex: Product of 1D Gauss-Legendre
18 // Tri: Hammer rules, exactness varies
19 // Tet: Hammer rules, exactness varies
20 // Prism: Triangle x Line product
21 // Pyramid: Gauss-Legendre x Gauss-Jacobi product
22 // ===================================================================
23
24 // Line [-1, 1] - Gauss-Legendre quadrature
25 static const t_index INT_SCHEME_Line_1 = 1; // O1 exact
26 static const t_index INT_SCHEME_Line_2 = 2; // O3 exact
27 static const t_index INT_SCHEME_Line_3 = 3; // O5 exact
28 static const t_index INT_SCHEME_Line_4 = 4; // O7 exact
29
30 // Quad [-1, 1]^2 - Product of 1D Gauss-Legendre
31 static const t_index INT_SCHEME_Quad_1 = 1; // O1 exact (1x1)
32 static const t_index INT_SCHEME_Quad_4 = 4; // O3 exact (2x2)
33 static const t_index INT_SCHEME_Quad_9 = 9; // O5 exact (3x3)
34 static const t_index INT_SCHEME_Quad_16 = 16; // O7 exact (4x4)
35
36 // Triangle (reference: vertices at (0,0), (1,0), (0,1)) - Hammer rules
37 static const t_index INT_SCHEME_Tri_1 = 1; // O1 exact (centroid)
38 static const t_index INT_SCHEME_Tri_3 = 3; // O2 exact
39 static const t_index INT_SCHEME_Tri_6 = 6; // O4 exact
40 static const t_index INT_SCHEME_Tri_7 = 7; // O5 exact
41 static const t_index INT_SCHEME_Tri_12 = 12; // O6 exact
42
43 // Tetrahedron (reference: vertices at (0,0,0), (1,0,0), (0,1,0), (0,0,1)) - Hammer rules
44 static const t_index INT_SCHEME_Tet_1 = 1; // O1 exact (centroid)
45 static const t_index INT_SCHEME_Tet_4 = 4; // O2 exact
46 static const t_index INT_SCHEME_Tet_8 = 8; // O3 exact
47 static const t_index INT_SCHEME_Tet_14 = 14; // O5 exact
48 static const t_index INT_SCHEME_Tet_24 = 24; // O6 exact
49
50 // Hex [-1, 1]^3 - Product of 1D Gauss-Legendre
51 static const t_index INT_SCHEME_Hex_1 = 1; // O1 exact (1x1x1)
52 static const t_index INT_SCHEME_Hex_8 = 8; // O3 exact (2x2x2)
53 static const t_index INT_SCHEME_Hex_27 = 27; // O5 exact (3x3x3)
54 static const t_index INT_SCHEME_Hex_64 = 64; // O7 exact (4x4x4)
55
56 // Prism (Triangle x Line) - Product of Tri and Line rules
57 static const t_index INT_SCHEME_Prism_1 = 1 * 1; // O1 exact (Tri_1 x Line_1)
58 static const t_index INT_SCHEME_Prism_6 = 3 * 2; // O2 exact (Tri_3 x Line_2)
59 static const t_index INT_SCHEME_Prism_18 = 6 * 3; // O4 exact (Tri_6 x Line_3)
60 static const t_index INT_SCHEME_Prism_21 = 7 * 3; // O5 exact (Tri_7 x Line_3)
61 static const t_index INT_SCHEME_Prism_48 = 12 * 4; // O6 exact (Tri_12 x Line_4)
62
63 // Pyramid - Product of Quad (in scaled coords) and Gauss-Jacobi (in z)
64 static const t_index INT_SCHEME_Pyramid_1 = 1; // O1 exact
65 static const t_index INT_SCHEME_Pyramid_8 = 8; // O3 exact
66 static const t_index INT_SCHEME_Pyramid_27 = 27; // O5 exact
67 static const t_index INT_SCHEME_Pyramid_64 = 64; // O7 exact
68
69 // Maximum integration order supported
70 static const int INT_ORDER_MAX = 6;
71
72} // namespace DNDS::Geom::Elem
int32_t t_index
Definition Geometric.hpp:6