function f = rhs ( node_num, node_xy, time )

%*****************************************************************************80
%
%% RHS gives the right-hand side of the differential equation.
%
%  Discussion:
%
%    We assume that the equation to be solved is
%
%      dUdT - Del L(X,Y,T) Del U + K(X,Y,T) * U = F
%
%    with
%
%      L = 1,
%      K = 0,
%
%    and
%
%      F = (2*pi*pi-1)*sin(pi*x)*sin(pi*y)*exp(-t).
%
%    The exact solution is:
%
%      U = sin(pi*x) * sin(pi*y) * exp(-t)
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    02 November 2016
%
%  Author:
%
%    John Burkardt
%
%  Parameters:
%
%    Input, integer NODE_NUM, the number of points.
%
%    Input, real NODE_XY(2,NODE_NUM), the coordinates of the points.
%
%    Input, real TIME, the current time (assumed to be
%    the initial time).
%
%    Output, real F(NODE_NUM), the value of the right hand side.
%
  f(1:node_num) = ( 2.0 * pi * pi - 1.0 ) ...
     * sin ( pi * node_xy(1,1:node_num) ) ...
    .* sin ( pi * node_xy(2,1:node_num) ) * exp ( - time );

  return
end
