function [ ...
  u, dudt, dudx, dudxx, dudy, dudyy, us, ...
  v, dvdt, dvdx, dvdxx, dvdy, dvdyy, vs, ...
  p, dpdt, dpdx, dpdxx, dpdy, dpdyy, ps ] = all_vortex ( nu, rho, n, x, y, t )

%*****************************************************************************80
%
%% all_vortex() evaluates the variables of the vortex flow.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    21 September 2025
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real NU, the kinematic viscosity.
%
%    real RHO, the fluid density.
%
%    integer N, the number of nodes.
%
%    real X(N), Y(N), the coordinates of nodes.
%
%    real T, the current time.
%
%  Output:
%
%    real U(N), DUDT(N), DUDX(N), DUDXX(N), DUDY(N), DUDYY(N), US(N),
%    the horizontal velocity values.
%
%    real V(N), DVDT(N), DVDX(N), DVDXX(N), DVDY(N), DVDYY(N), VS(N),
%    the vertical velocity values.
%
%    real P(N), DPDT(N), DPDX(N), DPDXX(N), DPDY(N), DPDYY(N), PS(N),
%    the pressure values.
%

%
%  Make some temporaries.
%
  cx = cos ( pi * x );
  cy = cos ( pi * y );

  sx = sin ( pi * x );
  sy = sin ( pi * y );

  c2x = cos ( 2.0 * pi * x );
  c2y = cos ( 2.0 * pi * y );

  s2x = sin ( 2.0 * pi * x );
  s2y = sin ( 2.0 * pi * y );
%
%  Form the functions and derivatives for the left hand side.
%
  u    =  -                      cx .* sy;
  dudx =                    pi * sx .* sy;
  dudxx =              pi * pi * cx .* sy;
  dudy =  -                 pi * cx .* cy;
  dudyy =              pi * pi * cx .* sy;
  dudt =  0.0 * x;

  v    =                         sx .* cy;
  dvdx =                    pi * cx .* cy;
  dvdxx = -            pi * pi * sx .* cy;
  dvdy =  -                 pi * sx .* sy;
  dvdyy = -            pi * pi * sx .* cy;
  dvdt =  0.0 * x;

  p =     - 0.25 * rho           * ( c2x + c2y );
  dpdx =  + 0.5  * rho * pi      * s2x;
  dpdxx =          rho * pi * pi * s2y;
  dpdy =  + 0.5  * rho * pi      * s2y;
  dpdyy =          rho * pi * pi * s2x;
  dpdt = 0.0 * x;

  us = dudt + u .* dudx + v .* dudy + dpdx / rho - nu * ( dudxx + dudyy );
  vs = dvdt + u .* dvdx + v .* dvdy + dpdy / rho - nu * ( dvdxx + dvdyy );
  ps = dudx + dvdy;

  return
end
