function [ c, delta, m, t0, tstop ] = porous_medium_parameters ( c_user, ...
  delta_user, m_user, t0_user, tstop_user )

%*****************************************************************************80
%
%% porous_medium_parameters() returns parameters for the porous medium equation.
%
%  Discussion:
%
%    du/dt = Del^2 ( u^m )
%
%    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:
%
%    19 May 2024
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real c_user: a linear factor for the volume of the solution at any time. 
%
%    real delta_user: an offset to the time t.
%
%    real m_user: the power of u in the equation.  m must be greater than 1.
%
%    real t0_user: the initial time.
%
%    real tstop_user: the final time.
%
%  Output:
%
%    real c: a linear factor for the volume of the solution at any time. 
%
%    real delta: an offset to the time t.
%
%    real m: the power of u in the equation.  m must be greater than 1.
%
%    real t0: the initial time.
%
%    real tstop: the final time.
%
  persistent c_default;
  persistent delta_default;
  persistent m_default;
  persistent t0_default;
  persistent y0_default;
  persistent tstop_default;
%
%  Initialize defaults.
%
  if ( isempty ( c_default ) )
    c_default = sqrt ( 3.0 ) / 15.0;
  end

  if ( isempty ( delta_default ) )
    delta_default = 1.0 / 75.0;
  end

  if ( isempty ( m_default ) )
    m_default = 3.0;
  end

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

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

  if ( 2 <= nargin )
    delta_default = delta_user;
  end

  if ( 3 <= nargin )
    m_default = m_user;
  end

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

  if ( 5 <= nargin )
    tstop_default = tstop_user;
  end
%
%  Return values.
%
  c = c_default;
  delta = delta_default;
  m = m_default;
  t0 = t0_default;
  tstop = tstop_default;

  return
end

