[cig-commits] r19777 - in short/3D/PyLith/trunk: . doc/releasenotes examples/3d/hex8 examples/3d/tet4 examples/twocells examples/twocells/twotet4-geoproj libsrc/pylith/faults libsrc/pylith/meshio libsrc/pylith/problems libsrc/pylith/topology pylith/apps pylith/bc pylith/faults pylith/materials pylith/meshio pylith/problems pylith/topology pylith/utils share tests/2d/frictionslide tests/3d/plasticity tests_auto/2d/quad4

brad at geodynamics.org brad at geodynamics.org
Wed Mar 14 09:42:23 PDT 2012


Author: brad
Date: 2012-03-14 09:42:22 -0700 (Wed, 14 Mar 2012)
New Revision: 19777

Added:
   short/3D/PyLith/trunk/share/debug_malloc.cfg
Modified:
   short/3D/PyLith/trunk/README
   short/3D/PyLith/trunk/TODO
   short/3D/PyLith/trunk/configure.ac
   short/3D/PyLith/trunk/doc/releasenotes/announce_v1.6.3.txt
   short/3D/PyLith/trunk/examples/3d/hex8/step01.cfg
   short/3D/PyLith/trunk/examples/3d/hex8/step02.cfg
   short/3D/PyLith/trunk/examples/3d/hex8/step03.cfg
   short/3D/PyLith/trunk/examples/3d/hex8/step04.cfg
   short/3D/PyLith/trunk/examples/3d/hex8/step05.cfg
   short/3D/PyLith/trunk/examples/3d/hex8/step06.cfg
   short/3D/PyLith/trunk/examples/3d/hex8/step07.cfg
   short/3D/PyLith/trunk/examples/3d/hex8/step08.cfg
   short/3D/PyLith/trunk/examples/3d/hex8/step09.cfg
   short/3D/PyLith/trunk/examples/3d/hex8/step10.cfg
   short/3D/PyLith/trunk/examples/3d/hex8/step11.cfg
   short/3D/PyLith/trunk/examples/3d/hex8/step12.cfg
   short/3D/PyLith/trunk/examples/3d/hex8/step13.cfg
   short/3D/PyLith/trunk/examples/3d/hex8/step14.cfg
   short/3D/PyLith/trunk/examples/3d/hex8/step15.cfg
   short/3D/PyLith/trunk/examples/3d/hex8/step16.cfg
   short/3D/PyLith/trunk/examples/3d/hex8/step17.cfg
   short/3D/PyLith/trunk/examples/3d/hex8/step18.cfg
   short/3D/PyLith/trunk/examples/3d/hex8/step19.cfg
   short/3D/PyLith/trunk/examples/3d/tet4/step01.cfg
   short/3D/PyLith/trunk/examples/3d/tet4/step02.cfg
   short/3D/PyLith/trunk/examples/3d/tet4/step03.cfg
   short/3D/PyLith/trunk/examples/3d/tet4/step04.cfg
   short/3D/PyLith/trunk/examples/twocells/Makefile.am
   short/3D/PyLith/trunk/examples/twocells/twotet4-geoproj/pylithapp.cfg
   short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveLagrange.cc
   short/3D/PyLith/trunk/libsrc/pylith/meshio/CellFilter.cc
   short/3D/PyLith/trunk/libsrc/pylith/problems/Formulation.cc
   short/3D/PyLith/trunk/libsrc/pylith/problems/Solver.cc
   short/3D/PyLith/trunk/libsrc/pylith/problems/SolverLinear.cc
   short/3D/PyLith/trunk/libsrc/pylith/problems/SolverNonlinear.cc
   short/3D/PyLith/trunk/libsrc/pylith/topology/Field.cc
   short/3D/PyLith/trunk/pylith/apps/PyLithApp.py
   short/3D/PyLith/trunk/pylith/bc/BoundaryCondition.py
   short/3D/PyLith/trunk/pylith/faults/Fault.py
   short/3D/PyLith/trunk/pylith/materials/Material.py
   short/3D/PyLith/trunk/pylith/meshio/CellFilter.py
   short/3D/PyLith/trunk/pylith/meshio/DataWriter.py
   short/3D/PyLith/trunk/pylith/meshio/OutputManager.py
   short/3D/PyLith/trunk/pylith/problems/Solver.py
   short/3D/PyLith/trunk/pylith/problems/SolverNonlinear.py
   short/3D/PyLith/trunk/pylith/topology/Mesh.py
   short/3D/PyLith/trunk/pylith/topology/SubMesh.py
   short/3D/PyLith/trunk/pylith/utils/PetscComponent.py
   short/3D/PyLith/trunk/tests/2d/frictionslide/plot_friction.py
   short/3D/PyLith/trunk/tests/3d/plasticity/Makefile.am
   short/3D/PyLith/trunk/tests_auto/2d/quad4/TestSlipWeakeningShearSliding.py
   short/3D/PyLith/trunk/tests_auto/2d/quad4/slipweakening_shear_sliding.cfg
Log:
Merge from stable.

Modified: short/3D/PyLith/trunk/README
===================================================================
--- short/3D/PyLith/trunk/README	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/README	2012-03-14 16:42:22 UTC (rev 19777)
@@ -70,6 +70,74 @@
 models.
 
 ----------------------------------------------------------------------
