function ui = ic_expansion ( x )

%*****************************************************************************80
%
%% ic_expansion() evaluates the initial condition for an expansion wave.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    22 April 2012
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real X(*), the node coordinates.
%
%  Output:
%
%    real UI(*), the value of the initial condition at each node.
%
  ul = 0.5;
  ur = 1.0;

  ui = 1.0 - 0.5 * ( x <= 0.0 );

  return
end
