Table of Contents
Update coefficients (2D FDTD)
Update coefficients combine material properties and the time step into factors reused by the field updates. FDTD CUDA computes them before stepping, avoiding repeated divisions and material calculations in the inner loops.
For an electric field update, let $p$ be the permittivity $\varepsilon$ and $\sigma$ the electric conductivity. For a magnetic update, use the permeability $\mu$ and magnetic conductivity instead. Each coefficient pair is:
$$ a=\frac{\sigma\Delta t}{2p},\qquad C_1=\frac{1-a}{1+a},\qquad C_2=\frac{\Delta t}{p(1+a)} $$
$C_1$ scales the previous field value, while $C_2$ scales its signed curl contribution. For example, outside the PML the electric update takes the form:
$$ E_z^{n+1}=C_1E_z^n+C_2\left(\frac{\Delta H_y^{n+\frac12}}{\Delta x}-\frac{\Delta H_x^{n+\frac12}}{\Delta y}\right) $$
The differences use neighboring samples on the Yee grid. In a lossless region, $\sigma$ is zero, so $C_1 = 1$ and $C_2 = \Delta t/p$.
The Coeffs class stores eight arrays: a pair for each magnetic component and a pair for each electric split direction. PML conductivity profiles are included when constructing these coefficients, allowing directional damping near the boundaries. Calculations use double precision before conversion to the selected field type.
