function uvp2_cavity_test ( )

%*****************************************************************************80
%
%% uvp2_cavity_test samples the cavity flow on the boundary.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    27 August 2020
%
%  Author:
%
%    John Burkardt
%
  nu = 1.0;
  rho = 1.0;
  t = 0.0;

  xmin = 0.0;
  xmax = 1.0;
  ymin = 0.0;
  ymax = 1.0;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'uvp2_cavity_test\n' );
  fprintf ( 1, '  MATLAB/Octave version %s\n', version ( ) );
  fprintf ( 1, '  cavity flow\n' );
  fprintf ( 1, '  Estimate the range of velocity and pressure\n' );
  fprintf ( 1, '  on the boundary\n' );
  fprintf ( 1, '  %g <= X <= %g, %g <= Y <= %g\n', xmin, xmax, ymin, ymax );
  fprintf ( 1, '  T = %g\n', t );
  fprintf ( 1, '  Kinematic viscosity NU = %g\n', nu );
  fprintf ( 1, '  Fluid density RHO = %g\n', rho );

  n = 400;
  x = zeros ( n, 1 );
  y = zeros ( n, 1 );

  x(1:100,1) = linspace ( xmin, xmax, 100 );
  y(1:100,1) = ymin;

  x(101:200,1) = xmax;
  y(101:200,1) = linspace ( ymin, ymax, 100 );

  x(201:300,1) = linspace ( xmax, xmin, 100 );
  y(201:300,1) = ymax;

  x(301:400,1) = xmin;
  y(301:400,1) = linspace ( ymax, ymin, 100 );

  [ u, v, p ] = uvp_cavity ( nu, rho, n, x, y, t );

  fprintf ( 1, '\n' );
  fprintf ( 1, '           Minimum       Maximum\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  U:  %14.6g  %14.6g\n', min ( u ), max ( u ) );
  fprintf ( 1, '  V:  %14.6g  %14.6g\n', min ( v ), max ( v ) );
  fprintf ( 1, '  P:  %14.6g  %14.6g\n', min ( p ), max ( p ) );

  return
end
