Mercurial > repos > public > sbplib
comparison +sbp/+implementations/d1_upwind_6.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 |
---|---|
30 Qm=-Qp'; | 30 Qm=-Qp'; |
31 | 31 |
32 e_1=sparse(m,1);e_1(1)=1; | 32 e_1=sparse(m,1);e_1(1)=1; |
33 e_m=sparse(m,1);e_m(m)=1; | 33 e_m=sparse(m,1);e_m(m)=1; |
34 | 34 |
35 Dp=HI*(Qp-1/2*e_1*e_1'+1/2*e_m*e_m') ; | 35 Dp=HI*(Qp-1/2*(e_1*e_1')+1/2*(e_m*e_m')) ; |
36 | 36 |
37 Dm=HI*(Qm-1/2*e_1*e_1'+1/2*e_m*e_m') ; | 37 Dm=HI*(Qm-1/2*(e_1*e_1')+1/2*(e_m*e_m')) ; |
38 | 38 |
39 end | 39 end |