Mercurial > repos > public > sbplib
comparison +rv/constructDiffOps.m @ 1161:856bd6291d17 feature/rv
Use same order for both time derivative and flux term when computing the residual
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Tue, 25 Jun 2019 17:00:27 +0200 |
parents | 76e3bb7836cf |
children |
comparison
equal
deleted
inserted
replaced
1160:76e3bb7836cf | 1161:856bd6291d17 |
---|---|
16 | 16 |
17 % DiffOp for flux in residual viscosity. Due to sign conventions of the implemented schemes, we need to | 17 % DiffOp for flux in residual viscosity. Due to sign conventions of the implemented schemes, we need to |
18 % change the sign. | 18 % change the sign. |
19 D_flux = @(v) -D_res(v); | 19 D_flux = @(v) -D_res(v); |
20 % DiffOp for time derivative in residual viscosity | 20 % DiffOp for time derivative in residual viscosity |
21 DvDt = D; | 21 DvDt = D_res; |
22 end | 22 end |
23 | 23 |
24 function [D, penalties] = constructFluxDiffOp(scheme, g, order, schemeParams, opSet, BCs) | 24 function [D, penalties] = constructFluxDiffOp(scheme, g, order, schemeParams, opSet, BCs) |
25 diffOp = scheme(g, order, schemeParams{:}, opSet); | 25 diffOp = scheme(g, order, schemeParams{:}, opSet); |
26 [D, penalties] = addClosuresToDiffOp(diffOp, BCs); | 26 [D, penalties] = addClosuresToDiffOp(diffOp, BCs); |