Table of Contents

Yee grid (2D FDTD)

The Yee grid is a staggered arrangement of electric and magnetic field samples used by FDTD. Instead of placing every component at the same position, it offsets them by half a cell. In FDTD CUDA's two-dimensional TMz simulation, the sample positions are:

$$ \begin{aligned} E_z(i,j)&:\quad (i\Delta x,\;j\Delta y)\\ H_x(i,j)&:\quad (i\Delta x,\;(j+\tfrac12)\Delta y)\\ H_y(i,j)&:\quad ((i+\tfrac12)\Delta x,\;j\Delta y) \end{aligned} $$

This places each magnetic sample halfway between the electric samples used to update it. For example, the difference between $E_z(i+1,j)$ and $E_z(i,j)$ approximates the $x$ derivative at $H_y(i,j)$. The electric update then uses differences between the surrounding magnetic samples.

The implementation stores each component in a separate array, using j * pitch + i to locate an element. The half-cell offsets are represented by the update equations; they do not require fractional array indices. Equal indices in different component arrays therefore refer to different physical positions.