Mercurial > repos > public > sbplib
comparison +rv/+diffops/constructDiffOpsMultiGrid.m @ 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 | 393ed30866a1 |
comparison
equal
deleted
inserted
replaced
1167:66c0fbbc406f | 1168:af3c4eb0cbbd |
---|---|
1 function diffOpsStruct = constructDiffOpsMultiGrid(scheme, g, schemeOrder, residualOrder, schemeParams, opSet, BCs) | 1 function diffOpsStruct = constructDiffOpsMultiGrid(scheme, g, schemeOrder, residualOrder, schemeParams, opSet, BCs) |
2 % DiffOps for stabilized solution vector | 2 % DiffOps for stabilized solution vector |
3 [D_scheme, penalties_scheme] = rv.diffops.constructSchemeDiffOp(scheme, g, schemeOrder, schemeParams, opSet, BCs); | 3 [D_scheme, penalties_scheme] = rv.diffops.constructSchemeDiffOp(scheme, g, schemeOrder, schemeParams, opSet, BCs); |
4 % DiffOp for unstabilized solution vector | 4 % DiffOp for unstabilized solution vector |
5 D_unstable = rv.diffops.constructFluxDiffOpWithClosures(scheme, g, schemeOrder, schemeParams, opSet, BCs); | 5 D_coarse = rv.diffops.constructFluxDiffOpWithClosures(scheme, g, schemeOrder, schemeParams, opSet, BCs); |
6 %% DiffOps for residual viscosity | 6 %% DiffOps for residual viscosity |
7 [D_t, penalties_res] = rv.diffops.constructFluxDiffOpWithClosures(scheme, g, residualOrder, schemeParams, opSet, BCs); | 7 [D_t, penalties_res] = rv.diffops.constructFluxDiffOpWithClosures(scheme, g, residualOrder, schemeParams, opSet, BCs); |
8 D_flux = @(v) -D_t(v); | 8 D_flux = @(v) -D_t(v); |
9 diffOpsStruct = struct('D_scheme', D_scheme,... | 9 diffOpsStruct = struct('D_scheme', D_scheme,... |
10 'D_unstable', D_unstable,... | 10 'D_coarse', D_coarse,... |
11 'D_flux', D_flux,... | 11 'D_flux', D_flux,... |
12 'D_t', D_t,... | 12 'D_t', D_t,... |
13 'penalties_scheme', penalties_scheme,... | 13 'penalties_scheme', penalties_scheme,... |
14 'penalties_res', penalties_res); | 14 'penalties_res', penalties_res); |
15 end | 15 end |