User Guide
Core workflow
- Build a
SparseGrid(dim, level).
- Generate points with
generate_points().
- Set nodal values in each point's
fv.
- Convert nodal values using
nodal_2_hier().
- Evaluate with
eval_funct(x).
Main objects
SparseGrid
- Manages sparse-grid structure and transforms.
GridPoint
- Stores point coordinates (
pos), nodal value (fv), and hierarchical value (hv).
Data layout
indices: list of interleaved indices [l_1, p_1, ..., l_d, p_d].
g_p: dictionary keyed by index tuple, value is GridPoint.
domain: tuple of intervals per dimension, default [0, 1]^d.
Typical usage notes
- Always call
generate_points() before filling values.
- Always call
nodal_2_hier() before eval_funct().
- Use consistent dimension between
x and the grid dim.