QUADRULE
Quadrature Rules
QUADRULE
is a C library which
sets up a variety of
quadrature rules, used to approximate the integral of a function
over various domains.
QUADRULE 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 GaussLegendre 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.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Languages:
QUADRULE is available in
a C version and
a C++ version and
a FORTRAN77 version and
a FORTRAN90 version and
a MATLAB version and
a Python version.
Related Programs:
CCN_RULE,
a C program which
defines one of a set of nested Clenshaw Curtis quadrature rules.
CLENSHAW_CURTIS_RULE,
a C program which
defines a Clenshaw Curtis quadrature rule.
KRONROD,
a C library which
can compute a Gauss and GaussKronrod pair of quadrature rules
of arbitrary order,
by Robert Piessens, Maria Branders.
LAGUERRE_RULE,
a C program which
can compute and print a GaussLaguerre quadrature rule
for estimating the integral of a function with density exp(x)
over the interval [0,+oo).
LEGENDRE_RULE,
a C program which
computes a 1D GaussLegendre quadrature rule.
LEGENDRE_RULE_FAST,
a C program which
uses a fast (order N) algorithm to compute a GaussLegendre quadrature
rule of given order.
LINE_FELIPPA_RULE,
a C library 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 library 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 program which
returns the points and weights of a 1D GaussPatterson quadrature rule
of order 1, 3, 7, 15, 31, 63, 127, 255 or 511.
POWER_RULE,
a C program which
constructs a power rule, that is, a product quadrature rule
from identical 1D factor rules.
PRODUCT_RULE,
a C program which
constructs a product quadrature rule from distinct 1D factor rules.
QUADMOM,
a C library which
computes a Gaussian quadrature rule for a weight function rho(x)
based on the GolubWelsch 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 library 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 library which
creates sparse grids based on a mixture of 1D quadrature rules,
allowing anisotropic weights for each dimension.
SPARSE_GRID_HW,
a C library which
creates sparse grids based on GaussLegendre, GaussHermite,
GaussPatterson, or a nested variation of GaussHermite rules,
by Florian Heiss and Viktor Winschel.
STROUD,
a C library which
defines quadrature rules for a variety of unusual areas, surfaces and volumes in 2D,
3D and Ndimensions.
TEST_INT,
a C library which
defines test integrands for 1D quadrature rules.
Source Code:
Examples and Tests:
List of Routines:

CHEBYSHEV_SET sets abscissas and weights for Chebyshev quadrature.

CHEBYSHEV1_COMPUTE computes a GaussChebyshev type 1 quadrature rule.

CHEBYSHEV1_INTEGRAL evaluates a monomial Chebyshev type 1 integral.

CHEBYSHEV1_SET sets a Chebyshev Type 1 quadrature rule.

CHEBYSHEV2_COMPUTE computes a GaussChebyshev type 2 quadrature rule.

CHEBYSHEV2_INTEGRAL evaluates a monomial Chebyshev type 2 integral.

CHEBYSHEV2_SET sets a Chebyshev Type 2 quadrature rule.

CHEBYSHEV3_COMPUTE computes a GaussChebyshev type 3 quadrature rule.

CHEBYSHEV3_INTEGRAL evaluates a monomial Chebyshev type 3 integral.

CHEBYSHEV3_SET sets a Chebyshev Type 3 quadrature rule.

CLENSHAW_CURTIS_COMPUTE computes a Clenshaw Curtis quadrature rule.

CLENSHAW_CURTIS_SET sets a ClenshawCurtis quadrature rule.

FEJER1_COMPUTE computes a Fejer type 1 quadrature rule.

FEJER1_SET sets abscissas and weights for Fejer type 1 quadrature.

FEJER2_COMPUTE computes a Fejer type 2 quadrature rule.

FEJER2_SET sets abscissas and weights for Fejer type 2 quadrature.

GEGENBAUER_INTEGRAL: the integral of a monomial with Gegenbauer weight.

GEGENBAUER_SS_COMPUTE computes a GaussGegenbauer quadrature rule.

GEGENBAUER_SS_RECUR: value and derivative of a Gegenbauer polynomial.

GEGENBAUER_SS_ROOT improves an approximate root of a Gegenbauer polynomial.

GEN_HERMITE_DR_COMPUTE: generalized GaussHermite rule by Davis, Rabinowitz.

GEN_HERMITE_EK_COMPUTE: generalized GaussHermite by ElhayKautsky.

GEN_HERMITE_INTEGRAL evaluates a monomial generalized Hermite integral.

GEN_LAGUERRE_EK_COMPUTE: generalized GaussLaguerre quadrature rule.

GEN_LAGUERRE_INTEGRAL evaluates a monomial generalized Laguerre integral.

GEN_LAGUERRE_SS_COMPUTE computes a generalized GaussLaguerre quadrature rule.

GEN_LAGUERRE_SS_RECUR evaluates a generalized Laguerre polynomial.

GEN_LAGUERRE_SS_ROOT improves a root of a generalized Laguerre polynomial.

HERMITE_EK_COMPUTE computes a GaussHermite quadrature rule.

HERMITE_GK16_SET sets a Hermite GenzKeister 16 rule.

HERMITE_GK18_SET sets a Hermite GenzKeister 18 rule.

HERMITE_GK22_SET sets a Hermite GenzKeister 22 rule.

HERMITE_GK24_SET sets a Hermite GenzKeister 24 rule.

HERMITE_INTEGRAL evaluates a monomial Hermite integral.

HERMITE_PROBABILIST_SET: probabilist Hermite quadrature.

HERMITE_SET sets abscissas and weights for Hermite quadrature.

HERMITE_1_SET sets abscissas and weights for Hermite quadrature.

HERMITE_SS_COMPUTE computes a GaussHermite quadrature rule.

HERMITE_SS_RECUR finds the value and derivative of a Hermite polynomial.

HERMITE_SS_ROOT improves an approximate root of a Hermite polynomial.

I4_FACTORIAL2 computes the double factorial function N!!

I4_MIN returns the smaller of two I4's.

I4_POWER returns the value of I^J.

IMTQLX diagonalizes a symmetric tridiagonal matrix.

JACOBI_EK_COMPUTE: ElhayKautsky method for GaussJacobi quadrature rule.

JACOBI_INTEGRAL evaluates the integral of a monomial with Jacobi weight.

JACOBI_SS_COMPUTE computes a GaussJacobi quadrature rule.

JACOBI_SS_RECUR finds the value and derivative of a Jacobi polynomial.

JACOBI_SS_ROOT improves an approximate root of a Jacobi polynomial.

KRONROD_SET sets abscissas and weights for GaussKronrod quadrature.

LAGUERRE_EK_COMPUTE: Laguerre quadrature rule by the ElhayKautsky method.

LAGUERRE_INTEGRAL evaluates a monomial Laguerre integral.

LAGUERRE_SS_COMPUTE computes a GaussLaguerre quadrature rule.

LAGUERRE_SS_RECUR evaluates a Laguerre polynomial.

LAGUERRE_SS_ROOT improves a root of a Laguerre polynomial.

LAGUERRE_SET sets abscissas and weights for Laguerre quadrature.

LAGUERRE_1_SET sets abscissas and weights for Laguerre quadrature.

LAGUERRE_SUM carries out Laguerre quadrature over [A, +oo ).

LEGENDRE_DR_COMPUTE: GaussLegendre quadrature by DavisRabinowitz method.

LEGENDRE_EK_COMPUTE: Legendre quadrature rule by the ElhayKautsky method.

LEGENDRE_INTEGRAL evaluates a monomial Legendre integral.

LEGENDRE_RECUR finds the value and derivative of a Legendre polynomial.

LEGENDRE_SET sets abscissas and weights for GaussLegendre quadrature.

LOBATTO_COMPUTE computes a Lobatto quadrature rule.

LOBATTO_SET sets abscissas and weights for Lobatto quadrature.

NC_COMPUTE_WEIGHTS computes weights for a NewtonCotes quadrature rule.

NCC_COMPUTE computes a NewtonCotes Closed quadrature rule.

NCC_SET sets abscissas and weights for closed NewtonCotes quadrature.

NCO_COMPUTE computes a NewtonCotes Open quadrature rule.

NCO_SET sets abscissas and weights for open NewtonCotes quadrature.

NCOH_COMPUTE computes a NewtonCotes "open half" quadrature rule.

NCOH_SET sets abscissas and weights for NewtonCotes "open half" rules.

PATTERSON_SET sets abscissas and weights for GaussPatterson quadrature.

PSI_VALUES returns some values of the Psi or Digamma function.

R8_ABS returns the absolute value of an R8.

R8_EPSILON returns the R8 round off unit.

R8_FACTORIAL computes the factorial of N, also denoted "N!".

R8_FACTORIAL2 computes the double factorial function N!!

R8_GAMMA evaluates Gamma(X) for a real argument.

R8_HUGE returns a "huge" R8.

R8_HYPER_2F1 evaluates the hypergeometric function 2F1(A,B,C,X).

R8_MAX returns the maximum of two R8's.

R8_PSI evaluates the function Psi(X).

R8_SIGN returns the sign of an R8.

R8VEC_COPY copies an R8VEC.

R8VEC_DOT_PRODUCT computes the dot product of a pair of R8VEC's.

R8VEC_LINSPACE creates a vector of linearly spaced values.

R8VEC_PRINT prints an R8VEC.

R8VEC_REVERSE reverses the elements of an R8VEC.

RADAU_COMPUTE computes a Radau quadrature rule.

RADAU_SET sets abscissas and weights for Radau quadrature.

TIMESTAMP prints the current YMDHMS date as a time stamp.
You can go up one level to
the C source codes.
Last revised on 21 June 2015.