OGS
GaussLegendreTet.cpp
Go to the documentation of this file.
1
11 #include "GaussLegendreTet.h"
12
13 namespace MathLib
14 {
15 template <>
16 const std::array<std::array<double, 3>, GaussLegendreTet<1>::NPoints>
17  GaussLegendreTet<1>::X = {{{{1. / 4., 1. / 4., 1. / 4.}}}};
18 template <>
19 double const GaussLegendreTet<1>::W[1] = {1. / 6.};
20
21 const std::array<std::array<double, 3>, GaussLegendreTet<2>::NPoints>
22  GaussLegendreTet<2>::X = {{{{1. / 4., 1. / 4., 1. / 4.}},
23  {{1. / 6., 1. / 6., 1. / 6.}},
24  {{1. / 2., 1. / 6., 1. / 6.}},
25  {{1. / 6., 1. / 2., 1. / 6.}},
26  {{1. / 6., 1. / 6., 1. / 2.}}}};
27 double const GaussLegendreTet<2>::W[5] = {-2. / 15., 0.075, 0.075, 0.075,
28  0.075};
29
30 static std::array<std::array<double, 3>, GaussLegendreTet<3>::NPoints>
32 {
33  // Cf. Gellert, M., Harbord, R., 1991. Moderate degree cubature formulas for
34  // 3-D tetrahedral finite-element approximations. Communications in Applied
35  // Numerical Methods 7, 487-495. doi:10.1002/cnm.1630070609
36  const double a = 0.0673422422100983;
37  const double b = 0.3108859192633005;
38  const double c = 0.7217942490673264;
39  const double d = 0.0927352503108912;
40  const double e = 0.4544962958743506;
41  const double f = 0.045503704125649;
42
43  return {{{{a, b, b}},
44  {{b, a, b}},
45  {{b, b, a}},
46  {{b, b, b}},
47  {{c, d, d}},
48  {{d, c, d}},
49  {{d, d, c}},
50  {{d, d, d}},
51  {{e, e, f}},
52  {{e, f, e}},
53  {{e, f, f}},
54  {{f, e, e}},
55  {{f, e, f}},
56  {{f, f, e}}}};
57 }
58
59 const std::array<std::array<double, 3>, GaussLegendreTet<3>::NPoints>
61
62 static const double p = 0.1126879257180162 / 6.;
63 static const double q = 0.0734930431163619 / 6.;
64 static const double r = 0.0425460207770812 / 6.;
65
67  p, p, p, p, q, q, q, q, r, r, r, r, r, r};
68 } // namespace MathLib
constexpr std::array c
static const double q
static std::array< std::array< double, 3 >, GaussLegendreTet< 3 >::NPoints > initGLTet3X()
static const double p
static const double r
static MATHLIB_EXPORT const double W[NPoints]
static MATHLIB_EXPORT const unsigned NPoints
static MATHLIB_EXPORT const std::array< std::array< double, 3 >, NPoints > X
static MATHLIB_EXPORT const unsigned NPoints