# Simulation kernels (1D FDTD) **Simulation kernels** implement the same field updates with different execution strategies. The public run function dispatches according to the selected acceleration mode: ```c void Fdtd_EzSimRun(Fdtd_EzSim *sim, size_t nsteps) { switch (sim->fsim_state->fs_accel) { case FDTD_ACCEL_NONE: { Fdtd_KernelSerial_EzSimRun(sim, nsteps); } break; case FDTD_ACCEL_OPENMP: { Fdtd_KernelOpenMP_EzSimRun(sim, nsteps); } break; } } ``` Both receive the same simulation object and requested step count. Switching modes changes execution, without rebuilding the fields or material representation. Use `Fdtd_EzSimSetAccel(sim, FDTD_ACCEL_OPENMP)` to select the parallel path, or `--set-accel=openmp` in the driver. The [[fdtd-openmp-serial-kernel|serial kernel]] supplies a baseline; the [[fdtd-openmp-openmp-kernel|OpenMP kernel]] distributes spatial updates and synchronizes their phases. Source: [fdtd_ez_sim.c](https://github.com/yanevskiv/fdtd-openmp/blob/main/src/fdtd/Ez/fdtd_ez_sim.c).