comparison +time/SBPInTime.m @ 816:b5e5b195da1e feature/timesteppers

Add getState to timesteppers, returning the relevant state of the timestepper - Add getState which returns the 'state' of the specialized timestepper.
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Mon, 10 Sep 2018 16:19:16 +0200
parents e1db62d14835
children 8894e9c49e40
comparison
equal deleted inserted replaced
580:2ce903f28193 816:b5e5b195da1e
92 function [v,t] = getV(obj) 92 function [v,t] = getV(obj)
93 v = obj.Et_r' * obj.v; 93 v = obj.Et_r' * obj.v;
94 t = obj.t; 94 t = obj.t;
95 end 95 end
96 96
97 function state = getState(obj)
98 [v, t] = getV(obj);
99 state = struct('v', v, 't', t, 'k', obj.k);
100 end
101
97 function obj = step(obj) 102 function obj = step(obj)
98 obj.v = time.sbp.sbpintime(obj.v, obj.t, obj.nodes,... 103 obj.v = time.sbp.sbpintime(obj.v, obj.t, obj.nodes,...
99 obj.penalty, obj.f, obj.blockSize,... 104 obj.penalty, obj.f, obj.blockSize,...
100 obj.Et_r,... 105 obj.Et_r,...
101 obj.L, obj.U, obj.P, obj.Q); 106 obj.L, obj.U, obj.P, obj.Q);