示例#1
0
 def step(x0, t, dt):
     if kind == "EM":
         # Euler-Maruyama (order 1.0 Weak / Strong) integration
         return rk4(lambda x, t: dxdt(x),
                    x0,
                    np.nan,
                    dt,
                    s=diffusion,
                    stages=1)
     elif kind == "RK4":
         # 4-stage Runge-Kutta (order 1.0 Weak / Strong) integration
         return rk4(lambda x, t: dxdt(x),
                    x0,
                    np.nan,
                    dt,
                    s=diffusion,
                    stages=4)
     elif kind == "Tay2":
         # Taylor-Stratonovich (order 2.0 Weak / Strong) integration.
         return l96s_tay2_step(x0, np.nan, dt, diffusion)
     else:
         raise ValueError
示例#2
0
def step(x0, t, dt):
    return rk4(lambda x, t: dxdt(x), x0, np.nan, dt)
示例#3
0
 def step(self, x0, t, dt):
     return rk4(lambda t, x: self.dxdt(x), x0, np.nan, dt)
示例#4
0
文件: __init__.py 项目: cgrudz/DAPPER
 def step1(self, x0, t, dt):
     return rk4(lambda x, t: self.dxdt(x), x0, np.nan, dt)