function [F] = ff4(A,h,algor)
%
%  This function computes the F-matrix for different integration algorithms
%
% 1 = Explicit Godunov 4th order / Adams-Bashforth 3rd order
% 2 = Houbolt
%
Ah = A*h;
[n,n] = size(Ah);
Z = zeros(n);
I = eye(n);
%
%  1 = Explicit Godunov 4th order / Adams-Bashforth 3rd order
%
if algor==1,
  a21 = A(2,1);
  a22 = A(2,2);
  a21h2 = a21*h*h;
  a22h = a22*h;
  F = [ Z , I , Z , Z ; Z , Z , I , Z ; Z , Z , Z , I
        1/11 , 0 , -4/11 , 0 , -6/11 , 0 , (20/11 + 12*a21h2/11) , 12*a22h/11
        0 , 0 , 5*a21h2/12 , 5*a22h/12 , -4*a21h2/3 , -4*a22h/3 , 23*a21h2/12 , (1 + 23*a22h/12) ];
  return,
end
%
%  2 = Houbolt
%
if algor==2,
  a21 = A(2,1);
  a22 = A(2,2);
  a21h2 = a21*h*h;
  a22h = a22*h;
  F = [ Z , I , Z ; Z , Z , I
        1/2 , 0 , -2 , 0 , (5/2 + a21h2/2) , a22h/2
        7/12 , 0 , -13/6 , 0 , (19/12 + 11*a21h2/12) , 11*a22h/12 ];
  return,
end
%
return
