From 30814beb86ffcfcba04599840f74b3dbb7dd7ebc Mon Sep 17 00:00:00 2001 From: Travis Askham Date: Wed, 29 May 2024 13:30:11 -0400 Subject: [PATCH] avoiding finding self points when we can... --- chunkie/+chnk/chunkerkerneval_smooth.m | 5 ++++- devtools/test/chunkermatapplyTest.m | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/chunkie/+chnk/chunkerkerneval_smooth.m b/chunkie/+chnk/chunkerkerneval_smooth.m index 41320c3..c3c83e8 100644 --- a/chunkie/+chnk/chunkerkerneval_smooth.m +++ b/chunkie/+chnk/chunkerkerneval_smooth.m @@ -61,7 +61,7 @@ % flag targets that are within 1e-14 of sources % these are automatically ignored by the fmm and % in chunkermat corrections -if ~strcmpi(imethod,'fmm') +if ~(strcmpi(imethod,'fmm') && isempty(flag)) flagslf = chnk.flagself(targinfo.r, chnkr.r, 1e-14*diam); if isempty(flagslf) selfzero = sparse(opdims(1)*size(targinfo.r(:,:),2), ... @@ -76,6 +76,9 @@ selfzero = sparse(flagslftarg,flagslfsrc, 1e-300, ... opdims(1)*size(targinfo.r(:,:),2), opdims(2)*chnkr.npt); end +else + selfzero = sparse(opdims(1)*size(targinfo.r(:,:),2), ... + opdims(2)*chnkr.npt); end if strcmpi(imethod,'direct') diff --git a/devtools/test/chunkermatapplyTest.m b/devtools/test/chunkermatapplyTest.m index 3cd14f4..4894d37 100644 --- a/devtools/test/chunkermatapplyTest.m +++ b/devtools/test/chunkermatapplyTest.m @@ -13,7 +13,6 @@ cparams = []; cparams.eps = 1.0e-4; -cparams.nover = 3; pref = []; pref.k = 16; narms = 5;