comparison +sbp/D4CompatibleVariable.m @ 252:07fa0d6a05bb operator_remake

Renamned class files and added nonequidistant operators.
author Martin Almquist <martin.almquist@it.uu.se>
date Wed, 07 Sep 2016 13:40:41 +0200
parents
children 6009f2712d13
comparison
equal deleted inserted replaced
251:6a5e94bb5e13 252:07fa0d6a05bb
1 classdef D4CompatibleVariable < sbp.OpSet
2 properties
3 norms % Struct containing norm matrices such as H,Q, M
4 boundary % Struct contanging vectors for boundry point approximations
5 derivatives % Struct containging differentiation operators
6 borrowing % Struct with borrowing limits for different norm matrices
7 m % Number of grid points.
8 h % Step size
9 end
10
11
12
13 methods
14 function obj = D4CompatibleVariable(m,h,order)
15
16 if order == 2
17 [H, HI, D1, D2, D3, D4, e_1, e_m, M4, Q, S2_1, S2_m, S3_1, S3_m, S_1, S_m] = sbp.higher2_compatible_halfvariable(m,h);
18 obj.borrowing.N.S2 = 1.2500;
19 obj.borrowing.N.S3 = 0.4000;
20 elseif order == 4
21 [H, HI, D2, D4, e_1, e_m, M4, S2_1, S2_m, S3_1, S3_m, S_1, S_m] = sbp.higher4_compatible_halfvariable(m,h);
22 obj.borrowing.N.S2 = 0.5055;
23 obj.borrowing.N.S3 = 0.9290;
24 elseif order == 6
25 [H, HI, D2, D4, e_1, e_m, M4, S2_1, S2_m, S3_1, S3_m, S_1, S_m] = sbp.higher6_compatible_halfvariable(m,h);
26 obj.borrowing.N.S2 = 0.3259;
27 obj.borrowing.N.S3 = 0.1580;
28 else
29 error('Invalid operator order.');
30 end
31
32 obj.h = h;
33 obj.m = m;
34
35 obj.norms.H = H;
36 obj.norms.HI = HI;
37 obj.norms.N = M4;
38
39 obj.boundary.e_1 = e_1;
40 obj.boundary.S_1 = S_1;
41 obj.boundary.S2_1 = S2_1;
42 obj.boundary.S3_1 = S3_1;
43
44 obj.boundary.e_m = e_m;
45 obj.boundary.S_m = S_m;
46 obj.boundary.S2_m = S2_m;
47 obj.boundary.S3_m = S3_m;
48
49 obj.derivatives.D2 = D2;
50 obj.derivatives.D4 = D4;
51
52 end
53 end
54
55 methods (Static)
56 function lambda = smallestGrid(obj)
57 error('Not implmented')
58 end
59 end
60
61
62
63 end