fdtd-openmp-simulation-state
Table of Contents
Simulation state (1D FDTD)
The simulation state combines fields, material, coefficients, grid parameters, and sources. A reset deliberately clears only the advancing fields and clock:
void Fdtd_EzSimReset(Fdtd_EzSim *sim) { Fdtd_EzStateReset(sim->fsim_state); Fdtd_EzFieldsReset(sim->fsim_fields); }
Material, coefficients, execution mode, and source registrations remain in place. This lets benchmark repetitions restart the same setup without reconstructing it.
In contrast, consecutive Fdtd_EzSimRun(sim, nsteps) calls continue from the current fields and step counter. Fdtd_EzSimGetTime() returns that counter, while Fdtd_EzSimGetDt() supplies seconds per step. CSV output saves fields and material for later restoration, but not source callbacks.
Source: fdtd_ez_sim.c.
fdtd-openmp-simulation-state.md · Last modified: by 127.0.0.1
