Application frontend

The frontend turns JSON or TOML settings into a simulation object graph. Read the application pipeline, the minimal custom application tutorial, and 0.1 → 0.2 migration before using these types directly.

pfc::ui::App and pfc::ui::SpectralSimulationSession are deleted. JSON drivers use pfc::ui::make_simulation_session<Stack> or an app-owned ETD session, then pfc::sim::run.

pfc::sim::stacks::SpectralCPUStack

class SpectralCPUStack

Programmatic spectral CPU stack: Domain + Decomposition + CPUFFT + Field sized to the FFT inbox.

Public Functions

inline explicit SpectralCPUStack(pfc::Domain domain, int rank, int nproc, MPI_Comm comm, const heffte::plan_options &options)
Parameters:
  • domain – The global Cartesian simulation domain.

  • rank – Caller’s MPI rank on comm.

  • nproc – Total number of ranks on comm (used by decomposition::create).

  • comm – MPI communicator passed to the FFT.

template<class G>
inline auto du()

Build a compact-driver residual field for the spectral stack.

Returns a pfc::sim::DuField<G, pfc::field::SpectralGradient<G>> bound to m_u and the cached FFT plan. There is no halo exchange to hide here, so the prepare callable is a no-op; the spectral evaluator’s own prepare() runs the forward FFT plus one inverse FFT per declared derivative inside apply(...).

Usage mirrors the FD stack:

auto& u  = stack.u();
auto  du = stack.du<MyGrads>();
du.apply([](const G& g) { ... });
u += dt * du;
Returned by value (move). Captures this only indirectly through the evaluator’s reference to m_u.vec(); must not outlive the stack.

Template Parameters:

G – Model-owned per-point grads aggregate.