lebedev::QuadraturePoints class

Contains Lebedev quadrature points and has functions to evaluate numerical integrals on the unit sphere.

Public types

using scalar_function = std::function<double(double, double, double)>
scalar_function
using vec = std::vector<double>
vector of doubles
using vector_function = std::function<vec(const vec&, const vec&, const vec&)>
vector of doubles

Constructors, destructors, conversion operators

QuadraturePoints(QuadratureOrder quad_order)
Calculates set of quadrature points based on integration order.

Public functions

auto evaluate_spherical_integral(const scalar_function& integrand_at_point) const -> double
Calculates spherical integral given a function object.
auto evaluate_spherical_integral(const vector_function& integrand_at_points) const -> double
Calculates spherical integral given a function object.
auto get_weights() const -> const vec&
Returns const reference to vector of weights of quadrature points.
auto get_x() const -> const vec&
Returns const reference to vector of x-coordinates of quadrature points.
auto get_y() const -> const vec&
Returns const reference to vector of y-coordinates of quadrature points.
auto get_z() const -> const vec&
Returns const reference to vector of z-coordinates of quadrature points.

Function documentation

double lebedev::QuadraturePoints::evaluate_spherical_integral(const scalar_function& integrand_at_point) const

Calculates spherical integral given a function object.

The function object integrand_at_point takes three doubles x, y, z corresponding to the coordinates of the evaluation point. It should return a double corresponding to the integrand evaluated at that point.

double lebedev::QuadraturePoints::evaluate_spherical_integral(const vector_function& integrand_at_points) const

Calculates spherical integral given a function object.

The function object integrand_at_points takes three references to vectors x, y, z which contain the coordinates of all of the points at which the integrand will be evaluated. It should return a vector of doubles corresponding to the integrand evaluated at all of the quadrature points.