oomph::GaussLobattoLegendre< 3, NPTS_1D > Class Template Reference

3D Gauss Lobatto Legendre integration class More...

#include <integral.h>

+ Inheritance diagram for oomph::GaussLobattoLegendre< 3, NPTS_1D >:

Public Member Functions

 GaussLobattoLegendre ()
 Deafault constructor. Calculates and stores GLL nodes. More...
 
unsigned nweight () const
 Number of integration points of the scheme. More...
 
double knot (const unsigned &i, const unsigned &j) const
 Return coordinate s[j] (j=0) of integration point i. More...
 
double weight (const unsigned &i) const
 Return weight of integration point i. More...
 
- Public Member Functions inherited from oomph::Integral
 Integral ()
 Default constructor (empty) More...
 
 Integral (const Integral &dummy)=delete
 Broken copy constructor. More...
 
void operator= (const Integral &)=delete
 Broken assignment operator. More...
 
virtual ~Integral ()
 Virtual destructor (empty) More...
 
virtual Vector< doubleknot (const unsigned &i) const
 Return local coordinates of i-th intergration point. Broken virtual. More...
 

Private Attributes

double Knot [NPTS_1D *NPTS_1D *NPTS_1D][3]
 Array to hold weight and knot points. More...
 
double Weight [NPTS_1D *NPTS_1D *NPTS_1D]
 

Static Private Attributes

static const unsigned long int Npts = NPTS_1D * NPTS_1D * NPTS_1D
 Number of integration points in scheme. More...
 

Detailed Description

template<unsigned NPTS_1D>
class oomph::GaussLobattoLegendre< 3, NPTS_1D >

3D Gauss Lobatto Legendre integration class

Constructor & Destructor Documentation

◆ GaussLobattoLegendre()

template<unsigned NPTS_1D>
oomph::GaussLobattoLegendre< 3, NPTS_1D >::GaussLobattoLegendre

Deafault constructor. Calculates and stores GLL nodes.

Calculate positions and weights for the 3D Gauss Lobatto Legendre integration class

1452  {
1453  // Tempoarary storage for the 1D knots and weights
1454  Vector<double> s(NPTS_1D), w(NPTS_1D);
1455  // Call the function to populate the array
1456  Orthpoly::gll_nodes(NPTS_1D, s, w);
1457  for (unsigned k = 0; k < NPTS_1D; k++)
1458  {
1459  for (unsigned j = 0; j < NPTS_1D; j++)
1460  {
1461  for (unsigned i = 0; i < NPTS_1D; i++)
1462  {
1463  unsigned index = NPTS_1D * NPTS_1D * k + NPTS_1D * j + i;
1464  Knot[index][0] = s[i];
1465  Knot[index][1] = s[j];
1466  Knot[index][2] = s[k];
1467  Weight[index] = w[i] * w[j] * w[k];
1468  }
1469  }
1470  }
1471  }
int i
Definition: BiCGSTAB_step_by_step.cpp:9
RowVector3d w
Definition: Matrix_resize_int.cpp:3
double Knot[NPTS_1D *NPTS_1D *NPTS_1D][3]
Array to hold weight and knot points.
Definition: integral.h:1418
double Weight[NPTS_1D *NPTS_1D *NPTS_1D]
Definition: integral.h:1419
RealScalar s
Definition: level1_cplx_impl.h:130
char char char int int * k
Definition: level2_impl.h:374
void gll_nodes(const unsigned &Nnode, Vector< double > &x)
Calculates the Gauss Lobatto Legendre abscissas for degree p = NNode-1.
Definition: orthpoly.cc:33
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2

References oomph::Orthpoly::gll_nodes(), i, j, k, s, w, and ProblemParameters::Weight.

Member Function Documentation

◆ knot()

template<unsigned NPTS_1D>
double oomph::GaussLobattoLegendre< 3, NPTS_1D >::knot ( const unsigned i,
const unsigned j 
) const
inlinevirtual

Return coordinate s[j] (j=0) of integration point i.

Implements oomph::Integral.

1434  {
1435  return Knot[i][j];
1436  }

References i, and j.

◆ nweight()

template<unsigned NPTS_1D>
unsigned oomph::GaussLobattoLegendre< 3, NPTS_1D >::nweight ( ) const
inlinevirtual

Number of integration points of the scheme.

Implements oomph::Integral.

1428  {
1429  return Npts;
1430  }
static const unsigned long int Npts
Number of integration points in scheme.
Definition: integral.h:1415

◆ weight()

template<unsigned NPTS_1D>
double oomph::GaussLobattoLegendre< 3, NPTS_1D >::weight ( const unsigned i) const
inlinevirtual

Return weight of integration point i.

Implements oomph::Integral.

1440  {
1441  return Weight[i];
1442  }

References i, and ProblemParameters::Weight.

Member Data Documentation

◆ Knot

template<unsigned NPTS_1D>
double oomph::GaussLobattoLegendre< 3, NPTS_1D >::Knot[NPTS_1D *NPTS_1D *NPTS_1D][3]
private

Array to hold weight and knot points.

◆ Npts

template<unsigned NPTS_1D>
const unsigned long int oomph::GaussLobattoLegendre< 3, NPTS_1D >::Npts = NPTS_1D * NPTS_1D * NPTS_1D
staticprivate

Number of integration points in scheme.

◆ Weight

template<unsigned NPTS_1D>
double oomph::GaussLobattoLegendre< 3, NPTS_1D >::Weight[NPTS_1D *NPTS_1D *NPTS_1D]
private

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