Programming, Science, Python, Mathematics, Towards Data Science.
np.errstate(divide='ignore'): dt=CFL/np.sum([np.amax(space.u)/space.dx,\ np.amax(space.v)/space.dy]) #Escape condition if dt is infinity due to zero velocity initially if np.isinf(dt): dt=CFL*(space.dx+space.dy) space.dt=dt Having determined the time-step, we are now ready to implement the finite