diff --git a/chunkie/@chunker/refine.m b/chunkie/@chunker/refine.m index 03bbafb..f1ce045 100644 --- a/chunkie/@chunker/refine.m +++ b/chunkie/@chunker/refine.m @@ -150,9 +150,6 @@ chunklens(i) = sum(chnkr.wts(:,i)); chunklens(nch) = sum(chnkr.wts(:,nch)); - - chunklens(i) = dot(dsdti,w); - chunklens(nch) = dot(dsdtnch,w); ifdone=0; diff --git a/chunkie/@chunker/upsample.m b/chunkie/@chunker/upsample.m index 2c29616..5aeb177 100644 --- a/chunkie/@chunker/upsample.m +++ b/chunkie/@chunker/upsample.m @@ -42,10 +42,11 @@ chnkrup.wts = weights(chnkrup); if chnkr.hasdata - ndata = chnkr.size(data,1); + ndata = size(chnkr.data,1); nndata = ndata*nch; - chnkrup.r = permute(reshape(upmat*reshape( ... - permute(chnkr.datastor,[2,1,3]),k,nndata),kup,ndata,nch),[2,1,3]); + chnkrup = chnkrup.makedatarows(ndata); + chnkrup.data = permute(reshape(upmat*reshape( ... + permute(chnkr.data,[2,1,3]),k,nndata),kup,ndata,nch),[2,1,3]); end if nargin > 2 diff --git a/chunkie/demo/demo_scatter.m b/chunkie/demo/demo_scatter.m index 240383d..408fc3c 100644 --- a/chunkie/demo/demo_scatter.m +++ b/chunkie/demo/demo_scatter.m @@ -77,7 +77,7 @@ % -start = tic; in = chunkerinterior(chnkr,targets); t1 = toc(start); +start = tic; in = chunkerinterior(chnkr,{xtarg,ytarg}); t1 = toc(start); out = ~in; fprintf('%5.2e s : time to find points in domain\n',t1) diff --git a/chunkie/demo/demo_scatter_slit.m b/chunkie/demo/demo_scatter_slit.m index cee33b2..4535aff 100644 --- a/chunkie/demo/demo_scatter_slit.m +++ b/chunkie/demo/demo_scatter_slit.m @@ -61,7 +61,7 @@ % build CFIE -fkern = @(s,t) chnk.helm2d.kern(zk,s,t,'C',1); +fkern = kernel('helm','C',zk); start = tic; sysmat = chunkermat(chnkr,fkern); t1 = toc(start); @@ -72,13 +72,13 @@ % get the boundary data for a source located at the point above -kerns = @(s,t) chnk.helm2d.kern(zk,s,t,'s'); +kerns = kernel('helm','s',zk); targs = chnkr.r; targs = reshape(targs,2,chnkr.k*chnkr.nch); targstau = tangents(chnkr); targstau = reshape(targstau,2,chnkr.k*chnkr.nch); srcinfo = []; srcinfo.r = src0; targinfo = []; targinfo.r = targs; -kernmats = kerns(srcinfo,targinfo); +kernmats = kerns.eval(srcinfo,targinfo); ubdry = -kernmats*strengths; rhs = ubdry; rhs = rhs(:); @@ -115,7 +115,7 @@ fprintf('%5.2e s : time to evaluate kernel\n',t1) srcinfo = []; srcinfo.r = src0; targinfo = []; targinfo.r = targets(:,out); -uin = kerns(srcinfo,targinfo)*strengths; +uin = kerns.eval(srcinfo,targinfo)*strengths; utot = uscat(:)+uin(:); %