function schroedinger_nonlinear_pde_test ( )

%*****************************************************************************80
%
%% schroedinger_nonlinear_pde_test() solves the nonlinear Schroedinger PDE.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    19 April 2021
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../schroedinger_nonlinear_pde' );

  timestamp ( );

  fprintf ( 1, '\n' );
  fprintf ( 1, 'schroedinger_nonlinear_pde_test\n' );
  fprintf ( 1, '  MATLAB/Octave version %s\n', version ( ) );
  fprintf ( 1, '  Solve the nonlinear Schroedinger PDE\n' );
  fprintf ( 1, '  using the method of lines\n' );
  fprintf ( 1, '  and various ODE solvers.\n' );
%
%  Get the parameter values.
%
  [ alpha, c1, c2, delta, gamma, t0, xmin, xmax ] = ...
    schroedinger_nonlinear_parameters ( );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Parameter values:\n' );
  fprintf ( 1, '    alpha = %g\n', alpha );
  fprintf ( 1, '    c1    = %g\n', c1 );
  fprintf ( 1, '    c2    = %g\n', c2 );
  fprintf ( 1, '    delta = %g\n', delta );
  fprintf ( 1, '    gamma = %g\n', gamma );
  fprintf ( 1, '    t0    = %g\n', t0 );
  fprintf ( 1, '    xmin  = %g\n', xmin );
  fprintf ( 1, '    xmax  = %g\n', xmax );

  nx = 201;
  schroedinger_nonlinear_ode45 ( nx );

  nx = 201;
  nt = 2500;
  schroedinger_nonlinear_midpoint ( nx, nt );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'schroedinger_nonlinear_pde_test\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  timestamp ( );

  rmpath ( '../schroedinger_nonlinear_pde' );

  return
end
function timestamp ( )

%*****************************************************************************80
%
%% timestamp() prints the current YMDHMS date as a timestamp.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 February 2003
%
%  Author:
%
%    John Burkardt
%
  t = now;
  c = datevec ( t );
  s = datestr ( c, 0 );
  fprintf ( 1, '%s\n', s );

  return
end

