function [out]=fprint(ncase,n,t,u)
%
% Function fprint displays the numerical solution to the 
% nonlinear PDE
%
% Return current value of independent variable
% (Matlab requires at least one return argument)
  out=t;
%
% Problem parameters
  [alpha,k,sigma,L,ui,ua]=par1;
  [ a, e, rhos,cps,ls,cs]=par2;
%
% Print a heading for the solution at t = 0 
  if(t<=0.0)
%
%   Label for ODE integrator
%
%   Fixed step modified Euler 
    if(ncase==1)
      fprintf('\n\n euler2a integrator\n');
% 
%   Variable step modified Euler
    elseif(ncase==2)
      fprintf('\n\n euler2b integrator\n');
%
%   Fixed step classical fourth order RK
    elseif(ncase==3)
      fprintf('\n\n rkc4a integrator\n');
%
%   Variable step classical fourth order RK 
    elseif(ncase==4)
      fprintf('\n\n rkc4b integrator\n');
%
%   Fixed step RK Fehlberg 45 
    elseif(ncase==5)		
      fprintf('\n\n rkf45a integrator\n');
%		
%   Variable step RK Fehlberg 45 
    elseif(ncase==6)
      fprintf('\n\n rkf45b integrator\n');
%
%   Fixed step SHK4 
    elseif(ncase==7)		
      fprintf('\n\n shk4a integrator\n');
%		
%   Variable step SHK4 
    elseif(ncase==8)
      fprintf('\n\n shk4b integrator\n');      
    end
%
% Heading 
  fprintf('\n ncase = %2d   n = %2d\n',ncase,n);
  fprintf('\n      t      u(1)     u(im)    u(n-1)\n');
%
% End of t = 0 heading
  end
%  	
% Grid index of midpoint 
  im=round(n)/2.0;
%	
% Display the numerical solution
  tmin=t*L^2/alpha/60.0;
  fprintf('%7.1f%10.2f%10.2f%10.2f\n',tmin,u(1),u(im),u(n-1));
%
% End of fprint
