Class defines a Gauss-Legendre-Trapezoid rule on the unit sphere, where a Gauss-Legendre rule is used on the polar coordinate, and a trapezoid rule is used on the azimuthal. More...
#include <gauss_legendre_trapezoid.h>
Public Member Functions | |
| GaussLegendreTrapezoid (const size_t n_azim, const size_t n_polar, const bool polar_measured_from_x=false) | |
| Construct a new Gauss Legendre Trapezoid object. | |
| Public Member Functions inherited from hummingbird::QuadratureBase< Ordinate > | |
| QuadratureBase ()=default | |
| double | GetWeight (const unsigned int abscissa_index) const |
| Get the weight value corresponding to a given abscissa value. | |
| Ordinate | 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< Ordinate > & | abscissas () const |
| Getter for the abscissas in the quadrature set. | |
| size_t | n_points () const |
| Get total number of abscissas. | |
Additional Inherited Members | |
| Protected Member Functions inherited from hummingbird::QuadratureBase< Ordinate > | |
| 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 inherited from hummingbird::QuadratureBase< Ordinate > | |
| std::vector< Ordinate > | 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. | |
Class defines a Gauss-Legendre-Trapezoid rule on the unit sphere, where a Gauss-Legendre rule is used on the polar coordinate, and a trapezoid rule is used on the azimuthal.
Definition at line 18 of file gauss_legendre_trapezoid.h.
| hummingbird::GaussLegendreTrapezoid::GaussLegendreTrapezoid | ( | const size_t | n_azim, |
| const size_t | n_polar, | ||
| const bool | polar_measured_from_x = false ) |
Construct a new Gauss Legendre Trapezoid object.
| n_azim | Number of azimuthal quadrature points |
| n_polar | Number of polar quadrature points |
| polar_measured_from_x | If true, each ordinate is built so its polar Gauss-Legendre root ends up in Ordinate::x() (via Ordinate(acos(root), pi/2)) instead of Ordinate::z(). Used for 1D problems along x, where x() (not z()) is the streaming/BC direction cosine every consumer (Segment, ParsedVolumetricSource, CGProblem) reads; azim is otherwise degenerate for n_azim=1, since sin(polar) is the same for a Gauss-Legendre root and its negative. Defaults to false (the standard sphere convention, needed for future 2D/3D use). |
Definition at line 5 of file gauss_legendre_trapezoid.cc.