function un = expansion_wave ( x )

%*****************************************************************************80
%
%% expansion_wave evaluates an expansion wave.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    03 June 2020
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real X(*): the node coordinates.
%
%  Output:
%
%    real UN(*): the velocity at each node.
%
  xmin = min ( x );
  xmax = max ( x );

  un = 1.0 - 0.5 * ( x <= 0.5 * ( xmax + xmin ) );

  return
end
