Skip to content

Commit

Permalink
Merge pull request #96 from fastalgorithms/patch-chunkerfunc
Browse files Browse the repository at this point in the history
this fixes a few issues in chunkerfunc.m
  • Loading branch information
mrachh authored Oct 17, 2024
2 parents a395c7b + afd42c5 commit fec212b
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions chunkie/chunkerfunc.m
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
tsplits = [ta;tb];
end

tsplits = sort(unique(tsplits),'ascend');
tsplits = sort(uniquetol(tsplits,eps),'ascend');
lab = length(tsplits);
if (lab-1 > nchmax)
error(['CHUNKERFUNC: nchmax exceeded in chunkerfunc on initial splits.\n ',...
Expand Down Expand Up @@ -184,14 +184,15 @@

maxiter_res=nchmax-nch;

xmin = Inf;
xmax = -Inf;
ymin = Inf;
ymax = -Inf;

rad_curr = 0;
for ijk = 1:maxiter_res

% loop through all existing chunks, if resolved store, if not split
xmin = Inf;
xmax = -Inf;
ymin = Inf;
ymax = -Inf;

ifdone=1;
for ich=1:nchnew
Expand Down Expand Up @@ -224,7 +225,7 @@

resol_speed_test = err1>eps;
if nout < 2
resol_speed_test = err1>eps*k;
resol_speed_test = err1*(b-a) > eps*k;
end

xmax = max(xmax,max(r(1,:)));
Expand Down

0 comments on commit fec212b

Please sign in to comment.