function gnuplot_gms_test ( )

%*****************************************************************************80
%
%% gnuplot_gms_test plots the GMS flow.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    19 August 2020
%
%  Author:
%
%    John Burkardt
%
  nu = 1.0;
  rho = 1.0;
  t = 1.0;

  xmin = 0.0;
  xmax = 3.0;
  ymin = 0.0;
  ymax = 3.0;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'gnuplot_gms_test:\n' );
  fprintf ( 1, '  MATLAB/Octave version %s\n', version ( ) );
  fprintf ( 1, '  GMS flow:\n' );
  fprintf ( 1, '  Generate a velocity field on a regular grid.\n' );
  fprintf ( 1, '  %g <= X <= %g, %g <= Y <= %g\n', xmin, xmax, ymin, ymax );
  fprintf ( 1, '  T = %g\n', t );
  fprintf ( 1, '  Store in GNUPLOT data and command files.\n' );

  x_num = 31;
  y_num = 31;
  [ x, y ] = grid_2d ( x_num, xmin, xmax, y_num, ymin, ymax );

  n = x_num * y_num;
  [ u, v, p ] = uvp_gms ( nu, rho, n, x, y, t );

  header = 'gms';
  s = 2.0 / max ( max ( sqrt ( u.^2 + v.^2 ) ) ) / sqrt ( n );
  ns2de_gnuplot ( header, n, x, y, u, v, p, s );

  return
end

