--- MITgcm/pkg/seaice/seaice_jfnk.F 2013/01/17 08:51:15 1.16 +++ MITgcm/pkg/seaice/seaice_jfnk.F 2013/02/15 15:19:17 1.18 @@ -1,4 +1,4 @@ -C $Header: /home/ubuntu/mnt/e9_copy/MITgcm/pkg/seaice/seaice_jfnk.F,v 1.16 2013/01/17 08:51:15 mlosch Exp $ +C $Header: /home/ubuntu/mnt/e9_copy/MITgcm/pkg/seaice/seaice_jfnk.F,v 1.18 2013/02/15 15:19:17 mlosch Exp $ C $Name: $ #include "SEAICE_OPTIONS.h" @@ -170,7 +170,7 @@ ENDDO C compute convergence criterion for linear preconditioned FGMRES JFNKgamma_lin = JFNKgamma_lin_max - IF ( newtonIter.GT.1.AND.newtonIter.LE.100 + IF ( newtonIter.GT.1.AND.newtonIter.LE.SEAICE_JFNK_tolIter & .AND.JFNKresidual.LT.JFNKres_t ) THEN C Eisenstat, 1996, equ.(2.6) phi_e = 1. _d 0 @@ -254,8 +254,13 @@ IF ( krylovIter.EQ.SEAICEkrylovIterMax ) THEN krylovFails = krylovFails + 1 ENDIF -C Set the stopping criterion for the Newton iteration - IF ( newtonIter .EQ. 1 ) JFNKtol=JFNKgamma_nonlin*JFNKresidual +C Set the stopping criterion for the Newton iteration and the +C criterion for the transition from accurate to approximate FGMRES + IF ( newtonIter .EQ. 1 ) THEN + JFNKtol=JFNKgamma_nonlin*JFNKresidual + IF ( JFNKres_tFac .NE. UNSET_RL ) + & JFNKres_t = JFNKresidual * JFNKres_tFac + ENDIF C Update linear solution vector and return to Newton iteration C Do a linesearch if necessary, and compute a new residual. C Note that it should be possible to do the following operations