function [ u, v, p ] = uvp_vortex ( nu, rho, n, x, y, t )

%*****************************************************************************80
%
%% uvp_vortex() evaluates the Vortex solution.
%
%  Discussion:
%
%    The given velocity and pressure fields are exact solutions for the 2D 
%    incompressible time-dependent Navier Stokes equations over any region.
%
%    To define a typical problem, one chooses a bounded spatial region 
%    and a starting time, and then imposes boundary and initial conditions
%    by referencing the exact solution appropriately.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    24 July 2015
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real NU, the kinematic viscosity.
%
%    real RHO, the density.
%
%    integer N, the number of points at which the solution is to
%    be evaluated.
%
%    real X(N), Y(N), the coordinates of the points.
%
%    real T or T(N), the time coordinate or coordinates.
%
%  Output:
%
%    real U(N), V(N), P(N), the velocity components and
%    pressure at each of the points.
%
  cx = cos ( pi * x );
  cy = cos ( pi * y );
  c2x = cos ( 2.0 * pi * x );
  c2y = cos ( 2.0 * pi * y );
  sx = sin ( pi * x );
  sy = sin ( pi * y );

  u = - cx .* sy;
  v =   sx .* cy;
  p = - 0.25 * rho * ( c2x + c2y );

  return
end

