forked from johannesgerer/jburkardt-f
-
Notifications
You must be signed in to change notification settings - Fork 1
/
quadrature_test_2d.html
404 lines (357 loc) · 11.3 KB
/
quadrature_test_2d.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
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
<html>
<head>
<title>
QUADRATURE_TEST_2D - Quadrature Rule Applied to 2D Test Integrals
</title>
</head>
<body bgcolor="#EEEEEE" link="#CC0000" alink="#FF3300" vlink="#000055">
<h1 align = "center">
QUADRATURE_TEST_2D <br> Quadrature Rule Applied to 2D Test Integrals
</h1>
<hr>
<p>
<b>QUADRATURE_TEST_2D</b>
is a FORTRAN90 program which
reads three files that define
a 2D quadrature rule, applies the quadrature rule to a set of
test integrals, and reports the results.
</p>
<p>
The quadrature rule is defined by three text files:
<ol>
<li>
<i>the "X" file</i> lists the abscissas (N rows, M columns);
</li>
<li>
<i>the "W" file</i> lists the weights (N rows);
</li>
<li>
<i>the "R" file</i> lists the integration region corners
(2 rows, M columns);
</li>
</ol>
For more on quadrature rules, see the <b>QUADRATURE_RULES</b>
listing below.
</p>
<p>
The test integrals come from the <b>TEST_INT_2D</b> library.
</p>
<h3 align = "center">
Usage:
</h3>
<p>
<b>quadrature_test_2d</b> <i>prefix</i>
<dl>
<dt>
<i>prefix</i>
</dt>
<dd>
the common prefix for the files containing the abscissa (X),
weight (W) and region (R) information of the quadrature rule;
</dd>
</dl>
</p>
<p>
If the arguments are not supplied on the command line, the
program will prompt for them.
</p>
<h3 align = "center">
Licensing:
</h3>
<p>
The computer code and data files described and made available on this web page
are distributed under
<a href = "../../txt/gnu_lgpl.txt">the GNU LGPL license.</a>
</p>
<h3 align = "center">
Languages:
</h3>
<p>
<b>QUADRATURE_TEST_2D</b> is available in
<a href = "../../cpp_src/quadrature_test_2d/quadrature_test_2d.html">a C++ version</a> and
<a href = "../../f_src/quadrature_test_2d/quadrature_test_2d.html">a FORTRAN90 version</a> and
<a href = "../../m_src/quadrature_test_2d/quadrature_test_2d.html">a MATLAB version</a>.
</p>
<h3 align = "center">
Related Data and Programs:
</h3>
<p>
<a href = "../../cpp_src/gsl/gsl.html">
GSL</a>,
a C++ library which
includes routines for estimating multidimensional integrals.
</p>
<p>
<a href = "../../f_src/integral_test/integral_test.html">
INTEGRAL_TEST</a>,
a FORTRAN90 program which
uses test integrals to evaluate sets of quadrature points.
</p>
<p>
<a href = "../../f_src/nint_exactness/nint_exactness.html">
NINT_EXACTNESS</a>,
a FORTRAN90 program which
demonstrates how to measure the
polynomial exactness of a multidimensional quadrature rule.
</p>
<p>
<a href = "../../f_src/nintlib/nintlib.html">
NINTLIB</a>,
a FORTRAN90 library which
numerically estimates integrals
in multiple dimensions.
</p>
<p>
<a href = "../../f_src/product_rule/product_rule.html">
PRODUCT_RULE</a>,
a FORTRAN90 program which
can create a multidimensional quadrature rule as a product of
one dimensional rules.
</p>
<p>
<a href = "../../datasets/product_rule_gl/product_rule_gl.html">
PRODUCT_RULE_GL</a>,
a dataset directory which
contains multidimensional quadrature rules formed as products
of 1D Gauss-Legendre rules.
</p>
<p>
<a href = "../../datasets/product_rule_tanh_sinh/product_rule_tanh_sinh.html">
PRODUCT_RULE_TANH_SINH</a>,
a dataset directory which
contains multidimensional quadrature rules formed as products
of 1D tanh-sinh rules.
</p>
<p>
<a href = "../../datasets/quadrature_rules/quadrature_rules.html">
QUADRATURE_RULES</a>,
a dataset directory which
contains a description and examples of quadrature rules defined
by a set of "X", "W" and "R" files.
</p>
<p>
<a href = "../../f_src/quadrature_test/quadrature_test.html">
QUADRATURE_TEST</a>,
a FORTRAN90 program which
reads files defining a quadrature rule, and
applies them to all the test integrals defined by <b>TEST_NINT</b>.
</p>
<p>
<a href = "../../f_src/quadrature_test_genz/quadrature_test_genz.html">
QUADRATURE_TEST_GENZ</a>,
a FORTRAN90 program which
reads files defining a quadrature rule,
and applies it to the Genz test integrands.
</p>
<p>
<a href = "../../datasets/sparse_grid_tanh_sinh/sparse_grid_tanh_sinh.html">
SPARSE_GRID_TANH_SINH</a>,
a dataset directory which
contains multidimensional Smolyak sparse grids based on a 1D tanh-sinh rule;
</p>
<p>
<a href = "../../f_src/stroud/stroud.html">
STROUD</a>,
a FORTRAN90 library which
contains quadrature
rules for a variety of unusual areas, surfaces and volumes in 2D,
3D and N-dimensions.
</p>
<p>
<a href = "../../f_src/test_int_2d/test_int_2d.html">
TEST_INT_2D</a>,
a FORTRAN90 library which
defines test integrands for 2D quadrature rules.
</p>
<p>
<a href = "../../f_src/test_nint/test_nint.html">
TEST_NINT</a>,
a FORTRAN90 library which
defines a set of integrand functions to be used for testing
multidimensional quadrature rules and routines.
</p>
<p>
<a href = "../../f_src/testpack/testpack.html">
TESTPACK</a>,
a FORTRAN90 library which
defines a set of integrands used to test multidimensional quadrature.
</p>
<h3 align = "center">
Source Code:
</h3>
<p>
<ul>
<li>
<a href = "quadrature_test_2d.f90">quadrature_test_2d.f90</a>, the source code.
</li>
<li>
<a href = "quadrature_test_2d.sh">quadrature_test_2d.sh</a>,
commands to compile the source code.
</li>
</ul>
</p>
<h3 align = "center">
Examples and Tests:
</h3>
<p>
<b>PRODUCT_RULE_GL</b> is a family of Gauss_Legendre product rules which
includes 2D rules of orders 1x1, 2x2, 4x4,
8x8, 16x16 and 32x32.
<ul>
<li>
<a href = "../../datasets/product_rule_gl/product_rule_gl.html">
product_rule_gl.html</a>,
describes the Gauss-Legendre product rules.
</li>
<li>
<a href = "product_rule_gl_output.txt">
product_rule_gl_output</a>,
the output from running the test on the 2D rules.
</li>
</ul>
</p>
<p>
<b>PRODUCT_RULE_TANH_SINH</b> is a family of tanh-sinh product rules which
includes 2D rules of orders 1x1, 3x3, 7x7,
15x15, 31x31, 63x63, and 127x127.
<ul>
<li>
<a href = "../../datasets/product_rule_tanh_sinh/product_rule_tanh_sinh.html">
product_rule_tanh_sinh.html</a>,
describes the tanh-sinh product rules.
</li>
<li>
<a href = "product_rule_tanh_sinh_output.txt">
product_rule_tanh_sinh_output</a>,
the output from running the test on the 2D rules.
</li>
</ul>
</p>
<p>
<b>SPARSE_GRID_CC</b> is a family of Clenshaw Curtis sparse grid rules which
includes rules of order 1, 5, 13, 29, 65, 145, 321, 705. 1537, 3329 and 7169.
<i>These rules have problems with many of the test integrands, which have
endpoint singularities.</i>
<ul>
<li>
<a href = "../../datasets/sparse_grid_cc/sparse_grid_cc.html">
sparse_grid_cc.html</a>,
describes the Clenshaw Curtis sparse grid rules.
</li>
<li>
<a href = "sparse_grid_cc_output.txt">
sparse_grid_cc_output</a>,
the output from running the test on the 2D rules.
</li>
</ul>
</p>
<p>
<b>SPARSE_GRID_F2</b> is a family of Fejer Type 2 sparse grid rules which
includes rules of order 1, 5, 17, 49, 129, 321, 769, and 1793.
<ul>
<li>
<a href = "../../datasets/sparse_grid_f2/sparse_grid_f2.html">
sparse_grid_f2.html</a>,
describes the Fejer Type 2 sparse grid rules.
</li>
<li>
<a href = "sparse_grid_f2_output.txt">
sparse_grid_f2_output</a>,
the output from running the test on the 2D rules.
</li>
</ul>
</p>
<p>
<b>SPARSE_GRID_NCO</b> is a family of Newton Cotes Open sparse grid rules which
includes rules of order 1, 5, 17, 49, 129, 321, and 769 points.
<i>These rules do a terrible job, which reflects the instability of the
Newton Cotes rules.</i>
<ul>
<li>
<a href = "../../datasets/sparse_grid_nco/sparse_grid_nco.html">
sparse_grid_nco.html</a>,
describes the Newton Cotes Open sparse grid rules.
</li>
<li>
<a href = "sparse_grid_nco_output.txt">
sparse_grid_nco_output</a>,
the output from running the test on the 2D rules.
</li>
</ul>
</p>
<p>
<b>SPARSE_GRID_TANH_SINH</b> is a family of tanh-sinh sparse grid rules which
includes rules of order 1, 5, 17, 49, 129, 321, 769, 1793 and 4097 points.
<ul>
<li>
<a href = "../../datasets/sparse_grid_tanh_sinh/sparse_grid_tanh_sinh.html">
sparse_grid_tanh_sinh.html</a>,
describes the tanh-sinh sparse grid rules.
</li>
<li>
<a href = "sparse_grid_tanh_sinh_output.txt">
sparse_grid_tanh_sinh_output</a>,
the output from running the test on the 2D rules.
</li>
</ul>
</p>
<h3 align = "center">
List of Routines:
</h3>
<p>
<ul>
<li>
<b>MAIN</b> is the main program for QUADRATURE_TEST_2D.
</li>
<li>
<b>CH_CAP</b> capitalizes a single character.
</li>
<li>
<b>CH_EQI</b> is a case insensitive comparison of two characters for equality.
</li>
<li>
<b>CH_TO_DIGIT</b> returns the integer value of a base 10 digit.
</li>
<li>
<b>DTABLE_DATA_READ</b> reads data from a DTABLE file.
</li>
<li>
<b>DTABLE_HEADER_READ</b> reads the header from a DTABLE file.
</li>
<li>
<b>FILE_COLUMN_COUNT</b> counts the number of columns in the first line of a file.
</li>
<li>
<b>FILE_ROW_COUNT</b> counts the number of row records in a file.
</li>
<li>
<b>GET_UNIT</b> returns a free FORTRAN unit number.
</li>
<li>
<b>S_TO_I4</b> reads an I4 from a string.
</li>
<li>
<b>S_TO_R8</b> reads an R8 from a string.
</li>
<li>
<b>S_TO_R8VEC</b> reads an R8VEC from a string.
</li>
<li>
<b>S_WORD_COUNT</b> counts the number of "words" in a string.
</li>
<li>
<b>TIMESTAMP</b> prints the current YMDHMS date as a time stamp.
</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 01 February 2009.
</i>
<!-- John Burkardt -->
</body>
</html>