Spectral App configuration reference (JSON / TOML)¶
This page lists the JSON / TOML surface consumed by the default CPU spectral stack (SpectralCpuStack → SpectralSimulationSession → Simulator) when you use pfc::ui::App<Model> (e.g. apps/tungsten, apps/aluminumNew). Apps may add keys or nest objects; treat shipped inputs as ground truth when in doubt.
Pipeline order: app_pipeline.md. Mental model: configuration.md.
Domain (grid)¶
Parsed by from_json<Domain>(settings) — supports flat keys on the root object or nested under "domain".
Key(s) |
Type |
Meaning |
|---|---|---|
|
integer |
Grid point counts |
|
number |
Spacing |
|
string |
|
Examples: top-level keys in some snippets; tungsten uses a "domain" object with the same logical fields (apps/tungsten/inputs_json/).
Time stepping¶
Parsed by from_json<Time>(settings) — supports flat keys or nested under "timestepping".
Key |
Type |
Meaning |
|---|---|---|
|
number |
Integration window |
|
number |
Step size |
|
number |
Output cadence (also gates binary writers in JSON wiring; |
FFT (plan_options)¶
Object key "plan_options" (JSON) or [plan_options] (TOML). Passed to HeFFTe plan construction on the CPU spectral path. backend: "cuda" is rejected for SpectralCpuStack / CpuFft — use CPU fftw here or a GPU-specific app driver.
Annotated reference file: examples/fft_backend_selection.toml. Tutorial: tutorials/fft_heffte_plan_options.md.
Model¶
Key |
Type |
Meaning |
|---|---|---|
|
string |
Conventionally matches the app’s model registration |
|
object |
Model-specific; optional |
Validation is model-dependent (see parameter_validation.md).
Result writers (binary)¶
When saveat > 0 and fields is present, add_result_writers_from_json registers BinaryWriter per entry:
Key |
Type |
Meaning |
|---|---|---|
|
string |
Field identifier known to the simulator / model |
|
string |
Filename template; if it contains |
There is no VTK branch in this helper today.
Initial / boundary conditions¶
Key |
Type |
Meaning |
|---|---|---|
|
array |
Objects with |
|
array |
Same pattern |
Modifier types must be registered in main before App runs (register_field_modifier<…>). See app_pipeline.md and examples/10_ui_register_ic.cpp.
Optional sections¶
Key |
Handled by |
Notes |
|---|---|---|
|
|
e.g. counter / increment for filenames |
|
|
TOML vs JSON¶
Same logical keys; TOML uses tables such as [domain], [timestepping], [plan_options], [model], [model.params].
See also¶
app_pipeline.md—App::mainorderbinary_field_io_spec.md— binary file layoutio_results.md— writers overviewlearning_paths.md— guided tracks