function allen_cahn_pde_euler_test ( )

%*****************************************************************************80
%
%% allen_cahn_pde_euler_test() tests allen_cahn_pde_euler().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    12 March 2024
%
%  Author:
%
%    Original MATLAB version by Lloyd Trefethen.
%    This version by John Burkardt
%
  addpath ( '../allen_cahn_pde_euler' );

  timestamp ( );

  fprintf ( 1, '\n' );
  fprintf ( 1, 'allen_cahn_pde_euler_test():\n' );
  fprintf ( 1, '  MATLAB/Octave version %s.\n', version ( ) );
  fprintf ( 1, '  allen_cahn_pde_euler() solves the Allen-Cahn equations\n' );
  fprintf ( 1, '  using the Euler method.\n' );

  nx = 20;
  [ xx, tt, uu ] = allen_cahn_pde_euler ( 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 solve by Euler method' );
  xlabel ( '<-- X -->' );
  ylabel ( '<-- T -->' );

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

  rmpath ( '../allen_cahn_pde_euler' );

  return
end
function timestamp ( )

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

  return
end

