Skip to content

Commit f6a4db3

Browse files
authored
Merge pull request #114 from fastalgorithms/patch-jlist
fixes bug that happens for vertives with adaptive corrections
2 parents e140385 + 5047894 commit f6a4db3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

chunkie/chunkermat.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,9 @@
420420

421421
% mark off the near and self interactions
422422
for ich = 1:chnkr.nch
423-
for jch = [ich,chnkr.adj(1,ich),chnkr.adj(2,ich)]
423+
jlist = [ich,chnkr.adj(1,ich),chnkr.adj(2,ich)];
424+
jlist = jlist(jlist > 0);
425+
for jch = jlist
424426
flag((jch - 1)*chnkr.k+(1:chnkr.k), ich) = 0;
425427
end
426428
end

0 commit comments

Comments
 (0)