소스 검색

shorten increment of delta state vars

vogdb 5 년 전
부모
커밋
f907afbd19
1개의 변경된 파일7개의 추가작업 그리고 7개의 파일을 삭제
  1. 7 7
      epileptor/model_2d_full.py

+ 7 - 7
epileptor/model_2d_full.py

@@ -101,11 +101,11 @@ def solve():
         dKdt, dNadt, dVdt, dUdt, dwdt, dxDdt, uu, nu, INaKpump, phi = ode_step(K, Na, V, U, w, xD)
 
         K = K_step(K, dKdt)
-        U = U + dt * dUdt
-        w = w + dt * dwdt
-        Na = Na + dt * dNadt
-        xD = xD + dt * dxDdt
-        V = V + dt * dVdt
+        U += dt * dUdt
+        w += dt * dwdt
+        Na += dt * dNadt
+        xD += dt * dxDdt
+        V += dt * dVdt
         # Reset
         Uspike = U >= Uth
         U[Uspike] = Ureset
@@ -162,10 +162,10 @@ def ode_step(K, Na, V, U, w, xD):
 
 def K_step(K, dKdt):
     if is_diff_calc:
-        K[1:-1, 1:-1] = K[1:-1, 1:-1] + dt * dKdt
+        K[1:-1, 1:-1] += dt * dKdt
         boundary_conditions(K)
     else:
-        K = K + dt * dKdt
+        K += dt * dKdt
     return K