function [ d1, d2, gamma, kappa, t0, tstop, xmin, xmax, ymin, ymax ] = ...
  gray_scott_parameters ( d1_user, d2_user, gamma_user, kappa_user, ...
  t0_user, tstop_user, xmin_user, xmax_user, ymin_user, ymax_user )

%*****************************************************************************80
%
%% gray_scott_parameters() returns the parameters of the Gray Scott 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 D1_USER: the U diffusion coefficient.
%
%    real D2_USER: the V diffusion coefficient.
%
%    real GAMMA_USER: the flow rate.
%
%    real KAPPA_USER: the kill rate.
%
%    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.
%
%    real YMIN_USER: the minimum Y value.
%
%    real YMAX_USER: the maximum Y value.
%
%  Output:
%
%    real D1: the U diffusion coefficient.
%
%    real D2: the V diffusion coefficient.
%
%    real GAMMA: the flow rate.
%
%    real KAPPA: the kill rate.
%
%    real T0: the initial time.
%
%    real TSTOP: the final time.
%
%    real XMIN: the minimum X value.
%
%    real XMAX: the maximum X value.
%
%    real YMIN: the minimum Y value.
%
%    real YMAX: the maximum Y value.
%
  persistent d1_default;
  persistent d2_default;
  persistent gamma_default;
  persistent kappa_default;
  persistent t0_default;
  persistent tstop_default;
  persistent xmin_default;
  persistent xmax_default;
  persistent ymin_default;
  persistent ymax_default;
%
%  Initialize defaults.
%
  if ( isempty ( d1_default ) )
    d1_default = 8.0E-05;;
  end

  if ( isempty ( d2_default ) )
    d2_default = 4.0E-05;
  end

  if ( isempty ( gamma_default ) )
    gamma_default = 0.024;
  end

  if ( isempty ( kappa_default ) )
    kappa_default = 0.06;
  end

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

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

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

  if ( isempty ( xmax_default ) )
    xmax_default = 2.5;
  end

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

  if ( isempty ( ymax_default ) )
    ymax_default = 2.5;
  end
%
%  Update defaults if input was supplied.
%
  if ( 1 <= nargin )
    d1_default = d1_user;
  end

  if ( 2 <= nargin )
    d2_default = d2_user;
  end

  if ( 3 <= nargin )
    gamma_default = gamma_user;
  end

  if ( 4 <= nargin )
    kappa_default = kappa_user;
  end

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

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

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

  if ( 8 <= nargin )
    xmax_default = xmax_user;
  end

  if ( 9 <= nargin )
    ymin_default = ymin_user;
  end

  if ( 10 <= nargin )
    ymax_default = ymax_user;
  end
%
%  Return values.
%
  d1 = d1_default;
  d2 = d2_default;
  gamma = gamma_default;
  kappa = kappa_default;
  t0 = t0_default;
  tstop = tstop_default;
  xmin = xmin_default;
  xmax = xmax_default;
  ymin = ymin_default;
  ymax = ymax_default;
  
  return
end

