Table of Contents
FDTD (2D FDTD)
FDTD (finite-difference time-domain) is a numerical method for simulating electromagnetic waves by approximating the derivatives in Maxwell's equations with differences between nearby field samples. Space is divided into a grid, and time advances in discrete steps. For example, a spatial derivative becomes:
$$ \frac{\partial E_z}{\partial x}\approx\frac{E_z(i+1,j)-E_z(i,j)}{\Delta x} $$
In FDTD CUDA, the simulation first updates the magnetic field from differences in the electric field, then updates the electric field from the new magnetic field. Repeating these local updates propagates a wave across the grid. Electric and magnetic samples are staggered in space on a Yee grid and in time through leapfrog stepping.
Each update reads only a small neighborhood, which makes the method suitable for parallel execution. The serial, OpenMP, and CUDA backends implement the same calculation with different execution strategies. Grid spacing controls spatial resolution, while the CFL stability condition limits the time step.
