Mercurial > repos > public > sbplib
comparison +sbp/D2Variable.m @ 268:4b9310edcdf8 operator_remake
Renamned boundary operators!
author | Martin Almquist <martin.almquist@it.uu.se> |
---|---|
date | Fri, 09 Sep 2016 15:06:03 +0200 |
parents | 8a625c5a3633 |
children | f36d172e196b ded4156e53e2 |
comparison
equal
deleted
inserted
replaced
267:f7ac3cd6eeaa | 268:4b9310edcdf8 |
---|---|
2 properties | 2 properties |
3 D1 % SBP operator approximating first derivative | 3 D1 % SBP operator approximating first derivative |
4 H % Norm matrix | 4 H % Norm matrix |
5 HI % H^-1 | 5 HI % H^-1 |
6 Q % Skew-symmetric matrix | 6 Q % Skew-symmetric matrix |
7 e_1 % Left boundary operator | 7 e_l % Left boundary operator |
8 e_m % Right boundary operator | 8 e_r % Right boundary operator |
9 D2 % SBP operator for second derivative | 9 D2 % SBP operator for second derivative |
10 M % Norm matrix, second derivative | 10 M % Norm matrix, second derivative |
11 S_1 % Left boundary first derivative | 11 d1_l % Left boundary first derivative |
12 S_m % Right boundary first derivative | 12 d1_r % Right boundary first derivative |
13 m % Number of grid points. | 13 m % Number of grid points. |
14 h % Step size | 14 h % Step size |
15 x % grid | 15 x % grid |
16 borrowing % Struct with borrowing limits for different norm matrices | 16 borrowing % Struct with borrowing limits for different norm matrices |
17 end | 17 end |
25 obj.h = L/(m-1); | 25 obj.h = L/(m-1); |
26 obj.x = linspace(x_l,x_r,m)'; | 26 obj.x = linspace(x_l,x_r,m)'; |
27 | 27 |
28 switch order | 28 switch order |
29 case 4 | 29 case 4 |
30 [obj.H, obj.HI, obj.D1, obj.D2, obj.e_1,... | 30 [obj.H, obj.HI, obj.D1, obj.D2, obj.e_l,... |
31 obj.e_m, obj.S_1, obj.S_m] = ... | 31 obj.e_r, obj.d1_l, obj.d1_r] = ... |
32 sbp.implementations.d2_variable_4(m,obj.h); | 32 sbp.implementations.d2_variable_4(m,obj.h); |
33 obj.borrowing.M.S = 0.2505765857; | 33 obj.borrowing.M.S = 0.2505765857; |
34 otherwise | 34 otherwise |
35 error('Invalid operator order %d.',order); | 35 error('Invalid operator order %d.',order); |
36 end | 36 end |