changeset 1168:af3c4eb0cbbd feature/rv

Add method for constructing diffops to multistage approach of computing the residual viscosity. Differentiate between constructDiffOpsMultiGrid and constructDiffOpsMultiStage
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Fri, 28 Jun 2019 13:12:29 +0200
parents 66c0fbbc406f
children d02e5b8a0b24
files +rv/+diffops/constructDiffOpsMultiGrid.m +rv/+diffops/constructDiffOpsMultiStage.m
diffstat 2 files changed, 17 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/+rv/+diffops/constructDiffOpsMultiGrid.m	Fri Jun 28 12:53:47 2019 +0200
+++ b/+rv/+diffops/constructDiffOpsMultiGrid.m	Fri Jun 28 13:12:29 2019 +0200
@@ -2,12 +2,12 @@
     % DiffOps for stabilized solution vector
     [D_scheme, penalties_scheme] = rv.diffops.constructSchemeDiffOp(scheme, g, schemeOrder, schemeParams, opSet, BCs);
     % DiffOp for unstabilized solution vector
-    D_unstable = rv.diffops.constructFluxDiffOpWithClosures(scheme, g, schemeOrder, schemeParams, opSet, BCs);
+    D_coarse = rv.diffops.constructFluxDiffOpWithClosures(scheme, g, schemeOrder, schemeParams, opSet, BCs);
     %% DiffOps for residual viscosity
     [D_t, penalties_res] = rv.diffops.constructFluxDiffOpWithClosures(scheme, g, residualOrder, schemeParams, opSet, BCs);
     D_flux = @(v) -D_t(v);
     diffOpsStruct = struct('D_scheme', D_scheme,...
-                     'D_unstable', D_unstable,...
+                     'D_coarse', D_coarse,...
                      'D_flux', D_flux,...
                      'D_t', D_t,...
                      'penalties_scheme', penalties_scheme,...
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/+rv/+diffops/constructDiffOpsMultiStage.m	Fri Jun 28 13:12:29 2019 +0200
@@ -0,0 +1,15 @@
+function diffOpsStruct = constructDiffOpsMultiStage(scheme, g, schemeOrder, residualOrder, schemeParams, opSet, BCs)
+    % DiffOps for stabilized solution vector
+    [D_scheme, penalties_scheme] = rv.diffops.constructSchemeDiffOp(scheme, g, schemeOrder, schemeParams, opSet, BCs);
+    % DiffOp for unstabilized solution vector
+    D_unstable = rv.diffops.constructFluxDiffOpWithClosures(scheme, g, schemeOrder, schemeParams, opSet, BCs);
+    %% DiffOps for residual viscosity
+    [D_t, penalties_res] = rv.diffops.constructFluxDiffOpWithClosures(scheme, g, residualOrder, schemeParams, opSet, BCs);
+    D_flux = @(v) -D_t(v);
+    diffOpsStruct = struct('D_scheme', D_scheme,...
+                     'D_unstable', D_unstable,...
+                     'D_flux', D_flux,...
+                     'D_t', D_t,...
+                     'penalties_scheme', penalties_scheme,...
+                     'penalties_res', penalties_res);
+end
\ No newline at end of file