function tumor_pdepe ( )

%*****************************************************************************80
%
%% tumor_pdepe() uses pdepe() to solve the tumor PDE.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    04 May 2021
%
%  Author:
%
%    Original version by Chiara Villa.
%    Modifications by John Burkardt
%
%  Reference:
%
%    Mark Chaplain, Andrew Stuart,
%    A model mechanism for the chemotactic response of endothelial cells
%    to tumor angiogenesis factor,
%    IMA Journal of Mathematics Applied to Medicine & Biology,
%    Volume 10, Number 3, pages 149-168, September 1993.
%
%    Willem Hundsdorfer, Jan Verwer,
%    Numerical solution of time-dependent advection-diffusion-reaction equations,
%    Springer, 2003,
%    ISBN: 978-3-662-09017-6
%
%    Chiara Villa,
%    Mathematical modelling of tumour-induced angiogensis,
%    University of St Andrews, 2018
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'tumor_pdepe():\n' );
  fprintf ( 1, '  Use pdepe() to solve the tumor PDE.\n' );

  [ alpha, beta, cstar, delta, epsilon, gamma, k, lambda, mu, t0, tstop, ...
    xmin, xmax ] = tumor_parameters ( );

  nx = 201;
  x = linspace ( xmin, xmax, nx );

  nt = 15
  dt = ( tstop - t0 ) / ( nt - 1 );
  t = linspace ( t0, tstop, nt );
%
%  Solution requested at TSOLVE values.
%
  tsolve = [ 0.0, 0.1, 0.3, 0.5, 0.7 ];
%
%  M = 0 indicates "slab symmetry" of the region.
%  That is, 1D Cartesian coordinates with no symmetry imposed.
%
  m = 0;
%
%  PDEPE computes the solution.
%
  sol = pdepe ( m, @tumor_fun, @tumor_ic, @tumor_bc, x, tsolve );
%
%  Display component 1 over time.
%
  figure ( ); 
  clf ( );
  hold ( 'on' );
    a1 = plot ( x, sol(1,:,1), 'linewidth', 3 );
    r1 = 't = 0.0';
    a2 = plot ( x, sol(2,:,1), 'linewidth', 3 );
    r2 = 't = 0.1';
    a3 = plot ( x, sol(3,:,1), 'linewidth', 3 );
    r3 = 't = 0.3';
    a4 = plot ( x, sol(4,:,1), 'linewidth', 3 );
    r4 = 't = 0.5';
    a5 = plot ( x, sol(5,:,1), 'linewidth', 3 );
    r5 = 't = 0.7';
  hold ( 'off' );
  grid ( 'on' );
  xlabel ( 'Distance' );
  ylabel ( 'TAF concentration near tumor' );
  title ( 'tumor pdepe: Tumor Angiogenesis Factor' );
  legend ( [ a1; a2; a3; a4; a5 ], r1, r2, r3, r4, r5 );
  filename = 'tumor_pdepe_taf.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
%
%  Display component 2 over time.
%
  figure ( );
  clf ( );
  hold ( 'on' );
    b1 = plot ( x, sol(1,:,2), 'linewidth', 3 );
    s1 = 't = 0.0';
    b2 = plot ( x, sol(2,:,2), 'linewidth', 3 );
    s2 = 't = 0.1';
    b3 = plot ( x, sol(3,:,2), 'linewidth', 3 );
    s3 = 't = 0.3';
    b4 = plot ( x, sol(4,:,2), 'linewidth', 3 );
    s4 = 't = 0.5';
    b5 = plot ( x, sol(5,:,2), 'linewidth', 3 );
    s5 = 't = 0.7';
  hold ( 'off' );
  grid ( 'on' );
  xlabel ( 'Distance' );
  ylabel ( 'Density' );
  title ( 'tumor pdepe: Endothelial cell density near tumor' );
  legend ( [ b1; b2; b3; b4; b5 ], s1, s2, s3, s4, s5, 'Location', 'North' );
  filename = 'tumor_pdepe_density.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'tumor_pdepe():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  return
end


