INTEGRAL_TEST
Tests for Equal-Weight Quadrature Rules
INTEGRAL_TEST
is a FORTRAN90 program which
tests the suitability of a set of N points for quadrature
in an M-dimensional hypercube.
INTEGRAL_TEST can handle both unweighted and weighted
integration schemes.
The point sets we are interested in have been generated by a
variety of algorithms, and are stored as datasets, of
spatial dimension M = 2, 7 and 16, and point set sizes N = 10, 100,
1,000 and 10,000. The point set types include:
-
Centroidal Voronoi Tessellation values,
-
Faure quasirandom values,
-
Halton quasirandom values,
-
Hammersley quasirandom values,
-
Improved Distributed Hypercube Sampling (IHS) values,
-
Latin Center Square values,
-
Latin Edge Square values,
-
Latin Random Square values,
-
Niederreiter quasirandom values (base 2),
-
Sobol quasirandom values,
-
uniform random values.
The test integrals are selected from the set in
TEST_NINT.
Each integral is to be approximated simply by averaging
the integrand values at each point in the dataset, and
multiplying by the volume of the integration region.
(In a few cases, where the integral is not over the
unit hypercube, the dataset points are suitably adjusted).
The relative error in the computed integral is determined for
each of the selected problems. (Certain integrals with a
base point that can be varied are computed 100 times, with
randomly varying basepoint). The results for
each problem, expressed as a percentage, are averaged, to produce
a single "score" for the given set of points.
Here is a table of the datasets, spatial dimensions, and number of
points used versus the averaged integration scores:
Set | Dimension | Points |
Unweighted | Weight A | Weight D |
CVT | 2 | 10 | 6.527 | 7.327 | 7.217 |
CVT | 2 | 100 | 1.512 | 1.082 | 0.879 |
CVT | 2 | 1000 | 0.797 | 0.471 | 0.079 |
CVT | 7 | 10 | 156.461 | 156.700 | 156.565 |
CVT | 7 | 100 | 24.674 | 24.679 | 24.541 |
CVT | 7 | 1000 | 20.996 | 21.432 | 21.309 |
CVT | 16 | 10 | 1160750 | 1160760 | 1160750 |
CVT | 16 | 100 | 76.241 | 76.214 | 76.229 |
CVT | 16 | 1000 | 48.725 | 48.772 | 48.721 |
Halton | 2 | 10 | 19.023 | 6.526 | 6.284 |
Halton | 2 | 100 | 1.599 | 1.063 | 0.888 |
Halton | 2 | 1000 | 0.169 | 0.508 | 0.043 |
Uniform | 2 | 10 | 19.849 | 8.085 | 8.325 |
Uniform | 2 | 100 | 2.869 | 1.487 | 1.314 |
Uniform | 2 | 1000 | 1.140 | 0.455 | 0.087 |
Uniform | 7 | 10 | 32.924 | 21.208 | 21.044 |
Uniform | 7 | 100 | 12.117 | 22.773 | 22.216 |
Uniform | 7 | 1000 | 3.101 | 8.172 | 8.672 |
Uniform | 16 | 10 | 31.020 | 26.886 | 26.862 |
Uniform | 16 | 100 | 14.839 | 33.115 | 32.332 |
Uniform | 16 | 1000 | 7.973 | 24.000 | 26.003 |
An Important Quote:
"When good results are obtained in integrating a high-dimensional
function, we should conclude first of all that an especially tractable
integrand was tried and not that a generally successful method has
been found. A secondary conclusion is that we might have made a
very good choice in selecting an integration method to exploit whatever
features of f made it tractable."
Art Owen,
Latin Supercube Sampling for Very High Dimensional Simulation,
ACM Transactions on Modeling and Computer Simulations,
Volume 8, Number 1, January 1998, pages 71-102.
Usage:
-
integral_test input_file
-
for unweighted integration.
-
integral_test input_file weight_file
-
for integration with a weight file.
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:
NINT_EXACTNESS,
a FORTRAN90 program which
demonstrates how to measure the
polynomial exactness of a multidimensional quadrature rule.
PRODUCT_RULE,
a FORTRAN90 program which
constructs a product rule
from identical 1D factor rules.
QUADRATURE_RULES,
a dataset directory which
contains sets of files that define quadrature
rules over various 1D intervals or multidimensional hypercubes.
TESTPACK,
a FORTRAN90 library which
defines a set of integrands used to test multidimensional quadrature.
VORONOI_WEIGHT,
a FORTRAN90 program which
is given an arbitrary set of points and
determines a suitable set of quadrature weights to associate with
them, using Voronoi techniques.
Reference:
-
Paul Bratley, Bennett Fox, Harald Niederreiter,
Implementation and Tests of Low-Discrepancy Sequences,
ACM Transactions on Modeling and Computer Simulation,
Volume 2, Number 3, pages 195-213, 1992.
-
Paul Bratley, Bennett Fox, Harald Niederreiter,
Algorithm 738:
Programs to Generate Niederreiter's Low-Discrepancy Sequences,
ACM Transactions on Mathematical Software,
Volume 20, Number 4, pages 494-495, 1994.
-
Bennett Fox,
Algorithm 647:
Implementation and Relative Efficiency of Quasirandom
Sequence Generators,
ACM Transactions on Mathematical Software,
Volume 12, Number 4, pages 362-376, 1986.
Source Code:
Examples and Tests:
Results for
cvt_02_00010.txt, with various weights:
-
cvt_02_00010.out,
no weighting
-
cvt_02_00010_weight_a.txt,
weight set A.
-
cvt_02_00010_a.out,
results for weight set A.
-
cvt_02_00010_weight_b.txt,
weight set B.
-
cvt_02_00010_b.out,
results for weight set B.
-
cvt_02_00010_weight_c.txt,
weight set C.
-
cvt_02_00010_c.out,
results for weight set C.
-
cvt_02_00010_weight_d.txt,
weight set D.
-
cvt_02_00010_d.out,
results for weight set D.
-
cvt_02_00010_weight_e.txt,
weight set E.
-
cvt_02_00010_e.out,
results for weight set E.
-
cvt_02_00010_weight_f.txt,
weight set F.
-
cvt_02_00010_f.out,
results for weight set F.
-
cvt_02_00010_weight_g.txt,
weight set G.
-
cvt_02_00010_g.out,
results for weight set G.
Results for
cvt_02_00100.txt, with various weights:
-
cvt_02_00100.sh,
commands to run the tests.
-
cvt_02_00100.out,
no weighting
-
cvt_02_00100_weight_a.txt,
weight set A.
-
cvt_02_00100_a.out,
results for weight set A.
-
cvt_02_00100_weight_b.txt,
weight set B.
-
cvt_02_00100_b.out,
results for weight set B.
-
cvt_02_00100_weight_c.txt,
weight set C.
-
cvt_02_00100_c.out,
results for weight set C.
-
cvt_02_00100_weight_d.txt,
weight set D.
-
cvt_02_00100_d.out,
results for weight set D.
-
cvt_02_00100_weight_e.txt,
weight set E.
-
cvt_02_00100_e.out,
results for weight set E.
-
cvt_02_00100_weight_f.txt,
weight set F.
-
cvt_02_00100_f.out,
results for weight set F.
-
cvt_02_00100_weight_g.txt,
weight set G.
-
cvt_02_00100_g.out,
results for weight set G.
Results for
cvt_02_01000.txt, with various weights:
-
cvt_02_01000.sh,
commands to run the tests.
-
cvt_02_01000.out,
no weighting
-
cvt_02_01000_weight_a.txt,
weight set A.
-
cvt_02_01000_a.out,
results for weight set A.
-
cvt_02_01000_weight_b.txt,
weight set B.
-
cvt_02_01000_b.out,
results for weight set B.
-
cvt_02_01000_weight_c.txt,
weight set C.
-
cvt_02_01000_c.out,
results for weight set C.
-
cvt_02_01000_weight_d.txt,
weight set D.
-
cvt_02_01000_d.out,
results for weight set D.
-
cvt_02_01000_weight_e.txt,
weight set E.
-
cvt_02_01000_e.out,
results for weight set E.
-
cvt_02_01000_weight_f.txt,
weight set F.
-
cvt_02_01000_f.out,
results for weight set F.
-
cvt_02_01000_weight_g.txt,
weight set G.
-
cvt_02_01000_g.out,
results for weight set G.
Results for
halton_02_00010.txt, with various weights:
-
halton_02_00010.out,
no weighting
-
halton_02_00010_weight_a.txt,
weight set A.
-
halton_02_00010_a.out,
results for weight set A.
-
halton_02_00010_weight_b.txt,
weight set B.
-
halton_02_00010_b.out,
results for weight set B.
-
halton_02_00010_weight_c.txt,
weight set C.
-
halton_02_00010_c.out,
results for weight set C.
-
halton_02_00010_weight_d.txt,
weight set D.
-
halton_02_00010_d.out,
results for weight set D.
-
halton_02_00010_weight_e.txt,
weight set E.
-
halton_02_00010_e.out,
results for weight set E.
-
halton_02_00010_weight_f.txt,
weight set F.
-
halton_02_00010_f.out,
results for weight set F.
-
halton_02_00010_weight_g.txt,
weight set G.
-
halton_02_00010_g.out,
results for weight set G.
Results for
halton_02_00100.txt, with various weights:
-
halton_02_00100.out,
no weighting
-
halton_02_00100_weight_a.txt,
weight set A.
-
halton_02_00100_a.out,
results for weight set A.
-
halton_02_00100_weight_b.txt,
weight set B.
-
halton_02_00100_b.out,
results for weight set B.
-
halton_02_00100_weight_c.txt,
weight set C.
-
halton_02_00100_c.out,
results for weight set C.
-
halton_02_00100_weight_d.txt,
weight set D.
-
halton_02_00100_d.out,
results for weight set D.
-
halton_02_00100_weight_e.txt,
weight set E.
-
halton_02_00100_e.out,
results for weight set E.
-
halton_02_00100_weight_f.txt,
weight set F.
-
halton_02_00100_f.out,
results for weight set F.
-
halton_02_00100_weight_g.txt,
weight set G.
-
halton_02_00100_g.out,
results for weight set G.
Results for
halton_02_01000.txt, with various weights:
-
halton_02_01000.out,
no weighting
-
halton_02_01000_weight_a.txt,
weight set A.
-
halton_02_01000_a.out,
results for weight set A.
-
halton_02_01000_weight_b.txt,
weight set B.
-
halton_02_01000_b.out,
results for weight set B.
-
halton_02_01000_weight_c.txt,
weight set C.
-
halton_02_01000_c.out,
results for weight set C.
-
halton_02_01000_weight_d.txt,
weight set D.
-
halton_02_01000_d.out,
results for weight set D.
-
halton_02_01000_weight_e.txt,
weight set E.
-
halton_02_01000_e.out,
results for weight set E.
-
halton_02_01000_weight_f.txt,
weight set F.
-
halton_02_01000_f.out,
results for weight set F.
-
halton_02_01000_weight_g.txt,
weight set G.
-
halton_02_01000_g.out,
results for weight set G.
Results for
uniform_02_00010.txt, with various weights:
-
uniform_02_00010.out,
no weighting
-
uniform_02_00010_weight_a.txt,
weight set A.
-
uniform_02_00010_a.out,
results for weight set A.
-
uniform_02_00010_weight_b.txt,
weight set B.
-
uniform_02_00010_b.out,
results for weight set B.
-
uniform_02_00010_weight_c.txt,
weight set C.
-
uniform_02_00010_c.out,
results for weight set C.
-
uniform_02_00010_weight_d.txt,
weight set D.
-
uniform_02_00010_d.out,
results for weight set D.
-
uniform_02_00010_weight_e.txt,
weight set E.
-
uniform_02_00010_e.out,
results for weight set E.
-
uniform_02_00010_weight_f.txt,
weight set F.
-
uniform_02_00010_f.out,
results for weight set F.
-
uniform_02_00010_weight_g.txt,
weight set G.
-
uniform_02_00010_g.out,
results for weight set G.
Results for
uniform_02_00100.txt, with various weights:
-
uniform_02_00100.out,
no weighting
-
uniform_02_00100_weight_a.txt,
weight set A.
-
uniform_02_00100_a.out,
results for weight set A.
-
uniform_02_00100_weight_b.txt,
weight set B.
-
uniform_02_00100_b.out,
results for weight set B.
-
uniform_02_00100_weight_c.txt,
weight set C.
-
uniform_02_00100_c.out,
results for weight set C.
-
uniform_02_00100_weight_d.txt,
weight set D.
-
uniform_02_00100_d.out,
results for weight set D.
-
uniform_02_00100_weight_e.txt,
weight set E.
-
uniform_02_00100_e.out,
results for weight set E.
-
uniform_02_00100_weight_f.txt,
weight set F.
-
uniform_02_00100_f.out,
results for weight set F.
-
uniform_02_00100_weight_g.txt,
weight set G.
-
uniform_02_00100_g.out,
results for weight set G.
Results for
uniform_02_01000.txt, with various weights:
-
uniform_02_01000.out,
no weighting
-
uniform_02_01000_weight_a.txt,
weight set A.
-
uniform_02_01000_a.out,
results for weight set A.
-
uniform_02_01000_weight_b.txt,
weight set B.
-
uniform_02_01000_b.out,
results for weight set B.
-
uniform_02_01000_weight_c.txt,
weight set C.
-
uniform_02_01000_c.out,
results for weight set C.
-
uniform_02_01000_weight_d.txt,
weight set D.
-
uniform_02_01000_d.out,
results for weight set D.
-
uniform_02_01000_weight_e.txt,
weight set E.
-
uniform_02_01000_e.out,
results for weight set E.
-
uniform_02_01000_weight_f.txt,
weight set F.
-
uniform_02_01000_f.out,
results for weight set F.
-
uniform_02_01000_weight_g.txt,
weight set G.
-
uniform_02_01000_g.out,
results for weight set G.
List of Routines:
-
MAIN is the main program for INTEGRAL_TEST.
-
CH_IS_DIGIT returns .TRUE. if a character is a decimal digit.
-
CH_TO_DIGIT returns the integer value of a base 10 digit.
-
DIGIT_INC increments a decimal digit.
-
DIGIT_TO_CH returns the character representation of a decimal digit.
-
FILE_COLUMN_COUNT counts the number of columns in the first line of a file.
-
FILE_LINE_COUNT counts the number of lines in a file.
-
GET_FILE_NAME gets the input file name.
-
GET_UNIT returns a free FORTRAN unit number.
-
INTEGRAL_TEST_01 does the general integral tests.
-
INTEGRAL_TEST_02 does some integrals involving basepoints.
-
INTEGRAL_TEST_03 does integral tests for one simple integrand.
-
LIST_TITLES lists the titles of the integral tests.
-
RANDOM_INITIALIZE initializes the FORTRAN 90 random number seed.
-
READ_INPUT_FILE reads the data from the input file.
-
S_WORD_COUNT counts the number of "words" in a string.
-
TIMESTAMP prints the current YMDHMS date as a time stamp.
-
TIMESTRING writes the current YMDHMS date into a string.
You can go up one level to
the FORTRAN90 source codes.
Last revised on 27 November 2006.