Skip to content

Commit 88a53d1

Browse files
author
chmerdon
committed
a more detailed example in the overview page of the documentation
1 parent a17c33b commit 88a53d1

1 file changed

Lines changed: 37 additions & 3 deletions

File tree

docs/src/sgfem.md

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,41 @@ of the stochastic Galerkin (SG) methods implemented in this repository.
1010
- Solve the system with solvers that exploit the tensor/block structure.
1111
- Adaptivity in space and in the stochastic index set to reduce costs.
1212

13+
## Example: Parametric Poisson Problem
14+
15+
To illustrate the workflow, consider a Poisson problem with parametric diffusion coefficient:
16+
17+
```math
18+
-\mathrm{div}(a(y,x) \nabla u(y,x)) = f(x) \quad \text{for } (y,x) \in \Gamma \times D
19+
```
20+
21+
where the coefficient has the Karhunen-Loève expansion:
22+
23+
```math
24+
a(y,x) = a_0(x) + \sum_{m=1}^M \sqrt{\lambda_m} \phi_m(x) y_m
25+
```
26+
27+
with mean field $a_0$, eigenpairs $(\lambda_m,\phi_m)$ and parameters $y_m \in [-1,1]$.
28+
29+
### Stochastic Galerkin Formulation
30+
31+
1. Expand the solution in tensorized basis functions:
32+
```math
33+
u(y,x) = \sum_{\mu} u_\mu(x) H_\mu(y)
34+
```
35+
where $H_\mu(y) = \prod_{m=1}^M H_{\mu_m}(y_m)$ are multivariate Legendre polynomials.
36+
37+
2. Galerkin projection yields the weak form:
38+
```math
39+
\sum_{\mu} \int_\Gamma a(y,x) \nabla u_\mu(x) \cdot \nabla v(x) H_\mu(y) H_\nu(y)\,dy = \int_\Gamma f(x)v(x) H_\nu(y)\,dy
40+
```
41+
for all test functions $v(x)$ and indices $\nu$.
42+
43+
3. This results in a coupled block system $\mathbf{A}\mathbf{u} = \mathbf{b}$ where:
44+
- Each block $\mathbf{A}_{\mu,\nu}$ involves the mean and KL terms of $a(y,x)$
45+
- The tensor structure allows efficient matrix-free operations
46+
47+
1348
## Where to find documentation/implementations of the key blocks
1449
1. Parametric model / KL representation of the random coefficient.
1550
- See:
@@ -35,7 +70,6 @@ of the stochastic Galerkin (SG) methods implemented in this repository.
3570
- Error estimators and marking criteria implemented in the script driver `scripts/poisson.jl` for the available Poisson model problems.
3671
- Error estimators are problem-dependent and can be currently found in `src/estimate.jl`
3772
- Spatial (mesh refinement) uses refinement routines from [ExtendableFEMBase.jl](https://github.com/WIAS-PDELib/ExtendableGrids.jl)
38-
- Stochastic refinement (enrich multi‑index set) uses functions from
39-
`src/mopcontrol.jl`
40-
- see dcomumentation page on [Estimators](estimators.md) for some more details
73+
- Stochastic refinement (enrich multi‑index set) uses functions from `src/mopcontrol.jl`
74+
- see documentation page on [Estimators](estimators.md) for some more details
4175
- Results, parameters and reproducible outputs are stored with DrWatson (see scripts/poisson.jl for naming pattern).

0 commit comments

Comments
 (0)