comparison diracDiscr.m @ 648:9e5dd0d3cf60 feature/d1_staggered

Bugfix right boundary in diracDiscr
author Martin Almquist <malmquist@stanford.edu>
date Tue, 14 Nov 2017 15:35:51 -0800
parents 0990765e3e4d
children 1bdbe026abbc
comparison
equal deleted inserted replaced
647:46c40711830f 648:9e5dd0d3cf60
22 x_0=(x_0in-x(1))/(x(tot)-x(1)); 22 x_0=(x_0in-x(1))/(x(tot)-x(1));
23 norm=fnorm(1:tot)/h; 23 norm=fnorm(1:tot)/h;
24 24
25 % Use last tot grid points 25 % Use last tot grid points
26 elseif length(poss)<tot && eta(end)<eta(1) 26 elseif length(poss)<tot && eta(end)<eta(1)
27 index = length(x)-tot:tot; 27 index = length(x)-tot+1:length(x);
28 pol = (x(end-tot:end)-x(end-tot))/(x(end)-x(end-tot)); 28 pol = (x(end-tot+1:end)-x(end-tot+1))/(x(end)-x(end-tot+1));
29 norm = fnorm(end-tot:end)/h; 29 norm = fnorm(end-tot+1:end)/h;
30 x_0 = (x_0in-x(end-tot))/(x(end)-x(end-tot)); 30 x_0 = (x_0in-x(end-tot+1))/(x(end)-x(end-tot+1));
31 31
32 % Interior 32 % Interior
33 else 33 else
34 pol = (x(poss)-x(poss(1)))/(x(poss(end))-x(poss(1))); 34 pol = (x(poss)-x(poss(1)))/(x(poss(end))-x(poss(1)));
35 x_0 = (x_0in-x(poss(1)))/(x(poss(end))-x(poss(1))); 35 x_0 = (x_0in-x(poss(1)))/(x(poss(end))-x(poss(1)));