# Serial kernel (1D FDTD) The **serial kernel** completes the magnetic update before beginning the electric update. These are the two spatial loops inside each time step: ```c for (size_t k = 0; k < width - 1; k++) { Hy[k] = Ch1[k] * Hy[k] + Ch2[k] * (Ez[k + 1] - Ez[k]); } for (size_t k = 1; k < width; k++) { Ez[k] = Ce1[k] * Ez[k] + Ce2[k] * (Hy[k] - Hy[k - 1]); } ``` The magnetic loop skips the last $H_y$ element; the electric loop skips `Ez[0]`. After both loops, sources are applied and the step counter advances. Ordinary execution order supplies the phase ordering without thread barriers. The benchmark uses this kernel as the baseline for [[fdtd-openmp-speedup|speedup]]. OpenMP with one thread is a different configuration because it still executes parallel-region and synchronization machinery. Source: [fdtd_ez_kernels.c](https://github.com/yanevskiv/fdtd-openmp/blob/main/src/fdtd/Ez/fdtd_ez_kernels.c).