DNDSR 0.1.0.dev1+gcd065ad
Distributed Numeric Data Structure for CFV
Loading...
Searching...
No Matches
Line.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "QuadratureBase.hpp"
4
5namespace DNDS::Geom::Elem
6{
7 // ===================================================================
8 // Gauss-Legendre Quadrature on [-1, 1]
9 // ===================================================================
10 // These are the standard Gauss-Legendre quadrature points and weights
11 // for integration over the interval [-1, 1].
12 //
13 // A rule with n points integrates polynomials up to degree 2n-1 exactly.
14 //
15 // Data format: [2][n] array where:
16 // [0][i] = quadrature point (xi)
17 // [1][i] = quadrature weight (wi)
18 // ===================================================================
19
20 /// Gauss-Legendre with 1 point: exact for degree 1
21 /// Point: 0, Weight: 2
22 static const t_real __GaussLegendre_1[2][1]{
23 {0},
24 {2}};
25
26 /// Gauss-Legendre with 2 points: exact for degree 3
27 /// Points: ±1/√3 ≈ ±0.577350269189626
28 /// Weights: 1, 1
29 static const t_real __GaussLegendre_2[2][2]{
30 {-0.577350269189626, 0.577350269189626},
31 {1, 1}};
32
33 /// Gauss-Legendre with 3 points: exact for degree 5
34 /// Points: 0, ±√(3/5) ≈ ±0.774596669241483
35 /// Weights: 8/9, 5/9, 5/9
36 static const t_real __GaussLegendre_3[2][3]{
37 {-0.774596669241483, 0, 0.774596669241483},
38 {0.555555555555555, 0.888888888888889, 0.555555555555555}};
39
40 /// Gauss-Legendre with 4 points: exact for degree 7
41 static const t_real __GaussLegendre_4[2][4]{
42 {-0.861136311594053, -0.339981043584856, 0.339981043584856, 0.861136311594053},
43 {0.347854845137454, 0.652145154862546, 0.652145154862546, 0.347854845137454}};
44
45 /// Gauss-Legendre with 5 points: exact for degree 9
46 static const t_real __GaussLegendre_5[2][5]{
47 {-0.906179845938664, -0.538469310105683, 0, 0.538469310105683, 0.906179845938664},
48 {0.236926885056189, 0.478628670499366, 0.568888888888889, 0.478628670499366, 0.236926885056189}};
49
50} // namespace DNDS::Geom::Elem
double t_real
Definition Geometric.hpp:8