comparison +sbp/D1Upwind.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
11 x % grid 11 x % grid
12 borrowing % Struct with borrowing limits for different norm matrices 12 borrowing % Struct with borrowing limits for different norm matrices
13 end 13 end
14 14
15 methods 15 methods
16 function obj = D1Upwind(m,L,order) 16 function obj = D1Upwind(m,lim,order)
17 17
18 x_l = lim{1};
19 x_r = lim{2};
20 L = x_r-x_l;
18 obj.h = L/(m-1); 21 obj.h = L/(m-1);
19 obj.x = linspace(0,L,m)'; 22 obj.x = linspace(x_l,x_r,m)';
20 23
21 switch order 24 switch order
22 case 2 25 case 2
23 [obj.H, obj.HI, obj.Dp, obj.Dm, obj.e_1, obj.e_m] = ... 26 [obj.H, obj.HI, obj.Dp, obj.Dm, obj.e_1, obj.e_m] = ...
24 sbp.implementations.d1_upwind_2(m,obj.h); 27 sbp.implementations.d1_upwind_2(m,obj.h);