Mercurial > repos > public > sbplib
diff +sbp/+implementations/d4_compatible_4.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 |
line wrap: on
line diff
--- a/+sbp/+implementations/d4_compatible_4.m Fri Sep 09 10:41:31 2016 +0200 +++ b/+sbp/+implementations/d4_compatible_4.m Fri Sep 09 11:03:13 2016 +0200 @@ -25,6 +25,11 @@ % Vi b?rjar med normen. Notera att alla SBP operatorer delar samma norm, % vilket ?r n?dv?ndigt f?r stabilitet + + BP = 6; + if(m<2*BP) + error(['Operator requires at least ' num2str(2*BP) ' grid points']); + end H=diag(ones(m,1),0); H_U=[0.3e1 / 0.11e2 0 0 0 0 0; 0 0.2125516311e10 / 0.1311004640e10 0 0 0 0; 0 0 0.278735189e9 / 0.1966506960e10 0 0 0; 0 0 0 0.285925927e9 / 0.163875580e9 0 0; 0 0 0 0 0.1284335339e10 / 0.1966506960e10 0; 0 0 0 0 0 0.4194024163e10 / 0.3933013920e10;];