OGS
NumLib::IntegrationGaussLegendreTet Class Reference

Detailed Description

Gauss-Legendre quadrature rule for tetrahedrals.

Definition at line 22 of file IntegrationGaussLegendreTet.h.

#include <IntegrationGaussLegendreTet.h>

Public Member Functions

 IntegrationGaussLegendreTet (unsigned order=2)
 
void setIntegrationOrder (unsigned order)
 Change the integration order.
 
unsigned getIntegrationOrder () const
 return current integration order.
 
unsigned getNumberOfPoints () const
 return the number of sampling points
 
MathLib::WeightedPoint getWeightedPoint (unsigned const igp) const
 

Static Public Member Functions

static MathLib::WeightedPoint getWeightedPoint (unsigned const order, unsigned const igp)
 
template<typename Method >
static MathLib::WeightedPoint getWeightedPoint (unsigned const igp)
 
static unsigned getNumberOfPoints (unsigned order)
 

Private Attributes

unsigned _order
 
unsigned _n_sampl_pt {0}
 

Constructor & Destructor Documentation

◆ IntegrationGaussLegendreTet()

NumLib::IntegrationGaussLegendreTet::IntegrationGaussLegendreTet ( unsigned order = 2)
inlineexplicit

Construct this object with the given integration order

Parameters
orderintegration order (default 2)

Definition at line 30 of file IntegrationGaussLegendreTet.h.

30 : _order(order)
31 {
32 this->setIntegrationOrder(order);
33 }
void setIntegrationOrder(unsigned order)
Change the integration order.

References setIntegrationOrder().

Member Function Documentation

◆ getIntegrationOrder()

unsigned NumLib::IntegrationGaussLegendreTet::getIntegrationOrder ( ) const
inline

return current integration order.

Definition at line 43 of file IntegrationGaussLegendreTet.h.

43{ return _order; }

References _order.

Referenced by getWeightedPoint().

◆ getNumberOfPoints() [1/2]

unsigned NumLib::IntegrationGaussLegendreTet::getNumberOfPoints ( ) const
inline

return the number of sampling points

Definition at line 46 of file IntegrationGaussLegendreTet.h.

References _n_sampl_pt.

Referenced by setIntegrationOrder().

◆ getNumberOfPoints() [2/2]

static unsigned NumLib::IntegrationGaussLegendreTet::getNumberOfPoints ( unsigned order)
inlinestatic

get the number of integration points

Parameters
orderthe number of integration points
Returns
the number of points

Definition at line 95 of file IntegrationGaussLegendreTet.h.

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 }
#define OGS_FATAL(...)
Definition Error.h:26

References OGS_FATAL.

◆ getWeightedPoint() [1/3]

template<typename Method >
static MathLib::WeightedPoint NumLib::IntegrationGaussLegendreTet::getWeightedPoint ( unsigned const igp)
inlinestatic

Definition at line 84 of file IntegrationGaussLegendreTet.h.

85 {
86 return MathLib::WeightedPoint(Method::X[igp], Method::W[igp]);
87 }

◆ getWeightedPoint() [2/3]

MathLib::WeightedPoint NumLib::IntegrationGaussLegendreTet::getWeightedPoint ( unsigned const igp) const
inline

get coordinates of a integration point

Parameters
igpThe integration point index
Returns
a weighted point

Definition at line 54 of file IntegrationGaussLegendreTet.h.

55 {
57 }
unsigned getIntegrationOrder() const
return current integration order.
MathLib::WeightedPoint getWeightedPoint(unsigned const igp) const

References getIntegrationOrder(), and getWeightedPoint().

Referenced by getWeightedPoint(), and getWeightedPoint().

◆ getWeightedPoint() [3/3]

static MathLib::WeightedPoint NumLib::IntegrationGaussLegendreTet::getWeightedPoint ( unsigned const order,
unsigned const igp )
inlinestatic

get coordinates of a integration point

Parameters
orderthe number of integration points
igpthe sampling point id
Returns
weight

Definition at line 66 of file IntegrationGaussLegendreTet.h.

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 }

References getWeightedPoint(), and OGS_FATAL.

◆ setIntegrationOrder()

void NumLib::IntegrationGaussLegendreTet::setIntegrationOrder ( unsigned order)
inline

Change the integration order.

Definition at line 36 of file IntegrationGaussLegendreTet.h.

37 {
38 _order = order;
40 }
unsigned getNumberOfPoints() const
return the number of sampling points

References _n_sampl_pt, _order, and getNumberOfPoints().

Referenced by IntegrationGaussLegendreTet().

Member Data Documentation

◆ _n_sampl_pt

unsigned NumLib::IntegrationGaussLegendreTet::_n_sampl_pt {0}
private

Definition at line 114 of file IntegrationGaussLegendreTet.h.

114{0};

Referenced by getNumberOfPoints(), and setIntegrationOrder().

◆ _order

unsigned NumLib::IntegrationGaussLegendreTet::_order
private

Definition at line 113 of file IntegrationGaussLegendreTet.h.

Referenced by getIntegrationOrder(), and setIntegrationOrder().


The documentation for this class was generated from the following file: