diff +time/Rungekutta4proper.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 910a05dcdfdf
children 8894e9c49e40
line wrap: on
line diff
--- a/+time/Rungekutta4proper.m	Thu Sep 07 09:54:21 2017 +0200
+++ b/+time/Rungekutta4proper.m	Mon Sep 10 16:19:16 2018 +0200
@@ -18,10 +18,15 @@
             obj.m = length(v0);
             obj.n = 0;
         end
+        
+        function [v, t] = getV(obj)
+            v = obj.v;
+            t = obj.t
 
-        function [v,t] = getV(obj)
-            v = obj.v;
-            t = obj.t;
+        end
+
+        function state = getState(obj)
+            state = struct('v', obj.v, 't', obj.t, 'k', obj.k);
         end
 
         function obj = step(obj)