Table of Contents
Sources (1D FDTD)
A source introduces an excitation into the electromagnetic field. In FDTD OpenMP, registered functions add values to $E_z$ after the electric field update in each time step. Without an initial field or a source, a simulation starting from zero remains at zero.
The command-line program provides a Gaussian pulse and a sinusoidal wave. Both default to the middle of the grid. Their parameters can be supplied explicitly:
--add-pulse=100,40,12 --add-wave=100,1,0.1,0
The pulse arguments select the cell, peak step, and width. The wave arguments select the cell, amplitude, frequency, and phase. Multiple source options register multiple excitations.
Injection through Fdtd_EzSimInjectEz() is additive, so sources at the same cell contribute to the existing field. It does not replace the field with the waveform value.
The library accepts custom source callbacks too. Each receives the simulation and its registered parameters. The callbacks run sequentially in both kernels; the OpenMP kernel assigns them to one thread before all threads proceed to the next step.
