comparison +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
comparison
equal deleted inserted replaced
844:9e4e0576ca0f 845:1e057b0f2fed
35 d_l = ops.d1_l'; 35 d_l = ops.d1_l';
36 d_r = ops.d1_r'; 36 d_r = ops.d1_r';
37 case 'upwind' 37 case 'upwind'
38 ops = sbp.D1Upwind(m, lim, order); 38 ops = sbp.D1Upwind(m, lim, order);
39 D1 = (ops.Dp + ops.Dm)/2; 39 D1 = (ops.Dp + ops.Dm)/2;
40 %D2eps = @(eps) ops.Dp*diag(eps)*ops.Dm; 40 D2 = @(eps) ops.Dp*spdiag(eps)*ops.Dm;
41 %D2eps = @(eps) ops.Dm*diag(eps)*ops.Dp; 41 %D2 = @(eps) ops.Dm*diag(eps)*ops.Dp;
42 D2 = @(eps) (ops.Dp*diag(eps)*ops.Dm + ops.Dm*diag(eps)*ops.Dp)/2; 42 %D2 = @(eps) (ops.Dp*diag(eps)*ops.Dm + ops.Dm*diag(eps)*ops.Dp)/2;
43 if (strcmp(dissipation,'on')) 43 if (strcmp(dissipation,'on'))
44 DissipationOp = (ops.Dp-ops.Dm)/2; 44 DissipationOp = (ops.Dp-ops.Dm)/2;
45 end 45 end
46 d_l = D1; 46 d_l = D1;
47 d_r = D1; 47 d_r = D1;