function [ nu, xi, t0, tstop, xmin, xmax ] = allen_cahn_parameters ( nu_user, ...
  xi_user, t0_user, tstop_user, xmin_user, xmax_user )

%*****************************************************************************80
%
%% allen_cahn_parameters() returns the parameters of the Allen Cahn ODE.
%
%  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:
%
%    03 May 2021
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real NU_USER: the diffusion coefficient.
%
%    real XI_USER: the interface thickness.
%
%    real T0_USER: the initial time.
%
%    real TSTOP_USER: the final time.
%
%    real XMIN_USER: the left spatial endpoint.
%
%    real XMAX_USER: the right spatial endpoint.
%
%  Output:
%
%    real NU: the diffusion coefficient.
%
%    real XI: the interface thickness.
%
%    real T0: the initial time.
%
%    real TSTOP: the final time.
%
%    real XMIN: the left spatial endpoint.
%
%    real XMAX: the right spatial endpoint.
%
  persistent nu_default;
  persistent xi_default;
  persistent t0_default;
  persistent tstop_default;
  persistent xmin_default;
  persistent xmax_default;
%
%  Initialize defaults.
%
  if ( isempty ( nu_default ) )
    nu_default = 1.0;
  end

  if ( isempty ( xi_default ) )
    xi_default = 0.015;
  end

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

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

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

  if ( isempty ( xmax_default ) )
    xmax_default = 2.0;
  end
%
%  Update defaults if input was supplied.
%
  if ( 1 <= nargin )
    nu_default = nu_user;
  end

  if ( 2 <= nargin )
    xi_default = xi_user;
  end

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

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

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

  if ( 6 <= nargin )
    xmax_default = xmax_user;
  end
%
%  Return values.
%
  nu = nu_default;
  xi = xi_default;
  t0 = t0_default;
  tstop = tstop_default;
  xmin = xmin_default;
  xmax = xmax_default;
  
  return
end

