OGS
NumLib::IntegrationGaussLegendreTet Class Reference

Detailed Description

Gauss-Legendre quadrature rule for tetrahedrals.

Definition at line 15 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 23 of file IntegrationGaussLegendreTet.h.

23 : _order(order)
24 {
25 this->setIntegrationOrder(order);
26 }
void setIntegrationOrder(unsigned order)
Change the integration order.

References _order, and setIntegrationOrder().

Member Function Documentation

◆ getIntegrationOrder()

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

return current integration order.

Definition at line 36 of file IntegrationGaussLegendreTet.h.

36{ 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 39 of file IntegrationGaussLegendreTet.h.

References _n_sampl_pt.

Referenced by setIntegrationOrder().

◆ getNumberOfPoints() [2/2]

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 88 of file IntegrationGaussLegendreTet.h.

89 {
90 switch (order)
91 {
92 case 1:
94 case 2:
96 case 3:
98 case 4:
100 }
101 OGS_FATAL("Integration order {:d} not implemented for tetrahedrals.",
102 order);
103 }
#define OGS_FATAL(...)
Definition Error.h:19
static MATHLIB_EXPORT const unsigned NPoints

References MathLib::GaussLegendreTet< ORDER >::NPoints, and OGS_FATAL.

◆ getWeightedPoint() [1/3]

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

Definition at line 77 of file IntegrationGaussLegendreTet.h.

78 {
79 return MathLib::WeightedPoint(Method::X[igp], Method::W[igp]);
80 }

◆ 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 47 of file IntegrationGaussLegendreTet.h.

48 {
50 }
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]

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 59 of file IntegrationGaussLegendreTet.h.

60 {
61 switch (order)
62 {
63 case 1:
65 case 2:
67 case 3:
69 case 4:
71 }
72 OGS_FATAL("Integration order {:d} not implemented for tetrahedrals.",
73 order);
74 }

References getWeightedPoint(), and OGS_FATAL.

◆ setIntegrationOrder()

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

Change the integration order.

Definition at line 29 of file IntegrationGaussLegendreTet.h.

30 {
31 _order = order;
33 }
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 107 of file IntegrationGaussLegendreTet.h.

107{0};

Referenced by getNumberOfPoints(), and setIntegrationOrder().

◆ _order

unsigned NumLib::IntegrationGaussLegendreTet::_order
private

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