OGS
NumLib::IntegrationGaussLegendrePyramid Class Reference

Detailed Description

Gauss-Legendre quadrature rule for pyramid.

Definition at line 21 of file IntegrationGaussLegendrePyramid.h.

#include <IntegrationGaussLegendrePyramid.h>

Public Types

using WeightedPoint = MathLib::TemplateWeightedPoint< double, double, 3 >
 

Public Member Functions

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

Static Public Member Functions

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

Private Attributes

unsigned _order
 
unsigned _n_sampl_pt {0}
 

Member Typedef Documentation

◆ WeightedPoint

Constructor & Destructor Documentation

◆ IntegrationGaussLegendrePyramid()

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

Construct this object with the given integration order

Parameters
orderintegration order (default 2)

Definition at line 31 of file IntegrationGaussLegendrePyramid.h.

31  : _order(order)
32  {
33  this->setIntegrationOrder(order);
34  }
void setIntegrationOrder(unsigned 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 47 of file IntegrationGaussLegendrePyramid.h.

References _n_sampl_pt.

Referenced by setIntegrationOrder().

◆ getNumberOfPoints() [2/2]

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

get the number of integration points

Parameters
orderthe number of integration points
Returns
the number of points

Definition at line 93 of file IntegrationGaussLegendrePyramid.h.

94  {
95  switch (order)
96  {
97  case 1:
99  case 2:
101  case 3:
103  }
104  return 0;
105  }

◆ getWeightedPoint() [1/3]

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

Definition at line 82 of file IntegrationGaussLegendrePyramid.h.

83  {
84  return WeightedPoint(Method::X[igp], Method::W[igp]);
85  }
MathLib::TemplateWeightedPoint< double, double, 3 > WeightedPoint

◆ getWeightedPoint() [2/3]

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

get coordinates of a integration point

Parameters
igpThe integration point index
Returns
a weighted point

Definition at line 55 of file IntegrationGaussLegendrePyramid.h.

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

References getIntegrationOrder().

◆ getWeightedPoint() [3/3]

static WeightedPoint NumLib::IntegrationGaussLegendrePyramid::getWeightedPoint ( unsigned  order,
unsigned  igp 
)
inlinestatic

get coordinates of a integration point

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

Definition at line 67 of file IntegrationGaussLegendrePyramid.h.

68  {
69  switch (order)
70  {
71  case 1:
72  return getWeightedPoint<MathLib::GaussLegendrePyramid<1>>(igp);
73  case 2:
74  return getWeightedPoint<MathLib::GaussLegendrePyramid<2>>(igp);
75  case 3:
76  return getWeightedPoint<MathLib::GaussLegendrePyramid<3>>(igp);
77  }
78  return WeightedPoint(std::array<double, 3>(), 0);
79  }

◆ setIntegrationOrder()

void NumLib::IntegrationGaussLegendrePyramid::setIntegrationOrder ( unsigned  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 109 of file IntegrationGaussLegendrePyramid.h.

Referenced by getNumberOfPoints(), and setIntegrationOrder().

◆ _order

unsigned NumLib::IntegrationGaussLegendrePyramid::_order
private

Definition at line 108 of file IntegrationGaussLegendrePyramid.h.

Referenced by getIntegrationOrder(), and setIntegrationOrder().


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