Mercurial > repos > public > sbplib
comparison +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 |
comparison
equal
deleted
inserted
replaced
263:21a180acbd49 | 264:8a625c5a3633 |
---|---|
15 x % grid | 15 x % grid |
16 borrowing % Struct with borrowing limits for different norm matrices | 16 borrowing % Struct with borrowing limits for different norm matrices |
17 end | 17 end |
18 | 18 |
19 methods | 19 methods |
20 function obj = D2Variable(m,L,order) | 20 function obj = D2Variable(m,lim,order) |
21 | 21 |
22 x_l = lim{1}; | |
23 x_r = lim{2}; | |
24 L = x_r-x_l; | |
22 obj.h = L/(m-1); | 25 obj.h = L/(m-1); |
23 obj.x = linspace(0,L,m)'; | 26 obj.x = linspace(x_l,x_r,m)'; |
24 | 27 |
25 switch order | 28 switch order |
26 case 4 | 29 case 4 |
27 [obj.H, obj.HI, obj.D1, obj.D2, obj.e_1,... | 30 [obj.H, obj.HI, obj.D1, obj.D2, obj.e_1,... |
28 obj.e_m, obj.S_1, obj.S_m] = ... | 31 obj.e_m, obj.S_1, obj.S_m] = ... |