OGS
IntegrationGaussLegendreTet.h
Go to the documentation of this file.
1
11#pragma once
12
13#include "BaseLib/Error.h"
16
17namespace NumLib
18{
23{
24public:
30 explicit IntegrationGaussLegendreTet(unsigned order = 2) : _order(order)
31 {
32 this->setIntegrationOrder(order);
33 }
34
36 void setIntegrationOrder(unsigned order)
37 {
38 _order = order;
40 }
41
43 unsigned getIntegrationOrder() const { return _order; }
44
46 unsigned getNumberOfPoints() const { return _n_sampl_pt; }
47
54 MathLib::WeightedPoint getWeightedPoint(unsigned const igp) const
55 {
57 }
58
66 static MathLib::WeightedPoint getWeightedPoint(unsigned const order, unsigned const igp)
67 {
68 switch (order)
69 {
70 case 1:
72 case 2:
74 case 3:
76 case 4:
78 }
79 OGS_FATAL("Integration order {:d} not implemented for tetrahedrals.",
80 order);
81 }
82
83 template <typename Method>
84 static MathLib::WeightedPoint getWeightedPoint(unsigned const igp)
85 {
86 return MathLib::WeightedPoint(Method::X[igp], Method::W[igp]);
87 }
88
95 static unsigned getNumberOfPoints(unsigned order)
96 {
97 switch (order)
98 {
99 case 1:
101 case 2:
103 case 3:
105 case 4:
107 }
108 OGS_FATAL("Integration order {:d} not implemented for tetrahedrals.",
109 order);
110 }
111
112private:
113 unsigned _order;
114 unsigned _n_sampl_pt{0};
115};
116
117} // namespace NumLib
#define OGS_FATAL(...)
Definition Error.h:26
Gauss-Legendre quadrature rule for tetrahedrals.
void setIntegrationOrder(unsigned order)
Change the integration order.
unsigned getIntegrationOrder() const
return current integration order.
static MathLib::WeightedPoint getWeightedPoint(unsigned const igp)
unsigned getNumberOfPoints() const
return the number of sampling points
MathLib::WeightedPoint getWeightedPoint(unsigned const igp) const
static unsigned getNumberOfPoints(unsigned order)
static MathLib::WeightedPoint getWeightedPoint(unsigned const order, unsigned const igp)