[cig-commits] r7326 - short/3D/PyLith/trunk/pylith/problems

brad at geodynamics.org brad at geodynamics.org
Wed Jun 20 08:46:17 PDT 2007


Author: brad
Date: 2007-06-20 08:46:17 -0700 (Wed, 20 Jun 2007)
New Revision: 7326

Modified:
   short/3D/PyLith/trunk/pylith/problems/Implicit.py
Log:
Fixed bug in setting solution increment flag (0 == istep, not 1 == istep).

Modified: short/3D/PyLith/trunk/pylith/problems/Implicit.py
===================================================================
--- short/3D/PyLith/trunk/pylith/problems/Implicit.py	2007-06-20 15:25:12 UTC (rev 7325)
+++ short/3D/PyLith/trunk/pylith/problems/Implicit.py	2007-06-20 15:46:17 UTC (rev 7326)
@@ -155,10 +155,10 @@
       integrator.timeStep(dt)
       integrator.integrateResidual(residual, t, self.fields)
 
-    #bindings.sectionView(residual, "residual")
+    bindings.sectionView(residual, "residual")
     self._info.log("Solving equations.")
     self.solver.solve(dispIncr, self.jacobian, residual)
-    #bindings.sectionView(self.fields.getReal("solution"), "solution")
+    bindings.sectionView(self.fields.getReal("solution"), "solution")
     return
 
 
@@ -175,7 +175,7 @@
     solution = self.fields.getReal("solution")
     disp = self.fields.getReal("dispTBctpdt")
     bindings.addRealSections(disp, disp, solution)
-    #bindings.sectionView(solution, "solution")
+    bindings.sectionView(solution, "solution")
 
     self._info.log("Updating integrators states.")
     for integrator in self.integrators:
@@ -183,7 +183,9 @@
 
     # If finishing first time step, then switch from solving for total
     # displacements to solving for incremental displacements
-    if 1 == self._istep:
+    if 0 == self._istep:
+      self._info.log("Switching from total field solution to incremental " \
+                     "field solution.")
       for constraint in self.constraints:
         constraint.useSolnIncr(True)
       for integrator in self.integrators:
@@ -230,15 +232,15 @@
     petsc.mat_assemble(self.jacobian)
 
     import pylith.topology.topology as bindings
-    #petsc.mat_view(self.jacobian)
-    #bindings.sectionView(residual, "residual")
+    petsc.mat_view(self.jacobian)
+    bindings.sectionView(residual, "residual")
 
     self._info.log("Solving equations.")
     self.solver.solve(solution, self.jacobian, residual)
 
     bindings.addRealSections(disp, disp, solution)
-    #bindings.sectionView(solution, "solution")
-    #bindings.sectionView(self.fields.getReal("dispIncr"), "dispIncr")
+    bindings.sectionView(solution, "solution")
+    bindings.sectionView(self.fields.getReal("dispIncr"), "dispIncr")
 
     self._info.log("Updating integrators states.")
     for integrator in self.integrators:



More information about the cig-commits mailing list