Mercurial > repos > public > sbplib
comparison +sbp/+implementations/d4_compatible_halfvariable_6.m @ 266:bfa130b7abf6 operator_remake
Added error message for too few grid points to all implementation files.
author | Martin Almquist <martin.almquist@it.uu.se> |
---|---|
date | Fri, 09 Sep 2016 11:03:13 +0200 |
parents | 6009f2712d13 |
children | f7ac3cd6eeaa |
comparison
equal
deleted
inserted
replaced
265:3e0432b3cb68 | 266:bfa130b7abf6 |
---|---|
23 | 23 |
24 % Variable koefficicients are stored in vector: c, size m, | 24 % Variable koefficicients are stored in vector: c, size m, |
25 % with the unknown stored as c(1), c(2), ..., c_m | 25 % with the unknown stored as c(1), c(2), ..., c_m |
26 % x=1:h:m*h;x=x'; | 26 % x=1:h:m*h;x=x'; |
27 % c=x.^0; | 27 % c=x.^0; |
28 | |
29 BP = 6; | |
30 if(m<2*BP) | |
31 error(['Operator requires at least ' num2str(2*BP) ' grid points']); | |
32 end | |
28 | 33 |
29 | 34 |
30 H=diag(ones(m,1),0); | 35 H=diag(ones(m,1),0); |
31 H(1:6,1:6)=diag([13649/43200,12013/8640,2711/4320,5359/4320,7877/8640, ... | 36 H(1:6,1:6)=diag([13649/43200,12013/8640,2711/4320,5359/4320,7877/8640, ... |
32 43801/43200]); | 37 43801/43200]); |