Mercurial > repos > public > sbplib
comparison +time/Rungekutta4.m @ 889:f5e14e5986b5 feature/timesteppers
Remove getState from TimeStepper and derived classes
- Currently no need for that functionality. Remove it.
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Thu, 15 Nov 2018 17:29:30 -0800 |
parents | 50d5a3843099 |
children | b89379fb0814 |
comparison
equal
deleted
inserted
replaced
888:8732d6bd9890 | 889:f5e14e5986b5 |
---|---|
36 function [v,t] = getV(obj) | 36 function [v,t] = getV(obj) |
37 v = obj.v; | 37 v = obj.v; |
38 t = obj.t; | 38 t = obj.t; |
39 end | 39 end |
40 | 40 |
41 function state = getState(obj) | |
42 state = struct('v', obj.v, 't', obj.t, 'k', obj.k); | |
43 end | |
44 | |
45 function obj = step(obj) | 41 function obj = step(obj) |
46 obj.v = time.rk.rungekutta_4(obj.v, obj.t, obj.k, obj.F); | 42 obj.v = time.rk.rungekutta_4(obj.v, obj.t, obj.k, obj.F); |
47 obj.t = obj.t + obj.k; | 43 obj.t = obj.t + obj.k; |
48 obj.n = obj.n + 1; | 44 obj.n = obj.n + 1; |
49 end | 45 end |