comparison +sbp/D1Upwind.m @ 302:f39f98b59f61

Fixes in Upwind operators and Euler1D scheme.
author Jonatan Werpers <jonatan@werpers.com>
date Thu, 29 Sep 2016 16:27:33 +0200
parents 4b9310edcdf8
children e1d11b6a68d8 feebfca90080
comparison
equal deleted inserted replaced
289:354e40a8e1a5 302:f39f98b59f61
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)';