The spectral stack (mental model)¶
This page is the narrative spine for OpenPFC’s primary path: distributed FFT-based models driven by Simulator, optionally from JSON/TOML through the spectral App frontend. It complements the layer diagram in architecture.md (kernel / runtime / frontend).
One picture: data and control flow¶
flowchart LR
subgraph input [Configuration]
J[JSON / TOML]
end
subgraph kernel [Kernel]
W[Domain + Decomposition]
F[FFT plan HeFFTe]
M[Model + fields]
S[Simulator + Time]
end
subgraph out [Output]
R[ResultsWriter binary / VTK / ...]
end
J --> W
W --> F
F --> M
M --> S
S --> R
Reading order for declarative apps:
Domain + decomposition — global grid and which ranks own which brick (
kernel/data,kernel/decomposition).FFT — HeFFTe plan and backend (CPU / CUDA / HIP) must match how you built OpenPFC and HeFFTe (
build_cpu_gpu.md,tutorials/fft_heffte_plan_options.md).Model — physics in Fourier or real space; registers fields and hooks the integrator (
class_tour.md).Simulator — owns time loop, calls modifiers, invokes writers at
saveatboundaries.Writers —
ResultsWriterimplementations (MPI-IO binary, VTK, …) (io_results.md).
JSON/TOML wiring (spectral CPU stack, session, wiring helpers) is summarized in app_pipeline.md.
Spectral vs finite differences¶
Spectral / FFT — default “big” path for phase-field style models in this repo; k-space ops and HeFFTe are central.
Finite differences — share decomposition and halo machinery; see
architecture.md§“Spectral vs finite-difference workflows” andhalo_exchange.md.
Where to go next¶
Need |
Document |
|---|---|
First successful |
|
Runnable “recipes” |
|
Config keys for spectral |
|
API map ( |
|
Examples ladder |
|