Site Tools


fdtd-cuda-serial-backend

Table of Contents

Serial backend (2D FDTD)

The serial backend advances each phase over the whole grid on one CPU thread. Its main loop makes the time-step ordering explicit:

for (std::size_t n = 0; n < nsteps; ++n) {
    stepper.h_phase(0, n);
    stepper.e_phase(0, n);
}

The serial partition contains one whole-grid block, selected by index zero. The magnetic phase finishes before the electric phase starts. Phase helpers also handle the appropriate sources, probes, and boundary updates.

Parallel implementations are compared with this result to check whether execution changes preserve the calculation. Agreement is an implementation-consistency check; physical tests separately examine wave speed, energy, and boundary behavior.

Source: fdtd_tmz_backend_serial.cpp.

fdtd-cuda-serial-backend.md · Last modified: by 127.0.0.1