OISEAU
A modern DGTD framework
Loading...
Searching...
No Matches
integration.hpp File Reference

Integration rules for the reference interval and triangle. More...

#include <utility>
#include <xtensor/containers/xarray.hpp>
#include <xtensor/core/xtensor_forward.hpp>

Go to the source code of this file.

Functions

std::pair< xt::xarray< double >, xt::xarray< double > > oiseau::utils::integration::triangle_cubature (int order)
 Return a cubature rule for the triangle with vertices (-1, -1), (1, -1), and (-1, 1).
std::pair< xt::xarray< double >, xt::xarray< double > > oiseau::utils::integration::quadrature (int order)
 Return a Gauss-Legendre quadrature rule on [-1, 1].
std::pair< xt::xarray< double >, xt::xarray< double > > oiseau::utils::integration::jacobi_gq (unsigned n, double alpha, double beta)
 Return Gauss-Jacobi nodes and weights on [-1, 1].
xt::xarray< double > oiseau::utils::integration::jacobi_gl (unsigned n, double alpha, double beta)
 Return Gauss-Lobatto-Jacobi nodes on [-1, 1].

Detailed Description

Integration rules for the reference interval and triangle.

Function Documentation

◆ jacobi_gl()

xt::xarray< double > oiseau::utils::integration::jacobi_gl ( unsigned n,
double alpha,
double beta )

Return Gauss-Lobatto-Jacobi nodes on [-1, 1].

Parameters
nPolynomial order, at least 1.
alphaExponent of (1 - x) in the Jacobi weight, greater than -1.
betaExponent of (1 + x) in the Jacobi weight, greater than -1.
Returns
A one-dimensional array of n plus one node, including both endpoints.

◆ jacobi_gq()

std::pair< xt::xarray< double >, xt::xarray< double > > oiseau::utils::integration::jacobi_gq ( unsigned n,
double alpha,
double beta )

Return Gauss-Jacobi nodes and weights on [-1, 1].

Parameters
nPolynomial order. The rule contains n plus one node.
alphaExponent of (1 - x) in the Jacobi weight, greater than -1.
betaExponent of (1 + x) in the Jacobi weight, greater than -1.
Returns
One-dimensional arrays of nodes and their corresponding weights. For n equal to zero, the single weight is 2.

◆ quadrature()

std::pair< xt::xarray< double >, xt::xarray< double > > oiseau::utils::integration::quadrature ( int order)

Return a Gauss-Legendre quadrature rule on [-1, 1].

Parameters
orderRequested polynomial degree of exactness, greater than zero.
Returns
One-dimensional arrays of nodes and their corresponding weights.
Exceptions
std::out_of_rangeIf order is zero or negative.

◆ triangle_cubature()

std::pair< xt::xarray< double >, xt::xarray< double > > oiseau::utils::integration::triangle_cubature ( int order)

Return a cubature rule for the triangle with vertices (-1, -1), (1, -1), and (-1, 1).

Orders 1 through 28 use tabulated rules. Higher orders use a mapped Gauss-Jacobi rule.

Parameters
orderRequested total polynomial degree of exactness, greater than zero.
Returns
An N-by-2 array of (r, s) nodes and a length-N array of weights.
Exceptions
std::out_of_rangeIf order is zero or negative.