function continuity_exact_test02 ( )

%*****************************************************************************80
%
%% continuity_exact_test02() generates a field and samples its residuals.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    17 January 2015
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'continuity_exact_test02:\n' );
  fprintf ( 1, '  Sample a spiral velocity field and estimate the\n' );
  fprintf ( 1, '  range of residuals in the continuity equation.\n' );

  n = 1000;

  x = rand ( n, 1 );
  y = rand ( n, 1 );

  c = 1.00;

  pr = resid_spiral ( n, x, y, c );

  fprintf ( 1, '\n' );
  fprintf ( 1, '           Minimum       Maximum\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Pr:  %14.6g  %14.6g\n', min ( abs ( pr ) ), max ( abs ( pr ) ) );

  return
end

