function [ U, V ] = uv_square ( X, Y )

%*****************************************************************************80
%
%% uv_square returns the velocity vectors for square flow.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    16 June 2020
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real X(nr,nc), Y(nr,nc): the node coordinates.
%
%  Output:
%
%    real U(nr,nc), V(nr,nc): the node velocities.
%
  U = - 2.0 * X.^2 .* ( X - 1.0 ).^2 .* Y .* ( Y - 1.0 ) .* ( 2.0 * Y - 1.0 );

  V =   2.0 * Y.^2 .* ( Y - 1.0 ).^2 .* X .* ( X - 1.0 ) .* ( 2.0 * X - 1.0 );

  return
end

