# Boundary conditions (1D FDTD) **Boundary conditions** control returning waves at the finite grid ends. These alternative driver commands select an absorbing layer or the reflecting configuration: ```bash # Absorb outgoing waves in 20-cell end regions. $ dist/bin/fdtd \ --set-width=200 --set-pml=20 \ --add-pulse --run=200 absorbed.csv # Remove boundary losses and observe reflections. $ dist/bin/fdtd \ --set-width=200 --set-pec=20 \ --add-pulse --run=200 reflected.csv ``` The [[fdtd-openmp-pml|PML]] sets graded electric and magnetic conductivities. The [[fdtd-openmp-pec|PEC]] option clears losses in selected end regions. Both refresh coefficients and use the same field loops. The grid termination itself holds `Ez[0]` and the last $H_y$ element outside their update loops. The reflecting option therefore does not enforce symmetric zero-electric-field walls. Compare the resulting fields after the pulse has had time to reach a boundary and return.