+Version 1.6.3
+----------------------------------------------------------------------
+
+* Bug fixes
+
+  - Improved error messages for problems encountered during processing
+    of parameters. A backtrace of the object hierarchy is now included
+    to pinpoint in which object the error occurred.
+
+  - Added a line search to the inner friction solve in quasi-static
+    simulations to increase the robustness of the nonlinear
+    solve. Simulations using rate and state friction now converge
+    under a much wider range of circumstances.
+
+  - Fixed bug in updating slip state variable in slip-weakening
+    friction. This caused slight errors in the cumulative slip. We
+    also added a parameter that forces healing to occur in a single
+    time step. This is used to confine slip to a single time step in
+    quasi-static simulations. See examples/3d/hex8/step13.cfg for an
+    example.
+
+  - Tuned parameters in the slip-weakening friction and rate and state
+    friction examples (step13.cfg and step14.cfg, respectively) in
+    examples/3d/hex8 to give stick-slip behavior.
+
+  - Fixed communication issue associated with writing boundary
+    condition information output in parallel. 
+
+  - Changed info in Xdmf file for fields that are not scalars,
+    vectors, or tensors so that the each component is extracted,
+    facilitating visualization in ParaView. The corresponding HDF5
+    file remains the same.
+
+  - Added the ability to specify non-derived units (e.g., degree and
+    radian). This is useful in specifying parameters for the
+    Drucker-Prager elastoplastic rheologies. If no units are
+    specified, radians are assumed.
+
+* Internal changes
+
+  - Rate and state friction with ageing law
+
+    The implementation of rate and state friction with ageing law was
+    modified to work better with the iterative solver. We switched to
+    the conventional, unregularized formulation but added a minimum
+    cutoff for the slip rate. Below this cutoff friction has a linear
+    rather than logarithmic dependence on slip rate. As long as this
+    cutoff is close to the SNES solver tolerance, the difference in
+    behavior is negligible while improving the ability of the solver
+    to converge for very small deformations.
+
+KNOWN ISSUES
+
+  The rate and state friction with ageing law has not been tested for
+  dynamic rupture simulations. We plan to run the SCEC Dynamic Rupture
+  benchmarks for rate and state friction as soon as we add a
+  spatial-temporal specification of initial fault tractions, which are
+  required for the benchmark problems.
+
+  Running simulations with more than a million cells and large faults
+  in parallel can result in severe memory imbalances among
+  processors. Some processors around the fault may use 10x more memory
+  than processors away from the fault. We expect this problem to
+  disappear in v1.7 when we switch to new, more efficient Sieve
+  implementation.
+
+
+----------------------------------------------------------------------
 Version 1.6.2
 ----------------------------------------------------------------------
 

Modified: short/3D/PyLith/trunk/TODO
===================================================================
--- short/3D/PyLith/trunk/TODO	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/TODO	2012-03-14 16:42:22 UTC (rev 19777)
@@ -120,23 +120,6 @@
 SECONDARY PRIORITIES
 ----------------------------------------------------------------------
 
-* Paper
-
-  General paper - focus on fault implementation
-  - JGR, GGG
-  
-  geometry processing (adjusting topology)
-  discretization (cohesive cells)
-  model (Lagrange multipliers)
-    Slip functions
-    Fault constitutive models
-  solver (saddle point)
-    custom preconditioner
-  benchmarks
-    Savage and Prescott
-    Dynamic
-  real problem  
-
 * Fault preconditioner [BRAD]
 
   FaultCohesiveLagrange::calcPreconditioner() [need unit test]
@@ -441,8 +424,6 @@
     + DruckerPragerPlaneStrain (Drucker-Prager plane strain)
     + PowerLawPlaneStrain (power law plane strain )
 
-  3. Scalable mesh distribution
-
 ----------------------------------------------------------------------
 Release 2.0
 ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/configure.ac
===================================================================
--- short/3D/PyLith/trunk/configure.ac	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/configure.ac	2012-03-14 16:42:22 UTC (rev 19777)
@@ -328,16 +328,12 @@
 		tests/3d/cyclicfriction/Makefile
 		tests/3d/cyclicfriction/output/Makefile
 		tests/3d/plasticity/Makefile
-		tests/3d/plasticity/threehex27/Makefile
-		tests/3d/plasticity/threehex27/config/Makefile
-		tests/3d/plasticity/threehex27/mesh/Makefile
-		tests/3d/plasticity/threehex27/results/Makefile
-		tests/3d/plasticity/threehex27/spatialdb/Makefile
 		tests/3d/plasticity/threehex8/Makefile
 		tests/3d/plasticity/threehex8/config/Makefile
 		tests/3d/plasticity/threehex8/mesh/Makefile
 		tests/3d/plasticity/threehex8/results/Makefile
 		tests/3d/plasticity/threehex8/spatialdb/Makefile
+		tests/3d/plasticity/dynamic/Makefile
 		tests/topology/Makefile
 		tests/refinefaulttip/Makefile
                 doc/Makefile
@@ -372,7 +368,6 @@
 		examples/greensfns/hex8/gfresponses/Makefile
 		examples/greensfns/hex8/gfspatialdb/Makefile
 		examples/twocells/twohex8/Makefile
-		examples/twocells/twohex27-cubit/Makefile
 		examples/twocells/twoquad4/Makefile
 		examples/twocells/twotet4/Makefile
 		examples/twocells/twotet4-geoproj/Makefile

