changeset 1026:44c3ea38097e feature/advectionRV

Fix minor issues in rv/constructDiffOps - Fix issue where the order of the RV flux diff op could be set to less than 2 - Remove faulty assert of BCs
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Mon, 07 Jan 2019 16:32:40 +0100
parents ac80bedc8df7
children d6ab5ceba496
files +rv/constructDiffOps.m
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
diff -r ac80bedc8df7 -r 44c3ea38097e +rv/constructDiffOps.m
--- a/+rv/constructDiffOps.m	Mon Jan 07 16:26:05 2019 +0100
+++ b/+rv/constructDiffOps.m	Mon Jan 07 16:32:40 2019 +0100
@@ -7,7 +7,7 @@
     D_rv = @(v,viscosity)(D + D2(viscosity))*v;
 
     %% DiffOps for residual viscosity
-    [D_flux, residualPenalties] = constructTotalFluxDiffOp(scheme, grid, order-2, opSet, waveSpeed, BCs, fluxSplitting);
+    [D_flux, residualPenalties] = constructTotalFluxDiffOp(scheme, grid, max(order-2,2), opSet, waveSpeed, BCs, fluxSplitting);
     % DiffOp for flux in residual viscosity. Due to sign conventions of the implemnted schemes, we need to
     % change the sign.
     D_flux = -D_flux;
@@ -18,7 +18,6 @@
 
 function [D, penalties] = constructTotalFluxDiffOp(scheme, grid, order, opSet, waveSpeed, BCs, fluxSplitting)
     if isequal(opSet, @sbp.D1Upwind)
-        assert(size(fluxSplitting,1) == grid.D());
         diffOp = scheme(grid, order, opSet, waveSpeed, fluxSplitting);
     else
         diffOp = scheme(grid, order, opSet, waveSpeed);