%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Create the source geometry %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function f = geomf(p,t,u,time)

global y
% point source at (x0,y0)
x0 = 0;
y0 = y;

np = size(p,2);
nt = size(t,2);

[ar,t1,t2,t3] = pdetrg(p,t);
[t1,tn,t2,t3] = tri2grid(p,t,zeros(np,1),x0,y0);

f = zeros(1,nt);

if ~isnan(tn)
    f(tn) = 1e6/ar(tn);
end