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 Types

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

Public Member Functions

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

Member Typedef Documentation

◆ WeightedPoint

Constructor & Destructor Documentation

◆ IntegrationGaussLegendrePrism()

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

Construct this object with the given integration order

Parameters
orderintegration order (default 2)

Definition at line 32 of file IntegrationGaussLegendrePrism.h.

33  {
34  this->setIntegrationOrder(order);
35  }
void setIntegrationOrder(unsigned)
Change the integration order.

References setIntegrationOrder().

Member Function Documentation

◆ getIntegrationOrder()

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

return current integration order.

Definition at line 45 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 48 of file IntegrationGaussLegendrePrism.h.

References _n_sampl_pt.

Referenced by setIntegrationOrder().

◆ getNumberOfPoints() [2/2]

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

get the number of integration points

Parameters
orderthe number of integration points
Returns
the number of points

Definition at line 87 of file IntegrationGaussLegendrePrism.h.

88  {
89  if (order == 2)
90  return 6;
91  return 0;
92  }

◆ getWeightedPoint() [1/3]

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

Definition at line 76 of file IntegrationGaussLegendrePrism.h.

77  {
78  return WeightedPoint(Method::X[igp], Method::W[igp]);
79  }
MathLib::TemplateWeightedPoint< double, double, 3 > WeightedPoint

◆ getWeightedPoint() [2/3]

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

Get coordinates of the integration point.

Parameters
igpThe integration point index
Returns
a weighted point

Definition at line 53 of file IntegrationGaussLegendrePrism.h.

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

References getIntegrationOrder().

◆ getWeightedPoint() [3/3]

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

Get coordinates of the integration point.

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

Definition at line 61 of file IntegrationGaussLegendrePrism.h.

62  {
63  (void)order;
64  const unsigned gp_r = igp % 3;
65  const auto gp_t = (unsigned)(igp / 3);
66  std::array<double, 3> rst;
67  rst[0] = MathLib::GaussLegendreTri<2>::X[gp_r][0];
68  rst[1] = MathLib::GaussLegendreTri<2>::X[gp_r][1];
69  rst[2] = MathLib::GaussLegendre<2>::X[gp_t];
70  double w = MathLib::GaussLegendreTri<2>::W[gp_r] * 0.5 *
72  return WeightedPoint(rst, w);
73  }

◆ setIntegrationOrder()

void NumLib::IntegrationGaussLegendrePrism::setIntegrationOrder ( unsigned  )
inline

Change the integration order.

Definition at line 38 of file IntegrationGaussLegendrePrism.h.

39  {
40  _order = 2; // fixed
42  }
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 96 of file IntegrationGaussLegendrePrism.h.

Referenced by getNumberOfPoints(), and setIntegrationOrder().

◆ _order

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

Definition at line 95 of file IntegrationGaussLegendrePrism.h.

Referenced by getIntegrationOrder(), and setIntegrationOrder().


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