Mercurial > repos > public > sbplib
comparison +sbp/+implementations/d1_gauss_4.m @ 409:42c4f0b545d6 feature/SBPInTimeGauss
Remove m as input to implementation function. Fix error message for invalid m to D1Gauss
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Tue, 07 Feb 2017 13:49:46 +0100 |
parents | ba73c9c8d1a6 |
children | 0bc37a25ed88 |
comparison
equal
deleted
inserted
replaced
408:ba73c9c8d1a6 | 409:42c4f0b545d6 |
---|---|
1 function [D1,H,x,h,e_l,e_r] = d1_gauss_4(N,L) | 1 function [D1,H,x,h,e_l,e_r] = d1_gauss_4(L) |
2 | 2 |
3 % L: Domain length | 3 % L: Domain length |
4 % N: Number of grid points | 4 % N: Number of grid points |
5 if(nargin < 2) | 5 if(nargin < 2) |
6 L = 1; | 6 L = 1; |
7 end | 7 end |
8 | 8 |
9 if(N~=4) | 9 N = 4; |
10 error('This operator requires exactly 4 grid points'); | |
11 end | |
12 | 10 |
13 % Quadrature nodes on interval [-1, 1] | 11 % Quadrature nodes on interval [-1, 1] |
14 x = [ -0.8611363115940526; -0.3399810435848563; 0.3399810435848563; 0.8611363115940526]; | 12 x = [ -0.8611363115940526; -0.3399810435848563; 0.3399810435848563; 0.8611363115940526]; |
15 | 13 |
16 % Shift nodes to [0,L] | 14 % Shift nodes to [0,L] |