forked from johannesgerer/jburkardt-f
-
Notifications
You must be signed in to change notification settings - Fork 2
/
testpack.html
278 lines (245 loc) · 7.46 KB
/
testpack.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
<html>
<head>
<title>
TESTPACK - Testing Multidimensional Integration Routines
</title>
</head>
<body bgcolor="#EEEEEE" link="#CC0000" alink="#FF3300" vlink="#000055">
<h1 align = "center">
TESTPACK <br> Testing Multidimensional Integration Routines
</h1>
<hr>
<p>
<b>TESTPACK</b>
is a FORTRAN90 program which
demonstrates the testing of a routine for multidimensional
integration.
</p>
<p>
In this case, the code being tested is a subroutine known as
ADAPT, written by Genz. The code is tested on six test integrand
functions, also defined by Genz. The test is done with a variety
of spatial dimensions, parameter values, and difficulty factors.
</p>
<p>
With <b>M</b> denoting the spatial dimension, <b>R</b> a parameter,
<b>C</b> a scaling vector, and <b>X0</b> a displacement vector,
the test functions can be summarized as:
<ol>
<li>
f(x) = cos ( 2 * pi * r + sum ( c(1:m) * x(1:m) ) ), <br>
Genz "Oscillatory";
</li>
<li>
f(x) = 1 / product ( c(1:m)**2 + (x(1:m) - x0(1:m))**2),<br>
Genz "Product Peak";
</li>
<li>
f(x) = 1 / ( 1 + sum ( c(1:m) * x(1:m) ) )**(m+r),<br>
Genz "Corner Peak";
</li>
<li>
f(x) = exp(-sum(c(1:m)**2 * ( x(1:m) - x0(1:m))**2 ) ),<br>
Genz "Gaussian";
</li>
<li>
f(x) = exp ( - sum ( c(1:m) * abs ( x(1:m) - x0(1:m) ) ) ),<br>
Genz "Continuous";
</li>
<li>
f(x) = exp(sum(c(1:m)*x(1:m)) for x(1:m) <= x0(1:m), 0 otherwise,<br>
Genz "Discontinuous";
</li>
</ol>
</p>
<h3 align = "center">
Languages:
</h3>
<p>
<b>TESTPACK</b> is available in
<a href = "../../cpp_src/testpack/testpack.html">a C++ version</a> and
<a href = "../../f77_src/testpack/testpack.html">a FORTRAN77 version</a> and
<a href = "../../f_src/testpack/testpack.html">a FORTRAN90 version</a> and
<a href = "../../m_src/testpack/testpack.html">a MATLAB version</a>.
</p>
<h3 align = "center">
Related Data and Programs:
</h3>
<p>
<a href = "../../f_src/cubpack/cubpack.html">
CUBPACK</a>,
a FORTRAN90 library which
estimates the integral of a function
(or vector of functions) over a collection of N-dimensional
hyperrectangles and simplices.
</p>
<p>
<a href = "../../f_src/integral_test/integral_test.html">
INTEGRAL_TEST</a>,
a FORTRAN90 program which
tests the suitability of
a set of N points for use in an equal-weight quadrature rule over
the M-dimensional unit hypercube.
</p>
<p>
<a href = "../../f_src/intlib/intlib.html">
INTLIB</a>,
a FORTRAN90 library which
estimates the integral of a function over a one-dimensional interval.
</p>
<p>
<a href = "../../f_src/nintlib/nintlib.html">
NINTLIB</a>,
a FORTRAN90 library which
estimates the integral of a function over a one-dimensional interval.
</p>
<p>
<a href = "../../f_src/product_rule/product_rule.html">
PRODUCT_RULE</a>,
a FORTRAN90 program which
constructs a product rule
from <i>identical</i> 1D factor rules.
</p>
<p>
<a href = "../../f_src/quadrule/quadrule.html">
QUADRULE</a>,
a FORTRAN90 library which
defines a variety of
(mostly 1-dimensional) quadrature rules.
</p>
<p>
<a href = "../../c_src/smolpack/smolpack.html">
SMOLPACK</a>,
a C library which
uses the Genz test functions
to demonstrate quadrature in multiple dimensions using a sparse grid.
</p>
<p>
<a href = "../../m_src/spinterp/spinterp.html">
SPINTERP</a>,
a MATLAB library which
uses the Genz test functions
to demonstrate multilinear interpolation on a sparse grid.
</p>
<p>
<a href = "../../f_src/stroud/stroud.html">
STROUD</a>,
a FORTRAN90 library which
defines a variety of
quadrature rules over various "interesting" geometric shapes.
</p>
<p>
<a href = "../../f_src/test_nint/test_nint.html">
TEST_NINT</a>,
a FORTRAN90 library which
can be used to test N-dimensional
quadrature routines.
</p>
<h3 align = "center">
Reference:
</h3>
<p>
<ol>
<li>
Alan Genz,<br>
Testing Multidimensional Integration Routines,<br>
in Tools, Methods, and Languages for Scientific and
Engineering Computation,<br>
edited by B Ford, JC Rault, F Thomasset,<br>
North-Holland, 1984, pages 81-94,<br>
ISBN: 0444875700,<br>
LC: Q183.9.I53.
</li>
<li>
Alan Genz,<br>
A Package for Testing Multiple Integration Subroutines,<br>
in Numerical Integration:
Recent Developments, Software and Applications,<br>
edited by Patrick Keast, Graeme Fairweather,<br>
Reidel, 1987, pages 337-340,<br>
ISBN: 9027725144,<br>
LC: QA299.3.N38
</li>
<li>
John Hart, Ward Cheney, Charles Lawson, Hans Maehly,
Charles Mesztenyi, John Rice, Henry Thacher,
Christoph Witzgall,<br>
Computer Approximations,<br>
Wiley, 1968,<br>
LC: QA297.C64.
</li>
<li>
Linus Schrage,<br>
A More Portable Fortran Random Number Generator,<br>
ACM Transactions on Mathematical Software,<br>
Volume 5, Number 2, June 1979, pages 132-138.
</li>
</ol>
</p>
<h3 align = "center">
Source Code:
</h3>
<p>
<ul>
<li>
<a href = "testpack.f90">testpack.f90</a>, the source code.
</li>
<li>
<a href = "testpack.sh">testpack.sh</a>,
commands to compile the source code.
</li>
<li>
<a href = "testpack_output.txt">testpack_output.txt</a>,
the output from a run of the program.
</li>
</ul>
</p>
<h3 align = "center">
List of Routines:
</h3>
<p>
<ul>
<li>
<b>MAIN</b> is the main program for testing TESTPACK.
</li>
<li>
<b>ADAPT</b> carries out adaptive multidimensional quadrature.
</li>
<li>
<b>FUNCTN</b> evaluates one of the test integrand functions.
</li>
<li>
<b>MULTST</b> tests a multidimensional integration routine.
</li>
<li>
<b>PHI</b> estimates the normal cumulative density function.
</li>
<li>
<b>R8VEC_MEDIAN</b> computes the median of an R8VEC.
</li>
<li>
<b>RANDOM_SCHRAGE</b> is a portable random number generator
</li>
<li>
<b>TIMESTAMP</b> prints the current YMDHMS date as a time stamp.
</li>
<li>
<b>TUPLE_NEXT</b> computes the next element of a tuple space.
</li>
<li>
<b>VALINT</b> computes the exact integrals of the test functions.
</li>
</ul>
</p>
<p>
You can go up one level to <a href = "../f_src.html">
the FORTRAN90 source codes</a>.
</p>
<hr>
<i>
Last revised on 13 March 2007.
</i>
<!-- John Burkardt -->
</body>
<!-- Initial HTML skeleton created by HTMLINDEX. -->
</html>