quad_rule, a C code which sets up a variety of quadrature rules, used to approximate the integral of a function over various domains.
The code returns the abscissas and weights for a variety of one dimensional quadrature rules for approximating the integral of a function. The best rule is generally Gauss-Legendre quadrature, but other rules offer special features, including the ability to handle certain weight functions, to approximate an integral on an infinite integration region, or to estimate the approximation error.
The computer code and data files described and made available on this web page are distributed under the MIT license
quad_rule is available in a C version and a C++ version and a Fortran90 version and a MATLAB version and an Octave version and a Python version.
alpert_rule, a C code which can set up an Alpert quadrature rule for functions which are regular, log(x) singular, or 1/sqrt(x) singular.
ccn_rule, a C code which defines one of a set of nested Clenshaw Curtis quadrature rules.
clenshaw_curtis_rule, a C code which defines a Clenshaw Curtis quadrature rule.
kronrod_rule, a C code which can compute a Gauss and Gauss-Kronrod pair of quadrature rules of arbitrary order, by Robert Piessens, Maria Branders.
laguerre_rule, a C code which can compute and print a Gauss-Laguerre quadrature rule for estimating the integral of a function with density exp(-x) over the interval [0,+oo).
legendre_rule, a C code which computes a 1D Gauss-Legendre quadrature rule.
legendre_rule_fast, a C code which uses a fast (order N) algorithm to compute a Gauss-Legendre quadrature rule of given order.
line_felippa_rule, a C code which returns the points and weights of a Felippa quadrature rule over the interior of a line segment in 1D.
line_nco_rule, a C code which computes a Newton Cotes Open (NCO) quadrature rule, using equally spaced points, over the interior of a line segment in 1D.
patterson_rule, a C code which returns the points and weights of a 1D Gauss-Patterson quadrature rule of order 1, 3, 7, 15, 31, 63, 127, 255 or 511.
power_rule, a C code which constructs a power rule, that is, a product quadrature rule from identical 1D factor rules.
product_rule, a C code which constructs a product quadrature rule from distinct 1D factor rules.
quadmom, a C code which computes a Gaussian quadrature rule for a weight function rho(x) based on the Golub-Welsch procedure that only requires knowledge of the moments of rho(x).
quadrature_rules, a dataset directory which contains sets of files that define quadrature rules over various 1D intervals or multidimensional hypercubes.
quadrature_rules_tet, a dataset directory which contains triples of files defining various quadrature rules on tetrahedrons.
quadrature_rules_tri, a dataset directory which contains quadrature rules to be applied to triangular regions.
sandia_rules, a C code which produces 1D quadrature rules of Chebyshev, Clenshaw Curtis, Fejer 2, Gegenbauer, generalized Hermite, generalized Laguerre, Hermite, Jacobi, Laguerre, Legendre and Patterson types.
sgmga, a C code which creates sparse grids based on a mixture of 1D quadrature rules, allowing anisotropic weights for each dimension.
sparse_grid_hw, a C code which creates sparse grids based on Gauss-Legendre, Gauss-Hermite, Gauss-Patterson, or a nested variation of Gauss-Hermite rules, by Florian Heiss and Viktor Winschel.
stroud, a C code which defines quadrature rules for a variety of unusual areas, surfaces and volumes in 2D, 3D and N-dimensions.
test_int, a C code which defines test integrands for 1D quadrature rules.