function F=pdeasmf(it1,it2,it3,np,ar,x,y,sd,u,ux,uy,time,f)
%PDEASMF Assemble the f coefficient.

%       A. Nordmark 12-19-94.
%       Copyright (c) 1994-98 by The MathWorks, Inc.
%       $Revision: 1.7 $  $Date: 1997/11/25 17:05:11 $

avoid_arithmetics_on_NaNs=0;
if ~isieee & any(isnan(time))
  % PARABOLIC and HYPERBOLIC probes with time=NaN for
  % explicit time dependence. We must not cause any floating point
  % exceptions in this case.
  avoid_arithmetics_on_NaNs=1;
end

f=pdetexpd(x,y,sd,u,ux,uy,time,f);
if avoid_arithmetics_on_NaNs & any(isnan(f))
  F=sparse(1,1,NaN,np,1);
  return
end
f=f.*ar/3;
F=sparse(it1,1,f,np,1);
F=F+sparse(it2,1,f,np,1);
F=F+sparse(it3,1,f,np,1);

