diff +time/CdiffNonlin.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 d1f9dd55a2b0
children f5e14e5986b5
line wrap: on
line diff
--- a/+time/CdiffNonlin.m	Thu Sep 07 09:54:21 2017 +0200
+++ b/+time/CdiffNonlin.m	Mon Sep 10 16:19:16 2018 +0200
@@ -50,6 +50,12 @@
             t = obj.t;
         end
 
+        function state = getState(obj)
+            [v, t] = obj.getV();
+            [vt] = obj.getVt();
+            state = struct('v', v, 'vt', vt, 't', t, 'k', obj.k);
+        end
+
         function obj = step(obj)
             D = obj.D(obj.v);
             E = obj.E(obj.v);