comparison +sbp/+implementations/d4_variable_2.m @ 329:bf801c3709be feature/beams

Bug fixes in operators.
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 28 Sep 2016 16:31:06 +0200
parents b19e142fcae1
children 43d02533bea3
comparison
equal deleted inserted replaced
328:31d6698c1edf 329:bf801c3709be
63 63
64 M(1:2,1:2) = [c(1)/2 + c(2)/2 -c(1)/2 - c(2)/2; -c(1)/2 - c(2)/2 c(1)/2 + c(2) + c(3)/2;]; 64 M(1:2,1:2) = [c(1)/2 + c(2)/2 -c(1)/2 - c(2)/2; -c(1)/2 - c(2)/2 c(1)/2 + c(2) + c(3)/2;];
65 M(m-1:m,m-1:m) = [c(m-2)/2 + c(m-1) + c(m)/2 -c(m-1)/2 - c(m)/2; -c(m-1)/2 - c(m)/2 c(m-1)/2 + c(m)/2;]; 65 M(m-1:m,m-1:m) = [c(m-2)/2 + c(m-1) + c(m)/2 -c(m-1)/2 - c(m)/2; -c(m-1)/2 - c(m)/2 c(m-1)/2 + c(m)/2;];
66 M = 1/h*M; 66 M = 1/h*M;
67 67
68 D2 = HI*(-M - c(1)*e_1*d1_l' + c(m)*e_r*d1_r'); 68 D2 = HI*(-M - c(1)*e_l*d1_l' + c(m)*e_r*d1_r');
69 end 69 end
70 D2 = @D2_fun; 70 D2 = @D2_fun;
71 71
72 % Fourth derivative, 0th order accurate at first 6 boundary points 72 % Fourth derivative, 0th order accurate at first 6 boundary points
73 stencil = [1, -4, 6, -4, 1]; 73 stencil = [1, -4, 6, -4, 1];