Mercurial > repos > public > sbplib
diff +scheme/Burgers1D.m @ 845:1e057b0f2fed feature/burgers1d
Add RK6 with residual viscosity update and reduce computational effort of spatial scheme
- Add RK6 with residual updates
- Change the D2 operator for upwind schemes to one less computationally expensive.
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Wed, 19 Sep 2018 16:32:05 +0200 |
parents | 9e4e0576ca0f |
children | c8ea9bbdc62c |
line wrap: on
line diff
--- a/+scheme/Burgers1D.m Tue Sep 18 10:32:00 2018 +0200 +++ b/+scheme/Burgers1D.m Wed Sep 19 16:32:05 2018 +0200 @@ -37,9 +37,9 @@ case 'upwind' ops = sbp.D1Upwind(m, lim, order); D1 = (ops.Dp + ops.Dm)/2; - %D2eps = @(eps) ops.Dp*diag(eps)*ops.Dm; - %D2eps = @(eps) ops.Dm*diag(eps)*ops.Dp; - D2 = @(eps) (ops.Dp*diag(eps)*ops.Dm + ops.Dm*diag(eps)*ops.Dp)/2; + D2 = @(eps) ops.Dp*spdiag(eps)*ops.Dm; + %D2 = @(eps) ops.Dm*diag(eps)*ops.Dp; + %D2 = @(eps) (ops.Dp*diag(eps)*ops.Dm + ops.Dm*diag(eps)*ops.Dp)/2; if (strcmp(dissipation,'on')) DissipationOp = (ops.Dp-ops.Dm)/2; end