TEST_INT_2D
Quadrature Tests for 2D Finite Intervals


TEST_INT_2D is a FORTRAN90 program which evaluates test integrands.

The test integrands would normally be used to testing 2D quadrature software. It is possible to invoke a particular function by number, or to try out all available functions, as demonstrated in the sample calling program.

The current set of problems is:

  1. integral from 0 to 1 of f(x,y) = 1 / ( 1 - x * y );
  2. integral from -1 to 1 of f(x,y) = 1 / sqrt ( 1 - x * x * y * y );
  3. integral from -1 to 1 of f(x,y) = 1 / sqrt ( 2 - x - y );
  4. integral from -1 to 1 of f(x,y) = 1 / sqrt ( 3 - x - 2 * y );
  5. integral from 0 to 1 of f(x,y) = sqrt ( x * y );
  6. integral from -1 to 1 of f(x,y) = abs ( x * x + y * y - 1/4 );
  7. integral from 0 to 1 of f(x,y) = sqrt ( abs ( x - y ) );

The library includes not just the integrand, but also the interval of integration, and the exact value of the integral. Thus, for each integrand function, three subroutines are supplied. For instance, for function #5, we have the routines:

So once you have the calling sequences for these routines, you can easily evaluate the function, or integrate it between the appropriate limits, or compare your estimate of the integral to the exact value.

Moreover, since the same interface is used for each function, if you wish to work with problem 2 instead, you simply change the "05" to "02" in your routine calls.

If you wish to call all of the functions, then you simply use the generic interface, which again has three subroutines, but which requires you to specify the problem number as an extra input argument:

Licensing:

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

Related Data and Programs:

CLENSHAW_CURTIS is a FORTRAN90 library which can set up a Clenshaw Curtis quadrature grid in multiple dimensions.

NINTLIB is a FORTRAN90 library which estimates integrals in multiple dimensions.

QUADPACK is a FORTRAN90 library which estimates integrals of functions in one dimension.

QUADRULE is a FORTRAN90 library which defines various quadrature rules.

TANH_QUAD, a FORTRAN90 library which sets up the tanh and tanh-sinh quadrature rules;

TEST_INT is a FORTRAN90 library which defines some test integration problems over 1D finite intervals.

TEST_INT_2D is available in a C++ version and a FORTRAN90 version and a MATLAB version.

TEST_INT_HERMITE is a FORTRAN90 library which defines some test integration problems over infinite intervals.

TEST_INT_LAGUERRE is a FORTRAN90 library which defines test integrands for integration over [ALPHA,+Infinity).

Reference:

  1. Gwynne Evans,
    Practical Numerical Integration,
    Wiley, 1993,
    ISBN: 047193898X,
    LC: QA299.3E93.

Source Code:

Examples and Tests:

List of Routines:

You can go up one level to the FORTRAN90 source codes.


Last revised on 16 January 2009.