Mercurial > repos > public > sbplib_julia
diff TimeStepper.jl @ 25:1e845cd91cd3
Add Exclamation mark after sten in timeStepper
author | Ylva Rydin <ylva.rydin@telia.com> |
---|---|
date | Mon, 17 Dec 2018 16:30:39 +0100 |
parents | c4bc1165fdf7 |
children |
line wrap: on
line diff
--- a/TimeStepper.jl Mon Dec 17 14:47:24 2018 +0100 +++ b/TimeStepper.jl Mon Dec 17 16:30:39 2018 +0100 @@ -6,7 +6,7 @@ end -function step(ts::TimeStepper) +function step!(ts::TimeStepper) error("not implemented") end @@ -45,7 +45,7 @@ return ts.t, ts.v end -function step(ts::Rk4) +function step!(ts::Rk4) k1 = ts.F(ts.v,ts.t) k2 = ts.F(ts.v+0.5*ts.k*k1,ts.t+0.5*ts.k) k3 = ts.F(ts.v+0.5*ts.k*k2,ts.t+0.5*ts.k)