forked from johannesgerer/jburkardt-f
-
Notifications
You must be signed in to change notification settings - Fork 1
/
sparse_grid_mixed_dataset.html
409 lines (362 loc) · 12.1 KB
/
sparse_grid_mixed_dataset.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
405
406
407
408
409
<html>
<head>
<title>
SPARSE_GRID_MIXED_DATASET - Create Sparse Grid Using Mixed Rules
</title>
</head>
<body bgcolor="#EEEEEE" link="#CC0000" alink="#FF3300" vlink="#000055">
<h1 align = "center">
SPARSE_GRID_MIXED_DATASET <br> Create Sparse Grid Using Mixed Rules
</h1>
<hr>
<p>
<b>SPARSE_GRID_MIXED_DATASET</b>
is a FORTRAN90 program which
creates a sparse grid dataset from a mixture of 1D rules, using
instructions from a user.
</p>
<p>
The available 1D quadrature rules are identified by a 2 or 3 letter code,
and include:
<ol>
<li>
<b>CC</b>, Clenshaw-Curtis:<br>
defined on [-1,+1], with w(x)=1,<br>
a closed, fully nested rule.
</li>
<li>
<b>F2</b>, Fejer Type 2: <br>
defined on (-1,+1), with w(x)=1,<br>
an open, fully nested rule.
</li>
<li>
<b>GP</b>, Gauss Patterson: <br>
defined on (-1,+1), with w(x)=1,<br>
a family of the midpoint rule, the 3 point
Gauss Legendre rule, and then successive Patterson refinements,<br>
an open, fully nested rule.
</li>
<li>
<b>GL</b>, Gauss Legendre: <br>
defined on (-1,+1), with w(x)=1,<br>
an open, weakly nested rule.
</li>
<li>
<b>GH</b>, Gauss Hermite: <br>
defined on (-oo,+oo), with w(x)=exp(-x*x),<br>
an open, weakly nested rule.
</li>
<li>
<b>GGH</b>, Generalized Gauss Hermite: <br>
defined on (-oo,+oo), with w(x)=|x|^alpha * exp(-x*x),<br>
an open, weakly nested rule.
</li>
<li>
<b>LG</b>, Gauss Laguerre: <br>
defined on (0,+oo) with w(x)=exp(-x),<br>
an open, non-nested rule.
</li>
<li>
<b>GLG</b>, Generalized Gauss Laguerre: <br>
defined on (0,+oo) with w(x)=x^alpha * exp(-x),<br>
an open, non-nested rule.
</li>
<li>
<b>GJ</b>, Gauss Jacobi: <br>
defined on [-1,+1] with w(x)=(1-x)^alpha (1+x)^beta<br>
an open, non-nested rule.
</li>
<li>
<b>GW</b>, Golub Welsch: <br>
a rule defined by the user based on the Golub-Welsch algorithm,<br>
with points and weights supplied by external routines,<br>
presumably an open, non-nested rule.<br>
<i>(not supported yet)</i>
</li>
<li>
<b>CCS</b>, Clenshaw-Curtis Slow-Growth:<br>
defined on [-1,+1], with w(x)=1,<br>
a closed, fully nested rule.
</li>
<li>
<b>F2S</b>, Fejer Type 2, Slow-Growth: <br>
defined on (-1,+1), with w(x)=1,<br>
an open, fully nested rule.
</li>
<li>
<b>GPS</b>, Gauss Patterson, Slow-Growth: <br>
defined on (-1,+1), with w(x)=1,<br>
a family of the midpoint rule, the 3 point
Gauss Legendre rule, and then successive Patterson refinements,<br>
an open, fully nested rule.
</li>
</ol>
</p>
<h3 align = "center">
Usage:
</h3>
<p>
The user first specifies:
<ul>
<li>
<b>M</b> the spatial dimension of the quadrature region,
</li>
<li>
<b>L</b> the level that defines the Smolyak grid.
</li>
</ul>
and these two values can actuallyb be specified on the command line.
</p>
<p>
Then the user specifies rules for each of the M dimensions.
A rule, when specified, may be used for one, or for multiple consecutive
dimensions.
<ul>
<li>
RULE identifies the 1D rule, and must be one of
"CC", "F2", "GP", "GL", "GH", "GGH", "LG", "GLG", "GJ", "GW",
"CCS", "F2S", "GPS".
</li>
<li>
the number of times the rule is to be used for consecutive dimensions;
</li>
<li>
ALPHA, a rule parameter, if needed. (Rules GGH, GLG and GJ);
</li>
<li>
BETA, a rule parameter, if needed. (Rule GJ only).
</li>
</ul>
</p>
<p>
Finally, the user specifies a "file identifier", that is, the main part
of a string to be used when creating the files.
</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>SPARSE_GRID_MIXED_DATASET</b> is available in
<a href = "../../cpp_src/sparse_grid_mixed_dataset/sparse_grid_mixed_dataset.html">a C++ version</a> and
<a href = "../../f_src/sparse_grid_mixed_dataset/sparse_grid_mixed_dataset.html">a FORTRAN90 version</a> and
<a href = "../../m_src/sparse_grid_mixed_dataset/sparse_grid_mixed_dataset.html">a MATLAB version</a>.
</p>
<h3 align = "center">
Related Data and Programs:
</h3>
<p>
<a href = "../../f_src/monte_carlo_rule/monte_carlo_rule.html">
MONTE_CARLO_RULE</a>,
a FORTRAN90 program which
generates a dataset of N random M-dimensional points,
regards it as a quadrature rule for the unit hypercube,
and writes out three files of information.
</p>
<p>
<a href = "../../f_src/sandia_rules/sandia_rules.html">
SANDIA_RULES</a>,
a FORTRAN90 library which
produces 1D quadrature rules of
Chebyshev, Clenshaw Curtis, Fejer 2, Gegenbauer, generalized Hermite,
generalized Laguerre, Hermite, Jacobi, Laguerre, Legendre and Patterson types.
</p>
<p>
<a href = "../../datasets/sparse_grid_cc/sparse_grid_cc.html">
SPARSE_GRID_CC</a>,
a dataset directory which
contains multidimensional Smolyak sparse grids
based on the 1D Clenshaw Curtis rule;
</p>
<p>
<a href = "../../f_src/sparse_grid_cc_dataset/sparse_grid_cc_dataset.html">
SPARSE_GRID_CC_DATASET</a>,
a FORTRAN90 program which
creates a sparse grid dataset based on Clenshaw-Curtis rules.
</p>
<p>
<a href = "../../datasets/sparse_grid_ccs/sparse_grid_ccs.html">
SPARSE_GRID_CCS</a>,
a dataset directory which
contains multidimensional Smolyak sparse grids
based on the 1D Clenshaw Curtis rule with Slow Exponential Growth;
</p>
<p>
<a href = "../../datasets/sparse_grid_f2/sparse_grid_f2.html">
SPARSE_GRID_F2</a>,
a dataset directory which
contains multidimensional Smolyak sparse grids
based on the 1D Fejer type 2 rule;
</p>
<p>
<a href = "../../datasets/sparse_grid_gl/sparse_grid_gl.html">
SPARSE_GRID_GL</a>,
a dataset directory which
contains multidimensional Smolyak sparse grids
based on the 1D Gauss-Legendre rule;
</p>
<p>
<a href = "../../f_src/sparse_grid_gl_dataset/sparse_grid_gl_dataset.html">
SPARSE_GRID_GL_DATASET</a>,
a FORTRAN90 program which
creates a sparse grid dataset based on Gauss-Legendre rules.
</p>
<p>
<a href = "../../datasets/sparse_grid_gp/sparse_grid_gp.html">
SPARSE_GRID_GP</a>,
a dataset directory which
contains multidimensional Smolyak sparse grids
based on the 1D Gauss-Patterson rule;
</p>
<p>
<a href = "../../datasets/sparse_grid_hermite/sparse_grid_hermite.html">
SPARSE_GRID_HERMITE</a>,
a dataset directory which
contains multidimensional Smolyak sparse grids
based on the 1D Gauss-Hermite rule;
</p>
<p>
<a href = "../../f_src/sparse_grid_hermite_dataset/sparse_grid_hermite_dataset.html">
SPARSE_GRID_HERMITE_DATASET</a>,
a FORTRAN90 program which
creates a sparse grid dataset based on Gauss-Hermite rules.
</p>
<p>
<a href = "../../datasets/sparse_grid_laguerre/sparse_grid_laguerre.html">
SPARSE_GRID_LAGUERRE</a>,
a dataset directory which
contains multidimensional Smolyak sparse grids
based on the 1D Gauss-Laguerre rule;
</p>
<p>
<a href = "../../f_src/sparse_grid_laguerre_dataset/sparse_grid_laguerre_dataset.html">
SPARSE_GRID_LAGUERRE_DATASET</a>,
a FORTRAN90 program which
creates a sparse grid dataset based on Gauss-Laguerrre rules.
</p>
<p>
<a href = "../../f_src/sparse_grid_mixed/sparse_grid_mixed.html">
SPARSE_GRID_MIXED</a>,
a FORTRAN90 library which
creates a sparse grid dataset based on a mixed set of 1D factor rules.
</p>
<p>
<a href = "../../datasets/sparse_grid_mixed/sparse_grid_mixed.html">
SPARSE_GRID_MIXED</a>,
a dataset directory which
contains multidimensional Smolyak sparse grids
based on a mixed set of 1D factor rules.
</p>
<p>
<a href = "../../datasets/sparse_grid_ncc/sparse_grid_ncc.html">
SPARSE_GRID_NCC</a>,
a dataset directory which
contains multidimensional Smolyak sparse grids
based on the 1D Newton Cotes Closed rule;
</p>
<p>
<a href = "../../datasets/sparse_grid_nco/sparse_grid_nco.html">
SPARSE_GRID_NCO</a>,
a dataset directory which
contains multidimensional Smolyak sparse grids
based on the 1D Newton Cotes Open rule;
</p>
<p>
<a href = "../../f_src/sparse_grid_open_dataset/sparse_grid_open_dataset.html">
SPARSE_GRID_OPEN_DATASET</a>,
a FORTRAN90 program which
creates a sparse grid dataset based on
open rules (Fejer 2, Gauss-Patterson, Newton-Cotes-Open).
</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>
<h3 align = "center">
Reference:
</h3>
<p>
<ol>
<li>
Thomas Gerstner, Michael Griebel,<br>
Numerical Integration Using Sparse Grids,<br>
Numerical Algorithms,<br>
Volume 18, Number 3-4, 1998, pages 209-232.
</li>
<li>
Fabio Nobile, Raul Tempone, Clayton Webster,<br>
A Sparse Grid Stochastic Collocation Method for Partial Differential
Equations with Random Input Data,<br>
SIAM Journal on Numerical Analysis,<br>
Volume 46, Number 5, 2008, pages 2309-2345.
</li>
<li>
Sergey Smolyak,<br>
Quadrature and Interpolation Formulas for Tensor Products of
Certain Classes of Functions,<br>
Doklady Akademii Nauk SSSR,<br>
Volume 4, 1963, pages 240-243.
</li>
</ol>
</p>
<h3 align = "center">
Source Code:
</h3>
<p>
<ul>
<li>
<a href = "sparse_grid_mixed_dataset.f90">sparse_grid_mixed_dataset.f90</a>,
the source code.
</li>
<li>
<a href = "sparse_grid_mixed_dataset.sh">sparse_grid_mixed_dataset.sh</a>,
commands to compile the source code.
</li>
</ul>
</p>
<h3 align = "center">
List of Routines:
</h3>
<p>
<ul>
<li>
<b>MAIN</b> is the main program for SPARSE_GRID_MIXED_DATASET.
</li>
<li>
<b>CH_CAP</b> capitalizes a single character.
</li>
<li>
<b>RULE_STRING_TO_INDEX</b> converts a string identifying a rule to an index.
</li>
<li>
<b>S_EQI</b> is a case insensitive comparison of two strings for equality.
</li>
<li>
<b>SPARSE_GRID_MIXED_DATASET_HANDLE</b> handles the creation of the dataset.
</li>
<li>
<b>S_TO_I4</b> reads an integer value from a string.
</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 24 December 2009.
</i>
<!-- John Burkardt -->
</body>
<!-- Initial HTML skeleton created by HTMLINDEX. -->
</html>