Tour of main types¶
This page maps the primary OpenPFC concepts to their responsibilities, headers, and runnable examples. It is a lookup-oriented bridge between tutorials and the generated API reference, not an exhaustive inventory of implementation types.
For dependency rules, read
architecture.md. For configuration-driven
application wiring, read
app_pipeline.md.
Core spectral workflow¶
flowchart LR
Domain --> Decomposition --> FFT
FFT --> Model --> Simulator
Time --> Simulator
FieldModifier --> Simulator
Simulator --> ResultsWriter
Configuration --> App --> SpectralSimulationSession --> Simulator
The shortest useful mental model is:
Domaindescribes the global grid.Decompositionpartitions it across MPI ranks.an FFT implementation transforms local field data;
Modeldefines the physics update;Simulatorcoordinates time, modifiers, model steps, and writers;AppandSpectralSimulationSessionbuild that stack from configuration.
Stable concepts at a glance¶
Type or concept |
Responsibility |
Primary header |
Start with |
|---|---|---|---|
|
Global grid size, spacing, origin, and periodicity |
|
|
|
Inclusive integer bounds for local or transformed regions |
|
|
|
MPI partition and per-rank inbox/outbox geometry |
|
|
|
Distributed forward/backward transforms through HeFFTe |
|
|
|
Physics fields, initialization, and time-step update |
|
|
|
Start, stop, step size, current time, and save cadence |
|
|
|
Coordinates modifiers, model steps, time, and result output |
|
|
|
Initial conditions and boundary-condition-style updates |
|
|
|
Stable interface for persisted simulation fields |
|
|
|
Loads JSON/TOML and runs a configured application |
|
|
|
Owns the CPU domain, decomposition, FFT, fields, and time stack |
|
|
|
Owns model and simulator state around a spectral stack |
|
|
Use the integrated C++ API reference for exact constructors, overloads, namespaces, and member documentation.
Data and execution¶
OpenPFC separates logical fields from execution and memory backends.
Concept |
Role |
Location |
|---|---|---|
|
Associate local values with domain and decomposition information |
|
|
Own host or device storage selected by backend type |
|
execution spaces |
Select serial, OpenMP, CUDA, or HIP execution |
|
memory spaces |
Express host versus device residency |
|
views and |
Backend-oriented access and iteration |
|
|
Move or expose data across memory spaces |
|
GPU execution requires a matching CUDA or HIP build and the corresponding
runtime headers. Build decisions are documented in
../hpc/gpu_path_decision.md.
Finite-difference types¶
Finite-difference applications choose a field/halo layout according to whether the data must also remain FFT-compatible.
Concept |
Use |
|---|---|
in-place halo exchange |
Compact FD-only arrays whose boundary slabs may hold ghosts |
separated halo exchange |
FFT-safe core arrays with separate face buffers |
|
Owned cells plus a contiguous ghost ring for direct stencil indexing |
sparse halo exchange |
Explicit remote-index lists and structured separated halos |
FD gradients and stencils |
Per-cell differential operators and reusable coefficients |
Start with examples/15_finite_difference_heat.cpp and
../concepts/halo_exchange.md.
Configuration and extension catalogs¶
The frontend maps configuration names to concrete behavior through catalogs and wiring helpers.
Concept |
Responsibility |
|---|---|
parameter metadata and validation |
Check required keys, types, bounds, units, and typical values |
field-modifier catalog |
Map configuration names to initial/boundary modifier factories |
results-writer catalog |
Map |
JSON wiring context/session |
Hold the objects required to connect configuration to a simulator |
spectral stack factory |
Merge backend and HeFFTe plan options into a concrete FFT stack |
These are extension mechanisms rather than first-day concepts. Follow
../tutorials/custom_app_minimal.md and
../extending_openpfc/README.md before using
them directly.
Advanced subsystems¶
OpenPFC also contains stable subsystem contracts that are best learned from their focused documentation rather than from one expanding type table.
Subsystem |
Read |
|---|---|
time integration and adaptive stepping |
simulation stepper headers and generated API reference |
solver contracts and spectral diagonal solves |
solver headers under |
checkpoint state and atomic publication |
|
profiling sessions and export |
|
profiling file schema |
|
result formats |
|
binary field layout |
Application-private workspaces and temporary migration adapters are intentionally excluded from this page. They remain discoverable through their application headers, tests, and generated API documentation without becoming part of the core learning path.
Find a runnable example¶
Goal |
Example or guide |
|---|---|
inspect domain decomposition |
|
perform a distributed FFT |
|
implement a small spectral model |
|
understand simulator orchestration |
|
register a custom initial condition |
|
write result files |
|
inspect a Cahn-Hilliard workflow |
|
add a custom field initializer |
|
run finite differences with halos |
|
add a coordinate system |
|
The complete catalog and suggested curriculum are in
examples_catalog.md.
See also¶
../learning_paths.md— role-based reading order../concepts/spectral_stack.md— spectral data flow../user_guide/app_pipeline.md— configuration toSimulatorapi_examples_walkthrough.md— curated API examples../getting_started/01-basics/README.md— out-of-tree consumer tutorial../extending_openpfc/README.md— extension checklist