Mercurial > repos > public > sbplib
diff +sbp/+implementations/d4_variable_2.m @ 314:88584b0cfba1 feature/beams
Corrections and clean up order 4
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 23 Sep 2016 22:55:30 +0200 |
parents | 52b4cdf27633 |
children | b19e142fcae1 |
line wrap: on
line diff
--- a/+sbp/+implementations/d4_variable_2.m Fri Sep 23 21:58:52 2016 +0200 +++ b/+sbp/+implementations/d4_variable_2.m Fri Sep 23 22:55:30 2016 +0200 @@ -37,7 +37,7 @@ d3_l = sparse(m,1); d3_l(1:4) = 1/h^3*[-1 3 -3 1]; - d3_r = -rot90(d3_l, 2) + d3_r = -rot90(d3_l, 2); % First derivative SBP operator, 1st order accurate at first 6 boundary points @@ -45,7 +45,7 @@ diags = [-1 0 1]; Q = stripeMatrix(stencil, diags, m); - D1 = HI*(Q-1/2*(e_1*e_1') + 1/2*(e_m*e_m')); + D1 = HI*(Q - 1/2*e_l*e_l' + 1/2*e_r*e_r'); % Second derivative, 1st order accurate at first boundary points M = sparse(m,m); @@ -85,5 +85,5 @@ M4(m-3:m,m-3:m) = rot90(M4_U, 2); M4 = 1/h^3*M4; - D4=HI*(M4-e_1*S3_1'+e_m*S3_m' + S_1*S2_1'-S_m*S2_m'); + D4=HI*(M4 - e_l*d3_l'+e_r*d3_r' + d1_l*d2_l'-d1_r*d2_r'); end