comparison +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
comparison
equal deleted inserted replaced
580:2ce903f28193 816:b5e5b195da1e
1 classdef Timestepper < handle 1 classdef Timestepper < handle
2 properties (Abstract) 2 properties (Abstract)
3 t 3 t
4 k 4 k
5 n 5 n
6 % TBD: Decide on accessibility of properties.
7 % Properties that are not intended to be modified from the outside
8 % should ideally be made private and the specialized classes should be extended with
9 % getter functions for their relevant members, e.g v, t, k, etc.
6 end 10 end
7 11
8 methods (Abstract) 12 methods (Abstract)
9 [v,t] = getV(obj) 13 % Returns the solution vector v at timestep t.
10 obj = step(obj) 14 % TBD: Replace with getters for the separate members if the above suggestion is implemented?
15 [v,t] = getV(obj)
16 % Returns struct holding relevant state properties for the specialized timestepper.
17 % E.g [v, t, k].
18 state = getState(obj)
19 obj = step(obj)
11 end 20 end
12 21
13 22
14 methods 23 methods
15 function [v,t] = stepN(obj,n,progress_bar) 24 function [v,t] = stepN(obj,n,progress_bar)