OGS
NumLib::IntegrationGaussLegendrePrism Class Reference

Detailed Description

Gauss-Legendre quadrature rule for prisms.

Definition at line 22 of file IntegrationGaussLegendrePrism.h.

#include <IntegrationGaussLegendrePrism.h>

Public Member Functions

 IntegrationGaussLegendrePrism (unsigned const order)
 
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 {2}
 
unsigned _n_sampl_pt {0}
 

Constructor & Destructor Documentation

◆ IntegrationGaussLegendrePrism()

NumLib::IntegrationGaussLegendrePrism::IntegrationGaussLegendrePrism ( unsigned const order)
inlineexplicit

Construct this object with the given integration order

Parameters
orderintegration order (default 2)

Definition at line 30 of file IntegrationGaussLegendrePrism.h.

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

References setIntegrationOrder().

Member Function Documentation

◆ getIntegrationOrder()

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

return current integration order.

Definition at line 39 of file IntegrationGaussLegendrePrism.h.

References _order.

Referenced by getWeightedPoint().

◆ getNumberOfPoints() [1/2]

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

return the number of sampling points

Definition at line 42 of file IntegrationGaussLegendrePrism.h.

References _n_sampl_pt.

Referenced by setIntegrationOrder().

◆ getNumberOfPoints() [2/2]

unsigned NumLib::IntegrationGaussLegendrePrism::getNumberOfPoints ( unsigned const order)
static

get the number of integration points

Parameters
orderthe number of integration points
Returns
the number of points

Definition at line 80 of file IntegrationGaussLegendrePrism.cpp.

81{
82 // Note: These cases must correspod strictly to the logic in
83 // getWeightedPoint()!
84 switch (order)
85 {
86 case 1:
87 return getNumberOfPointsConcrete<1, 1>();
88 case 2:
89 return getNumberOfPointsConcrete<2, 2>();
90 case 3:
91 // The combination <4, 3> has been chosen to allow extrapolation
92 // from the set of integration points on Prism13 elements for the
93 // third integration order. <3, 3> would not be sufficient.
94 return getNumberOfPointsConcrete<4, 3>();
95 case 4:
96 return getNumberOfPointsConcrete<4, 4>();
97 default:
99 "Integration order {} not supported for integration on prisms.",
100 order);
101 }
102}
#define OGS_FATAL(...)
Definition Error.h:26

References OGS_FATAL.

◆ getWeightedPoint() [1/3]

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

Definition at line 59 of file IntegrationGaussLegendrePrism.h.

60 {
61 return MathLib::WeightedPoint(Method::X[igp], Method::W[igp]);
62 }

◆ getWeightedPoint() [2/3]

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

Get coordinates of the integration point.

Parameters
igpThe integration point index
Returns
a weighted point

Definition at line 47 of file IntegrationGaussLegendrePrism.h.

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

References getIntegrationOrder(), and getWeightedPoint().

Referenced by getWeightedPoint().

◆ getWeightedPoint() [3/3]

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

Get coordinates of the integration point.

Parameters
orderThe number of integration points
igpThe integration point index
Returns
a weighted point

Definition at line 55 of file IntegrationGaussLegendrePrism.cpp.

57{
58 // Note: These cases must correspod strictly to the logic in
59 // getNumberOfPoints()!
60 switch (order)
61 {
62 case 1:
63 return getWeightedPointConcrete<1, 1>(igp);
64 case 2:
65 return getWeightedPointConcrete<2, 2>(igp);
66 case 3:
67 // The combination <4, 3> has been chosen to allow extrapolation
68 // from the set of integration points on Prism13 elements for the
69 // third integration order. <3, 3> would not be sufficient.
70 return getWeightedPointConcrete<4, 3>(igp);
71 case 4:
72 return getWeightedPointConcrete<4, 4>(igp);
73 default:
75 "Integration order {} not supported for integration on prisms.",
76 order);
77 }
78}

References OGS_FATAL.

◆ setIntegrationOrder()

void NumLib::IntegrationGaussLegendrePrism::setIntegrationOrder ( unsigned const order)

Change the integration order.

Definition at line 49 of file IntegrationGaussLegendrePrism.cpp.

50{
51 _order = order;
53}
unsigned getNumberOfPoints() const
return the number of sampling points

References _n_sampl_pt, _order, and getNumberOfPoints().

Referenced by IntegrationGaussLegendrePrism().

Member Data Documentation

◆ _n_sampl_pt

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

Definition at line 74 of file IntegrationGaussLegendrePrism.h.

74{0};

Referenced by getNumberOfPoints(), and setIntegrationOrder().

◆ _order

unsigned NumLib::IntegrationGaussLegendrePrism::_order {2}
private

Definition at line 73 of file IntegrationGaussLegendrePrism.h.

73{2};

Referenced by getIntegrationOrder(), and setIntegrationOrder().


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