Modified: short/3D/PyLith/trunk/doc/releasenotes/announce_v1.6.3.txt
===================================================================
--- short/3D/PyLith/trunk/doc/releasenotes/announce_v1.6.3.txt	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/doc/releasenotes/announce_v1.6.3.txt	2012-03-14 16:42:22 UTC (rev 19777)
@@ -21,9 +21,9 @@
 
 * Bug fixes
 
-  - Improved error messages for problems encountered during
-    configuration. A backtrace of the object hierarchy is now included
-    to pinpoint in which object the rror occurred.
+  - Improved error messages for problems encountered during processing
+    of parameters. A backtrace of the object hierarchy is now included
+    to pinpoint in which object the error occurred.
 
   - Added a line search to the inner friction solve in quasi-static
     simulations to increase the robustness of the nonlinear
@@ -35,7 +35,7 @@
     also added a parameter that forces healing to occur in a single
     time step. This is used to confine slip to a single time step in
     quasi-static simulations. See examples/3d/hex8/step13.cfg for an
-    exanple.
+    example.
 
   - Tuned parameters in the slip-weakening friction and rate and state
     friction examples (step13.cfg and step14.cfg, respectively) in
@@ -44,6 +44,11 @@
   - Fixed communication issue associated with writing boundary
     condition information output in parallel. 
 
+  - Changed info in Xdmf file for fields that are not scalars,
+    vectors, or tensors so that the each component is extracted,
+    facilitating visualization in ParaView. The corresponding HDF5
+    file remains the same.
+
   - Added the ability to specify non-derived units (e.g., degree and
     radian). This is useful in specifying parameters for the
     Drucker-Prager elastoplastic rheologies. If no units are

Modified: short/3D/PyLith/trunk/examples/3d/hex8/step01.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/step01.cfg	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/examples/3d/hex8/step01.cfg	2012-03-14 16:42:22 UTC (rev 19777)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/examples/3d/hex8/step02.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/step02.cfg	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/examples/3d/hex8/step02.cfg	2012-03-14 16:42:22 UTC (rev 19777)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/examples/3d/hex8/step03.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/step03.cfg	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/examples/3d/hex8/step03.cfg	2012-03-14 16:42:22 UTC (rev 19777)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/examples/3d/hex8/step04.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/step04.cfg	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/examples/3d/hex8/step04.cfg	2012-03-14 16:42:22 UTC (rev 19777)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/examples/3d/hex8/step05.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/step05.cfg	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/examples/3d/hex8/step05.cfg	2012-03-14 16:42:22 UTC (rev 19777)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/examples/3d/hex8/step06.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/step06.cfg	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/examples/3d/hex8/step06.cfg	2012-03-14 16:42:22 UTC (rev 19777)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/examples/3d/hex8/step07.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/step07.cfg	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/examples/3d/hex8/step07.cfg	2012-03-14 16:42:22 UTC (rev 19777)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/examples/3d/hex8/step08.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/step08.cfg	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/examples/3d/hex8/step08.cfg	2012-03-14 16:42:22 UTC (rev 19777)
@@ -1,5 +1,7 @@
-# -*- Python -*-
 [pylithapp]
+# Permit unknown components so that we can ignore warnings associated
+# with replacing the spatial database for the power-law rheology.
+typos = strict
 
 # ----------------------------------------------------------------------
 # PROBLEM DESCRIPTION

Modified: short/3D/PyLith/trunk/examples/3d/hex8/step09.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/step09.cfg	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/examples/3d/hex8/step09.cfg	2012-03-14 16:42:22 UTC (rev 19777)
@@ -1,5 +1,7 @@
-# -*- Python -*-
 [pylithapp]
+# Permit unknown components so that we can ignore warnings associated
+# with replacing the spatial database for the power-law rheology.
+typos = strict
 
 # ----------------------------------------------------------------------
 # PROBLEM DESCRIPTION

Modified: short/3D/PyLith/trunk/examples/3d/hex8/step10.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/step10.cfg	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/examples/3d/hex8/step10.cfg	2012-03-14 16:42:22 UTC (rev 19777)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/examples/3d/hex8/step11.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/step11.cfg	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/examples/3d/hex8/step11.cfg	2012-03-14 16:42:22 UTC (rev 19777)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/examples/3d/hex8/step12.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/step12.cfg	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/examples/3d/hex8/step12.cfg	2012-03-14 16:42:22 UTC (rev 19777)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/examples/3d/hex8/step13.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/step13.cfg	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/examples/3d/hex8/step13.cfg	2012-03-14 16:42:22 UTC (rev 19777)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/examples/3d/hex8/step14.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/step14.cfg	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/examples/3d/hex8/step14.cfg	2012-03-14 16:42:22 UTC (rev 19777)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/examples/3d/hex8/step15.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/step15.cfg	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/examples/3d/hex8/step15.cfg	2012-03-14 16:42:22 UTC (rev 19777)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/examples/3d/hex8/step16.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/step16.cfg	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/examples/3d/hex8/step16.cfg	2012-03-14 16:42:22 UTC (rev 19777)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/examples/3d/hex8/step17.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/step17.cfg	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/examples/3d/hex8/step17.cfg	2012-03-14 16:42:22 UTC (rev 19777)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/examples/3d/hex8/step18.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/step18.cfg	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/examples/3d/hex8/step18.cfg	2012-03-14 16:42:22 UTC (rev 19777)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/examples/3d/hex8/step19.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/step19.cfg	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/examples/3d/hex8/step19.cfg	2012-03-14 16:42:22 UTC (rev 19777)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/examples/3d/tet4/step01.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/tet4/step01.cfg	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/examples/3d/tet4/step01.cfg	2012-03-14 16:42:22 UTC (rev 19777)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # This is not a self-contained simulation configuration file. This

