diff +time/Timestepper.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 54055b32d516
children 8894e9c49e40
line wrap: on
line diff
--- a/+time/Timestepper.m	Thu Sep 07 09:54:21 2017 +0200
+++ b/+time/Timestepper.m	Mon Sep 10 16:19:16 2018 +0200
@@ -3,11 +3,20 @@
         t
         k
         n
+        % TBD: Decide on accessibility of properties.
+        % Properties that are not intended to be modified from the outside
+        % should ideally be made private and the specialized classes should be extended with
+        % getter functions for their relevant members, e.g v, t, k, etc.
     end
 
     methods (Abstract)
-         [v,t] = getV(obj)
-         obj = step(obj)
+        % Returns the solution vector v at timestep t.
+        % TBD: Replace with getters for the separate members if the above suggestion is implemented?
+        [v,t] = getV(obj)
+        % Returns struct holding relevant state properties for the specialized timestepper.
+        % E.g [v, t, k].
+        state = getState(obj)
+        obj = step(obj)
     end