function [ k, xmin, xmax, ymin, ymax ] = biharmonic_fd2d_parameters ( k_user, ...
  xmin_user, xmax_user, ymin_user, ymax_user )

%*****************************************************************************80
%
%% biharmonic_fd2d_parameters() returns parameters for the 2D biharmonic equation.
%
%  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:
%
%    30 May 2021
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer K_USER:
%
%    real XMIN_USER, XMAX_USER: the X limits.
%
%    real YMIN_USER, YMAX_USER: the Y limits.
%
%  Output:
%
%    integer K:
%
%    real XMIN, XMAX: the X limits.
%
%    real YMIN, YMAX: the Y limits.
%
  persistent k_default;
  persistent xmax_default;
  persistent xmin_default;
  persistent ymax_default;
  persistent ymin_default;
%
%  Initialize defaults.
%
  if ( isempty ( k_default ) )
    k_default = 1;           
  end

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

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

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

  if ( isempty ( ymax_default ) )
    ymax_default = 1.0;
  end
%
%  Update defaults if input was supplied.
%
  if ( 1 <= nargin )
    k_default = k_user;
  end

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

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

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

  if ( 5 <= nargin )
    ymax_default = ymax_user;
  end
%
%  Return values.
%
  k = k_default;
  xmin = xmin_default;
  xmax = xmax_default;
  ymin = ymin_default;
  ymax = ymax_default;

  return
end

