Skip to content

Commit

Permalink
changing rcip opts
Browse files Browse the repository at this point in the history
  • Loading branch information
jghoskins committed Mar 22, 2024
1 parent 61edb4d commit 8d65033
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion chunkie/@chunker/max.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@

% author: Travis Askham ([email protected])

rmax = max(reshape(obj.r,obj.dim,obj.k*obj.nch),[],2);
rmax = max(real(reshape(obj.r,obj.dim,obj.k*obj.nch)),[],2);
2 changes: 1 addition & 1 deletion chunkie/@chunker/min.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@

% author: Travis Askham ([email protected])

rmin = min(reshape(obj.r,obj.dim,obj.k*obj.nch),[],2);
rmin = min(real(reshape(obj.r,obj.dim,obj.k*obj.nch)),[],2);
2 changes: 1 addition & 1 deletion chunkie/chunkerflam.m
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
7 changes: 4 additions & 3 deletions chunkie/chunkermat.m
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 8 additions & 4 deletions devtools/test/flamutilitiesTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -106,23 +106,27 @@
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)

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);
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 8d65033

Please sign in to comment.