ALPERT_RULE
Alpert Quadrature for regular, log singular, and power singular functions
ALPERT_RULE
is a C++ library which
has tabulated values that define Alpert quadrature rules of a number
of orders of accuracy for functions that are regular, log singular,
or power singular.
The rules defined here assume that the integral is to be taken over the
interval [0,1]. The interval is divided into N+1 intervals. The leftmost
and rightmost intervals are handled in a special way, depending on whether
a particular kind of singularity is expected.
A singularity may exist at the left endpoint, x = 0. The cases are:
-
regular, no singularity;
-
power, the integrand has the form g(x)=x^(-1/2)*phi(x)+psi(x);
-
log, the integrand has the form g(x)=phi(x)*log(x)+psi(x);
In case one, the regular Alpert rule is used in both end intervals.
In case two, the power singular Alpert rule is used in the leftmost interval.
In case three, the log singular Alpert rule is used in the leftmost interval.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Languages:
ALPERT_RULE is available in
a C version and
a C++ version and
a FORTRAN90 version and
a MATLAB version and
a Python version.
Related Data and Programs:
LINE_FEKETE_RULE,
a C++ library which
returns the points and weights of a Fekete quadrature rule
over the interior of a line segment in 1D.
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_NCC_RULE,
a C++ library which
computes a Newton Cotes Closed (NCC) quadrature rule for the line,
that is, for an interval of the form [A,B], using equally spaced points
which include the endpoints.
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.
QUADRATURE_WEIGHTS_VANDERMONDE,
a C++ library which
computes the weights of a quadrature rule using the Vandermonde
matrix, assuming that the points have been specified.
Reference:
-
Bradley Alpert,
Hybrid Gauss-Trapezoidal Quadrature Rules,
SIAM Journal on Scientific Computing,
Volume 20, Number 5, pages 1551-1584, 1999.
Source Code:
Examples and Tests:
List of Routines:
-
A_LOG returns the value of A for an Alpert rule for log singular functions.
-
A_POWER returns A for an Alpert rule for power singular functions.
-
A_REGULAR returns the value of A for an Alpert rule for regular functions.
-
INTEGRAL_LOG evaluates the test integral with logarithmic singularity.
-
INTEGRAL_POWER evaluates the test integral with power singularity.
-
INTEGRAL_REGULAR evaluates the regular test integral.
-
INTEGRAND_LOG evaluates the test integrand with logarithmic singularity.
-
INTEGRAND_POWER evaluates the test integrand with power singularity.
-
INTEGRAND_REGULAR evaluates the regular test integrand.
-
J_LOG returns the value of J for an Alpert rule for log singular functions.
-
J_POWER returns J for an Alpert rule for power singular functions.
-
J_REGULAR returns the value of J for an Alpert rule for regular functions.
-
NUM_LOG returns the number of Alpert rules for log singular functions.
-
NUM_POWER returns the number of Alpert rules for power singular functions.
-
NUM_REGULAR returns the number of Alpert rules for regular functions.
-
ORDER_LOG returns the order of an Alpert rule for log singular functions.
-
ORDER_POWER returns the order of an Alpert rule for power singular functions.
-
ORDER_REGULAR returns the order of an Alpert rule for regular functions.
-
R8VEC_LINSPACE creates a vector of linearly spaced values.
-
R8VEC_UNIFORM_01 returns a unit pseudorandom R8VEC.
-
RULE_LOG returns an Alpert rule for log singular functions.
-
RULE_POWER returns an Alpert rule for power singular functions.
-
RULE_REGULAR returns an Alpert rule for regular functions.
-
TIMESTAMP prints the current YMDHMS date as a time stamp.
You can go up one level to
the C++ source codes.
Last revised on 04 December 2015.