avint Subroutine

public subroutine avint(ftab, xtab, ntab, a_in, b_in, result)


AVINT estimates the integral of unevenly spaced data.

Discussion:

The method uses overlapping parabolas and smoothing.

Modified:

30 October 2000
4 January 2008, A. Bodas-Salcedo. Error control for XTAB taken out of
                loop to allow vectorization.

Reference:

Philip Davis and Philip Rabinowitz,
Methods of Numerical Integration,
Blaisdell Publishing, 1967.

P E Hennion,
Algorithm 77,
Interpolation, Differentiation and Integration,
Communications of the Association for Computing Machinery,
Volume 5, page 96, 1962.

Parameters:

Input, real ( kind = 8 ) FTAB(NTAB), the function values,
FTAB(I) = F(XTAB(I)).

Input, real ( kind = 8 ) XTAB(NTAB), the abscissas at which the
function values are given.  The XTAB's must be distinct
and in ascending order.

Input, integer NTAB, the number of entries in FTAB and
XTAB.  NTAB must be at least 3.

Input, real ( kind = 8 ) A, the lower limit of integration.  A should
be, but need not be, near one endpoint of the interval
(X(1), X(NTAB)).

Input, real ( kind = 8 ) B, the upper limit of integration.  B should
be, but need not be, near one endpoint of the interval
(X(1), X(NTAB)).

Output, real ( kind = 8 ) RESULT, the approximate value of the integral.

##########################################################################

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in), dimension(ntab) :: ftab
real(kind=wp), intent(in), dimension(ntab) :: xtab
integer, intent(in) :: ntab
real(kind=wp), intent(in) :: a_in
real(kind=wp), intent(in) :: b_in
real(kind=wp), intent(out) :: result

Calls

proc~~avint~4~~CallsGraph proc~avint~4 avint proc~errormessage errorMessage proc~avint~4->proc~errormessage

Called by

proc~~avint~4~~CalledByGraph proc~avint~4 avint proc~path_integral~4 path_integral proc~path_integral~4->proc~avint~4

Contents