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

brad at geodynamics.org brad at geodynamics.org
Fri Sep 16 12:06:02 PDT 2011


Author: brad
Date: 2011-09-16 12:06:01 -0700 (Fri, 16 Sep 2011)
New Revision: 18921

Modified:
   short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/problems/SolverNonlinear.cc
   short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/problems/SolverNonlinear.hh
Log:
Updated lineSearch to keep in sync with PETSc.

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-09-16 17:05:51 UTC (rev 18920)
+++ short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/problems/SolverNonlinear.cc	2011-09-16 19:06:01 UTC (rev 18921)
@@ -44,8 +44,11 @@
   namespace problems {
     namespace _SolverNonlinear {
 
+      // From PETSc header file src/snes/impls/ls/lsimpl.h
+      // This file is buried in the source directory so we don't have
+      // access to it using pre-processor flags (i.e., -I$DIR).
       typedef struct {
-	PetscErrorCode           (*LineSearch)(PetscSNES,void*,PetscVec,PetscVec,PetscVec,PetscVec,PetscVec,PetscReal,PetscReal,PetscReal*,PetscReal*,PetscBool *);
+	PetscErrorCode           (*LineSearch)(PetscSNES,void*,PetscVec,PetscVec,PetscVec,PetscReal,PetscReal,PetscVec,PetscVec,PetscReal*,PetscReal*,PetscBool *);
 	void                     *lsP;                              /* user-defined line-search context (optional) */
 	/* --------------- Parameters used by line search method ----------------- */
 	PetscReal                alpha;                                                                  /* used to determine sufficient reduction */
@@ -56,6 +59,7 @@
 	PetscErrorCode           (*postcheckstep)(PetscSNES,PetscVec,PetscVec,PetscVec,void*,PetscBool *,PetscBool *); /* step-checking routine (optional) */
 	void                     *postcheck;                                                       /* user-defined step-checking context (optional) */
 	PetscViewer  monitor;
+	PetscReal damping;
       } SNES_LS;
     } // _SolverNonlinear
   } // problems
@@ -248,11 +252,11 @@
 					      void *lsctx,
 					      PetscVec x,
 					      PetscVec f,
-					      PetscVec g,
 					      PetscVec y,
-					      PetscVec w,
 					      PetscReal fnorm,
 					      PetscReal xnorm,
+					      PetscVec g,
+					      PetscVec w,
 					      PetscReal *ynorm,
 					      PetscReal *gnorm,
 					      PetscBool *flag)

Modified: short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/problems/SolverNonlinear.hh
===================================================================
--- short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/problems/SolverNonlinear.hh	2011-09-16 17:05:51 UTC (rev 18920)
+++ short/3D/PyLith/branches/v1.6-stable/libsrc/pylith/problems/SolverNonlinear.hh	2011-09-16 19:06:01 UTC (rev 18921)
@@ -132,11 +132,11 @@
 			    void *lsctx,
 			    PetscVec x,
 			    PetscVec f,
-			    PetscVec g,
 			    PetscVec y,
-			    PetscVec w,
 			    PetscReal fnorm,
 			    PetscReal xnorm,
+			    PetscVec g,
+			    PetscVec w,
 			    PetscReal *ynorm,
 			    PetscReal *gnorm,
 			    PetscBool *flag);



More information about the CIG-COMMITS mailing list