OGS
NumLib::IntegrationGaussLegendrePyramid Class Reference

Detailed Description

Gauss-Legendre quadrature rule for pyramid.

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

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

References _order, and setIntegrationOrder().

Member Function Documentation

◆ getIntegrationOrder()

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

return current integration order.

Definition at line 37 of file IntegrationGaussLegendrePyramid.h.

37{ 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 39 of file IntegrationGaussLegendrePyramid.h.

References _n_sampl_pt.

Referenced by setIntegrationOrder().

◆ getNumberOfPoints() [2/2]

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 92 of file IntegrationGaussLegendrePyramid.h.

93 {
94 // For the case of order = 4, it
95 // causes `assertion `rank == num_nodes' failed`
96 // in the SVD decomposition in the least square extrapolation.
97 // Therefore for the case of order = 4, the rule of order 3 is used.
98 switch (order)
99 {
100 case 1:
102 case 2:
104 case 3:
106 case 4:
108 }
109 OGS_FATAL("Integration order {:d} not implemented for pyramids.",
110 order);
111 }
#define OGS_FATAL(...)
Definition Error.h:19
static MATHLIB_EXPORT const unsigned NPoints

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

◆ getWeightedPoint() [1/3]

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

Definition at line 81 of file IntegrationGaussLegendrePyramid.h.

82 {
83 return MathLib::WeightedPoint(Method::X[igp], Method::W[igp]);
84 }

◆ 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 46 of file IntegrationGaussLegendrePyramid.h.

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

References getIntegrationOrder(), and getWeightedPoint().

Referenced by getWeightedPoint(), and getWeightedPoint().

◆ getWeightedPoint() [3/3]

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 58 of file IntegrationGaussLegendrePyramid.h.

60 {
61 // For the case of order = 4, it
62 // causes `assertion `rank == num_nodes' failed`
63 // in the SVD decomposition in the least square extrapolation.
64 // Therefore for the case of order = 4, the rule of order 3 is used.
65 switch (order)
66 {
67 case 1:
69 case 2:
71 case 3:
73 case 4:
75 }
76 OGS_FATAL("Integration order {:d} not implemented for pyramids.",
77 order);
78 }

References getWeightedPoint(), and OGS_FATAL.

◆ setIntegrationOrder()

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

Change the integration order.

Definition at line 30 of file IntegrationGaussLegendrePyramid.h.

31 {
32 _order = order;
34 }
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 115 of file IntegrationGaussLegendrePyramid.h.

115{0};

Referenced by getNumberOfPoints(), and setIntegrationOrder().

◆ _order

unsigned NumLib::IntegrationGaussLegendrePyramid::_order
private

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