Site Tools


fdtd-openmp-time-stepping

Table of Contents

Time stepping (1D FDTD)

Time stepping advances FDTD OpenMP through consecutive field updates. The electric field belongs to integer time levels, while the magnetic field belongs to half-integer levels. Each step follows a leapfrog sequence:

$$ \left(E_z^n,H_y^{n-\frac12}\right) \longrightarrow H_y^{n+\frac12} \longrightarrow E_z^{n+1} $$

The magnetic loop reads the current electric field. Once it finishes, the electric loop reads the new magnetic field. Sources are then applied to $E_z$, and the time counter increases by one.

Fdtd_EzSimGetTime() returns this counter in steps, rather than seconds. Source callbacks use the counter before it is incremented, so the first source evaluation receives zero even though it follows the first field update. Physical time intervals follow from multiplying step intervals by $\Delta t$.

Successive calls to Fdtd_EzSimRun() continue from the existing fields and counter. Resetting clears both fields and returns the counter to zero. The OpenMP kernel preserves the same phase order with barriers, allowing spatial parallelism without advancing regions at incompatible time levels.

fdtd-openmp-time-stepping.md · Last modified: by 127.0.0.1