From 8d65033d19e3ce239836535741b0ae9711b98fc4 Mon Sep 17 00:00:00 2001 From: jghoskins <32715900+jghoskins@users.noreply.github.com> Date: Fri, 22 Mar 2024 09:55:45 -0500 Subject: [PATCH] changing rcip opts --- chunkie/@chunker/max.m | 2 +- chunkie/@chunker/min.m | 2 +- chunkie/chunkerflam.m | 2 +- chunkie/chunkermat.m | 7 ++++--- devtools/test/flamutilitiesTest.m | 12 ++++++++---- 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/chunkie/@chunker/max.m b/chunkie/@chunker/max.m index 39b4c42..b62fa85 100644 --- a/chunkie/@chunker/max.m +++ b/chunkie/@chunker/max.m @@ -17,4 +17,4 @@ % author: Travis Askham (askhamwhat@gmail.com) -rmax = max(reshape(obj.r,obj.dim,obj.k*obj.nch),[],2); \ No newline at end of file +rmax = max(real(reshape(obj.r,obj.dim,obj.k*obj.nch)),[],2); \ No newline at end of file diff --git a/chunkie/@chunker/min.m b/chunkie/@chunker/min.m index cf8648d..6ed706a 100644 --- a/chunkie/@chunker/min.m +++ b/chunkie/@chunker/min.m @@ -17,4 +17,4 @@ % author: Travis Askham (askhamwhat@gmail.com) -rmin = min(reshape(obj.r,obj.dim,obj.k*obj.nch),[],2); \ No newline at end of file +rmin = min(real(reshape(obj.r,obj.dim,obj.k*obj.nch)),[],2); \ No newline at end of file diff --git a/chunkie/chunkerflam.m b/chunkie/chunkerflam.m index fb1a1e5..9d4590d 100644 --- a/chunkie/chunkerflam.m +++ b/chunkie/chunkerflam.m @@ -244,7 +244,7 @@ mmax = max([mmax,max(chnkr)],[],2); mmin = min([mmin,min(chnkr)],[],2); end - +xflam = real(xflam); width = max(mmax-mmin); chnkrtotal = merge(chnkrs); diff --git a/chunkie/chunkermat.m b/chunkie/chunkermat.m index 25f8bf2..f3fd7bd 100644 --- a/chunkie/chunkermat.m +++ b/chunkie/chunkermat.m @@ -485,11 +485,12 @@ [Pbc,PWbc,starL,circL,starS,circS,ilist,starL1,circL1] = ... chnk.rcip.setup(ngl,ndim,nedge,isstart); - - % this might need to be fixed in triple junction case + optsrcip = opts; + optsrcip.nonsmoothonly = false; + R = chnk.rcip.Rcompchunk(chnkrs,iedgechunks,kern,ndim, ... Pbc,PWbc,nsub,starL,circL,starS,circS,ilist,starL1,circL1,... - sbclmat,sbcrmat,lvmat,rvmat,u,opts); + sbclmat,sbcrmat,lvmat,rvmat,u,optsrcip); sysmat_tmp = inv(R) - eye(2*ngl*nedge*ndim); if (~nonsmoothonly) diff --git a/devtools/test/flamutilitiesTest.m b/devtools/test/flamutilitiesTest.m index cd8d7bb..6290065 100644 --- a/devtools/test/flamutilitiesTest.m +++ b/devtools/test/flamutilitiesTest.m @@ -106,16 +106,18 @@ fprintf('%5.2e s : time to build tridiag\n',t1) spmat = spmat + speye(npt); +inds = find(spmat); +spmat(inds) = sys(inds); % test matrix entry evaluator start = tic; -% opdims = [1 1]; -opdims = ones([2,1,1]); + opdims = [1 1]; +%opdims = ones([2,1,1]); +%sys2 = chnk.flam.kernbyindex(1:npt,1:npt,cgrph,kernd,opdims,spmat); sys2 = chnk.flam.kernbyindex(1:npt,1:npt,cgrph,kernd,opdims,spmat); - t1 = toc(start); fprintf('%5.2e s : time for mat entry eval on whole mat\n',t1) @@ -123,6 +125,8 @@ err2 = norm(sys2-sys,'fro')/norm(sys,'fro'); fprintf('%5.2e : fro error of build \n',err2) + assert(err2 < 1e-10); + xflam = cgrph.r(:,:); matfun = @(i,j) chnk.flam.kernbyindex(i,j,cgrph,kernd,opdims,spmat); @@ -163,7 +167,7 @@ fprintf('difference between fast-direct and iterative %5.2e\n',err) -% assert(err < 1e-10); + assert(err < 1e-10); % evaluate at targets and compare