Base class for defining a quadrature set. More...
#include <quadrature_base.h>
Public Member Functions | |
| QuadratureBase ()=default | |
| QuadratureBase (const std::vector< T > abscissas) | |
| Construct a new Quadrature object. | |
| double | GetWeight (const unsigned int abscissa_index) const |
| Get the weight value corresponding to a given abscissa value. | |
| T | GetAbscissa (const unsigned int index) const |
| Get the abscissa corresponding to the index. | |
| double | Integrate (const std::vector< QuadraturePair > &quad_pairs) const |
| Integrate the function using the function value and its location on the quadrature grid. | |
| const std::vector< T > & | abscissas () const |
| Getter for the abscissas in the quadrature set. | |
| size_t | n_points () const |
| Get total number of abscissas. | |
Protected Member Functions | |
| void | CreateWeightMap () |
| Create the weight map. | |
| virtual double | ComputeWeight (const size_t k, const size_t n) |
| Compute the weight for the k-th abscissa for n total points. | |
Protected Attributes | |
| std::vector< T > | abscissas_ |
| Abscissa values. | |
| std::map< unsigned int, double > | weight_map_ |
| Map to store the weights of the quadrature set where the keys are the indices corresponding to abscissa values. | |
Base class for defining a quadrature set.
| T | Type of ordinates to be used |
Definition at line 31 of file quadrature_base.h.
|
default |
|
inline |
Construct a new Quadrature object.
| abscissas | Vector of abscissa values for the quadrature |
Definition at line 40 of file quadrature_base.h.
|
inline |
Getter for the abscissas in the quadrature set.
Definition at line 81 of file quadrature_base.h.
|
inlineprotectedvirtual |
Compute the weight for the k-th abscissa for n total points.
| k | Abscissa index |
| n | Total number of points |
Reimplemented in hummingbird::GaussChebyshev, hummingbird::GaussLegendre, and hummingbird::GaussLobattoLegendre.
Definition at line 117 of file quadrature_base.h.
|
inlineprotected |
Create the weight map.
Definition at line 102 of file quadrature_base.h.
|
inline |
Get the abscissa corresponding to the index.
| index | Abscissa index |
Definition at line 58 of file quadrature_base.h.
|
inline |
Get the weight value corresponding to a given abscissa value.
| abscissa_index | Abscissa index |
Definition at line 48 of file quadrature_base.h.
|
inline |
Integrate the function using the function value and its location on the quadrature grid.
| quad_pairs | QuadraturePair object |
Definition at line 67 of file quadrature_base.h.
|
inline |
|
protected |
Abscissa values.
Definition at line 92 of file quadrature_base.h.
|
protected |
Map to store the weights of the quadrature set where the keys are the indices corresponding to abscissa values.
Definition at line 96 of file quadrature_base.h.