comparison +sbp/+implementations/d1_upwind_7.m @ 267:f7ac3cd6eeaa operator_remake

Sparsified all implementation files, removed all matlab warnings, fixed small bugs on minimum grid points.
author Martin Almquist <martin.almquist@it.uu.se>
date Fri, 09 Sep 2016 14:53:41 +0200
parents bfa130b7abf6
children
comparison
equal deleted inserted replaced
266:bfa130b7abf6 267:f7ac3cd6eeaa
29 Qp(1:6,1:6)=Q_U; 29 Qp(1:6,1:6)=Q_U;
30 Qp(m-5:m,m-5:m)=rot90(Q_U,2)'; 30 Qp(m-5:m,m-5:m)=rot90(Q_U,2)';
31 31
32 Qm=-Qp'; 32 Qm=-Qp';
33 33
34 e_1=zeros(m,1);e_1(1)=1; 34 e_1=sparse(m,1);e_1(1)=1;
35 e_m=zeros(m,1);e_m(m)=1; 35 e_m=sparse(m,1);e_m(m)=1;
36 36
37 Dp=HI*(Qp-1/2*e_1*e_1'+1/2*e_m*e_m') ; 37 Dp=HI*(Qp-1/2*(e_1*e_1')+1/2*(e_m*e_m')) ;
38 38
39 Dm=HI*(Qm-1/2*e_1*e_1'+1/2*e_m*e_m') ; 39 Dm=HI*(Qm-1/2*(e_1*e_1')+1/2*(e_m*e_m')) ;
40 end 40 end