alpert_rule
alpert_rule,
a C code 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 information on this web page is distributed under the MIT license.
Languages:
alpert_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.
Related Data and Programs:
alpert_rule_test
c_rule,
a C code which
computes a quadrature rule which
estimates the integral of a function f(x), which might be defined over
a one dimensional region (a line) or more complex shapes such as
a circle, a triangle, a quadrilateral, a polygon, or a higher dimensional
region, and which might include an associated weight function w(x).
quadrature_weights_vandermonde,
a C code 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:
-
alpert_rule.h, the include file.
-
a_log.c,
returns the value of A for an Alpert rule for log singular functions.
-
a_power.c,
returns A for an Alpert rule for power singular functions.
-
a_regular.c,
returns the value of A for an Alpert rule for regular functions.
-
integral_log.c,
evaluates the test integral with logarithmic singularity.
-
integral_power.c,
evaluates the test integral with power singularity.
-
integral_regular.c,
evaluates the regular test integral.
-
integrand_log.c,
evaluates the test integrand with logarithmic singularity.
-
integrand_power.c,
evaluates the test integrand with power singularity.
-
integrand_regular.c,
evaluates the regular test integrand.
-
j_log.c,
returns the value of J for an Alpert rule for log singular functions.
-
j_power.c,
returns J for an Alpert rule for power singular functions.
-
j_regular.c,
returns the value of J for an Alpert rule for regular functions.
-
num_log.c,
returns the number of Alpert rules for log singular functions.
-
num_power.c,
returns the number of Alpert rules for power singular functions.
-
num_regular.c,
returns the number of Alpert rules for regular functions.
-
order_log.c,
returns the order of an Alpert rule for log singular functions.
-
order_power.c,
returns the order of an Alpert rule for power singular functions.
-
order_regular.c,
returns the order of an Alpert rule for regular functions.
-
r8vec_copy.c,
copies an R8VEC.
-
r8vec_dot_product.c,
computes the dot product of two R8VECs.
-
r8vec_linspace_new.c,
creates a vector of linearly spaced values.
-
r8vec_sum.c,
sums an R8VEC.
-
r8vec_uniform_01_new.c,
returns a unit pseudorandom R8VEC.
-
rule_log.c,
returns an Alpert rule for log singular functions.
-
rule_power.c,
returns an Alpert rule for power singular functions.
-
rule_regular.c,
returns an Alpert rule for regular functions.
Last revised on 23 October 2018.