Defines a Gauss-Legendre quadrature set on the interval [-1,1]. More...
#include <gauss_legendre.h>
Public Member Functions | |
| GaussLegendre (const unsigned int n_points) | |
| Construct a new GaussLegendre object. | |
| Public Member Functions inherited from hummingbird::QuadratureBase< double > | |
| QuadratureBase ()=default | |
| double | GetWeight (const unsigned int abscissa_index) const |
| Get the weight value corresponding to a given abscissa value. | |
| double | 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< double > & | abscissas () const |
| Getter for the abscissas in the quadrature set. | |
| size_t | n_points () const |
| Get total number of abscissas. | |
Private Member Functions | |
| double | ComputeWeight (const size_t k, const size_t n) override |
| Compute the weight for abscissa value k for a n-th order Gauss-Legendre polynomial. | |
Additional Inherited Members | |
| Protected Member Functions inherited from hummingbird::QuadratureBase< double > | |
| void | CreateWeightMap () |
| Create the weight map. | |
| Protected Attributes inherited from hummingbird::QuadratureBase< double > | |
| std::vector< double > | 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. | |
Defines a Gauss-Legendre quadrature set on the interval [-1,1].
Definition at line 14 of file gauss_legendre.h.
| hummingbird::GaussLegendre::GaussLegendre | ( | const unsigned int | n_points | ) |
Construct a new GaussLegendre object.
| n_points | Number of quadrature points to be created |
Definition at line 6 of file gauss_legendre.cc.
|
overrideprivatevirtual |
Compute the weight for abscissa value k for a n-th order Gauss-Legendre polynomial.
| k | Abscissa number |
| n | Order of Gauss-Legendre polynomial |
Reimplemented from hummingbird::QuadratureBase< double >.
Definition at line 11 of file gauss_legendre.cc.