Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changing rcip opts #60

Merged
merged 1 commit into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading