Skip to content

Commit

Permalink
remove unnecessary variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander-Barth committed Dec 14, 2018
1 parent 495dbb9 commit 87ee3cf
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/lorenz63model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,9 @@ end
function rungekutta2_adj(t,x,dt,f,Dxn,Df_adj)
k1 = dt * f(t,x)

Dx = Dxn
Dk2 = Dxn

Dtmp2 = Df_adj(t + dt/2, x+k1/2, dt*Dk2)
Dx = Dx + Dtmp2
Dk1 = Dtmp2/2
Dtmp2 = Df_adj(t + dt/2, x+k1/2, dt*Dxn)
Dx = Dxn + Dtmp2
Dk1 = Dtmp2/2
Dx = Dx + dt*Df_adj(t,x,Dk1)

return Dx
Expand Down

0 comments on commit 87ee3cf

Please sign in to comment.