function u = bumpy ( x, t, c )

%*****************************************************************************80
%
%% bumpy evaluates a traveling wave that satisfies the advection equation.
%
%  Discussion:
%
%    The wave is assumed to be traveling in a periodic region
%    0 <= x <= 100.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    29 May 2020
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real x, t, c: the spatial location, time, and wave velocity.
%
%  Output:
%
%    real u: the "height" of the wave at location x and time t.
%
  xmin = 0.0;
  xmax = 100.0;
  xx = xmin + mod ( x - c * t, xmax - xmin );

  n = length ( x );
  u(1:n) = 0.1;
  i = find ( 20.0 <= xx & xx <= 40.0 );
  u(i) = 0.8;
  j = find ( 60.0 <= xx & xx <= 80.0 );
  u(j) = 0.5;

  return
end
