[cig-commits] r19258 - short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/problems

brad at geodynamics.org brad at geodynamics.org
Thu Dec 1 08:46:57 PST 2011


Author: brad
Date: 2011-12-01 08:46:57 -0800 (Thu, 01 Dec 2011)
New Revision: 19258

Modified:
   short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/problems/SolverNonlinear.cc
Log:
Temporary fix. Allow line search to continue even when it appears to diverge.

Modified: short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/problems/SolverNonlinear.cc
===================================================================
--- short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/problems/SolverNonlinear.cc	2011-12-01 16:45:46 UTC (rev 19257)
+++ short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/problems/SolverNonlinear.cc	2011-12-01 16:46:57 UTC (rev 19258)
@@ -361,11 +361,16 @@
 	ierr = PetscViewerASCIIPrintf(snes->ls_monitor,"    Line search: fnorm=%18.16e, gnorm=%18.16e, ynorm=%18.16e, minlambda=%18.16e, lambda=%18.16e, initial slope=%18.16e\n",(double)fnorm,(double)*gnorm,(double)*ynorm,(double)minlambda,(double)lambda,(double)initslope);CHKERRQ(ierr);
         ierr = PetscViewerASCIISubtractTab(snes->ls_monitor,((PetscObject)snes)->tablevel);CHKERRQ(ierr);
       }
-      *flag = PETSC_FALSE; // DIVERGED_LINE_SEARCH
       assert(lsctx);
       Formulation* formulation = (Formulation*) lsctx;
       assert(formulation);
       formulation->printState(&w, &g, &x, &y);
+#if 0 // TEMPORARY
+      *flag = PETSC_FALSE; // DIVERGED_LINE_SEARCH
+#else
+      std::cerr << "WARNING: Line search diverged ... continuing nonlinear iterations anyway in hopes that solution will converge anyway."
+		<< std::endl;
+#endif
       break;
     }
     t1 = .5*((*gnorm)*(*gnorm) - fnorm*fnorm) - lambda*initslope;



More information about the CIG-COMMITS mailing list