Mercurial > repos > public > sbplib
diff +sbp/D1Nonequidistant.m @ 264:8a625c5a3633 operator_remake
Changed input parameter L (domain length) to lim (cell with domain boundaries)
author | Martin Almquist <martin.almquist@it.uu.se> |
---|---|
date | Fri, 09 Sep 2016 10:39:12 +0200 |
parents | 23051a86faa4 |
children | 4b9310edcdf8 |
line wrap: on
line diff
--- a/+sbp/D1Nonequidistant.m Thu Sep 08 17:50:30 2016 +0200 +++ b/+sbp/D1Nonequidistant.m Fri Sep 09 10:39:12 2016 +0200 @@ -13,13 +13,17 @@ end methods - function obj = D1Nonequidistant(m,L,order,option) + function obj = D1Nonequidistant(m,lim,order,option) default_arg('option','Accurate'); % 'Accurate' operators are optimized for accuracy % 'Minimal' operators have the smallest possible boundary % closure + x_l = lim{1}; + x_r = lim{2}; + L = x_r-x_l; + switch option case {'Accurate','accurate','A'} @@ -66,6 +70,8 @@ end + obj.x = obj.x + x_l; + obj.e_1 = sparse(m,1); obj.e_m = sparse(m,1); obj.e_1(1) = 1;