Site Tools


fdtd-cuda-boundary-conditions

Table of Contents

Boundary conditions (2D FDTD)

Boundary conditions define how field updates behave at the edge of the simulation grid. A finite grid cannot represent all of space, so its edge must either reflect outgoing waves or absorb them before they reach the outer wall.

FDTD CUDA selects the condition through Simulation::Options::boundary. The serial, OpenMP, and CUDA backends all implement the same choices: PEC holds edge $E_z$ at zero, PMC updates edge $E_z$ with zero magnetic field outside the domain, and PML places an absorbing layer before a PEC wall.

fdtd::TMz::Simulation::Options options;
options.boundary = fdtd::TMz::Boundary::Pml;
fdtd::TMz::Simulation sim(256, 256, options);

PEC is the default. The driver exposes the choice through --boundary pec, --boundary pmc, or --boundary pml. This choice affects what a probe sees: a pulse can return after reflection from a wall, while a PML reduces the returning signal. Boundary handling also determines which edge cells can accept sources.

fdtd-cuda-boundary-conditions.md · Last modified: by 127.0.0.1