comparison +sbp/HigherPeriodic.m @ 29:32b39dc44474

Removed repository inside +sbp to make it part of the root repo.
author Jonatan Werpers <jonatan@werpers.com>
date Mon, 28 Sep 2015 08:47:28 +0200
parents
children
comparison
equal deleted inserted replaced
28:16acb2775aca 29:32b39dc44474
1 classdef HigherPeriodic < 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 = HigherCompatible(m,h,order)
15
16 if order == 2
17 [H, HI, D1, D4, e_1, e_m, M4, Q, S2_1, S2_m, S3_1, S3_m, S_1, S_m] = sbp.higher2_compatible(m,h);
18 obj.borrowing.N.S2 = 0.7500;
19 obj.borrowing.N.S3 = 0.3000;
20 elseif order == 4
21
22 [H, HI, D1, D4, e_1, e_m, M4, Q, S2_1, S2_m, S3_1, S3_m, S_1, S_m] = sbp.higher4_compatible(m,h);
23 obj.borrowing.N.S2 = 0.4210;
24 obj.borrowing.N.S3 = 0.7080;
25 elseif order == 6
26 [H, HI, D1, D4, e_1, e_m, M4, Q, S2_1, S2_m, S3_1, S3_m, S_1, S_m] = sbp.higher6_compatible(m,h);
27 obj.borrowing.N.S2 = 0.06925;
28 obj.borrowing.N.S3 = 0.05128;
29 else
30 error('Invalid operator order.');
31 end
32
33 obj.h = h;
34 obj.m = m;
35
36 obj.norms.H = H;
37 obj.norms.HI = HI;
38 obj.norms.Q = Q;
39 obj.norms.N = M4;
40
41 obj.boundary.e_1 = e_1;
42 obj.boundary.S_1 = S_1;
43 obj.boundary.S2_1 = S2_1;
44 obj.boundary.S3_1 = S3_1;
45
46 obj.boundary.e_m = e_m;
47 obj.boundary.S_m = S_m;
48 obj.boundary.S2_m = S2_m;
49 obj.boundary.S3_m = S3_m;
50
51 obj.derivatives.D1 = D1;
52 obj.derivatives.D4 = D4;
53
54 end
55 end
56
57 methods (Static)
58 function lambda = smallestGrid(obj)
59 error('Not implmented')
60 end
61 end
62
63
64
65 end