Modified: short/3D/PyLith/trunk/examples/3d/tet4/step02.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/tet4/step02.cfg	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/examples/3d/tet4/step02.cfg	2012-03-14 16:42:22 UTC (rev 19777)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # This is not a self-contained simulation configuration file. This

Modified: short/3D/PyLith/trunk/examples/3d/tet4/step03.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/tet4/step03.cfg	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/examples/3d/tet4/step03.cfg	2012-03-14 16:42:22 UTC (rev 19777)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # This is not a self-contained simulation configuration file. This

Modified: short/3D/PyLith/trunk/examples/3d/tet4/step04.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/tet4/step04.cfg	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/examples/3d/tet4/step04.cfg	2012-03-14 16:42:22 UTC (rev 19777)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # This is not a self-contained simulation configuration file. This

Modified: short/3D/PyLith/trunk/examples/twocells/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/Makefile.am	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/examples/twocells/Makefile.am	2012-03-14 16:42:22 UTC (rev 19777)
@@ -18,7 +18,6 @@
 
 SUBDIRS = \
 	twohex8 \
-	twohex27-cubit \
 	twoquad4 \
 	twotet4 \
 	twotet4-geoproj \

Modified: short/3D/PyLith/trunk/examples/twocells/twotet4-geoproj/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twotet4-geoproj/pylithapp.cfg	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/examples/twocells/twotet4-geoproj/pylithapp.cfg	2012-03-14 16:42:22 UTC (rev 19777)
@@ -52,7 +52,7 @@
 
 [pylithapp.mesh_generator.reader.coordsys.projector]
 projection = utm
-proj-options = +zone=11
+proj_options = +zone=11
 
 # ----------------------------------------------------------------------
 # problem

