sphere_lebedev_rule, a C code which computes a Lebedev quadrature rule over the surface of the unit sphere in 3D.
Vyacheslav Lebedev determined a family of 65 quadrature rules for the unit sphere, increasing in precision from 3 to 131, by 2 each time. This software library computes any one of a subset of 32 of these rules.
Each rule is defined as a list of N values of theta, phi, and w. Here:
Of course, each pair of values (theta_{i}, phi_{i}) has a corresponding Cartesian representation:
x_{i} = cos ( theta_{i} ) * sin ( phi_{i} )which may be more useful when evaluating integrands.
y_{i} = sin ( theta_{i} ) * sin ( phi_{i} )
z_{i} = cos ( phi_{i} )
The integral of a function f(x,y,z) over the surface of the unit sphere can be approximated by
integral f(x,y,z) = 4 * pi * sum ( 1 <= i <= N ) f(x_{i},y_{i},z_{i})
The computer code and data files described and made available on this web page are distributed under the MIT license
sphere_lebedev_rule is available in a C version and a C++ version and a FORTRAN90 version and a MATLAB version.
ANNULUS_RULE, a C code which computes a quadrature rule for estimating integrals of a function over the interior of a circular annulus in 2D.
CIRCLE_RULE, a C code which computes quadrature rules over the circumference of a circle in 2D.
CUBE_FELIPPA_RULE, a C code which returns the points and weights of a Felippa quadrature rule over the interior of a cube in 3D.
PYRAMID_FELIPPA_RULE, a C code which returns Felippa's quadratures rules for approximating integrals over the interior of a pyramid in 3D.
SPHERE_EXACTNESS, a C code which tests the monomial exactness of a quadrature rule on the surface of the unit sphere in 3D.
SPHERE_GRID, a C code which provides a number of ways of generating grids of points, or of points and lines, or of points and lines and faces, over the surface of the unit sphere in 3D.
SPHERE_LEBEDEV_RULE, a dataset directory which contains quadrature rules over the surface of the unit sphere in 3D.
SPHERE_QUAD, a C code which approximates an integral by applying a triangulation over the surface of the unit sphere in 3D.
SQUARE_FELIPPA_RULE, a C code which returns the points and weights of a Felippa quadrature rule over the interior of a square in 2D.
TETRAHEDRON_FELIPPA_RULE, a C code which returns Felippa's quadratures rules for approximating integrals over the interior of a tetrahedron in 3D.
TRIANGLE_FEKETE_RULE, a C code which defines Fekete rules for interpolation or quadrature over the interior of a triangle in 2D.
TRIANGLE_FELIPPA_RULE, a C code which returns Felippa's quadratures rules for approximating integrals over the interior of a triangle in 2D.
WEDGE_FELIPPA_RULE, a C code which returns quadratures rules for approximating integrals over the interior of the unit wedge in 3D.