diff +time/RungekuttaRV.m @ 851:ab2e5a24ddde feature/burgers1d

- Fix bug when constructing closure for narrow stencils - Update the residual outside of the RK time steps. At least for the inner convergence rate, updating the residual inside does not seem to be required.
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Fri, 21 Sep 2018 15:33:15 +0200
parents c6fcee3fcf1b
children cda996e64925
line wrap: on
line diff
--- a/+time/RungekuttaRV.m	Fri Sep 21 09:14:38 2018 +0200
+++ b/+time/RungekuttaRV.m	Fri Sep 21 15:33:15 2018 +0200
@@ -34,9 +34,12 @@
         end
 
         function obj = step(obj)
-            obj.v = time.rk.rungekuttaRV(obj.v, obj.t, obj.k, obj.F, obj.RV, obj.coeffs);
+            F = @(v,t) obj.F(v,t,obj.RV.getViscosity());
+            v_p = obj.v;
+            obj.v = time.rk.rungekutta(obj.v, obj.t, obj.k, F, obj.coeffs);
             obj.t = obj.t + obj.k;
             obj.n = obj.n + 1;
+            obj.RV.update(obj.v,v_p,obj.k);
         end
     end