2747       INTEGER i, ifail, im1, ip1, ipar, iq, j, k, km1, km2, knew,
  2748      1      kold, kp1, kp2, ksteps, l, limit1, limit2, neqn, ns, nsm2,
  2750       DOUBLE PRECISION absh, alpha, beta, big, 
d1mach,
  2751      1      eps, erk, erkm1, erkm2, erkp1, err,
  2752      2      fouru, g, gi, gstr, h, hnew, hold, p, p5eps, phi, psi, r,
  2753      3      reali, realns, rho, round, rpar, sig, 
tau, temp1,
  2754      4      temp2, temp3, temp4, temp5, temp6, two, twou, u, v, w, wt,
  2756       LOGICAL start,crash,phase1,nornd
  2757       dimension y(*),wt(*),phi(neqn,16),p(*),yp(*),psi(12),
  2758      1  alpha(12),beta(12),sig(13),v(12),w(12),g(13),gi(11),iv(10),
  2760       dimension two(13),gstr(13)
  2764       DATA two(1),two(2),two(3),two(4),two(5),two(6),two(7),two(8),
  2765      1     two(9),two(10),two(11),two(12),two(13)
  2766      2     /2.0d0,4.0d0,8.0d0,16.0d0,32.0d0,64.0d0,128.0d0,256.0d0,
  2767      3      512.0d0,1024.0d0,2048.0d0,4096.0d0,8192.0d0/
  2768       DATA gstr(1),gstr(2),gstr(3),gstr(4),gstr(5),gstr(6),gstr(7),
  2769      1     gstr(8),gstr(9),gstr(10),gstr(11),gstr(12),gstr(13)
  2770      2     /0.5d0,0.0833d0,0.0417d0,0.0264d0,0.0188d0,0.0143d0,0.0114d0,
  2771      3      0.00936d0,0.00789d0,0.00679d0,0.00592d0,0.00524d0,0.00468d0/
  2783       IF(abs(h) .GE. fouru*abs(x)) 
GO TO 5
  2784       h = sign(fouru*abs(x),h)
  2792  10     round = round + (y(l)/wt(l))**2
  2793       round = twou*sqrt(round)
  2794       IF(p5eps .GE. round) 
GO TO 15
  2795       eps = 2.0d0*round*(1.0d0 + fouru)
  2801       IF(.NOT.start) 
GO TO 99
  2818       CALL dhstrt(
df,neqn,x,x+h,y,yp,wt,1,u,big,
  2819      1             phi(1,3),phi(1,4),phi(1,5),phi(1,6),rpar,ipar,h)
  2828       IF(p5eps .GT. 100.0d0*round) 
GO TO 99
  2831  25     phi(l,15) = 0.0d0
  2848       IF(h .NE. hold) ns = 0
  2849       IF (ns.LE.kold) ns = ns+1
  2851       IF (k .LT. ns) 
GO TO 199
  2858       alpha(ns) = 1.0d0/realns
  2861       IF(k .LT. nsp1) 
GO TO 110
  2866         beta(i) = beta(im1)*psi(im1)/temp2
  2870  105    sig(i+1) = reali*alpha(i)*sig(i)
  2877       IF(ns .GT. 1) 
GO TO 120
  2884       IF (k .EQ. 1) 
GO TO 140
  2891  120  
IF(k .LE. kprev) 
GO TO 130
  2892       IF (ivc .EQ. 0) 
GO TO 122
  2900       IF (k .NE. 2) 
GO TO 123
  2904       IF(nsm2 .LT. jv) 
GO TO 130
  2907         v(i) = v(i) - alpha(j+1)*v(i+1)
  2909       IF (i .NE. 2) 
GO TO 130
  2915  130  limit1 = kp1 - ns
  2917       DO 135 iq = 1,limit1
  2918         v(iq) = v(iq) - temp5*v(iq+1)
  2921       IF (limit1 .EQ. 1) 
GO TO 137
  2924  137  w(limit1+1) = v(limit1+1)
  2925       IF (k .GE. kold) 
GO TO 140
  2927       iv(ivc) = limit1 + 2
  2933       IF(kp1 .LT. nsp2) 
GO TO 199
  2937         DO 145 iq = 1,limit2
  2938  145      w(iq) = w(iq) - temp6*w(iq+1)
  2955       IF(k .LT. nsp1) 
GO TO 215
  2959  205      phi(l,i) = temp1*phi(l,i)
  2964  215  
