OGS
NumLib::IntegrationGaussLegendrePyramid Class Reference

Detailed Description

Gauss-Legendre quadrature rule for pyramid.

Definition at line 22 of file IntegrationGaussLegendrePyramid.h.

#include <IntegrationGaussLegendrePyramid.h>

Public Member Functions

 IntegrationGaussLegendrePyramid (unsigned const order=2)
 
void setIntegrationOrder (unsigned const 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 const order)
 

Private Attributes

unsigned _order
 
unsigned _n_sampl_pt {0}
 

Constructor & Destructor Documentation

◆ IntegrationGaussLegendrePyramid()

NumLib::IntegrationGaussLegendrePyramid::IntegrationGaussLegendrePyramid ( unsigned const order = 2)
inlineexplicit

Construct this object with the given integration order

Parameters
orderintegration order (default 2)

Definition at line 30 of file IntegrationGaussLegendrePyramid.h.

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

References setIntegrationOrder().

Member Function Documentation

◆ getIntegrationOrder()

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

return current integration order.

Definition at line 44 of file IntegrationGaussLegendrePyramid.h.

44{ return _order; }

References _order.

Referenced by getWeightedPoint().

◆ getNumberOfPoints() [1/2]

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

return the number of sampling points

Definition at line 46 of file IntegrationGaussLegendrePyramid.h.

References _n_sampl_pt.

Referenced by setIntegrationOrder().

◆ getNumberOfPoints() [2/2]

static unsigned NumLib::IntegrationGaussLegendrePyramid::getNumberOfPoints ( unsigned const order)
inlinestatic

get the number of integration points

Parameters
orderthe number of integration points
Returns
the number of points

Definition at line 99 of file IntegrationGaussLegendrePyramid.h.

100 {
101 // For the case of order = 4, it
102 // causes `assertion `rank == num_nodes' failed`
103 // in the SVD decomposition in the least square extrapolation.
104 // Therefore for the case of order = 4, the rule of order 3 is used.
105 switch (order)
106 {
107 case 1:
109 case 2:
111 case 3:
113 case 4:
115 }
116 OGS_FATAL("Integration order {:d} not implemented for pyramids.",
117 order);
118 }
#define OGS_FATAL(...)
Definition Error.h:26

References OGS_FATAL.

◆ getWeightedPoint() [1/3]

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

Definition at line 88 of file IntegrationGaussLegendrePyramid.h.

89 {
90 return MathLib::WeightedPoint(Method::X[igp], Method::W[igp]);
91 }

◆ getWeightedPoint() [2/3]

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

get coordinates of a integration point

Parameters
igpThe integration point index
Returns
a weighted point

Definition at line 53 of file IntegrationGaussLegendrePyramid.h.

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

References getIntegrationOrder(), and getWeightedPoint().

Referenced by getWeightedPoint().

◆ getWeightedPoint() [3/3]

static MathLib::WeightedPoint NumLib::IntegrationGaussLegendrePyramid::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 65 of file IntegrationGaussLegendrePyramid.h.

67 {
68 // For the case of order = 4, it
69 // causes `assertion `rank == num_nodes' failed`
70 // in the SVD decomposition in the least square extrapolation.
71 // Therefore for the case of order = 4, the rule of order 3 is used.
72 switch (order)
73 {
74 case 1:
75 return getWeightedPoint<MathLib::GaussLegendrePyramid<1>>(igp);
76 case 2:
77 return getWeightedPoint<MathLib::GaussLegendrePyramid<2>>(igp);
78 case 3:
79 return getWeightedPoint<MathLib::GaussLegendrePyramid<3>>(igp);
80 case 4:
81 return getWeightedPoint<MathLib::GaussLegendrePyramid<3>>(igp);
82 }
83 OGS_FATAL("Integration order {:d} not implemented for pyramids.",
84 order);
85 }

References OGS_FATAL.

◆ setIntegrationOrder()

void NumLib::IntegrationGaussLegendrePyramid::setIntegrationOrder ( unsigned const order)
inline

Change the integration order.

Definition at line 37 of file IntegrationGaussLegendrePyramid.h.

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

References _n_sampl_pt, _order, and getNumberOfPoints().

Referenced by IntegrationGaussLegendrePyramid().

Member Data Documentation

◆ _n_sampl_pt

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

Definition at line 122 of file IntegrationGaussLegendrePyramid.h.

122{0};

Referenced by getNumberOfPoints(), and setIntegrationOrder().

◆ _order

unsigned NumLib::IntegrationGaussLegendrePyramid::_order
private

Definition at line 121 of file IntegrationGaussLegendrePyramid.h.

Referenced by getIntegrationOrder(), and setIntegrationOrder().


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