Mercurial > repos > public > sbplib
comparison +sbp/+implementations/d1_upwind_3.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 | 52b4cdf27633 |
comparison
equal
deleted
inserted
replaced
266:bfa130b7abf6 | 267:f7ac3cd6eeaa |
---|---|
28 e_1=sparse(m,1); | 28 e_1=sparse(m,1); |
29 e_1(1)=1; | 29 e_1(1)=1; |
30 e_m=sparse(m,1); | 30 e_m=sparse(m,1); |
31 e_m(m)=1; | 31 e_m(m)=1; |
32 | 32 |
33 Dp=HI*(Qp-1/2*e_1*e_1'+1/2*e_m*e_m') ; | 33 Dp=HI*(Qp-1/2*(e_1*e_1')+1/2*(e_m*e_m')) ; |
34 | 34 |
35 Dm=HI*(Qm-1/2*e_1*e_1'+1/2*e_m*e_m') ; | 35 Dm=HI*(Qm-1/2*(e_1*e_1')+1/2*(e_m*e_m')) ; |
36 end | 36 end |
37 | 37 |