Mercurial > repos > public > sbplib
diff +scheme/Utux2d.m @ 1021:cc61dde120cd feature/advectionRV
Add upwind dissipation to the operator inside Utux2d
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Wed, 19 Dec 2018 20:00:27 +0100 |
parents | f029b97dbc72 |
children | 234c1c02ea39 |
line wrap: on
line diff
--- a/+scheme/Utux2d.m Fri Dec 14 18:33:10 2018 +0100 +++ b/+scheme/Utux2d.m Wed Dec 19 20:00:27 2018 +0100 @@ -27,10 +27,11 @@ methods - function obj = Utux2d(g ,order, opSet, a) + function obj = Utux2d(g ,order, opSet, a, fluxSplitting) default_arg('a',1/sqrt(2)*[1, 1]); default_arg('opSet',@sbp.D2Standard); + default_arg('fluxSplitting',[]); assertType(g, 'grid.Cartesian'); if iscell(a) @@ -98,7 +99,13 @@ obj.h = [ops_x.h ops_y.h]; obj.order = order; obj.a = a; - obj.D = -(a{1}*obj.Dx + a{2}*obj.Dy); + + if (isequal(opSet,@sbp.D1Upwind)) + obj.D = -(a{1}*obj.Dx + a{2}*obj.Dy + fluxSplitting{1}*obj.DissOpx + fluxSplitting{2}*obj.DissOpy); + else + obj.D = -(a{1}*obj.Dx + a{2}*obj.Dy); + end + end % Closure functions return the opertors applied to the own domain to close the boundary % Penalty functions return the opertors to force the solution. In the case of an interface it returns the operator applied to the other doamin.