Bloch boundary conditions in FDTD and MODE