def integrator(init_x, dt, nstp):
"""
The integator of the Lorentz system.
init_x: the intial condition
dt : time step
nstp: number of integration steps.
return : a [ nstp x 3 ] vector
"""
state = odeint(velocity, init_x, np.arange(0, dt*nstp, dt))
return state
评论列表
文章目录