Mercurial > repos > public > sbplib
diff +sbp/D2Variable.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 | 21a180acbd49 |
children | 4b9310edcdf8 |
line wrap: on
line diff
--- a/+sbp/D2Variable.m Thu Sep 08 17:50:30 2016 +0200 +++ b/+sbp/D2Variable.m Fri Sep 09 10:39:12 2016 +0200 @@ -17,10 +17,13 @@ end methods - function obj = D2Variable(m,L,order) + function obj = D2Variable(m,lim,order) + x_l = lim{1}; + x_r = lim{2}; + L = x_r-x_l; obj.h = L/(m-1); - obj.x = linspace(0,L,m)'; + obj.x = linspace(x_l,x_r,m)'; switch order case 4