comparison +time/Rungekutta4SecondOrder.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 0585a2ee7ee7
comparison
equal deleted inserted replaced
888:8732d6bd9890 889:f5e14e5986b5
96 function [vt,t] = getVt(obj) 96 function [vt,t] = getVt(obj)
97 vt = obj.w(end/2+1:end); 97 vt = obj.w(end/2+1:end);
98 t = obj.t; 98 t = obj.t;
99 end 99 end
100 100
101 function state = getState(obj)
102 [v, t] = obj.getV();
103 [vt] = obj.getVt();
104 state = struct('v', v, 'vt', vt, 't', t, 'k', obj.k);
105 end
106
107 function obj = step(obj) 101 function obj = step(obj)
108 obj.w = time.rk.rungekutta_4(obj.w, obj.t, obj.k, obj.F); 102 obj.w = time.rk.rungekutta_4(obj.w, obj.t, obj.k, obj.F);
109 obj.t = obj.t + obj.k; 103 obj.t = obj.t + obj.k;
110 obj.n = obj.n + 1; 104 obj.n = obj.n + 1;
111 end 105 end