Mercurial > repos > public > sbplib
diff +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 |
line wrap: on
line diff
--- a/+time/SBPInTime.m Thu Sep 07 09:54:21 2017 +0200 +++ b/+time/SBPInTime.m Mon Sep 10 16:19:16 2018 +0200 @@ -94,6 +94,11 @@ t = obj.t; end + function state = getState(obj) + [v, t] = getV(obj); + state = struct('v', v, 't', t, 'k', obj.k); + end + function obj = step(obj) obj.v = time.sbp.sbpintime(obj.v, obj.t, obj.nodes,... obj.penalty, obj.f, obj.blockSize,...