Theory¶
1) Full grids vs. sparse grids¶
A full tensor-product grid of level \(n\) in \(d\) dimensions has \(O(2^{nd})\) points, making it impractical for \(d > 3\). Sparse grids reduce this to
points, while preserving accuracy for sufficiently smooth functions.
2) Hierarchical subspaces¶
The unit interval \([0,1]\) is decomposed into a hierarchy of subspaces indexed by level \(l \ge 1\). At level \(l\), the new grid points have positions
The number of new points at level \(l\) is \(2^{l-1}\).
In \(d\) dimensions, the hierarchical subspace \(W_{\mathbf{l}}\) for multi-index \(\mathbf{l}=(l_1,\ldots,l_d)\) is the tensor product of one-dimensional subspaces:
3) Sparse grid admissibility¶
The regular sparse grid of level \(n\) collects all subspaces satisfying:
This condition balances resolution across dimensions, discarding high-level subspaces that contribute little to smooth approximations.
4) Hat basis functions¶
The one-dimensional hat (piecewise-linear) basis function at level \(l\), position \(p\) is:
It has support \(\left[\frac{p-1}{2^l},\; \frac{p+1}{2^l}\right]\) and satisfies \(\phi_{l,p}(x_{l,p}) = 1\).
The \(d\)-dimensional basis function is the product:
5) Hierarchical interpolation¶
Any function \(f\) sampled at the sparse grid points can be represented as:
where \(\alpha_{\mathbf{l},\mathbf{p}}\) are the hierarchical surplus coefficients.
6) Nodal-to-hierarchical transform¶
Given nodal values \(f(\mathbf{x}_{\mathbf{l},\mathbf{p}})\), the hierarchical surpluses are computed by the lifting algorithm. For each dimension \(i\) and each level \(l_i\) (processed from finest to coarsest), the one-dimensional transform subtracts the half-sum of neighboring coarser-level values:
where \((\mathbf{l}^-, \mathbf{p}^-)\) and \((\mathbf{l}^-, \mathbf{p}^+)\) are the left and right parent indices obtained by reducing the level and halving the position index. Boundary cases (where a parent falls outside the domain) use only the available neighbor.
7) Evaluation¶
To evaluate \(f_n(\mathbf{x})\):
- For each dimension \(i\) and level \(l_i = 1, \ldots, n\), determine the active basis index
and evaluate the corresponding hat function \(\phi_{l_i, p_i}(x_i)\).
-
Iterate over all admissible hierarchical subspaces \(\lvert\mathbf{l}\rvert_1 \le n + d - 1\).
-
For each subspace, multiply the per-dimension basis values and accumulate the weighted hierarchical coefficient:
8) Domain scaling¶
For a general box domain \([a_i, b_i]\) instead of \([0,1]\), coordinates are mapped by
before basis evaluation, and point positions are computed as