function allen_cahn_pde_etdrk4_test ( )

%*****************************************************************************80
%
%% allen_cahn_pde_etdrk4_test() tests allen_cahn_pde_etdrk4().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    11 April 2020
%
%  Author:
%
%    Lloyd Trefethen.
%    Modification by John Burkardt
%
  addpath ( '../allen_cahn_pde_etdrk4' );

  timestamp ( );

  fprintf ( 1, '\n' );
  fprintf ( 1, 'allen_cahn_pde_etdrk4_test():\n' );
  fprintf ( 1, '  MATLAB/Octave version %s.\n', version ( ) );
  fprintf ( 1, '  allen_cahn_pde_etdrk4() solves the Allen-Cahn equation\n' );
  fprintf ( 1, '  using the etdrk4() method.\n' );

  nx = 20;
  [ xx, tt, uu ] = allen_cahn_pde_etdrk4 ( nx );
%
%  Display the results.
%
  clf ( );
  surf ( xx, tt, uu );
% lighting ( 'phong' );
  axis ( 'tight' );
  view ( [ -40.0, 60.0 ] );
  colormap ( 'cool' );
  light ( 'color', [ 1.0, 1.0, 0.0 ], 'position', [ -10.0, 0.0, 10.0 ] );
  title ( 'Allen-Cahn equation solved by ETD RK4' );
  xlabel ( '<-- X -->' );
  ylabel ( '<-- T -->' );

  filename = 'allen_cahn_pde_etdrk4_test.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'allen_cahn_pde_etdrk4_test():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  fprintf ( 1, '\n' );
  timestamp ( );

  rmpath ( '../allen_cahn_pde_etdrk4' );

  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

