changeset 385:b361a04894e3 feature/beams

Fix bug in implicit cdiff. Add stepTo method for timesteppers.
author Jonatan Werpers <jonatan@werpers.com>
date Mon, 02 Jan 2017 12:21:01 +0100
parents 32df00102268
children 4f935415700e
files +time/CdiffImplicit.m +time/Timestepper.m
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
diff -r 32df00102268 -r b361a04894e3 +time/CdiffImplicit.m
--- a/+time/CdiffImplicit.m	Mon Jan 02 09:24:48 2017 +0100
+++ b/+time/CdiffImplicit.m	Mon Jan 02 12:21:01 2017 +0100
@@ -79,7 +79,7 @@
 
             obj.k = k;
             obj.t = t0+k;
-            obj.n = 0;
+            obj.n = 1;
             obj.v = v;
             obj.v_prev = v_prev;
         end
diff -r 32df00102268 -r b361a04894e3 +time/Timestepper.m
--- a/+time/Timestepper.m	Mon Jan 02 09:24:48 2017 +0100
+++ b/+time/Timestepper.m	Mon Jan 02 12:21:01 2017 +0100
@@ -60,6 +60,13 @@
             s = util.replace_string(s,'');
         end
 
+
+        function [v, t] = stepTo(obj, n, progress_bar)
+            default_arg('progress_bar',false);
+
+            [v, t] = obj.stepN(n-obj.n, progress_bar);
+        end
+
         function [v,t] = evolve(obj, tend, progress_bar)
             default_arg('progress_bar',false)
             if ~progress_bar