function u = smoothie ( x, t, c )

%*****************************************************************************80
%
%% smoothie 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 );

  u = ( 4.0 + 2.0 * sin(2.0*pi*xx/100.0) + sin(6.0*pi*xx/100.0) ) / 7.0;

  return
end
