Troubleshooting diverging simulations in FDTD