function [ c, t0, tstop, xmin, xmax ] = advection_parameters ( c_user, ...
  t0_user, tstop_user, xmin_user, xmax_user )

%*****************************************************************************80
%
%% advection_parameters() returns the parameters of the advection PDE.
%
%  Discussion:
%
%    If input values are specified, this resets the default parameters.
%    Otherwise, the output will be the current defaults.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    04 May 2021
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real C_USER: the advection velocity.
%
%    real T0_USER: the initial time.
%
%    real TSTOP_USER: the final time.
%
%    real XMIN_USER: the minimum X value.
%
%    real XMAX_USER: the maximum X value.
%
%  Output:
%
%    real C: the advection velocity.
%
%    real T0: the initial time.
%
%    real TSTOP: the final time.
%
%    real XMIN: the minimum X value.
%
%    real XMAX: the maximum X value.
%
  persistent c_default;
  persistent t0_default;
  persistent tstop_default;
  persistent xmin_default;
  persistent xmax_default;
%
%  Initialize defaults.
%
  if ( isempty ( c_default ) )
    c_default = 5.0;
  end

  if ( isempty ( t0_default ) )
    t0_default = 0.0;
  end

  if ( isempty ( tstop_default ) )
    tstop_default = 0.08;
  end

  if ( isempty ( xmin_default ) )
    xmin_default = 0.0;
  end

  if ( isempty ( xmax_default ) )
    xmax_default = 1.0;
  end
%
%  Update defaults if input was supplied.
%
  if ( 1 <= nargin )
    c_default = c_user;
  end

  if ( 2 <= nargin )
    t0_default = t0_user;
  end

  if ( 3 <= nargin )
    tstop_default = tstop_user;
  end

  if ( 4 <= nargin )
    xmin_default = xmin_user;
  end

  if ( 5 <= nargin )
    xmax_default = xmax_user;
  end
%
%  Return values.
%
  c = c_default;
  t0 = t0_default;
  tstop = tstop_default;
  xmin = xmin_default;
  xmax = xmax_default;

  return
end

