Helper class for computing the abscissae and weights of the Gauss-Legendre quadrature rule referred to the [0,1]. The maximum number of abscissae/weights is prescribed by n_max. The abscissae / weights are precomputed with enough precision (34 significant digits) for double or quadruple precision applications.
More...
#include <quadrature.hpp>
|
static real | get_abscissa (const int n_points, const int pt_id) |
| Gets a Gauss-Legendre abscissa in the [0,1] domain.
|
|
static real | get_weight (const int n_points, const int pt_id) |
| Gets a Gauss-Legendre weight in the [0,1] domain.
|
|
|
static constexpr int | n_max = 100 |
| Maximum precomputed degree of Gauss-Legendre points.
|
|
|
static const std::array< real, n_entries > & | get_quad_data () |
| Gets a reference to a static array containing all the information of the quadrature.
|
|
Helper class for computing the abscissae and weights of the Gauss-Legendre quadrature rule referred to the [0,1]. The maximum number of abscissae/weights is prescribed by n_max. The abscissae / weights are precomputed with enough precision (34 significant digits) for double or quadruple precision applications.
◆ get_abscissa()
static real qugar::Gauss::get_abscissa |
( |
const int | n_points, |
|
|
const int | pt_id ) |
|
static |
Gets a Gauss-Legendre abscissa in the [0,1] domain.
- Parameters
-
n_points | Number of points of the 1D quadrature. It must be smaller or equal than n_max. |
pt_id | Id of the point whose abscissa is returned. The point must be in the range [0, n_points [. |
- Returns
- Abscissa of the point.
◆ get_quad_data()
static const std::array< real, n_entries > & qugar::Gauss::get_quad_data |
( |
| ) |
|
|
staticprivate |
Gets a reference to a static array containing all the information of the quadrature.
The array contains the abscissae and weights from 1 up to n_max points. The data is sorted in the following way: for a given number of points n
, from 1 to n_max, first the abcissae in ascending order (in [0,1]) are stored and then associated weights. Then, the abscissae for n+1
points and weights, etc.
- Returns
- Constant reference to static array containing all the data.
◆ get_weight()
static real qugar::Gauss::get_weight |
( |
const int | n_points, |
|
|
const int | pt_id ) |
|
static |
Gets a Gauss-Legendre weight in the [0,1] domain.
- Parameters
-
n_points | Number of points of the 1D quadrature. It must be smaller or equal than n_max. |
pt_id | Id of the point whose weight is returned. The point must be in the range [0, n_points [. |
- Returns
- Weight of the point.
◆ n_entries
Number of entries in data vectors.
◆ n_max
int qugar::Gauss::n_max = 100 |
|
staticconstexpr |
Maximum precomputed degree of Gauss-Legendre points.
The documentation for this class was generated from the following file: