Mercurial > repos > public > sbplib
changeset 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 | a29deba1d926 |
files | +sbp/+implementations/d1_gauss_4.m +sbp/D1Gauss.m |
diffstat | 2 files changed, 4 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/+sbp/+implementations/d1_gauss_4.m Tue Feb 07 13:48:11 2017 +0100 +++ b/+sbp/+implementations/d1_gauss_4.m Tue Feb 07 13:49:46 2017 +0100 @@ -1,4 +1,4 @@ -function [D1,H,x,h,e_l,e_r] = d1_gauss_4(N,L) +function [D1,H,x,h,e_l,e_r] = d1_gauss_4(L) % L: Domain length % N: Number of grid points @@ -6,9 +6,7 @@ L = 1; end -if(N~=4) - error('This operator requires exactly 4 grid points'); -end +N = 4; % Quadrature nodes on interval [-1, 1] x = [ -0.8611363115940526; -0.3399810435848563; 0.3399810435848563; 0.8611363115940526];
--- a/+sbp/D1Gauss.m Tue Feb 07 13:48:11 2017 +0100 +++ b/+sbp/D1Gauss.m Tue Feb 07 13:49:46 2017 +0100 @@ -25,9 +25,9 @@ switch m case 4 [obj.D1,obj.H,obj.x,obj.h,obj.e_l,obj.e_r] = ... - sbp.implementations.d1_gauss_4(m,L); + sbp.implementations.d1_gauss_4(L); otherwise - error('Invalid operator order %d.',order); + error('Invalid number of points: %d.', m); end