DO 220 l = 1,neqn
  2965         phi(l,kp2) = phi(l,kp1)
  2973           p(l) = p(l) + temp2*phi(l,i)
  2974  225      phi(l,i) = phi(l,i) + phi(l,ip1)
  2978         tau = h*p(l) - phi(l,15)
  2980  235    phi(l,16) = (p(l) - y(l)) - 
tau  2982  240  
DO 245 l = 1,neqn
  2983  245    p(l) = y(l) + h*p(l)
  2987       CALL df(x,p,yp,rpar,ipar)
  2996         temp4 = yp(l) - phi(l,1)
  2998  255    erkm2 = erkm2 + ((phi(l,km1)+temp4)*temp3)**2
  2999  260    erkm1 = erkm1 + ((phi(l,k)+temp4)*temp3)**2
  3000  265    erk = erk + (temp4*temp3)**2
  3002  270  erkm2 = absh*sig(km1)*gstr(km2)*sqrt(erkm2)
  3003  275  erkm1 = absh*sig(k)*gstr(km1)*sqrt(erkm1)
  3004  280  temp5 = absh*sqrt(erk)
  3005       err = temp5*(g(k)-g(kp1))
  3006       erk = temp5*sig(kp1)*gstr(k)
  3012  285  
IF(
max(erkm1,erkm2) .LE. erk) knew = km1
  3014  290  
IF(erkm1 .LE. 0.5d0*erk) knew = km1
  3018  299  
IF(err .LE. eps) 
GO TO 400
  3034         temp1 = 1.0d0/beta(i)
  3037  305      phi(l,i) = temp1*(phi(l,i) - phi(l,ip1))
  3039       IF(k .LT. 2) 
GO TO 320
  3041  315    psi(i-1) = psi(i) - h
  3046  320  ifail = ifail + 1
  3048       IF(ifail - 3) 335,330,325
  3049  325  
IF(p5eps .LT. 0.25d0*erk) temp2 = sqrt(p5eps/erk)
  3054       IF(abs(h) .GE. fouru*abs(x)) 
GO TO 340
  3056       h = sign(fouru*abs(x),h)
  3076         rho = temp1*(yp(l) - phi(l,1)) - phi(l,16)
  3078         phi(l,15) = (y(l) - p(l)) - rho
  3081  410  
DO 415 l = 1,neqn
  3083         y(l) = p(l) + temp1*(yp(l) - phi(l,1))
  3085  420  
CALL df(x,y,yp,rpar,ipar)
  3090         phi(l,kp1) = yp(l) - phi(l,1)
  3091  425    phi(l,kp2) = phi(l,kp1) - phi(l,kp2)
  3094  430      phi(l,i) = phi(l,i) + phi(l,kp1)
  3103       IF(knew .EQ. km1  .OR.  k .EQ. 12) phase1 = .false.
  3104       IF(phase1) 
GO TO 450
  3105       IF(knew .EQ. km1) 
GO TO 455
  3106       IF(kp1 .GT. ns) 
GO TO 460
  3108  440    erkp1 = erkp1 + (phi(l,kp2)/wt(l))**2
  3109       erkp1 = absh*gstr(kp1)*sqrt(erkp1)
  3114       IF(k .GT. 1) 
GO TO 445
  3115       IF(erkp1 .GE. 0.5d0*erk) 
GO TO 460
  3117  445  
IF(erkm1 .LE. 
min(erk,erkp1)) 
GO TO 455
  3118       IF(erkp1 .GE. erk  .OR.  k .EQ. 12) 
GO TO 460
  3137       IF(phase1) 
GO TO 465
  3138       IF(p5eps .GE. erk*two(k+1)) 
GO TO 465
  3140       IF(p5eps .GE. erk) 
GO TO 465
  3142       r = (p5eps/erk)**(1.0d0/temp2)
  3143       hnew = absh*
max(0.5d0,
min(0.9d0,r))
  3144       hnew = sign(
max(hnew,fouru*abs(x)),h)
 #define max(a, b)
Definition: cascade.c:32
double precision function d1mach(I)
Definition: ddeabm.f:2012
subroutine df(x, u, uprime, rpar, nev)
Definition: subspace.f:133
#define min(a, b)
Definition: cascade.c:31
void tau(double *ad, double **aup, double *adb, double *aubp, double *sigma, double *b, ITG *icol, ITG **irowp, ITG *neq, ITG *nzs)
subroutine dhstrt(DF, NEQ, A, B, Y, YPRIME, ETOL, MORDER, SMALL, BIG, SPY, PV, YP, SF, RPAR, IPAR, H)
Definition: ddeabm.f:4092