Mercurial > repos > public > sbplib
comparison +sbp/D1Nonequidistant.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 | 3fdfad20037e |
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 m % Number of grid points. | 9 m % Number of grid points. |
10 h % Step size | 10 h % Step size |
11 x % grid | 11 x % grid |
12 borrowing % Struct with borrowing limits for different norm matrices | 12 borrowing % Struct with borrowing limits for different norm matrices |
13 end | 13 end |
70 | 70 |
71 end | 71 end |
72 | 72 |
73 obj.x = obj.x + x_l; | 73 obj.x = obj.x + x_l; |
74 | 74 |
75 obj.e_1 = sparse(m,1); | 75 obj.e_l = sparse(m,1); |
76 obj.e_m = sparse(m,1); | 76 obj.e_r = sparse(m,1); |
77 obj.e_1(1) = 1; | 77 obj.e_l(1) = 1; |
78 obj.e_m(m) = 1; | 78 obj.e_r(m) = 1; |
79 | 79 |
80 obj.HI = inv(obj.H); | 80 obj.HI = inv(obj.H); |
81 obj.Q = obj.H*obj.D1 - obj.e_m*obj.e_m' + obj.e_0*obj.e_0'; | 81 obj.Q = obj.H*obj.D1 - obj.e_r*obj.e_r' + obj.e_l*obj.e_l'; |
82 | 82 |
83 obj.borrowing = []; | 83 obj.borrowing = []; |
84 | 84 |
85 end | 85 end |
86 end | 86 end |