Mercurial > repos > public > sbplib
comparison +sbp/D1Upwind.m @ 353:fd4f1c80755d feature/hypsyst
meged with default
author | Ylva Rydin <ylva.rydin@telia.com> |
---|---|
date | Thu, 10 Nov 2016 20:49:25 +0100 |
parents | f39f98b59f61 |
children | e1d11b6a68d8 feebfca90080 |
comparison
equal
deleted
inserted
replaced
352:9b3d7fc61a36 | 353:fd4f1c80755d |
---|---|
1 classdef D1Upwind < sbp.OpSet | 1 classdef D1Upwind < sbp.OpSet |
2 properties | 2 properties |
3 D1 % SBP operator approximating first derivative | 3 Dp, Dm % 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 | |
7 e_l % Left boundary operator | 6 e_l % Left boundary operator |
8 e_r % Right boundary operator | 7 e_r % Right boundary operator |
9 m % Number of grid points. | 8 m % Number of grid points. |
10 h % Step size | 9 h % Step size |
11 x % grid | 10 x % grid |
12 borrowing % Struct with borrowing limits for different norm matrices | 11 borrowing % Struct with borrowing limits for different norm matrices |
13 end | 12 end |
14 | 13 |
15 methods | 14 methods |
16 function obj = D1Upwind(m,lim,order) | 15 function obj = D1Upwind(m,lim,order) |
17 | 16 |
18 x_l = lim{1}; | 17 x_l = lim{1}; |
19 x_r = lim{2}; | 18 x_r = lim{2}; |
20 L = x_r-x_l; | 19 L = x_r-x_l; |
21 obj.h = L/(m-1); | 20 obj.h = L/(m-1); |
22 obj.x = linspace(x_l,x_r,m)'; | 21 obj.x = linspace(x_l,x_r,m)'; |