Class for storing dim-dimensional quadratures (non-tensor product).
More...
#include <quadrature.hpp>
|
| Quadrature ()=delete |
| Default constructor.
|
|
| Quadrature (const std::vector< Pt > &points, const std::vector< real > &weights) |
| Constructor.
|
|
void | scale_weights (const real ratio) |
| Scales the weights multiplying them by the given ratio .
|
|
const std::vector< Pt > & | points () const |
| Returns the vector of points.
|
|
const std::vector< real > & | weights () const |
| Returns the vector of weights.
|
|
std::vector< Pt > & | points () |
| Returns the vector of points.
|
|
std::vector< real > & | weights () |
| Returns the vector of weights.
|
|
std::size_t | get_num_points () const |
| Returns the number of points (and weights).
|
|
|
static std::shared_ptr< Quadrature > | create_Gauss_01 (int n_points) |
| Creates a new quadrature class instance with a Gauss-Legendre quadrature in [0, 1].
|
|
static std::shared_ptr< Quadrature > | create_Gauss_01 (const std::array< int, dim > n_points) |
| Creates a new quadrature class instance with a Gauss-Legendre quadrature in [0, 1].
|
|
static std::shared_ptr< Quadrature > | create_Gauss (const std::array< int, dim > n_points, const Domain &domain) |
| Creates a new quadrature class instance with a Gauss-Legendre quadrature in the domain box .
|
|
static std::shared_ptr< Quadrature > | create_tanh_sinh_01 (int n_points) |
| Creates a new quadrature class instance with a tanh-sinh quadrature in [0, 1].
|
|
static std::shared_ptr< Quadrature > | create_tanh_sinh_01 (const std::array< int, dim > n_points) |
| Creates a new quadrature class instance with a tanh-sinh quadrature in [0, 1].
|
|
static std::shared_ptr< Quadrature > | create_tanh_sinh (const std::array< int, dim > n_points, const Domain &domain) |
| Creates a new quadrature class instance with a tanh-sinh quadrature in the domain box .
|
|
|
template<typename QuadType > |
static std::shared_ptr< Quadrature< dim > > | create_tp_quadrature (const std::array< int, dim > n_points, const Domain &domain) |
| Creates a tensor-product quadrature.
|
|
template<int dim>
class qugar::Quadrature< dim >
Class for storing dim-dimensional quadratures (non-tensor product).
◆ Domain
◆ Pt
◆ Quadrature() [1/2]
Default constructor.
- Warning
- Not allowed to be used.
◆ Quadrature() [2/2]
Constructor.
- Parameters
-
points | Vector of points referred to [0, 1]. |
weights | Vector of weights referred to [0, 1]. |
- Note
points
and weight
must have the same length.
◆ create_Gauss()
Creates a new quadrature class instance with a Gauss-Legendre quadrature in the domain box
.
- Parameters
-
n_points | Number of points of the quadrature rule in each parametric direction. |
domain | Domain in which the quadrature is created. |
- Returns
- Gauss-Legendre quadrature rule wrapped in a shared pointer.
◆ create_Gauss_01() [1/2]
Creates a new quadrature class instance with a Gauss-Legendre quadrature in [0, 1].
- Parameters
-
n_points | Number of points of the quadrature rule in each parametric direction. |
- Returns
- Gauss-Legendre quadrature rule wrapped in a shared pointer.
◆ create_Gauss_01() [2/2]
Creates a new quadrature class instance with a Gauss-Legendre quadrature in [0, 1].
- Parameters
-
n_points | Number of points of the quadrature rule along all the parametric directions. |
- Returns
- Gauss-Legendre quadrature rule wrapped in a shared pointer.
◆ create_tanh_sinh()
Creates a new quadrature class instance with a tanh-sinh quadrature in the domain box
.
- Parameters
-
n_points | Number of points of the quadrature rule in each parametric direction. |
domain | Domain in which the quadrature is created. |
- Returns
- Tanh-sinh quadrature rule wrapped in a shared pointer.
◆ create_tanh_sinh_01() [1/2]
Creates a new quadrature class instance with a tanh-sinh quadrature in [0, 1].
- Parameters
-
n_points | Number of points of the quadrature rule in each parametric direction. |
- Returns
- Tanh-sinh quadrature rule wrapped in a shared pointer.
◆ create_tanh_sinh_01() [2/2]
Creates a new quadrature class instance with a tanh-sinh quadrature in [0, 1].
- Parameters
-
n_points | Number of points of the quadrature rule along all the parametric directions. |
- Returns
- Tanh-sinh quadrature rule wrapped in a shared pointer.
◆ create_tp_quadrature()
template<int dim>
template<typename QuadType >
Creates a tensor-product quadrature.
- Template Parameters
-
QuadType | Type of 1D quadrature to use. |
- Parameters
-
n_points | Number of points of the quadrature rule in each parametric direction. |
domain | Domain in which the quadrature is created. |
- Returns
- Computed quadrature wrapped in a shared pointer.
◆ get_num_points()
Returns the number of points (and weights).
- Returns
- Number of points.
◆ points() [1/2]
Returns the vector of points.
- Returns
- Non-constant reference to the vector of points.
◆ points() [2/2]
Returns the vector of points.
- Returns
- Constant reference to the vector of points.
◆ scale_weights()
Scales the weights multiplying them by the given ratio
.
- Parameters
-
ratio | Ratio respect to which the weights are scaled. |
◆ weights() [1/2]
Returns the vector of weights.
- Returns
- Non-constant reference to the vector of weights.
◆ weights() [2/2]
Returns the vector of weights.
- Returns
- Constant reference to the vector of weights.
◆ points_
◆ weights_
The documentation for this class was generated from the following file: