-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
more stuff in fixing chunker mat, adding non-legendre points option t…
…o proxyfun, and derivative of c in kernel in helmholtz, fixing small typo of abs vs sqrt(z2)
- Loading branch information
Showing
8 changed files
with
100 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,17 @@ | |
% Syntax: mat = chunkerkernevalmat(chnkr,kern,targs,opts) | ||
% | ||
% Input: | ||
% chnkr - chunker object description of curve | ||
% kern - integral kernel taking inputs kern(srcinfo,targinfo) | ||
% chnkr - chunker object describing boundary, currently | ||
% only supports chunkers, and not chunkgraphs | ||
% kern - kernel function. By default, this should be a function handle | ||
% accepting input of the form kern(srcinfo,targinfo), where srcinfo | ||
% and targinfo are in the ptinfo struct format, i.e. | ||
% ptinfo.r - positions (2,:) array | ||
% ptinfo.d - first derivative in underlying | ||
% parameterization (2,:) | ||
% ptinfo.n - unit normals (2,:) | ||
% ptinfo.d2 - second derivative in underlying | ||
% parameterization (2,:) | ||
% targobj - object describing the target points, can be specified as | ||
% * array of points | ||
% * chunker object | ||
|
@@ -41,6 +50,37 @@ | |
|
||
% author: Travis Askham ([email protected]) | ||
|
||
% convert kernel to kernel object, put in singularity info | ||
% opts.sing provides a default value for singularities if not | ||
% defined for kernels | ||
|
||
if isa(kern,'function_handle') | ||
kern2 = kernel(kern); | ||
kern = kern2; | ||
elseif isa(kern,'cell') | ||
sz = size(kern); | ||
kern2(sz(1),sz(2)) = kernel(); | ||
for j = 1:sz(2) | ||
for i = 1:sz(1) | ||
if isa(kern{i,j},'function_handle') | ||
kern2(i,j) = kernel(kern{i,j}); | ||
elseif isa(kern{i,j},'kernel') | ||
kern2(i,j) = kern{i,j}; | ||
else | ||
msg = "Second input is not a kernel object, function handle, " ... | ||
+ "or cell array"; | ||
error(msg); | ||
end | ||
end | ||
end | ||
kern = kern2; | ||
|
||
elseif ~isa(kern,'kernel') | ||
msg = "Second input is not a kernel object, function handle, " ... | ||
+ "or cell array"; | ||
error(msg); | ||
end | ||
|
||
% determine operator dimensions using first two points | ||
|
||
|
||
|
@@ -51,7 +91,9 @@ | |
targinfo.r = chnkr.r(:,2); targinfo.d = chnkr.d(:,2); | ||
targinfo.d2 = chnkr.d2(:,2); targinfo.n = chnkr.n(:,2); | ||
|
||
ftemp = kern(srcinfo,targinfo); | ||
ftmp = kern.eval; | ||
|
||
ftemp = ftmp(srcinfo,targinfo); | ||
opdims = size(ftemp); | ||
|
||
if nargin < 4 | ||
|
@@ -96,24 +138,26 @@ | |
optsadap = []; | ||
optsadap.eps = eps; | ||
|
||
|
||
|
||
if forcesmooth | ||
mat = chunkerkernevalmat_smooth(chnkr,kern,opdims,targinfo, ... | ||
mat = chunkerkernevalmat_smooth(chnkr,ftmp,opdims,targinfo, ... | ||
[],optssmooth); | ||
return | ||
end | ||
|
||
if forceadap | ||
mat = chunkerkernevalmat_adap(chnkr,kern,opdims, ... | ||
mat = chunkerkernevalmat_adap(chnkr,ftmp,opdims, ... | ||
targinfo,[],optsadap); | ||
return | ||
end | ||
|
||
if forcepqud | ||
optsflag = []; optsflag.fac = fac; | ||
flag = flagnear(chnkr,targinfo.r,optsflag); | ||
spmat = chunkerkernevalmat_ho(chnkr,kern,opdims, ... | ||
spmat = chunkerkernevalmat_ho(chnkr,ftmp,opdims, ... | ||
targinfo,flag,optsadap); | ||
mat = chunkerkernevalmat_smooth(chnkr,kern,opdims,targinfo, ... | ||
mat = chunkerkernevalmat_smooth(chnkr,ftmp,opdims,targinfo, ... | ||
flag,opts); | ||
mat = mat + spmat; | ||
return | ||
|
@@ -123,15 +167,15 @@ | |
|
||
optsflag = []; optsflag.fac = fac; | ||
flag = flagnear(chnkr,targinfo.r,optsflag); | ||
spmat = chunkerkernevalmat_adap(chnkr,kern,opdims, ... | ||
spmat = chunkerkernevalmat_adap(chnkr,ftmp,opdims, ... | ||
targinfo,flag,optsadap); | ||
|
||
if nonsmoothonly | ||
mat = spmat; | ||
return; | ||
end | ||
|
||
mat = chunkerkernevalmat_smooth(chnkr,kern,opdims,targinfo, ... | ||
mat = chunkerkernevalmat_smooth(chnkr,ftmp,opdims,targinfo, ... | ||
flag,opts); | ||
|
||
mat = mat + spmat; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters