function kursiv_pde_etdrk4_test ( )

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

  timestamp ( );

  fprintf ( 1, '\n' );
  fprintf ( 1, 'kursiv_pde_etdrk4_test()\n' );
  fprintf ( 1, '  MATLAB/Octave version %s.\n', version ( ) );
  fprintf ( 1, '  kursiv_pde_etdrk4() solves the Kuratomo-Sivashinsky equation\n' );
  fprintf ( 1, '  using the ETDRK4 method.\n' );

  nx = 128;
  [ xx, tt, uu ] = kursiv_pde_etdrk4 ( nx );


%
%  Display the results.
%
  clf ( );
  surf ( xx, tt, uu );
  shading ( 'interp' );
% lighting ( 'phong' );
  axis ( 'tight' );
  view ( [ 0.0, 90.0 ] );
  colormap ( 'autumn' );
  set ( gca, 'zlim', [ -5.0, 50.0 ] );
  light ( 'color', [ 1.0, 1.0, 0.0 ], 'position', [ -1.0, 2.0, 2.0 ] );
%
%  The "material" line seems to trigger a "1281" error in OpenGL.
%
% material ( [ 0.30, 0.60, 0.60, 40.00, 1.00 ] );
  title ( 'Kuramoto-Shivashinsky equation solved by ETD RK4' );
  xlabel ( '<-- X -->' );
  ylabel ( '<-- T -->' );

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

  rmpath ( '../kursiv_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

