{\scriptsize \begin{verbatim} ... ... | ) | (---- CALL OPTLINE / LSLINE | ) | | ( |---- /// loop over simulations | ) ( | ( )---- CALL SIMUL | ) ( | | ( ) |---- input: xdiff(i) | ) ( |---- output: ff(i), gg(i) | ( ) |---- >>> if ONLINE <<< | ) ( runs model and adjoint | ( ) >>> if OFFLINE <<< | ) ( reads those values from file | ( ) | ) (---- 1st Wolfe test: | ( ) ff(i) <= tact*xpara1* | ) ( | ( )---- 2nd Wolfe test: | ) ( >= xpara2* | ( ) | ) (---- >>> if 1st and 2nd Wolfe tests ok <<< | ( ) | 320: update xx: xx(i) = xdiff(i) | ) ( | | ( ) >>> else if 1st Wolfe test not ok <<< | ) ( | 500: INTERpolate new tact: | ( ) | barr*tact < tact < (1-barr)*tact | ) ( | CALL CUBIC | ( ) | | ) ( >>> else if 2nd Wolfe test not ok <<< | ( ) 350: EXTRApolate new tact: | ) ( (1+barmin)*tact < tact < 10*tact | ( ) CALL CUBIC | ) ( | ( )---- >>> if new tact > tmax <<< | ) ( | ifail = 7 | ( ) | | ) (---- >>> if new tact < tmin OR tact*dd < machine precision <<< | ( ) | ifail = 8 | ) ( | | ( )---- >>> else <<< | ) ( update xdiff for new simulation | ( ) | ) \\\ if nfunc > 1: use inter-/extrapolated tact and xdiff | ( for new simulation | ) N.B.: new xx is thus not based on new gg, but | ( rather on new step size tact | ) | (---- store new values xx(i), gg(i) to OPWARMD (first 2 entries) | )---- >>> if ifail = 7,8,9 <<< | ( goto 1000 | ) ... ... \end{verbatim} }