sparse grid and Sobol index code (Python)
Sparse grid (Smolyak) and Sobol index code written for uncertainty
quantification in the course of my research. It is available here under the LGPL in the hope that it will be useful.
features
- Arbetrary dimension, tested up to 40 dim
- High-order polynomial integration and interpolation on sparse grids
- Generalized sparse grid fill patterns (following the "index-set"
construction of [2])
- Sobol main-effect indices of arbetrary degree. NB: These are based on the
sparse-grid surrogate; they will only be as accurate as that is.
- Gauss-Patterson and Clenshaw-Curtis rules (easily extensible for other
hierarchical rules by adding a new int_*.py file with the same
interface)
The "index-set" construction allows definition of arbetrary sparse-grid
fill-patterns by hand. Automatic adaptivity should be added in due course. Other freely available sparse-grid implementations:
Only documentation is the inline comments, see especially sparse.py.
For example usage see the functions: unittest_integration(),
unittest_interpolation(), and unittest_sobol(). For an
example of coupling to an external code see "Example: typical use" at the end of
sparse.py. The algorithms follow pretty closely those described in the
citations below.
Please email me if you find bugs, extend the code in some way, or just find the code useful.
requirements
download
Tar file: smobol.v1.0.tar.gz
documentation
bibliography
credits
Richard Dwight and Andrea Resmini