comparison +scheme/Utux.m @ 949:6d2167719557 feature/utux2D

Remove half-commented switch in Utux.
author Martin Almquist <malmquist@stanford.edu>
date Wed, 05 Dec 2018 15:27:44 -0800
parents 706d1c2b4199
children 2b1b944deae1 d6ab5ceba496 c12b84fe9b00
comparison
equal deleted inserted replaced
948:3dd7f87c9a1b 949:6d2167719557
15 v0 15 v0
16 end 16 end
17 17
18 18
19 methods 19 methods
20 function obj = Utux(g ,order, operator) 20 function obj = Utux(g, order, opSet)
21 default_arg('operator','Standard'); 21 default_arg('opSet',@sbp.D2Standard);
22 22
23 m = g.size(); 23 m = g.size();
24 xl = g.getBoundary('l'); 24 xl = g.getBoundary('l');
25 xr = g.getBoundary('r'); 25 xr = g.getBoundary('r');
26 xlim = {xl, xr}; 26 xlim = {xl, xr};
27 27
28 switch operator 28 ops = opSet(m, xlim, order);
29 % case 'NonEquidistant' 29 obj.D1 = ops.D1;
30 % ops = sbp.D1Nonequidistant(m,xlim,order);
31 % obj.D1 = ops.D1;
32 case 'Standard'
33 ops = sbp.D2Standard(m,xlim,order);
34 obj.D1 = ops.D1;
35 % case 'Upwind'
36 % ops = sbp.D1Upwind(m,xlim,order);
37 % obj.D1 = ops.Dm;
38 otherwise
39 error('Unvalid operator')
40 end
41 30
42 obj.grid = g; 31 obj.grid = g;
43 32
44 obj.H = ops.H; 33 obj.H = ops.H;
45 obj.Hi = ops.HI; 34 obj.Hi = ops.HI;