Skip to content

Commit

Permalink
regen ES kernel with max size 1 not exp(beta)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahbarnett committed Jul 17, 2024
1 parent 497de5b commit 24a68a9
Show file tree
Hide file tree
Showing 3 changed files with 304 additions and 304 deletions.
6 changes: 3 additions & 3 deletions devel/ker_ppval_coeff_mat.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
if nargin==0, test_ker_ppval_coeff_mat; return; end
if nargin<4, o=[]; end

f = @(z) exp(be*sqrt(1-z.^2)); % ES kernel on [-1,1], handles complex
f = @(z) exp(be*(sqrt(1-z.^2)-1)); % ES kernel on [-1,1], handles complex

fitd = 20; % fit degree
m = 7; % colloc pts per wall (4m>deg). Odd is better, hits Re axis
Expand Down Expand Up @@ -55,7 +55,7 @@
tol = exp(-pi*w*sqrt(1-1/sigma));
d = ceil(0.55*w+2.2); % hacking the degree rule so error << tol
end
f = @(z) exp(beta*sqrt(1-z.^2)); % must match the above, to test
f = @(z) exp(beta*(sqrt(1-z.^2)-1)); % must match the above, to test

C = ker_ppval_coeff_mat(w,d,beta);
%C/exp(beta) % shows that no advantage to truncating any tails...
Expand All @@ -65,7 +65,7 @@
for i=1:w
xi = -1+h*(2*i-1); % center of the i'th expansion, in [-1,1] supp.
erri = max(abs(f(xi+t*h) - polyval(C(end:-1:1,i),t)));
erri = erri / exp(beta); % scale to rel err to kernel peak
% erri = erri / exp(beta); % scale to rel err to kernel peak (now 1)
maxerr = max(erri,maxerr);
end
fprintf('w=%d\t d=%d\t tol=%.g\t maxerr=%.3g \tmaxerr/tol=%.3g\n',w,d,tol,maxerr,maxerr/tol)
Expand Down
Loading

0 comments on commit 24a68a9

Please sign in to comment.