diff +rv/ResidualViscosity.m @ 1015:9b7fcd5e4480 feature/advectionRV

Debug ResidualViscosity - Pass exact time derivative to RungeKuttaExteriorRV and use that for evaluating the residual - Start bootstrapping from later time level with higher order bdf
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Thu, 06 Dec 2018 17:03:22 +0100
parents e547794a9407
children 4b42999874c0
line wrap: on
line diff
--- a/+rv/ResidualViscosity.m	Thu Dec 06 11:30:47 2018 +0100
+++ b/+rv/ResidualViscosity.m	Thu Dec 06 17:03:22 2018 +0100
@@ -37,7 +37,9 @@
             obj.u_t = dvdt;
             obj.grad_f = obj.D(v);
             obj.residual = obj.u_t + obj.grad_f;
-            obj.viscosity = min(obj.Cmax*obj.h*abs(obj.waveSpeed(v)), obj.Cres*obj.h^2*abs(obj.residual)/norm(v-mean(v),inf));
+            %obj.viscosity = min(obj.Cmax*obj.h*abs(obj.waveSpeed(v)), obj.Cres*obj.h^2*abs(obj.residual)/norm(v-mean(v),inf));
+            obj.viscosity = obj.smoothen(obj.Cres*obj.h^2*abs(obj.residual)/norm(v-mean(v),inf));
+
         end
 
         function smoothendVector = smoothen(obj, vector)