Modified: short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveLagrange.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveLagrange.cc	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveLagrange.cc	2012-03-14 16:42:22 UTC (rev 19777)
@@ -581,11 +581,11 @@
 				   topology::Jacobian* const jacobian,
 				   topology::SolutionFields* const fields)
 { // calcPreconditioner
-  assert(0 != precondMatrix);
-  assert(0 != jacobian);
-  assert(0 != fields);
-  assert(0 != _fields);
-  assert(0 != _logger);
+  assert(precondMatrix);
+  assert(jacobian);
+  assert(fields);
+  assert(_fields);
+  assert(_logger);
 
   /** We have A = [K L^T]
    *              [L   0]
@@ -737,7 +737,7 @@
     _logger->eventEnd(updateEvent);
 #endif
   } // for
-  err = MatDestroy(&jacobianNP); CHECK_PETSC_ERROR(err);
+  err = MatDestroy(&jacobianNP);CHECK_PETSC_ERROR(err);
   PetscLogFlops(numVertices*spaceDim*6);
 
 #if !defined(DETAILED_EVENT_LOGGING)

Modified: short/3D/PyLith/trunk/libsrc/pylith/meshio/CellFilter.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/meshio/CellFilter.cc	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/libsrc/pylith/meshio/CellFilter.cc	2012-03-14 16:42:22 UTC (rev 19777)
@@ -42,7 +42,7 @@
 pylith::meshio::CellFilter<mesh_type, field_type>::CellFilter(const CellFilter& f) :
   _quadrature(0)
 { // copy constructor
-  if (0 != f._quadrature)
+  if (f._quadrature)
     _quadrature = new feassemble::Quadrature<mesh_type>(*f._quadrature);
 } // copy constructor
 
@@ -62,7 +62,7 @@
 pylith::meshio::CellFilter<mesh_type, field_type>::quadrature(const feassemble::Quadrature<mesh_type>* q)
 { // quadrature
   delete _quadrature; 
-  _quadrature = (0 != q) ? new feassemble::Quadrature<mesh_type>(*q) : 0;
+  _quadrature = (q) ? new feassemble::Quadrature<mesh_type>(*q) : 0;
 } // quadrature
 
 

Modified: short/3D/PyLith/trunk/libsrc/pylith/problems/Formulation.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/problems/Formulation.cc	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/libsrc/pylith/problems/Formulation.cc	2012-03-14 16:42:22 UTC (rev 19777)
@@ -61,9 +61,9 @@
 
 #if 0   // :KLUDGE: Assume Solver deallocates matrix.
   PetscErrorCode err = 0;
-  if (0 != _customConstraintPCMat) {
-    err = PetscObjectDereference((PetscObject) _customConstraintPCMat);
-    _customConstraintPCMat = 0; CHECK_PETSC_ERROR(err);
+  if (_customConstraintPCMat) {
+    err = PetscObjectDereference((PetscObject) _customConstraintPCMat);CHECK_PETSC_ERROR(err);
+    _customConstraintPCMat = 0;
   } // if
 #else
   _customConstraintPCMat = 0;
@@ -319,7 +319,7 @@
   // Assemble jacobian.
   _jacobian->assemble("final_assembly");
 
-  if (0 != _customConstraintPCMat) {
+  if (_customConstraintPCMat) {
     // Recalculate preconditioner.
     numIntegrators = _meshIntegrators.size();
     for (int i=0; i < numIntegrators; ++i)

Modified: short/3D/PyLith/trunk/libsrc/pylith/problems/Solver.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/problems/Solver.cc	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/libsrc/pylith/problems/Solver.cc	2012-03-14 16:42:22 UTC (rev 19777)
@@ -89,12 +89,14 @@
 { // deallocate
   _formulation = 0; // Handle only, do not manage memory.
   delete _logger; _logger = 0;
-  if (0 != _jacobianPC) {
-    PetscErrorCode err = MatDestroy(&_jacobianPC);CHECK_PETSC_ERROR(err);
-  } // if
-  if (0 != _jacobianPCFault) {
-    PetscErrorCode err = MatDestroy(&_jacobianPCFault);CHECK_PETSC_ERROR(err);
-  } // if
+
+  PetscErrorCode err = 0;
+  err = MatDestroy(&_jacobianPC);CHECK_PETSC_ERROR(err);
+  err = MatDestroy(&_jacobianPCFault);CHECK_PETSC_ERROR(err);
+
+  _ctx.pc = 0; // KSP PC (managed separately)
+  _ctx.A = 0; // Jacobian (managed separately)
+  _ctx.faultA  = 0; // Handle to _jacobianPCFault
 } // deallocate
   
 // ----------------------------------------------------------------------
@@ -104,7 +106,7 @@
 				     const topology::Jacobian& jacobian,
 				     Formulation* const formulation)
 { // initialize
-  assert(0 != formulation);
+  assert(formulation);
   _formulation = formulation;
 
   // Make global preconditioner matrix
@@ -123,6 +125,7 @@
 
     PylithInt M, N, m, n;
     PetscErrorCode err = 0;
+    err = MatDestroy(&_jacobianPC);CHECK_PETSC_ERROR(err);
     err = MatGetSize(jacobianMat, &M, &N);CHECK_PETSC_ERROR(err);
     err = MatGetLocalSize(jacobianMat, &m, &n);CHECK_PETSC_ERROR(err);
     err = MatCreateShell(fields.mesh().comm(), m, n, M, N, &_ctx, &_jacobianPC);
@@ -178,9 +181,7 @@
                                               solutionSection, spaceDim);
     assert(!lagrangeGlobalOrder.isNull());
 
-    if (_jacobianPCFault) {
-      err = MatDestroy(&_jacobianPCFault); CHECK_PETSC_ERROR(err);
-    } // if
+    err = MatDestroy(&_jacobianPCFault); CHECK_PETSC_ERROR(err);
     PylithInt nrows = lagrangeGlobalOrder->getLocalSize();
     PylithInt ncols = nrows;
 
@@ -190,20 +191,11 @@
     err = MatSetType(_jacobianPCFault, MATAIJ);
     err = MatSetFromOptions(_jacobianPCFault); CHECK_PETSC_ERROR(err);
     
-#if 1
     // Allocate just the diagonal.
     err = MatSeqAIJSetPreallocation(_jacobianPCFault, 1, 
 				    PETSC_NULL); CHECK_PETSC_ERROR(err);
     err = MatMPIAIJSetPreallocation(_jacobianPCFault, 1, PETSC_NULL, 
 				    0, PETSC_NULL); CHECK_PETSC_ERROR(err);
-#else
-    // Allocate full matrix (overestimate).
-    err = MatSeqAIJSetPreallocation(_jacobianPCFault, ncols, 
-				    PETSC_NULL); CHECK_PETSC_ERROR(err);
-    err = MatMPIAIJSetPreallocation(_jacobianPCFault, ncols, PETSC_NULL, 
-				    0, PETSC_NULL); CHECK_PETSC_ERROR(err);
-#endif
-    
     // Set preconditioning matrix in formulation
     formulation->customPCMatrix(_jacobianPCFault);
 

Modified: short/3D/PyLith/trunk/libsrc/pylith/problems/SolverLinear.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/problems/SolverLinear.cc	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/libsrc/pylith/problems/SolverLinear.cc	2012-03-14 16:42:22 UTC (rev 19777)
@@ -54,10 +54,7 @@
 { // deallocate
   Solver::deallocate();
 
-  if (0 != _ksp) {
-    PetscErrorCode err = KSPDestroy(&_ksp); _ksp = 0;
-    CHECK_PETSC_ERROR(err);
-  } // if
+  PetscErrorCode err = KSPDestroy(&_ksp);CHECK_PETSC_ERROR(err);
 } // deallocate
   
 // ----------------------------------------------------------------------
@@ -68,23 +65,20 @@
 				   const topology::Jacobian& jacobian,
 				   Formulation* formulation)
 { // initialize
-  assert(0 != formulation);
+  assert(formulation);
 
   _initializeLogger();
   Solver::initialize(fields, jacobian, formulation);
 
   PetscErrorCode err = 0;
-  if (0 != _ksp) {
-    err = KSPDestroy(&_ksp); _ksp = 0;
-    CHECK_PETSC_ERROR(err);
-  } // if    
-  err = KSPCreate(fields.mesh().comm(), &_ksp); CHECK_PETSC_ERROR(err);
-  err = KSPSetInitialGuessNonzero(_ksp, PETSC_FALSE); CHECK_PETSC_ERROR(err);
-  err = KSPSetFromOptions(_ksp); CHECK_PETSC_ERROR(err);
+  err = KSPDestroy(&_ksp);CHECK_PETSC_ERROR(err);
+  err = KSPCreate(fields.mesh().comm(), &_ksp);CHECK_PETSC_ERROR(err);
+  err = KSPSetInitialGuessNonzero(_ksp, PETSC_FALSE);CHECK_PETSC_ERROR(err);
+  err = KSPSetFromOptions(_ksp);CHECK_PETSC_ERROR(err);
 
   if (formulation->splitFields()) {
     PetscPC pc = 0;
-    err = KSPGetPC(_ksp, &pc); CHECK_PETSC_ERROR(err);
+    err = KSPGetPC(_ksp, &pc);CHECK_PETSC_ERROR(err);
     _setupFieldSplit(&pc, formulation, jacobian, fields);
   } // if
 } // initialize
@@ -97,15 +91,17 @@
 			      topology::Jacobian* jacobian,
 			      const topology::Field<topology::Mesh>& residual)
 { // solve
-  assert(0 != solution);
-  assert(0 != jacobian);
-  assert(0 != _formulation);
+  assert(solution);
+  assert(jacobian);
+  assert(_formulation);
 
   const int setupEvent = _logger->eventId("SoLi setup");
   const int solveEvent = _logger->eventId("SoLi solve");
   const int scatterEvent = _logger->eventId("SoLi scatter");
   _logger->eventBegin(scatterEvent);
 
+  //PetscFunctionBegin; // DEBUGGING
+
   // Update PetscVector view of field.
   residual.scatterSectionToVector();
 
@@ -116,10 +112,10 @@
   const PetscMat jacobianMat = jacobian->matrix();
   if (!jacobian->valuesChanged()) {
     err = KSPSetOperators(_ksp, jacobianMat, jacobianMat, 
-			  SAME_PRECONDITIONER); CHECK_PETSC_ERROR(err);
+			  SAME_PRECONDITIONER);CHECK_PETSC_ERROR(err);
   } else {
     err = KSPSetOperators(_ksp, jacobianMat, jacobianMat, 
-			  DIFFERENT_NONZERO_PATTERN); CHECK_PETSC_ERROR(err);
+			  DIFFERENT_NONZERO_PATTERN);CHECK_PETSC_ERROR(err);
   } // else
   jacobian->resetValuesChanged();
 
@@ -144,12 +140,10 @@
     assert(solutionSection->getNumSpaces() == num);
 
     MatStructure flag;
-    err = KSPGetOperators(ksps[num-1], &A, 
-			  PETSC_NULL, &flag); CHECK_PETSC_ERROR(err);
-    err = PetscObjectReference((PetscObject) A); CHECK_PETSC_ERROR(err);
-    err = KSPSetOperators(ksps[num-1], A, _jacobianPCFault, 
-			  flag); CHECK_PETSC_ERROR(err);
-    err = PetscFree(ksps); CHECK_PETSC_ERROR(err);
+    err = KSPGetOperators(ksps[num-1], &A, PETSC_NULL, &flag);CHECK_PETSC_ERROR(err);
+    err = PetscObjectReference((PetscObject) A);CHECK_PETSC_ERROR(err);
+    err = KSPSetOperators(ksps[num-1], A, _jacobianPCFault, flag);CHECK_PETSC_ERROR(err);
+    err = PetscFree(ksps);CHECK_PETSC_ERROR(err);
   } // if
 #endif
 
@@ -172,6 +166,8 @@
 
   // Update rate fields to be consistent with current solution.
   _formulation->calcRateFields();
+
+  //PetscFunctionReturnVoid(); // DEBUGGING
 } // solve
 
 // ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/libsrc/pylith/problems/SolverNonlinear.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/problems/SolverNonlinear.cc	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/libsrc/pylith/problems/SolverNonlinear.cc	2012-03-14 16:42:22 UTC (rev 19777)
@@ -62,10 +62,7 @@
 { // deallocate
   Solver::deallocate();
 
-  if (0 != _snes) {
-    PetscErrorCode err = SNESDestroy(&_snes); _snes = 0;
-    CHECK_PETSC_ERROR(err);
-  } // if
+  PetscErrorCode err = SNESDestroy(&_snes);CHECK_PETSC_ERROR(err);
 } // deallocate
   
 // ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/libsrc/pylith/topology/Field.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/topology/Field.cc	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/libsrc/pylith/topology/Field.cc	2012-03-14 16:42:22 UTC (rev 19777)
@@ -75,17 +75,10 @@
   for (typename scatter_map_type::iterator s_iter=_scatters.begin();
        s_iter != scattersEnd;
        ++s_iter) {
-    if (s_iter->second.vector) {
-      err = VecDestroy(&s_iter->second.vector);CHECK_PETSC_ERROR(err);
-    } // if
 
-    if (s_iter->second.scatter) {
-      err = VecScatterDestroy(&s_iter->second.scatter);CHECK_PETSC_ERROR(err);
-    } // if
-
-    if (s_iter->second.scatterVec) {
-      err = VecDestroy(&s_iter->second.scatterVec);CHECK_PETSC_ERROR(err);
-    } // if
+    err = VecDestroy(&s_iter->second.vector);CHECK_PETSC_ERROR(err);
+    err = VecScatterDestroy(&s_iter->second.scatter);CHECK_PETSC_ERROR(err);
+    err = VecDestroy(&s_iter->second.scatterVec);CHECK_PETSC_ERROR(err);
   } // for
   _scatters.clear();
 } // deallocate

Modified: short/3D/PyLith/trunk/pylith/apps/PyLithApp.py
===================================================================
--- short/3D/PyLith/trunk/pylith/apps/PyLithApp.py	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/pylith/apps/PyLithApp.py	2012-03-14 16:42:22 UTC (rev 19777)
@@ -144,6 +144,7 @@
     self.mesher = self.inventory.mesher
     self.problem = self.inventory.problem
     self.perfLogger = self.inventory.perfLogger
+    self.typos = self.inventory.typos
 
     import journal
     self._debug = journal.debug(self.name)

Modified: short/3D/PyLith/trunk/pylith/bc/BoundaryCondition.py
===================================================================
--- short/3D/PyLith/trunk/pylith/bc/BoundaryCondition.py	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/pylith/bc/BoundaryCondition.py	2012-03-14 16:42:22 UTC (rev 19777)
@@ -155,6 +155,14 @@
     return
 
 
+  def _cleanup(self):
+    """
+    Deallocate locally managed data structures.
+    """
+    self.deallocate()
+    return
+
+
   def _createModuleObj(self):
     """
     Call constructor for module object for access to C++ object.

Modified: short/3D/PyLith/trunk/pylith/faults/Fault.py
===================================================================
--- short/3D/PyLith/trunk/pylith/faults/Fault.py	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/pylith/faults/Fault.py	2012-03-14 16:42:22 UTC (rev 19777)
@@ -261,4 +261,12 @@
     return
 
 
+  def _cleanup(self):
+    """
+    Deallocate locally managed data structures.
+    """
+    self.deallocate()
+    return
+
+
 # End of file 

Modified: short/3D/PyLith/trunk/pylith/materials/Material.py
===================================================================
--- short/3D/PyLith/trunk/pylith/materials/Material.py	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/pylith/materials/Material.py	2012-03-14 16:42:22 UTC (rev 19777)
@@ -237,4 +237,12 @@
     return
   
 
+  def _cleanup(self):
+    """
+    Deallocate locally managed data structures.
+    """
+    self.deallocate()
+    return
+
+
 # End of file 

Modified: short/3D/PyLith/trunk/pylith/meshio/CellFilter.py
===================================================================
--- short/3D/PyLith/trunk/pylith/meshio/CellFilter.py	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/pylith/meshio/CellFilter.py	2012-03-14 16:42:22 UTC (rev 19777)
@@ -96,6 +96,14 @@
     return
 
 
+  def _cleanup(self):
+    """
+    Deallocate locally managed data structures.
+    """
+    self.deallocate()
+    return
+
+
 # FACTORIES ////////////////////////////////////////////////////////////
 
 def output_cell_filter():

Modified: short/3D/PyLith/trunk/pylith/meshio/DataWriter.py
===================================================================
--- short/3D/PyLith/trunk/pylith/meshio/DataWriter.py	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/pylith/meshio/DataWriter.py	2012-03-14 16:42:22 UTC (rev 19777)
@@ -58,4 +58,14 @@
     return
 
 
+  # PRIVATE METHODS ////////////////////////////////////////////////////
+
+  def _cleanup(self):
+    """
+    Deallocate locally managed data structures.
+    """
+    self.deallocate()
+    return
+
+
 # End of file

Modified: short/3D/PyLith/trunk/pylith/meshio/OutputManager.py
===================================================================
--- short/3D/PyLith/trunk/pylith/meshio/OutputManager.py	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/pylith/meshio/OutputManager.py	2012-03-14 16:42:22 UTC (rev 19777)
@@ -396,6 +396,14 @@
     return
   
 
+  def _cleanup(self):
+    """
+    Deallocate PETSc and local data structures.
+    """
+    self.deallocate()
+    return
+    
+
   def _open(self):
     raise NotImplementedError("Implement _open() in derived class.")
 

Modified: short/3D/PyLith/trunk/pylith/problems/Solver.py
===================================================================
--- short/3D/PyLith/trunk/pylith/problems/Solver.py	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/pylith/problems/Solver.py	2012-03-14 16:42:22 UTC (rev 19777)
@@ -96,6 +96,14 @@
     return
 
 
+  def _cleanup(self):
+    """
+    Deallocate PETSc and local data structures.
+    """
+    self.deallocate()
+    return
+
+
 # FACTORIES ////////////////////////////////////////////////////////////
 
 def solver():

Modified: short/3D/PyLith/trunk/pylith/problems/SolverNonlinear.py
===================================================================
--- short/3D/PyLith/trunk/pylith/problems/SolverNonlinear.py	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/pylith/problems/SolverNonlinear.py	2012-03-14 16:42:22 UTC (rev 19777)
@@ -69,14 +69,6 @@
     return
 
 
-  def _cleanup(self):
-    """
-    Deallocate PETSc and local data structures.
-    """
-    self.deallocate()
-    return
-
-
 # FACTORIES ////////////////////////////////////////////////////////////
 
 def solver():

Modified: short/3D/PyLith/trunk/pylith/topology/Mesh.py
===================================================================
--- short/3D/PyLith/trunk/pylith/topology/Mesh.py	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/pylith/topology/Mesh.py	2012-03-14 16:42:22 UTC (rev 19777)
@@ -85,4 +85,14 @@
     return groups
 
 
+  # PRIVATE METHODS ////////////////////////////////////////////////////
+
+  def _cleanup(self):
+    """
+    Deallocate locally managed data structures.
+    """
+    self.deallocate()
+    return
+
+
 # End of file

Modified: short/3D/PyLith/trunk/pylith/topology/SubMesh.py
===================================================================
--- short/3D/PyLith/trunk/pylith/topology/SubMesh.py	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/pylith/topology/SubMesh.py	2012-03-14 16:42:22 UTC (rev 19777)
@@ -54,4 +54,14 @@
     return Communicator(ModuleSubMesh.comm(self))
 
 
+  # PRIVATE METHODS ////////////////////////////////////////////////////
+
+  def _cleanup(self):
+    """
+    Deallocate locally managed data structures.
+    """
+    self.deallocate()
+    return
+
+
 # End of file

Modified: short/3D/PyLith/trunk/pylith/utils/PetscComponent.py
===================================================================
--- short/3D/PyLith/trunk/pylith/utils/PetscComponent.py	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/pylith/utils/PetscComponent.py	2012-03-14 16:42:22 UTC (rev 19777)
@@ -70,7 +70,7 @@
 
       # Facility arrays are not PetscComponents but have components().
       elif hasattr(component, "components"):
-        for subcomponent in self.components():
+        for subcomponent in component.components():
           if isinstance(subcomponent, PetscComponent):
             subcomponent.cleanup()
 

Copied: short/3D/PyLith/trunk/share/debug_malloc.cfg (from rev 19776, short/3D/PyLith/branches/v1.6-stable/share/debug_malloc.cfg)
===================================================================
--- short/3D/PyLith/trunk/share/debug_malloc.cfg	                        (rev 0)
+++ short/3D/PyLith/trunk/share/debug_malloc.cfg	2012-03-14 16:42:22 UTC (rev 19777)
@@ -0,0 +1,5 @@
+# Settings used to debug memory allocation/deallocation issues.
+[pylithapp.petsc]
+malloc = True
+malloc_debug = True
+malloc_dump = True

Modified: short/3D/PyLith/trunk/tests/2d/frictionslide/plot_friction.py
===================================================================
--- short/3D/PyLith/trunk/tests/2d/frictionslide/plot_friction.py	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/tests/2d/frictionslide/plot_friction.py	2012-03-14 16:42:22 UTC (rev 19777)
@@ -1,7 +1,15 @@
 #!/usr/bin/env python
 
-sim = "ratestate_stable"
+import sys
 
+if len(sys.argv) != 2:
+    raise ValueError("usage: plot_friction.py [weak | stable]")
+
+sim = sys.argv[1]
+
+if not sim in ['weak', 'stable']:
+    raise ValueError("Unknown sim '%s'." % sim)
+
 # ======================================================================
 import tables
 import pylab
@@ -12,10 +20,10 @@
 dt = 0.01
 t = numpy.arange(0.0, 14.001, dt)
 mu0 = 0.6
-if sim == "ratestate_stable":
+if sim == "stable":
     a = 0.016
     b = 0.012
-elif sim == "ratestate_weak":
+elif sim == "weak":
     a = 0.008
     b = 0.012
 else:
@@ -64,7 +72,7 @@
 
 # ----------------------------------------------------------------------
 
-h5 = tables.openFile("output/%s-fault.h5" % sim, "r")
+h5 = tables.openFile("output/ratestate_%s-fault.h5" % sim, "r")
 time = h5.root.time[:].ravel()
 slip = h5.root.vertex_fields.slip[:]
 slipRate = h5.root.vertex_fields.slip_rate[:]

Modified: short/3D/PyLith/trunk/tests/3d/plasticity/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/tests/3d/plasticity/Makefile.am	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/tests/3d/plasticity/Makefile.am	2012-03-14 16:42:22 UTC (rev 19777)
@@ -18,6 +18,6 @@
 
 SUBDIRS = \
 	threehex8 \
-	threehex27
+	dynamic
 
 # End of file 

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/TestSlipWeakeningShearSliding.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/TestSlipWeakeningShearSliding.py	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/TestSlipWeakeningShearSliding.py	2012-03-14 16:42:22 UTC (rev 19777)
@@ -134,8 +134,8 @@
     strikeDir = (0.0, -1.0)
     normalDir = (-1.0, 0.0)
     initialTraction = (0.0, -1.0e+6)
-    staticCoefficient = 0.6
-    dynamicCoefficient = 0.59
+    staticCoefficient = 0.61
+    dynamicCoefficient = 0.60
     slipWeakeningParameter = 0.2
 
     uy_l = 1.0
@@ -196,6 +196,7 @@
 
     elif name == "previous_slip":
       field = numpy.zeros( (nvertices, 1), dtype=numpy.float64)
+      field[:] = cumulativeSlip
 
     else:
       raise ValueError("Unknown fault field '%s'." % name)

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/slipweakening_shear_sliding.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/slipweakening_shear_sliding.cfg	2012-03-14 15:54:59 UTC (rev 19776)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/slipweakening_shear_sliding.cfg	2012-03-14 16:42:22 UTC (rev 19777)
@@ -136,7 +136,7 @@
 friction.db_properties = spatialdata.spatialdb.UniformDB
 friction.db_properties.label = Slip weakening
 friction.db_properties.values = [static-coefficient,dynamic-coefficient,slip-weakening-parameter,cohesion]
-friction.db_properties.data = [0.6,0.59,0.2*m,0.0*Pa]
+friction.db_properties.data = [0.61,0.6,0.2*m,0.0*Pa]
 
 # ----------------------------------------------------------------------
 # PETSc



More information about the CIG-COMMITS mailing list