Spectral examples sequence¶
This page gives a reading and running order through three programs that add one concept at a time: a spectral model, simulator orchestration, and a conserved nonlinear model.
Sequence¶
Step |
Executable |
New idea |
|---|---|---|
1 |
|
Apply a backward-Euler multiplier to a distributed Fourier field |
2 |
|
Add |
3 |
|
Declare conserved nonlinear physics and advance it with native ETD1 |
Read the Quarto lessons for implicit heat, driver hooks, and Cahn–Hilliard. They develop the equations, show source excerpts and give independent checks. The snapshot-series lesson covers visualization output separately.
Build and run¶
From the repository root:
./scripts/build.sh
mpirun -n 1 ./builds/release/examples/04_diffusion_model
mpirun -n 1 ./builds/release/examples/05_simulator
mpirun -n 1 ./builds/release/examples/12_cahn_hilliard
Begin with one rank. After all three programs exit with status zero, repeat with a rank count supported by your launcher allocation and the example dimensions. The programs do not share one mandatory success message; see Example run output.
Read the sources¶
File |
Look for |
|---|---|
Field allocation, Fourier-space operator construction, and forward/backward transforms |
|
|
|
Linear/nonlinear symbols, pointwise cubic, state declaration and diagnostics |
Treat these compiled examples as the code-level source of truth. This page explains their order rather than copying their implementations.
Continue by goal¶
Goal |
Next document |
|---|---|
Understand |
|
Build a JSON-driven application |
|
Understand JSON-to-simulator wiring |
|
Inspect output in ParaView |
|
Find every runnable example |
|
Look up API-focused snippets |
|
Run linear \(k^4\) surface diffusion as a JSON app |
|
Run odd-order \(ik^3\)/\(ik^5\) Kawahara waves |
|
Run sixth-order EHD film under a flexible plate |
|
Run Helmholtz–Navier strain-gradient elasticity |
|