C++ API examples walkthrough¶
Sources live in the
docs/api/examples/ source tree.
They are curated, runnable examples that complement the
unified API reference, which is generated from installed
public headers. Keeping examples outside the Doxygen API input avoids duplicate
demo class names while preserving them as a clear source-level learning path.
Optionally compile the examples as standalone programs with
-DBUILD_API_EXAMPLES=ON (see
api/examples/CMakeLists.txt); binaries are
emitted under <build>/docs/api/examples/.
Read them in order the first time: each file builds on the same stack
(Domain → decomposition / FFT → Simulator → I/O and modifiers).
# |
Source |
Focus |
|---|---|---|
01 |
Domain geometry and coordinate systems |
|
02 |
Spectral transforms and k-space operations |
|
03 |
Orchestrating a simulation |
|
04 |
Time stepping and output scheduling |
|
05 |
MPI domain decomposition |
|
06 |
Parallel result writers |
|
07 |
Custom initial and boundary conditions |
|
08 |
Discrete fields and coordinate mapping |
|
09 |
Built-in initial-condition patterns |
|
10 |
Full model integrating the above |
How this relates to examples/¶
The tree under examples/ is the tutorial catalog with many
small executables. The docs/api/examples/ set is curated as one ascending
source narrative. Cross-reference examples_catalog.md
for teaching tiers and class_tour.md for the conceptual map.
See also¶
Integrated C++ API reference — exact declarations and source-level comments from public headers
learning_paths.md— library and API reference track