comparison +scheme/Utux.m @ 571:38c3da9675a5 feature/utux2D

Bug fixes in scheme.Utux
author Martin Almquist <martin.almquist@it.uu.se>
date Tue, 22 Aug 2017 13:53:31 +0200
parents 05947fc2505c
children 4a73b2aab91f
comparison
equal deleted inserted replaced
464:d4b999585af1 571:38c3da9675a5
1 classdef Utux < scheme.Scheme 1 classdef Utux < scheme.Scheme
2 properties 2 properties
3 m % Number of points in each direction, possibly a vector 3 m % Number of points in each direction, possibly a vector
4 h % Grid spacing 4 h % Grid spacing
5 x % Grid 5 grid % Grid
6 order % Order accuracy for the approximation 6 order % Order accuracy for the approximation
7 7
8 H % Discrete norm 8 H % Discrete norm
9 D 9 D
10 10
16 end 16 end
17 17
18 18
19 methods 19 methods
20 function obj = Utux(m,xlim,order,operator) 20 function obj = Utux(m,xlim,order,operator)
21 default_arg('a',1); 21 default_arg('operator','Standard');
22 22
23 %Old operators 23 %Old operators
24 % [x, h] = util.get_grid(xlim{:},m); 24 % [x, h] = util.get_grid(xlim{:},m);
25 %ops = sbp.Ordinary(m,h,order); 25 %ops = sbp.Ordinary(m,h,order);
26 26
36 ops = sbp.D1Upwind(m,xlim,order); 36 ops = sbp.D1Upwind(m,xlim,order);
37 obj.D1 = ops.Dm; 37 obj.D1 = ops.Dm;
38 otherwise 38 otherwise
39 error('Unvalid operator') 39 error('Unvalid operator')
40 end 40 end
41 obj.x=ops.x; 41
42 obj.grid=ops.x;
42 43
43
44 obj.H = ops.H; 44 obj.H = ops.H;
45 obj.Hi = ops.HI; 45 obj.Hi = ops.HI;
46 46
47 obj.e_l = ops.e_l; 47 obj.e_l = ops.e_l;
48 obj.e_r = ops.e_r; 48 obj.e_r = ops.e_r;
49 obj.D=obj.D1; 49 obj.D = -obj.D1;
50 50
51 obj.m = m; 51 obj.m = m;
52 obj.h = ops.h; 52 obj.h = ops.h;
53 obj.order = order; 53 obj.order = order;
54 obj.x = ops.x;
55 54
56 end 55 end
57 % Closure functions return the opertors applied to the own doamin to close the boundary 56 % Closure functions return the opertors applied to the own doamin to close the boundary
58 % Penalty functions return the opertors to force the solution. In the case of an interface it returns the operator applied to the other doamin. 57 % Penalty functions return the opertors to force the solution. In the case of an interface it returns the operator applied to the other doamin.
59 % boundary is a string specifying the boundary e.g. 'l','r' or 'e','w','n','s'. 58 % boundary is a string specifying the boundary e.g. 'l','r' or 'e','w','n','s'.