forked from johannesgerer/jburkardt-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sandia_sparse.html
705 lines (651 loc) · 26.3 KB
/
sandia_sparse.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
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
<html>
<head>
<title>
SANDIA_SPARSE - Sparse Grids for Sandia
</title>
</head>
<body bgcolor="#EEEEEE" link="#CC0000" alink="#FF3300" vlink="#000055">
<h1 align = "center">
SANDIA_SPARSE <br> Sparse Grids for Sandia
</h1>
<hr>
<p>
<b>SANDIA_SPARSE</b>
is a C++ library which
can be used to compute the points and weights of a Smolyak sparse
grid, based on a variety of 1-dimensional quadrature rules.
</p>
<p>
The sparse grids that can be created may be based on any one of
a variety of 1D quadrature rules. However, only <b>isotropic</b>
grids are generated, that is, the same 1D quadrature rule is used
in each dimension, and the same maximum order is used in each dimension.
This is a limitation of this library, and not an inherent limitation
of the sparse grid method.
</p>
<p>
The 1D quadrature rules that can be used to construct sparse grids include:
<ul>
<li>
<b>CFN</b>, Closed Fully Nested rules:
<ul>
<li>
<b>CC</b>, Clenshaw-Curtis:<br>
defined on [-1,+1], with w(x)=1.
</li>
</ul>
</li>
<li>
<b>OFN</b>, Open Fully Nested rules:
<ul>
<li>
<b>F1</b>, Fejer Type 1: <br>
defined on (-1,+1), with w(x)=1.
</li>
<li>
<b>F2</b>, Fejer Type 2: <br>
defined on (-1,+1), with w(x)=1.
</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.
</li>
</ul>
</li>
<li>
<b>OWN</b>, Open Weakly Nested rules:
<ul>
<li>
<b>GL</b>, Gauss Legendre: <br>
defined on (-1,+1), with w(x)=1.
</li>
<li>
<b>GH</b>, Gauss Hermite: <br>
defined on (-oo,+oo), with w(x)=exp(-x*x).
</li>
</ul>
</li>
<li>
<b>ONN</b>, Open Non-Nested rules:
<ul>
<li>
<b>LG</b>, Gauss Laguerre: <br>
defined on (0,+oo) with w(x)=exp(-x).
</li>
</ul>
</li>
</ul>
</p>
<h3 align = "center">
Point Growth of 1D Rules
</h3>
<p>
A major advantage of sparse grids is that they can achieve accuracy that
is comparable to a corresponding product rule, while using far fewer points,
that is, evaluations of the function that is to be integrated. We will leave
aside the issue of comparing accuracy for now, and simply focus on the pattern
of point growth.
</p>
<p>
A sparse grid is essentially a linear combination of lower order product
grids. One way point growth is controlled is to only use product grids
based on a set of factors that are nested. In other words, the underlying
1D rules are selected so that, when we increase the order of such a rule,
all the points of the current rule are included in the new one.
</p>
<p>
The exact details of how this works depend on the particular 1D rule being
used and the nesting behavior it satisfies. We classify the cases as follows:
<ul>
<li>
<b>CFN</b>, "Closed, Fully Nested", based on Clenshaw Curtis.
</li>
<li>
<b>OFN</b>, "Open, Fully Nested", based on Fejer Type 1, Fejer Type 2, or
Gauss Patterson.
</li>
<li>
<b>OWN</b>, "Open, Weakly Nested", based on Gauss Legendre or
Gauss Hermite rules.
</li>
<li>
<b>ONN</b>, "Open, Non-Nested", based on Gauss Laguerre rules;
</li>
</ul>
</p>
<p>
For <b>CFN</b> rules we have the following relationship between the level (index of
the grid) and the 1D order (the number of points in the 1D rule.)
<pre><b>
order = 2<sup>level</sup> + 1
</b></pre>
except that for the special case of <b>level=0</b> we assign
<b>order=1</b>.
</p>
<p>
For <b>OFN</b>, <b>OWN</b> and <b>ONN</b> rules, the relationship between level
and 1D order is:
<pre><b>
order = 2<sup>level+1</sup> - 1
</b></pre>
</p>
<p>
Thus, as we allow <b>level</b> to grow, the <b>order</b> of the 1D closed
and open rules behaves as follows:
<table border = "1" align = "center">
<tr><th>Level</th><th>CFN</th><th>OFN/OWN/ONN</th></tr>
<tr align = "right"><td> 0</td><td> 1</th><td> 1</th></tr>
<tr align = "right"><td> 1</td><td> 3</th><td> 3</th></tr>
<tr align = "right"><td> 2</td><td> 5</th><td> 7</th></tr>
<tr align = "right"><td> 3</td><td> 9</th><td> 15</th></tr>
<tr align = "right"><td> 4</td><td> 17</th><td> 31</th></tr>
<tr align = "right"><td> 5</td><td> 33</th><td> 63</th></tr>
<tr align = "right"><td> 6</td><td> 65</th><td> 127</th></tr>
<tr align = "right"><td> 7</td><td> 129</th><td> 255</th></tr>
<tr align = "right"><td> 8</td><td> 257</th><td> 511</th></tr>
<tr align = "right"><td> 9</td><td> 513</th><td> 1,023</th></tr>
<tr align = "right"><td> 10</td><td> 1,025</th><td> 2,057</th></tr>
</table>
</p>
<p>
When we move to multiple dimensions, the counting becomes more complicated. This is because
a multidimensional sparse grid is made up of a logical sum of product grids. A multidimensional
sparse grid has a multidimensional level, which is a single number. Each product grid
that forms part of this sparse grid has a multidimensional level which is the sum of the
1D levels of its factors. A sparse grid whose multidimensional level is represented by
<b>LEVEL</b> includes all product grids whose level ranges <b>LEVEL</b>+1-<b>DIM</b>
and <b>LEVEL</b>.
</p>
<p>
Thus, as one example, if <b>DIM</b> is 2, the sparse grid of level 3, formed from
a CFN rule, will be formed from the following product rules.
<table border = "1" align = "center">
<tr><th>level</th><th>level 1</th><th>level 2</th><th>order 1</th><th>order 2</th><th>order</th></tr>
<tr align = "right"><td>1</td><td>0</td><td>1</td><td>1</td><td>3</td><td>3</td></tr>
<tr align = "right"><td>1</td><td>1</td><td>0</td><td>3</td><td>1</td><td>3</td></tr>
<tr align = "right"><td>2</td><td>0</td><td>2</td><td>1</td><td>5</td><td>5</td></tr>
<tr align = "right"><td>2</td><td>1</td><td>1</td><td>3</td><td>3</td><td>9</td></tr>
<tr align = "right"><td>2</td><td>2</td><td>0</td><td>5</td><td>1</td><td>5</td></tr>
</table>
Because of the nesting pattern for <b>CFN</b> rules, instead of 25 points (the sum of the orders),
we will actually have just 13 unique points.
<p>
<p>
For a <b>CFN</b> sparse grid, here is the pattern of growth in the number of points,
as a function of spatial dimension and grid level:
<table border = "1" align = "center">
<tr><th>DIM </th><th> 1</th><th> 2</th><th> 3</th><th> 4</th><th> 5</th></tr>
<tr><th>Level</th><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr align = "right"><td> 0</td><td> 1</th><td> 1</th><td> 1</td><td> 1</td><td> 1</td></tr>
<tr align = "right"><td> 1</td><td> 3</th><td> 5</th><td> 7</td><td> 9</td><td> 11</td></tr>
<tr align = "right"><td> 2</td><td> 5</th><td> 13</th><td> 25</td><td> 41</td><td> 61</td></tr>
<tr align = "right"><td> 3</td><td> 9</th><td> 29</th><td> 69</td><td> 137</td><td> 241</td></tr>
<tr align = "right"><td> 4</td><td> 17</th><td> 65</th><td> 177</td><td> 401</td><td> 801</td></tr>
<tr align = "right"><td> 5</td><td> 33</th><td> 145</th><td> 441</td><td> 1,105</td><td> 2,433</td></tr>
<tr align = "right"><td> 6</td><td> 65</th><td> 321</th><td>1,073</td><td> 2,929</td><td> 6,993</td></tr>
<tr align = "right"><td> 7</td><td>129</th><td> 705</th><td>2,561</td><td> 7,537</td><td>19,313</td></tr>
<tr align = "right"><td> 8</td><td>257</th><td>1,537</th><td>6,017</td><td>18,945</td><td>51,713</td></tr>
</table>
</p>
<p>
For an <b>OFN</b> sparse grid, here is the pattern of growth in the number of points,
as a function of spatial dimension and grid level:
<table border = "1" align = "center">
<tr><th>DIM </th><th> 1</th><th> 2</th><th> 3</th><th> 4</th><th> 5</th></tr>
<tr><th>Level</th><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr align = "right"><td> 0</td><td> 1</th><td> 1</th><td> 1</td><td> 1</td><td> 1</td></tr>
<tr align = "right"><td> 1</td><td> 3</th><td> 5</th><td> 7</td><td> 9</td><td> 11</td></tr>
<tr align = "right"><td> 2</td><td> 7</th><td> 17</th><td> 31</td><td> 49</td><td> 71</td></tr>
<tr align = "right"><td> 3</td><td> 15</th><td> 49</th><td> 111</td><td> 209</td><td> 351</td></tr>
<tr align = "right"><td> 4</td><td> 31</th><td> 129</th><td> 351</td><td> 769</td><td> 1,471</td></tr>
<tr align = "right"><td> 5</td><td> 63</th><td> 321</th><td> 1,023</td><td> 2,561</td><td> 5,503</td></tr>
<tr align = "right"><td> 6</td><td>127</th><td> 769</th><td> 2,815</td><td> 7,937</td><td> 18,943</td></tr>
<tr align = "right"><td> 7</td><td>255</th><td>1,793</th><td> 7,423</td><td>23,297</td><td> 61,183</td></tr>
<tr align = "right"><td> 8</td><td>511</th><td>4,097</th><td>18,943</td><td>65,537</td><td>187,903</td></tr>
</table>
</p>
<p>
For an <b>OWN</b> sparse grid, here is the pattern of growth in the number of points,
as a function of spatial dimension and grid level:
<table border = "1" align = "center">
<tr><th>DIM </th><th> 1</th><th> 2</th><th> 3</th><th> 4</th><th> 5</th></tr>
<tr><th>Level</th><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr align = "right"><td> 0</td><td> 1</th><td> 1</th><td> 1</td><td> 1</td><td> 1</td></tr>
<tr align = "right"><td> 1</td><td> 3</th><td> 5</th><td> 7</td><td> 9</td><td> 11</td></tr>
<tr align = "right"><td> 2</td><td> 7</th><td> 21</th><td> 37</td><td> 57</td><td> 81</td></tr>
<tr align = "right"><td> 3</td><td> 15</th><td> 73</th><td> 159</td><td> 289</td><td> 471</td></tr>
<tr align = "right"><td> 4</td><td> 31</th><td> 225</th><td> 597</td><td> 1,265</td><td> 2,341</td></tr>
<tr align = "right"><td> 5</td><td> 63</th><td> 637</th><td> 2,031</td><td> 4,969</td><td> 10,363</td></tr>
<tr align = "right"><td> 6</td><td>127</th><td> 1,693</th><td> 6,405</td><td> 17,945</td><td> 41,913</td></tr>
<tr align = "right"><td> 7</td><td>255</th><td> 4,289</th><td>19,023</td><td> 60,577</td><td>157,583</td></tr>
<tr align = "right"><td> 8</td><td>511</th><td>10,473</th><td>53,829</td><td>193,457</td><td>557,693</td></tr>
</table>
</p>
<p>
For an <b>ONN</b> sparse grid, here is the pattern of growth in the number of points,
as a function of spatial dimension and grid level:
<table border = "1" align = "center">
<tr><th>DIM </th><th> 1</th><th> 2</th><th> 3</th><th> 4</th><th> 5</th></tr>
<tr><th>Level</th><td> </td><td> </td><td> </td><td> </td><td> </td></tr>
<tr align = "right"><td> 0</td><td> 1</th><td> 1</th><td> 1</td><td> 1</td><td> 1</td></tr>
<tr align = "right"><td> 1</td><td> 3</th><td> 7</th><td> 10</td><td> 13</td><td> 16</td></tr>
<tr align = "right"><td> 2</td><td> 7</th><td> 29</th><td> 58</td><td> 95</td><td> 141</td></tr>
<tr align = "right"><td> 3</td><td> 15</th><td> 95</th><td> 255</td><td> 515</td><td> 906</td></tr>
<tr align = "right"><td> 4</td><td> 31</th><td> 273</th><td> 945</td><td> 2,309</td><td> 4,746</td></tr>
<tr align = "right"><td> 5</td><td> 63</th><td> 723</th><td> 3,120</td><td> 9,065</td><td> 21,503</td></tr>
<tr align = "right"><td> 6</td><td>127</th><td> 1,813</th><td> 9,484</td><td> 32,259</td><td> 87,358</td></tr>
<tr align = "right"><td> 7</td><td>255</th><td> 4,375</th><td>27,109</td><td>106,455</td><td> 325,943</td></tr>
<tr align = "right"><td> 8</td><td>511</th><td>10,265</th><td>73,915</td><td>330,985</td><td>1,135,893</td></tr>
</table>
</p>
<h3 align = "center">
Usage:
</h3>
<p>
To integrate a function <b>f(x)</b> over a multidimensional cube [-1,+1]^DIM using
a sparse grid based on a Clenshaw Curtis rule, we might use a program something
like the following:
</p>
<pre>
dim = 2;
level = 3;
rule = 1;
point_num = levels_index_size ( dim, level, rule );
w = new double[point_num];
x = new double[dim*point_num];
sparse_grid ( dim, level, rule, point_num, w, x );
quad = 0.0;
for ( j = 0; j < point_num; j++ )
{
quad = quad + w[j] * f ( x+j*dim );
}
</pre>
<h3 align = "center">
Licensing:
</h3>
<p>
The code described and made available on this web page is distributed
under the
<a href = "gnu_lgpl.txt">GNU LGPL</a> license.
</p>
<h3 align = "center">
Languages:
</h3>
<p>
<b>SANDIA_SPARSE</b> is available in
<a href = "../../cpp_src/sandia_sparse/sandia_sparse.html">a C++ version</a> and
<a href = "../../f_src/sandia_sparse/sandia_sparse.html">a FORTRAN90 version</a> and
<a href = "../../m_src/sandia_sparse/sandia_sparse.html">a MATLAB version.</a>
</p>
<h3 align = "center">
Related Data and Programs:
</h3>
<p>
<a href = "../../cpp_src/sandia_rules/sandia_rules.html">
SANDIA_RULES</a>,
a C++ library which
generates Gauss quadrature rules of various orders and types.
</p>
<p>
<a href = "../../cpp_src/sgmga/sgmga.html">
SGMGA</a>,
a C++ library which
creates sparse grids based on a mixture of 1D quadrature rules,
allowing anisotropic weights for each dimension.
</p>
<p>
<a href = "../../c_src/smolpack/smolpack.html">
SMOLPACK</a>,
a C library which
implements Novak and Ritter's method for estimating the integral
of a function over a multidimensional hypercube using sparse grids,
by Knut Petras.
</p>
<p>
<a href = "../../cpp_src/sparse_grid_cc/sparse_grid_cc.html">
SPARSE_GRID_CC</a>,
a C++ library which
can define a multidimensional sparse grid based on a 1D Clenshaw Curtis rule.
</p>
<p>
<a href = "../../cpp_src/sparse_grid_cc_dataset/sparse_grid_cc_dataset.html">
SPARSE_GRID_CC_DATASET</a>,
a C++ program which
reads user input, creates a multidimensional sparse grid based on a
1D Clenshaw Curtis rule and writes it to three files that define a
quadrature rule.
</p>
<p>
<a href = "../../m_src/spinterp/spinterp.html">
SPINTERP</a>,
a MATLAB library which
uses a sparse grid to perform multilinear hierarchical interpolation,
by Andreas Klimke.
</p>
<h3 align = "center">
Reference:
</h3>
<p>
<ol>
<li>
Volker Barthelmann, Erich Novak, Klaus Ritter,<br>
High Dimensional Polynomial Interpolation on Sparse Grids,<br>
Advances in Computational Mathematics,<br>
Volume 12, Number 4, 2000, pages 273-288.
</li>
<li>
Charles Clenshaw, Alan Curtis,<br>
A Method for Numerical Integration on an Automatic Computer,<br>
Numerische Mathematik,<br>
Volume 2, Number 1, December 1960, pages 197-205.
</li>
<li>
Philip Davis, Philip Rabinowitz,<br>
Methods of Numerical Integration,<br>
Second Edition,<br>
Dover, 2007,<br>
ISBN: 0486453391,<br>
LC: QA299.3.D28.
</li>
<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>
Albert Nijenhuis, Herbert Wilf,<br>
Combinatorial Algorithms for Computers and Calculators,<br>
Second Edition,<br>
Academic Press, 1978,<br>
ISBN: 0-12-519260-6,<br>
LC: QA164.N54.
</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>
Fabio Nobile, Raul Tempone, Clayton Webster,<br>
An Anisotropic 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 2411-2442.
</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>
<li>
Dennis Stanton, Dennis White,<br>
Constructive Combinatorics,<br>
Springer, 1986,<br>
ISBN: 0387963472,<br>
LC: QA164.S79.
</li>
</ol>
</p>
<h3 align = "center">
Source Code:
</h3>
<p>
<ul>
<li>
<a href = "sandia_sparse.cpp">sandia_sparse.cpp</a>, the source code.
</li>
<li>
<a href = "sandia_sparse.hpp">sandia_sparse.hpp</a>, the include file.
</li>
<li>
<a href = "sandia_sparse.csh">sandia_sparse.csh</a>,
commands to compile the source code.
</li>
</ul>
</p>
<h3 align = "center">
Examples and Tests:
</h3>
<p>
<ul>
<li>
<a href = "sandia_sparse_prb.cpp">sandia_sparse_prb.cpp</a>,
a sample calling program.
</li>
<li>
<a href = "sandia_sparse_prb.csh">sandia_sparse_prb.csh</a>,
commands to compile and run the sample program.
</li>
<li>
<a href = "sandia_sparse_prb_output.txt">sandia_sparse_prb_output.txt</a>,
the output from a run of the sample program.
</li>
</ul>
</p>
<h3 align = "center">
List of Routines:
</h3>
<p>
<ul>
<li>
<b>ABSCISSA_LEVEL_CLOSED_ND:</b> first level at which an abscissa is generated.
</li>
<li>
<b>ABSCISSA_LEVEL_OPEN_ND:</b> first level at which given abscissa is generated.
</li>
<li>
<b>CC_ABSCISSA</b> returns the I-th abscissa of the Clenshaw Curtis rule.
</li>
<li>
<b>CC_WEIGHTS</b> computes Clenshaw Curtis weights.
</li>
<li>
<b>COMP_NEXT</b> computes the compositions of the integer N into K parts.
</li>
<li>
<b>F1_ABSCISSA</b> returns the I-th abscissa for the Fejer type 1 rule.
</li>
<li>
<b>F1_WEIGHTS</b> computes weights for a Fejer type 1 rule.
</li>
<li>
<b>F2_ABSCISSA</b> returns the I-th abscissa for the Fejer type 2 rule.
</li>
<li>
<b>F2_WEIGHTS</b> computes weights for a Fejer type 2 rule.
</li>
<li>
<b>GH_ABSCISSA</b> sets abscissas for multidimensional Gauss-Hermite quadrature.
</li>
<li>
<b>GH_WEIGHTS</b> returns weights for certain Gauss-Hermite quadrature rules.
</li>
<li>
<b>GL_ABSCISSA</b> sets abscissas for multidimensional Gauss-Legendre quadrature.
</li>
<li>
<b>GL_WEIGHTS</b> returns weights for certain Gauss-Legendre quadrature rules.
</li>
<li>
<b>GP_ABSCISSA</b> returns the I-th abscissa for a Gauss-Patterson rule.
</li>
<li>
<b>GP_WEIGHTS</b> sets weights for a Gauss-Patterson rule.
</li>
<li>
<b>I4_LOG_2</b> returns the integer part of the logarithm base 2 of an I4.
</li>
<li>
<b>I4_MAX</b> returns the maximum of two I4's.
</li>
<li>
<b>I4_MIN</b> returns the minimum of two I4's.
</li>
<li>
<b>I4_MODP</b> returns the nonnegative remainder of I4 division.
</li>
<li>
<b>I4_POWER</b> returns the value of I^J.
</li>
<li>
<b>I4VEC_PRODUCT</b> multiplies the entries of an integer vector.
</li>
<li>
<b>INDEX_LEVEL_OWN:</b> determine first level at which given index is generated.
</li>
<li>
<b>INDEX_TO_LEVEL_CLOSED</b> determines the level of a point given its index.
</li>
<li>
<b>INDEX_TO_LEVEL_OPEN</b> determines the level of a point given its index.
</li>
<li>
<b>LEVEL_TO_ORDER_CLOSED</b> converts a level to an order for closed rules.
</li>
<li>
<b>LEVEL_TO_ORDER_OPEN</b> converts a level to an order for open rules.
</li>
<li>
<b>LEVELS_INDEX</b> indexes a sparse grid.
</li>
<li>
<b>LEVELS_INDEX_CFN</b> indexes a sparse grid made from CFN 1D rules.
</li>
<li>
<b>LEVELS_INDEX_OFN</b> indexes a sparse grid made from OFN 1D rules.
</li>
<li>
<b>LEVELS_INDEX_ONN</b> indexes a sparse grid made from ONN 1D rules.
</li>
<li>
<b>LEVELS_INDEX_OWN</b> indexes a sparse grid made from OWN 1D rules.
</li>
<li>
<b>LEVELS_INDEX_SIZE</b> sizes a sparse grid.
</li>
<li>
<b>LEVELS_INDEX_SIZE_CFN</b> sizes a sparse grid made from CFN 1D rules.
</li>
<li>
<b>LEVELS_INDEX_SIZE_ONN</b> sizes a sparse grid made from ONN 1D rules.
</li>
<li>
<b>LEVELS_INDEX_SIZE_OWN</b> sizes a sparse grid made from OWN 1D rules.
</li>
<li>
<b>LG_ABSCISSA</b> sets abscissas for multidimensional Gauss-Laguerre quadrature.
</li>
<li>
<b>LG_WEIGHTS</b> returns weights for certain Gauss-Laguerre quadrature rules.
</li>
<li>
<b>MONOMIAL_INTEGRAL_HERMITE</b> integrates a Hermite mononomial.
</li>
<li>
<b>MONOMIAL_INTEGRAL_LAGUERRE</b> integrates a Laguerre monomial.
</li>
<li>
<b>MONOMIAL_INTEGRAL_LEGENDRE</b> integrates a Legendre monomial.
</li>
<li>
<b>MONOMIAL_QUADRATURE</b> applies a quadrature rule to a monomial.
</li>
<li>
<b>MONOMIAL_VALUE</b> evaluates a monomial.
</li>
<li>
<b>MULTIGRID_INDEX_CFN</b> indexes a sparse grid based on CFN 1D rules.
</li>
<li>
<b>MULTIGRID_INDEX_OFN</b> indexes a sparse grid based on OFN 1D rules.
</li>
<li>
<b>MULTIGRID_INDEX_ONN</b> indexes a sparse grid based on ONN 1D rules.
</li>
<li>
<b>MULTIGRID_INDEX_OWN</b> returns an indexed multidimensional grid.
</li>
<li>
<b>MULTIGRID_SCALE_CLOSED</b> renumbers a grid as a subgrid on a higher level.
</li>
<li>
<b>MULTIGRID_SCALE_OPEN</b> renumbers a grid as a subgrid on a higher level.
</li>
<li>
<b>PRODUCT_WEIGHTS</b> computes the weights of a product rule.
</li>
<li>
<b>R8_ABS</b> returns the absolute value of an R8.
</li>
<li>
<b>R8_CHOOSE</b> computes the binomial coefficient C(N,K) as an R8.
</li>
<li>
<b>R8_FACTORIAL</b> computes the factorial of N.
</li>
<li>
<b>R8_FACTORIAL2</b> computes the double factorial function.
</li>
<li>
<b>R8_HUGE</b> returns a "huge" R8.
</li>
<li>
<b>R8_MOP</b> returns the I-th power of -1 as an R8 value.
</li>
<li>
<b>R8VEC_DIRECT_PRODUCT2</b> creates a direct product of R8VEC's.
</li>
<li>
<b>SPARSE_GRID</b> computes a sparse grid.
</li>
<li>
<b>SPARSE_GRID_CC_SIZE</b> sizes a sparse grid using Clenshaw Curtis rules.
</li>
<li>
<b>SPARSE_GRID_CFN</b> computes a sparse grid based on a CFN 1D rule.
</li>
<li>
<b>SPARSE_GRID_OFN</b> computes a sparse grid based on an OFN 1D rule.
</li>
<li>
<b>SPARSE_GRID_OFN_SIZE</b> sizes a sparse grid using Open Fully Nested rules.
</li>
<li>
<b>SPARSE_GRID_ONN</b> computes a sparse grid based on a ONN 1D rule.
</li>
<li>
<b>SPARSE_GRID_OWN</b> computes a sparse grid based on an OWN 1D rule.
</li>
<li>
<b>SPARSE_GRID_WEIGHTS_CFN</b> computes sparse grid weights based on a CFN 1D rule.
</li>
<li>
<b>SPARSE_GRID_WEIGHTS_OFN</b> computes sparse grid weights based on a OFN 1D rule.
</li>
<li>
<b>TIMESTAMP</b> prints the current YMDHMS date as a time stamp.
</li>
<li>
<b>VEC_COLEX_NEXT2</b> generates vectors in colex order.
</li>
</ul>
</p>
<p>
You can go up one level to <a href = "../cpp_src.html">
the C++ source codes</a>.
</p>
<hr>
<i>
Last revised on 23 December 2009.
</i>
<!-- John Burkardt -->
</body>
<!-- Initial HTML skeleton created by HTMLINDEX. -->
</html>