Mercurial > repos > public > sbplib
comparison +sbp/D2Variable.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 D2Variable < 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 methods | |
12 function obj = D2Variable(m,h,order) | |
13 | |
14 switch order | |
15 case 4 | |
16 [H, HI, D1, D2, e_1, e_m, S_1, S_m] = sbp.variable4(m,h); | |
17 obj.borrowing.M.S = 0.2505765857; | |
18 otherwise | |
19 error('Invalid operator order %d.',order); | |
20 end | |
21 | |
22 obj.h = h; | |
23 obj.m = m; | |
24 | |
25 obj.norms.H = H; | |
26 obj.norms.HI = HI; | |
27 % obj.norms.Q = Q; | |
28 % obj.norms.M = M; | |
29 | |
30 obj.boundary.e_1 = e_1; | |
31 obj.boundary.S_1 = S_1; | |
32 | |
33 obj.boundary.e_m = e_m; | |
34 obj.boundary.S_m = S_m; | |
35 | |
36 obj.derivatives.D1 = D1; | |
37 obj.derivatives.D2 = D2; | |
38 | |
39 end | |
40 end | |
41 | |
42 methods (Static) | |
43 function lambda = smallestGrid(obj) | |
44 error('Not implmented') | |
45 end | |
46 end | |
47 end | |
48 | |
49 | |
50 | |
51 | |
52 |