-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlapfparam.m
28 lines (23 loc) · 860 Bytes
/
lapfparam.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
function val = lapfparam(kernel,xy,coord,norml,whted_rho)
%LAPFPARAM Evaluate potential generated by charges/dipoles on the boundary.
%
% Input parameters:
%
% kernel - The kernel for evaluating the potential.
% xy - An n by 2 matrix that represents the coordinates of points to
% evaluate.
% coord - A (npanel*nlege) by 2 matrix that represents the coordinates of
% Gaussian nodes on the boundary.
% norml - A (npanel*nlege) by 2 matrix that represents the normal of
% Gaussian nodes to the boundary.
% whted_rho - A (npanel*lege) by 1 array that represents the weighted
% density on the boundary.
%
% Output parameters:
%
% val - An n by 1 vector that contains potential.
val=zeros(size(xy,1),1);
for i=1:size(xy,1)
val(i)=dot(kernel(xy(i,:),coord,norml),whted_rho);
end
end