[cig-commits] r20049 - in short/3D/PyLith/branches/pylith-scecdynrup: . examples/2d examples/2d/subduction examples/3d/hex8 examples/3d/hex8/spatialdb examples/3d/tet4 examples/bar_shearwave/tet4 examples/bar_shearwave/tri3 examples/twocells/twotet4 examples/twocells/twotet4-geoproj examples/twocells/twotri3 libsrc/pylith libsrc/pylith/bc libsrc/pylith/faults libsrc/pylith/feassemble libsrc/pylith/meshio libsrc/pylith/problems libsrc/pylith/topology modulesrc/faults modulesrc/problems playpen/faultfaces/test playpen/quadratic/twotet10 playpen/reordering pylith pylith/faults pylith/feassemble pylith/meshio pylith/problems tests/3d/plasticity/dynamic tests/3d/refine tests/3d/slipdir tests/refinefaulttip tests_auto/1d/line2 tests_auto/1d/line3 tests_auto/2d/tri3 tests_auto/2d/tri6 tests_auto/3d/tet4 tests_auto/3dnew/tet10 tests_auto/3dnew/tet4 unittests/libtests/faults unittests/libtests/faults/data unittests/pytests/bc unittests/pytests/faults unittests/pytests/faults/data unittests/pytests/feassemble unittests/pytests/materials unittests/pytests/meshio

brad at geodynamics.org brad at geodynamics.org
Mon May 7 13:41:29 PDT 2012


Author: brad
Date: 2012-05-07 13:41:28 -0700 (Mon, 07 May 2012)
New Revision: 20049

Added:
   short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/
   short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/spatialdb/tractions_opening.spatialdb
   short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/step20.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveImpulses.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveImpulses.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/StaticPerturbation.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/StaticPerturbation.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/StaticPerturbation.icc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/TractPerturbation.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/TractPerturbation.hh
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/FaultCohesiveImpulses.i
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/faults/FaultCohesiveImpulses.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/meshio/OutputFaultImpulses.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveImpulses.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveImpulses.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveImpulsesCases.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveImpulsesCases.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesData.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesData.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesDataHex8.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesDataHex8.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesDataQuad4.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesDataQuad4.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesDataTet4.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesDataTet4.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesDataTri3.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesDataTri3.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/hex8_impulses.spatialdb
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/quad4_impulses.spatialdb
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/tet4_impulses.spatialdb
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/tri3_impulses.spatialdb
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/faults/TestFaultCohesiveImpulses.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/faults/data/tri3_impulses.spatialdb
Removed:
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/hex8traction.mesh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/quad4traction.mesh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/tet4traction.mesh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/tri3traction.mesh
Modified:
   short/3D/PyLith/branches/pylith-scecdynrup/TODO
   short/3D/PyLith/branches/pylith-scecdynrup/configure.ac
   short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/step01.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/step02.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/step03.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/README
   short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/step19.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/tet4/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/tet4/step02.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/tet4/step03.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/tet4/step04.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/tet4/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/tri3/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotet4-geoproj/dislocation.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotet4-geoproj/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotet4/dislocation.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotet4/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotri3/dislocation.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotri3/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/bc/Neumann.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/bc/Neumann.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/bc/TimeDependent.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/bc/TimeDependentPoints.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/BruneSlipFn.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/BruneSlipFn.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/ConstRateSlipFn.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/ConstRateSlipFn.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/EqKinSrc.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/EqKinSrc.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveDyn.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveDyn.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveKin.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveLagrange.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveLagrange.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/LiuCosSlipFn.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/LiuCosSlipFn.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/SlipTimeFn.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/StepSlipFn.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/StepSlipFn.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/TimeHistorySlipFn.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/TimeHistorySlipFn.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/faultsfwd.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/ElasticityExplicit.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/DataWriterHDF5.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/DataWriterHDF5.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/DataWriterHDF5Ext.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/DataWriterVTK.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/MeshBuilder.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/MeshIOAscii.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/MeshIOCubit.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/MeshIOHDF5.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/MeshIOLagrit.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/Xdmf.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/Formulation.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/Formulation.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/Solver.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/Solver.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/SolverLinear.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/topology/Distributor.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/topology/Mesh.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/topology/Mesh.icc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/topology/RefineEdges2.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/topology/ReverseCuthillMcKee.cc
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/BruneSlipFn.i
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/ConstRateSlipFn.i
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/EqKinSrc.i
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/FaultCohesiveDyn.i
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/LiuCosSlipFn.i
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/SlipTimeFn.i
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/StepSlipFn.i
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/TimeHistorySlipFn.i
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/faults.i
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/problems/Formulation.i
   short/3D/PyLith/branches/pylith-scecdynrup/playpen/faultfaces/test/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/playpen/quadratic/twotet10/dislocation.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/playpen/quadratic/twotet10/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/playpen/reordering/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/faults/Fault.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/faults/FaultCohesiveDyn.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/feassemble/FIATLagrange.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/feassemble/FIATSimplex.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/Formulation.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/GreensFns.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/tet4.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/refine/tet4.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/slipdir/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/refinefaulttip/tet4.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/refinefaulttip/tri3.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/dislocation.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/extensiondisp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/extensionforce.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/lgdeformtranslation.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line3/axialextension.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line3/dislocation.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/axialdisp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/dislocation.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/dislocation2.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/sheardisp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/sheardisp_refine.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri6/axialdisp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri6/dislocation.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/tet4/axialelasticisotropic.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/tet4/dislocation.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/tet4/shearelasticisotropic.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/tet10/axialdisp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/tet10/dislocation.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/tet4/axialdisp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestBruneSlipFn.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestBruneSlipFn.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestConstRateSlipFn.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestConstRateSlipFn.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestEqKinSrc.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestEqKinSrc.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveDyn.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveDyn.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveKin.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveKin.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestLiuCosSlipFn.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestLiuCosSlipFn.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestStepSlipFn.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestStepSlipFn.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestTimeHistorySlipFn.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestTimeHistorySlipFn.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/bc/TestAbsorbingDampers.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/bc/TestNeumann.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/faults/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/faults/TestFaultCohesiveDyn.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/faults/TestFaultCohesiveKin.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/faults/data/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/faults/testfaults.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/feassemble/TestElasticityExplicit.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/feassemble/TestElasticityExplicitLgDeform.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/feassemble/TestElasticityImplicit.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/feassemble/TestElasticityImplicitLgDeform.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/feassemble/TestFIATSimplex.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/feassemble/TestMeshQuadrature.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/feassemble/TestSubMeshQuadrature.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/materials/TestMaterial.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/meshio/TestCellFilterAvg.py
Log:
Merge from trunk (1.7-trunk).

Modified: short/3D/PyLith/branches/pylith-scecdynrup/TODO
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/TODO	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/TODO	2012-05-07 20:41:28 UTC (rev 20049)
@@ -11,27 +11,20 @@
     pylith step02.cfg ../../../share/debug_malloc.cfg
     pylith step04.cfg ../../../share/debug_malloc.cfg
 
-* Point interpolation
+* Poor trap of detecting point outside the domain in OutputSolnPoints.
 
-  Fails in parallel.
-
-  Test case:
-    cd examples/3d/hex8
-    pylith step19.cfg --nodes=1 # OK
-    pylith step19.cfg --nodes=2 # ERROR
-      [0]PETSC ERROR: Petsc has generated inconsistent data!
-      [0]PETSC ERROR: Invalid number of points located 9 should be 8! 
-
 ======================================================================
 CURRENT ISSUES/PRIORITIES
 ======================================================================
 
-=======
-* FIATSimplex
-  cell.shape -> cell.dimension
+* 2-D materials
 
+  + PowerLawPlaneStrain (power law plane strain ) [Charles]
+
 * Manual
 
+   - FIATSimplex
+     cell.shape -> cell.dimension
   - Order of tensor components for Xdmf files
   - Drucker Prager fit to yield surface
   - Drucker Prage allow tensile yield
@@ -47,7 +40,13 @@
     + Inelastic solution requires increment in driving forces
   - User specified start time (default is 0.0)
   - PETSc w/CUDA
+  - FaultCohesiveDyn
+    Add switch for turning on/off zero tractions for fault opening
+    Added step20
+  - Green's functions
+    examples/2d/greensfns
 
+
 * configure
   
   + Check compatibility of PyLith options with PETSc
@@ -60,12 +59,6 @@
     PETSc configure options (for example, with/without HDF5 and
     single/double precision).
 
-* Green's functions
-
-* 2-D materials
-
-  + PowerLawPlaneStrain (power law plane strain ) [Charles]
-
 * Cleanup
 
     Add elasticPrestep() to Formulation (called from Problem)
@@ -449,16 +442,12 @@
 ======================================================================
 
 ----------------------------------------------------------------------
-Release 1.7
+Release 1.8
 ----------------------------------------------------------------------
 
   1. Damping for Q
     Generalized Maxwell approach for attenuation
 
-  2. 2-D materials
-    + DruckerPragerPlaneStrain (Drucker-Prager plane strain)
-    + PowerLawPlaneStrain (power law plane strain )
-
 ----------------------------------------------------------------------
 Release 2.0
 ----------------------------------------------------------------------
@@ -468,8 +457,6 @@
     Spin up
     Saving quasi-static information is probably more important
 
-  2. Green's functions
-
   3. Coupling of quasi-static and dynamic simulations
 
   1. Higher order cells

Modified: short/3D/PyLith/branches/pylith-scecdynrup/configure.ac
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/configure.ac	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/configure.ac	2012-05-07 20:41:28 UTC (rev 20049)
@@ -352,6 +352,11 @@
 		examples/2d/Makefile
 		examples/2d/subduction/Makefile
 		examples/2d/subduction/output/Makefile
+		examples/2d/greensfns/Makefile
+		examples/2d/greensfns/strikeslip/Makefile
+		examples/2d/greensfns/strikeslip/output/Makefile
+		examples/2d/greensfns/reverse/Makefile
+		examples/2d/greensfns/reverse/output/Makefile
 		examples/bar_shearwave/Makefile
 		examples/twocells/Makefile
 		examples/bar_shearwave/hex8/Makefile

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/Makefile.am	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/Makefile.am	2012-05-07 20:41:28 UTC (rev 20049)
@@ -17,7 +17,8 @@
 #
 
 SUBDIRS = \
-	subduction 
+	subduction \
+	greensfns
 
 
 # End of file 

Copied: short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns (from rev 20048, short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/pylithapp.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/pylithapp.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -76,7 +76,7 @@
 
 # We are doing 2D quadrature for a triangle.
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = triangle
+quadrature.cell.dimension = 2
 
 
 # Continental mantle --------------------
@@ -91,7 +91,7 @@
 
 # We are doing 2D quadrature for a triangle.
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = triangle
+quadrature.cell.dimension = 2
 
 
 # Oceanic crust --------------------
@@ -106,7 +106,7 @@
 
 # We are doing 2D quadrature for a triangle.
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = triangle
+quadrature.cell.dimension = 2
 
 
 # Oceanic mantle --------------------
@@ -121,7 +121,7 @@
 
 # We are doing 2D quadrature for a triangle.
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = triangle
+quadrature.cell.dimension = 2
 
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/step01.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/step01.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/step01.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -96,7 +96,7 @@
 # We must define the quadrature information for fault cells.
 # The fault cells are 1D (line).
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = line
+quadrature.cell.dimension = 1
 
 # The slip time and final slip are defined in spatial databases.
 [pylithapp.timedependent.interfaces.fault.eq_srcs.rupture.slip_function]

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/step02.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/step02.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/step02.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -85,7 +85,7 @@
 # We must define the quadrature information for fault cells.
 # The fault cells are 1D (line).
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = line
+quadrature.cell.dimension = 1
 
 # Switch to constant slip rate time function.
 [pylithapp.timedependent.interfaces.fault_slabtop.eq_srcs.rupture]
@@ -113,7 +113,7 @@
 # We must define the quadrature information for fault cells.
 # The fault cells are 1D (line).
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = line
+quadrature.cell.dimension = 1
 
 # Switch to constant slip rate time function.
 [pylithapp.timedependent.interfaces.fault_slabbot.eq_srcs.rupture]

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/step03.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/step03.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/step03.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -85,7 +85,7 @@
 # We must define the quadrature information for fault cells.
 # The fault cells are 1D (line).
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = line
+quadrature.cell.dimension = 1
 
 # Set earthquake sources to an array consisting of creep and 3 ruptures.
 eq_srcs = [creep,rupture]
@@ -130,7 +130,7 @@
 # We must define the quadrature information for fault cells.
 # The fault cells are 1D (line).
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = line
+quadrature.cell.dimension = 1
 
 # Switch to constant slip rate time function.
 [pylithapp.timedependent.interfaces.fault_slabbot.eq_srcs.rupture]

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/Makefile.am	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/Makefile.am	2012-05-07 20:41:28 UTC (rev 20049)
@@ -58,7 +58,8 @@
 	spatialdb/powerlaw/powerlaw_gendb.cfg \
 	spatialdb/powerlaw/powerlaw_params.spatialdb \
 	spatialdb/powerlaw/powerlaw_points.txt \
-	spatialdb/powerlaw/temperature.spatialdb
+	spatialdb/powerlaw/temperature.spatialdb \
+	spatialdb/tractions_opening.spatialdb
 
 
 SUBDIRS = \

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/README
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/README	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/README	2012-05-07 20:41:28 UTC (rev 20049)
@@ -1,4 +1,4 @@
-The examples in this directory form a step-by-step sequence of 19 problems,
+The examples in this directory form a step-by-step sequence of 20 problems,
 each building on the one before (for the most part). All of the examples
 use the same mesh, which was created by Cubit.  The mesh is 6 km x 6 km x 4
 km with linear hexahedral cells that have edges 1.0 km long.
@@ -68,6 +68,7 @@
         rheology (quasi-static)
 step18: Axial traction surface load on top surface (static)
 step19: Time dependent axial traction surface load on top surface (quasi-static)
+step20: Dike opening via initial tractions and fault constitutive model
 
 ----------------------------------------
 mesh directory
@@ -160,3 +161,7 @@
   desired. The powerlaw_gendb.py utility code is used from this
   directory to create spatialdb/mat_powerlaw.spatialdb.
 
+tractions_opening.spatialdb
+
+  Spatial database defining initial tractions for example step20.
+

Copied: short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/spatialdb/tractions_opening.spatialdb (from rev 20048, short/3D/PyLith/branches/v1.7-trunk/examples/3d/hex8/spatialdb/tractions_opening.spatialdb)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/spatialdb/tractions_opening.spatialdb	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/spatialdb/tractions_opening.spatialdb	2012-05-07 20:41:28 UTC (rev 20049)
@@ -0,0 +1,44 @@
+// -*- C++ -*- (tell Emacs to use C++ mode for syntax highlighting)
+//
+// This spatial database specifies the distribution of initial
+// tractions on the fault surface. We want to mimic a dike intrusion,
+// so we impose tensile (positive) normal tractions in the central
+// portion of the fault surface. We want to keep the rest of the fault
+// surface in contact with zero slip so we impose large compressive
+// (negative) normal tractions.
+//
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 3
+  value-names =  traction-shear-leftlateral  traction-shear-updip  traction-normal
+  value-units =  MPa MPa MPa
+  num-locs = 12
+  data-dim = 2 // Locations of data points are on a surface.
+  space-dim = 3
+  cs-data = cartesian {
+    to-meters = 1.0e+3 // Specify coordinates in km for convenience.
+    space-dim = 3
+  } // cs-data
+} // SimpleDB
+// Columns are
+// (1) x coordinate (km)
+// (2) y coordinate (km)
+// (3) z coordinate (km)
+// (4) left-lateral-slip (m) (right-lateral is negative)
+// (5) reverse-slip (m)
+// (6) fault-opening (m)
+0.0  -1.1   0.0     0.00  0.00  -100.00
+0.0  -1.1  -2.0     0.00  0.00  -100.00
+0.0  -1.1  -2.1     0.00  0.00  -100.00
+
+0.0  -1.0   0.0     0.00  0.00    10.00
+0.0  -1.0  -2.0     0.00  0.00    10.00
+0.0  -1.0  -2.1     0.00  0.00  -100.00
+
+0.0  +1.0   0.0     0.00  0.00    10.00
+0.0  +1.0  -2.0     0.00  0.00    10.00
+0.0  +1.0  -2.1     0.00  0.00  -100.00
+
+0.0  +1.1   0.0     0.00  0.00  -100.00
+0.0  +1.1  -2.0     0.00  0.00  -100.00
+0.0  +1.1  -2.1     0.00  0.00  -100.00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/step19.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/step19.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/step19.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -1,20 +1,20 @@
 [pylithapp]
-
+#
 # ----------------------------------------------------------------------
 # PROBLEM DESCRIPTION
 # ----------------------------------------------------------------------
-
 #
+#
 # This is a purely elastic quasi-static problem using time-dependent
 # Neumann (traction) boundary conditions. We apply normal tractions to
 # the top surface that increase and then decrease while applying
 # roller (fixed normal but free lateral motion) boundary conditions on
 # the lateral sides and bottom surfaces.
-
+#
 # ----------------------------------------------------------------------
 # RUNNING THE SIMULATON
 # ----------------------------------------------------------------------
-
+#
 # This is not a self-contained simulation configuration file. This
 # file only specifies parameters specific to tutorial step19.
 # The general parameters are specificed in the pylithapp.cfg
@@ -24,7 +24,7 @@
 # pylith step19.cfg
 #
 # Output will be directed to directory output.
-
+#
 # ----------------------------------------------------------------------
 # problem
 # ----------------------------------------------------------------------

Copied: short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/step20.cfg (from rev 20048, short/3D/PyLith/branches/v1.7-trunk/examples/3d/hex8/step20.cfg)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/step20.cfg	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/step20.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -0,0 +1,165 @@
+[pylithapp]
+#
+# ----------------------------------------------------------------------
+# PROBLEM DESCRIPTION
+# ----------------------------------------------------------------------
+#
+# This is a pure elastic static problem that demonstrates how to use
+# initial tractions with the FaultCohesiveDyn object to create fault
+# opening consistent with a fluid intrusion, such as a dike.
+#
+# ----------------------------------------------------------------------
+# RUNNING THE SIMULATON
+# ----------------------------------------------------------------------
+#
+# This is not a self-contained simulation configuration file. This
+# file only specifies parameters specific to tutorial step20.
+# The general parameters are specificed in the pylithapp.cfg
+# file which PyLith reads by default.
+#
+# To run the simulation:
+# pylith step20.cfg
+#
+# Output will be directed to directory output.
+#
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.formulation.time_step]
+# Define the total time for the simulation and the default time step size.
+total_time = 0.0*s ; total time of simulation
+# Define an appropriat time step for simulations. Important for
+# nondimensionalization of velocities and slip rates.
+dt = 1.0*year
+
+[pylithapp.timedependent]
+# Set bc to an array of 3 boundary conditions: 'x_pos','x_neg', and 'z_neg'.
+bc = [x_pos,x_neg,z_neg]
+
+# Set interfaces to an array of 1 fault: 'fault'.
+interfaces = [fault]
+
+[pylithapp.timedependent.implicit]
+# Set the output to an array of 2 output managers.
+# We will output the solution over the domain and the ground surface.
+output = [domain,subdomain]
+
+# Set subdomain component to OutputSolnSubset (boundary of the domain).
+output.subdomain = pylith.meshio.OutputSolnSubset
+
+# Fault friction is a nonlinear problem so we need to use the nonlinear
+# solver.
+solver = pylith.problems.SolverNonlinear
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+# Set the parameters for Dirichlet boundary conditions applied on the
+# -x, +x, and -z faces of the box.
+#
+# We fix the x and y degrees of freedom on the -x and +x faces, and
+# fix the z degree of freedom on the bottom (-z) face.
+#
+# For all boundaries, we retain the default ZeroDispDB, which specifies
+# a zero value.
+#
+
+# The label corresponds to the name of the nodeset in CUBIT.
+
+# +x face
+[pylithapp.timedependent.bc.x_pos]
+bc_dof = [0,1]
+label = face_xpos
+db_initial.label = Dirichlet BC on +x
+
+# -x face
+[pylithapp.timedependent.bc.x_neg]
+bc_dof = [0,1]
+label = face_xneg
+db_initial.label = Dirichlet BC on -x
+
+# -z face
+[pylithapp.timedependent.bc.z_neg]
+bc_dof = [2]
+label = face_zneg_nofault
+db_initial.label = Dirichlet BC on -z
+
+# ----------------------------------------------------------------------
+# faults
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.interfaces]
+# Change fault to dynamic fault interface.
+fault = pylith.faults.FaultCohesiveDyn
+
+[pylithapp.timedependent.interfaces.fault]
+# The label corresponds to the name of the nodeset in CUBIT.
+label = fault
+
+# Use the static friction model.
+friction = pylith.friction.StaticFriction
+friction.label = Static friction
+
+# We must define the quadrature information for fault cells.
+# The fault cells are 2D (surface).
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 2
+
+# Set static friction model parameters using a uniform DB. Set the
+# static coefficient of friction to 0.6 and cohesion to 0.0 Pa.
+friction.db_properties = spatialdata.spatialdb.UniformDB
+friction.db_properties.label = Static friction
+friction.db_properties.values = [friction-coefficient,cohesion]
+friction.db_properties.data = [0.1,0.0*Pa]
+
+db_initial_tractions = spatialdata.spatialdb.SimpleDB
+db_initial_tractions.label = Initial fault tractions
+db_initial_tractions.iohandler.filename = spatialdb/tractions_opening.spatialdb
+db_initial_tractions.query_type = nearest
+
+# ----------------------------------------------------------------------
+# PETSc settings
+# ----------------------------------------------------------------------
+# NOTE: There are additional settings specific to fault friction.
+[pylithapp.petsc]
+
+# Friction sensitivity solve used to compute the increment in slip
+# associated with changes in the Lagrange multiplier imposed by the
+# fault constitutive model.
+friction_pc_type = asm
+friction_sub_pc_factor_shift_type = nonzero
+friction_ksp_max_it = 25
+friction_ksp_gmres_restart = 30
+# Uncomment to view details of friction sensitivity solve.
+#friction_ksp_monitor = true
+#friction_ksp_view = true
+friction_ksp_converged_reason = true
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+# Give basename for VTK domain output of solution over domain.
+[pylithapp.problem.formulation.output.domain.writer]
+filename = output/step20.vtk
+
+# Give basename for VTK domain output of solution over ground surface.
+[pylithapp.problem.formulation.output.subdomain]
+# Name of nodeset for ground surface.
+label = face_zpos
+writer.filename = output/step20-groundsurf.vtk
+
+# Give basename for VTK fault output.
+[pylithapp.problem.interfaces.fault.output]
+vertex_info_fields = [initial_traction]
+writer.filename = output/step20-fault.vtk
+
+# Give basename for VTK output of upper_crust state variables.
+[pylithapp.timedependent.materials.upper_crust.output]
+# Average values over quadrature points.
+cell_filter = pylith.meshio.CellFilterAvgMesh
+writer.filename = output/step20-upper_crust.vtk
+
+# Give basename for VTK output of lower_crust state variables.
+[pylithapp.timedependent.materials.lower_crust.output]
+# Average values over quadrature points.
+cell_filter = pylith.meshio.CellFilterAvgMesh
+writer.filename = output/step20-lower_crust.vtk

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/tet4/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/tet4/pylithapp.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/tet4/pylithapp.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -78,7 +78,7 @@
 db_properties.label = Elastic properties
 db_properties.iohandler.filename = spatialdb/mat_elastic.spatialdb
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = tetrahedron
+quadrature.cell.dimension = 3
 
 [pylithapp.timedependent.materials.viscoelastic]
 label = Viscoelastic material
@@ -86,7 +86,7 @@
 db_properties.label = Viscoelastic properties
 db_properties.iohandler.filename = spatialdb/mat_viscoelastic.spatialdb
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = tetrahedron
+quadrature.cell.dimension = 3
 
 # ----------------------------------------------------------------------
 # PETSc

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/tet4/step02.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/tet4/step02.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/tet4/step02.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -105,12 +105,7 @@
 # We split the fields into 3, corresponding to the number of degrees
 # of freeom at each vertex.
 fs_pc_type = fieldsplit
-fs_pc_fieldsplit_real_diagonal = 
+fs_pc_fieldsplit_real_diagonal = True
 fs_pc_fieldsplit_type = multiplicative
 fs_fieldsplit_0_pc_type = ml
-fs_fieldsplit_1_pc_type = ml
-fs_fieldsplit_2_pc_type = ml
 fs_fieldsplit_0_ksp_type = preonly
-fs_fieldsplit_1_ksp_type = preonly
-fs_fieldsplit_2_ksp_type = preonly
-

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/tet4/step03.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/tet4/step03.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/tet4/step03.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -66,7 +66,7 @@
 [pylithapp.timedependent.interfaces.fault]
 label = fault
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = triangle
+quadrature.cell.dimension = 2
 
 [pylithapp.timedependent.interfaces.fault.eq_srcs.rupture.slip_function]
 slip.label = Final slip

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/tet4/step04.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/tet4/step04.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/tet4/step04.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -73,7 +73,7 @@
 [pylithapp.timedependent.interfaces.fault]
 label = fault
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = triangle
+quadrature.cell.dimension = 2
 
 [pylithapp.timedependent.interfaces.fault.eq_srcs.rupture.slip_function]
 slip.label = Final slip
@@ -127,14 +127,9 @@
 # Note that with 3 displacement components plus the Lagrange
 # multiplier vertices, we have split the fields into 4.
 fs_pc_type = fieldsplit
-fs_pc_fieldsplit_real_diagonal = 
+fs_pc_fieldsplit_real_diagonal = True
 fs_pc_fieldsplit_type = multiplicative
 fs_fieldsplit_0_pc_type = ml
-fs_fieldsplit_1_pc_type = ml
-fs_fieldsplit_2_pc_type = ml
-fs_fieldsplit_3_pc_type = ml
+fs_fieldsplit_1_pc_type = jacobi
 fs_fieldsplit_0_ksp_type = preonly
 fs_fieldsplit_1_ksp_type = preonly
-fs_fieldsplit_2_ksp_type = preonly
-fs_fieldsplit_3_ksp_type = preonly
-

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/tet4/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/tet4/pylithapp.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/tet4/pylithapp.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -105,7 +105,7 @@
 # Set the basis functions and quadrature:
 # 3-D simplex cell with 2nd order quadrature
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = tetrahedron
+quadrature.cell.dimension = 3
 quadrature.cell.quad_order = 2
 
 [pylithapp.timedependent.materials.neg]
@@ -123,7 +123,7 @@
 # Set the basis functions and quadrature:
 # 3-D simplex cell with 2nd order quadrature
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = tetrahedron
+quadrature.cell.dimension = 3
 quadrature.cell.quad_order = 2
 
 # ----------------------------------------------------------------------
@@ -142,7 +142,7 @@
 # Specify the basis functions and quadrature:
 # 2-D simplex cell in 3-D space with 2nd order quadrature
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = triangle
+quadrature.cell.dimension = 2
 quadrature.cell.quad_order = 2
 
 [pylithapp.timedependent.bc.x_neg]
@@ -158,7 +158,7 @@
 # Specify the basis functions and quadrature:
 # 2-D simplex cell in 3-D space with 2nd order quadrature
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = triangle
+quadrature.cell.dimension = 2
 quadrature.cell.quad_order = 2
 
 [pylithapp.timedependent.bc.all_nofault]
@@ -193,7 +193,7 @@
 # Specify the basis functions and quadrature:
 # 2-D simplex cell in 3-D space with 2nd order quadrature
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = triangle
+quadrature.cell.dimension = 2
 quadrature.cell.quad_order = 2
 
 # Switch to Brune slip time function

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/tri3/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/tri3/pylithapp.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/tri3/pylithapp.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -102,7 +102,7 @@
 # Set the basis functions and quadrature:
 # 2-D simplex cell with 2nd order quadrature
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = triangle
+quadrature.cell.dimension = 2
 quadrature.cell.quad_order = 2
 
 # ----------------------------------------------------------------------
@@ -121,7 +121,7 @@
 # Specify the basis functions and quadrature:
 # 1-D simplex cell in 2-D space with 2nd order quadrature
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = line
+quadrature.cell.dimension = 1
 quadrature.cell.quad_order = 2
 
 [pylithapp.timedependent.bc.x_neg]
@@ -137,7 +137,7 @@
 # Specify the basis functions and quadrature:
 # 1-D simplex cell in 2-D space with 2nd order quadrature
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = line
+quadrature.cell.dimension = 1
 quadrature.cell.quad_order = 2
 
 [pylithapp.timedependent.bc.all_nofault]
@@ -174,7 +174,7 @@
 # Specify the basis functions and quadrature:
 # 1-D simplex cell in 2-D space with 2nd order quadrature
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = line
+quadrature.cell.dimension = 1
 quadrature.cell.quad_order = 2
 
 # Switch to Brune slip time function

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotet4/dislocation.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotet4/dislocation.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotet4/dislocation.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -79,7 +79,7 @@
 #     material ID's are equal to 100.
 
 # The quadrature for a 3D fault is 2D.
-quadrature.cell.shape = triangle
+quadrature.cell.dimension = 2
 
 # Give the spatial databases specifying the fault slip.
 [pylithapp.timedependent.interfaces.fault.eq_srcs.rupture.slip_function]

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotet4/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotet4/pylithapp.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotet4/pylithapp.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -85,7 +85,7 @@
 db_properties.iohandler.filename = matprops.spatialdb
 
 # We are doing 3D quadrature for a tetrahedron.
-quadrature.cell.shape = tetrahedron
+quadrature.cell.dimension = 3
 
 # ----------------------------------------------------------------------
 # PETSc

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotet4-geoproj/dislocation.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotet4-geoproj/dislocation.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotet4-geoproj/dislocation.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -85,7 +85,7 @@
 # mat_db.iohandler.filename = matprops.spatialdb
 
 # The quadrature for a 3D fault is 2D.
-quadrature.cell.shape = triangle
+quadrature.cell.dimension = 2
 
 # Give the spatial databases specifying the fault slip.
 [pylithapp.timedependent.interfaces.fault.eq_srcs.rupture.slip_function]

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotet4-geoproj/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotet4-geoproj/pylithapp.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotet4-geoproj/pylithapp.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -90,7 +90,7 @@
 
 # We are doing 3D quadrature for a tetrahedron.
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = tetrahedron
+quadrature.cell.dimension = 3
 
 # ----------------------------------------------------------------------
 # PETSc

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotri3/dislocation.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotri3/dislocation.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotri3/dislocation.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -80,7 +80,7 @@
 # for a fault is 100.
 
 # The quadrature for a 2D fault is 1D with a linear shape.
-quadrature.cell.shape = line
+quadrature.cell.dimension = 1
 
 # Give the spatial databases specifying the fault slip.
 [pylithapp.timedependent.interfaces.fault.eq_srcs.rupture.slip_function]

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotri3/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotri3/pylithapp.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotri3/pylithapp.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -84,7 +84,7 @@
 db_properties.iohandler.filename = matprops.spatialdb
 
 # We are doing 2D quadrature for a triangle.
-quadrature.cell.shape = triangle
+quadrature.cell.dimension = 2
 
 # ----------------------------------------------------------------------
 # PETSc

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/Makefile.am	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/Makefile.am	2012-05-07 20:41:28 UTC (rev 20049)
@@ -54,20 +54,22 @@
 	bc/AbsorbingDampers.cc \
 	bc/PointForce.cc \
 	faults/Fault.cc \
-	faults/SlipTimeFn.cc \
-	faults/StepSlipFn.cc \
-	faults/ConstRateSlipFn.cc \
-	faults/BruneSlipFn.cc \
-	faults/TimeHistorySlipFn.cc \
-	faults/LiuCosSlipFn.cc \
-	faults/EqKinSrc.cc \
 	faults/TopologyOps.cc \
 	faults/CohesiveTopology.cc \
 	faults/FaultCohesive.cc \
 	faults/FaultCohesiveLagrange.cc \
 	faults/FaultCohesiveKin.cc \
 	faults/FaultCohesiveDyn.cc \
+	faults/FaultCohesiveImpulses.cc \
 	faults/FaultCohesiveTract.cc \
+	faults/EqKinSrc.cc \
+	faults/SlipTimeFn.cc \
+	faults/StepSlipFn.cc \
+	faults/ConstRateSlipFn.cc \
+	faults/BruneSlipFn.cc \
+	faults/TimeHistorySlipFn.cc \
+	faults/LiuCosSlipFn.cc \
+	faults/TractPerturbation.cc \
 	feassemble/CellGeometry.cc \
 	feassemble/Constraint.cc \
 	feassemble/GeometryPoint1D.cc \

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/bc/Neumann.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/bc/Neumann.cc	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/bc/Neumann.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -23,7 +23,6 @@
 #include "pylith/topology/SubMesh.hh" // USES SubMesh
 #include "pylith/topology/FieldsNew.hh" // HOLDSA FieldsNew
 #include "pylith/topology/Field.hh" // USES Field
-#include "pylith/topology/Fields.hh" // USES Fields
 #include "spatialdata/spatialdb/SpatialDB.hh" // USES SpatialDB
 #include "spatialdata/spatialdb/TimeHistory.hh" // USES TimeHistory
 #include "spatialdata/geocoords/CoordSys.hh" // USES CoordSys
@@ -63,6 +62,7 @@
 void
 pylith::bc::Neumann::deallocate(void)
 { // deallocate
+  TimeDependent::deallocate();
 } // deallocate
   
 // ----------------------------------------------------------------------
@@ -259,7 +259,7 @@
     _parameters->add("rate", "traction_rate",
 		     numQuadPts*spaceDim, topology::FieldBase::MULTI_VECTOR,
 		     rateScale);
-    _parameters->add("rate time", "traction_rate__time",
+    _parameters->add("rate time", "traction_rate_time",
 		     numQuadPts, topology::FieldBase::MULTI_SCALAR,
 		     timeScale);
   } // if

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/bc/Neumann.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/bc/Neumann.hh	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/bc/Neumann.hh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -76,9 +76,7 @@
 
   /** Get cell field with BC information.
    *
-   * @param fieldType Type of field.
    * @param name Name of field.
-   * @param mesh Finite-element mesh.
    * @param fields Solution fields.
    *
    * @returns Traction vector at integration points.

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/bc/TimeDependent.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/bc/TimeDependent.hh	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/bc/TimeDependent.hh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -93,13 +93,6 @@
   virtual
   const char* _getLabel(void) const = 0;
 
-  /** Get manager of scales used to nondimensionalize problem.
-   *
-   * @returns Nondimensionalizer.
-   */
-  virtual
-  const spatialdata::units::Nondimensional& _getNormalizer(void) const = 0;
-
   // PROTECTED MEMBERS //////////////////////////////////////////////////
 protected :
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/bc/TimeDependentPoints.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/bc/TimeDependentPoints.hh	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/bc/TimeDependentPoints.hh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -73,6 +73,13 @@
    */
   const char* _getLabel(void) const;
 
+  /** Get manager of scales used to nondimensionalize problem.
+   *
+   * @returns Nondimensionalizer.
+   */
+  virtual
+  const spatialdata::units::Nondimensional& _getNormalizer(void) const = 0;
+
   /** Query databases for time dependent parameters.
    *
    * @param mesh Finite-element mesh.

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/BruneSlipFn.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/BruneSlipFn.cc	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/BruneSlipFn.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -287,71 +287,6 @@
 } // slip
 
 // ----------------------------------------------------------------------
-// Get increment of slip on fault surface between time t0 and t1.
-void
-pylith::faults::BruneSlipFn::slipIncr(
-				      topology::Field<topology::SubMesh>* slip,
-				      const PylithScalar t0,
-				      const PylithScalar t1)
-{ // slipIncr
-  assert(0 != slip);
-  assert(0 != _parameters);
-
-  // Get vertices in fault mesh
-  const ALE::Obj<SieveMesh>& sieveMesh = slip->mesh().sieveMesh();
-  assert(!sieveMesh.isNull());
-  const ALE::Obj<label_sequence>& vertices = sieveMesh->depthStratum(0);
-  assert(!vertices.isNull());
-  const label_sequence::iterator verticesBegin = vertices->begin();
-  const label_sequence::iterator verticesEnd = vertices->end();
-
-  // Get sections
-  const topology::Field<topology::SubMesh>& finalSlip = 
-    _parameters->get("final slip");
-  const ALE::Obj<RealSection>& finalSlipSection = finalSlip.section();
-  assert(!finalSlipSection.isNull());
-  const topology::Field<topology::SubMesh>& slipTime =
-    _parameters->get("slip time");
-  const ALE::Obj<RealSection>& slipTimeSection = slipTime.section();
-  assert(!slipTimeSection.isNull());
-  const topology::Field<topology::SubMesh>& riseTime =
-    _parameters->get("rise time");
-  const ALE::Obj<RealSection>& riseTimeSection = riseTime.section();
-  assert(!riseTimeSection.isNull());
-  const ALE::Obj<RealSection>& slipSection = slip->section();
-  assert(!slipSection.isNull());
-
-  const int spaceDim = _slipVertex.size();
-  for (label_sequence::iterator v_iter=verticesBegin;
-       v_iter != verticesEnd;
-       ++v_iter) {
-    finalSlipSection->restrictPoint(*v_iter, &_slipVertex[0],
-				   _slipVertex.size());
-    slipTimeSection->restrictPoint(*v_iter, &_slipTimeVertex, 1);
-    riseTimeSection->restrictPoint(*v_iter, &_riseTimeVertex, 1);
-
-    PylithScalar finalSlipMag = 0.0;
-    for (int i=0; i < spaceDim; ++i)
-      finalSlipMag += _slipVertex[i]*_slipVertex[i];
-    finalSlipMag = sqrt(finalSlipMag);
-
-    const PylithScalar slip0 = _slipFn(t0-_slipTimeVertex, finalSlipMag,
-				 _riseTimeVertex);
-    const PylithScalar slip1 = _slipFn(t1-_slipTimeVertex, finalSlipMag,
-				 _riseTimeVertex);
-    const PylithScalar scale = finalSlipMag > 0.0 ? 
-      (slip1 - slip0) / finalSlipMag : 0.0;
-    _slipVertex *= scale;
-
-    
-    // Update field
-    slipSection->updateAddPoint(*v_iter, &_slipVertex[0]);
-  } // for
-
-  PetscLogFlops(vertices->size() * (3+2*8 + 3*_slipVertex.size()));
-} // slipIncr
-
-// ----------------------------------------------------------------------
 // Get final slip.
 const pylith::topology::Field<pylith::topology::SubMesh>&
 pylith::faults::BruneSlipFn::finalSlip(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/BruneSlipFn.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/BruneSlipFn.hh	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/BruneSlipFn.hh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -29,6 +29,8 @@
 
 #include "pylith/topology/topologyfwd.hh" // USES Fields<Field<SubMesh> >
 
+#include "spatialdata/spatialdb/spatialdbfwd.hh" // USES SpatialDB
+
 #include "pylith/utils/types.hh" // HASA PylithScalar
 #include "pylith/utils/array.hh" // HASA scalar_array
 
@@ -79,7 +81,6 @@
   /** Initialize slip time function.
    *
    * @param faultMesh Finite-element mesh of fault.
-   * @param cs Coordinate system for mesh
    * @param normalizer Nondimensionalization of scales.
    * @param originTime Origin time for earthquake source.
    */
@@ -97,18 +98,6 @@
   void slip(topology::Field<topology::SubMesh>* const slipField,
 	    const PylithScalar t);
   
-  /** Get slip increment on fault surface between time t0 and t1.
-   *
-   * @param slipField Slip field over fault surface.
-   * @param t0 Time t.
-   * @param t1 Time t+dt.
-   * 
-   * @returns Increment in slip vector as left-lateral/reverse/normal.
-   */
-  void slipIncr(topology::Field<topology::SubMesh>* slipField,
-		const PylithScalar t0,
-		const PylithScalar t1);
-
   /** Get final slip.
    *
    * @returns Final slip.

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/ConstRateSlipFn.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/ConstRateSlipFn.cc	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/ConstRateSlipFn.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -246,60 +246,6 @@
 } // slip
 
 // ----------------------------------------------------------------------
-// Get increment of slip on fault surface between time t0 and t1.
-void
-pylith::faults::ConstRateSlipFn::slipIncr(
-				      topology::Field<topology::SubMesh>* slip,
-				      const PylithScalar t0,
-				      const PylithScalar t1)
-{ // slipIncr
-  assert(0 != slip);
-  assert(0 != _parameters);
-
-  // Get vertices in fault mesh
-  const ALE::Obj<SieveMesh>& sieveMesh = slip->mesh().sieveMesh();
-  assert(!sieveMesh.isNull());
-  const ALE::Obj<label_sequence>& vertices = sieveMesh->depthStratum(0);
-  assert(!vertices.isNull());
-  const label_sequence::iterator verticesBegin = vertices->begin();
-  const label_sequence::iterator verticesEnd = vertices->end();
-
-  // Get sections
-  const topology::Field<topology::SubMesh>& slipRate = 
-    _parameters->get("slip rate");
-  const ALE::Obj<RealSection>& slipRateSection = slipRate.section();
-  assert(!slipRateSection.isNull());
-  const topology::Field<topology::SubMesh>& slipTime =
-    _parameters->get("slip time");
-  const ALE::Obj<RealSection>& slipTimeSection = slipTime.section();
-  assert(!slipTimeSection.isNull());
-  const ALE::Obj<RealSection>& slipSection = slip->section();
-  assert(!slipSection.isNull());
-
-  for (label_sequence::iterator v_iter=verticesBegin;
-       v_iter != verticesEnd;
-       ++v_iter) {
-    slipRateSection->restrictPoint(*v_iter, &_slipRateVertex[0],
-				   _slipRateVertex.size());
-    slipTimeSection->restrictPoint(*v_iter, &_slipTimeVertex, 1);
-
-    const PylithScalar relTime0 = t0 - _slipTimeVertex;
-    const PylithScalar relTime1 = t1 - _slipTimeVertex;
-    PylithScalar elapsedTime = 0.0;
-    if (relTime0 > 0)
-      elapsedTime = t1 - t0;
-    else if (relTime1 > 0)
-      elapsedTime = t1 - _slipTimeVertex;
-    _slipRateVertex *= elapsedTime; // Convert slip rate to slip
-    
-    // Update field
-    slipSection->updateAddPoint(*v_iter, &_slipRateVertex[0]);
-  } // for
-
-  PetscLogFlops(vertices->size() * (4 + _slipRateVertex.size()));
-} // slipIncr
-
-// ----------------------------------------------------------------------
 // Get final slip.
 const pylith::topology::Field<pylith::topology::SubMesh>&
 pylith::faults::ConstRateSlipFn::finalSlip(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/ConstRateSlipFn.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/ConstRateSlipFn.hh	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/ConstRateSlipFn.hh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -29,6 +29,8 @@
 
 #include "pylith/topology/topologyfwd.hh" // USES Fields<Field<SubMesh> >
 
+#include "spatialdata/spatialdb/spatialdbfwd.hh" // USES SpatialDB
+
 #include "pylith/utils/array.hh" // HASA scalar_array
 
 // ConstRateTimeFn ------------------------------------------------------
@@ -88,18 +90,6 @@
   void slip(topology::Field<topology::SubMesh>* const slipField,
 	    const PylithScalar t);
   
-  /** Get slip increment on fault surface between time t0 and t1.
-   *
-   * @param slipField Slip field over fault surface.
-   * @param t0 Time t.
-   * @param t1 Time t+dt.
-   * 
-   * @returns Increment in slip vector as left-lateral/reverse/normal.
-   */
-  void slipIncr(topology::Field<topology::SubMesh>* slipField,
-		const PylithScalar t0,
-		const PylithScalar t1);
-
   /** Get final slip.
    *
    * @returns Final slip.

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/EqKinSrc.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/EqKinSrc.cc	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/EqKinSrc.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -98,18 +98,6 @@
 } // slip
 
 // ----------------------------------------------------------------------
-// Get slip increment on fault surface from time t0 to 1.
-void
-pylith::faults::EqKinSrc::slipIncr(
-			   topology::Field<topology::SubMesh>* const slipField,
-			   const PylithScalar t0,
-			   const PylithScalar t1)
-{ // slip
-  assert(0 != _slipfn);
-  _slipfn->slipIncr(slipField, t0, t1);
-} // slip
-
-// ----------------------------------------------------------------------
 // Get final slip.
 const pylith::topology::Field<pylith::topology::SubMesh>&
 pylith::faults::EqKinSrc::finalSlip(void) const

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/EqKinSrc.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/EqKinSrc.hh	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/EqKinSrc.hh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -89,16 +89,6 @@
   void slip(topology::Field<topology::SubMesh>* const slipField,
 	    const PylithScalar t);
 
-  /** Get increment of slip on fault surface between time t0 and t1.
-   *
-   * @param slipField Slip increment field over fault mesh.
-   * @param t0 Time for start of slip increment.
-   * @param t1 Time for end of slip increment.
-   */
-  void slipIncr(topology::Field<topology::SubMesh>* const slipField,
-		const PylithScalar t0,
-		const PylithScalar t1);
-
   /** Get final slip.
    *
    * @returns Final slip.

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveDyn.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveDyn.cc	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveDyn.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -65,6 +65,7 @@
 // Default constructor.
 pylith::faults::FaultCohesiveDyn::FaultCohesiveDyn(void) :
   _zeroTolerance(1.0e-10),
+  _openFreeSurf(true),
   _dbInitialTract(0),
   _friction(0),
   _jacobian(0),
@@ -89,7 +90,7 @@
   _friction = 0; // :TODO: Use shared pointer
 
   delete _jacobian; _jacobian = 0;
-  if (0 != _ksp) {
+  if (_ksp) {
     PetscErrorCode err = KSPDestroy(&_ksp); _ksp = 0;
     CHECK_PETSC_ERROR(err);
   } // if
@@ -127,14 +128,23 @@
 } // zeroTolerance
 
 // ----------------------------------------------------------------------
+// Set flag used to determine when fault is traction free when it
+// opens or it still imposes any initial tractions.
+void
+pylith::faults::FaultCohesiveDyn::openFreeSurf(const bool value)
+{ // openFreeSurf
+  _openFreeSurf = value;
+} // openFreeSurf
+
+// ----------------------------------------------------------------------
 // Initialize fault. Determine orientation and setup boundary
 void
 pylith::faults::FaultCohesiveDyn::initialize(const topology::Mesh& mesh,
 					     const PylithScalar upDir[3])
 { // initialize
-  assert(0 != upDir);
-  assert(0 != _quadrature);
-  assert(0 != _normalizer);
+  assert(upDir);
+  assert(_quadrature);
+  assert(_normalizer);
 
   FaultCohesiveLagrange::initialize(mesh, upDir);
 
@@ -142,14 +152,14 @@
   _setupInitialTractions();
 
   // Setup fault constitutive model.
-  assert(0 != _friction);
-  assert(0 != _faultMesh);
-  assert(0 != _fields);
+  assert(_friction);
+  assert(_faultMesh);
+  assert(_fields);
   _friction->normalizer(*_normalizer);
   _friction->initialize(*_faultMesh, _quadrature);
 
   const spatialdata::geocoords::CoordSys* cs = mesh.coordsys();
-  assert(0 != cs);
+  assert(cs);
 
   ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
   logger.stagePush("FaultFields");
@@ -174,9 +184,9 @@
 			     const PylithScalar t,
 			     topology::SolutionFields* const fields)
 { // integrateResidual
-  assert(0 != fields);
-  assert(0 != _fields);
-  assert(0 != _logger);
+  assert(fields);
+  assert(_fields);
+  assert(_logger);
 
   // Cohesive cells with conventional vertices N and P, and constraint
   // vertex L make contributions to the assembled residual:
@@ -334,7 +344,10 @@
     
     residualVertexN = 0.0;
     residualVertexL = 0.0;
-    if (slipNormal < _zeroTolerance) { // if no opening
+    if (slipNormal < _zeroTolerance || !_openFreeSurf) { 
+      // if no opening or flag indicates to still impose initial
+      // tractions when fault is open.
+      //
       // Initial (external) tractions oppose (internal) tractions
       // associated with Lagrange multiplier.
       residualVertexN = areaVertex * (dispTpdtVertexL - initialTractionsVertex);
@@ -383,8 +396,8 @@
 				      const PylithScalar t,
 				      topology::SolutionFields* const fields)
 { // updateStateVars
-  assert(0 != fields);
-  assert(0 != _fields);
+  assert(fields);
+  assert(_fields);
 
   _updateRelMotion(*fields);
 
@@ -1129,8 +1142,8 @@
      const scalar_array&,
      const bool);
 
-  assert(0 != fields);
-  assert(0 != _quadrature);
+  assert(fields);
+  assert(_quadrature);
 
   // Cohesive cells with conventional vertices i and j, and constraint
   // vertex k require three adjustments to the solution:
@@ -1464,15 +1477,17 @@
 pylith::faults::FaultCohesiveDyn::vertexField(const char* name,
                                                const topology::SolutionFields* fields)
 { // vertexField
-  assert(0 != _faultMesh);
-  assert(0 != _quadrature);
-  assert(0 != _normalizer);
-  assert(0 != _fields);
-  assert(0 != _friction);
+  assert(_faultMesh);
+  assert(_quadrature);
+  assert(_normalizer);
+  assert(_fields);
+  assert(_friction);
 
   const int cohesiveDim = _faultMesh->dimension();
   const int spaceDim = _quadrature->spaceDim();
 
+  const topology::Field<topology::SubMesh>& orientation = _fields->get("orientation");
+
   PylithScalar scale = 0.0;
   int fiberDim = 0;
   if (0 == strcasecmp("slip", name)) {
@@ -1483,7 +1498,7 @@
         _fields->get("buffer (vector)");
     buffer.copy(dispRel);
     buffer.label("slip");
-    _globalToFault(&buffer);
+    FaultCohesiveLagrange::globalToFault(&buffer, orientation);
     return buffer;
 
   } else if (0 == strcasecmp("slip_rate", name)) {
@@ -1494,7 +1509,7 @@
         _fields->get("buffer (vector)");
     buffer.copy(velRel);
     buffer.label("slip_rate");
-    _globalToFault(&buffer);
+    FaultCohesiveLagrange::globalToFault(&buffer, orientation);
     return buffer;
 
   } else if (cohesiveDim > 0 && 0 == strcasecmp("strike_dir", name)) {
@@ -1543,18 +1558,18 @@
     return buffer;
 
   } else if (0 == strcasecmp("initial_traction", name)) {
-    assert(0 != _dbInitialTract);
+    assert(_dbInitialTract);
     _allocateBufferVectorField();
     topology::Field<topology::SubMesh>& buffer =
         _fields->get("buffer (vector)");
     topology::Field<topology::SubMesh>& tractions =
         _fields->get("initial traction");
     buffer.copy(tractions);
-    _globalToFault(&buffer);
+    FaultCohesiveLagrange::globalToFault(&buffer, orientation);
     return buffer;
 
   } else if (0 == strcasecmp("traction", name)) {
-    assert(0 != fields);
+    assert(fields);
     const topology::Field<topology::Mesh>& dispT = fields->get("disp(t)");
     _allocateBufferVectorField();
     topology::Field<topology::SubMesh>& buffer =
@@ -1576,7 +1591,7 @@
   throw std::logic_error("Unknown field in FaultCohesiveDyn::vertexField().");
 
   // Satisfy return values
-  assert(0 != _fields);
+  assert(_fields);
   const topology::Field<topology::SubMesh>& buffer = _fields->get(
     "buffer (vector)");
 
@@ -1587,13 +1602,13 @@
 void
 pylith::faults::FaultCohesiveDyn::_setupInitialTractions(void)
 { // _setupInitialTractions
-  assert(0 != _normalizer);
+  assert(_normalizer);
 
   // If no initial tractions specified, leave method
   if (0 == _dbInitialTract)
     return;
 
-  assert(0 != _normalizer);
+  assert(_normalizer);
   const PylithScalar pressureScale = _normalizer->pressureScale();
   const PylithScalar lengthScale = _normalizer->lengthScale();
 
@@ -1618,7 +1633,7 @@
   assert(!orientationSection.isNull());
 
   const spatialdata::geocoords::CoordSys* cs = _faultMesh->coordsys();
-  assert(0 != cs);
+  assert(cs);
 
   const ALE::Obj<SieveSubMesh>& faultSieveMesh = _faultMesh->sieveMesh();
   assert(!faultSieveMesh.isNull());
@@ -1629,7 +1644,7 @@
   assert(!coordsSection.isNull());
 
 
-  assert(0 != _dbInitialTract);
+  assert(_dbInitialTract);
   _dbInitialTract->open();
   switch (spaceDim) { // switch
   case 1: {
@@ -1715,10 +1730,10 @@
     topology::Field<topology::SubMesh>* tractions,
     const topology::Field<topology::Mesh>& dispT)
 { // _calcTractions
-  assert(0 != tractions);
-  assert(0 != _faultMesh);
-  assert(0 != _fields);
-  assert(0 != _normalizer);
+  assert(tractions);
+  assert(_faultMesh);
+  assert(_fields);
+  assert(_normalizer);
 
   // Fiber dimension of tractions matches spatial dimension.
   const int spaceDim = _quadrature->spaceDim();
@@ -1793,7 +1808,7 @@
 void
 pylith::faults::FaultCohesiveDyn::_updateRelMotion(const topology::SolutionFields& fields)
 { // _updateRelMotion
-  assert(0 != _fields);
+  assert(_fields);
 
   const int spaceDim = _quadrature->spaceDim();
 
@@ -1887,8 +1902,8 @@
 void
 pylith::faults::FaultCohesiveDyn::_sensitivitySetup(const topology::Jacobian& jacobian)
 { // _sensitivitySetup
-  assert(0 != _fields);
-  assert(0 != _quadrature);
+  assert(_fields);
+  assert(_quadrature);
 
   const int spaceDim = _quadrature->spaceDim();
 
@@ -1936,7 +1951,7 @@
   // Setup Jacobian sparse matrix for sensitivity solve.
   if (0 == _jacobian)
     _jacobian = new topology::Jacobian(solution, jacobian.matrixType());
-  assert(0 != _jacobian);
+  assert(_jacobian);
   _jacobian->zero();
 
   // Setup PETSc KSP linear solver.
@@ -1972,8 +1987,8 @@
                                                              const topology::Jacobian& jacobian,
                                                              const topology::SolutionFields& fields)
 { // _sensitivityUpdateJacobian
-  assert(0 != _quadrature);
-  assert(0 != _fields);
+  assert(_quadrature);
+  assert(_fields);
 
   const int numBasis = _quadrature->numBasis();
   const int spaceDim = _quadrature->spaceDim();
@@ -1999,7 +2014,7 @@
   // Visitor for Jacobian matrix associated with domain.
   scalar_array jacobianSubCell(submatrixSize);
   const PetscMat jacobianDomainMatrix = jacobian.matrix();
-  assert(0 != jacobianDomainMatrix);
+  assert(jacobianDomainMatrix);
   const ALE::Obj<SieveMesh::order_type>& globalOrderDomain =
     sieveMesh->getFactory()->getGlobalOrder(sieveMesh, "default", solutionDomainSection);
   assert(!globalOrderDomain.isNull());
@@ -2022,9 +2037,9 @@
   assert(!solutionFaultSection.isNull());
 
   // Visitor for Jacobian matrix associated with fault.
-  assert(0 != _jacobian);
+  assert(_jacobian);
   const PetscMat jacobianFaultMatrix = _jacobian->matrix();
-  assert(0 != jacobianFaultMatrix);
+  assert(jacobianFaultMatrix);
   const ALE::Obj<SieveSubMesh::order_type>& globalOrderFault =
     faultSieveMesh->getFactory()->getGlobalOrder(faultSieveMesh, "default", solutionFaultSection);
   assert(!globalOrderFault.isNull());
@@ -2043,7 +2058,7 @@
     const int coneSize = ncV.getSize();
     assert(coneSize == 3*numBasis);
     const SieveMesh::point_type *cohesiveCone = ncV.getPoints();
-    assert(0 != cohesiveCone);
+    assert(cohesiveCone);
 
     const SieveMesh::point_type c_fault = _cohesiveToFault[*c_iter];
     jacobianSubCell = 0.0;
@@ -2198,9 +2213,9 @@
 void
 pylith::faults::FaultCohesiveDyn::_sensitivitySolve(void)
 { // _sensitivitySolve
-  assert(0 != _fields);
-  assert(0 != _jacobian);
-  assert(0 != _ksp);
+  assert(_fields);
+  assert(_jacobian);
+  assert(_ksp);
 
   const topology::Field<topology::SubMesh>& residual =
       _fields->get("sensitivity residual");
@@ -2234,8 +2249,8 @@
 void
 pylith::faults::FaultCohesiveDyn::_sensitivityUpdateSoln(const bool negativeSide)
 { // _sensitivityUpdateSoln
-  assert(0 != _fields);
-  assert(0 != _quadrature);
+  assert(_fields);
+  assert(_quadrature);
 
   const int spaceDim = _quadrature->spaceDim();
 
@@ -2532,7 +2547,7 @@
 	 const scalar_array& tractionTpdt,
 	 const bool iterating)
 { // _constrainSolnSpace1D
-  assert(0 != dTractionTpdt);
+  assert(dTractionTpdt);
 
   if (fabs(slip[0]) < _zeroTolerance) {
     // if compression, then no changes to solution

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveDyn.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveDyn.hh	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveDyn.hh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -73,6 +73,16 @@
    */
   void zeroTolerance(const PylithScalar value);
 
+  /** Set flag used to determine when fault is traction free when it
+   * opens or it still imposes any initial tractions.
+   *
+   * If true, acts as a frictional contact. If false, one can simulate
+   * a dike opening.
+   *
+   * @param value Nondimensional tolerance
+   */
+  void openFreeSurf(const bool value);
+
   /** Initialize fault. Determine orientation and setup boundary
    * condition parameters.
    *
@@ -265,6 +275,11 @@
   // PRIVATE MEMBERS ////////////////////////////////////////////////////
 private :
 
+  /// Flag to control whether to continue to impose initial tractions
+  /// on the fault surface when it opens. If it is a frictional
+  /// contact, then it should be a free surface.
+  bool _openFreeSurf;
+
   /// Minimum resolvable value accounting for roundoff errors
   PylithScalar _zeroTolerance;
 

Copied: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveImpulses.cc (from rev 20048, short/3D/PyLith/branches/v1.7-trunk/libsrc/pylith/faults/FaultCohesiveImpulses.cc)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveImpulses.cc	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveImpulses.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -0,0 +1,484 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010-2012 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "FaultCohesiveImpulses.hh" // implementation of object methods
+
+#include "CohesiveTopology.hh" // USES CohesiveTopology
+
+#include "pylith/feassemble/Quadrature.hh" // USES Quadrature
+#include "pylith/feassemble/CellGeometry.hh" // USES CellGeometry
+#include "pylith/topology/Mesh.hh" // USES Mesh
+#include "pylith/topology/SubMesh.hh" // USES SubMesh
+#include "pylith/topology/Field.hh" // USES Field
+#include "pylith/topology/Fields.hh" // USES Fields
+#include "pylith/topology/Jacobian.hh" // USES Jacobian
+#include "pylith/topology/SolutionFields.hh" // USES SolutionFields
+
+#include "spatialdata/geocoords/CoordSys.hh" // USES CoordSys
+#include "spatialdata/spatialdb/SpatialDB.hh" // USES SpatialDB
+
+#include <cmath> // USES pow(), sqrt()
+#include <strings.h> // USES strcasecmp()
+#include <cstring> // USES strlen()
+#include <cstdlib> // USES atoi()
+#include <cassert> // USES assert()
+#include <sstream> // USES std::ostringstream
+#include <stdexcept> // USES std::runtime_error
+
+//#define PRECOMPUTE_GEOMETRY
+//#define DETAILED_EVENT_LOGGING
+
+// ----------------------------------------------------------------------
+typedef pylith::topology::Mesh::SieveMesh SieveMesh;
+typedef pylith::topology::Mesh::RealSection RealSection;
+typedef pylith::topology::SubMesh::SieveMesh SieveSubMesh;
+
+// ----------------------------------------------------------------------
+// Default constructor.
+pylith::faults::FaultCohesiveImpulses::FaultCohesiveImpulses(void) :
+  _threshold(1.0e-6),
+  _dbImpulseAmp(0)
+{ // constructor
+} // constructor
+
+// ----------------------------------------------------------------------
+// Destructor.
+pylith::faults::FaultCohesiveImpulses::~FaultCohesiveImpulses(void)
+{ // destructor
+  deallocate();
+} // destructor
+
+// ----------------------------------------------------------------------
+// Deallocate PETSc and local data structures.
+void
+pylith::faults::FaultCohesiveImpulses::deallocate(void)
+{ // deallocate
+  FaultCohesiveLagrange::deallocate();
+
+  // :TODO: Use shared pointers for amplitudes of impulses
+  _dbImpulseAmp = 0;
+} // deallocate
+
+// ----------------------------------------------------------------------
+// Sets the spatial database for amplitudes of the impulses.
+void
+pylith::faults::FaultCohesiveImpulses::dbImpulseAmp(spatialdata::spatialdb::SpatialDB* db)
+{ // dbImpulseAmp
+  _dbImpulseAmp = db;
+} // dbImpulseAmp
+  
+// ----------------------------------------------------------------------
+// Set indices of fault degrees of freedom associated with
+void
+pylith::faults::FaultCohesiveImpulses::impulseDOF(const int* flags,
+						  const int size)
+{ // impulseDOF
+  if (size > 0)
+    assert(flags);
+
+  _impulseDOF.resize(size);
+  for (int i=0; i < size; ++i)
+    _impulseDOF[i] = flags[i];
+} // impulseDOF
+
+// ----------------------------------------------------------------------
+// Set threshold for nonzero impulse amplitude.
+void
+pylith::faults::FaultCohesiveImpulses::threshold(const PylithScalar value)
+{ // threshold
+  if (value < 0) {
+    std::ostringstream msg;
+    msg << "Threshold (" << value << ") for nonzero amplitudes of impulses "
+      "must be nonnegative";
+    throw std::runtime_error(msg.str());
+  } // if
+
+  _threshold = value;
+} // threshold
+
+// ----------------------------------------------------------------------
+// Get number of impulses.
+int
+pylith::faults::FaultCohesiveImpulses::numImpulses(void) const
+{ // numImpulses
+  return _impulsePoints.size();
+} // numImpulses
+
+// ----------------------------------------------------------------------
+// Get number of components for impulses at each point.
+int
+pylith::faults::FaultCohesiveImpulses::numComponents(void) const
+{ // numComponents
+  return _impulseDOF.size();
+} // numComponents
+
+// ----------------------------------------------------------------------
+// Initialize fault. Determine orientation and setup boundary
+void
+pylith::faults::FaultCohesiveImpulses::initialize(const topology::Mesh& mesh,
+						  const PylithScalar upDir[3])
+{ // initialize
+  assert(upDir);
+  assert(_quadrature);
+  assert(_normalizer);
+
+  FaultCohesiveLagrange::initialize(mesh, upDir);
+
+  // Setup impulses
+  _setupImpulses();
+} // initialize
+
+// ----------------------------------------------------------------------
+// Integrate contribution of cohesive cells to residual term that do
+// not require assembly across cells, vertices, or processors.
+void
+pylith::faults::FaultCohesiveImpulses::integrateResidual(
+			     const topology::Field<topology::Mesh>& residual,
+			     const PylithScalar t,
+			     topology::SolutionFields* const fields)
+{ // integrateResidual
+  assert(fields);
+  assert(_fields);
+  assert(_logger);
+
+  const int setupEvent = _logger->eventId("FaIR setup");
+  _logger->eventBegin(setupEvent);
+
+  topology::Field<topology::SubMesh>& dispRel = _fields->get("relative disp");
+  dispRel.zero();
+  // Set impulse corresponding to current time.
+  _setRelativeDisp(dispRel, int(t+0.1));
+
+  // Transform slip from local (fault) coordinate system to relative
+  // displacement field in global coordinate system
+  const topology::Field<topology::SubMesh>& orientation = _fields->get("orientation");
+  FaultCohesiveLagrange::faultToGlobal(&dispRel, orientation);
+
+  _logger->eventEnd(setupEvent);
+
+  FaultCohesiveLagrange::integrateResidual(residual, t, fields);
+
+} // integrateResidual
+
+// ----------------------------------------------------------------------
+// Get vertex field associated with integrator.
+const pylith::topology::Field<pylith::topology::SubMesh>&
+pylith::faults::FaultCohesiveImpulses::vertexField(const char* name,
+                                              const topology::SolutionFields* fields)
+{ // vertexField
+  assert(_faultMesh);
+  assert(_quadrature);
+  assert(_normalizer);
+  assert(_fields);
+
+  const int cohesiveDim = _faultMesh->dimension();
+  const int spaceDim = _quadrature->spaceDim();
+
+  const topology::Field<topology::SubMesh>& orientation = _fields->get("orientation");
+
+  PylithScalar scale = 0.0;
+  int fiberDim = 0;
+  if (0 == strcasecmp("slip", name)) {
+    const topology::Field<topology::SubMesh>& dispRel = 
+      _fields->get("relative disp");
+    _allocateBufferVectorField();
+    topology::Field<topology::SubMesh>& buffer =
+        _fields->get("buffer (vector)");
+    buffer.copy(dispRel);
+    buffer.label("slip");
+    FaultCohesiveLagrange::globalToFault(&buffer, orientation);
+    return buffer;
+
+  } else if (cohesiveDim > 0 && 0 == strcasecmp("strike_dir", name)) {
+    const ALE::Obj<RealSection>& orientationSection = _fields->get(
+      "orientation").section();
+    assert(!orientationSection.isNull());
+    const ALE::Obj<RealSection>& dirSection = orientationSection->getFibration(
+      0);
+    assert(!dirSection.isNull());
+    _allocateBufferVectorField();
+    topology::Field<topology::SubMesh>& buffer =
+        _fields->get("buffer (vector)");
+    buffer.copy(dirSection);
+    buffer.label("strike_dir");
+    buffer.scale(1.0);
+    return buffer;
+
+  } else if (2 == cohesiveDim && 0 == strcasecmp("dip_dir", name)) {
+    const ALE::Obj<RealSection>& orientationSection = _fields->get(
+      "orientation").section();
+    assert(!orientationSection.isNull());
+    const ALE::Obj<RealSection>& dirSection = orientationSection->getFibration(
+      1);
+    _allocateBufferVectorField();
+    topology::Field<topology::SubMesh>& buffer =
+        _fields->get("buffer (vector)");
+    buffer.copy(dirSection);
+    buffer.label("dip_dir");
+    buffer.scale(1.0);
+    return buffer;
+
+  } else if (0 == strcasecmp("normal_dir", name)) {
+    const ALE::Obj<RealSection>& orientationSection = _fields->get(
+      "orientation").section();
+    assert(!orientationSection.isNull());
+    const int space = (0 == cohesiveDim) ? 0 : (1 == cohesiveDim) ? 1 : 2;
+    const ALE::Obj<RealSection>& dirSection = orientationSection->getFibration(
+      space);
+    assert(!dirSection.isNull());
+    _allocateBufferVectorField();
+    topology::Field<topology::SubMesh>& buffer =
+        _fields->get("buffer (vector)");
+    buffer.copy(dirSection);
+    buffer.label("normal_dir");
+    buffer.scale(1.0);
+    return buffer;
+
+  } else if (0 == strcasecmp("impulse_amplitude", name)) {
+    topology::Field<topology::SubMesh>& amplitude =
+        _fields->get("impulse amplitude");
+    return amplitude;
+
+  } else if (0 == strcasecmp("traction_change", name)) {
+    assert(fields);
+    const topology::Field<topology::Mesh>& dispT = fields->get("disp(t)");
+    _allocateBufferVectorField();
+    topology::Field<topology::SubMesh>& buffer =
+        _fields->get("buffer (vector)");
+    _calcTractionsChange(&buffer, dispT);
+    return buffer;
+
+  } else {
+    std::ostringstream msg;
+    msg << "Request for unknown vertex field '" << name << "' for fault '"
+        << label() << "'.";
+    throw std::runtime_error(msg.str());
+  } // else
+
+
+  // Should never get here.
+  throw std::logic_error("Unknown field in FaultCohesiveImpulses::vertexField().");
+
+  // Satisfy return values
+  assert(_fields);
+  const topology::Field<topology::SubMesh>& buffer = _fields->get("buffer (vector)");
+  return buffer;
+} // vertexField
+
+ 
+// ----------------------------------------------------------------------
+// Setup amplitudes of impulses.
+void
+pylith::faults::FaultCohesiveImpulses::_setupImpulses(void)
+{ // _setupImpulses
+  // If no impulse amplitude specified, leave method
+  if (!_dbImpulseAmp)
+    return;
+
+  assert(_normalizer);
+  const PylithScalar lengthScale = _normalizer->lengthScale();
+
+  const int spaceDim = _quadrature->spaceDim();
+
+  // Create section to hold amplitudes of impulses.
+  _fields->add("impulse amplitude", "impulse_amplitude");
+  topology::Field<topology::SubMesh>& amplitude = 
+    _fields->get("impulse amplitude");
+  topology::Field<topology::SubMesh>& dispRel = _fields->get("relative disp");
+  const int fiberDim = 1;
+  amplitude.newSection(dispRel, fiberDim);
+  amplitude.allocate();
+  amplitude.scale(lengthScale);
+
+  PylithScalar amplitudeVertex;
+  const ALE::Obj<RealSection>& amplitudeSection = amplitude.section();
+  assert(!amplitudeSection.isNull());
+
+  const spatialdata::geocoords::CoordSys* cs = _faultMesh->coordsys();
+  assert(cs);
+
+  const ALE::Obj<SieveSubMesh>& faultSieveMesh = _faultMesh->sieveMesh();
+  assert(!faultSieveMesh.isNull());
+
+  scalar_array coordsVertex(spaceDim);
+  const ALE::Obj<RealSection>& coordsSection =
+    faultSieveMesh->getRealSection("coordinates");
+  assert(!coordsSection.isNull());
+
+  assert(_dbImpulseAmp);
+  _dbImpulseAmp->open();
+  const char* valueNames[1] = { "slip" };
+  _dbImpulseAmp->queryVals(valueNames, 1);
+
+  std::map<int, int> pointOrder;
+  int count = 0;
+  const int numVertices = _cohesiveVertices.size();
+  for (int iVertex=0; iVertex < numVertices; ++iVertex) {
+    const int v_fault = _cohesiveVertices[iVertex].fault;
+
+    coordsSection->restrictPoint(v_fault, &coordsVertex[0], coordsVertex.size());
+    _normalizer->dimensionalize(&coordsVertex[0], coordsVertex.size(),
+				lengthScale);
+
+    amplitudeVertex = 0.0;
+    int err = _dbImpulseAmp->query(&amplitudeVertex, 1,
+				   &coordsVertex[0], coordsVertex.size(), cs);
+    if (err) {
+      std::ostringstream msg;
+      msg << "Could not find amplitude for Green's function impulses at \n" << "(";
+      for (int i = 0; i < spaceDim; ++i)
+	msg << "  " << coordsVertex[i];
+      msg << ") in fault " << label() << "\n"
+	  << "using spatial database '" << _dbImpulseAmp->label() << "'.";
+      throw std::runtime_error(msg.str());
+    } // if
+
+    if (fabs(amplitudeVertex) < _threshold) {
+      amplitudeVertex = 0.0;
+    } // if
+    _normalizer->nondimensionalize(&amplitudeVertex, 1, lengthScale);
+
+    if (fabs(amplitudeVertex) > 0.0) {
+      pointOrder[iVertex] = count;
+      ++count;
+    } // if
+
+    assert(1 == amplitudeSection->getFiberDimension(v_fault));
+    amplitudeSection->updatePoint(v_fault, &amplitudeVertex);
+  } // for
+
+  // Close properties database
+  _dbImpulseAmp->close();
+
+  //amplitude.view("IMPULSE AMPLITUDE"); // DEBUGGING
+
+  _setupImpulseOrder(pointOrder);
+} // _setupImpulses
+
+
+// ----------------------------------------------------------------------
+// Setup order of implulses.
+void
+pylith::faults::FaultCohesiveImpulses::_setupImpulseOrder(const std::map<int,int>& pointOrder)
+{ // _setupImpulseOrder
+  // Order of impulses is set by processor rank and order of points in
+  // mesh, using only those points with nonzero amplitudes.
+
+  const ALE::Obj<SieveSubMesh>& faultSieveMesh = _faultMesh->sieveMesh();
+  assert(!faultSieveMesh.isNull());
+
+  // Gather number of points on each processor.
+  const int numImpulsesLocal = pointOrder.size();
+  const int commSize = faultSieveMesh->commSize();
+  const int commRank = faultSieveMesh->commRank();
+  int_array numImpulsesAll(commSize);
+  MPI_Comm comm = faultSieveMesh->comm();
+  MPI_Allgather((void*)&numImpulsesLocal, 1, MPI_INT, (void*)&numImpulsesAll[0], commSize, MPI_INT, comm);
+  
+  int localOffset = 0;
+  for (int i=0; i < commRank; ++i) {
+    localOffset += numImpulsesAll[i];
+  } // for
+
+  const int ncomps = _impulseDOF.size();
+
+  _impulsePoints.clear();
+  ImpulseInfoStruct impulseInfo;
+  const std::map<int,int>::const_iterator pointOrderEnd = pointOrder.end();
+  for (std::map<int,int>::const_iterator piter=pointOrder.begin(); piter != pointOrderEnd; ++piter) {
+    impulseInfo.indexCohesive = piter->first;
+    const int offset = localOffset+piter->second;
+    for (int icomp=0; icomp < ncomps; ++icomp) {
+      const int impulse = ncomps*offset + icomp;
+      impulseInfo.indexDOF = _impulseDOF[icomp];
+      _impulsePoints[impulse] = impulseInfo;
+    } // for
+  } // for
+
+#if 0 // DEBUGGING
+  const ALE::Obj<RealSection>& amplitudeSection = _fields->get("impulse amplitude").section();
+  assert(!amplitudeSection.isNull());
+  int impulse = 0;
+  for (int irank=0; irank < commSize; ++irank) {
+    MPI_Barrier(comm);
+    if (commRank == irank) {
+      for (int i=0; i < _impulsePoints.size(); ++i, ++impulse) {
+	const ImpulseInfoStruct& info = _impulsePoints[impulse];
+	const PylithScalar* amplitudeVertex = amplitudeSection->restrictPoint(_cohesiveVertices[info.indexCohesive].fault);
+	std::cout << "["<<irank<<"]: " << impulse << " -> (" << info.indexCohesive << "," << info.indexDOF << "), v_fault: " << _cohesiveVertices[info.indexCohesive].fault << ", amplitude: " << amplitudeVertex[0] << std::endl;
+      } // for
+    } // if
+  } // for
+#endif
+} // _setupImpulseOrder
+
+
+// ----------------------------------------------------------------------
+// Set relative displacemet associated with impulse.
+void
+pylith::faults::FaultCohesiveImpulses::_setRelativeDisp(const topology::Field<topology::SubMesh>& dispRel,
+							const int impulse)
+{ // _setRelativeDisp
+  assert(_fields);
+
+  // If no impulse amplitude specified, leave method
+  if (!_dbImpulseAmp)
+    return;
+
+  const spatialdata::geocoords::CoordSys* cs = _faultMesh->coordsys();
+  assert(cs);
+  const int spaceDim = cs->spaceDim();
+
+  const ALE::Obj<RealSection>& amplitudeSection = _fields->get("impulse amplitude").section();
+  assert(!amplitudeSection.isNull());
+  
+  const ALE::Obj<RealSection>& dispRelSection = dispRel.section();
+  assert(!dispRelSection.isNull());
+
+  scalar_array dispRelVertex(spaceDim);
+  dispRelVertex = 0.0;
+    
+  const srcs_type::const_iterator& impulseInfo = _impulsePoints.find(impulse);
+  if (impulseInfo != _impulsePoints.end()) {
+    const int iVertex = impulseInfo->second.indexCohesive;
+    const int v_fault = _cohesiveVertices[iVertex].fault;
+    const int v_lagrange = _cohesiveVertices[iVertex].lagrange;
+
+    // Get amplitude of slip impulse
+    assert(1 == amplitudeSection->getFiberDimension(v_fault));
+    const PylithScalar* amplitudeVertex = amplitudeSection->restrictPoint(v_fault);
+    assert(amplitudeVertex);
+
+    const int indexDOF = impulseInfo->second.indexDOF;
+    assert(indexDOF >= 0 && indexDOF < spaceDim);
+    dispRelVertex[indexDOF] = amplitudeVertex[0];
+
+    assert(dispRelVertex.size() == dispRelSection->getFiberDimension(v_fault));
+    dispRelSection->updatePoint(v_fault, &dispRelVertex[0]);
+  } // if
+
+#if 0 // DEBUGGING
+  std::cout << "impulse: " << impulse << std::endl;
+  dispRel.view("DISP RELATIVE"); // DEBUGGING
+#endif
+} // _setRelativeDisp
+
+
+// End of file 

Copied: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveImpulses.hh (from rev 20048, short/3D/PyLith/branches/v1.7-trunk/libsrc/pylith/faults/FaultCohesiveImpulses.hh)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveImpulses.hh	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveImpulses.hh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -0,0 +1,180 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010-2012 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ----------------------------------------------------------------------
+//
+
+/** @file libsrc/faults/FaultCohesiveImpulses.hh
+ *
+ * @brief C++ implementation for Green's functions impulses
+ * implemented with cohesive elements.
+ */
+
+#if !defined(pylith_faults_faultcohesiveimpulses_hh)
+#define pylith_faults_faultcohesiveimpulses_hh
+
+// Include directives ---------------------------------------------------
+#include "FaultCohesiveLagrange.hh" // ISA FaultCohesive
+
+#include <map> // HASA std::map
+
+// FaultCohesiveImpulses -----------------------------------------------------
+/**
+ * @brief C++ implementation for Green's functions impulses
+ * implemented with cohesive elements.
+ */
+class pylith::faults::FaultCohesiveImpulses : public FaultCohesiveLagrange
+{ // class FaultCohesiveImpulses
+  friend class TestFaultCohesiveImpulses; // unit testing
+
+  // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+  /// Default constructor.
+  FaultCohesiveImpulses(void);
+
+  /// Destructor.
+  ~FaultCohesiveImpulses(void);
+
+  /// Deallocate PETSc and local data structures.
+  void deallocate(void);
+  
+  /** Sets the spatial database for amplitudes of the impulses.
+   *
+   * @param db spatial database for amplitudes of impulses.
+   */
+  void dbImpulseAmp(spatialdata::spatialdb::SpatialDB* db);
+  
+  /** Set indices of fault degrees of freedom associated with
+   * impulses.
+   *
+   * @param flags Array of indices for degrees of freedom.
+   * @param size Size of array
+   */
+  void impulseDOF(const int* flags,
+		  const int size);  
+
+  /** Set threshold for nonzero impulse amplitude.
+   *
+   * @param value Threshold for detecting nonzero amplitude.
+   */
+  void threshold(const PylithScalar value);
+
+  /** Get number of impulses.
+   *
+   * Multiply by number of components to get total number of impulses.
+   *
+   * @returns Number of points with impulses.
+   */
+  int numImpulses(void) const;
+
+  /** Get number of components for impulses at each point.
+   *
+   * Multiply by number of components to get total number of impulses.
+   *
+   * @returns Number of points with impulses.
+   */
+  int numComponents(void) const;
+
+  /** Initialize fault. Determine orientation and setup boundary
+   * condition parameters.
+   *
+   * @param mesh Finite-element mesh.
+   * @param upDir Direction perpendicular to along-strike direction that is 
+   *   not collinear with fault normal (usually "up" direction but could 
+   *   be up-dip direction; applies to fault surfaces in 2-D and 3-D).
+   */
+  void initialize(const topology::Mesh& mesh,
+		  const PylithScalar upDir[3]);
+
+  /** Integrate contributions to residual term (r) for operator that
+   * do not require assembly across cells, vertices, or processors.
+   *
+   * @param residual Field containing values for residual
+   * @param t Current time
+   * @param fields Solution fields
+   */
+  void integrateResidual(const topology::Field<topology::Mesh>& residual,
+			 const PylithScalar t,
+			 topology::SolutionFields* const fields);
+
+  /** Get vertex field associated with integrator.
+   *
+   * @param name Name of cell field.
+   * @param fields Solution fields.
+   * @returns Vertex field.
+   */
+  const topology::Field<topology::SubMesh>&
+  vertexField(const char* name,
+	      const topology::SolutionFields* fields =0);
+
+  // PRIVATE METHODS ////////////////////////////////////////////////////
+private :
+
+  /// Setup impulses.
+  void _setupImpulses(void);
+
+  /** Setup impulse order.
+   *
+   * @param pointOrder Map from point to impulse (local) index.
+   */
+  void _setupImpulseOrder(const std::map<int, int>& pointOrder);
+
+  /** Set relative displacemet associated with impulse.
+   *
+   * @param dispRel Relative displacement field.
+   * @parm impulse Index of impulse.
+   */
+  void _setRelativeDisp(const topology::Field<topology::SubMesh>& dispRel,
+			const int impulse);
+
+  // PRIVATE TYPEDEFS ///////////////////////////////////////////////////
+private :
+
+  struct ImpulseInfoStruct {
+    int indexCohesive;
+    int indexDOF;
+  }; // ImpulseInfoStruct
+  typedef std::map<int, ImpulseInfoStruct> srcs_type;
+
+  // PRIVATE MEMBERS ////////////////////////////////////////////////////
+private :
+
+  /// Threshold for nonzero impulse amplitude.
+  PylithScalar _threshold;
+
+  /// Database for amplitudes of impulses.
+  spatialdata::spatialdb::SpatialDB* _dbImpulseAmp;
+
+  /// Map from impulse index to corresponding point
+  srcs_type _impulsePoints;
+
+  int_array _impulseDOF; ///< Degrees of freedom associated with impulses.
+
+  // NOT IMPLEMENTED ////////////////////////////////////////////////////
+private :
+
+  /// Not implemented
+  FaultCohesiveImpulses(const FaultCohesiveImpulses&);
+
+  /// Not implemented
+  const FaultCohesiveImpulses& operator=(const FaultCohesiveImpulses&);
+
+}; // class FaultCohesiveImpulses
+
+#endif // pylith_faults_faultcohesiveimpulses_hh
+
+
+// End of file 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveKin.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveKin.cc	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveKin.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -142,7 +142,8 @@
 
   // Transform slip from local (fault) coordinate system to relative
   // displacement field in global coordinate system
-  _faultToGlobal(&dispRel);
+  const topology::Field<topology::SubMesh>& orientation = _fields->get("orientation");
+  FaultCohesiveLagrange::faultToGlobal(&dispRel, orientation);
 
   _logger->eventEnd(setupEvent);
 
@@ -164,6 +165,8 @@
   const int cohesiveDim = _faultMesh->dimension();
   const int spaceDim = _quadrature->spaceDim();
 
+  const topology::Field<topology::SubMesh>& orientation = _fields->get("orientation");
+
   const int slipStrLen = strlen("final_slip");
   const int timeStrLen = strlen("slip_time");
 
@@ -177,7 +180,7 @@
         _fields->get("buffer (vector)");
     buffer.copy(dispRel);
     buffer.label("slip");
-    _globalToFault(&buffer);
+    FaultCohesiveLagrange::globalToFault(&buffer, orientation);
     return buffer;
 
   } else if (cohesiveDim > 0 && 0 == strcasecmp("strike_dir", name)) {

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveLagrange.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveLagrange.cc	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveLagrange.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -1163,6 +1163,118 @@
 } // initializeLogger
 
 // ----------------------------------------------------------------------
+// Transform field from local (fault) coordinate system to
+// global coordinate system.
+void
+pylith::faults::FaultCohesiveLagrange::faultToGlobal(topology::Field<topology::SubMesh>* field,
+						     const topology::Field<topology::SubMesh>& faultOrientation)
+{ // faultToGlobal
+  assert(field);
+
+  // Fiber dimension of vector field matches spatial dimension.
+  const spatialdata::geocoords::CoordSys* cs = field->mesh().coordsys();
+  assert(cs);
+  const int spaceDim = cs->spaceDim();
+  scalar_array fieldVertexGlobal(spaceDim);
+
+  // Get sections.
+  const ALE::Obj<RealSection>& fieldSection = field->section();
+  assert(!fieldSection.isNull());
+
+  const ALE::Obj<RealSection>& orientationSection = faultOrientation.section();
+  assert(!orientationSection.isNull());
+
+  const ALE::Obj<SieveSubMesh>& sieveMesh = field->mesh().sieveMesh();
+  assert(!sieveMesh.isNull());
+  const ALE::Obj<SieveSubMesh::label_sequence>& vertices = sieveMesh->depthStratum(0);
+  assert(!vertices.isNull());
+  const SieveSubMesh::label_sequence::iterator verticesBegin = vertices->begin();
+  const SieveSubMesh::label_sequence::iterator verticesEnd = vertices->end();
+
+  for (SieveSubMesh::label_sequence::iterator v_iter=verticesBegin; v_iter != verticesEnd; ++v_iter) {
+    assert(spaceDim == fieldSection->getFiberDimension(*v_iter));
+    const PylithScalar* fieldVertexFault = fieldSection->restrictPoint(*v_iter);
+    assert(fieldVertexFault);
+
+    assert(spaceDim*spaceDim == orientationSection->getFiberDimension(*v_iter));
+    const PylithScalar* orientationVertex = orientationSection->restrictPoint(*v_iter);
+    assert(orientationVertex);
+
+    // Rotate from fault to global coordinate system (transpose orientation)
+    fieldVertexGlobal = 0.0;
+    for (int iDim=0; iDim < spaceDim; ++iDim)
+      for (int jDim=0; jDim < spaceDim; ++jDim)
+	fieldVertexGlobal[iDim] += 
+	  orientationVertex[jDim*spaceDim+iDim] * fieldVertexFault[jDim];
+
+    assert(fieldVertexGlobal.size() == fieldSection->getFiberDimension(*v_iter));
+    fieldSection->updatePoint(*v_iter, &fieldVertexGlobal[0]);
+  } // for
+
+  PetscLogFlops(vertices->size() * (2*spaceDim*spaceDim) );
+  
+#if 0 // DEBUGGING
+  field->view("FIELD (GLOBAL)");
+#endif
+} // faultToGlobal
+
+// ----------------------------------------------------------------------
+// Transform field from global coordinate system to local (fault)
+// coordinate system.
+void
+pylith::faults::FaultCohesiveLagrange::globalToFault(topology::Field<topology::SubMesh>* field,
+						     const topology::Field<topology::SubMesh>& faultOrientation)
+{ // globalToFault
+  assert(field);
+
+  // Fiber dimension of vector field matches spatial dimension.
+  const spatialdata::geocoords::CoordSys* cs = field->mesh().coordsys();
+  assert(cs);
+  const int spaceDim = cs->spaceDim();
+  scalar_array fieldVertexFault(spaceDim);
+
+  // Get sections.
+  const ALE::Obj<RealSection>& fieldSection = field->section();
+  assert(!fieldSection.isNull());
+
+  const ALE::Obj<RealSection>& orientationSection = faultOrientation.section();
+  assert(!orientationSection.isNull());
+
+  const ALE::Obj<SieveSubMesh>& sieveMesh = field->mesh().sieveMesh();
+  assert(!sieveMesh.isNull());
+  const ALE::Obj<SieveSubMesh::label_sequence>& vertices = sieveMesh->depthStratum(0);
+  assert(!vertices.isNull());
+  const SieveSubMesh::label_sequence::iterator verticesBegin = vertices->begin();
+  const SieveSubMesh::label_sequence::iterator verticesEnd = vertices->end();
+
+  for (SieveSubMesh::label_sequence::iterator v_iter=verticesBegin; v_iter != verticesEnd; ++v_iter) {
+    assert(spaceDim == fieldSection->getFiberDimension(*v_iter));
+    const PylithScalar* fieldVertexGlobal = fieldSection->restrictPoint(*v_iter);
+    assert(fieldVertexGlobal);
+
+    assert(spaceDim*spaceDim == orientationSection->getFiberDimension(*v_iter));
+    const PylithScalar* orientationVertex = orientationSection->restrictPoint(*v_iter);
+    assert(orientationVertex);
+
+    // Rotate from global coordinate system to fault (orientation)
+    fieldVertexFault = 0.0;
+    for (int iDim=0; iDim < spaceDim; ++iDim)
+      for (int jDim=0; jDim < spaceDim; ++jDim)
+	fieldVertexFault[iDim] += 
+	  orientationVertex[iDim*spaceDim+jDim] * fieldVertexGlobal[jDim];
+
+    assert(fieldVertexFault.size() == fieldSection->getFiberDimension(*v_iter));
+    fieldSection->updatePoint(*v_iter, &fieldVertexFault[0]);
+  } // for
+  
+  PetscLogFlops(vertices->size() * (2*spaceDim*spaceDim) );
+  
+#if 0 // DEBUGGING
+  field->view("FIELD (FAULT)");
+#endif
+} // faultToGlobal
+
+// ----------------------------------------------------------------------
 // Calculate orientation at fault vertices.
 void
 pylith::faults::FaultCohesiveLagrange::_calcOrientation(const PylithScalar upDir[3])
@@ -1178,10 +1290,8 @@
   // Get vertices in fault mesh.
   const ALE::Obj<SieveSubMesh>& faultSieveMesh = _faultMesh->sieveMesh();
   assert(!faultSieveMesh.isNull());
-  const ALE::Obj<SieveSubMesh::label_sequence>& vertices =
-      faultSieveMesh->depthStratum(0);
-  const SieveSubMesh::label_sequence::iterator verticesBegin =
-      vertices->begin();
+  const ALE::Obj<SieveSubMesh::label_sequence>& vertices = faultSieveMesh->depthStratum(0);
+  const SieveSubMesh::label_sequence::iterator verticesBegin = vertices->begin();
   const SieveSubMesh::label_sequence::iterator verticesEnd = vertices->end();
 
   // Containers for orientation information.
@@ -1599,112 +1709,6 @@
 } // _calcTractionsChange
 
 // ----------------------------------------------------------------------
-// Transform field from local (fault) coordinate system to
-// global coordinate system.
-void
-pylith::faults::FaultCohesiveLagrange::_faultToGlobal(topology::Field<topology::SubMesh>* field)
-{ // _faultToGlobal
-  assert(field);
-  assert(0 != _faultMesh);
-  assert(0 != _fields);
-
-  // Fiber dimension of vector field matches spatial dimension.
-  const int spaceDim = _quadrature->spaceDim();
-  scalar_array fieldVertexGlobal(spaceDim);
-
-  // Get sections.
-  const ALE::Obj<RealSection>& fieldSection = field->section();
-  assert(!fieldSection.isNull());
-
-  const ALE::Obj<RealSection>& orientationSection =
-    _fields->get("orientation").section();
-  assert(!orientationSection.isNull());
-
-  const int numVertices = _cohesiveVertices.size();
-  for (int iVertex=0; iVertex < numVertices; ++iVertex) {
-    const int v_fault = _cohesiveVertices[iVertex].fault;
-
-    assert(spaceDim == fieldSection->getFiberDimension(v_fault));
-    const PylithScalar* fieldVertexFault = fieldSection->restrictPoint(v_fault);
-    assert(fieldVertexFault);
-
-    assert(spaceDim*spaceDim == orientationSection->getFiberDimension(v_fault));
-    const PylithScalar* orientationVertex = orientationSection->restrictPoint(v_fault);
-    assert(orientationVertex);
-
-    // Rotate from fault to global coordinate system (transpose orientation)
-    fieldVertexGlobal = 0.0;
-    for (int iDim=0; iDim < spaceDim; ++iDim)
-      for (int jDim=0; jDim < spaceDim; ++jDim)
-	fieldVertexGlobal[iDim] += 
-	  orientationVertex[jDim*spaceDim+iDim] * fieldVertexFault[jDim];
-
-    assert(fieldVertexGlobal.size() == 
-	   fieldSection->getFiberDimension(v_fault));
-    fieldSection->updatePoint(v_fault, &fieldVertexGlobal[0]);
-  } // for
-  
-  PetscLogFlops(numVertices * (2*spaceDim*spaceDim) );
-
-#if 0 // DEBUGGING
-  field->view("FIELD (GLOBAL)");
-#endif
-} // _faultToGlobal
-
-// ----------------------------------------------------------------------
-// Transform field from global coordinate system to local (fault)
-// coordinate system.
-void
-pylith::faults::FaultCohesiveLagrange::_globalToFault(topology::Field<topology::SubMesh>* field)
-{ // _globalToFault
-  assert(field);
-  assert(0 != _faultMesh);
-  assert(0 != _fields);
-
-  // Fiber dimension of vector field matches spatial dimension.
-  const int spaceDim = _quadrature->spaceDim();
-  scalar_array fieldVertexFault(spaceDim);
-
-  // Get sections.
-  const ALE::Obj<RealSection>& fieldSection = field->section();
-  assert(!fieldSection.isNull());
-
-  const ALE::Obj<RealSection>& orientationSection =
-    _fields->get("orientation").section();
-  assert(!orientationSection.isNull());
-
-  const int numVertices = _cohesiveVertices.size();
-  for (int iVertex=0; iVertex < numVertices; ++iVertex) {
-    const int v_fault = _cohesiveVertices[iVertex].fault;
-
-    assert(spaceDim == fieldSection->getFiberDimension(v_fault));
-    const PylithScalar* fieldVertexGlobal = fieldSection->restrictPoint(v_fault);
-    assert(fieldVertexGlobal);
-
-    assert(spaceDim*spaceDim == orientationSection->getFiberDimension(v_fault));
-    const PylithScalar* orientationVertex = orientationSection->restrictPoint(v_fault);
-    assert(orientationVertex);
-
-    // Rotate from global coordinate system to fault (orientation)
-    fieldVertexFault = 0.0;
-    for (int iDim=0; iDim < spaceDim; ++iDim)
-      for (int jDim=0; jDim < spaceDim; ++jDim)
-	fieldVertexFault[iDim] += 
-	  orientationVertex[iDim*spaceDim+jDim] * fieldVertexGlobal[jDim];
-
-    assert(fieldVertexFault.size() == 
-	   fieldSection->getFiberDimension(v_fault));
-    fieldSection->updatePoint(v_fault, &fieldVertexFault[0]);
-  } // for
-  
-  PetscLogFlops(numVertices * (2*spaceDim*spaceDim) );
-
-#if 0 // DEBUGGING
-  field->view("FIELD (FAULT)");
-#endif
-} // _faultToGlobal
-
-// ----------------------------------------------------------------------
 // Allocate buffer for vector field.
 void
 pylith::faults::FaultCohesiveLagrange::_allocateBufferVectorField(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveLagrange.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveLagrange.hh	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveLagrange.hh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -206,6 +206,26 @@
   cellField(const char* name,
 	    const topology::SolutionFields* fields =0);
 
+  /** Transform field from local (fault) coordinate system to
+   * global coordinate system.
+   *
+   * @param field Field to transform.
+   * @param faultOrientation Orientation of vertices on fault.
+   */
+  static
+  void faultToGlobal(topology::Field<topology::SubMesh>* field,
+		     const topology::Field<topology::SubMesh>& faultOrientation);
+
+  /** Transform field from global coordinate system to local (fault)
+   * coordinate system.
+   *
+   * @param field Field to transform.
+   * @param faultOrientation Orientation of vertices on fault.
+   */
+  static
+  void globalToFault(topology::Field<topology::SubMesh>* field,
+		     const topology::Field<topology::SubMesh>& faultOrientation);
+
   // PROTECTED STRUCTS //////////////////////////////////////////////////
 protected :
 
@@ -236,20 +256,6 @@
   void _calcTractionsChange(topology::Field<topology::SubMesh>* tractions,
           const topology::Field<topology::Mesh>& solution);
 
-  /** Transform field from local (fault) coordinate system to
-   * global coordinate system.
-   *
-   * @param field Field to transform.
-   */
-  void _faultToGlobal(topology::Field<topology::SubMesh>* field);
-
-  /** Transform field from global coordinate system to local (fault)
-   * coordinate system.
-   *
-   * @param field Field to transform.
-   */
-  void _globalToFault(topology::Field<topology::SubMesh>* field);
-
   /// Allocate buffer for vector field.
   void _allocateBufferVectorField(void);
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/LiuCosSlipFn.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/LiuCosSlipFn.cc	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/LiuCosSlipFn.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -287,71 +287,6 @@
 } // slip
 
 // ----------------------------------------------------------------------
-// Get increment of slip on fault surface between time t0 and t1.
-void
-pylith::faults::LiuCosSlipFn::slipIncr(
-				      topology::Field<topology::SubMesh>* slip,
-				      const PylithScalar t0,
-				      const PylithScalar t1)
-{ // slipIncr
-  assert(0 != slip);
-  assert(0 != _parameters);
-
-  // Get vertices in fault mesh
-  const ALE::Obj<SieveMesh>& sieveMesh = slip->mesh().sieveMesh();
-  assert(!sieveMesh.isNull());
-  const ALE::Obj<label_sequence>& vertices = sieveMesh->depthStratum(0);
-  assert(!vertices.isNull());
-  const label_sequence::iterator verticesBegin = vertices->begin();
-  const label_sequence::iterator verticesEnd = vertices->end();
-
-  // Get sections
-  const topology::Field<topology::SubMesh>& finalSlip = 
-    _parameters->get("final slip");
-  const ALE::Obj<RealSection>& finalSlipSection = finalSlip.section();
-  assert(!finalSlipSection.isNull());
-  const topology::Field<topology::SubMesh>& slipTime =
-    _parameters->get("slip time");
-  const ALE::Obj<RealSection>& slipTimeSection = slipTime.section();
-  assert(!slipTimeSection.isNull());
-  const topology::Field<topology::SubMesh>& riseTime =
-    _parameters->get("rise time");
-  const ALE::Obj<RealSection>& riseTimeSection = riseTime.section();
-  assert(!riseTimeSection.isNull());
-  const ALE::Obj<RealSection>& slipSection = slip->section();
-  assert(!slipSection.isNull());
-
-  const int spaceDim = _slipVertex.size();
-  for (label_sequence::iterator v_iter=verticesBegin;
-       v_iter != verticesEnd;
-       ++v_iter) {
-    finalSlipSection->restrictPoint(*v_iter, &_slipVertex[0],
-				   _slipVertex.size());
-    slipTimeSection->restrictPoint(*v_iter, &_slipTimeVertex, 1);
-    riseTimeSection->restrictPoint(*v_iter, &_riseTimeVertex, 1);
-
-    PylithScalar finalSlipMag = 0.0;
-    for (int i=0; i < spaceDim; ++i)
-      finalSlipMag += _slipVertex[i]*_slipVertex[i];
-    finalSlipMag = sqrt(finalSlipMag);
-
-    const PylithScalar slip0 = _slipFn(t0-_slipTimeVertex, finalSlipMag,
-				 _riseTimeVertex);
-    const PylithScalar slip1 = _slipFn(t1-_slipTimeVertex, finalSlipMag,
-				 _riseTimeVertex);
-    const PylithScalar scale = finalSlipMag > 0.0 ? 
-      (slip1 - slip0) / finalSlipMag : 0.0;
-    _slipVertex *= scale;
-
-    
-    // Update field
-    slipSection->updateAddPoint(*v_iter, &_slipVertex[0]);
-  } // for
-
-  PetscLogFlops(vertices->size() * (3+2*28 + 3*_slipVertex.size()));
-} // slipIncr
-
-// ----------------------------------------------------------------------
 // Get final slip.
 const pylith::topology::Field<pylith::topology::SubMesh>&
 pylith::faults::LiuCosSlipFn::finalSlip(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/LiuCosSlipFn.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/LiuCosSlipFn.hh	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/LiuCosSlipFn.hh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -29,6 +29,8 @@
 
 #include "pylith/topology/topologyfwd.hh" // USES Fields<Field<SubMesh> >
 
+#include "spatialdata/spatialdb/spatialdbfwd.hh" // USES SpatialDB
+
 #include "pylith/utils/array.hh" // HASA scalar_array
 
 // LiuCosSlipFn ---------------------------------------------------------
@@ -79,7 +81,6 @@
   /** Initialize slip time function.
    *
    * @param faultMesh Finite-element mesh of fault.
-   * @param cs Coordinate system for mesh
    * @param normalizer Nondimensionalization of scales.
    * @param originTime Origin time for earthquake source.
    */
@@ -97,18 +98,6 @@
   void slip(topology::Field<topology::SubMesh>* const slipField,
 	    const PylithScalar t);
   
-  /** Get slip increment on fault surface between time t0 and t1.
-   *
-   * @param slipField Slip field over fault surface.
-   * @param t0 Time t.
-   * @param t1 Time t+dt.
-   * 
-   * @returns Increment in slip vector as left-lateral/reverse/normal.
-   */
-  void slipIncr(topology::Field<topology::SubMesh>* slipField,
-		const PylithScalar t0,
-		const PylithScalar t1);
-
   /** Get final slip.
    *
    * @returns Final slip.

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/Makefile.am	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/Makefile.am	2012-05-07 20:41:28 UTC (rev 20049)
@@ -34,6 +34,7 @@
 	FaultCohesiveTract.hh \
 	FaultCohesiveDyn.hh \
 	FaultCohesiveKin.hh \
+	FaultCohesiveImpulses.hh \
 	LiuCosSlipFn.hh \
 	LiuCosSlipFn.icc \
 	SlipTimeFn.hh \
@@ -41,6 +42,7 @@
 	StepSlipFn.icc \
 	TimeHistorySlipFn.hh \
 	TimeHistorySlipFn.icc \
+	TractPerturbation.hh \
 	faultsfwd.hh
 
 noinst_HEADERS = \

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/SlipTimeFn.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/SlipTimeFn.hh	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/SlipTimeFn.hh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -30,7 +30,6 @@
 #include "pylith/topology/topologyfwd.hh" // USES Fields<SubMesh>
 
 #include "spatialdata/units/unitsfwd.hh" // USES Nondimensional
-#include "spatialdata/spatialdb/spatialdbfwd.hh" // USES SpatialDB
 
 // SlipTimeFn -----------------------------------------------------------
 /**
@@ -59,7 +58,6 @@
   /** Initialize slip time function.
    *
    * @param faultMesh Finite-element mesh of fault.
-   * @param cs Coordinate system for mesh
    * @param normalizer Nondimensionalization of scales.
    * @param originTime Origin time for earthquake source.
    */
@@ -72,26 +70,11 @@
    *
    * @param slipField Slip field over fault surface.
    * @param t Time t.
-   *
-   * @returns Slip vector as left-lateral/reverse/normal.
    */
   virtual
   void slip(topology::Field<topology::SubMesh>* const slipField,
 	    const PylithScalar t) = 0;
   
-  /** Get slip increment on fault surface between time t0 and t1.
-   *
-   * @param slipField Slip field over fault surface.
-   * @param t0 Time t.
-   * @param t1 Time t+dt.
-   * 
-   * @returns Increment in slip vector as left-lateral/reverse/normal.
-   */
-  virtual
-  void slipIncr(topology::Field<topology::SubMesh>* slipField,
-		const PylithScalar t0,
-		const PylithScalar t1) = 0;
-
   /** Get final slip.
    *
    * @returns Final slip.

Copied: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/StaticPerturbation.cc (from rev 20048, short/3D/PyLith/branches/v1.7-trunk/libsrc/pylith/faults/StaticPerturbation.cc)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/StaticPerturbation.cc	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/StaticPerturbation.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -0,0 +1,222 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010-2012 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "StaticPerturbation.hh" // implementation of object methods
+
+#include "pylith/topology/SubMesh.hh" // USES SubMesh
+#include "pylith/topology/Fields.hh" // USES Fields
+#include "pylith/topology/Field.hh" // USES Field
+
+#include "spatialdata/spatialdb/SpatialDB.hh" // USES SpatialDB
+#include "spatialdata/geocoords/CoordSys.hh" // USES CoordSys
+#include "spatialdata/units/Nondimensional.hh" // USES Nondimensional
+
+#include <cassert> // USES assert()
+#include <sstream> // USES std::ostringstream
+#include <stdexcept> // USES std::runtime_error
+
+// ----------------------------------------------------------------------
+typedef pylith::topology::SubMesh::SieveMesh SieveMesh;
+typedef pylith::topology::SubMesh::SieveMesh::label_sequence label_sequence;
+typedef pylith::topology::SubMesh::RealSection RealSection;
+
+// ----------------------------------------------------------------------
+// Default constructor.
+pylith::faults::StaticPerturbation::StaticPerturbation(void) :
+  _dbAmplitude(0)
+{ // constructor
+} // constructor
+
+// ----------------------------------------------------------------------
+// Destructor.
+pylith::faults::StaticPerturbation::~StaticPerturbation(void)
+{ // destructor
+  deallocate();
+} // destructor
+
+// ----------------------------------------------------------------------
+// Deallocate PETSc and local data structures.
+void 
+pylith::faults::StaticPerturbation::deallocate(void)
+{ // deallocate
+  TractPerturbation::deallocate();
+
+  _dbAmplitude = 0; // :TODO: Use shared pointer
+} // deallocate
+  
+// ----------------------------------------------------------------------
+// Set spatial database for amplitude of traction.
+void
+pylith::faults::StaticPerturbation::dbAmplitude(spatialdata::spatialdb::SpatialDB* const db) {
+  _dbAmplitude = db;
+} // dbAmplitude
+
+// ----------------------------------------------------------------------
+// Initialize traction perturbation function.
+void
+pylith::faults::StaticPerturbation::initialize(
+			    const topology::SubMesh& faultMesh,
+			    const spatialdata::units::Nondimensional& normalizer)
+{ // initialize
+  assert(_dbAmplitude);
+
+  const spatialdata::geocoords::CoordSys* cs = faultMesh.coordsys();
+  assert(cs);
+  const int spaceDim = cs->spaceDim();
+
+  const PylithScalar lengthScale = normalizer.lengthScale();
+  const PylithScalar timeScale = normalizer.timeScale();
+  const PylithScalar pressureScale = normalizer.pressureScale();
+
+  // Memory logging
+  ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
+  logger.stagePush("Fault");
+
+  // Get vertices in fault mesh
+  const ALE::Obj<SieveMesh>& sieveMesh = faultMesh.sieveMesh();
+  assert(!sieveMesh.isNull());
+  const ALE::Obj<label_sequence>& vertices = sieveMesh->depthStratum(0);
+  assert(!vertices.isNull());
+  const label_sequence::iterator verticesBegin = vertices->begin();
+  const label_sequence::iterator verticesEnd = vertices->end();
+
+  delete _parameters; _parameters = new topology::Fields<topology::Field<topology::SubMesh> >(faultMesh);
+  assert(_parameters);
+  _parameters->add("amplitude", "amplitude");
+
+  topology::Field<topology::SubMesh>& amplitude = _parameters->get("amplitude");
+  amplitude.newSection(vertices, spaceDim);
+  amplitude.allocate();
+  amplitude.scale(pressureScale);
+  amplitude.vectorFieldType(topology::FieldBase::VECTOR);
+  const ALE::Obj<RealSection>& amplitudeSection = amplitude.section();
+  assert(!amplitudeSection.isNull());  
+
+  logger.stagePop();
+
+  // Open databases and set query values
+  _dbAmplitude->open();
+  switch (spaceDim)
+    { // switch
+    case 1 : {
+      const char* tractionValues[1] = {"traction-normal"};
+      _dbAmplitude->queryVals(tractionValues, 1);
+      break;
+    } // case 1
+    case 2 : {
+      const char* tractionValues[2] = {"traction-shear", "traction-normal"};
+      _dbAmplitude->queryVals(tractionValues, 2);
+      break;
+    } // case 2
+    case 3 : {
+      const char* tractionValues[3] = {"traction-shear-leftlateral", 
+				   "traction-shear-updip",
+				   "traction-normal"};
+      _dbAmplitude->queryVals(tractionValues, 3);
+      break;
+    } // case 3
+    default :
+      std::cerr << "Bad spatial dimension '" << spaceDim << "'." << std::endl;
+      assert(0);
+      throw std::logic_error("Bad spatial dimension in StaticPerturbation.");
+    } // switch
+
+  // Get coordinates of vertices
+  const ALE::Obj<RealSection>& coordinates = sieveMesh->getRealSection("coordinates");
+  assert(!coordinates.isNull());
+
+  scalar_array tractionVertex(spaceDim);
+  scalar_array vCoordsGlobal(spaceDim);  
+  for (label_sequence::iterator v_iter=verticesBegin;
+       v_iter != verticesEnd;
+       ++v_iter) {
+    coordinates->restrictPoint(*v_iter, &vCoordsGlobal[0], vCoordsGlobal.size());
+    normalizer.dimensionalize(&vCoordsGlobal[0], vCoordsGlobal.size(), lengthScale);
+        
+    int err = _dbAmplitude->query(&tractionVertex[0], tractionVertex.size(), 
+				  &vCoordsGlobal[0], vCoordsGlobal.size(), cs);
+    if (err) {
+      std::ostringstream msg;
+      msg << "Could not find traction at (";
+      for (int i=0; i < spaceDim; ++i)
+	msg << "  " << vCoordsGlobal[i];
+      msg << ") using spatial database " << _dbAmplitude->label() << ".";
+      throw std::runtime_error(msg.str());
+    } // if
+    normalizer.nondimensionalize(&tractionVertex[0], tractionVertex.size(), pressureScale);
+
+    assert(spaceDim == amplitudeSection->getFiberDimension(*v_iter));
+    amplitudeSection->updatePoint(*v_iter, &tractionVertex[0]);
+  } // for
+
+  // Close databases
+  _dbAmplitude->close();
+} // initialize
+
+// ----------------------------------------------------------------------
+// Get traction on fault surface at time t.
+void
+pylith::faults::StaticPerturbation::traction(topology::Field<topology::SubMesh>* tractionField,
+				 const PylithScalar t)
+{ // traction
+  assert(tractionField);
+  assert(_parameters);
+
+  const spatialdata::geocoords::CoordSys* cs = tractionField->mesh().coordsys();
+  assert(cs);
+  const int spaceDim = cs->spaceDim();
+
+  // Get vertices in fault mesh
+  const ALE::Obj<SieveMesh>& sieveMesh = tractionField->mesh().sieveMesh();
+  assert(!sieveMesh.isNull());
+  const ALE::Obj<label_sequence>& vertices = sieveMesh->depthStratum(0);
+  assert(!vertices.isNull());
+  const label_sequence::iterator verticesBegin = vertices->begin();
+  const label_sequence::iterator verticesEnd = vertices->end();
+
+  // Get sections
+  const ALE::Obj<RealSection>& amplitudeSection = _parameters->get("amplitude").section();
+  assert(!amplitudeSection.isNull());
+  const ALE::Obj<RealSection>& tractionSection = tractionField->section();
+  assert(!tractionSection.isNull());
+
+  for (label_sequence::iterator v_iter=verticesBegin;
+       v_iter != verticesEnd;
+       ++v_iter) {
+    assert(spaceDim == amplitudeSection->getFiberDimension(*v_iter));
+    const PylithScalar* amplitudeVertex = amplitudeSection->restrictPoint(*v_iter);
+
+    // Update field
+    assert(spaceDim == tractionSection->getFiberDimension(*v_iter));
+    tractionSection->updateAddPoint(*v_iter, &amplitudeVertex[0]);
+  } // for
+
+} // traction
+
+// ----------------------------------------------------------------------
+// Get traction amplitude..
+const pylith::topology::Field<pylith::topology::SubMesh>&
+pylith::faults::StaticPerturbation::amplitude(void)
+{ // amplitude
+  return _parameters->get("amplitude");
+} // amplitude
+
+
+// End of file 

Copied: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/StaticPerturbation.hh (from rev 20048, short/3D/PyLith/branches/v1.7-trunk/libsrc/pylith/faults/StaticPerturbation.hh)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/StaticPerturbation.hh	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/StaticPerturbation.hh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -0,0 +1,102 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010-2012 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ----------------------------------------------------------------------
+//
+
+/** @file libsrc/faults/StaticPerturbation.hh
+ *
+ * @brief C++ implementation of a static perturbation in tractions.
+ */
+
+#if !defined(pylith_faults_staticperturbation_hh)
+#define pylith_faults_staticperturbation_hh
+
+// Include directives ---------------------------------------------------
+#include "TractPerturbation.hh"
+
+#include "pylith/utils/array.hh" // HASA scalar_array
+
+#include "spatialdata/spatialdb/spatialdbfwd.hh"
+
+// StaticPerturbation -----------------------------------------------------------
+/**
+ * @brief C++ implementation of a static perturbation in tractions.
+ *
+ * T = F(x)
+*/
+class pylith::faults::StaticPerturbation : public TractPerturbation
+{ // class StaticPerturbation
+  friend class TestStaticPerturbation; // unit testing
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public :
+
+  /// Default constructor.
+  StaticPerturbation(void);
+
+  /// Destructor.
+  ~StaticPerturbation(void);
+
+  /// Deallocate PETSc and local data structures.
+  virtual
+  void deallocate(void);
+  
+  /** Set spatial database for traction amplitude.
+   *
+   * @param db Spatial database
+   */
+  void dbAmplitude(spatialdata::spatialdb::SpatialDB* const db);
+  
+  /** Initialize static perturbation.
+   *
+   * @param faultMesh Finite-element mesh of fault.
+   * @param normalizer Nondimensionalization of scales.
+   */
+  void initialize(const topology::SubMesh& faultMesh,
+		  const spatialdata::units::Nondimensional& normalizer);
+  
+  /** Get traction on fault surface at time t.
+   *
+   * @param tractionField Traction field over fault surface.
+   * @param t Time t.
+   */
+  void traction(topology::Field<topology::SubMesh>* const tractionField,
+		const PylithScalar t);
+  
+  /** Get amplitude of traction perturbation.
+   *
+   * @returns Final slip.
+   */
+  const topology::Field<topology::SubMesh>& amplitude(void);
+
+// NOT IMPLEMENTED //////////////////////////////////////////////////////
+private :
+
+  StaticPerturbation(const StaticPerturbation&); ///< Not implemented.
+  const StaticPerturbation& operator=(const StaticPerturbation&); ///< Not implemented
+
+// PRIVATE MEMBERS //////////////////////////////////////////////////////
+private :
+
+  /// Spatial database for traction perturbation.
+  spatialdata::spatialdb::SpatialDB* _dbAmplitude;
+
+}; // class StaticPerturbation
+
+#endif // pylith_faults_staticperturbation_hh
+
+
+// End of file 

Copied: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/StaticPerturbation.icc (from rev 20048, short/3D/PyLith/branches/v1.7-trunk/libsrc/pylith/faults/StaticPerturbation.icc)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/StaticPerturbation.icc	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/StaticPerturbation.icc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -0,0 +1,38 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010-2011 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ----------------------------------------------------------------------
+//
+
+#if !defined(pylith_faults_stepslipfn_hh)
+#error "StepSlipFn.icc can only be included from StepSlipFn.hh"
+#endif
+
+// Set spatial database for final slip.
+inline
+void
+pylith::faults::StepSlipFn::dbFinalSlip(spatialdata::spatialdb::SpatialDB* const db) {
+  _dbFinalSlip = db;
+} // dbFinalSlip
+
+// Set spatial database for slip initiation time.
+inline
+void
+pylith::faults::StepSlipFn::dbSlipTime(spatialdata::spatialdb::SpatialDB* const db) {
+  _dbSlipTime = db;
+} // dbSlipTime
+
+
+// End of file 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/StepSlipFn.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/StepSlipFn.cc	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/StepSlipFn.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -245,54 +245,6 @@
 } // slip
 
 // ----------------------------------------------------------------------
-// Get increment of slip on fault surface between time t0 and t1.
-void
-pylith::faults::StepSlipFn::slipIncr(topology::Field<topology::SubMesh>* slip,
-				     const PylithScalar t0,
-				     const PylithScalar t1)
-{ // slipIncr
-  assert(0 != slip);
-  assert(0 != _parameters);
-
-  // Get vertices in fault mesh
-  const ALE::Obj<SieveMesh>& sieveMesh = slip->mesh().sieveMesh();
-  assert(!sieveMesh.isNull());
-  const ALE::Obj<label_sequence>& vertices = sieveMesh->depthStratum(0);
-  assert(!vertices.isNull());
-  const label_sequence::iterator verticesBegin = vertices->begin();
-  const label_sequence::iterator verticesEnd = vertices->end();
-
-  // Get sections
-  const topology::Field<topology::SubMesh>& finalSlip = 
-    _parameters->get("final slip");
-  const ALE::Obj<RealSection>& finalSlipSection = finalSlip.section();
-  assert(!finalSlipSection.isNull());
-  const topology::Field<topology::SubMesh>& slipTime =
-    _parameters->get("slip time");
-  const ALE::Obj<RealSection>& slipTimeSection = slipTime.section();
-  assert(!slipTimeSection.isNull());
-  const ALE::Obj<RealSection>& slipSection = slip->section();
-  assert(!slipSection.isNull());
-
-  for (label_sequence::iterator v_iter=verticesBegin;
-       v_iter != verticesEnd;
-       ++v_iter) {
-    finalSlipSection->restrictPoint(*v_iter, &_slipVertex[0], _slipVertex.size());
-    slipTimeSection->restrictPoint(*v_iter, &_slipTimeVertex, 1);
-
-    const PylithScalar relTime0 = t0 - _slipTimeVertex;
-    const PylithScalar relTime1 = t1 - _slipTimeVertex;
-    if (relTime1 < 0.0 || relTime0 >= 0.0)
-      _slipVertex = 0.0;
-    
-    // Update field
-    slipSection->updateAddPoint(*v_iter, &_slipVertex[0]);
-  } // for
-
-  PetscLogFlops(vertices->size() * 2);
-} // slipIncr
-
-// ----------------------------------------------------------------------
 // Get final slip.
 const pylith::topology::Field<pylith::topology::SubMesh>&
 pylith::faults::StepSlipFn::finalSlip(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/StepSlipFn.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/StepSlipFn.hh	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/StepSlipFn.hh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -27,6 +27,8 @@
 // Include directives ---------------------------------------------------
 #include "SlipTimeFn.hh"
 
+#include "spatialdata/spatialdb/spatialdbfwd.hh" // USES SpatialDB
+
 #include "pylith/utils/array.hh" // HASA scalar_array
 
 // StepSlipFn -----------------------------------------------------------
@@ -87,18 +89,6 @@
   void slip(topology::Field<topology::SubMesh>* const slipField,
 	    const PylithScalar t);
   
-  /** Get slip increment on fault surface between time t0 and t1.
-   *
-   * @param slipField Slip field over fault surface.
-   * @param t0 Time t.
-   * @param t1 Time t+dt.
-   * 
-   * @returns Increment in slip vector as left-lateral/reverse/normal.
-   */
-  void slipIncr(topology::Field<topology::SubMesh>* slipField,
-		const PylithScalar t0,
-		const PylithScalar t1);
-
   /** Get final slip.
    *
    * @returns Final slip.

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/TimeHistorySlipFn.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/TimeHistorySlipFn.cc	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/TimeHistorySlipFn.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -271,78 +271,6 @@
 } // slip
 
 // ----------------------------------------------------------------------
-// Get increment of slip on fault surface between time t0 and t1.
-void
-pylith::faults::TimeHistorySlipFn::slipIncr(topology::Field<topology::SubMesh>* slip,
-				     const PylithScalar t0,
-				     const PylithScalar t1)
-{ // slipIncr
-  assert(0 != slip);
-  assert(0 != _parameters);
-  assert(0 != _dbTimeHistory);
-
-  // Get vertices in fault mesh
-  const ALE::Obj<SieveMesh>& sieveMesh = slip->mesh().sieveMesh();
-  assert(!sieveMesh.isNull());
-  const ALE::Obj<label_sequence>& vertices = sieveMesh->depthStratum(0);
-  assert(!vertices.isNull());
-  const label_sequence::iterator verticesBegin = vertices->begin();
-  const label_sequence::iterator verticesEnd = vertices->end();
-
-  // Get sections
-  const topology::Field<topology::SubMesh>& slipAmplitude = 
-    _parameters->get("slip amplitude");
-  const ALE::Obj<RealSection>& slipAmplitudeSection = slipAmplitude.section();
-  assert(!slipAmplitudeSection.isNull());
-  const topology::Field<topology::SubMesh>& slipTime =
-    _parameters->get("slip time");
-  const ALE::Obj<RealSection>& slipTimeSection = slipTime.section();
-  assert(!slipTimeSection.isNull());
-  const ALE::Obj<RealSection>& slipSection = slip->section();
-  assert(!slipSection.isNull());
-
-  PylithScalar amplitude0 = 0.0;
-  PylithScalar amplitude1 = 0.0;
-  for (label_sequence::iterator v_iter=verticesBegin;
-       v_iter != verticesEnd;
-       ++v_iter) {
-    slipAmplitudeSection->restrictPoint(*v_iter, &_slipVertex[0], _slipVertex.size());
-    slipTimeSection->restrictPoint(*v_iter, &_slipTimeVertex, 1);
-
-    PylithScalar relTime0 = t0 - _slipTimeVertex;
-    PylithScalar relTime1 = t1 - _slipTimeVertex;
-    if (relTime1 < 0.0)
-      _slipVertex = 0.0;
-    else {
-      relTime0 *= _timeScale;
-      relTime1 *= _timeScale;
-      int err = _dbTimeHistory->query(&amplitude0, relTime0);
-      if (0 != err) {
-	std::ostringstream msg;
-	msg << "Error querying for time '" << relTime0
-	    << "' in time history database "
-	    << _dbTimeHistory->label() << ".";
-	throw std::runtime_error(msg.str());
-      } // if
-      err = _dbTimeHistory->query(&amplitude1, relTime1);
-      if (0 != err) {
-	std::ostringstream msg;
-	msg << "Error querying for time '" << relTime1
-	    << "' in time history database "
-	    << _dbTimeHistory->label() << ".";
-	throw std::runtime_error(msg.str());
-      } // if
-      _slipVertex *= amplitude1 - amplitude0;
-    } // else
-
-    // Update field
-    slipSection->updateAddPoint(*v_iter, &_slipVertex[0]);
-  } // for
-
-  PetscLogFlops(vertices->size() * 6);
-} // slipIncr
-
-// ----------------------------------------------------------------------
 // Get final slip.
 const pylith::topology::Field<pylith::topology::SubMesh>&
 pylith::faults::TimeHistorySlipFn::finalSlip(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/TimeHistorySlipFn.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/TimeHistorySlipFn.hh	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/TimeHistorySlipFn.hh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -28,6 +28,8 @@
 // Include directives ---------------------------------------------------
 #include "SlipTimeFn.hh"
 
+#include "spatialdata/spatialdb/spatialdbfwd.hh" // USES SpatialDB
+
 #include "pylith/utils/array.hh" // HASA scalar_array
 
 // TimeHistorySlipFn -----------------------------------------------------------
@@ -76,7 +78,6 @@
   /** Initialize slip time function.
    *
    * @param faultMesh Finite-element mesh of fault.
-   * @param cs Coordinate system for mesh
    * @param normalizer Nondimensionalization of scales.
    * @param originTime Origin time for earthquake source.
    */
@@ -94,18 +95,6 @@
   void slip(topology::Field<topology::SubMesh>* const slipField,
 	    const PylithScalar t);
   
-  /** Get slip increment on fault surface between time t0 and t1.
-   *
-   * @param slipField Slip field over fault surface.
-   * @param t0 Time t.
-   * @param t1 Time t+dt.
-   * 
-   * @returns Increment in slip vector as left-lateral/reverse/normal.
-   */
-  void slipIncr(topology::Field<topology::SubMesh>* slipField,
-		const PylithScalar t0,
-		const PylithScalar t1);
-
   /** Get final slip.
    *
    * @returns Final slip.

Copied: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/TractPerturbation.cc (from rev 20048, short/3D/PyLith/branches/v1.7-trunk/libsrc/pylith/faults/TractPerturbation.cc)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/TractPerturbation.cc	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/TractPerturbation.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -0,0 +1,504 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010-2012 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TractPerturbation.hh" // implementation of object methods
+
+#include "FaultCohesiveLagrange.hh" // USES faultToGlobal()
+
+#include "pylith/topology/SubMesh.hh" // USES SubMesh
+#include "pylith/topology/FieldsNew.hh" // HOLDSA FieldsNew
+#include "pylith/topology/Field.hh" // USES Field
+
+#include "spatialdata/spatialdb/SpatialDB.hh" // USES SpatialDB
+#include "spatialdata/spatialdb/TimeHistory.hh" // USES TimeHistory
+#include "spatialdata/geocoords/CoordSys.hh" // USES CoordSys
+#include "spatialdata/units/Nondimensional.hh" // USES Nondimensional
+
+#include <strings.h> // USES strcasecmp()
+#include <cassert> // USES assert()
+#include <stdexcept> // USES std::runtime_error
+#include <sstream> // USES std::ostringstream
+
+// ----------------------------------------------------------------------
+typedef pylith::topology::SubMesh::SieveMesh SieveSubMesh;
+typedef pylith::topology::SubMesh::RealUniformSection SubRealUniformSection;
+typedef pylith::topology::Mesh::RealSection RealSection;
+
+// ----------------------------------------------------------------------
+// Default constructor.
+pylith::faults::TractPerturbation::TractPerturbation(void) :
+  _parameters(0),
+  _timeScale(1.0)
+{ // constructor
+} // constructor
+
+// ----------------------------------------------------------------------
+// Destructor.
+pylith::faults::TractPerturbation::~TractPerturbation(void)
+{ // destructor
+  deallocate();
+} // destructor
+
+// ----------------------------------------------------------------------
+// Deallocate PETSc and local data structures.
+void 
+pylith::faults::TractPerturbation::deallocate(void)
+{ // deallocate
+  TimeDependent::deallocate();
+
+  delete _parameters; _parameters = 0;
+} // deallocate
+  
+// ----------------------------------------------------------------------
+// Set label for traction perturbation.
+void
+pylith::faults::TractPerturbation::label(const char* value)
+{ // label
+  _label = value;
+} // label
+
+// ----------------------------------------------------------------------
+// Initialize traction perturbation function.
+void
+pylith::faults::TractPerturbation::initialize(const topology::SubMesh& faultMesh,
+					      const topology::Field<topology::SubMesh>& faultOrientation, 
+					      const spatialdata::units::Nondimensional& normalizer)
+{ // initialize
+  ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
+  logger.stagePush("Fault");
+
+  const PylithScalar pressureScale = normalizer.pressureScale();
+  const PylithScalar timeScale = normalizer.timeScale();
+  const PylithScalar rateScale = pressureScale / timeScale;
+  _timeScale = timeScale;
+
+  const spatialdata::geocoords::CoordSys* cs = faultMesh.coordsys();
+  assert(cs);
+  const int spaceDim = cs->spaceDim();
+
+  delete _parameters; 
+  _parameters = new topology::FieldsNew<topology::SubMesh>(faultMesh);
+
+  // Create section to hold time dependent values
+  _parameters->add("value", "traction", spaceDim, topology::FieldBase::VECTOR, pressureScale);
+  if (_dbInitial) 
+    _parameters->add("initial", "initial_traction", spaceDim, topology::FieldBase::VECTOR, pressureScale);
+  if (_dbRate) {
+    _parameters->add("rate", "traction_rate", spaceDim, topology::FieldBase::VECTOR, rateScale);
+    _parameters->add("rate time", "traction_rate_time", 1, topology::FieldBase::SCALAR, timeScale);
+  } // if
+  if (_dbChange) {
+    _parameters->add("change", "change_traction", spaceDim, topology::FieldBase::VECTOR, pressureScale);
+    _parameters->add("change time", "change_traction_time", 1, topology::FieldBase::SCALAR, timeScale);
+  } // if
+  _parameters->allocate(topology::FieldBase::VERTICES_FIELD, 1);
+  const ALE::Obj<SubRealUniformSection>& parametersSection = _parameters->section();
+  assert(!parametersSection.isNull());
+
+  if (_dbInitial) { // Setup initial values, if provided.
+    _dbInitial->open();
+    switch (spaceDim)
+      { // switch
+      case 1 : {
+	const char* valueNames[] = {"traction-normal"};
+	_dbInitial->queryVals(valueNames, 1);
+	break;
+      } // case 1
+      case 2 : {
+	const char* valueNames[] = {"traction-shear", "traction-normal"};
+	_dbInitial->queryVals(valueNames, 2);
+	break;
+      } // case 2
+      case 3 : {
+	const char* valueNames[] = {"traction-shear-horiz",
+				    "traction-shear-vert",
+				    "traction-normal"};
+	_dbInitial->queryVals(valueNames, 3);
+	break;
+      } // case 3
+      default :
+	std::cerr << "Bad spatial dimension '" << spaceDim << "'." << std::endl;
+	assert(0);
+	throw std::logic_error("Bad spatial dimension in TractPerturbation.");
+      } // switch
+    _queryDB("initial", _dbInitial, spaceDim, pressureScale, normalizer);
+    _dbInitial->close();
+    pylith::topology::Field<pylith::topology::SubMesh>& initial = _parameters->get("initial");
+    FaultCohesiveLagrange::faultToGlobal(&initial, faultOrientation);
+  } // if
+
+  if (_dbRate) { // Setup rate of change of values, if provided.
+    _dbRate->open();
+    switch (spaceDim)
+      { // switch
+      case 1 : {
+	const char* valueNames[] = {"traction-rate-normal"};
+	_dbRate->queryVals(valueNames, 1);
+	break;
+      } // case 1
+      case 2 : {
+	const char* valueNames[] = {"traction-rate-shear", 
+				    "traction-rate-normal"};
+	_dbRate->queryVals(valueNames, 2);
+	break;
+      } // case 2
+      case 3 : {
+	const char* valueNames[] = {"traction-rate-shear-horiz",
+				    "traction-rate-shear-vert",
+				    "traction-rate-normal"};
+	_dbRate->queryVals(valueNames, 3);
+	break;
+      } // case 3
+      default :
+	std::cerr << "Bad spatial dimension '" << spaceDim << "'." << std::endl;
+	assert(0);
+	throw std::logic_error("Bad spatial dimension in TractPerturbation.");
+      } // switch
+    _queryDB("rate", _dbRate, spaceDim, rateScale, normalizer);
+    
+    const char* timeNames[1] = { "rate-start-time" };
+    _dbRate->queryVals(timeNames, 1);
+    _queryDB("rate time", _dbRate, 1, timeScale, normalizer);
+    _dbRate->close();
+    pylith::topology::Field<pylith::topology::SubMesh>& rate = _parameters->get("rate");
+    FaultCohesiveLagrange::faultToGlobal(&rate, faultOrientation);
+  } // if
+
+  if (_dbChange) { // Setup change of values, if provided.
+    _dbChange->open();
+    switch (spaceDim)
+      { // switch
+      case 1 : {
+	const char* valueNames[] = {"traction-normal"};
+	_dbChange->queryVals(valueNames, 1);
+	break;
+      } // case 1
+      case 2 : {
+	const char* valueNames[] = {"traction-shear", "traction-normal"};
+	_dbChange->queryVals(valueNames, 2);
+	break;
+      } // case 2
+      case 3 : {
+	const char* valueNames[] = {"traction-shear-horiz",
+				    "traction-shear-vert",
+				    "traction-normal"};
+	_dbChange->queryVals(valueNames, 3);
+	break;
+      } // case 3
+      default :
+	std::cerr << "Bad spatial dimension '" << spaceDim << "'." << std::endl;
+	assert(0);
+	throw std::logic_error("Bad spatial dimension in TractPerturbation.");
+      } // switch
+    _queryDB("change", _dbChange, spaceDim, pressureScale, normalizer);
+    
+    const char* timeNames[1] = { "change-start-time" };
+    _dbChange->queryVals(timeNames, 1);
+    _queryDB("change time", _dbChange, 1, timeScale, normalizer);
+    _dbChange->close();
+    pylith::topology::Field<pylith::topology::SubMesh>& change = _parameters->get("change");
+    FaultCohesiveLagrange::faultToGlobal(&change, faultOrientation);
+
+    if (_dbTimeHistory)
+      _dbTimeHistory->open();
+  } // if
+  
+  logger.stagePop();
+} // initialize
+
+// ----------------------------------------------------------------------
+// Get traction perturbation on fault surface at time t.
+void
+pylith::faults::TractPerturbation::traction(topology::Field<topology::SubMesh>* const tractionField,
+					    const PylithScalar t)
+{ // traction
+  assert(tractionField);
+  assert(_parameters);
+
+  _calculateValue(t);
+
+  const spatialdata::geocoords::CoordSys* cs = tractionField->mesh().coordsys();
+  assert(cs);
+  const int spaceDim = cs->spaceDim();
+
+  // Get vertices in fault mesh
+  const ALE::Obj<SieveMesh>& sieveMesh = tractionField->mesh().sieveMesh();
+  assert(!sieveMesh.isNull());
+  const ALE::Obj<SieveSubMesh::label_sequence>& vertices = sieveMesh->depthStratum(0);
+  assert(!vertices.isNull());
+  const SieveSubMesh::label_sequence::iterator verticesBegin = vertices->begin();
+  const SieveSubMesh::label_sequence::iterator verticesEnd = vertices->end();
+
+  // Get sections
+  scalar_array tractionsVertex(spaceDim);
+  const ALE::Obj<SubRealUniformSection>& parametersSection =
+    _parameters->section();
+  assert(!parametersSection.isNull());
+  const int parametersFiberDim = _parameters->fiberDim();
+  const int valueIndex = _parameters->sectionIndex("value");
+  const int valueFiberDim = _parameters->sectionFiberDim("value");
+  assert(valueFiberDim == tractionsVertex.size());
+  assert(valueIndex+valueFiberDim <= parametersFiberDim);
+
+  const ALE::Obj<RealSection>& tractionSection = tractionField->section();
+  assert(!tractionSection.isNull());
+
+  for (SieveSubMesh::label_sequence::iterator v_iter=verticesBegin;
+       v_iter != verticesEnd;
+       ++v_iter) {
+    assert(parametersFiberDim == parametersSection->getFiberDimension(*v_iter));
+    const PylithScalar* parametersVertex = parametersSection->restrictPoint(*v_iter);
+    assert(parametersVertex);
+    const PylithScalar* tractionVertex = &parametersVertex[valueIndex];
+    assert(tractionVertex);
+
+    // Update field
+    assert(spaceDim == tractionSection->getFiberDimension(*v_iter));
+    tractionSection->updateAddPoint(*v_iter, &tractionsVertex[0]);
+  } // for
+
+} // traction
+  
+// ----------------------------------------------------------------------
+// Get parameter fields.
+const pylith::topology::FieldsNew<pylith::topology::SubMesh>*
+pylith::faults::TractPerturbation::parameterFields(void) const
+{ // parameterFields
+  return _parameters;
+} // parameterFields
+
+// ----------------------------------------------------------------------
+// Get vertex field with traction perturbation information.
+const pylith::topology::Field<pylith::topology::SubMesh>&
+pylith::faults::TractPerturbation::vertexField(const char* name,
+					       topology::SolutionFields* const fields)
+{ // vertexField
+  assert(_parameters);
+  assert(name);
+
+  if (0 == strcasecmp(name, "initial-value"))
+    return _parameters->get("initial");
+
+  else if (0 == strcasecmp(name, "rate-of-change"))
+    return _parameters->get("rate");
+
+  else if (0 == strcasecmp(name, "change-in-value"))
+    return _parameters->get("change");
+
+  else if (0 == strcasecmp(name, "rate-start-time"))
+    return _parameters->get("rate time");
+
+  else if (0 == strcasecmp(name, "change-start-time"))
+    return _parameters->get("change time");
+
+  else {
+    std::ostringstream msg;
+    msg << "Unknown field '" << name << "' requested for fault traction perturbation '" 
+	<< _label << "'.";
+    throw std::runtime_error(msg.str());
+  } // else
+
+  return _parameters->get("traction"); // Satisfy method definition
+} // vertexField
+
+// ----------------------------------------------------------------------
+// Get label of boundary condition surface.
+const char*
+pylith::faults::TractPerturbation::_getLabel(void) const
+{ // _getLabel
+  return _label.c_str();
+} // _getLabel
+
+// ----------------------------------------------------------------------
+// Query database for values.
+void
+pylith::faults::TractPerturbation::_queryDB(const char* name,
+					    spatialdata::spatialdb::SpatialDB* const db,
+					    const int querySize,
+					    const PylithScalar scale,
+					    const spatialdata::units::Nondimensional& normalizer)
+{ // _queryDB
+  assert(name);
+  assert(db);
+  assert(_parameters);
+
+  // Get vertices.
+  const ALE::Obj<SieveSubMesh>& sieveMesh = _parameters->mesh().sieveMesh();
+  assert(!sieveMesh.isNull());
+  const ALE::Obj<SieveSubMesh::label_sequence>& vertices = sieveMesh->depthStratum(0);
+  assert(!vertices.isNull());
+  const SieveSubMesh::label_sequence::iterator verticesBegin = vertices->begin();
+  const SieveSubMesh::label_sequence::iterator verticesEnd = vertices->end();
+
+  const spatialdata::geocoords::CoordSys* cs = _parameters->mesh().coordsys();
+  assert(cs);
+  const int spaceDim = cs->spaceDim();
+
+  const PylithScalar lengthScale = normalizer.lengthScale();
+
+  // Containers for database query results and quadrature coordinates in
+  // reference geometry.
+  scalar_array valuesVertex(querySize);
+  scalar_array coordsVertexGlobal(spaceDim);
+
+  // Get sections.
+  const ALE::Obj<RealSection>& coordinates = sieveMesh->getRealSection("coordinates");
+  assert(!coordinates.isNull());
+
+  const ALE::Obj<SubRealUniformSection>& parametersSection = _parameters->section();
+  assert(!parametersSection.isNull());
+  const int parametersFiberDim = _parameters->fiberDim();
+  const int valueIndex = _parameters->sectionIndex(name);
+  const int valueFiberDim = _parameters->sectionFiberDim(name);
+  assert(valueIndex+valueFiberDim <= parametersFiberDim);
+  scalar_array parametersVertex(parametersFiberDim);
+
+  // Loop over cells in boundary mesh and perform queries.
+  for (SieveSubMesh::label_sequence::iterator v_iter = verticesBegin; v_iter != verticesEnd; ++v_iter) {
+    normalizer.dimensionalize(&coordsVertexGlobal[0], coordsVertexGlobal.size(), lengthScale);
+    
+    valuesVertex = 0.0;
+    const int err = db->query(&valuesVertex[0], querySize, &coordsVertexGlobal[0], spaceDim, cs);
+    if (err) {
+      std::ostringstream msg;
+      msg << "Could not find values at (";
+      for (int i=0; i < spaceDim; ++i)
+	msg << " " << coordsVertexGlobal[i];
+      msg << ") for traction boundary condition " << _label << "\n"
+	  << "using spatial database " << db->label() << ".";
+      throw std::runtime_error(msg.str());
+    } // if
+
+    normalizer.nondimensionalize(&valuesVertex[0], valuesVertex.size(), scale);
+
+    // Update section
+    assert(parametersFiberDim == parametersSection->getFiberDimension(*v_iter));
+    parametersSection->restrictPoint(*v_iter, &parametersVertex[0], parametersVertex.size());
+    for (int i=0; i < valueFiberDim; ++i)
+      parametersVertex[valueIndex+i] = valuesVertex[i];
+    
+    parametersSection->updatePoint(*v_iter, &parametersVertex[0]);
+  } // for
+} // _queryDB
+
+// ----------------------------------------------------------------------
+// Calculate temporal and spatial variation of value over the list of Submesh.
+void
+pylith::faults::TractPerturbation::_calculateValue(const PylithScalar t)
+{ // _calculateValue
+  assert(_parameters);
+
+  const PylithScalar timeScale = _timeScale;
+
+  // Get vertices.
+  const ALE::Obj<SieveSubMesh>& sieveMesh = _parameters->mesh().sieveMesh();
+  assert(!sieveMesh.isNull());
+  const ALE::Obj<SieveSubMesh::label_sequence>& vertices = sieveMesh->depthStratum(0);
+  assert(!vertices.isNull());
+  const SieveSubMesh::label_sequence::iterator verticesBegin = vertices->begin();
+  const SieveSubMesh::label_sequence::iterator verticesEnd = vertices->end();
+
+  const spatialdata::geocoords::CoordSys* cs = _parameters->mesh().coordsys();
+  assert(cs);
+  const int spaceDim = cs->spaceDim();
+
+  const ALE::Obj<SubRealUniformSection>& parametersSection = _parameters->section();
+  assert(!parametersSection.isNull());
+  const int parametersFiberDim = _parameters->fiberDim();
+  scalar_array parametersVertex(parametersFiberDim);
+  
+  const int valueIndex = _parameters->sectionIndex("value");
+  const int valueFiberDim = _parameters->sectionFiberDim("value");
+  assert(spaceDim == valueFiberDim);
+
+  const int initialIndex = (_dbInitial) ? _parameters->sectionIndex("initial") : -1;
+  const int initialFiberDim = (_dbInitial) ? _parameters->sectionFiberDim("initial") : 0;
+
+  const int rateIndex = (_dbRate) ? _parameters->sectionIndex("rate") : -1;
+  const int rateFiberDim = (_dbRate) ? _parameters->sectionFiberDim("rate") : 0;
+  const int rateTimeIndex = (_dbRate) ? _parameters->sectionIndex("rate time") : -1;
+  const int rateTimeFiberDim = (_dbRate) ? _parameters->sectionFiberDim("rate time") : 0;
+
+  const int changeIndex = (_dbChange) ? _parameters->sectionIndex("change") : -1;
+  const int changeFiberDim = (_dbChange) ? _parameters->sectionFiberDim("change") : 0;
+  const int changeTimeIndex = (_dbChange) ? _parameters->sectionIndex("change time") : -1;
+  const int changeTimeFiberDim = (_dbChange) ? _parameters->sectionFiberDim("change time") : 0;
+
+  for(SieveSubMesh::label_sequence::iterator v_iter = verticesBegin; v_iter != verticesEnd; ++v_iter) {
+    assert(parametersFiberDim == parametersSection->getFiberDimension(*v_iter));
+    parametersSection->restrictPoint(*v_iter, &parametersVertex[0], parametersVertex.size());
+    for (int i=0; i < valueFiberDim; ++i)
+      parametersVertex[valueIndex+i] = 0.0;
+
+    // Contribution from initial value
+    if (_dbInitial) {
+      assert(initialIndex >= 0);
+      assert(initialFiberDim == valueFiberDim);
+      for (int i=0; i < initialFiberDim; ++i)
+	parametersVertex[valueIndex+i] += parametersVertex[initialIndex+i];
+    } // if
+    
+    // Contribution from rate of change of value
+    if (_dbRate) {
+      assert(rateIndex >= 0);
+      assert(rateFiberDim == valueFiberDim);
+      assert(rateTimeIndex >= 0);
+      assert(rateTimeFiberDim == 1);
+      
+      const PylithScalar tRel = t - parametersVertex[rateTimeIndex];
+      if (tRel > 0.0)  // rate of change integrated over time
+	for (int iDim=0; iDim < spaceDim; ++iDim) {
+	  parametersVertex[valueIndex+iDim] += parametersVertex[rateIndex+iDim] * tRel;
+	} // for
+    } // if
+    
+    // Contribution from change of value
+    if (_dbChange) {
+      assert(changeIndex >= 0);
+      assert(changeFiberDim == valueFiberDim);
+      assert(changeTimeIndex >= 0);
+      assert(changeTimeFiberDim == 1);
+
+      const PylithScalar tRel = t - parametersVertex[changeTimeIndex];
+      if (tRel >= 0) { // change in value over time
+	PylithScalar scale = 1.0;
+	if (_dbTimeHistory) {
+	  PylithScalar tDim = tRel*timeScale;
+	  const int err = _dbTimeHistory->query(&scale, tDim);
+	  if (err) {
+	    std::ostringstream msg;
+	    msg << "Error querying for time '" << tDim 
+		<< "' in time history database "
+		<< _dbTimeHistory->label() << ".";
+	    throw std::runtime_error(msg.str());
+	  } // if
+	} // if
+	for (int iDim=0; iDim < spaceDim; ++iDim) {
+	  parametersVertex[valueIndex+iDim] += parametersVertex[changeIndex+iDim] * scale;
+	} // for
+      } // if
+    } // if
+    
+    parametersSection->updatePoint(*v_iter, &parametersVertex[0]);
+  } // for
+}  // _calculateValue
+
+
+// End of file

Copied: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/TractPerturbation.hh (from rev 20048, short/3D/PyLith/branches/v1.7-trunk/libsrc/pylith/faults/TractPerturbation.hh)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/TractPerturbation.hh	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/TractPerturbation.hh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -0,0 +1,152 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010-2012 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ----------------------------------------------------------------------
+//
+
+/** @file libsrc/faults/TractPerturbation.hh
+ *
+ * @brief C++ implementation of a spatial and temporal perturbation in
+ * tractions.
+ */
+
+#if !defined(pylith_faults_tractperturbation_hh)
+#define pylith_faults_tractperturbation_hh
+
+// Include directives ---------------------------------------------------
+#include "faultsfwd.hh" // forward declarations
+#include "pylith/bc/TimeDependent.hh" // ISA TimeDependent
+
+#include "pylith/topology/topologyfwd.hh" // HOLSA FieldsNew
+
+#include "spatialdata/units/unitsfwd.hh" // USES Nondimensional
+
+// TractPerturbation -----------------------------------------------------------
+/**
+ * @brief C++ implementation of a spatial and temporal perturbation in
+ * tractions.
+ */
+class pylith::faults::TractPerturbation : public pylith::bc::TimeDependent
+{ // class TractPerturbation
+  friend class TestTractPerturbation; // unit testing
+
+  // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+  /// Default constructor.
+  TractPerturbation(void);
+
+  /// Destructor.
+  virtual
+  ~TractPerturbation(void);
+
+  /// Deallocate PETSc and local data structures.
+  virtual
+  void deallocate(void);
+  
+  /** Set label for traction perturbation.
+   *
+   * @param value Label.
+   */
+  void label(const char* value);
+
+  /** Initialize slip time function.
+   *
+   * @param faultMesh Finite-element mesh of fault.
+   * @param faultOrientation Orientation of fault.
+   * @param normalizer Nondimensionalization of scales.
+   */
+  void initialize(const topology::SubMesh& faultMesh,
+		  const topology::Field<topology::SubMesh>& faultOrientation,
+		  const spatialdata::units::Nondimensional& normalizer);
+
+  /** Get traction perturbation on fault surface at time t.
+   *
+   * @param tractionField Traction field over fault surface [output].
+   * @param t Time t.
+   */
+  void traction(topology::Field<topology::SubMesh>* const tractionField,
+		const PylithScalar t);
+  
+  /** Get parameter fields.
+   *
+   * @returns Parameter fields.
+   */
+  const topology::FieldsNew<topology::SubMesh>* parameterFields(void) const;
+  
+  /** Get vertex field with traction perturbation information.
+   *
+   * @param name Name of field.
+   * @param fields Solution fields.
+   *
+   * @returns Traction vector field.
+   */
+  const topology::Field<topology::SubMesh>&
+  vertexField(const char* name,
+	      topology::SolutionFields* const fields =0);
+
+  // PROTECTED METHODS //////////////////////////////////////////////////
+protected :
+
+  /** Get label of boundary condition surface.
+   *
+   * @returns Label of surface (from mesh generator).
+   */
+  const char* _getLabel(void) const;
+
+  /** Query database for values.
+   *
+   * @param name Name of field associated with database.
+   * @param db Spatial database with values.
+   * @param querySize Number of values at each location.
+   * @param scale Dimension scale associated with values.
+   * @param normalizer Nondimensionalization of scales.
+   */
+  void _queryDB(const char* name,
+		spatialdata::spatialdb::SpatialDB* const db,
+		const int querySize,
+		const PylithScalar scale,
+		const spatialdata::units::Nondimensional& normalizer);
+
+  /** Calculate spatial and temporal variation of value.
+   *
+   * @param t Current time.
+   */
+  void _calculateValue(const PylithScalar t);
+
+// PRIVATE MEMBERS //////////////////////////////////////////////////////
+private :
+  
+  /// Parameters for perturbations.
+  topology::FieldsNew<topology::SubMesh>* _parameters;
+
+  /// Time scale for current time.
+  PylithScalar _timeScale;
+
+  /// Label for traction perturbation.
+  std::string _label;
+
+  // NOT IMPLEMENTED ////////////////////////////////////////////////////
+private :
+
+  TractPerturbation(const TractPerturbation&); ///< Not implemented
+  const TractPerturbation& operator=(const TractPerturbation&); ///< Not implemented
+
+}; // class TractPerturbation
+
+#endif // pylith_faults_tractperturbation_hh
+
+
+// End of file 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/faultsfwd.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/faultsfwd.hh	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/faultsfwd.hh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -37,6 +37,7 @@
     class FaultCohesiveLagrange;
     class FaultCohesiveKin;
     class FaultCohesiveDyn;
+    class FaultCohesiveImpulses;
     class FaultCohesiveTract;
 
     class EqKinSrc;
@@ -47,6 +48,11 @@
     class StepSlipFn;
     class TimeHistorySlipFn;
 
+    class Nucleator;
+    class TractPerturbation;
+    class StaticPerturbation;
+    class SpaceTimePerturbation;
+
     class TopologyOps;
     template<typename Sieve, typename Renumbering> class ReplaceVisitor;
     template<typename Sieve> class ClassifyVisitor;

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/ElasticityExplicit.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/ElasticityExplicit.cc	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/ElasticityExplicit.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -351,7 +351,7 @@
 
     // Numerical damping. Compute displacements adjusted by velocity
     // times normalized viscosity.
-    dispAdjCell = dispCell + _normViscosity*dt * velCell;
+    dispAdjCell = dispCell + viscosity * velCell;
 
     // Compute B(transpose) * sigma, first computing strains
     calcTotalStrainFn(&strainCell, basisDeriv, dispAdjCell, 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/DataWriterHDF5.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/DataWriterHDF5.cc	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/DataWriterHDF5.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -96,8 +96,8 @@
 
     _timesteps.clear();
     _tstampIndex = 0;
-    const int rank = sieveMesh->commRank();
-    const int localSize = (!rank) ? 1 : 0;
+    const int commRank = sieveMesh->commRank();
+    const int localSize = (!commRank) ? 1 : 0;
     err = VecCreateMPI(mesh.comm(), localSize, 1, &_tstamp);
     CHECK_PETSC_ERROR(err);
     assert(_tstamp);
@@ -295,9 +295,9 @@
       _timesteps[field.label()] += 1;
     const int istep = _timesteps[field.label()];
     // Add time stamp to "/time" if necessary.
-    const int rank = sieveMesh->commRank();
+    const int commRank = sieveMesh->commRank();
     if (_tstampIndex == istep)
-      _writeTimeStamp(t, rank);
+      _writeTimeStamp(t, commRank);
 
 #if 0 // debugging
     field.view("writeVertexField");
@@ -375,9 +375,9 @@
       _timesteps[field.label()] += 1;
     const int istep = _timesteps[field.label()];
     // Add time stamp to "/time" if necessary.
-    const int rank = sieveMesh->commRank();
+    const int commRank = sieveMesh->commRank();
     if (_tstampIndex == istep)
-      _writeTimeStamp(t, rank);
+      _writeTimeStamp(t, commRank);
 
     err = PetscViewerHDF5PushGroup(_viewer, "/cell_fields");CHECK_PETSC_ERROR(err);
     err = PetscViewerHDF5SetTimestep(_viewer, istep);CHECK_PETSC_ERROR(err);
@@ -430,12 +430,12 @@
 void
 pylith::meshio::DataWriterHDF5<mesh_type,field_type>::_writeTimeStamp(
 						    const PylithScalar t,
-						    const int rank)
+						    const int commRank)
 { // _writeTimeStamp
   assert(_tstamp);
   PetscErrorCode err = 0;
 
-  if (0 == rank) {
+  if (0 == commRank) {
     const PylithScalar tDim = t * DataWriter<mesh_type, field_type>::_timeScale;
     err = VecSetValue(_tstamp, 0, tDim, INSERT_VALUES); CHECK_PETSC_ERROR(err);
   } // if

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/DataWriterHDF5.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/DataWriterHDF5.hh	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/DataWriterHDF5.hh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -135,10 +135,10 @@
   /** Write time stamp to file.
    *
    * @param t Time in seconds.
-   * @param rank Processor rank in MPI communicator.
+   * @param commRank Processor rank in MPI communicator.
    */
   void _writeTimeStamp(const PylithScalar t,
-		       const int rank);
+		       const int commRank);
 
 // NOT IMPLEMENTED //////////////////////////////////////////////////////
 private :

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/DataWriterHDF5Ext.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/DataWriterHDF5Ext.cc	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/DataWriterHDF5Ext.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -92,10 +92,11 @@
     DataWriter<mesh_type, field_type>::open(mesh, numTimeSteps, label, labelId);
     const char* context = DataWriter<mesh_type, field_type>::_context.c_str();
 
-    int rank = 0;
-    MPI_Comm_rank(mesh.comm(), &rank);
-    
-    if (!rank) {
+    const ALE::Obj<typename mesh_type::SieveMesh>& sieveMesh = mesh.sieveMesh();
+    assert(!sieveMesh.isNull());
+
+    const int commRank = sieveMesh->commRank();
+    if (!commRank) {
       _h5->open(_hdf5Filename().c_str(), H5F_ACC_TRUNC);
 
       // Create groups
@@ -110,9 +111,6 @@
     const hid_t scalartype = (sizeof(double) == sizeof(PylithScalar)) ? 
       H5T_IEEE_F64BE : H5T_IEEE_F32BE;
 
-    const ALE::Obj<typename mesh_type::SieveMesh>& sieveMesh = mesh.sieveMesh();
-    assert(!sieveMesh.isNull());
-
     // Write vertex coordinates
     const ALE::Obj<typename mesh_type::RealSection>& coordinatesSection = 
       sieveMesh->hasRealSection("coordinates_dimensioned") ?
@@ -149,7 +147,7 @@
     err = PetscViewerDestroy(&binaryViewer); CHECK_PETSC_ERROR(err);
     
     // Create external dataset for coordinates    
-    if (!rank) {
+    if (!commRank) {
       const hsize_t ndims = 2;
       hsize_t dims[ndims];
       dims[0] = vNumbering->getGlobalSize();
@@ -240,7 +238,7 @@
     err = PetscViewerDestroy(&binaryViewer); CHECK_PETSC_ERROR(err);
 
     // Create external dataset for cells
-    if (!rank) {
+    if (!commRank) {
       const hsize_t ndims = 2;
       hsize_t dims[ndims];
       dims[0] = cNumbering->getGlobalSize();
@@ -277,9 +275,9 @@
   _tstampIndex = 0;
   deallocate();
 
-  int rank = 0;
-  MPI_Comm_rank(PETSC_COMM_WORLD, &rank);
-  if (!rank) {
+  int commRank = 0;
+  MPI_Comm_rank(PETSC_COMM_WORLD, &commRank);
+  if (!commRank) {
     Xdmf metafile;
     const std::string& hdf5filename = _hdf5Filename();
     const int indexExt = hdf5filename.find(".h5");
@@ -304,11 +302,11 @@
   try {
     const char* context = DataWriter<mesh_type, field_type>::_context.c_str();
 
-    int rank = 0;
-    MPI_Comm_rank(mesh.comm(), &rank);
-
     const ALE::Obj<typename mesh_type::SieveMesh>& sieveMesh = mesh.sieveMesh();
     assert(!sieveMesh.isNull());
+
+    const int commRank = sieveMesh->commRank();
+
     const std::string labelName = 
       (sieveMesh->hasLabel("censored depth")) ? "censored depth" : "depth";
     ALE::Obj<numbering_type> vNumbering = 
@@ -364,7 +362,7 @@
 		  field.mesh().comm());
     assert(fiberDim > 0);
 
-    if (!rank) {
+    if (!commRank) {
       if (createdExternalDataset) {
 	// Add new external dataset to HDF5 file.
 	const int numTimeSteps
@@ -441,12 +439,12 @@
     const char* context = DataWriter<mesh_type, field_type>::_context.c_str();
     PetscErrorCode err = 0;
 
-    int rank = 0;
-    err = MPI_Comm_rank(field.mesh().comm(), &rank);CHECK_PETSC_ERROR(err);
-
     const ALE::Obj<typename mesh_type::SieveMesh>& sieveMesh = 
       field.mesh().sieveMesh();
     assert(!sieveMesh.isNull());
+
+    const int commRank = sieveMesh->commRank();
+
     int cellDepthLocal = (sieveMesh->depth() == -1) ? -1 : 1;
     int cellDepth = 0;
     err = MPI_Allreduce(&cellDepthLocal, &cellDepth, 1, MPI_INT, MPI_MAX, 
@@ -506,7 +504,7 @@
     assert(fiberDim > 0);
 
 
-    if (!rank) {
+    if (!commRank) {
       if (createdExternalDataset) {
       // Add new external dataset to HDF5 file.
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/DataWriterVTK.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/DataWriterVTK.cc	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/DataWriterVTK.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -184,11 +184,9 @@
   typedef typename field_type::Mesh::RealSection RealSection;
 
   try {
-    int rank = 0;
-    MPI_Comm_rank(field.mesh().comm(), &rank);
-
     const ALE::Obj<SieveMesh>& sieveMesh = mesh.sieveMesh();
     assert(!sieveMesh.isNull());
+
     const std::string labelName = 
       (sieveMesh->hasLabel("censored depth")) ? "censored depth" : "depth";
     const ALE::Obj<typename SieveMesh::numbering_type>& numbering =
@@ -248,8 +246,6 @@
 
   try {
     PetscErrorCode err = 0;
-    int rank = 0;
-    err = MPI_Comm_rank(field.mesh().comm(), &rank);CHECK_PETSC_ERROR(err);
 
     // Correctly handle boundary and fault meshes
     //   Cannot just use mesh->depth() because boundaries report the wrong thing

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/MeshBuilder.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/MeshBuilder.cc	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/MeshBuilder.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -53,7 +53,7 @@
   assert(coordinates);
   MPI_Comm comm = mesh->comm();
   int dim = meshDim;
-  int rank = 0;
+  const int commRank = mesh->commRank();
 
   { // Check to make sure every vertex is in at least one cell.
     // This is required by Sieve
@@ -82,13 +82,12 @@
     new SieveMesh::sieve_type(mesh->comm());
   sieveMesh->setSieve(sieve);
 
-  MPI_Comm_rank(comm, &rank);
   // Memory debugging
   ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
   //logger.setDebug(1);
 
   logger.stagePush("MeshCreation");
-  if (0 == rank || isParallel) {
+  if (0 == commRank || isParallel) {
     assert(coordinates->size() == numVertices*spaceDim);
     assert(cells.size() == numCells*numCorners);
     if (!interpolate) {
@@ -209,7 +208,6 @@
 					    const int meshDim)
 { // buildFaultMesh
   int dim  = meshDim;
-  int rank = 0;
 
   assert(!fault.isNull());
 
@@ -217,15 +215,15 @@
     new SieveMesh::sieve_type(fault->comm());
   fault->setDebug(fault->debug());
   fault->setSieve(sieve);
+  
+  const int commRank = fault->commRank();
 
-  MPI_Comm_rank(fault->comm(), &rank);
-
   // Memory logging
   ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
   //logger.setDebug(fault->debug()/2);
   logger.stagePush("Creation");
 
-  if (0 == rank) {
+  if (0 == commRank) {
     assert(coordinates.size() == numVertices*spaceDim);
     assert(cells.size() == numCells*numCorners);
     ALE::Obj<SieveFlexMesh::sieve_type> s = 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/MeshIOAscii.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/MeshIOAscii.cc	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/MeshIOAscii.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -69,8 +69,7 @@
 void
 pylith::meshio::MeshIOAscii::_read(void)
 { // _read
-  MPI_Comm comm = _mesh->comm();
-  int rank = 0;
+  const int commRank = _mesh->commRank();
   int meshDim = 0;
   int spaceDim = 0;
   int numVertices = 0;
@@ -80,8 +79,7 @@
   int_array cells;
   int_array materialIds;
 
-  MPI_Comm_rank(comm, &rank);
-  if (0 == rank) {
+  if (0 == commRank) {
     std::ifstream filein(_filename.c_str());
     if (!filein.is_open() || !filein.good()) {
       std::ostringstream msg;

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/MeshIOCubit.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/MeshIOCubit.cc	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/MeshIOCubit.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -62,7 +62,7 @@
 { // _read
   assert(_mesh);
 
-  int rank = 0;
+  const int commRank = _mesh->commRank();
   int meshDim = 0;
   int spaceDim = 0;
   int numVertices = 0;
@@ -72,8 +72,7 @@
   int_array cells;
   int_array materialIds;
 
-  MPI_Comm_rank(_mesh->comm(), &rank);
-  if (0 == rank) {
+  if (0 == commRank) {
     try {
       ExodusII exofile(_filename.c_str());
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/MeshIOHDF5.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/MeshIOHDF5.cc	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/MeshIOHDF5.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -49,8 +49,7 @@
 MeshIOHDF5::read(ALE::Obj<ALE::PetscMesh>* pMesh)
 { // read
   assert(0 != pMesh);
-  MPI_Comm comm = PETSC_COMM_WORLD;
-  int rank;
+  const int commRank = pMesh->commRank();
   int meshDim = 0;
   int numDims = 0;
   int numVertices = 0;
@@ -59,8 +58,7 @@
   PylithScalar* coordinates = 0;
   int* elements = 0;
 
-  MPI_Comm_rank(comm, &rank);
-  if (!rank) {
+  if (!commRank) {
     hid_t filein = H5Fopen(_filename.c_str(), H5F_ACC_RDONLY, H5P_DEFAULT);
     if (filein < 0) {
       std::ostringstream msg;

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/MeshIOLagrit.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/MeshIOLagrit.cc	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/MeshIOLagrit.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -63,8 +63,7 @@
 void
 pylith::meshio::MeshIOLagrit::_read(void)
 { // _read
-  MPI_Comm comm = _mesh->comm();
-  int rank;
+  const int commRank = _mesh->commRank();
   int meshDim = 0;
   int spaceDim = 0;
   int numVertices = 0;
@@ -74,8 +73,7 @@
   int_array cells;
   int_array materialIds;
 
-  MPI_Comm_rank(comm, &rank);
-  if (!rank) {
+  if (!commRank) {
     if (GMVFile::isAscii(_filenameGmv.c_str())) {
       GMVFileAscii filein(_filenameGmv.c_str());
       filein.read(&coordinates, &cells, &materialIds, 
@@ -93,7 +91,7 @@
 			 _interpolate);
   _setMaterials(materialIds);
 
-  if (0 == rank) {
+  if (0 == commRank) {
     std::vector<PsetFile::Pset> groups;
     if (PsetFile::isAscii(_filenamePset.c_str())) {
       PsetFileAscii filein(_filenamePset.c_str());

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/Xdmf.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/Xdmf.cc	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/Xdmf.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -89,7 +89,9 @@
   int cellDim = 0;
   h5.readAttribute("/topology/cells", "cell_dim", (void*)&cellDim, 
 		  H5T_NATIVE_INT);
-  if (1 == cellDim && 2 == numCorners)
+  if (0 == cellDim && 1 == numCorners)
+    cellType = "Polyvertex";
+  else if (1 == cellDim && 2 == numCorners)
     cellType = "Polyline";
   else if (2 == cellDim && 3 == numCorners)
     cellType = "Triangle";

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/Formulation.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/Formulation.cc	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/Formulation.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -39,7 +39,9 @@
   _jacobianLumped(0),
   _fields(0),
   _customConstraintPCMat(0),
-  _isJacobianSymmetric(false)
+  _isJacobianSymmetric(false),
+  _splitFields(false),
+  _splitFieldComponents(false)
 { // constructor
 } // constructor
 
@@ -87,6 +89,22 @@
 } // splitFields
 
 // ----------------------------------------------------------------------
+// Set flag for splitting field components.
+void
+pylith::problems::Formulation::splitFieldComponents(const bool flag)
+{ // splitFieldComponents
+  _splitFieldComponents = flag;
+} // splitFieldComponents
+
+// ----------------------------------------------------------------------
+// Get flag for splitting field components.
+bool
+pylith::problems::Formulation::splitFieldComponents(void) const
+{ // splitFieldComponents
+  return _splitFieldComponents;
+} // splitFieldComponents
+
+// ----------------------------------------------------------------------
 // Set flag for using custom preconditioner for Lagrange constraints.
 void
 pylith::problems::Formulation::useCustomConstraintPC(const bool flag)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/Formulation.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/Formulation.hh	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/Formulation.hh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -73,6 +73,18 @@
    */
   bool splitFields(void) const;
 
+  /** Set flag for splitting field components.
+   *
+   * @param flag True if splitting fields comonents, false otherwise.
+   */
+  void splitFieldComponents(const bool flag);
+
+  /** Get flag for splitting field components.
+   *
+   * @returns flag True if splitting field components, false otherwise.
+   */
+  bool splitFieldComponents(void) const;
+
   /** Set flag for using custom preconditioner for Lagrange constraints.
    *
    * @param flag True if using custom fault preconditioner, false otherwise.
@@ -210,6 +222,7 @@
 
   bool _isJacobianSymmetric; ///< Is system Jacobian symmetric?
   bool _splitFields; ///< True if splitting fields.
+  bool _splitFieldComponents; ///< True if splitting field components
 
   /// True if using custom preconditioner for Lagrange constraints.
   bool _useCustomConstraintPC;

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/Solver.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/Solver.cc	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/Solver.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -158,17 +158,99 @@
   const topology::Field<topology::Mesh>& solution = fields.solution();
   const ALE::Obj<RealSection>& solutionSection = solution.section();
   assert(!solutionSection.isNull());
+  const int spaceDim = sieveMesh->getDimension();
+  const int numSpaces = solutionSection->getNumSpaces();
 
   err = PCSetType(*pc, PCFIELDSPLIT); CHECK_PETSC_ERROR(err);
   err = PCSetOptionsPrefix(*pc, "fs_"); CHECK_PETSC_ERROR(err);
   err = PCSetFromOptions(*pc); CHECK_PETSC_ERROR(err);
 
-  constructFieldSplit(solutionSection, 
-		      sieveMesh->getFactory()->getGlobalOrder(sieveMesh, "default", 
-							      solutionSection), 
-		      solution.vector(), *pc);
+  bool separateComponents = formulation->splitFieldComponents();
+  if (separateComponents) {
+    constructFieldSplit(solutionSection, PETSC_DETERMINE, PETSC_NULL, PETSC_NULL, 
+			sieveMesh->getFactory()->getGlobalOrder(sieveMesh, "default", solutionSection), PETSC_NULL,
+			solution.vector(), *pc);
+  } else {
+    int numFields[2] = {spaceDim, (numSpaces > spaceDim) ? 1 : 0};
+    MatNullSpace nullsp[2] = {PETSC_NULL, PETSC_NULL};
+    int* fields = new int[numSpaces];
+    
+    /* Create rigid body null space */
+    const ALE::Obj<RealSection>& coordinatesSection = sieveMesh->getRealSection("coordinates");
+    assert(!coordinatesSection.isNull());
+    const ALE::Obj<SieveMesh::label_sequence>& vertices = sieveMesh->depthStratum(0);
+    assert(!vertices.isNull());
+    const SieveMesh::label_sequence::iterator verticesBegin = vertices->begin();
+    const SieveMesh::label_sequence::iterator verticesEnd = vertices->end();
+    PetscInt dim = spaceDim;
+    Vec mode[6];
 
-  const int spaceDim = sieveMesh->getDimension();
+    if (dim > 1) {
+      PetscInt n;
+      err = VecGetLocalSize(solution.vector(), &n);CHECK_PETSC_ERROR(err);
+      const int m = (dim * (dim + 1)) / 2;
+      err = VecCreate(sieveMesh->comm(), &mode[0]);CHECK_PETSC_ERROR(err);
+      err = VecSetSizes(mode[0], n, PETSC_DETERMINE);CHECK_PETSC_ERROR(err);
+      err = VecSetUp(mode[0]);CHECK_PETSC_ERROR(err);
+      for (int i = 1; i < m; ++i) {
+	err = VecDuplicate(mode[0], &mode[i]);CHECK_PETSC_ERROR(err);
+      } // for
+      // :KLUDGE: Assume P1
+      for (int d=0; d < dim; ++d) {
+        PetscScalar values[3] = {0.0, 0.0, 0.0};
+	
+        values[d] = 1.0;
+        solutionSection->zero();
+        for(SieveMesh::label_sequence::iterator v_iter=verticesBegin; v_iter != verticesEnd; ++v_iter) {
+          solutionSection->updatePoint(*v_iter, values);
+        } // for
+        solution.scatterSectionToVector();
+        err = VecCopy(solution.vector(), mode[d]);CHECK_PETSC_ERROR(err);
+      } // for
+      for (int d = dim; d < m; ++d) {
+        PetscInt k = (dim > 2) ? d - dim : d;
+	
+        solutionSection->zero();
+        for (SieveMesh::label_sequence::iterator v_iter=verticesBegin; v_iter != verticesEnd; ++v_iter) {
+          PetscScalar values[3] = {0.0, 0.0, 0.0};
+          const PylithScalar* coords  = coordinatesSection->restrictPoint(*v_iter);
+
+          for (int i=0; i < dim; ++i) {
+            for (int j=0; j < dim; ++j) {
+              values[j] += _epsilon(i, j, k)*coords[i];
+            } // for
+          } // for
+          solutionSection->updatePoint(*v_iter, values);
+        }
+        solution.scatterSectionToVector();
+        err = VecCopy(solution.vector(), mode[d]);CHECK_PETSC_ERROR(err);
+      } // for
+      for (int i=0; i < dim; ++i) {
+	err = VecNormalize(mode[i], PETSC_NULL);CHECK_PETSC_ERROR(err);
+      } // for
+      /* Orthonormalize system */
+      for (int i = dim; i < m; ++i) {
+        PetscScalar dots[6];
+
+        err = VecMDot(mode[i], i, mode, dots);CHECK_PETSC_ERROR(err);
+        for(int j=0; j < i; ++j) dots[j] *= -1.0;
+        err = VecMAXPY(mode[i], i, dots, mode);CHECK_PETSC_ERROR(err);
+        err = VecNormalize(mode[i], PETSC_NULL);CHECK_PETSC_ERROR(err);
+      } // for
+      err = MatNullSpaceCreate(sieveMesh->comm(), PETSC_FALSE, m, mode, &nullsp[0]);CHECK_PETSC_ERROR(err);
+      for(int i=0; i< m; ++i) {err = VecDestroy(&mode[i]);CHECK_PETSC_ERROR(err);}
+    } // if
+
+    for (PetscInt f=0; f < numSpaces; ++f) {
+      fields[f] = f;
+    } // for
+    constructFieldSplit(solutionSection, 2, numFields, fields,
+                        sieveMesh->getFactory()->getGlobalOrder(sieveMesh, "default", solutionSection), nullsp,
+                        solution.vector(), *pc);
+    err = MatNullSpaceDestroy(&nullsp[0]);CHECK_PETSC_ERROR(err);
+    delete [] fields;
+  } // if/else
+
   if (formulation->splitFields() && 
       formulation->useCustomConstraintPC() &&
       solutionSection->getNumSpaces() > sieveMesh->getDimension()) {
@@ -208,10 +290,10 @@
       _ctx.faultFieldName = "1";
       break;
     case 2 :
-      _ctx.faultFieldName = "2";
+      _ctx.faultFieldName = (separateComponents) ? "2" : "1";
       break;
     case 3 :
-      _ctx.faultFieldName = "3";
+      _ctx.faultFieldName = (separateComponents) ? "3" : "1";
       break;
     default:
       assert(0);
@@ -222,5 +304,64 @@
   } // if
 } // _setupFieldSplit
 
+// ----------------------------------------------------------------------
+int
+pylith::problems::Solver::_epsilon(int i, 
+				   int j, 
+				   int k)
+{ // _epsilon
+  switch(i) {
+  case 0:
+    switch(j) {
+    case 0: return 0;
+    case 1:
+      switch(k) {
+      case 0: return 0;
+      case 1: return 0;
+      case 2: return 1;
+      }
+    case 2:
+      switch(k) {
+      case 0: return 0;
+      case 1: return -1;
+      case 2: return 0;
+      }
+    }
+  case 1:
+    switch(j) {
+    case 0:
+      switch(k) {
+      case 0: return 0;
+      case 1: return 0;
+      case 2: return -1;
+      }
+    case 1: return 0;
+    case 2:
+      switch(k) {
+      case 0: return 1;
+      case 1: return 0;
+      case 2: return 0;
+      }
+    }
+  case 2:
+    switch(j) {
+    case 0:
+      switch(k) {
+      case 0: return 0;
+      case 1: return 1;
+      case 2: return 0;
+      }
+    case 1:
+      switch(k) {
+      case 0: return -1;
+      case 1: return 0;
+      case 2: return 0;
+      }
+    case 2: return 0;
+    }
+  }
+  return 0;
+} // _epsilon
 
+
 // End of file

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/Solver.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/Solver.hh	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/Solver.hh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -91,6 +91,14 @@
 		   const topology::Jacobian& jacobian,
 		   const topology::SolutionFields& fields);
 
+  /**
+   */
+  static
+  int
+  _epsilon(int i,
+	   int j,
+	   int k);
+
 // PROTECTED MEMBERS ////////////////////////////////////////////////////
 protected :
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/SolverLinear.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/SolverLinear.cc	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/SolverLinear.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -137,7 +137,7 @@
     err = KSPSetUp(_ksp); CHECK_PETSC_ERROR(err);
     err = KSPGetPC(_ksp, &pc); CHECK_PETSC_ERROR(err);
     err = PCFieldSplitGetSubKSP(pc, &num, &ksps); CHECK_PETSC_ERROR(err);
-    assert(solutionSection->getNumSpaces() == num);
+    // Now only true if splitting components assert(solutionSection->getNumSpaces() == num);
 
     MatStructure flag;
     err = KSPGetOperators(ksps[num-1], &A, PETSC_NULL, &flag);CHECK_PETSC_ERROR(err);

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/topology/Distributor.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/topology/Distributor.cc	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/topology/Distributor.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -58,22 +58,21 @@
 { // distribute
   assert(0 != newMesh);
 
-  int rank = 0;
-  MPI_Comm_rank(origMesh.comm(), &rank);
+  const int commRank = origMesh.commRank();
 
   journal::info_t info("distributor");
     
   newMesh->coordsys(origMesh.coordsys());
   
   if (0 == strcasecmp(partitioner, "")) {
-    if (0 == rank) {
+    if (0 == commRank) {
       info << journal::at(__HERE__)
 	   << "Distributing mesh using dumb partitioner." << journal::endl;
     } // if
     _distribute<ALE::DistributionNew<SieveMesh> >(newMesh, origMesh);
 #if defined(PETSC_HAVE_CHACO)
   } else if (0 == strcasecmp(partitioner, "chaco")) {
-    if (0 == rank) {
+    if (0 == commRank) {
       info << journal::at(__HERE__)
 	   << "Distributing mesh using 'chaco' partitioner." << journal::endl;
     } // if
@@ -81,14 +80,14 @@
 #endif
 #if defined(PETSC_HAVE_PARMETIS)
   } else if (0 == strcasecmp(partitioner, "parmetis")) {
-    if (0 == rank) {
+    if (0 == commRank) {
       info << journal::at(__HERE__)
 	   << "Distributing mesh using 'parmetis' partitioner." << journal::endl;
     } // if
    _distribute<ALE::DistributionNew<SieveMesh, ALE::Partitioner<ALE::ParMetis::Partitioner<> > > >(newMesh, origMesh);
 #endif
   } else {
-    if (0 == rank) {
+    if (0 == commRank) {
       info << journal::at(__HERE__)
 	   << "Unknown partitioner '" << partitioner
 	   << "', distribution mesh using dumb partitioner." << journal::endl;
@@ -107,9 +106,8 @@
   
   journal::info_t info("distributor");
     
-  int rank = 0;
-  MPI_Comm_rank(mesh.comm(), &rank);
-  if (0 == rank) {
+  const int commRank = mesh.commRank();
+  if (0 == commRank) {
     info << journal::at(__HERE__)
 	 << "Writing partition." << journal::endl;
   } // if
@@ -127,7 +125,7 @@
 
   const ALE::Obj<SieveMesh> sieveMesh = mesh.sieveMesh();
   assert(!sieveMesh.isNull());
-  PylithScalar rankReal = PylithScalar(sieveMesh->commRank());
+  PylithScalar rankReal = PylithScalar(commRank);
   assert(sieveMesh->height() > 0);
   const ALE::Obj<SieveMesh::label_sequence>& cells = 
     sieveMesh->heightStratum(0);
@@ -167,9 +165,8 @@
 
   journal::info_t info("distributor");
     
-  int rank = 0;
-  MPI_Comm_rank(origMesh.comm(), &rank);
-  if (0 == rank) {
+  const int commRank = origMesh.commRank();
+  if (0 == commRank) {
     info << journal::at(__HERE__)
 	 << "Partitioning and distributing the mesh." << journal::endl;
   } // if
@@ -206,18 +203,18 @@
 				      renumbering, 
 				      sendMeshOverlap, recvMeshOverlap);
   if (origSieveMesh->debug()) {
-    std::cout << "["<<origSieveMesh->commRank()<<"]: Mesh Renumbering:"
+    std::cout << "["<<commRank<<"]: Mesh Renumbering:"
 	      << std::endl;
     for (SieveMesh::renumbering_type::const_iterator r_iter = renumbering.begin();
 	 r_iter != renumbering.end();
 	 ++r_iter) {
-      std::cout << "["<<origSieveMesh->commRank()<<"]:   global point " 
+      std::cout << "["<<commRank<<"]:   global point " 
 		<< r_iter->first << " --> " << " local point " 
 		<< r_iter->second << std::endl;
     } // for
   } // if
 
-  if (0 == rank) {
+  if (0 == commRank) {
     info << journal::at(__HERE__)
 	 << "Checking the overlap." << journal::endl;
   } // if
@@ -246,7 +243,7 @@
   logger.stagePush("DistributedMeshCoordinates");
 
   // Distribute the coordinates
-  if (0 == rank) {
+  if (0 == commRank) {
     info << journal::at(__HERE__)
 	 << "Distribution the vertex coordinates." << journal::endl;
   } // if
@@ -267,7 +264,7 @@
   logger.stagePush("DistributedMeshRealSections");
 
   // Distribute other sections
-  if (0 == rank) {
+  if (0 == commRank) {
     info << journal::at(__HERE__)
 	 << "Distribution other sections." << journal::endl;
   } // if
@@ -347,7 +344,7 @@
   logger.stagePush("DistributedMeshLabels");
 
   // Distribute labels
-  if (0 == rank) {
+  if (0 == commRank) {
     info << journal::at(__HERE__)
 	 << "Distributing labels." << journal::endl;
   } // if
@@ -395,7 +392,7 @@
   logger.stagePush("DistributedMeshOverlap");
 
   // Create the parallel overlap
-  if (0 == rank) {
+  if (0 == commRank) {
     info << journal::at(__HERE__)
 	 << "Creating the parallel overlap." << journal::endl;
   } // if

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/topology/Mesh.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/topology/Mesh.hh	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/topology/Mesh.hh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -167,6 +167,12 @@
    */
   const MPI_Comm comm(void) const;
     
+  /** Get MPI rank.
+   *
+   * @returns MPI rank.
+   */
+  int commRank(void) const;
+    
   /** Initialize the finite-element mesh.
    *
    * @param normalizer Nondimensionalizer.

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/topology/Mesh.icc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/topology/Mesh.icc	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/topology/Mesh.icc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -101,6 +101,15 @@
   return _comm;
 }
     
+// Get MPI rank.
+inline
+int
+pylith::topology::Mesh::commRank(void) const {
+  int rank = 0;
+  MPI_Comm_rank(_comm, &rank);
+  return rank;
+}
+    
 // Print mesh to stdout.
 inline
 void

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/topology/RefineEdges2.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/topology/RefineEdges2.cc	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/topology/RefineEdges2.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -170,8 +170,7 @@
   const Obj<mesh_type::recv_overlap_type>& oldRecvOverlap = oldMesh->getRecvOverlap();
   assert(!oldRecvOverlap.isNull());
 
-  int myrank = 0;
-  MPI_Comm_rank(oldMesh->comm(), &myrank);
+  const int commRank = oldMesh->commRank();
 
   // Check edges in edgeToVertex for both endpoints sent to same process
   //   Put it in section with point being the lowest numbered vertex and value (other endpoint, new vertex)
@@ -198,12 +197,12 @@
                             std::insert_iterator<std::set<int> >(ranks, ranks.begin()));
 
 #if 0 // DEBUGGING
-      std::cout << "[" << myrank << "]   Checking edge " << e_iter->first << std::endl;
+      std::cout << "[" << commRank << "]   Checking edge " << e_iter->first << std::endl;
       for(std::set<int>::const_iterator r_iter = leftRanks.begin(); r_iter != leftRanks.end(); ++r_iter) {
-        std::cout << "[" << myrank << "]     left rank " << *r_iter << std::endl;
+        std::cout << "[" << commRank << "]     left rank " << *r_iter << std::endl;
       }
       for(std::set<int>::const_iterator r_iter = rightRanks.begin(); r_iter != rightRanks.end(); ++r_iter) {
-        std::cout << "[" << myrank << "]     right rank " << *r_iter << std::endl;
+        std::cout << "[" << commRank << "]     right rank " << *r_iter << std::endl;
       }
 #endif
       if (ranks.size()) {
@@ -215,7 +214,7 @@
 #if 0 // DEBUGGING
 	  const point_type edgeMax = std::max(e_iter->first.first, e_iter->first.second);
 	  const int localMaxOffset = (orderOldMesh.verticesNormal().hasPoint(edgeMax)) ? localNormalOffset : localCensoredOffset;
-          std::cout << "[" << myrank << "] Added edge " << e_iter->first << " now (" << edgeMin+localMinOffset << ", " << edgeMax+localMaxOffset << ") with rank " << *r_iter << std::endl;
+          std::cout << "[" << commRank << "] Added edge " << e_iter->first << " now (" << edgeMin+localMinOffset << ", " << edgeMax+localMaxOffset << ") with rank " << *r_iter << std::endl;
 #endif
         } // for
       } // if
@@ -292,7 +291,7 @@
       } // for
 #if 0 // DEBUGGING
       if (-1 == newRemotePoint) {
-        std::cout << "["<< myrank << "] DISMISSING newLocalPoint: " << newLocalPoint
+        std::cout << "["<< commRank << "] DISMISSING newLocalPoint: " << newLocalPoint
 		  << ", remoteLeft: " << remoteLeft
                   << ", remoteRight: " << remoteRight
                   << ", rank: " << rank

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/topology/ReverseCuthillMcKee.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/topology/ReverseCuthillMcKee.cc	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/topology/ReverseCuthillMcKee.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -39,10 +39,8 @@
   //logger.setDebug(1);
   logger.stagePush("MeshReordering");
 
-  int rank = 0;
-  MPI_Comm_rank(mesh->comm(), &rank);
-
-  if (0 == rank) {
+  const int commRank = mesh->commRank();
+  if (0 == commRank) {
     const ALE::Obj<SieveMesh>& sieveMesh = mesh->sieveMesh();
     assert(!sieveMesh.isNull());
     ALE::Obj<ALE::Ordering<>::perm_type> perm = 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/BruneSlipFn.i
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/BruneSlipFn.i	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/BruneSlipFn.i	2012-05-07 20:41:28 UTC (rev 20049)
@@ -79,18 +79,6 @@
       void slip(pylith::topology::Field<pylith::topology::SubMesh>* const slipField,
 		const PylithScalar t);
       
-      /** Get slip increment on fault surface between time t0 and t1.
-       *
-       * @param slipField Slip field over fault surface.
-       * @param t0 Time t.
-       * @param t1 Time t+dt.
-       * 
-       * @returns Increment in slip vector as left-lateral/reverse/normal.
-       */
-      void slipIncr(pylith::topology::Field<pylith::topology::SubMesh>* slipField,
-		    const PylithScalar t0,
-		    const PylithScalar t1);
-
       /** Get final slip.
        *
        * @returns Final slip.

Modified: short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/ConstRateSlipFn.i
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/ConstRateSlipFn.i	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/ConstRateSlipFn.i	2012-05-07 20:41:28 UTC (rev 20049)
@@ -73,18 +73,6 @@
       void slip(pylith::topology::Field<pylith::topology::SubMesh>* const slipField,
 		const PylithScalar t);
   
-      /** Get slip increment on fault surface between time t0 and t1.
-       *
-       * @param slipField Slip field over fault surface.
-       * @param t0 Time t.
-       * @param t1 Time t+dt.
-       * 
-       * @returns Increment in slip vector as left-lateral/reverse/normal.
-       */
-      void slipIncr(pylith::topology::Field<pylith::topology::SubMesh>* slipField,
-		    const PylithScalar t0,
-		    const PylithScalar t1);
-      
       /** Get final slip.
        *
        * @returns Final slip.

Modified: short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/EqKinSrc.i
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/EqKinSrc.i	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/EqKinSrc.i	2012-05-07 20:41:28 UTC (rev 20049)
@@ -74,16 +74,6 @@
       void slip(pylith::topology::Field<pylith::topology::SubMesh>* const slipField,
 		const PylithScalar t);
 
-      /** Get increment of slip on fault surface between time t0 and t1.
-       *
-       * @param slipField Slip increment field over fault mesh.
-       * @param t0 Time for start of slip increment.
-       * @param t1 Time for end of slip increment.
-       */
-      void slipIncr(pylith::topology::Field<pylith::topology::SubMesh>* const slipField,
-		    const PylithScalar t0,
-		    const PylithScalar t1);
-      
       /** Get final slip.
        *
        * @returns Final slip.

Modified: short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/FaultCohesiveDyn.i
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/FaultCohesiveDyn.i	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/FaultCohesiveDyn.i	2012-05-07 20:41:28 UTC (rev 20049)
@@ -59,6 +59,16 @@
        */
       void zeroTolerance(const PylithScalar value);
 
+      /** Set flag used to determine when fault is traction free when it
+       * opens or it still imposes any initial tractions.
+       *
+       * If true, acts as a frictional contact. If false, one can simulate
+       * a dike opening.
+       *
+       * @param value Nondimensional tolerance
+       */
+      void openFreeSurf(const bool value);
+
       /** Initialize fault. Determine orientation and setup boundary
        * condition parameters.
        *

Copied: short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/FaultCohesiveImpulses.i (from rev 20048, short/3D/PyLith/branches/v1.7-trunk/modulesrc/faults/FaultCohesiveImpulses.i)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/FaultCohesiveImpulses.i	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/FaultCohesiveImpulses.i	2012-05-07 20:41:28 UTC (rev 20049)
@@ -0,0 +1,132 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010-2012 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ----------------------------------------------------------------------
+//
+
+/** @file modulesrc/faults/FaultCohesiveImpulses.i
+ *
+ * @brief Python interface to C++ FaultCohesiveImpulses object.
+ */
+
+namespace pylith {
+  namespace faults {
+
+    class FaultCohesiveImpulses : public FaultCohesiveLagrange
+    { // class FaultCohesiveImpulses
+
+      // PUBLIC METHODS /////////////////////////////////////////////////
+    public :
+
+      /// Default constructor.
+      FaultCohesiveImpulses(void);
+
+      /// Destructor.
+      ~FaultCohesiveImpulses(void);
+
+      /// Deallocate PETSc and local data structures.
+      void deallocate(void);
+  
+      /** Sets the spatial database for amplitudes of the impulses.
+       *
+       * @param db spatial database for amplitudes of impulses.
+       */
+      void dbImpulseAmp(spatialdata::spatialdb::SpatialDB* db);
+      
+      /** Set indices of fault degrees of freedom associated with
+       * impulses.
+       *
+       * @param flags Array of indices for degrees of freedom.
+       * @param size Size of array
+       */
+      %apply(int* INPLACE_ARRAY1, int DIM1) {
+	(const int* flags, 
+	 const int size)
+	  };
+      void impulseDOF(const int* flags,
+		      const int size);  
+      %clear(const int* flags, const int size);
+      
+      /** Set threshold for nonzero impulse amplitude.
+       *
+       * @param value Threshold for detecting nonzero amplitude.
+       */
+      void threshold(const PylithScalar value);
+      
+      /** Get number of impulses.
+       *
+       * Multiply by number of components to get total number of impulses.
+       *
+       * @returns Number of points with impulses.
+       */
+      int numImpulses(void) const;
+      
+      /** Get number of components for impulses at each point.
+       *
+       * Multiply by number of components to get total number of impulses.
+       *
+       * @returns Number of points with impulses.
+       */
+      int numComponents(void) const;
+      
+      /** Initialize fault. Determine orientation and setup boundary
+       * condition parameters.
+       *
+       * @param mesh Finite-element mesh.
+       * @param upDir Direction perpendicular to along-strike direction that is 
+       *   not collinear with fault normal (usually "up" direction but could 
+       *   be up-dip direction; applies to fault surfaces in 2-D and 3-D).
+       */
+      void initialize(const pylith::topology::Mesh& mesh,
+		      const PylithScalar upDir[3]);
+      
+      /** Integrate contributions to residual term (r) for operator that
+       * do not require assembly across cells, vertices, or processors.
+       *
+       * @param residual Field containing values for residual
+       * @param t Current time
+       * @param fields Solution fields
+       */
+      void integrateResidual(const pylith::topology::Field<pylith::topology::Mesh>& residual,
+			     const PylithScalar t,
+			     pylith::topology::SolutionFields* const fields);
+      
+      /** Get vertex field associated with integrator.
+       *
+       * @param name Name of cell field.
+       * @param fields Solution fields.
+       * @returns Vertex field.
+       */
+      const pylith::topology::Field<pylith::topology::SubMesh>&
+	vertexField(const char* name,
+		    const pylith::topology::SolutionFields* fields =0);
+      
+      /** Get cell field associated with integrator.
+       *
+       * @param name Name of cell field.
+       * @param fields Solution fields.
+       * @returns Cell field.
+       */
+      const pylith::topology::Field<pylith::topology::SubMesh>&
+      cellField(const char* name,
+		const pylith::topology::SolutionFields* fields =0);
+
+    }; // class FaultCohesiveImpulses
+
+  } // faults
+} // pylith
+
+
+// End of file 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/LiuCosSlipFn.i
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/LiuCosSlipFn.i	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/LiuCosSlipFn.i	2012-05-07 20:41:28 UTC (rev 20049)
@@ -81,18 +81,6 @@
       void slip(pylith::topology::Field<pylith::topology::SubMesh>* const slipField,
 		const PylithScalar t);
   
-      /** Get slip increment on fault surface between time t0 and t1.
-       *
-       * @param slipField Slip field over fault surface.
-       * @param t0 Time t.
-       * @param t1 Time t+dt.
-       * 
-       * @returns Increment in slip vector as left-lateral/reverse/normal.
-       */
-      void slipIncr(pylith::topology::Field<pylith::topology::SubMesh>* slipField,
-		    const PylithScalar t0,
-		    const PylithScalar t1);
-      
       /** Get final slip.
        *
        * @returns Final slip.

Modified: short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/Makefile.am	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/Makefile.am	2012-05-07 20:41:28 UTC (rev 20049)
@@ -37,6 +37,7 @@
 	FaultCohesiveLagrange.i \
 	FaultCohesiveKin.i \
 	FaultCohesiveDyn.i \
+	FaultCohesiveImpulses.i \
 	FaultCohesiveTract.i \
 	../topology/SubMesh.i \
 	../feassemble/Quadrature.i \

Modified: short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/SlipTimeFn.i
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/SlipTimeFn.i	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/SlipTimeFn.i	2012-05-07 20:41:28 UTC (rev 20049)
@@ -64,19 +64,6 @@
       void slip(pylith::topology::Field<pylith::topology::SubMesh>* const slipField,
 		const PylithScalar t) = 0;
   
-      /** Get slip increment on fault surface between time t0 and t1.
-       *
-       * @param slipField Slip field over fault surface.
-       * @param t0 Time t.
-       * @param t1 Time t+dt.
-       * 
-       * @returns Increment in slip vector as left-lateral/reverse/normal.
-       */
-      virtual
-      void slipIncr(pylith::topology::Field<pylith::topology::SubMesh>* slipField,
-		    const PylithScalar t0,
-		    const PylithScalar t1) = 0;
-      
       /** Get final slip.
        *
        * @returns Final slip.

Modified: short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/StepSlipFn.i
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/StepSlipFn.i	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/StepSlipFn.i	2012-05-07 20:41:28 UTC (rev 20049)
@@ -73,18 +73,6 @@
       void slip(pylith::topology::Field<pylith::topology::SubMesh>* const slipField,
 		const PylithScalar t);
       
-      /** Get slip increment on fault surface between time t0 and t1.
-       *
-       * @param slipField Slip field over fault surface.
-       * @param t0 Time t.
-       * @param t1 Time t+dt.
-       * 
-       * @returns Increment in slip vector as left-lateral/reverse/normal.
-       */
-      void slipIncr(pylith::topology::Field<pylith::topology::SubMesh>* slipField,
-		    const PylithScalar t0,
-		    const PylithScalar t1);
-      
       /** Get final slip.
        *
        * @returns Final slip.

Modified: short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/TimeHistorySlipFn.i
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/TimeHistorySlipFn.i	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/TimeHistorySlipFn.i	2012-05-07 20:41:28 UTC (rev 20049)
@@ -79,18 +79,6 @@
       void slip(pylith::topology::Field<pylith::topology::SubMesh>* const slipField,
 		const PylithScalar t);
   
-      /** Get slip increment on fault surface between time t0 and t1.
-       *
-       * @param slipField Slip field over fault surface.
-       * @param t0 Time t.
-       * @param t1 Time t+dt.
-       * 
-       * @returns Increment in slip vector as left-lateral/reverse/normal.
-       */
-      void slipIncr(pylith::topology::Field<pylith::topology::SubMesh>* slipField,
-		    const PylithScalar t0,
-		    const PylithScalar t1);
-      
       /** Get final slip.
        *
        * @returns Final slip.

Modified: short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/faults.i
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/faults.i	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/faults/faults.i	2012-05-07 20:41:28 UTC (rev 20049)
@@ -33,6 +33,7 @@
 #include "pylith/faults/FaultCohesiveLagrange.hh"
 #include "pylith/faults/FaultCohesiveKin.hh"
 #include "pylith/faults/FaultCohesiveDyn.hh"
+#include "pylith/faults/FaultCohesiveImpulses.hh"
 #include "pylith/faults/FaultCohesiveTract.hh"
 
 #include "pylith/topology/SubMesh.hh"
@@ -85,6 +86,7 @@
 %include "FaultCohesiveLagrange.i"
 %include "FaultCohesiveKin.i"
 %include "FaultCohesiveDyn.i"
+%include "FaultCohesiveImpulses.i"
 %include "FaultCohesiveTract.i"
 
 // End of file

Modified: short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/problems/Formulation.i
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/problems/Formulation.i	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/problems/Formulation.i	2012-05-07 20:41:28 UTC (rev 20049)
@@ -52,6 +52,18 @@
        */
       bool splitFields(void) const;
 
+      /** Set flag for splitting field components.
+       *
+       * @param flag True if splitting fields comonents, false otherwise.
+       */
+      void splitFieldComponents(const bool flag);
+      
+      /** Get flag for splitting field components.
+       *
+       * @returns flag True if splitting field components, false otherwise.
+       */
+      bool splitFieldComponents(void) const;
+
       /** Set flag for using custom Lagrange constraint preconditioner.
        *
        * @param flag True if using custom constraint precondition,

Modified: short/3D/PyLith/branches/pylith-scecdynrup/playpen/faultfaces/test/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/playpen/faultfaces/test/pylithapp.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/playpen/faultfaces/test/pylithapp.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -76,21 +76,21 @@
 id = 1
 db_properties.iohandler.filename = mat_elastic.spatialdb
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = tetrahedron
+quadrature.cell.dimension = 3
 
 [pylithapp.timedependent.materials.elastic_middle]
 label = Middle elastic material
 id = 2
 db_properties.iohandler.filename = mat_elastic.spatialdb
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = tetrahedron
+quadrature.cell.dimension = 3
 
 [pylithapp.timedependent.materials.elastic_right]
 label = Rightmost elastic material
 id = 3
 db_properties.iohandler.filename = mat_elastic.spatialdb
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = tetrahedron
+quadrature.cell.dimension = 3
 
 # ----------------------------------------------------------------------
 # faults
@@ -99,7 +99,7 @@
 #label = f003
 #id = 1003
 #quadrature.cell = pylith.feassemble.FIATSimplex
-#quadrature.cell.shape = triangle
+#quadrature.cell.dimension = 2
 #use_fault_mesh = True
 #fault_mesh_filename = fault_surf_003a_1.inp
 #output.vertex_info_fields = [normal_dir,strike_dir,dip_dir,final_slip_rupture,slip_time_rupture]
@@ -112,7 +112,7 @@
 #label = f005
 #id = 1005
 #quadrature.cell = pylith.feassemble.FIATSimplex
-#quadrature.cell.shape = triangle
+#quadrature.cell.dimension = 2
 #use_fault_mesh = True
 #fault_mesh_filename = fault_surf_005a_1.inp
 #output.vertex_info_fields = [normal_dir,strike_dir,dip_dir,final_slip_rupture,slip_time_rupture]
@@ -125,7 +125,7 @@
 label = f003b
 id = 1004
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = triangle
+quadrature.cell.dimension = 2
 use_fault_mesh = True
 fault_mesh_filename = fault_surf_003a_2.inp
 output.vertex_info_fields = [normal_dir,strike_dir,dip_dir,final_slip_rupture,slip_time_rupture]
@@ -138,7 +138,7 @@
 label = f003c
 id = 1006
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = triangle
+quadrature.cell.dimension = 2
 use_fault_mesh = True
 fault_mesh_filename = fault_surf_003a_3.inp
 output.vertex_info_fields = [normal_dir,strike_dir,dip_dir,final_slip_rupture,slip_time_rupture]

Modified: short/3D/PyLith/branches/pylith-scecdynrup/playpen/quadratic/twotet10/dislocation.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/playpen/quadratic/twotet10/dislocation.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/playpen/quadratic/twotet10/dislocation.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -79,7 +79,7 @@
 #     material ID's are equal to 100.
 
 # The quadrature for a 3D fault is 2D.
-quadrature.cell.shape = triangle
+quadrature.cell.dimension = 2
 quadrature.cell.degree = 2
 
 # Give the spatial databases specifying the fault slip.

Modified: short/3D/PyLith/branches/pylith-scecdynrup/playpen/quadratic/twotet10/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/playpen/quadratic/twotet10/pylithapp.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/playpen/quadratic/twotet10/pylithapp.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -84,7 +84,7 @@
 db_properties.iohandler.filename = matprops.spatialdb
 
 # We are doing 3D quadrature for a tetrahedron.
-quadrature.cell.shape = tetrahedron
+quadrature.cell.dimension = 3
 quadrature.cell.degree = 2
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/playpen/reordering/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/playpen/reordering/pylithapp.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/playpen/reordering/pylithapp.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -45,7 +45,7 @@
 label = elastic material
 id = 1
 db_properties.iohandler.filename = matprops.spatialdb
-quadrature.cell.shape = triangle
+quadrature.cell.dimension = 2
 
 # ----------------------------------------------------------------------
 # boundary conditions

Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/Makefile.am	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/Makefile.am	2012-05-07 20:41:28 UTC (rev 20049)
@@ -40,6 +40,7 @@
 	faults/FaultCohesive.py \
 	faults/FaultCohesiveKin.py \
 	faults/FaultCohesiveDyn.py \
+	faults/FaultCohesiveImpulses.py \
 	faults/FaultCohesiveTract.py \
 	faults/LiuCosSlipFn.py \
 	faults/SingleRupture.py \
@@ -108,6 +109,7 @@
 	meshio/OutputSoln.py \
 	meshio/OutputFaultKin.py \
 	meshio/OutputFaultDyn.py \
+	meshio/OutputFaultImpulses.py \
 	meshio/OutputMatElastic.py \
 	meshio/OutputNeumann.py \
 	meshio/OutputSolnSubset.py \
@@ -145,6 +147,7 @@
 	problems/SolverNonlinear.py \
 	problems/SolverLumped.py \
 	problems/TimeDependent.py \
+	problems/GreensFns.py \
 	problems/TimeStep.py \
 	problems/TimeStepAdapt.py \
 	problems/TimeStepUniform.py \

Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/faults/Fault.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/faults/Fault.py	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/faults/Fault.py	2012-05-07 20:41:28 UTC (rev 20049)
@@ -68,7 +68,7 @@
 
   \b Properties
   @li \b id Fault identifier
-  @li \b name Name of fault
+  @li \b label Label identifier for fault.
   @li \b up_dir Up-dip or up direction
     (perpendicular to along-strike and not collinear with fault normal;
     applies to fault surfaces in 2-D and 3-D).

Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/faults/FaultCohesiveDyn.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/faults/FaultCohesiveDyn.py	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/faults/FaultCohesiveDyn.py	2012-05-07 20:41:28 UTC (rev 20049)
@@ -43,6 +43,9 @@
   
   \b Properties
   @li \b zero_tolerance Tolerance for detecting zero values.
+  @li \b open_free_surface If True, enforce traction free surface when
+    the fault opens, otherwise use initial tractions even when the
+    fault opens.
   
   \b Facilities
   @li \b db_initial_tractions Spatial database for initial tractions.
@@ -60,6 +63,11 @@
                                        validator=pyre.inventory.greaterEqual(0.0))
   zeroTolerance.meta['tip'] = "Tolerance for detecting zero values."
 
+  openFreeSurf = pyre.inventory.bool("open_free_surface", default=False)
+  openFreeSurf.meta['tip'] = "If True, enforce traction free surface when " \
+    "the fault opens, otherwise use initial tractions even when the " \
+    "fault opens."
+
   db = pyre.inventory.facility("db_initial_tractions", family="spatial_database",
                                factory=NullComponent)
   db.meta['tip'] = "Spatial database for initial tractions."
@@ -205,6 +213,7 @@
       ModuleFaultCohesiveDyn.dbInitialTract(self, self.inventory.db)
     ModuleFaultCohesiveDyn.frictionModel(self, self.inventory.friction)
     ModuleFaultCohesiveDyn.zeroTolerance(self, self.inventory.zeroTolerance)
+    ModuleFaultCohesiveDyn.openFreeSurf(self, self.inventory.openFreeSurf)
     self.output = self.inventory.output
     return
 

Copied: short/3D/PyLith/branches/pylith-scecdynrup/pylith/faults/FaultCohesiveImpulses.py (from rev 20048, short/3D/PyLith/branches/v1.7-trunk/pylith/faults/FaultCohesiveImpulses.py)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/faults/FaultCohesiveImpulses.py	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/faults/FaultCohesiveImpulses.py	2012-05-07 20:41:28 UTC (rev 20049)
@@ -0,0 +1,245 @@
+#!/usr/bin/env python
+#
+# ----------------------------------------------------------------------
+#
+# Brad T. Aagaard, U.S. Geological Survey
+# Charles A. Williams, GNS Science
+# Matthew G. Knepley, University of Chicago
+#
+# This code was developed as part of the Computational Infrastructure
+# for Geodynamics (http://geodynamics.org).
+#
+# Copyright (c) 2010-2012 University of California, Davis
+#
+# See COPYING for license information.
+#
+# ----------------------------------------------------------------------
+#
+
+## @file pylith/faults/FaultCohesiveImpulses.py
+##
+
+## @brief Python object for a fault surface with slip impulses for
+## Green's function implemented with cohesive elements.
+##
+## Factory: fault
+
+from FaultCohesive import FaultCohesive
+from pylith.feassemble.Integrator import Integrator
+from faults import FaultCohesiveImpulses as ModuleFaultCohesiveImpulses
+
+def validateDOF(value):
+  """
+  Validate list of fixed degrees of freedom.
+  """
+  try:
+    size = len(value)
+    num = map(int, value)
+    for v in num:
+      if v < 0:
+        raise ValueError
+  except:
+    raise ValueError, \
+          "'impuluse_dof' must be a zero based list of indices of degrees of " \
+          "freedom at a vertex."
+  return num
+  
+
+# FaultCohesiveImpulses class
+class FaultCohesiveImpulses(FaultCohesive, Integrator, ModuleFaultCohesiveImpulses):
+  """
+  Python object for a fault surface with slip impulses for Green's
+  functions implemented with cohesive elements.
+
+  Inventory
+
+  @class Inventory
+  Python object for managing FaultCohesiveImpulses facilities and properties.
+  
+  \b Properties
+  @li \b threshold Threshold for non-zero amplitude.
+  @li \b impulse_dof Indices of slip components for impulses.
+  
+  \b Facilities
+  @li \b db_impulse_amplitude Amplitude of slip impulses.
+  @li \b output Output manager associated with fault data.
+
+  Factory: fault
+  """
+
+  # INVENTORY //////////////////////////////////////////////////////////
+
+  import pyre.inventory
+  from pyre.units.length import m
+
+  threshold = pyre.inventory.dimensional("threshold", default=1.0e-6*m)
+
+  impulseDOF = pyre.inventory.list("impulse_dof", default=[], validator=validateDOF)
+  impulseDOF.meta['tip'] = "Indices of impulse components " \
+      "(0=1st DOF, 1=2nd DOF, etc)."
+
+  from spatialdata.spatialdb.SimpleDB import SimpleDB
+  dbImpulseAmp = pyre.inventory.facility("db_impulse_amplitude", family="spatial_database", factory=SimpleDB)
+  dbImpulseAmp.meta['tip'] = "Amplitude of slip impulses."
+  
+  from pylith.meshio.OutputFaultImpulses import OutputFaultImpulses
+  output = pyre.inventory.facility("output", family="output_manager",
+                                   factory=OutputFaultImpulses)
+  output.meta['tip'] = "Output manager associated with fault data."
+
+  # PUBLIC METHODS /////////////////////////////////////////////////////
+
+  def __init__(self, name="faultcohesiveimpulses"):
+    """
+    Initialize configuration.
+    """
+    FaultCohesive.__init__(self, name)
+    Integrator.__init__(self)
+    self._loggingPrefix = "CoIm "
+
+    self.availableFields = \
+        {'vertex': \
+           {'info': ["normal_dir",
+                     "impulse_amplitude"],
+            'data': ["slip",
+                     "traction_change"]},
+         'cell': \
+           {'info': ["partition"],
+            'data': []}}
+    return
+
+
+  def preinitialize(self, mesh):
+    """
+    Do pre-initialization setup.
+    """
+    from pylith.mpi.Communicator import mpi_comm_world
+    comm = mpi_comm_world()
+
+    if 0 == comm.rank:
+      self._info.log("Pre-initializing fault '%s'." % self.label())
+    FaultCohesive.preinitialize(self, mesh)
+    Integrator.preinitialize(self, mesh)
+
+    ModuleFaultCohesiveImpulses.quadrature(self, self.faultQuadrature)
+
+    if mesh.dimension() == 2:
+      self.availableFields['vertex']['info'] += ["strike_dir"]
+    elif mesh.dimension() == 3:
+      self.availableFields['vertex']['info'] += ["strike_dir",
+                                                 "dip_dir"]
+    return
+  
+
+  def verifyConfiguration(self):
+    """
+    Verify compatibility of configuration.
+    """
+    logEvent = "%sverify" % self._loggingPrefix
+    self._eventLogger.eventBegin(logEvent)
+
+    FaultCohesive.verifyConfiguration(self)
+    Integrator.verifyConfiguration(self)
+    ModuleFaultCohesiveImpulses.verifyConfiguration(self, self.mesh)
+
+    self._eventLogger.eventEnd(logEvent)
+    return
+
+
+  def initialize(self, totalTime, numTimeSteps, normalizer):
+    """
+    Initialize cohesive elements.
+    """
+    logEvent = "%sinit" % self._loggingPrefix
+    self._eventLogger.eventBegin(logEvent)
+
+    from pylith.mpi.Communicator import mpi_comm_world
+    comm = mpi_comm_world()
+
+    if 0 == comm.rank:
+      self._info.log("Initializing fault '%s'." % self.label())
+
+    Integrator.initialize(self, totalTime, numTimeSteps, normalizer)
+    FaultCohesive.initialize(self, totalTime, numTimeSteps, normalizer)
+
+    self._eventLogger.eventEnd(logEvent)
+    return
+
+
+  def getVertexField(self, name, fields=None):
+    """
+    Get vertex field.
+    """
+    if None == fields:
+      field = ModuleFaultCohesiveImpulses.vertexField(self, name)
+    else:
+      field = ModuleFaultCohesiveImpulses.vertexField(self, name, fields)
+    return field
+
+
+  def getCellField(self, name, fields=None):
+    """
+    Get cell field.
+    """
+    if None == fields:
+      field = ModuleFaultCohesiveImpulses.cellField(self, name)
+    else:
+      field = ModuleFaultCohesiveImpulses.cellField(self, name, fields)
+    return field
+
+
+  def finalize(self):
+    """
+    Cleanup.
+    """
+    FaultCohesive.finalize(self)
+    Integrator.finalize(self)
+    self.output.close()
+    self.output.finalize()
+    return
+  
+
+  # PRIVATE METHODS ////////////////////////////////////////////////////
+
+  def _configure(self):
+    """
+    Setup members using inventory.
+    """
+    import numpy
+    FaultCohesive._configure(self)
+    self.output = self.inventory.output
+
+    ModuleFaultCohesiveImpulses.threshold(self, self.inventory.threshold.value)
+    impulseDOF = numpy.array(self.inventory.impulseDOF, dtype=numpy.int32)
+    ModuleFaultCohesiveImpulses.impulseDOF(self, impulseDOF)
+    ModuleFaultCohesiveImpulses.dbImpulseAmp(self, self.inventory.dbImpulseAmp)
+    return
+
+
+  def _createModuleObj(self):
+    """
+    Create handle to C++ FaultCohesiveImpulses.
+    """
+    ModuleFaultCohesiveImpulses.__init__(self)
+    return
+    
+  
+  def _modelMemoryUse(self):
+    """
+    Model memory allocation.
+    """
+    self.perfLogger.logFault("Fault", self)
+    self.perfLogger.logFields("Fault", self.fields())
+    return
+
+
+# FACTORIES ////////////////////////////////////////////////////////////
+
+def fault():
+  """
+  Factory associated with FaultCohesiveImpulses.
+  """
+  return FaultCohesiveImpulses()
+
+
+# End of file 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/feassemble/FIATLagrange.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/feassemble/FIATLagrange.py	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/feassemble/FIATLagrange.py	2012-05-07 20:41:28 UTC (rev 20049)
@@ -32,7 +32,7 @@
 
 def validateDimension(dim):
   if dim < 1 or dim > 3:
-    raise ValueError("Dimension of Lagrange element must be 1, 2, or 3.")
+    raise ValueError("Dimension of Lagrange cell must be 1, 2, or 3.")
   return dim
 
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/feassemble/FIATSimplex.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/feassemble/FIATSimplex.py	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/feassemble/FIATSimplex.py	2012-05-07 20:41:28 UTC (rev 20049)
@@ -27,17 +27,10 @@
 
 import numpy
 
-def validateShape(shape):
-  name = shape.lower()
-  if not ("tetrahedron" == name or 
-          "triangle" == name or 
-          "line" == name or
-          "point" == name):
-    raise ValueError("Unknown shape '%s' for reference finite-element " \
-                     "cell.\n" \
-                     "Known shapes: 'tetrahedron', 'triangle', 'line', 'point'" % \
-                     name)
-  return name
+def validateDimension(dim):
+  if dim < 1 or dim > 3:
+    raise ValueError("Dimension of simplex cell must be 1, 2, or 3.")
+  return dim
 
 
 # FIATSimplex class
@@ -58,18 +51,19 @@
     ## Python object for managing FIATSimplex facilities and properties.
     ##
     ## \b Properties
-    ## @li \b shape Shape of finite-element cell
+    ## @li \b dimension Dimension of finite-element cell.
     ## @li \b degree Degree of finite-element cell 
     ## @li \b quad_order Order of quadrature rule
+    ## @li \b collocate_quad Collocate quadrature points with vertices.
     ##
     ## \b Facilities
     ## @li None
 
     import pyre.inventory
 
-    shape = pyre.inventory.str("shape", default="tetrahedron",
-                               validator=validateShape)
-    shape.meta['tip'] = "Shape of finite-element cell."
+    dimension = pyre.inventory.int("dimension", default=3,
+                                   validator=validateDimension)
+    dimension.meta['tip'] = "Dimension of finite-element cell."
 
     degree = pyre.inventory.int("degree", default=1)
     degree.meta['tip'] = "Degree of finite-element cell."
@@ -97,7 +91,7 @@
     """
     self._setupGeometry(spaceDim)
 
-    if "point" == self.shape.lower():
+    if self.cellDim == 0:
       # Need 0-D quadrature for boundary conditions of 1-D meshes
       self.cellDim = 0
       self.numCorners = 1
@@ -167,10 +161,11 @@
     """
     try:
       ReferenceCell._configure(self)
-      self.shape = self.inventory.shape
+      self.cellDim = self.inventory.dimension
       self.degree = self.inventory.degree
       self.order = self.inventory.order
       self.collocateQuad = self.inventory.collocateQuad
+
       if self.order == -1:
         self.order = self.degree
     except ValueError, err:
@@ -228,23 +223,22 @@
     import CellGeometry
 
     self.geometry = None
-    name = self.shape.lower()
-    if "tetrahedron" == name:
+    if self.cellDim == 3:
       if 3 == spaceDim:
         self.geometry = CellGeometry.GeometryTet3D()
-    elif "triangle" == name:
+    elif self.cellDim == 2:
       if 2 == spaceDim:
         self.geometry = CellGeometry.GeometryTri2D()
       elif 3 == spaceDim:
         self.geometry = CellGeometry.GeometryTri3D()
-    elif "line" == name:
+    elif self.cellDim == 1:
       if 1 == spaceDim:
         self.geometry = CellGeometry.GeometryLine1D()
       elif 2 == spaceDim:
         self.geometry = CellGeometry.GeometryLine2D()
       elif 3 == spaceDim:
         self.geometry = CellGeometry.GeometryLine3D()
-    elif "point" == name:
+    elif self.cellDim == 0:
       if 1 == spaceDim:
         self.geometry = CellGeometry.GeometryPoint1D()
       elif 2 == spaceDim:
@@ -252,8 +246,8 @@
       elif 3 == spaceDim:
         self.geometry = CellGeometry.GeometryPoint3D()
     if None == self.geometry:
-      raise ValueError("Could not set shape '%s' of cell for '%s' in spatial " \
-                       "dimension '%s'." % (name, self.name, spaceDim))
+      raise ValueError("Could not set geometry of cell with dimension '%d' for '%s' in spatial " \
+                       "dimension '%s'." % (self.cellDim, self.name, spaceDim))
 
     return
   
@@ -295,20 +289,17 @@
     Parse string into FIAT shape.
     """
     from FIAT.reference_element import default_simplex
-    name = self.shape.lower()
-    if "tetrahedron" == name:
+    if self.cellDim == 3:
       shape = default_simplex(3)
-    elif "triangle" == name:
+    elif self.cellDim == 2:
       shape = default_simplex(2)
-    elif "line" == name:
+    elif self.cellDim == 1:
       shape = default_simplex(1)
-    elif "point" == name:
+    elif self.cellDim == 0:
       shape = None
     else:
-      raise ValueError("Unknown shape '%s' for reference finite-element " \
-                       "cell.\n" \
-                       "Known shapes: 'tetrahedron', 'triangle', 'line'" % \
-                       name)
+      raise ValueError("Unknown dimension '%d' for reference finite-element " \
+                       "cell.\n" % self.cellDim)
     return shape
 
 

Copied: short/3D/PyLith/branches/pylith-scecdynrup/pylith/meshio/OutputFaultImpulses.py (from rev 20048, short/3D/PyLith/branches/v1.7-trunk/pylith/meshio/OutputFaultImpulses.py)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/meshio/OutputFaultImpulses.py	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/meshio/OutputFaultImpulses.py	2012-05-07 20:41:28 UTC (rev 20049)
@@ -0,0 +1,99 @@
+#!/usr/bin/env python
+#
+# ----------------------------------------------------------------------
+#
+# Brad T. Aagaard, U.S. Geological Survey
+# Charles A. Williams, GNS Science
+# Matthew G. Knepley, University of Chicago
+#
+# This code was developed as part of the Computational Infrastructure
+# for Geodynamics (http://geodynamics.org).
+#
+# Copyright (c) 2010-2012 University of California, Davis
+#
+# See COPYING for license information.
+#
+# ----------------------------------------------------------------------
+#
+
+## @file pyre/meshio/OutputFaultImpulses.py
+##
+## @brief Python object for managing output of finite-element
+## information for faults with Green's function slip impulses.
+##
+## Factory: output_manager
+
+from OutputManagerSubMesh import OutputManagerSubMesh
+
+# OutputFaultImpulses class
+class OutputFaultImpulses(OutputManagerSubMesh):
+  """
+  Python object for managing output of finite-element information for
+  faults with Green's function slip impulses.
+
+  Inventory
+
+  @class Inventory
+  Python object for managing OutputFaultImpulses facilities and properties.
+  
+  \b Properties
+  @li \b vertex_info_fields Names of vertex info fields to output.
+  @li \b vertex_data_fields Names of vertex data fields to output.
+  
+  \b Facilities
+  @li None
+
+  Factory: output_manager
+  """
+
+  # INVENTORY //////////////////////////////////////////////////////////
+
+  import pyre.inventory
+
+  vertexInfoFields = pyre.inventory.list("vertex_info_fields",
+                                         default=["normal_dir",
+                                                  "impulse_amplitude"])
+  vertexInfoFields.meta['tip'] = "Names of vertex info fields to output."
+
+  vertexDataFields = pyre.inventory.list("vertex_data_fields", 
+                                         default=["slip",
+                                                  "traction_change"])
+  vertexDataFields.meta['tip'] = "Names of vertex data fields to output."
+
+  cellInfoFields = pyre.inventory.list("cell_info_fields", default=[])
+  cellInfoFields.meta['tip'] = "Names of cell info fields to output."
+
+
+  # PUBLIC METHODS /////////////////////////////////////////////////////
+
+  def __init__(self, name="outputfaultimpulses"):
+    """
+    Constructor.
+    """
+    OutputManagerSubMesh.__init__(self, name)
+    return
+
+    
+  # PRIVATE METHODS ////////////////////////////////////////////////////
+
+  def _configure(self):
+    """
+    Set members based using inventory.
+    """
+    OutputManagerSubMesh._configure(self)
+    self.vertexInfoFields = self.inventory.vertexInfoFields
+    self.vertexDataFields = self.inventory.vertexDataFields
+    self.cellInfoFields   = self.inventory.cellInfoFields
+    return
+
+
+# FACTORIES ////////////////////////////////////////////////////////////
+
+def output_manager():
+  """
+  Factory associated with OutputManager.
+  """
+  return OutputFaultImpulses()
+
+
+# End of file 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/Formulation.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/Formulation.py	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/Formulation.py	2012-05-07 20:41:28 UTC (rev 20049)
@@ -75,6 +75,8 @@
     ## @li \b use_cuda Enable use of CUDA for finite-element integrations.
     ## @li \b matrix_type Type of PETSc sparse matrix.
     ## @li \b split_fields Split solution fields into displacements
+    ## and Lagrange constraints.
+    ## @li \b split_field_components Split fields into components.
     ## @li \b use_custom_constraint_pc Use custom preconditioner for
     ##   Lagrange constraints.
     ## @li \b view_jacobian Flag to output Jacobian matrix when it is
@@ -99,6 +101,9 @@
     useSplitFields.meta['tip'] = "Split solution fields into displacements "\
         "and Lagrange multipliers for separate preconditioning."
 
+    useSplitFieldComponents = pyre.inventory.bool("split_field_components", default=False)
+    useSplitFieldComponents.meta['tip'] = "Split solution fields into components for separate preconditioning."
+
     useCustomConstraintPC = pyre.inventory.bool("use_custom_constraint_pc",
                                                 default=False)
     useCustomConstraintPC.meta['tip'] = "Use custom preconditioner for " \
@@ -333,6 +338,7 @@
       self.inventory.useSplitFields = True
 
     ModuleFormulation.splitFields(self, self.inventory.useSplitFields)
+    ModuleFormulation.splitFieldComponents(self, self.inventory.useSplitFieldComponents)
     ModuleFormulation.useCustomConstraintPC(self,
                                             self.inventory.useCustomConstraintPC)
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/GreensFns.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/GreensFns.py	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/GreensFns.py	2012-05-07 20:41:28 UTC (rev 20049)
@@ -44,7 +44,7 @@
     ## Python object for managing GreensFns facilities and properties.
     ##
     ## \b Properties
-    ## None
+    ## @li \b faultId Id of fault on which to impose impulses.
     ##
     ## \b Facilities
     ## @li \b formulation Formulation for solving PDE.
@@ -52,6 +52,9 @@
 
     import pyre.inventory
 
+    faultId = pyre.inventory.int("fault_id", default=100)
+    faultId.meta['tip'] = "Id of fault on which to impose impulses."
+
     from Implicit import Implicit
     formulation = pyre.inventory.facility("formulation",
                                           family="pde_formulation",
@@ -90,6 +93,17 @@
     self.mesh = mesh
     self.formulation.preinitialize(mesh, self.materials, self.bc,
                                    self.interfaces, self.gravityField)
+
+    # Find fault for impulses
+    found = False
+    for fault in self.interfaces.components():
+      if self.faultId == fault.id():
+        self.source = fault
+        found = True
+        break
+    if not found:
+      raise ValueError("Could not find fault interface with id '%d' for "
+                       "Green's function impulses." % self.faultId)
     return
 
 
@@ -99,6 +113,11 @@
     """
     Problem.verifyConfiguration(self)
     self.formulation.verifyConfiguration()
+
+    if not "numImpulses" in dir(self.source) or not "numComponents" in dir(self.source):
+      raise ValueError("Incompatible source for green's function impulses "
+                       "with id '%d' and label '%s'." % \
+                         (self.source.id(), self.source.label()))
     return
   
 
@@ -128,13 +147,22 @@
       self._info.log("Computing Green's functions.")
     self.checkpointTimer.toplevel = app # Set handle for saving state
 
-    nimpulses = 0
+    # Limit material behavior to linear regime
+    for material in self.materials.components():
+      material.useLinearBehavior(True)
+
+    nimpulses = self.source.numImpulses()*self.source.numComponents()
     ipulse = 0;
+    dt = 1.0
     while ipulse < nimpulses:
       self._eventLogger.stagePush("Prestep")
       if 0 == comm.rank:
         self._info.log("Main loop, impulse %d of %d." % (ipulse+1, nimpulses))
       
+      # Implicit time stepping computes solution at t+dt, so set
+      # t=ipulse-dt, so that t+dt corresponds to the impulse
+      t = float(ipulse)-dt
+
       # Checkpoint if necessary
       self.checkpointTimer.update(t)
 
@@ -158,8 +186,8 @@
       self.formulation.poststep(t, dt)
       self._eventLogger.stagePop()
 
-      # Update time
-      t += dt
+      # Update time/impulse
+      ipulse += 1
     return
 
 
@@ -192,6 +220,8 @@
     Set members based using inventory.
     """
     Problem._configure(self)
+
+    self.faultId = self.inventory.faultId
     self.formulation = self.inventory.formulation
     self.checkpointTimer = self.inventory.checkpointTimer
     return

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/tet4.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/tet4.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/tet4.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -19,7 +19,7 @@
 # ----------------------------------------------------------------------
 [pylithapp.timedependent.materials.elastic]
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = tetrahedron
+quadrature.cell.dimension = 3
 
 
 # End of file

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/refine/tet4.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/refine/tet4.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/refine/tet4.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -16,14 +16,14 @@
 # ----------------------------------------------------------------------
 [pylithapp.timedependent.materials.elastic]
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = tetrahedron
+quadrature.cell.dimension = 3
 
 # ----------------------------------------------------------------------
 # faults
 # ----------------------------------------------------------------------
 [pylithapp.timedependent.interfaces.fault]
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = triangle
+quadrature.cell.dimension = 2
 
 # ----------------------------------------------------------------------
 # output

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/slipdir/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/slipdir/pylithapp.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/slipdir/pylithapp.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -48,7 +48,7 @@
 db_properties.iohandler.filename = matprops.spatialdb
 
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = tetrahedron
+quadrature.cell.dimension = 3
 
 # ----------------------------------------------------------------------
 # boundary conditions
@@ -73,7 +73,7 @@
 label = fault
 
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = triangle
+quadrature.cell.dimension = 2
 quadrature.cell.quad_order = 2
 
 eq_srcs.rupture.slip_function = pylith.faults.StepSlipFn

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/refinefaulttip/tet4.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/refinefaulttip/tet4.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/refinefaulttip/tet4.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -69,7 +69,7 @@
 db_properties.data = [2500.0*km/m**3, 5.1962*km/s, 3.0*km/s]
 
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = tetrahedron
+quadrature.cell.dimension = 3
 quadrature.cell.quad_order = 2
 
 # ----------------------------------------------------------------------
@@ -95,7 +95,7 @@
 id = 100
 label = fault
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = triangle
+quadrature.cell.dimension = 2
 quadrature.cell.quad_order = 2
 
 [pylithapp.timedependent.interfaces.fault.eq_srcs.rupture.slip_function]

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/refinefaulttip/tri3.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/refinefaulttip/tri3.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/refinefaulttip/tri3.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -72,7 +72,7 @@
 db_properties.data = [2500.0*km/m**3, 5.1962*km/s, 3.0*km/s]
 
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = triangle
+quadrature.cell.dimension = 2
 quadrature.cell.quad_order = 2
 
 # ----------------------------------------------------------------------
@@ -98,7 +98,7 @@
 id = 100
 label = fault
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = line
+quadrature.cell.dimension = 1
 quadrature.cell.quad_order = 2
 
 [pylithapp.timedependent.interfaces.fault.eq_srcs.rupture.slip_function]

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/dislocation.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/dislocation.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/dislocation.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -53,7 +53,7 @@
 id = 1
 db_properties.label = Elastic properties
 db_properties.iohandler.filename = matprops.spatialdb
-quadrature.cell.shape = line
+quadrature.cell.dimension = 1
 
 # ----------------------------------------------------------------------
 # boundary conditions
@@ -73,7 +73,7 @@
 
 [dislocation.timedependent.interfaces.fault]
 label = fault
-quadrature.cell.shape = point
+quadrature.cell.dimension = 0
 
 [dislocation.timedependent.interfaces.fault.eq_srcs.rupture.slip_function]
 slip.label = Final slip

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/extensiondisp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/extensiondisp.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/extensiondisp.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -51,7 +51,7 @@
 id = 1
 db_properties.label = Elastic properties
 db_properties.iohandler.filename = matprops.spatialdb
-quadrature.cell.shape = line
+quadrature.cell.dimension = 1
 
 # ----------------------------------------------------------------------
 # boundary conditions

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/extensionforce.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/extensionforce.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/extensionforce.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -50,7 +50,7 @@
 id = 1
 db_properties.label = Elastic properties
 db_properties.iohandler.filename = matprops.spatialdb
-quadrature.cell.shape = line
+quadrature.cell.dimension = 1
 
 # ----------------------------------------------------------------------
 # boundary conditions

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/lgdeformtranslation.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/lgdeformtranslation.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/lgdeformtranslation.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -52,7 +52,7 @@
 id = 1
 db_properties.label = Elastic properties
 db_properties.iohandler.filename = matprops.spatialdb
-quadrature.cell.shape = line
+quadrature.cell.dimension = 1
 
 # ----------------------------------------------------------------------
 # boundary conditions

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line3/axialextension.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line3/axialextension.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line3/axialextension.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -51,7 +51,7 @@
 id = 1
 db_properties.label = Elastic properties
 db_properties.iohandler.filename = matprops.spatialdb
-quadrature.cell.shape = line
+quadrature.cell.dimension = 1
 quadrature.cell.degree = 2
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line3/dislocation.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line3/dislocation.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line3/dislocation.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -51,7 +51,7 @@
 id = 1
 db_properties.label = Elastic properties
 db_properties.iohandler.filename = matprops.spatialdb
-quadrature.cell.shape = line
+quadrature.cell.dimension = 1
 quadrature.cell.degree = 2
 
 # ----------------------------------------------------------------------
@@ -72,7 +72,7 @@
 
 [dislocation.timedependent.interfaces.fault]
 label = fault
-quadrature.cell.shape = point
+quadrature.cell.dimension = 0
 
 [dislocation.timedependent.interfaces.fault.eq_srcs.rupture.slip_function]
 slip.label = Final slip

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/axialdisp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/axialdisp.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/axialdisp.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -52,7 +52,7 @@
 db_properties.label = Elastic properties
 db_properties.iohandler.filename = matprops.spatialdb
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = triangle
+quadrature.cell.dimension = 2
 
 # ----------------------------------------------------------------------
 # boundary conditions

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/dislocation.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/dislocation.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/dislocation.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -49,7 +49,7 @@
 id = 1
 db_properties.label = Elastic properties
 db_properties.iohandler.filename = matprops.spatialdb
-quadrature.cell.shape = triangle
+quadrature.cell.dimension = 2
 
 # ----------------------------------------------------------------------
 # boundary conditions
@@ -79,7 +79,7 @@
 [dislocation.timedependent.interfaces.fault]
 id = 2
 label = 10
-quadrature.cell.shape = line
+quadrature.cell.dimension = 1
 mat_db.iohandler.filename = matprops.spatialdb
 
 [dislocation.timedependent.interfaces.fault.eq_srcs.rupture.slip_function]

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/dislocation2.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/dislocation2.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/dislocation2.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -49,7 +49,7 @@
 id = 1
 db_properties.label = Elastic properties
 db_properties.iohandler.filename = matprops.spatialdb
-quadrature.cell.shape = triangle
+quadrature.cell.dimension = 2
 
 # ----------------------------------------------------------------------
 # boundary conditions
@@ -72,7 +72,7 @@
 [dislocation2.timedependent.interfaces.fault_pos]
 id = 2
 label = 11
-quadrature.cell.shape = line
+quadrature.cell.dimension = 1
 mat_db.iohandler.filename = matprops.spatialdb
 
 [dislocation2.timedependent.interfaces.fault_pos.eq_srcs.rupture.slip_function]
@@ -83,7 +83,7 @@
 [dislocation2.timedependent.interfaces.fault_neg]
 id = 3
 label = 12
-quadrature.cell.shape = line
+quadrature.cell.dimension = 1
 mat_db.iohandler.filename = matprops.spatialdb
 
 [dislocation2.timedependent.interfaces.fault_neg.eq_srcs.rupture.slip_function]

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/sheardisp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/sheardisp.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/sheardisp.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -52,7 +52,7 @@
 db_properties.label = Elastic properties
 db_properties.iohandler.filename = matprops.spatialdb
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = triangle
+quadrature.cell.dimension = 2
 
 # ----------------------------------------------------------------------
 # boundary conditions

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/sheardisp_refine.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/sheardisp_refine.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/sheardisp_refine.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -56,7 +56,7 @@
 id = 1
 db_properties.iohandler.filename = matprops.spatialdb
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = triangle
+quadrature.cell.dimension = 2
 
 # ----------------------------------------------------------------------
 # boundary conditions

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri6/axialdisp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri6/axialdisp.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri6/axialdisp.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -55,7 +55,7 @@
 id = 1
 db_properties.iohandler.filename = matprops.spatialdb
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = triangle
+quadrature.cell.dimension = 2
 quadrature.cell.degree = 2
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri6/dislocation.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri6/dislocation.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri6/dislocation.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -55,7 +55,7 @@
 label = Elastic material
 id = 1
 db_properties.iohandler.filename = matprops.spatialdb
-quadrature.cell.shape = triangle
+quadrature.cell.dimension = 2
 quadrature.cell.degree = 2
 
 # ----------------------------------------------------------------------
@@ -86,7 +86,7 @@
 [pylithapp.timedependent.interfaces.fault]
 id = 2
 label = fault_x
-quadrature.cell.shape = line
+quadrature.cell.dimension = 1
 quadrature.cell.degree = 2
 
 [pylithapp.timedependent.interfaces.fault.eq_srcs.rupture.slip_function]

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/tet4/axialelasticisotropic.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/tet4/axialelasticisotropic.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/tet4/axialelasticisotropic.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -48,7 +48,7 @@
 id = 1
 db.iohandler.filename = matprops.spatialdb
 quadrature = pylith.feassemble.quadrature.Quadrature3D
-quadrature.cell.shape = tetrahedron
+quadrature.cell.dimension = 3
 
 # ----------------------------------------------------------------------
 # boundary conditions

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/tet4/dislocation.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/tet4/dislocation.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/tet4/dislocation.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -49,7 +49,7 @@
 id = 0
 db.iohandler.filename = matprops.spatialdb
 quadrature = pylith.feassemble.quadrature.Quadrature3D
-quadrature.cell.shape = tetrahedron
+quadrature.cell.dimension = 3
 
 # ----------------------------------------------------------------------
 # boundary conditions
@@ -76,7 +76,7 @@
 id = 20
 label = fault
 quadrature = pylith.feassemble.quadrature.Quadrature2Din3D
-quadrature.cell.shape = triangle
+quadrature.cell.dimension = 2
 mat_db.iohandler.filename = matprops.spatialdb
 
 [pylithapp.timedependent.interfaces.fault.eq_src.slip_function]

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/tet4/shearelasticisotropic.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/tet4/shearelasticisotropic.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/tet4/shearelasticisotropic.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -48,7 +48,7 @@
 id = 1
 db.iohandler.filename = matprops.spatialdb
 quadrature = pylith.feassemble.quadrature.Quadrature3D
-quadrature.cell.shape = tetrahedron
+quadrature.cell.dimension = 3
 
 # ----------------------------------------------------------------------
 # boundary conditions

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/tet10/axialdisp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/tet10/axialdisp.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/tet10/axialdisp.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -56,7 +56,7 @@
 id = 1
 db_properties.iohandler.filename = matprops.spatialdb
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = tetrahedron
+quadrature.cell.dimension = 3
 quadrature.cell.degree= 2
 
 [pylithapp.timedependent.materials.viscoelastic]
@@ -64,7 +64,7 @@
 id = 2
 db_properties.iohandler.filename = matprops.spatialdb
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = tetrahedron
+quadrature.cell.dimension = 3
 quadrature.cell.degree= 2
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/tet10/dislocation.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/tet10/dislocation.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/tet10/dislocation.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -57,7 +57,7 @@
 id = 1
 db_properties.iohandler.filename = matprops.spatialdb
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = tetrahedron
+quadrature.cell.dimension = 3
 quadrature.cell.degree= 2
 
 [pylithapp.timedependent.materials.viscoelastic]
@@ -65,7 +65,7 @@
 id = 2
 db_properties.iohandler.filename = matprops.spatialdb
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = tetrahedron
+quadrature.cell.dimension = 3
 quadrature.cell.degree = 2
 
 # ----------------------------------------------------------------------
@@ -97,7 +97,7 @@
 id = 100
 label = fault
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = triangle
+quadrature.cell.dimension = 2
 quadrature.cell.degree= 2
 
 [pylithapp.timedependent.interfaces.fault.eq_srcs.rupture.slip_function]

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/tet4/axialdisp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/tet4/axialdisp.cfg	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/tet4/axialdisp.cfg	2012-05-07 20:41:28 UTC (rev 20049)
@@ -56,14 +56,14 @@
 id = 1
 db_properties.iohandler.filename = matprops.spatialdb
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = tetrahedron
+quadrature.cell.dimension = 3
 
 [pylithapp.timedependent.materials.viscoelastic]
 label = Elastic material 2
 id = 2
 db_properties.iohandler.filename = matprops.spatialdb
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = tetrahedron
+quadrature.cell.dimension = 3
 
 # ----------------------------------------------------------------------
 # boundary conditions

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/Makefile.am	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/Makefile.am	2012-05-07 20:41:28 UTC (rev 20049)
@@ -57,6 +57,8 @@
 	TestFaultCohesiveDynQuad4.cc \
 	TestFaultCohesiveDynTet4.cc \
 	TestFaultCohesiveDynHex8.cc \
+	TestFaultCohesiveImpulses.cc \
+	TestFaultCohesiveImpulsesCases.cc \
 	test_faults.cc
 
 
@@ -90,7 +92,9 @@
 	TestFaultCohesiveDynTri3d.hh \
 	TestFaultCohesiveDynQuad4.hh \
 	TestFaultCohesiveDynTet4.hh \
-	TestFaultCohesiveDynHex8.hh 
+	TestFaultCohesiveDynHex8.hh \
+	TestFaultCohesiveImpulses.hh \
+	TestFaultCohesiveImpulsesCases.hh
 
 # Source files associated with testing data
 testfaults_SOURCES += \
@@ -153,7 +157,12 @@
 	data/CohesiveDynDataTri3d.cc \
 	data/CohesiveDynDataQuad4.cc \
 	data/CohesiveDynDataTet4.cc \
-	data/CohesiveDynDataHex8.cc
+	data/CohesiveDynDataHex8.cc \
+	data/CohesiveImpulsesData.cc \
+	data/CohesiveImpulsesDataTri3.cc \
+	data/CohesiveImpulsesDataQuad4.cc \
+	data/CohesiveImpulsesDataTet4.cc \
+	data/CohesiveImpulsesDataHex8.cc
 
 noinst_HEADERS += \
 	data/CohesiveData.hh \
@@ -215,7 +224,12 @@
 	data/CohesiveDynDataTri3d.hh \
 	data/CohesiveDynDataQuad4.hh \
 	data/CohesiveDynDataTet4.hh \
-	data/CohesiveDynDataHex8.hh 
+	data/CohesiveDynDataHex8.hh \
+	data/CohesiveImpulsesData.hh \
+	data/CohesiveImpulsesDataTri3.hh \
+	data/CohesiveImpulsesDataQuad4.hh \
+	data/CohesiveImpulsesDataTet4.hh \
+	data/CohesiveImpulsesDataHex8.hh
 
 AM_CPPFLAGS = \
 	$(PYTHON_EGG_CPPFLAGS) -I$(PYTHON_INCDIR) \

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestBruneSlipFn.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestBruneSlipFn.cc	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestBruneSlipFn.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -282,72 +282,6 @@
 } // testSlip
 
 // ----------------------------------------------------------------------
-// Test slipIncr().
-void
-pylith::faults::TestBruneSlipFn::testSlipIncr(void)
-{ // testSlipIncr
-  const PylithScalar finalSlipE[] = { 2.3, 0.1, 
-				0.0, 0.0};
-  const PylithScalar slipTimeE[] = { 1.2, 1.3 };
-  const PylithScalar riseTimeE[] = { 1.4, 1.5 };
-  const PylithScalar originTime = 1.064;
-
-  topology::Mesh mesh;
-  topology::SubMesh faultMesh;
-  BruneSlipFn slipfn;
-  _initialize(&mesh, &faultMesh, &slipfn, originTime);
-
-  const spatialdata::geocoords::CoordSys* cs = faultMesh.coordsys();
-  CPPUNIT_ASSERT(0 != cs);
-
-  const int spaceDim = cs->spaceDim();
-  const ALE::Obj<SieveSubMesh>& faultSieveMesh = faultMesh.sieveMesh();
-  CPPUNIT_ASSERT(!faultSieveMesh.isNull());
-  const ALE::Obj<SieveMesh::label_sequence>& vertices =
-    faultSieveMesh->depthStratum(0);
-  const SieveMesh::label_sequence::iterator verticesEnd = vertices->end();
-  topology::Field<topology::SubMesh> slip(faultMesh);
-  slip.newSection(vertices, spaceDim);
-  slip.allocate();
-
-  const PylithScalar t0 = 1.234;
-  const PylithScalar t1 = 3.635;
-  slipfn.slipIncr(&slip, originTime+t0, originTime+t1);
-
-  const PylithScalar tolerance = 1.0e-06;
-  int iPoint = 0;
-  const ALE::Obj<RealSection>& slipSection = slip.section();
-  CPPUNIT_ASSERT(!slipSection.isNull());
-  for (SieveMesh::label_sequence::iterator v_iter=vertices->begin();
-       v_iter != verticesEnd;
-       ++v_iter, ++iPoint) {
-    PylithScalar slipMag = 0.0;
-    for (int iDim=0; iDim < spaceDim; ++iDim)
-      slipMag += pow(finalSlipE[iPoint*spaceDim+iDim], 2);
-    slipMag = sqrt(slipMag);
-    const PylithScalar peakRate = slipMag / riseTimeE[iPoint] * 1.745;
-    const PylithScalar tau = 
-      (slipMag > 0.0) ? slipMag / (exp(1.0) * peakRate) : 1.0;
-    const PylithScalar tRef = slipTimeE[iPoint];
-    const PylithScalar slipNorm0 = 
-      (t0 > tRef) ? 1.0 - exp(-(t0-tRef)/tau) * (1.0 + (t0-tRef)/tau) : 0.0;
-    const PylithScalar slipNorm1 =
-      (t1 > tRef) ? 1.0 - exp(-(t1-tRef)/tau) * (1.0 + (t1-tRef)/tau) : 0.0;
-
-    const int fiberDim = slipSection->getFiberDimension(*v_iter);
-    CPPUNIT_ASSERT_EQUAL(spaceDim, fiberDim);
-    const PylithScalar* vals = slipSection->restrictPoint(*v_iter);
-    CPPUNIT_ASSERT(0 != vals);
-
-    for (int iDim=0; iDim < fiberDim; ++iDim) {
-      const PylithScalar slipE = 
-	finalSlipE[iPoint*spaceDim+iDim] * (slipNorm1-slipNorm0);
-      CPPUNIT_ASSERT_DOUBLES_EQUAL(slipE, vals[iDim], tolerance);
-    } // for
-  } // for
-} // testSlipIncr
-
-// ----------------------------------------------------------------------
 // Test _slip().
 void
 pylith::faults::TestBruneSlipFn::testSlipTH(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestBruneSlipFn.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestBruneSlipFn.hh	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestBruneSlipFn.hh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -58,7 +58,6 @@
   CPPUNIT_TEST( testInitialize2D );
   CPPUNIT_TEST( testInitialize3D );
   CPPUNIT_TEST( testSlip );
-  CPPUNIT_TEST( testSlipIncr );
   CPPUNIT_TEST( testSlipTH );
 
   CPPUNIT_TEST_SUITE_END();
@@ -90,9 +89,6 @@
   /// Test slip().
   void testSlip(void);
 
-  /// Test slipIncr().
-  void testSlipIncr(void);
-
   /// Test _slip().
   void testSlipTH(void);
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestConstRateSlipFn.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestConstRateSlipFn.cc	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestConstRateSlipFn.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -240,59 +240,6 @@
 } // testSlip
 
 // ----------------------------------------------------------------------
-// Test slipIncr().
-void
-pylith::faults::TestConstRateSlipFn::testSlipIncr(void)
-{ // testSlipIncr
-  const PylithScalar slipRateE[] = { 0.1, 0.2, 
-			       0.3, 0.4 };
-  const PylithScalar slipTimeE[] = { 1.2, 1.3 };
-  const PylithScalar originTime = 1.064;
-
-  topology::Mesh mesh;
-  topology::SubMesh faultMesh;
-  ConstRateSlipFn slipfn;
-  _initialize(&mesh, &faultMesh, &slipfn, originTime);
-
-  const spatialdata::geocoords::CoordSys* cs = faultMesh.coordsys();
-  CPPUNIT_ASSERT(0 != cs);
-
-  const int spaceDim = cs->spaceDim();
-  const ALE::Obj<SieveSubMesh>& faultSieveMesh = faultMesh.sieveMesh();
-  CPPUNIT_ASSERT(!faultSieveMesh.isNull());
-  const ALE::Obj<SieveMesh::label_sequence>& vertices =
-    faultSieveMesh->depthStratum(0);
-  const SieveMesh::label_sequence::iterator verticesEnd = vertices->end();
-  topology::Field<topology::SubMesh> slip(faultMesh);
-  slip.newSection(vertices, spaceDim);
-  slip.allocate();
-
-  const PylithScalar t0 = 1.234;
-  const PylithScalar t1 = 3.635;
-  slipfn.slipIncr(&slip, originTime+t0, originTime+t1);
-
-  const PylithScalar tolerance = 1.0e-06;
-  int iPoint = 0;
-  const ALE::Obj<RealSection>& slipSection = slip.section();
-  CPPUNIT_ASSERT(!slipSection.isNull());
-  for (SieveMesh::label_sequence::iterator v_iter=vertices->begin();
-       v_iter != verticesEnd;
-       ++v_iter, ++iPoint) {
-    const int fiberDim = slipSection->getFiberDimension(*v_iter);
-    CPPUNIT_ASSERT_EQUAL(spaceDim, fiberDim);
-    const PylithScalar* vals = slipSection->restrictPoint(*v_iter);
-    CPPUNIT_ASSERT(0 != vals);
-
-    for (int iDim=0; iDim < fiberDim; ++iDim) {
-      const PylithScalar tRef = (slipTimeE[iPoint] > t0) ? slipTimeE[iPoint] : t0;
-      const PylithScalar slipE = 
-	slipRateE[iPoint*spaceDim+iDim] * (t1 - tRef);
-      CPPUNIT_ASSERT_DOUBLES_EQUAL(slipE, vals[iDim], tolerance);
-    } // for
-  } // for
-} // testSlipIncr
-
-// ----------------------------------------------------------------------
 // Initialize ConstRateSlipFn.
 void
 pylith::faults::TestConstRateSlipFn::_initialize(topology::Mesh* mesh,

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestConstRateSlipFn.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestConstRateSlipFn.hh	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestConstRateSlipFn.hh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -57,7 +57,6 @@
   CPPUNIT_TEST( testInitialize2D );
   CPPUNIT_TEST( testInitialize3D );
   CPPUNIT_TEST( testSlip );
-  CPPUNIT_TEST( testSlipIncr );
 
   CPPUNIT_TEST_SUITE_END();
 
@@ -85,9 +84,6 @@
   /// Test slip().
   void testSlip(void);
 
-  /// Test slipIncr().
-  void testSlipIncr(void);
-
   // PRIVATE METHODS ////////////////////////////////////////////////////
 private :
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestEqKinSrc.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestEqKinSrc.cc	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestEqKinSrc.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -144,72 +144,6 @@
 } // testSlip
 
 // ----------------------------------------------------------------------
-// Test slipIncr().
-void
-pylith::faults::TestEqKinSrc::testSlipIncr(void)
-{ // testSlip
-  const PylithScalar finalSlipE[] = { 2.3, 0.1, 
-				2.4, 0.2};
-  const PylithScalar slipTimeE[] = { 1.2, 1.3 };
-  const PylithScalar riseTimeE[] = { 1.4, 1.5 };
-  const PylithScalar originTime = -4.29;
-
-  topology::Mesh mesh;
-  topology::SubMesh faultMesh;
-  EqKinSrc eqsrc;
-  BruneSlipFn slipfn;
-  _initialize(&mesh, &faultMesh, &eqsrc, &slipfn, originTime);
-  
-  const spatialdata::geocoords::CoordSys* cs = faultMesh.coordsys();
-  CPPUNIT_ASSERT(0 != cs);
-
-  const int spaceDim = cs->spaceDim();
-  const ALE::Obj<SieveSubMesh>& faultSieveMesh = faultMesh.sieveMesh();
-  CPPUNIT_ASSERT(!faultSieveMesh.isNull());
-  const ALE::Obj<SieveMesh::label_sequence>& vertices =
-    faultSieveMesh->depthStratum(0);
-  const SieveMesh::label_sequence::iterator verticesEnd = vertices->end();
-  topology::Field<topology::SubMesh> slip(faultMesh);
-  slip.newSection(vertices, spaceDim);
-  slip.allocate();
-
-  const PylithScalar t0 = 1.234;
-  const PylithScalar t1 = 2.525;
-  eqsrc.slipIncr(&slip, originTime+t0, originTime+t1);
-
-  const PylithScalar tolerance = 1.0e-06;
-  int iPoint = 0;
-  const ALE::Obj<RealSection>& slipSection = slip.section();
-  CPPUNIT_ASSERT(!slipSection.isNull());
-  for (SieveMesh::label_sequence::iterator v_iter=vertices->begin();
-       v_iter != verticesEnd;
-       ++v_iter, ++iPoint) {
-    PylithScalar slipMag = 0.0;
-    for (int iDim=0; iDim < spaceDim; ++iDim)
-      slipMag += pow(finalSlipE[iPoint*spaceDim+iDim], 2);
-    slipMag = sqrt(slipMag);
-    const PylithScalar peakRate = slipMag / riseTimeE[iPoint] * 1.745;
-    const PylithScalar tau = slipMag / (exp(1.0) * peakRate);
-    const PylithScalar tRef = slipTimeE[iPoint];
-    const PylithScalar slipNorm0 = 
-      (t0 > tRef) ? 1.0 - exp(-(t0-tRef)/tau) * (1.0 + (t0-tRef)/tau) : 0.0;
-    const PylithScalar slipNorm1 =
-      (t1 > tRef) ? 1.0 - exp(-(t1-tRef)/tau) * (1.0 + (t1-tRef)/tau) : 0.0;
-    
-    const int fiberDim = slipSection->getFiberDimension(*v_iter);
-    CPPUNIT_ASSERT_EQUAL(spaceDim, fiberDim);
-    const PylithScalar* vals = slipSection->restrictPoint(*v_iter);
-    CPPUNIT_ASSERT(0 != vals);
-
-    for (int iDim=0; iDim < fiberDim; ++iDim) {
-      const PylithScalar slipE = 
-	finalSlipE[iPoint*spaceDim+iDim] * (slipNorm1 - slipNorm0);
-      CPPUNIT_ASSERT_DOUBLES_EQUAL(slipE, vals[iDim], tolerance);
-    } // for
-  } // for
-} // testSlipIncr
-
-// ----------------------------------------------------------------------
 // Initialize EqKinSrc.
 void
 pylith::faults::TestEqKinSrc::_initialize(topology::Mesh* mesh,

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestEqKinSrc.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestEqKinSrc.hh	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestEqKinSrc.hh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -50,7 +50,6 @@
   CPPUNIT_TEST( testSlipFn );
   CPPUNIT_TEST( testInitialize );
   CPPUNIT_TEST( testSlip );
-  CPPUNIT_TEST( testSlipIncr );
 
   CPPUNIT_TEST_SUITE_END();
 
@@ -71,10 +70,6 @@
   /// slip().
   void testSlip(void);
 
-  /// Test slipIncr(). Use 2-D mesh with Brune slip function to test
-  /// slip().
-  void testSlipIncr(void);
-
   // PRIVATE METHODS ////////////////////////////////////////////////////
 private :
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveDyn.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveDyn.cc	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveDyn.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -24,8 +24,6 @@
 
 #include "data/CohesiveDynData.hh" // USES CohesiveDynData
 
-#include "pylith/faults/EqKinSrc.hh" // USES EqKinSrc
-#include "pylith/faults/BruneSlipFn.hh" // USES BruneSlipFn
 #include "pylith/topology/Mesh.hh" // USES Mesh
 #include "pylith/topology/SubMesh.hh" // USES SubMesh
 #include "pylith/feassemble/Quadrature.hh" // USES Quadrature
@@ -112,6 +110,20 @@
  } // zeroTolerance
 
 // ----------------------------------------------------------------------
+// Test openFreeSurf().
+void
+pylith::faults::TestFaultCohesiveDyn::testOpenFreeSurf(void)
+{ // testOpenFreeSurf
+  FaultCohesiveDyn fault;
+
+  CPPUNIT_ASSERT_EQUAL(true, fault._openFreeSurf); // default
+
+  const bool value = false;
+  fault.openFreeSurf(value);
+  CPPUNIT_ASSERT_EQUAL(value, fault._openFreeSurf);
+ } // testOpenFreeSurf
+
+// ----------------------------------------------------------------------
 // Test initialize().
 void
 pylith::faults::TestFaultCohesiveDyn::testInitialize(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveDyn.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveDyn.hh	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveDyn.hh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -54,6 +54,7 @@
   CPPUNIT_TEST( testConstructor );
   CPPUNIT_TEST( testDBInitialTract );
   CPPUNIT_TEST( testZeroTolerance );
+  CPPUNIT_TEST( testOpenFreeSurf );
 
   // Tests in derived classes:
   // testInitialize()
@@ -93,6 +94,9 @@
   /// Test zeroTolerance().
   void testZeroTolerance(void);
 
+  /// Test openFreeSurf().
+  void testOpenFreeSurf(void);
+
   /// Test initialize().
   void testInitialize(void);
 

Copied: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveImpulses.cc (from rev 20048, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/TestFaultCohesiveImpulses.cc)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveImpulses.cc	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveImpulses.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -0,0 +1,390 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010-2012 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TestFaultCohesiveImpulses.hh" // Implementation of class methods
+
+#include "pylith/faults/FaultCohesiveImpulses.hh" // USES FaultCohesiveImpulses
+
+#include "data/CohesiveImpulsesData.hh" // USES CohesiveImpulsesData
+
+#include "pylith/topology/Mesh.hh" // USES Mesh
+#include "pylith/topology/SubMesh.hh" // USES SubMesh
+#include "pylith/feassemble/Quadrature.hh" // USES Quadrature
+#include "pylith/topology/SolutionFields.hh" // USES SolutionFields
+#include "pylith/topology/Jacobian.hh" // USES Jacobian
+#include "pylith/meshio/MeshIOAscii.hh" // USES MeshIOAscii
+
+#include "spatialdata/geocoords/CSCart.hh" // USES CSCart
+#include "spatialdata/spatialdb/SimpleDB.hh" // USES SimpleDB
+#include "spatialdata/spatialdb/SimpleIOAscii.hh" // USES SimpleIOAscii
+
+#include <stdexcept> // USES runtime_error
+
+// ----------------------------------------------------------------------
+CPPUNIT_TEST_SUITE_REGISTRATION( pylith::faults::TestFaultCohesiveImpulses );
+
+// ----------------------------------------------------------------------
+typedef pylith::topology::Mesh::SieveMesh SieveMesh;
+typedef pylith::topology::Mesh::RealSection RealSection;
+typedef pylith::topology::SubMesh::SieveMesh SieveSubMesh;
+
+// ----------------------------------------------------------------------
+// Setup testing data.
+void
+pylith::faults::TestFaultCohesiveImpulses::setUp(void)
+{ // setUp
+  _data = 0;
+  _quadrature = new feassemble::Quadrature<topology::SubMesh>();
+  CPPUNIT_ASSERT(0 != _quadrature);
+  _dbImpulseAmp = 0;
+  _flipFault = false;
+} // setUp
+
+// ----------------------------------------------------------------------
+// Tear down testing data.
+void
+pylith::faults::TestFaultCohesiveImpulses::tearDown(void)
+{ // tearDown
+  delete _data; _data = 0;
+  delete _quadrature; _quadrature = 0;
+  delete _dbImpulseAmp; _dbImpulseAmp = 0;
+} // tearDown
+
+// ----------------------------------------------------------------------
+// Test constructor.
+void
+pylith::faults::TestFaultCohesiveImpulses::testConstructor(void)
+{ // testConstructor
+  FaultCohesiveImpulses fault;
+} // testConstructor
+
+// ----------------------------------------------------------------------
+// Test dbImpulseAmp().
+void
+pylith::faults::TestFaultCohesiveImpulses::testDBImpulseAmp(void)
+{ // testDBImpulseAmp
+  FaultCohesiveImpulses fault;
+
+  const std::string& label = "test database";
+  spatialdata::spatialdb::SimpleDB db;
+  db.label(label.c_str());
+  fault.dbImpulseAmp(&db);
+  CPPUNIT_ASSERT(fault._dbImpulseAmp);
+  CPPUNIT_ASSERT_EQUAL(label, std::string(fault._dbImpulseAmp->label()));
+ } // testDBImpulseAmp
+
+// ----------------------------------------------------------------------
+// Test threshold().
+void
+pylith::faults::TestFaultCohesiveImpulses::testThreshold(void)
+{ // testThreshold
+  FaultCohesiveImpulses fault;
+
+  CPPUNIT_ASSERT_EQUAL(PylithScalar(1.0e-6), fault._threshold); // default
+
+  const PylithScalar value = 1.0e-20;
+  fault.threshold(value);
+  CPPUNIT_ASSERT_EQUAL(value, fault._threshold);
+ } // testThreshold
+
+// ----------------------------------------------------------------------
+// Test impulseDOF().
+void
+pylith::faults::TestFaultCohesiveImpulses::testImpulseDOF(void)
+{ // testImpulseDOF
+  FaultCohesiveImpulses fault;
+
+  const int ncomps = 2;
+  const int dof[ncomps] = { 0, 2 };
+  fault.impulseDOF(dof, ncomps);
+
+  CPPUNIT_ASSERT_EQUAL(ncomps, fault.numComponents());
+  CPPUNIT_ASSERT_EQUAL(ncomps, int(fault._impulseDOF.size()));
+  for (int i=0; i < ncomps; ++i) {
+    CPPUNIT_ASSERT_EQUAL(dof[i], fault._impulseDOF[i]);
+  } // for
+ } // testImpulseDOF
+
+// ----------------------------------------------------------------------
+// Test numImpulses().
+void
+pylith::faults::TestFaultCohesiveImpulses::testNumImpulses(void)
+{ // testNumImpulses
+  CPPUNIT_ASSERT(_data);
+
+  topology::Mesh mesh;
+  FaultCohesiveImpulses fault;
+  topology::SolutionFields fields(mesh);
+  _initialize(&mesh, &fault, &fields);
+
+  const int ncomps = 2;
+  const int dof[ncomps] = { 0, 2 };
+  fault.impulseDOF(dof, ncomps);
+
+  CPPUNIT_ASSERT_EQUAL(_data->numImpulses, fault.numImpulses());
+ } // testNumImpulses
+
+// ----------------------------------------------------------------------
+// Test initialize().
+void
+pylith::faults::TestFaultCohesiveImpulses::testInitialize(void)
+{ // testInitialize
+  CPPUNIT_ASSERT(_data);
+
+  topology::Mesh mesh;
+  FaultCohesiveImpulses fault;
+  topology::SolutionFields fields(mesh);
+  _initialize(&mesh, &fault, &fields);
+
+  const ALE::Obj<SieveSubMesh>& faultSieveMesh = fault._faultMesh->sieveMesh();
+  CPPUNIT_ASSERT(!faultSieveMesh.isNull());
+  SieveSubMesh::renumbering_type& renumbering = 
+    faultSieveMesh->getRenumbering();
+  const ALE::Obj<SieveSubMesh::label_sequence>& vertices = 
+    faultSieveMesh->depthStratum(0);
+  CPPUNIT_ASSERT(!vertices.isNull());
+  const SieveSubMesh::label_sequence::iterator verticesBegin = vertices->begin();
+  const SieveSubMesh::label_sequence::iterator verticesEnd = vertices->end();
+  int iVertex = 0;
+  for (SieveSubMesh::label_sequence::iterator v_iter=verticesBegin;
+       v_iter != verticesEnd;
+       ++v_iter, ++iVertex) {
+    CPPUNIT_ASSERT(renumbering.find(_data->constraintVertices[iVertex]) !=
+		   renumbering.end());
+    CPPUNIT_ASSERT_EQUAL(renumbering[_data->constraintVertices[iVertex]],
+			 *v_iter);
+  } // for
+  CPPUNIT_ASSERT_EQUAL(_data->numConstraintVert, iVertex);
+
+  // Check orientation
+  //fault._fields->get("orientation").view("ORIENTATION"); // DEBUGGING
+
+  const ALE::Obj<RealSection>& orientationSection = 
+    fault._fields->get("orientation").section();
+  CPPUNIT_ASSERT(!orientationSection.isNull());
+  const int spaceDim = _data->spaceDim;
+  const int orientationSize = spaceDim*spaceDim;
+  iVertex = 0;
+  for (SieveSubMesh::label_sequence::iterator v_iter=verticesBegin;
+       v_iter != verticesEnd;
+       ++v_iter, ++iVertex) {
+    const int fiberDim = orientationSection->getFiberDimension(*v_iter);
+    CPPUNIT_ASSERT_EQUAL(orientationSize, fiberDim);
+    const PylithScalar* orientationVertex =
+      orientationSection->restrictPoint(*v_iter);
+    CPPUNIT_ASSERT(0 != orientationVertex);
+
+    const PylithScalar tolerance = 1.0e-06;
+    for (int i=0; i < orientationSize; ++i) {
+      const int index = iVertex*orientationSize+i;
+      CPPUNIT_ASSERT_DOUBLES_EQUAL(_data->orientation[index],
+				   orientationVertex[i], tolerance);
+    } // for
+  } // for
+
+  // Initial tractions
+  if (fault._dbImpulseAmp) {
+    //fault._fields->get("initial traction").view("INITIAL TRACTIONS"); // DEBUGGING
+    const ALE::Obj<RealSection>& amplitudeSection = 
+      fault._fields->get("impulse amplitude").section();
+    CPPUNIT_ASSERT(!amplitudeSection.isNull());
+    const int spaceDim = _data->spaceDim;
+    iVertex = 0;
+    for (SieveSubMesh::label_sequence::iterator v_iter = verticesBegin;
+        v_iter != verticesEnd;
+        ++v_iter, ++iVertex) {
+      const int fiberDim = amplitudeSection->getFiberDimension(*v_iter);
+      CPPUNIT_ASSERT_EQUAL(1, fiberDim);
+      const PylithScalar* amplitudeVertex = amplitudeSection->restrictPoint(*v_iter);
+      CPPUNIT_ASSERT(amplitudeVertex);
+
+      const PylithScalar tolerance = 1.0e-06;
+      CPPUNIT_ASSERT_DOUBLES_EQUAL(_data->amplitude[iVertex], amplitudeVertex[0], tolerance);
+    } // for
+  } // if
+} // testInitialize
+
+// ----------------------------------------------------------------------
+// Test integrateResidual().
+void
+pylith::faults::TestFaultCohesiveImpulses::testIntegrateResidual(void)
+{ // testIntegrateResidual
+  CPPUNIT_ASSERT(_data);
+  CPPUNIT_ASSERT(_data->fieldT);
+  CPPUNIT_ASSERT(_data->residualIncr);
+
+  topology::Mesh mesh;
+  FaultCohesiveImpulses fault;
+  topology::SolutionFields fields(mesh);
+  _initialize(&mesh, &fault, &fields);
+
+  const int spaceDim = _data->spaceDim;
+  topology::Field<topology::Mesh>& residual = fields.get("residual");
+  const ALE::Obj<RealSection>& residualSection = residual.section();
+  CPPUNIT_ASSERT(!residualSection.isNull());
+
+  const ALE::Obj<RealSection>& dispSection = fields.get("disp(t)").section();
+  CPPUNIT_ASSERT(!dispSection.isNull());
+
+  const ALE::Obj<SieveMesh>& sieveMesh = mesh.sieveMesh();
+  CPPUNIT_ASSERT(!sieveMesh.isNull());
+  const ALE::Obj<SieveMesh::label_sequence>& vertices = sieveMesh->depthStratum(0);
+  CPPUNIT_ASSERT(!vertices.isNull());
+  const SieveMesh::label_sequence::iterator verticesBegin = vertices->begin();
+  const SieveMesh::label_sequence::iterator verticesEnd = vertices->end();
+  int iVertex = 0;
+  for (SieveMesh::label_sequence::iterator v_iter=verticesBegin;
+       v_iter != verticesEnd;
+       ++v_iter, ++iVertex)
+    dispSection->updatePoint(*v_iter, &_data->fieldT[iVertex*spaceDim]);
+  
+  const PylithScalar t = 1.0;
+  const PylithScalar dt = 1.0;
+  fault.timeStep(dt);
+
+  residual.zero();
+  { // Integrate residual with disp increment.
+    fault.integrateResidual(residual, t, &fields);
+
+    //residual.view("RESIDUAL"); // DEBUGGING
+
+    // Check values
+    const PylithScalar* valsE = _data->residualIncr;
+    iVertex = 0;
+    const int fiberDimE = spaceDim;
+    const PylithScalar tolerance = (sizeof(double) == sizeof(PylithScalar)) ? 1.0e-06 : 1.0e-05;
+    for (SieveMesh::label_sequence::iterator v_iter=verticesBegin;
+	 v_iter != verticesEnd;
+	 ++v_iter, ++iVertex) {
+      const int fiberDim = residualSection->getFiberDimension(*v_iter);
+      CPPUNIT_ASSERT_EQUAL(fiberDimE, fiberDim);
+      const PylithScalar* vals = residualSection->restrictPoint(*v_iter);
+      CPPUNIT_ASSERT(0 != vals);
+      
+      for (int i = 0; i < fiberDimE; ++i) {
+        const int index = iVertex * spaceDim + i;
+        const PylithScalar valE = valsE[index];
+        if (fabs(valE) > tolerance)
+          CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, vals[i]/valE, tolerance);
+        else
+          CPPUNIT_ASSERT_DOUBLES_EQUAL(valE, vals[i], tolerance);
+      } // for
+    } // for
+  } // Integrate residual with disp increment.
+} // testIntegrateResidual
+
+// ----------------------------------------------------------------------
+// Initialize FaultCohesiveImpulses interface condition.
+void
+pylith::faults::TestFaultCohesiveImpulses::_initialize(
+					topology::Mesh* const mesh,
+					FaultCohesiveImpulses* const fault,
+					topology::SolutionFields* const fields)
+{ // _initialize
+  CPPUNIT_ASSERT(mesh);
+  CPPUNIT_ASSERT(fault);
+  CPPUNIT_ASSERT(fields);
+  CPPUNIT_ASSERT(_data);
+  CPPUNIT_ASSERT(_quadrature);
+
+  meshio::MeshIOAscii iohandler;
+  iohandler.filename(_data->meshFilename);
+  iohandler.read(mesh);
+  
+  //mesh->debug(true); // DEBUGGING
+  
+  _quadrature->initialize(_data->basis, _data->numQuadPts, _data->numBasis,
+			  _data->basisDeriv,
+			  _data->numQuadPts, _data->numBasis, _data->cellDim,
+			  _data->quadPts, _data->numQuadPts, _data->cellDim,
+			  _data->quadWts, _data->numQuadPts,
+			  _data->spaceDim);
+  
+  // Setup impulse amplitude
+  spatialdata::spatialdb::SimpleDB* db =
+      new spatialdata::spatialdb::SimpleDB("impulse amplitude");
+  CPPUNIT_ASSERT(db);
+  spatialdata::spatialdb::SimpleIOAscii ioImpulseAmp;
+  ioImpulseAmp.filename(_data->impulseAmpFilename);
+  db->ioHandler(&ioImpulseAmp);
+  delete _dbImpulseAmp; _dbImpulseAmp = db;
+  fault->dbImpulseAmp(db);
+
+  CPPUNIT_ASSERT(_data->impulseDOF);
+  fault->impulseDOF(_data->impulseDOF, _data->numComponents);
+
+  int firstFaultVertex    = 0;
+  int firstLagrangeVertex = mesh->sieveMesh()->getIntSection(_data->label)->size();
+  int firstFaultCell      = mesh->sieveMesh()->getIntSection(_data->label)->size();
+  if (fault->useLagrangeConstraints())
+    firstFaultCell += mesh->sieveMesh()->getIntSection(_data->label)->size();
+  fault->id(_data->id);
+  fault->label(_data->label);
+  fault->quadrature(_quadrature);
+  
+  fault->adjustTopology(mesh, &firstFaultVertex, &firstLagrangeVertex,
+			&firstFaultCell, _flipFault);
+  
+  spatialdata::geocoords::CSCart cs;
+  spatialdata::units::Nondimensional normalizer;
+  cs.setSpaceDim(mesh->dimension());
+  cs.initialize();
+  mesh->coordsys(&cs);
+  mesh->nondimensionalize(normalizer);
+  
+  const PylithScalar upDir[3] = { 0.0, 0.0, 1.0 };
+  
+  fault->initialize(*mesh, upDir);
+  
+  // Setup fields
+  fields->add("disp(t)", "displacement");
+  fields->add("dispIncr(t->t+dt)", "displacement_increment");
+  fields->add("velocity(t)", "velocity");
+  fields->add("residual", "residual");
+  fields->solutionName("dispIncr(t->t+dt)");
+  
+  const int spaceDim = _data->spaceDim;
+  topology::Field<topology::Mesh>& disp = fields->get("disp(t)");
+  disp.newSection(topology::FieldBase::VERTICES_FIELD, spaceDim);
+  disp.allocate();
+  fields->copyLayout("disp(t)");
+
+  fault->verifyConfiguration(*mesh);
+} // _initialize
+
+// ----------------------------------------------------------------------
+// Determine if vertex is a Lagrange multiplier constraint vertex.
+bool
+pylith::faults::TestFaultCohesiveImpulses::_isConstraintVertex(const int vertex) const
+{ // _isConstraintVertex
+  assert(0 != _data);
+
+  const int numConstraintVert = _data->numConstraintVert;
+  bool isFound = false;
+  for (int i=0; i < _data->numConstraintVert; ++i)
+    if (_data->constraintVertices[i] == vertex) {
+      isFound = true;
+      break;
+    } // if
+  return isFound;
+} // _isConstraintVertex
+
+
+// End of file 

Copied: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveImpulses.hh (from rev 20048, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/TestFaultCohesiveImpulses.hh)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveImpulses.hh	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveImpulses.hh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -0,0 +1,129 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010-2012 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ----------------------------------------------------------------------
+//
+
+/**
+ * @file unittests/libtests/faults/TestFaultCohesiveImpulses.hh
+ *
+ * @brief C++ TestFaultCohesiveImpulses object
+ *
+ * C++ unit testing for FaultCohesiveImpulses.
+ */
+
+#if !defined(pylith_faults_testfaultcohesiveimpulses_hh)
+#define pylith_faults_testfaultcohesiveimpulses_hh
+
+#include <cppunit/extensions/HelperMacros.h>
+
+#include "pylith/faults/faultsfwd.hh" // forward declarations
+#include "pylith/topology/topologyfwd.hh" // USES Mesh, SubMesh
+#include "pylith/feassemble/feassemblefwd.hh" // HOLDSA Quadrature
+#include "pylith/friction/frictionfwd.hh" // HOLDSA FrictionModel
+#include "spatialdata/spatialdb/spatialdbfwd.hh" // HOLDSA SpatialDB
+#include <vector> // HASA std::vector
+/// Namespace for pylith package
+namespace pylith {
+  namespace faults {
+    class TestFaultCohesiveImpulses;
+
+    class CohesiveImpulsesData;
+  } // faults
+} // pylith
+
+/// C++ unit testing for FaultCohesiveImpulses
+class pylith::faults::TestFaultCohesiveImpulses: public CppUnit::TestFixture
+{ // class TestFaultCohesiveImpulses
+
+  // CPPUNIT TEST SUITE /////////////////////////////////////////////////
+  CPPUNIT_TEST_SUITE( TestFaultCohesiveImpulses );
+
+  CPPUNIT_TEST( testConstructor );
+  CPPUNIT_TEST( testDBImpulseAmp );
+  CPPUNIT_TEST( testThreshold );
+  CPPUNIT_TEST( testImpulseDOF );
+
+  // Tests in derived classes:
+  // testNumImpulses()
+  // testInitialize()
+  // testIntegrateResidual()
+
+  CPPUNIT_TEST_SUITE_END();
+
+  // PROTECTED MEMBERS //////////////////////////////////////////////////
+protected:
+
+  CohesiveImpulsesData* _data; ///< Data for testing
+  feassemble::Quadrature<topology::SubMesh>* _quadrature; ///< Fault quad.
+  spatialdata::spatialdb::SpatialDB* _dbImpulseAmp; ///< Initial tractions.
+  bool _flipFault; ///< If true, flip fault orientation.
+
+  // PUBLIC METHODS /////////////////////////////////////////////////////
+public:
+
+  /// Setup testing data.
+  void setUp(void);
+
+  /// Tear down testing data.
+  void tearDown(void);
+
+  /// Test constructor.
+  void testConstructor(void);
+
+  /// Test dbInitialTract().
+  void testDBImpulseAmp(void);
+
+  /// Test threshold().
+  void testThreshold(void);
+
+  /// Test impulseDOF().
+  void testImpulseDOF(void);
+
+  /// Test numImpulses().
+  void testNumImpulses(void);
+
+  /// Test initialize().
+  void testInitialize(void);
+
+  /// Test integrateResidual().
+  void testIntegrateResidual(void);
+
+  // PRIVATE METHODS ////////////////////////////////////////////////////
+private:
+
+  /** Initialize FaultCohesiveImpulses interface condition.
+   *
+   * @param mesh PETSc mesh to initialize
+   * @param fault Cohesive fault interface condition to initialize.
+   * @param fields Solution fields.
+   */
+  void _initialize(topology::Mesh* const mesh,
+		   FaultCohesiveImpulses* const fault,
+		   topology::SolutionFields* const fields);
+
+  /** Determine if vertex is a Lagrange multiplier constraint vertex.
+   *
+   * @param vertex Label of vertex.
+   *
+   * @returns True if vertex is a constraint vertex, false otherwise.
+   */
+  bool _isConstraintVertex(const int vertex) const;
+
+}; // class TestFaultCohesiveImpulses
+
+#endif // pylith_faults_testfaultcohesiveimpulses_hh
+
+// End of file 

Copied: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveImpulsesCases.cc (from rev 20048, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/TestFaultCohesiveImpulsesCases.cc)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveImpulsesCases.cc	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveImpulsesCases.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -0,0 +1,102 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010-2012 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ----------------------------------------------------------------------
+//
+
+#include <portinfo>
+
+#include "TestFaultCohesiveImpulsesCases.hh" // Implementation of class methods
+
+#include "data/CohesiveImpulsesDataTri3.hh"
+#include "data/CohesiveImpulsesDataQuad4.hh"
+#include "data/CohesiveImpulsesDataTet4.hh"
+#include "data/CohesiveImpulsesDataHex8.hh"
+
+#include "pylith/topology/SubMesh.hh" // USES SubMesh
+#include "pylith/feassemble/Quadrature.hh" // USES Quadrature<SubMesh>
+#include "pylith/feassemble/GeometryLine2D.hh" // USES GeometryLine2D
+#include "pylith/feassemble/GeometryTri3D.hh" // USES GeometryTri3D
+#include "pylith/feassemble/GeometryQuad3D.hh" // USES GeometryQuad3D
+
+
+// ----------------------------------------------------------------------
+CPPUNIT_TEST_SUITE_REGISTRATION( pylith::faults::TestFaultCohesiveImpulsesTri3 );
+CPPUNIT_TEST_SUITE_REGISTRATION( pylith::faults::TestFaultCohesiveImpulsesQuad4 );
+CPPUNIT_TEST_SUITE_REGISTRATION( pylith::faults::TestFaultCohesiveImpulsesTet4 );
+CPPUNIT_TEST_SUITE_REGISTRATION( pylith::faults::TestFaultCohesiveImpulsesHex8 );
+
+
+// ----------------------------------------------------------------------
+// Setup testing data.
+void
+pylith::faults::TestFaultCohesiveImpulsesTri3::setUp(void)
+{ // setUp
+  TestFaultCohesiveImpulses::setUp();
+  _data = new CohesiveImpulsesDataTri3;
+
+  CPPUNIT_ASSERT(_quadrature);
+  feassemble::GeometryLine2D geometry;
+  _quadrature->refGeometry(&geometry); 
+
+  _flipFault = true;
+} // setUp
+
+
+// ----------------------------------------------------------------------
+// Setup testing data.
+void
+pylith::faults::TestFaultCohesiveImpulsesQuad4::setUp(void)
+{ // setUp
+  TestFaultCohesiveImpulses::setUp();
+  _data = new CohesiveImpulsesDataQuad4;
+
+  CPPUNIT_ASSERT(_quadrature);
+  feassemble::GeometryLine2D geometry;
+  _quadrature->refGeometry(&geometry); 
+} // setUp
+
+
+// ----------------------------------------------------------------------
+// Setup testing data.
+void
+pylith::faults::TestFaultCohesiveImpulsesTet4::setUp(void)
+{ // setUp
+  TestFaultCohesiveImpulses::setUp();
+  _data = new CohesiveImpulsesDataTet4;
+
+  CPPUNIT_ASSERT(_quadrature);
+  feassemble::GeometryTri3D geometry;
+  _quadrature->refGeometry(&geometry); 
+} // setUp
+
+
+// ----------------------------------------------------------------------
+// Setup testing data.
+void
+pylith::faults::TestFaultCohesiveImpulsesHex8::setUp(void)
+{ // setUp
+  TestFaultCohesiveImpulses::setUp();
+  _data = new CohesiveImpulsesDataHex8;
+
+  CPPUNIT_ASSERT(_quadrature);
+  feassemble::GeometryQuad3D geometry;
+  _quadrature->refGeometry(&geometry); 
+
+  _flipFault = true;
+} // setUp
+
+
+// End of file 

Copied: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveImpulsesCases.hh (from rev 20048, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/TestFaultCohesiveImpulsesCases.hh)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveImpulsesCases.hh	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveImpulsesCases.hh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -0,0 +1,138 @@
+// -*- C++ -*-
+//
+// ----------------------------------------------------------------------
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010-2012 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ----------------------------------------------------------------------
+//
+
+/**
+ * @file unittests/libtests/faults/TestFaultCohesiveImpulsesCases.hh
+ *
+ * @brief C++ unit testing for FaultCohesiveImpulses with various cell
+ * types.
+ */
+
+#if !defined(pylith_faults_testfaultcohesiveimpulsescases_hh)
+#define pylith_faults_testfaultcohesiveimpulsescases_hh
+
+#include "TestFaultCohesiveImpulses.hh"
+
+/// Namespace for pylith package
+namespace pylith {
+  namespace faults {
+    class TestFaultCohesiveImpulsesTri3;
+    class TestFaultCohesiveImpulsesQuad4;
+    class TestFaultCohesiveImpulsesTet4;
+    class TestFaultCohesiveImpulsesHex8;
+  } // faults
+} // pylith
+
+
+// ----------------------------------------------------------------------
+/// C++ unit testing for FaultCohesiveImpulses with tri3 cells
+class pylith::faults::TestFaultCohesiveImpulsesTri3 : public TestFaultCohesiveImpulses
+{ // class TestFaultCohesiveImpulsesTri3
+
+  // CPPUNIT TEST SUITE /////////////////////////////////////////////////
+  CPPUNIT_TEST_SUITE( TestFaultCohesiveImpulsesTri3 );
+
+  CPPUNIT_TEST( testNumImpulses );
+  CPPUNIT_TEST( testInitialize );
+  CPPUNIT_TEST( testIntegrateResidual );
+
+  CPPUNIT_TEST_SUITE_END();
+
+  // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+  /// Setup testing data.
+  void setUp(void);
+
+}; // class TestFaultCohesiveImpulsesTri3
+
+
+// ----------------------------------------------------------------------
+/// C++ unit testing for FaultCohesiveImpulses with Quad4 cells
+class pylith::faults::TestFaultCohesiveImpulsesQuad4 : public TestFaultCohesiveImpulses
+{ // class TestFaultCohesiveImpulsesQuad4
+
+  // CPPUNIT TEST SUITE /////////////////////////////////////////////////
+  CPPUNIT_TEST_SUITE( TestFaultCohesiveImpulsesQuad4 );
+
+  CPPUNIT_TEST( testNumImpulses );
+  CPPUNIT_TEST( testInitialize );
+  CPPUNIT_TEST( testIntegrateResidual );
+
+  CPPUNIT_TEST_SUITE_END();
+
+  // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+  /// Setup testing data.
+  void setUp(void);
+
+}; // class TestFaultCohesiveImpulsesQuad4
+
+
+// ----------------------------------------------------------------------
+/// C++ unit testing for FaultCohesiveImpulses with Tet4 cells
+class pylith::faults::TestFaultCohesiveImpulsesTet4 : public TestFaultCohesiveImpulses
+{ // class TestFaultCohesiveImpulsesTet4
+
+  // CPPUNIT TEST SUITE /////////////////////////////////////////////////
+  CPPUNIT_TEST_SUITE( TestFaultCohesiveImpulsesTet4 );
+
+  CPPUNIT_TEST( testNumImpulses );
+  CPPUNIT_TEST( testInitialize );
+  CPPUNIT_TEST( testIntegrateResidual );
+
+  CPPUNIT_TEST_SUITE_END();
+
+  // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+  /// Setup testing data.
+  void setUp(void);
+
+}; // class TestFaultCohesiveImpulsesTet4
+
+
+// ----------------------------------------------------------------------
+/// C++ unit testing for FaultCohesiveImpulses with Hex8 cells
+class pylith::faults::TestFaultCohesiveImpulsesHex8 : public TestFaultCohesiveImpulses
+{ // class TestFaultCohesiveImpulsesHex8
+
+  // CPPUNIT TEST SUITE /////////////////////////////////////////////////
+  CPPUNIT_TEST_SUITE( TestFaultCohesiveImpulsesHex8 );
+
+  CPPUNIT_TEST( testNumImpulses );
+  CPPUNIT_TEST( testInitialize );
+  CPPUNIT_TEST( testIntegrateResidual );
+
+  CPPUNIT_TEST_SUITE_END();
+
+  // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+  /// Setup testing data.
+  void setUp(void);
+
+}; // class TestFaultCohesiveImpulsesHex8
+
+
+
+#endif // pylith_faults_testfaultcohesiveimpulsescases_hh
+
+
+// End of file 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveKin.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveKin.cc	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveKin.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -904,8 +904,8 @@
 // ----------------------------------------------------------------------
 // Determine if vertex is a Lagrange multiplier constraint vertex.
 bool
-pylith::faults::TestFaultCohesiveKin::_isLagrangeVertex(const int vertex) const
-{ // _isLagrangeVertex
+pylith::faults::TestFaultCohesiveKin::_isConstraintVertex(const int vertex) const
+{ // _isConstraintVertex
   CPPUNIT_ASSERT(_data);
 
   const int numFaultVertices = _data->numFaultVertices;
@@ -916,7 +916,7 @@
       break;
     } // if
   return isFound;
-} // _isLagrangeVertex
+} // _isConstraintVertex
 
 
 // End of file 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveKin.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveKin.hh	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveKin.hh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -132,7 +132,7 @@
    *
    * @returns True if vertex is a constraint vertex, false otherwise.
    */
-  bool _isLagrangeVertex(const int vertex) const;
+  bool _isConstraintVertex(const int vertex) const;
   
 
 }; // class TestFaultCohesiveKin

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestLiuCosSlipFn.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestLiuCosSlipFn.cc	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestLiuCosSlipFn.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -282,71 +282,6 @@
 } // testSlip
 
 // ----------------------------------------------------------------------
-// Test slipIncr().
-void
-pylith::faults::TestLiuCosSlipFn::testSlipIncr(void)
-{ // testSlipIncr
-  const PylithScalar finalSlipE[] = { 2.3, 0.1, 
-				0.0, 0.0};
-  const PylithScalar slipTimeE[] = { 1.2, 1.3 };
-  const PylithScalar riseTimeE[] = { 1.4, 1.5 };
-  const PylithScalar originTime = 1.064;
-
-  topology::Mesh mesh;
-  topology::SubMesh faultMesh;
-  LiuCosSlipFn slipfn;
-  _initialize(&mesh, &faultMesh, &slipfn, originTime);
-
-  const spatialdata::geocoords::CoordSys* cs = faultMesh.coordsys();
-  CPPUNIT_ASSERT(0 != cs);
-
-  const int spaceDim = cs->spaceDim();
-  const ALE::Obj<SieveSubMesh>& faultSieveMesh = faultMesh.sieveMesh();
-  CPPUNIT_ASSERT(!faultSieveMesh.isNull());
-  const ALE::Obj<SieveMesh::label_sequence>& vertices =
-    faultSieveMesh->depthStratum(0);
-  const SieveMesh::label_sequence::iterator verticesEnd = vertices->end();
-  topology::Field<topology::SubMesh> slip(faultMesh);
-  slip.newSection(vertices, spaceDim);
-  slip.allocate();
-
-  const PylithScalar t0 = 1.234;
-  const PylithScalar t1 = 3.635;
-  slipfn.slipIncr(&slip, originTime+t0, originTime+t1);
-
-  const PylithScalar tolerance = 1.0e-06;
-  int iPoint = 0;
-  const ALE::Obj<RealSection>& slipSection = slip.section();
-  CPPUNIT_ASSERT(!slipSection.isNull());
-  for (SieveMesh::label_sequence::iterator v_iter=vertices->begin();
-       v_iter != verticesEnd;
-       ++v_iter, ++iPoint) {
-    PylithScalar slipMag = 0.0;
-    for (int iDim=0; iDim < spaceDim; ++iDim)
-      slipMag += pow(finalSlipE[iPoint*spaceDim+iDim], 2);
-    slipMag = sqrt(slipMag);
-
-    const PylithScalar slipNorm0 = (slipMag > 0.0) ?
-      _slipFn(t0 - slipTimeE[iPoint], slipMag, riseTimeE[iPoint]) / slipMag :
-      0.0;
-    const PylithScalar slipNorm1 = (slipMag > 0.0) ?
-      _slipFn(t1 - slipTimeE[iPoint], slipMag, riseTimeE[iPoint]) / slipMag :
-      0.0;
-
-    const int fiberDim = slipSection->getFiberDimension(*v_iter);
-    CPPUNIT_ASSERT_EQUAL(spaceDim, fiberDim);
-    const PylithScalar* vals = slipSection->restrictPoint(*v_iter);
-    CPPUNIT_ASSERT(0 != vals);
-
-    for (int iDim=0; iDim < fiberDim; ++iDim) {
-      const PylithScalar slipE = 
-	finalSlipE[iPoint*spaceDim+iDim] * (slipNorm1-slipNorm0);
-      CPPUNIT_ASSERT_DOUBLES_EQUAL(slipE, vals[iDim], tolerance);
-    } // for
-  } // for
-} // testSlipIncr
-
-// ----------------------------------------------------------------------
 // Test _slip().
 void
 pylith::faults::TestLiuCosSlipFn::testSlipTH(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestLiuCosSlipFn.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestLiuCosSlipFn.hh	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestLiuCosSlipFn.hh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -58,7 +58,6 @@
   CPPUNIT_TEST( testInitialize2D );
   CPPUNIT_TEST( testInitialize3D );
   CPPUNIT_TEST( testSlip );
-  CPPUNIT_TEST( testSlipIncr );
   CPPUNIT_TEST( testSlipTH );
 
   CPPUNIT_TEST_SUITE_END();
@@ -90,9 +89,6 @@
   /// Test slip().
   void testSlip(void);
 
-  /// Test slipIncr().
-  void testSlipIncr(void);
-
   /// Test _slip().
   void testSlipTH(void);
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestStepSlipFn.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestStepSlipFn.cc	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestStepSlipFn.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -236,55 +236,6 @@
 } // testSlip
 
 // ----------------------------------------------------------------------
-// Test slipIncr().
-void
-pylith::faults::TestStepSlipFn::testSlipIncr(void)
-{ // testSlipIncr
-  const PylithScalar slipE[] = { 0.0, 0.0, 
-			   2.4, 0.2};
-  const PylithScalar originTime = 1.064;
-
-  topology::Mesh mesh;
-  topology::SubMesh faultMesh;
-  StepSlipFn slipfn;
-  _initialize(&mesh, &faultMesh, &slipfn, originTime);
-
-  const spatialdata::geocoords::CoordSys* cs = faultMesh.coordsys();
-  CPPUNIT_ASSERT(0 != cs);
-
-  const int spaceDim = cs->spaceDim();
-  const ALE::Obj<SieveSubMesh>& faultSieveMesh = faultMesh.sieveMesh();
-  CPPUNIT_ASSERT(!faultSieveMesh.isNull());
-  const ALE::Obj<SieveMesh::label_sequence>& vertices =
-    faultSieveMesh->depthStratum(0);
-  const SieveMesh::label_sequence::iterator verticesEnd = vertices->end();
-  topology::Field<topology::SubMesh> slip(faultMesh);
-  slip.newSection(vertices, spaceDim);
-  slip.allocate();
-
-  const PylithScalar t0 = 1.234;
-  const PylithScalar t1 = 2.525;
-  slipfn.slipIncr(&slip, originTime+t0, originTime+t1);
-
-  const PylithScalar tolerance = 1.0e-06;
-  int iPoint = 0;
-  const ALE::Obj<RealSection>& slipSection = slip.section();
-  CPPUNIT_ASSERT(!slipSection.isNull());
-  for (SieveMesh::label_sequence::iterator v_iter=vertices->begin();
-       v_iter != verticesEnd;
-       ++v_iter, ++iPoint) {
-    const int fiberDim = slipSection->getFiberDimension(*v_iter);
-    CPPUNIT_ASSERT_EQUAL(spaceDim, fiberDim);
-    const PylithScalar* vals = slipSection->restrictPoint(*v_iter);
-    CPPUNIT_ASSERT(0 != vals);
-
-    for (int iDim=0; iDim < fiberDim; ++iDim)
-      CPPUNIT_ASSERT_DOUBLES_EQUAL(slipE[iPoint*spaceDim+iDim], vals[iDim], 
-				   tolerance);
-  } // for
-} // testSlipIncr
-
-// ----------------------------------------------------------------------
 // Initialize StepSlipFn.
 void
 pylith::faults::TestStepSlipFn::_initialize(topology::Mesh* mesh,

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestStepSlipFn.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestStepSlipFn.hh	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestStepSlipFn.hh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -57,7 +57,6 @@
   CPPUNIT_TEST( testInitialize2D );
   CPPUNIT_TEST( testInitialize3D );
   CPPUNIT_TEST( testSlip );
-  CPPUNIT_TEST( testSlipIncr );
 
   CPPUNIT_TEST_SUITE_END();
 
@@ -85,9 +84,6 @@
   /// Test slip().
   void testSlip(void);
 
-  /// Test slipIncr().
-  void testSlipIncr(void);
-
   // PRIVATE METHODS ////////////////////////////////////////////////////
 private :
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestTimeHistorySlipFn.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestTimeHistorySlipFn.cc	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestTimeHistorySlipFn.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -266,58 +266,6 @@
 } // testSlip
 
 // ----------------------------------------------------------------------
-// Test slipIncr().
-void
-pylith::faults::TestTimeHistorySlipFn::testSlipIncr(void)
-{ // testSlipIncr
-  const PylithScalar slipTimeE[] = { 1.2, 1.3 };
-  const PylithScalar slipE[] = { 0.92, 0.04, 
-			   0.984, 0.082};
-  const PylithScalar originTime = 1.064;
-
-  topology::Mesh mesh;
-  topology::SubMesh faultMesh;
-  TimeHistorySlipFn slipfn;
-  spatialdata::spatialdb::TimeHistory th;
-  _initialize(&mesh, &faultMesh, &slipfn, &th, originTime);
-
-  const spatialdata::geocoords::CoordSys* cs = faultMesh.coordsys();
-  CPPUNIT_ASSERT(0 != cs);
-
-  const int spaceDim = cs->spaceDim();
-  const ALE::Obj<SieveSubMesh>& faultSieveMesh = faultMesh.sieveMesh();
-  CPPUNIT_ASSERT(!faultSieveMesh.isNull());
-  const ALE::Obj<SieveMesh::label_sequence>& vertices =
-    faultSieveMesh->depthStratum(0);
-  const SieveMesh::label_sequence::iterator verticesEnd = vertices->end();
-  topology::Field<topology::SubMesh> slip(faultMesh);
-  slip.newSection(vertices, spaceDim);
-  slip.allocate();
-
-  const PylithScalar t0 = 3.2;
-  const PylithScalar t1 = 9.7;
-  slipfn.slipIncr(&slip, originTime+t0, originTime+t1);
-
-  const PylithScalar tolerance = 1.0e-06;
-  int iPoint = 0;
-  const ALE::Obj<RealSection>& slipSection = slip.section();
-  CPPUNIT_ASSERT(!slipSection.isNull());
-  for (SieveMesh::label_sequence::iterator v_iter=vertices->begin();
-       v_iter != verticesEnd;
-       ++v_iter, ++iPoint) {
-
-    const int fiberDim = slipSection->getFiberDimension(*v_iter);
-    CPPUNIT_ASSERT_EQUAL(spaceDim, fiberDim);
-    const PylithScalar* vals = slipSection->restrictPoint(*v_iter);
-    CPPUNIT_ASSERT(0 != vals);
-
-    for (int iDim=0; iDim < fiberDim; ++iDim)
-      CPPUNIT_ASSERT_DOUBLES_EQUAL(slipE[iPoint*spaceDim+iDim],
-				   vals[iDim], tolerance);
-  } // for
-} // testSlipIncr
-
-// ----------------------------------------------------------------------
 // Initialize TimeHistorySlipFn.
 void
 pylith::faults::TestTimeHistorySlipFn::_initialize(topology::Mesh* mesh,

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestTimeHistorySlipFn.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestTimeHistorySlipFn.hh	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestTimeHistorySlipFn.hh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -59,7 +59,6 @@
   CPPUNIT_TEST( testInitialize2D );
   CPPUNIT_TEST( testInitialize3D );
   CPPUNIT_TEST( testSlip );
-  CPPUNIT_TEST( testSlipIncr );
 
   CPPUNIT_TEST_SUITE_END();
 
@@ -90,9 +89,6 @@
   /// Test slip().
   void testSlip(void);
 
-  /// Test slipIncr().
-  void testSlipIncr(void);
-
   // PRIVATE METHODS ////////////////////////////////////////////////////
 private :
 

Copied: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesData.cc (from rev 20048, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/data/CohesiveImpulsesData.cc)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesData.cc	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesData.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -0,0 +1,58 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010-2012 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ======================================================================
+//
+
+#include "CohesiveImpulsesData.hh"
+
+// ----------------------------------------------------------------------
+// Constructor
+pylith::faults::CohesiveImpulsesData::CohesiveImpulsesData(void) :
+  meshFilename(0),
+  spaceDim(0),
+  cellDim(0),
+  numBasis(0),
+  numQuadPts(0),
+  quadPts(0),
+  quadWts(0),
+  basis(0),
+  basisDeriv(0),
+  verticesRef(0),
+  id(0),
+  label(0),
+  impulseAmpFilename(0),
+  impulseDOF(0),
+  numComponents(0),
+  fieldT(0),
+  fieldIncr(0),
+  orientation(0),
+  area(0),
+  amplitude(0),
+  numImpulses(0),
+  residualIncr(0),
+  constraintVertices(0),
+  numConstraintVert(0)
+{ // constructor
+} // constructor
+
+// ----------------------------------------------------------------------
+// Destructor
+pylith::faults::CohesiveImpulsesData::~CohesiveImpulsesData(void)
+{ // destructor
+} // destructor
+
+
+// End of file

Copied: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesData.hh (from rev 20048, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/data/CohesiveImpulsesData.hh)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesData.hh	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesData.hh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -0,0 +1,93 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010-2012 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ======================================================================
+//
+
+#if !defined(pylith_faults_cohesiveimpulsesdata_hh)
+#define pylith_faults_cohesiveimpulsesdata_hh
+
+#include "pylith/utils/types.hh" // HASA PylithScalar
+
+namespace pylith {
+  namespace faults {
+     class CohesiveImpulsesData;
+  } // pylith
+} // faults
+
+class pylith::faults::CohesiveImpulsesData
+{
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public :
+  
+  /// Constructor
+  CohesiveImpulsesData(void);
+
+  /// Destructor
+  ~CohesiveImpulsesData(void);
+
+// PUBLIC MEMBERS ///////////////////////////////////////////////////////
+public:
+
+  char* meshFilename; ///< Filename for input mesh
+
+  /// @name Quadrature information
+  //@{
+  int spaceDim; ///< Number of dimensions in vertex coordinates
+  int cellDim; ///< Number of dimensions associated with cell
+  int numBasis; ///< Number of vertices in cell
+  int numQuadPts; ///< Number of quadrature points
+  PylithScalar* quadPts; ///< Coordinates of quad pts in ref cell
+  PylithScalar* quadWts; ///< Weights of quadrature points
+  PylithScalar* basis; ///< Basis fns at quadrature points
+  PylithScalar* basisDeriv; ///< Derivatives of basis fns at quad pts
+  PylithScalar* verticesRef; ///< Coordinates of vertices in ref cell (dual basis)
+  //@}
+
+  /// @name Fault information
+  //@{
+  int id; ///< Fault material identifier
+  char* label; ///< Label for fault
+  char* impulseAmpFilename; ///< Name of db for final slip
+  int* impulseDOF; ///< Fault DOF associated with impulses.
+  int numComponents; ///< Number of components in impulses.
+  //@}
+
+  /// @name Input fields
+  //@{
+  PylithScalar* fieldT; ///< Field over domain at time t.
+  PylithScalar* fieldIncr; ///< Solution increment field over domain at time t.
+  //@}
+
+  /// @name Calculated values.
+  //@{
+  PylithScalar* orientation; ///< Expected values for fault orientation.
+  PylithScalar* area; ///< Expected values for fault area.
+  PylithScalar* amplitude; ///< Expected values for impulse amplitude.
+  int numImpulses; ///< Number of impulses.
+
+  /// Expected values from residual calculation using solution increment.
+  PylithScalar* residualIncr;
+
+  int* constraintVertices; ///< Expected points for constraint vertices
+  int numConstraintVert; ///< Number of constraint vertices
+  //@}
+
+};
+
+#endif // pylith_faults_cohesiveimpulsesdata_hh
+
+// End of file

Copied: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesDataHex8.cc (from rev 20048, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/data/CohesiveImpulsesDataHex8.cc)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesDataHex8.cc	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesDataHex8.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -0,0 +1,247 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010-2012 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ======================================================================
+//
+
+/* Original mesh
+ *
+ * Cells are 0-1 and vertices are 2-13.
+ *
+ *       2,3,4,5 -------- 6,7,8,9 -------- 10,11,12,13
+ *
+ *                        ^^^^^^^ Vertices forming fault
+ *
+ * After adding cohesive elements
+ *
+ * Cells are 0-1,16 and vertices are 4-15.
+ *
+ *       2,3,4,5 -------- 6,7,8,9 -- 14,15,16,17 -------- 10,11,12,13
+ *                                    18,19,20,21
+ *                        ^^^^^^^^^^^^^^^^^^^^^^ Cohesive element
+ *
+ */
+
+#include "CohesiveImpulsesDataHex8.hh"
+
+const char* pylith::faults::CohesiveImpulsesDataHex8::_meshFilename =
+  "data/hex8.mesh";
+
+const int pylith::faults::CohesiveImpulsesDataHex8::_spaceDim = 3;
+
+const int pylith::faults::CohesiveImpulsesDataHex8::_cellDim = 2;
+
+const int pylith::faults::CohesiveImpulsesDataHex8::_numBasis = 4;
+
+const int pylith::faults::CohesiveImpulsesDataHex8::_numQuadPts = 4;
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataHex8::_quadPts[] = {
+  -1.0, -1.0,
+  +1.0, -1.0,
+  +1.0, +1.0,
+  -1.0, +1.0
+};
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataHex8::_quadWts[] = {
+  1.0, 1.0, 1.0, 1.0
+};
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataHex8::_basis[] = {
+  1.0, 0.0, 0.0, 0.0,
+  0.0, 1.0, 0.0, 0.0,
+  0.0, 0.0, 1.0, 0.0,
+  0.0, 0.0, 0.0, 1.0,
+};
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataHex8::_basisDeriv[] = {
+  -0.39433757, -0.39433757,
+  +0.39433757, -0.10566243,
+  +0.10566243, +0.10566243,
+  -0.10566243, +0.39433757,
+
+  -0.39433757, -0.10566243,
+  +0.39433757, -0.39433757,
+  +0.10566243, +0.39433757,
+  -0.10566243, +0.10566243,
+
+  -0.10566243, -0.10566243,
+  +0.10566243, -0.39433757,
+  +0.39433757, +0.39433757,
+  -0.39433757, +0.10566243,
+
+  -0.10566243, -0.39433757,
+  +0.10566243, -0.10566243,
+  +0.39433757, +0.10566243,
+  -0.39433757, +0.39433757,
+};
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataHex8::_verticesRef[] = {
+  -1.0, -1.0,
+  +1.0, -1.0,
+  +1.0, +1.0,
+  -1.0, +1.0
+};
+
+const int pylith::faults::CohesiveImpulsesDataHex8::_id = 10;
+
+const char* pylith::faults::CohesiveImpulsesDataHex8::_label = "fault";
+
+const char* pylith::faults::CohesiveImpulsesDataHex8::_impulseAmpFilename = 
+  "data/hex8_impulses.spatialdb";
+
+const int pylith::faults::CohesiveImpulsesDataHex8::_impulseDOF[1] = {
+  1,
+};
+const int pylith::faults::CohesiveImpulsesDataHex8::_numComponents = 1;
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataHex8::_fieldT[] = {
+  4.1, 6.1, 8.1,
+  4.2, 6.2, 8.2,
+  4.3, 6.3, 8.3,
+  4.4, 6.4, 8.4,
+  4.5, 6.5, 8.5, // 6
+  4.6, 6.6, 8.6, // 7
+  4.7, 6.7, 8.7, // 8
+  4.8, 6.8, 8.8, // 9
+  4.9, 6.9, 8.9,
+  4.0, 6.0, 8.0,
+  5.1, 7.1, 9.1,
+  5.2, 7.2, 9.2,
+  5.3, 7.3, 9.3, // 14
+  5.5, 7.5, 9.5, // 15
+  5.7, 7.7, 9.7, // 16
+  5.9, 7.9, 9.9, // 17
+  5.4, 7.4, 9.4, // 18
+  5.6, 7.6, 9.6, // 19
+  5.8, 7.8, 9.8, // 20
+  5.0, 7.0, 9.0, // 21
+};
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataHex8::_fieldIncr[] = {
+  3.1, 4.1, 5.1,
+  3.2, 4.2, 5.2,
+  3.3, 4.3, 5.3,
+  3.4, 4.4, 5.4,
+  3.5, 4.5, 5.5, // 6
+  3.6, 4.6, 5.6, // 7
+  3.7, 4.7, 5.7, // 8
+  3.8, 4.8, 5.8, // 9
+  3.9, 4.9, 5.9,
+  3.0, 4.0, 5.0,
+  3.1, 4.1, 5.1,
+  3.2, 4.2, 5.2,
+  3.3, 4.3, 5.3, // 14
+  3.5, 4.5, 5.5, // 15
+  3.7, 4.7, 5.7, // 16
+  3.9, 4.9, 5.9, // 17
+  3.4, 4.4, 5.4, // 18
+  3.6, 4.6, 5.6, // 19
+  3.8, 4.8, 5.8, // 20
+  3.0, 4.0, 5.0, // 21
+};
+
+// ----------------------------------------------------------------------
+// Computed values
+// ----------------------------------------------------------------------
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataHex8::_orientation[] = {
+  0.0, -1.0, 0.0,    0.0, 0.0, +1.0,    -1.0, 0.0, 0.0,
+  0.0, -1.0, 0.0,    0.0, 0.0, +1.0,    -1.0, 0.0, 0.0,
+  0.0, -1.0, 0.0,    0.0, 0.0, +1.0,    -1.0, 0.0, 0.0,
+  0.0, -1.0, 0.0,    0.0, 0.0, +1.0,    -1.0, 0.0, 0.0,
+};
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataHex8::_area[] = {
+  1.0, 1.0, 1.0, 1.0
+};
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataHex8::_amplitude[4] = {
+  0.8,
+  1.6,
+  0.0,
+  1.2,
+};
+
+const int pylith::faults::CohesiveImpulsesDataHex8::_numImpulses = 3;
+
+const int pylith::faults::CohesiveImpulsesDataHex8::_numConstraintVert = 4;
+const int pylith::faults::CohesiveImpulsesDataHex8::_constraintVertices[4] = {
+  18, 19, 20, 21
+};
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataHex8::_residualIncr[] = {
+  0.0, 0.0, 0.0,
+  0.0, 0.0, 0.0,
+  0.0, 0.0, 0.0,
+  0.0, 0.0, 0.0,
+  +5.4, +7.4, +9.4, // 6
+  +5.6, +7.6, +9.6, // 7
+  +5.8, +7.8, +9.8, // 8
+  +5.0, +7.0, +9.0, // 9
+  0.0, 0.0, 0.0,
+  0.0, 0.0, 0.0,
+  0.0, 0.0, 0.0,
+  0.0, 0.0, 0.0,
+  -5.4, -7.4, -9.4, // 14
+  -5.6, -7.6, -9.6, // 15
+  -5.8, -7.8, -9.8, // 16
+  -5.0, -7.0, -9.0, // 17
+
+  // 18 (constraint)
+  -(5.3-4.5+0.0), -(7.3-6.5+0.0), -(9.3-8.5+0.0),
+
+  // 19 (constraint)
+  -(5.5-4.6+0.0), -(7.5-6.6+0.0), -(9.5-8.6-1.6),
+
+  // 20 (constraint)
+  -(5.7-4.7+0.0), -(7.7-6.7+0.0), -(9.7-8.7+0.0),
+
+  // 21 (constraint)
+  -(5.9-4.8+0.0), -(7.9-6.8+0.0), -(9.9-8.8+0.0),
+};
+
+pylith::faults::CohesiveImpulsesDataHex8::CohesiveImpulsesDataHex8(void)
+{ // constructor
+  meshFilename = const_cast<char*>(_meshFilename);
+  spaceDim = _spaceDim;
+  cellDim = _cellDim;
+  numBasis = _numBasis;
+  numQuadPts = _numQuadPts;
+  quadPts = const_cast<PylithScalar*>(_quadPts);
+  quadWts = const_cast<PylithScalar*>(_quadWts);
+  basis = const_cast<PylithScalar*>(_basis);
+  basisDeriv = const_cast<PylithScalar*>(_basisDeriv);
+  verticesRef = const_cast<PylithScalar*>(_verticesRef);
+  id = _id;
+  label = const_cast<char*>(_label);
+  impulseAmpFilename = const_cast<char*>(_impulseAmpFilename);
+  impulseDOF = const_cast<int*>(_impulseDOF);
+  numComponents = _numComponents;
+  fieldT = const_cast<PylithScalar*>(_fieldT);
+  fieldIncr = const_cast<PylithScalar*>(_fieldIncr);
+  orientation = const_cast<PylithScalar*>(_orientation);
+  area = const_cast<PylithScalar*>(_area);
+  amplitude = const_cast<PylithScalar*>(_amplitude);
+  numImpulses = _numImpulses;
+  residualIncr = const_cast<PylithScalar*>(_residualIncr);
+  constraintVertices = const_cast<int*>(_constraintVertices);
+  numConstraintVert = _numConstraintVert;  
+} // constructor
+
+pylith::faults::CohesiveImpulsesDataHex8::~CohesiveImpulsesDataHex8(void)
+{}
+
+
+// End of file

Copied: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesDataHex8.hh (from rev 20048, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/data/CohesiveImpulsesDataHex8.hh)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesDataHex8.hh	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesDataHex8.hh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -0,0 +1,82 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010-2012 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ======================================================================
+//
+
+#if !defined(pylith_faults_cohesiveimpulsesdatahex8_hh)
+#define pylith_faults_cohesiveimpulsesdatahex8_hh
+
+#include "CohesiveImpulsesData.hh"
+
+namespace pylith {
+  namespace faults {
+     class CohesiveImpulsesDataHex8;
+  } // pylith
+} // faults
+
+class pylith::faults::CohesiveImpulsesDataHex8 : public CohesiveImpulsesData
+{
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public: 
+
+  /// Constructor
+  CohesiveImpulsesDataHex8(void);
+
+  /// Destructor
+  ~CohesiveImpulsesDataHex8(void);
+
+// PRIVATE MEMBERS //////////////////////////////////////////////////////
+private:
+
+  static const char* _meshFilename; ///< Filename of input mesh
+
+  static const int _spaceDim; ///< Number of dimensions in vertex coordinates
+  static const int _cellDim; ///< Number of dimensions associated with cell
+
+  static const int _numBasis; ///< Number of vertices in cell
+  static const int _numQuadPts; ///< Number of quadrature points
+  static const PylithScalar _quadPts[]; ///< Coordinates of quad pts in ref cell
+  static const PylithScalar _quadWts[]; ///< Weights of quadrature points
+  static const PylithScalar _basis[]; ///< Basis fns at quadrature points
+  static const PylithScalar _basisDeriv[]; ///< Derivatives of basis fns at quad pts
+  static const PylithScalar _verticesRef[]; ///< Coordinates of vertices in ref cell (dual basis)
+
+  static const int _id; ///< Fault material identifier
+  static const char* _label; ///< Label for fault
+  static const char* _impulseAmpFilename; ///< Name of db for impulse amplitude
+  static const int _impulseDOF[]; ///< Fault components associated with impulses.
+  static const int _numComponents; ///< Number of components;
+  //@}
+
+  static const PylithScalar _fieldT[]; ///< Field over domain at time t.
+  static const PylithScalar _fieldIncr[]; ///< Solution increment field over domain at time t.
+
+  static const PylithScalar _orientation[]; ///< Expected values for fault orientation.
+  static const PylithScalar _area[]; ///< Expected values for fault area.
+  static const PylithScalar _amplitude[]; ///< Expected values for impulse amplitude.
+  static const int _numImpulses; ///< Number of impulses.
+  static const PylithScalar _residualIncr[]; ///< Expected values from residual calculation with solution increment.
+
+  static const int _constraintVertices[]; ///< Expected points for constraint vertices
+  static const int _numConstraintVert; ///< Number of constraint vertices
+
+};
+
+#endif // pylith_faults_cohesiveimpulsesdatahex8_hh
+
+
+// End of file

Copied: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesDataQuad4.cc (from rev 20048, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/data/CohesiveImpulsesDataQuad4.cc)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesDataQuad4.cc	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesDataQuad4.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -0,0 +1,196 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010-2012 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ======================================================================
+//
+
+/* Original mesh
+ *
+ * Cells are 0-1, vertices are 2-7.
+ *
+ *       3 -------- 5 -------- 7
+ *       |          |          |
+ *       |          |          |
+ *       |          |          |
+ *       |          |          |
+ *       |          |          |
+ *       |          |          |
+ *       |          |          |
+ *       |          |          |
+ *       2 -------- 4 -------- 6
+ *
+ * After adding cohesive elements
+ *
+ * Cells are 0-1,10 vertices are 2-9.
+ *
+ *       3 -------- 5 -11-- 9 -------- 7
+ *       |          |       |          |
+ *       |          |       |          |
+ *       |          |       |          |
+ *       |          |       |          |
+ *       |          |       |          |
+ *       |          |       |          |
+ *       |          |       |          |
+ *       |          |       |          |
+ *       2 -------- 4 -10-- 8 -------- 6
+ */
+
+#include "CohesiveImpulsesDataQuad4.hh"
+
+const char* pylith::faults::CohesiveImpulsesDataQuad4::_meshFilename =
+  "data/quad4.mesh";
+
+const int pylith::faults::CohesiveImpulsesDataQuad4::_spaceDim = 2;
+
+const int pylith::faults::CohesiveImpulsesDataQuad4::_cellDim = 1;
+
+const int pylith::faults::CohesiveImpulsesDataQuad4::_numBasis = 2;
+
+const int pylith::faults::CohesiveImpulsesDataQuad4::_numQuadPts = 2;
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataQuad4::_quadPts[] = {
+  -1.0, 1.0,
+};
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataQuad4::_quadWts[] = {
+  1.0, 1.0
+};
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataQuad4::_basis[] = {
+  1.0, 0.0,
+  0.0, 1.0,
+};
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataQuad4::_basisDeriv[] = {
+  -0.5, 0.5,
+  -0.5, 0.5,
+};
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataQuad4::_verticesRef[] = {
+  -1.0, 1.0
+};
+
+const int pylith::faults::CohesiveImpulsesDataQuad4::_id = 10;
+
+const char* pylith::faults::CohesiveImpulsesDataQuad4::_label = "fault";
+
+const char* pylith::faults::CohesiveImpulsesDataQuad4::_impulseAmpFilename = 
+  "data/quad4_impulses.spatialdb";
+
+const int pylith::faults::CohesiveImpulsesDataQuad4::_impulseDOF[2] = {
+  0,1,
+};
+const int pylith::faults::CohesiveImpulsesDataQuad4::_numComponents = 2;
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataQuad4::_fieldT[] = {
+  8.1, 9.1,
+  8.2, 9.2,
+  8.3, 9.3, // 4
+  8.4, 9.4, // 5
+  8.5, 9.5,
+  8.6, 9.6,
+  8.7, 9.7, // 8
+  8.9, 9.9, // 9
+  8.8, 9.8, // 10
+  8.0, 9.0, // 11
+};
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataQuad4::_fieldIncr[] = {
+  3.1, 4.1,
+  3.2, 4.2,
+  3.3, 4.3, // 4
+  3.4, 4.4, // 5
+  3.5, 4.5,
+  3.6, 4.6,
+  3.7, 4.7, // 8
+  3.9, 4.9, // 9
+  3.8, 4.8, // 10
+  3.0, 4.0, // 11
+};
+
+// ----------------------------------------------------------------------
+// Computed values
+// ----------------------------------------------------------------------
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataQuad4::_orientation[] = {
+  0.0,  1.0,  +1.0, 0.0,
+  0.0,  1.0,  +1.0, 0.0
+};
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataQuad4::_area[] = {
+  1.0,
+  1.0,
+};
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataQuad4::_amplitude[] = {
+  0.0,
+  1.5,
+};
+
+const int pylith::faults::CohesiveImpulsesDataQuad4::_numImpulses = 2;
+
+const int pylith::faults::CohesiveImpulsesDataQuad4::_numConstraintVert = 2;
+const int pylith::faults::CohesiveImpulsesDataQuad4::_constraintVertices[] = {
+  10, 11
+};
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataQuad4::_residualIncr[] = {
+  0.0,  0.0,
+  0.0,  0.0,
+ +8.8, +9.8, // 4
+ +8.0, +9.0, // 5
+  0.0,  0.0,
+  0.0,  0.0,
+ -8.8, -9.8, // 8
+ -8.0, -9.0, // 9
+  -(8.7-8.3) + 0.0,
+  -(9.7-9.3) + 0.0, // 10
+  -(8.9-8.4) + 1.5,
+  -(9.9-9.4) + 0.0, // 11
+};
+
+pylith::faults::CohesiveImpulsesDataQuad4::CohesiveImpulsesDataQuad4(void)
+{ // constructor
+  meshFilename = const_cast<char*>(_meshFilename);
+  spaceDim = _spaceDim;
+  cellDim = _cellDim;
+  numBasis = _numBasis;
+  numQuadPts = _numQuadPts;
+  quadPts = const_cast<PylithScalar*>(_quadPts);
+  quadWts = const_cast<PylithScalar*>(_quadWts);
+  basis = const_cast<PylithScalar*>(_basis);
+  basisDeriv = const_cast<PylithScalar*>(_basisDeriv);
+  verticesRef = const_cast<PylithScalar*>(_verticesRef);
+  id = _id;
+  label = const_cast<char*>(_label);
+  impulseAmpFilename = const_cast<char*>(_impulseAmpFilename);
+  impulseDOF = const_cast<int*>(_impulseDOF);
+  numComponents = _numComponents;
+  fieldT = const_cast<PylithScalar*>(_fieldT);
+  fieldIncr = const_cast<PylithScalar*>(_fieldIncr);
+  orientation = const_cast<PylithScalar*>(_orientation);
+  area = const_cast<PylithScalar*>(_area);
+  amplitude = const_cast<PylithScalar*>(_amplitude);
+  numImpulses = _numImpulses;
+  residualIncr = const_cast<PylithScalar*>(_residualIncr);
+  constraintVertices = const_cast<int*>(_constraintVertices);
+  numConstraintVert = _numConstraintVert;  
+} // constructor
+
+pylith::faults::CohesiveImpulsesDataQuad4::~CohesiveImpulsesDataQuad4(void)
+{}
+
+
+// End of file

Copied: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesDataQuad4.hh (from rev 20048, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/data/CohesiveImpulsesDataQuad4.hh)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesDataQuad4.hh	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesDataQuad4.hh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -0,0 +1,82 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010-2012 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ======================================================================
+//
+
+#if !defined(pylith_faults_cohesiveimpulsesdataquad4_hh)
+#define pylith_faults_cohesiveimpulsesdataquad4_hh
+
+#include "CohesiveImpulsesData.hh"
+
+namespace pylith {
+  namespace faults {
+     class CohesiveImpulsesDataQuad4;
+  } // pylith
+} // faults
+
+class pylith::faults::CohesiveImpulsesDataQuad4 : public CohesiveImpulsesData
+{
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public: 
+
+  /// Constructor
+  CohesiveImpulsesDataQuad4(void);
+
+  /// Destructor
+  ~CohesiveImpulsesDataQuad4(void);
+
+// PRIVATE MEMBERS //////////////////////////////////////////////////////
+private:
+
+  static const char* _meshFilename; ///< Filename of input mesh
+
+  static const int _spaceDim; ///< Number of dimensions in vertex coordinates
+  static const int _cellDim; ///< Number of dimensions associated with cell
+
+  static const int _numBasis; ///< Number of vertices in cell
+  static const int _numQuadPts; ///< Number of quadrature points
+  static const PylithScalar _quadPts[]; ///< Coordinates of quad pts in ref cell
+  static const PylithScalar _quadWts[]; ///< Weights of quadrature points
+  static const PylithScalar _basis[]; ///< Basis fns at quadrature points
+  static const PylithScalar _basisDeriv[]; ///< Derivatives of basis fns at quad pts
+  static const PylithScalar _verticesRef[]; ///< Coordinates of vertices in ref cell (dual basis)
+
+  static const int _id; ///< Fault material identifier
+  static const char* _label; ///< Label for fault
+  static const char* _impulseAmpFilename; ///< Name of db for impulse amplitude
+  static const int _impulseDOF[]; ///< Fault components associated with impulses.
+  static const int _numComponents; ///< Number of components;
+  //@}
+
+  static const PylithScalar _fieldT[]; ///< Field over domain at time t.
+  static const PylithScalar _fieldIncr[]; ///< Solution increment field over domain at time t.
+
+  static const PylithScalar _orientation[]; ///< Expected values for fault orientation.
+  static const PylithScalar _area[]; ///< Expected values for fault area.
+  static const PylithScalar _amplitude[]; ///< Expected values for impulse amplitude.
+  static const int _numImpulses; ///< Number of impulses.
+  static const PylithScalar _residualIncr[]; ///< Expected values from residual calculation with solution increment.
+
+  static const int _constraintVertices[]; ///< Expected points for constraint vertices
+  static const int _numConstraintVert; ///< Number of constraint vertices
+
+};
+
+#endif // pylith_faults_cohesiveimpulsesdataquad4_hh
+
+
+// End of file

Copied: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesDataTet4.cc (from rev 20048, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/data/CohesiveImpulsesDataTet4.cc)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesDataTet4.cc	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesDataTet4.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -0,0 +1,204 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010-2012 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ======================================================================
+//
+
+/* Original mesh
+ *
+ * Cells are 0-1, vertices are 2-6.
+ *
+ * 2   3,4,5  6
+ *
+ *     ^^^^^ Face in x-y plane
+ *
+ * After adding cohesive elements
+ *
+ * Cells are 0-1,13, vertices are 2-9.
+ *
+ * 2   3,4,5  7,8,9   6
+ *             10,11,12
+ *     ^^^^^^^^^^^^ Cohesive element in x-y plane.
+ */
+
+#include "CohesiveImpulsesDataTet4.hh"
+
+const char* pylith::faults::CohesiveImpulsesDataTet4::_meshFilename =
+  "data/tet4.mesh";
+
+const int pylith::faults::CohesiveImpulsesDataTet4::_spaceDim = 3;
+
+const int pylith::faults::CohesiveImpulsesDataTet4::_cellDim = 2;
+
+const int pylith::faults::CohesiveImpulsesDataTet4::_numBasis = 3;
+
+const int pylith::faults::CohesiveImpulsesDataTet4::_numQuadPts = 3;
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataTet4::_quadPts[] = {
+ -1.00000000e+00, -1.00000000e+00,
+  1.00000000e+00, -1.00000000e+00,
+ -1.00000000e+00,  1.00000000e+00,
+};
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataTet4::_quadWts[] = {
+  2.0/3.0, 2.0/3.0, 2.0/3.0,
+};
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataTet4::_basis[] = {
+  1.0, 0.0, 0.0,
+  0.0, 1.0, 0.0,
+  0.0, 0.0, 1.0,
+};
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataTet4::_basisDeriv[] = {
+ -0.50000000e+00, -0.50000000e+00,
+  0.50000000e+00,  0.00000000e+00,
+  0.00000000e+00,  0.50000000e+00,
+ -0.50000000e+00, -0.50000000e+00,
+  0.50000000e+00,  0.00000000e+00,
+  0.00000000e+00,  0.50000000e+00,
+ -0.50000000e+00, -0.50000000e+00,
+  0.50000000e+00,  0.00000000e+00,
+  0.00000000e+00,  0.50000000e+00,
+};
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataTet4::_verticesRef[] = {
+ -1.00000000e+00, -1.00000000e+00,
+  1.00000000e+00, -1.00000000e+00,
+ -1.00000000e+00,  1.00000000e+00,
+};
+
+const int pylith::faults::CohesiveImpulsesDataTet4::_id = 10;
+
+const char* pylith::faults::CohesiveImpulsesDataTet4::_label = "fault";
+
+const char* pylith::faults::CohesiveImpulsesDataTet4::_impulseAmpFilename = 
+  "data/tet4_impulses.spatialdb";
+
+const int pylith::faults::CohesiveImpulsesDataTet4::_impulseDOF[2] = {
+  0, 2,
+};
+const int pylith::faults::CohesiveImpulsesDataTet4::_numComponents = 2;
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataTet4::_fieldT[] = {
+  7.1, 8.1, 9.1,
+  7.2, 8.2, 9.2, // 3
+  7.3, 8.3, 9.3, // 4
+  7.4, 8.4, 9.4, // 5
+  7.5, 8.5, 9.5,
+  7.6, 8.6, 9.6, // 7
+  7.8, 8.8, 9.8, // 8
+  7.0, 8.0, 9.0, // 9
+  7.7, 8.7, 9.7, // 10
+  7.9, 8.9, 9.9, // 11
+  7.1, 8.1, 9.1, // 12
+};
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataTet4::_fieldIncr[] = {
+  3.1, 4.1, 5.1,
+  3.2, 4.2, 5.2, // 3
+  3.3, 4.3, 5.3, // 4
+  3.4, 4.4, 5.4, // 5
+  3.5, 4.5, 5.5,
+  3.6, 4.6, 5.6, // 7
+  3.8, 4.8, 5.8, // 8
+  3.0, 4.0, 5.0, // 9
+  3.7, 4.7, 5.7, // 10
+  3.9, 4.9, 5.9, // 11
+  3.1, 4.1, 5.1, // 12
+};
+
+// ----------------------------------------------------------------------
+// Computed values
+// ----------------------------------------------------------------------
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataTet4::_orientation[] = {
+  0.0, +1.0, 0.0,    0.0, 0.0, +1.0,    +1.0, 0.0, 0.0,
+  0.0, +1.0, 0.0,    0.0, 0.0, +1.0,    +1.0, 0.0, 0.0,
+  0.0, +1.0, 0.0,    0.0, 0.0, +1.0,    +1.0, 0.0, 0.0,
+};
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataTet4::_area[] = {
+  1.0/3.0, 
+  1.0/3.0, 
+  1.0/3.0,
+};
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataTet4::_amplitude[3] = {
+  1.2,
+  0.0,
+  1.5,
+};
+
+const int pylith::faults::CohesiveImpulsesDataTet4::_numImpulses = 4;
+
+const int pylith::faults::CohesiveImpulsesDataTet4::_numConstraintVert = 3;
+const int pylith::faults::CohesiveImpulsesDataTet4::_constraintVertices[] = {
+  10, 11, 12,
+};
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataTet4::_residualIncr[] = {
+  0.0,  0.0,  0.0,
+   +7.7/3.0,  +8.7/3.0,  +9.7/3.0, // 3
+  +7.9/3.0,  +8.9/3.0,  +9.9/3.0, // 4
+  +7.1/3.0,  +8.1/3.0,  +9.1/3.0, // 5
+  0.0,  0.0,  0.0,
+  -7.7/3.0,  -8.7/3.0,  -9.7/3.0, // 7
+  -7.9/3.0,  -8.9/3.0,  -9.9/3.0, // 8
+  -7.1/3.0,  -8.1/3.0,  -9.1/3.0, // 9
+  -1.0/3.0*(7.6-7.2 - 1.2), // 10
+  -1.0/3.0*(8.6-8.2 + 0.0),
+  -1.0/3.0*(9.6-9.2 + 0.0),
+  -1.0/3.0*(7.8-7.3 + 0.0), // 11
+  -1.0/3.0*(8.8-8.3 + 0.0),
+  -1.0/3.0*(9.8-9.3 + 0.0),
+  -1.0/3.0*(7.0-7.4 + 0.0), // 12
+  -1.0/3.0*(8.0-8.4 + 0.0),
+  -1.0/3.0*(9.0-9.4 + 0.0),
+};
+
+pylith::faults::CohesiveImpulsesDataTet4::CohesiveImpulsesDataTet4(void)
+{ // constructor
+  meshFilename = const_cast<char*>(_meshFilename);
+  spaceDim = _spaceDim;
+  cellDim = _cellDim;
+  numBasis = _numBasis;
+  numQuadPts = _numQuadPts;
+  quadPts = const_cast<PylithScalar*>(_quadPts);
+  quadWts = const_cast<PylithScalar*>(_quadWts);
+  basis = const_cast<PylithScalar*>(_basis);
+  basisDeriv = const_cast<PylithScalar*>(_basisDeriv);
+  verticesRef = const_cast<PylithScalar*>(_verticesRef);
+  id = _id;
+  label = const_cast<char*>(_label);
+  impulseAmpFilename = const_cast<char*>(_impulseAmpFilename);
+  impulseDOF = const_cast<int*>(_impulseDOF);
+  numComponents = _numComponents;
+  fieldT = const_cast<PylithScalar*>(_fieldT);
+  fieldIncr = const_cast<PylithScalar*>(_fieldIncr);
+  orientation = const_cast<PylithScalar*>(_orientation);
+  area = const_cast<PylithScalar*>(_area);
+  amplitude = const_cast<PylithScalar*>(_amplitude);
+  numImpulses = _numImpulses;
+  residualIncr = const_cast<PylithScalar*>(_residualIncr);
+  constraintVertices = const_cast<int*>(_constraintVertices);
+  numConstraintVert = _numConstraintVert;  
+} // constructor
+
+pylith::faults::CohesiveImpulsesDataTet4::~CohesiveImpulsesDataTet4(void)
+{}
+
+
+// End of file

Copied: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesDataTet4.hh (from rev 20048, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/data/CohesiveImpulsesDataTet4.hh)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesDataTet4.hh	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesDataTet4.hh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -0,0 +1,82 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010-2012 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ======================================================================
+//
+
+#if !defined(pylith_faults_cohesiveimpulsesdatatet4_hh)
+#define pylith_faults_cohesiveimpulsesdatatet4_hh
+
+#include "CohesiveImpulsesData.hh"
+
+namespace pylith {
+  namespace faults {
+     class CohesiveImpulsesDataTet4;
+  } // pylith
+} // faults
+
+class pylith::faults::CohesiveImpulsesDataTet4 : public CohesiveImpulsesData
+{
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public: 
+
+  /// Constructor
+  CohesiveImpulsesDataTet4(void);
+
+  /// Destructor
+  ~CohesiveImpulsesDataTet4(void);
+
+// PRIVATE MEMBERS //////////////////////////////////////////////////////
+private:
+
+  static const char* _meshFilename; ///< Filename of input mesh
+
+  static const int _spaceDim; ///< Number of dimensions in vertex coordinates
+  static const int _cellDim; ///< Number of dimensions associated with cell
+
+  static const int _numBasis; ///< Number of vertices in cell
+  static const int _numQuadPts; ///< Number of quadrature points
+  static const PylithScalar _quadPts[]; ///< Coordinates of quad pts in ref cell
+  static const PylithScalar _quadWts[]; ///< Weights of quadrature points
+  static const PylithScalar _basis[]; ///< Basis fns at quadrature points
+  static const PylithScalar _basisDeriv[]; ///< Derivatives of basis fns at quad pts
+  static const PylithScalar _verticesRef[]; ///< Coordinates of vertices in ref cell (dual basis)
+
+  static const int _id; ///< Fault material identifier
+  static const char* _label; ///< Label for fault
+  static const char* _impulseAmpFilename; ///< Name of db for impulse amplitude
+  static const int _impulseDOF[]; ///< Fault components associated with impulses.
+  static const int _numComponents; ///< Number of components;
+  //@}
+
+  static const PylithScalar _fieldT[]; ///< Field over domain at time t.
+  static const PylithScalar _fieldIncr[]; ///< Solution increment field over domain at time t.
+
+  static const PylithScalar _orientation[]; ///< Expected values for fault orientation.
+  static const PylithScalar _area[]; ///< Expected values for fault area.
+  static const PylithScalar _amplitude[]; ///< Expected values for impulse amplitude.
+  static const int _numImpulses; ///< Number of impulses.
+  static const PylithScalar _residualIncr[]; ///< Expected values from residual calculation with solution increment.
+
+  static const int _constraintVertices[]; ///< Expected points for constraint vertices
+  static const int _numConstraintVert; ///< Number of constraint vertices
+
+};
+
+#endif // pylith_faults_cohesiveimpulsesdatatet4_hh
+
+
+// End of file

Copied: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesDataTri3.cc (from rev 20048, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/data/CohesiveImpulsesDataTri3.cc)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesDataTri3.cc	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesDataTri3.cc	2012-05-07 20:41:28 UTC (rev 20049)
@@ -0,0 +1,193 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010-2012 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ======================================================================
+//
+
+/* Original mesh
+ *
+ * Cells are 0-1, vertices are 2-5.
+ *
+ *              3
+ *             /|\
+ *            / | \
+ *           /  |  \
+ *          /   |   \
+ *         2    |    5
+ *          \   |   /
+ *           \  |  /
+ *            \ | /
+ *             \|/
+ *              4
+ *
+ *
+ * After adding cohesive elements
+ *
+ * Cells are 0-1, 10, vertices are 2-7.
+ *
+ *              6 -8- 3
+ *             /|     |\
+ *            / |     | \
+ *           /  |     |  \
+ *          /   |     |   \
+ *         2    |     |    5
+ *          \   |     |   /
+ *           \  |     |  /
+ *            \ |     | /
+ *             \|     |/
+ *              7 -9- 4
+ */
+
+#include "CohesiveImpulsesDataTri3.hh"
+
+const char* pylith::faults::CohesiveImpulsesDataTri3::_meshFilename =
+  "data/tri3.mesh";
+
+const int pylith::faults::CohesiveImpulsesDataTri3::_spaceDim = 2;
+
+const int pylith::faults::CohesiveImpulsesDataTri3::_cellDim = 1;
+
+const int pylith::faults::CohesiveImpulsesDataTri3::_numBasis = 2;
+
+const int pylith::faults::CohesiveImpulsesDataTri3::_numQuadPts = 2;
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataTri3::_quadPts[] = {
+  -1.0, 1.0,
+};
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataTri3::_quadWts[] = {
+  1.0, 1.0
+};
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataTri3::_basis[] = {
+  1.0, 0.0,
+  0.0, 1.0,
+};
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataTri3::_basisDeriv[] = {
+  -0.5, 0.5,
+  -0.5, 0.5,
+};
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataTri3::_verticesRef[] = {
+  -1.0, 1.0
+};
+
+const int pylith::faults::CohesiveImpulsesDataTri3::_id = 10;
+
+const char* pylith::faults::CohesiveImpulsesDataTri3::_label = "fault";
+
+const char* pylith::faults::CohesiveImpulsesDataTri3::_impulseAmpFilename = 
+  "data/tri3_impulses.spatialdb";
+
+const int pylith::faults::CohesiveImpulsesDataTri3::_impulseDOF[1] = {
+  1,
+};
+const int pylith::faults::CohesiveImpulsesDataTri3::_numComponents = 1;
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataTri3::_fieldT[] = {
+  8.1, 9.1,
+  8.2, 9.2, // 3
+  8.3, 9.3, // 4
+  8.4, 9.4,
+  8.5, 9.5, // 6
+  8.7, 9.7, // 7
+  8.6, 9.6, // 8
+  8.8, 9.8, // 9
+};
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataTri3::_fieldIncr[] = {
+  3.1, 4.1,
+  3.2, 4.2, // 3
+  3.3, 4.3, // 4
+  3.4, 4.4,
+  3.5, 4.5, // 6
+  3.7, 4.7, // 7
+  3.6, 4.6, // 8
+  3.8, 4.8, // 9
+};
+
+// ----------------------------------------------------------------------
+// Computed values
+// ----------------------------------------------------------------------
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataTri3::_orientation[] = {
+  0.0, -1.0,  -1.0, 0.0,
+  0.0, -1.0,  -1.0, 0.0
+};
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataTri3::_area[] = {
+  1.0,
+  1.0,
+};
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataTri3::_amplitude[] = {
+  2.0,
+  2.1,
+};
+
+const int pylith::faults::CohesiveImpulsesDataTri3::_numImpulses = 2;
+
+const int pylith::faults::CohesiveImpulsesDataTri3::_numConstraintVert = 2;
+const int pylith::faults::CohesiveImpulsesDataTri3::_constraintVertices[] = {
+  8, 9
+};
+
+const PylithScalar pylith::faults::CohesiveImpulsesDataTri3::_residualIncr[] = {
+  0.0,  0.0,
+ +8.6, +9.6, // 3
+ +8.8, +9.8, // 4
+  0.0,  0.0,
+ -8.6, -9.6, // 6
+ -8.8, -9.8, // 7
+ -(8.5-8.2) - (0),
+ -(9.5-9.2) - (0), // 8
+ -(8.7-8.3) - (2.1),
+ -(9.7-9.3) - (0), // 9
+};
+
+pylith::faults::CohesiveImpulsesDataTri3::CohesiveImpulsesDataTri3(void)
+{ // constructor
+  meshFilename = const_cast<char*>(_meshFilename);
+  spaceDim = _spaceDim;
+  cellDim = _cellDim;
+  numBasis = _numBasis;
+  numQuadPts = _numQuadPts;
+  quadPts = const_cast<PylithScalar*>(_quadPts);
+  quadWts = const_cast<PylithScalar*>(_quadWts);
+  basis = const_cast<PylithScalar*>(_basis);
+  basisDeriv = const_cast<PylithScalar*>(_basisDeriv);
+  verticesRef = const_cast<PylithScalar*>(_verticesRef);
+  id = _id;
+  label = const_cast<char*>(_label);
+  impulseAmpFilename = const_cast<char*>(_impulseAmpFilename);
+  impulseDOF = const_cast<int*>(_impulseDOF);
+  numComponents = _numComponents;
+  fieldT = const_cast<PylithScalar*>(_fieldT);
+  fieldIncr = const_cast<PylithScalar*>(_fieldIncr);
+  orientation = const_cast<PylithScalar*>(_orientation);
+  area = const_cast<PylithScalar*>(_area);
+  amplitude = const_cast<PylithScalar*>(_amplitude);
+  numImpulses = _numImpulses;
+  residualIncr = const_cast<PylithScalar*>(_residualIncr);
+  constraintVertices = const_cast<int*>(_constraintVertices);
+  numConstraintVert = _numConstraintVert;  
+} // constructor
+
+pylith::faults::CohesiveImpulsesDataTri3::~CohesiveImpulsesDataTri3(void)
+{}
+
+
+// End of file

Copied: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesDataTri3.hh (from rev 20048, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/data/CohesiveImpulsesDataTri3.hh)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesDataTri3.hh	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/CohesiveImpulsesDataTri3.hh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -0,0 +1,82 @@
+// -*- C++ -*-
+//
+// ======================================================================
+//
+// Brad T. Aagaard, U.S. Geological Survey
+// Charles A. Williams, GNS Science
+// Matthew G. Knepley, University of Chicago
+//
+// This code was developed as part of the Computational Infrastructure
+// for Geodynamics (http://geodynamics.org).
+//
+// Copyright (c) 2010-2012 University of California, Davis
+//
+// See COPYING for license information.
+//
+// ======================================================================
+//
+
+#if !defined(pylith_faults_cohesiveimpulsesdatatri3_hh)
+#define pylith_faults_cohesiveimpulsesdatatri3_hh
+
+#include "CohesiveImpulsesData.hh"
+
+namespace pylith {
+  namespace faults {
+     class CohesiveImpulsesDataTri3;
+  } // pylith
+} // faults
+
+class pylith::faults::CohesiveImpulsesDataTri3 : public CohesiveImpulsesData
+{
+
+// PUBLIC METHODS ///////////////////////////////////////////////////////
+public: 
+
+  /// Constructor
+  CohesiveImpulsesDataTri3(void);
+
+  /// Destructor
+  ~CohesiveImpulsesDataTri3(void);
+
+// PRIVATE MEMBERS //////////////////////////////////////////////////////
+private:
+
+  static const char* _meshFilename; ///< Filename of input mesh
+
+  static const int _spaceDim; ///< Number of dimensions in vertex coordinates
+  static const int _cellDim; ///< Number of dimensions associated with cell
+
+  static const int _numBasis; ///< Number of vertices in cell
+  static const int _numQuadPts; ///< Number of quadrature points
+  static const PylithScalar _quadPts[]; ///< Coordinates of quad pts in ref cell
+  static const PylithScalar _quadWts[]; ///< Weights of quadrature points
+  static const PylithScalar _basis[]; ///< Basis fns at quadrature points
+  static const PylithScalar _basisDeriv[]; ///< Derivatives of basis fns at quad pts
+  static const PylithScalar _verticesRef[]; ///< Coordinates of vertices in ref cell (dual basis)
+
+  static const int _id; ///< Fault material identifier
+  static const char* _label; ///< Label for fault
+  static const char* _impulseAmpFilename; ///< Name of db for impulse amplitude
+  static const int _impulseDOF[]; ///< Fault components associated with impulses.
+  static const int _numComponents; ///< Number of components;
+  //@}
+
+  static const PylithScalar _fieldT[]; ///< Field over domain at time t.
+  static const PylithScalar _fieldIncr[]; ///< Solution increment field over domain at time t.
+
+  static const PylithScalar _orientation[]; ///< Expected values for fault orientation.
+  static const PylithScalar _area[]; ///< Expected values for fault area.
+  static const PylithScalar _amplitude[]; ///< Expected values for impulse amplitude.
+  static const int _numImpulses; ///< Number of impulses.
+  static const PylithScalar _residualIncr[]; ///< Expected values from residual calculation with solution increment.
+
+  static const int _constraintVertices[]; ///< Expected points for constraint vertices
+  static const int _numConstraintVert; ///< Number of constraint vertices
+
+};
+
+#endif // pylith_faults_cohesiveimpulsesdatatri3_hh
+
+
+// End of file

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/Makefile.am	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/Makefile.am	2012-05-07 20:41:28 UTC (rev 20049)
@@ -41,6 +41,7 @@
 	tri3d_risetime.spatialdb \
 	tri3_initialtract.spatialdb \
 	tri3d_initialtract.spatialdb \
+	tri3_impulses.spatialdb \
 	quad4.mesh \
 	quad4b.mesh \
 	quad4c.mesh \
@@ -56,6 +57,7 @@
 	quad4e_sliptime.spatialdb \
 	quad4e_risetime.spatialdb \
 	quad4_initialtract.spatialdb \
+	quad4_impulses.spatialdb \
 	tet4.mesh \
 	tet4b.mesh \
 	tet4c.mesh \
@@ -74,6 +76,7 @@
 	tet4e_sliptime.spatialdb \
 	tet4e_risetime.spatialdb \
 	tet4_initialtract.spatialdb \
+	tet4_impulses.spatialdb \
 	hex8.mesh \
 	hex8b.mesh \
 	hex8c.mesh \
@@ -87,10 +90,7 @@
 	hex8_sliptime.spatialdb \
 	hex8_risetime.spatialdb \
 	hex8_initialtract.spatialdb \
-	tri3traction.mesh \
-	quad4traction.mesh \
-	tet4traction.mesh \
-	hex8traction.mesh
+	hex8_impulses.spatialdb 
 
 noinst_TMP =
 

Copied: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/hex8_impulses.spatialdb (from rev 20048, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/data/hex8_impulses.spatialdb)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/hex8_impulses.spatialdb	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/hex8_impulses.spatialdb	2012-05-07 20:41:28 UTC (rev 20049)
@@ -0,0 +1,17 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 1
+  value-names =  slip
+  value-units =  m
+  num-locs = 4
+  data-dim = 2
+  space-dim = 3
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 3
+  }
+}
+0.0  -1.0 -1.0    0.8
+0.0   1.0 -1.0    1.6
+0.0  -1.0  1.0    0.0
+0.0   1.0  1.0    1.2

Deleted: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/hex8traction.mesh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/hex8traction.mesh	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/hex8traction.mesh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -1,64 +0,0 @@
-mesh = {
-  dimension = 3
-  use-index-zero = true
-  vertices = {
-    dimension = 3
-    count = 12
-    coordinates = {
-             0     -2.0 -1.0 -1.0
-             1     -2.0  1.0 -1.0
-             2     -2.0 -1.0  1.0
-             3     -2.0  1.0  1.0
-             4      0.0 -1.0 -1.0
-             5      0.0  1.0 -1.0
-             6      0.0 -1.0  1.0
-             7      0.0  1.0  1.0
-             8      2.0 -1.0 -1.0
-             9      2.0  1.0 -1.0
-            10      2.0 -1.0  1.0
-            11      2.0  1.0  1.0
-    }
-  }
-  cells = {
-    count = 2
-    num-corners = 8
-    simplices = {
-             0       0  1  3  2  4  5  7  6
-             1       4  5  7  6  8  9 11 10
-    }
-    material-ids = {
-             0   0
-             1   0
-    }
-  }
-  group = {
-    name = fault
-    type = vertices
-    count = 4
-    indices = {
-      4
-      5
-      6
-      7
-    }
-  }
-  group = {
-    name = traction
-    type = vertices
-    count = 12
-    indices = {
-      0
-      1
-      2
-      3
-      4
-      5
-      6
-      7
-      8
-      9
-     10
-     11
-    }
-  }
-}

Copied: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/quad4_impulses.spatialdb (from rev 20048, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/data/quad4_impulses.spatialdb)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/quad4_impulses.spatialdb	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/quad4_impulses.spatialdb	2012-05-07 20:41:28 UTC (rev 20049)
@@ -0,0 +1,15 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 1
+  value-names =  slip
+  value-units =  m
+  num-locs = 2
+  data-dim = 1
+  space-dim = 2
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 2
+  }
+}
+0.0  +1.0   1.5
+0.0  -1.0   0.0

Deleted: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/quad4traction.mesh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/quad4traction.mesh	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/quad4traction.mesh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -1,50 +0,0 @@
-mesh = {
-  dimension = 2
-  use-index-zero = true
-  vertices = {
-    dimension = 2
-    count = 6
-    coordinates = {
-             0     -2.0 -1.0
-             1     -2.0  1.0
-             2      0.0 -1.0
-             3      0.0  1.0
-             4      2.0 -1.0
-             5      2.0  1.0
-    }
-  }
-  cells = {
-    count = 2
-    num-corners = 4
-    simplices = {
-             0       0  2  3  1
-             1       4  5  3  2
-    }
-    material-ids = {
-             0   0
-             1   0
-    }
-  }
-  group = {
-    name = fault
-    type = vertices
-    count = 2
-    indices = {
-      2
-      3
-    }
-  }
-  group = {
-    name = traction
-    type = vertices
-    count = 6
-    indices = {
-      0
-      1
-      2
-      3
-      4
-      5
-    }
-  }
-}

Copied: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/tet4_impulses.spatialdb (from rev 20048, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/data/tet4_impulses.spatialdb)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/tet4_impulses.spatialdb	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/tet4_impulses.spatialdb	2012-05-07 20:41:28 UTC (rev 20049)
@@ -0,0 +1,16 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 1
+  value-names =  slip
+  value-units =  m
+  num-locs = 3
+  data-dim = 2
+  space-dim = 3
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 3
+  }
+}
+0.0  -1.0  0.0    1.2
+0.0   0.0  1.0    0.0
+0.0   1.0  0.0    1.5

Deleted: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/tet4traction.mesh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/tet4traction.mesh	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/tet4traction.mesh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -1,49 +0,0 @@
-mesh = {
-  dimension = 3
-  use-index-zero = true
-  vertices = {
-    dimension = 3
-    count = 5
-    coordinates = {
-             0     -1.0  0.0  0.0
-             1      0.0 -1.0  0.0
-             2      0.0  0.0  1.0
-             3      0.0  1.0  0.0
-             4      1.0  0.0  0.0
-    }
-  }
-  cells = {
-    count = 2
-    num-corners = 4
-    simplices = {
-             0       1  2  3  0
-             1       1  3  2  4
-    }
-    material-ids = {
-             0   0
-             1   0
-    }
-  }
-  group = {
-    name = fault
-    type = vertices
-    count = 3
-    indices = {
-      1
-      2
-      3
-    }
-  }
-  group = {
-    name = traction
-    type = vertices
-    count = 5
-    indices = {
-      0
-      1
-      2
-      3
-      4
-    }
-  }
-}

Copied: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/tri3_impulses.spatialdb (from rev 20048, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/data/tri3_impulses.spatialdb)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/tri3_impulses.spatialdb	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/tri3_impulses.spatialdb	2012-05-07 20:41:28 UTC (rev 20049)
@@ -0,0 +1,15 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 1
+  value-names =  slip
+  value-units =  m
+  num-locs = 2
+  data-dim = 1
+  space-dim = 2
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 2
+  }
+}
+0.0  +1.0   2.0
+0.0  -1.0   2.1

Deleted: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/tri3traction.mesh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/tri3traction.mesh	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/data/tri3traction.mesh	2012-05-07 20:41:28 UTC (rev 20049)
@@ -1,56 +0,0 @@
-mesh = {
-  dimension = 2
-  use-index-zero = true
-  vertices = {
-    dimension = 2
-    count = 4
-    coordinates = {
-             0     -1.0  0.0
-             1      0.0  1.0
-             2      0.0 -1.0
-             3      1.0  0.0
-    }
-  }
-  cells = {
-    count = 2
-    num-corners = 3
-    simplices = {
-             0       0  2  1
-             1       1  2  3
-    }
-    material-ids = {
-             0   0
-             1   0
-    }
-  }
-  group = {
-    name = fault
-    type = vertices
-    count = 2
-    indices = {
-      1
-      2
-    }
-  }
-  group = {
-    name = output
-    type = vertices
-    count = 3
-    indices = {
-      1
-      2
-      3
-    }
-  }
-  group = {
-    name = traction
-    type = vertices
-    count = 4
-    indices = {
-      0
-      1
-      3
-      2
-    }
-  }
-}

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/bc/TestAbsorbingDampers.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/bc/TestAbsorbingDampers.py	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/bc/TestAbsorbingDampers.py	2012-05-07 20:41:28 UTC (rev 20049)
@@ -198,7 +198,7 @@
 
     from pylith.feassemble.FIATSimplex import FIATSimplex
     cell = FIATSimplex()
-    cell.inventory.shape = "line"
+    cell.inventory.dimension = 1
     cell.inventory.degree = 1
     cell.inventory.order = 1
     cell._configure()

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/bc/TestNeumann.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/bc/TestNeumann.py	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/bc/TestNeumann.py	2012-05-07 20:41:28 UTC (rev 20049)
@@ -196,7 +196,7 @@
 
     from pylith.feassemble.FIATSimplex import FIATSimplex
     cell = FIATSimplex()
-    cell.inventory.shape = "line"
+    cell.inventory.dimension = 1
     cell.inventory.degree = 1
     cell.inventory.order = 1
     cell._configure()

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/faults/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/faults/Makefile.am	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/faults/Makefile.am	2012-05-07 20:41:28 UTC (rev 20049)
@@ -32,6 +32,7 @@
 	TestEqKinSrc.py \
 	TestFaultCohesiveKin.py \
 	TestFaultCohesiveDyn.py \
+	TestFaultCohesiveImpulses.py \
 	TestLiuCosSlipFn.py \
 	TestSingleRupture.py \
 	TestStepSlipFn.py \

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/faults/TestFaultCohesiveDyn.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/faults/TestFaultCohesiveDyn.py	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/faults/TestFaultCohesiveDyn.py	2012-05-07 20:41:28 UTC (rev 20049)
@@ -271,7 +271,7 @@
     # Setup quadrature
     from pylith.feassemble.FIATSimplex import FIATSimplex
     cell = FIATSimplex()
-    cell.inventory.shape = "line"
+    cell.inventory.dimension = 1
     cell.inventory.degree = 1
     cell.inventory.order = 1
     cell._configure()

Copied: short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/faults/TestFaultCohesiveImpulses.py (from rev 20048, short/3D/PyLith/branches/v1.7-trunk/unittests/pytests/faults/TestFaultCohesiveImpulses.py)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/faults/TestFaultCohesiveImpulses.py	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/faults/TestFaultCohesiveImpulses.py	2012-05-07 20:41:28 UTC (rev 20049)
@@ -0,0 +1,350 @@
+#!/usr/bin/env python
+#
+# ======================================================================
+#
+# Brad T. Aagaard, U.S. Geological Survey
+# Charles A. Williams, GNS Science
+# Matthew G. Knepley, University of Chicago
+#
+# This code was developed as part of the Computational Infrastructure
+# for Geodynamics (http://geodynamics.org).
+#
+# Copyright (c) 2010-2012 University of California, Davis
+#
+# See COPYING for license information.
+#
+# ======================================================================
+#
+
+## @file unittests/pytests/faults/TestFaultCohesiveImpulses.py
+
+## @brief Unit testing of FaultCohesiveImpulses object.
+
+import unittest
+
+from pylith.faults.FaultCohesiveImpulses import FaultCohesiveImpulses
+
+from spatialdata.geocoords.CSCart import CSCart
+from pyre.units.time import second
+
+# ----------------------------------------------------------------------
+class TestFaultCohesiveImpulses(unittest.TestCase):
+  """
+  Unit testing of Fault object.
+  """
+
+  def test_constructor(self):
+    """
+    Test constructor.
+    """
+    fault = FaultCohesiveImpulses()
+    return
+
+
+  def test_configure(self):
+    """
+    Test _configure().
+    """
+    fault = FaultCohesiveImpulses()
+    fault.inventory.faultLabel = "fault group"
+    fault._configure()
+    return
+
+
+  def test_implementsIntegrator(self):
+    """
+    Test to make sure FaultCohesiveImpulses satisfies integrator requirements.
+    """
+    fault = FaultCohesiveImpulses()
+    from pylith.feassemble.Integrator import implementsIntegrator
+    self.failUnless(implementsIntegrator(fault))
+    return
+    
+
+  def test_useFaultMesh(self):
+    """
+    Test useFaultMesh().
+    """
+    fault = FaultCohesiveImpulses()
+    fault.inventory.faultLabel = "fault group"
+    fault._configure()
+
+    fault.useFaultMesh(True);
+
+    # No test of result
+    return
+
+
+  def test_faultMeshFilename(self):
+    """
+    Test faultMeshFilename().
+    """
+    fault = FaultCohesiveImpulses() 
+    fault.inventory.faultLabel = "fault group"
+    fault._configure()
+
+    filename = "SanAndreas.inp"
+    fault.faultMeshFilename(filename)
+
+    # No test of result
+    return
+
+
+  def test_adjustTopology(self):
+    """
+    Test adjustTopology().
+
+    WARNING: This is not a rigorous test of adjustTopology() because we
+    neither set the input fields or verify the results.
+    """
+    cs = CSCart()
+    cs.inventory.spaceDim = 2
+    cs._configure()
+    
+    from spatialdata.units.Nondimensional import Nondimensional
+    normalizer = Nondimensional()
+    normalizer._configure()
+
+    from pylith.meshio.MeshIOAscii import MeshIOAscii
+    importer = MeshIOAscii()
+    importer.inventory.filename = "data/tri3.mesh"
+    importer.inventory.coordsys = cs
+    importer._configure()
+    mesh = importer.read(debug=False, interpolate=False)
+
+    fault = FaultCohesiveImpulses()
+    fault.inventory.matId = 10
+    fault.inventory.faultLabel = "fault"
+    fault._configure()
+
+    nvertices = fault.numVerticesNoMesh(mesh)
+    firstFaultVertex = 0
+    firstLagrangeVertex = nvertices
+    firstFaultCell      = 2*nvertices
+    fault.adjustTopology(mesh, firstFaultVertex, firstLagrangeVertex,
+                         firstFaultCell)
+
+    # We should really add something here to check to make sure things
+    # actually initialized correctly    
+    return
+
+
+  def test_initialize(self):
+    """
+    Test initialize().
+
+    WARNING: This is not a rigorous test of initialize() because we
+    neither set the input fields or verify the results.
+    """
+    (mesh, fault, fields) = self._initialize()
+    
+    # We should really add something here to check to make sure things
+    # actually initialized correctly    
+    return
+
+
+  def test_timeStep(self):
+    """
+    Test timeStep().
+    """
+    dt = 2.4
+    (mesh, fault, fields) = self._initialize()
+    fault.timeStep(dt)
+
+    # No test of result
+    return
+
+  
+  def test_stableTimeStep(self):
+    """
+    Test stableTimeStep().
+    """
+    (mesh, fault, fields) = self._initialize()
+
+    from pylith.utils.utils import maxscalar
+    self.assertAlmostEqual(1.0, fault.stableTimeStep(mesh)/maxscalar(), 7)
+    return
+
+  
+  def test_needNewJacobian(self):
+    """
+    Test needNewJacobian().
+    """
+    (mesh, fault, fields) = self._initialize()
+    self.assertEqual(True, fault.needNewJacobian())
+    return
+
+  
+  def test_integrateResidual(self):
+    """
+    Test integrateResidual().
+
+    WARNING: This is not a rigorous test of integrateResidual() because we
+    neither set the input fields or verify the results.
+    """
+    (mesh, fault, fields) = self._initialize()
+
+    residual = fields.get("residual")
+    t = 1.0
+    fault.integrateResidual(residual, t, fields)
+
+    # We should really add something here to check to make sure things
+    # actually initialized correctly    
+    return
+
+  
+  def test_integrateJacobian(self):
+    """
+    Test integrateJacobian().
+
+    WARNING: This is not a rigorous test of integrateJacobian() because we
+    neither set the input fields or verify the results.
+    """
+    (mesh, fault, fields) = self._initialize()
+
+    from pylith.topology.Jacobian import Jacobian
+    jacobian = Jacobian(fields.solution())
+    jacobian.zero()
+    t = 1.0
+    fault.integrateJacobian(jacobian, t, fields)
+    self.assertEqual(False, fault.needNewJacobian())
+
+    # We should really add something here to check to make sure things
+    # actually initialized correctly    
+    return
+
+  
+  def test_poststep(self):
+    """
+    Test poststep().
+
+    WARNING: This is not a rigorous test of poststep() because we
+    neither set the input fields or verify the results.
+    """
+    (mesh, fault, fields) = self._initialize()
+
+    t = 0.50
+    residual = fields.get("residual")
+    fault.integrateResidual(residual, t, fields)
+
+    dt = 0.1
+    totalTime = 5
+    fault.poststep(t, dt, fields)
+
+    # We should really add something here to check to make sure things
+    # actually initialized correctly    
+    return
+  
+
+  def test_finalize(self):
+    """
+    Test finalize().
+
+    WARNING: This is not a rigorous test of finalize() because we
+    neither set the input fields or verify the results.
+    """
+    (mesh, fault, fields) = self._initialize()
+
+    fault.finalize()
+
+    # We should really add something here to check to make sure things
+    # actually initialized correctly.
+    return
+
+
+  def test_factory(self):
+    """
+    Test factory method.
+    """
+    from pylith.faults.FaultCohesiveImpulses import fault
+    f = fault()
+    return
+
+
+  # PRIVATE METHODS ////////////////////////////////////////////////////
+
+  def _initialize(self):
+    """
+    Initialize fault.
+    """
+    dt = 2.4
+    
+    from spatialdata.units.Nondimensional import Nondimensional
+    normalizer = Nondimensional()
+    normalizer._configure()
+
+    # Setup mesh
+    cs = CSCart()
+    cs.inventory.spaceDim = 2
+    cs._configure()
+
+    from pylith.meshio.MeshIOAscii import MeshIOAscii
+    importer = MeshIOAscii()
+    importer.inventory.filename = "data/tri3.mesh"
+    importer.inventory.coordsys = cs
+    importer._configure()
+    mesh = importer.read(debug=False, interpolate=False)
+
+    # Setup quadrature
+    from pylith.feassemble.FIATSimplex import FIATSimplex
+    cell = FIATSimplex()
+    cell.inventory.dimension = 1
+    cell.inventory.degree = 1
+    cell.inventory.order = 1
+    cell._configure()
+    from pylith.feassemble.Quadrature import SubMeshQuadrature
+    quadrature = SubMeshQuadrature()
+    quadrature.inventory.cell = cell
+    quadrature._configure()
+
+    # Setup impulses
+    from spatialdata.spatialdb.SimpleDB import SimpleDB
+    from spatialdata.spatialdb.SimpleIOAscii import SimpleIOAscii
+    ioImpulseAmp = SimpleIOAscii()
+    ioImpulseAmp.inventory.filename = "data/tri3_impulses.spatialdb"
+    ioImpulseAmp._configure()
+    dbImpulseAmp = SimpleDB()
+    dbImpulseAmp.inventory.iohandler = ioImpulseAmp
+    dbImpulseAmp.inventory.label = "impulse amplitude"
+    dbImpulseAmp._configure()
+    
+    # Setup fault
+    fault = FaultCohesiveImpulses()
+    fault.inventory.output.inventory.writer._configure()
+    fault.inventory.output._configure()
+    fault.inventory.matId = 10
+    fault.inventory.faultLabel = "fault"
+    fault.inventory.upDir = [0, 0, 1]
+    fault.inventory.faultQuadrature = quadrature
+    fault.inventory.dbImpulseAmp = dbImpulseAmp
+    fault._configure()
+
+    nvertices = fault.numVerticesNoMesh(mesh)
+    firstFaultVertex = 0
+    firstLagrangeVertex = nvertices
+    firstFaultCell      = 2*nvertices
+    fault.adjustTopology(mesh, firstFaultVertex, firstLagrangeVertex,
+                         firstFaultCell)
+    fault.preinitialize(mesh)
+    fault.timeStep(dt)
+    fault.verifyConfiguration()
+    from pyre.units.time import s
+    fault.initialize(totalTime=0.0*s, numTimeSteps=1, normalizer=normalizer)
+
+    # Setup fields
+    from pylith.topology.SolutionFields import SolutionFields
+    fields = SolutionFields(mesh)
+    fields.add("residual", "residual")
+    fields.add("dispIncr(t->t+dt)", "displacement_increment")
+    fields.add("disp(t)", "displacement")
+    fields.solutionName("dispIncr(t->t+dt)")
+    residual = fields.get("residual")
+    residual.newSection(residual.VERTICES_FIELD, cs.spaceDim())
+    residual.allocate()
+    residual.zero()
+    fields.copyLayout("residual")
+    
+    return (mesh, fault, fields)
+
+
+# End of file 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/faults/TestFaultCohesiveKin.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/faults/TestFaultCohesiveKin.py	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/faults/TestFaultCohesiveKin.py	2012-05-07 20:41:28 UTC (rev 20049)
@@ -300,7 +300,7 @@
     # Setup quadrature
     from pylith.feassemble.FIATSimplex import FIATSimplex
     cell = FIATSimplex()
-    cell.inventory.shape = "line"
+    cell.inventory.dimension = 1
     cell.inventory.degree = 1
     cell.inventory.order = 1
     cell._configure()

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/faults/data/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/faults/data/Makefile.am	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/faults/data/Makefile.am	2012-05-07 20:41:28 UTC (rev 20049)
@@ -24,6 +24,7 @@
 	tri3_peakrate.spatialdb \
 	tri3_initialtractions.spatialdb \
 	tri3_staticfriction.spatialdb \
+	tri3_impulses.spatialdb \
 	slipfn.timedb
 
 noinst_TMP =

Copied: short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/faults/data/tri3_impulses.spatialdb (from rev 20048, short/3D/PyLith/branches/v1.7-trunk/unittests/pytests/faults/data/tri3_impulses.spatialdb)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/faults/data/tri3_impulses.spatialdb	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/faults/data/tri3_impulses.spatialdb	2012-05-07 20:41:28 UTC (rev 20049)
@@ -0,0 +1,15 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 1
+  value-names =  slip
+  value-units =  m
+  num-locs = 2
+  data-dim = 1
+  space-dim = 2
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 2
+  }
+}
+0.0  +1.0   2.0
+0.0  -1.0   2.1

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/faults/testfaults.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/faults/testfaults.py	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/faults/testfaults.py	2012-05-07 20:41:28 UTC (rev 20049)
@@ -86,6 +86,9 @@
     from TestFaultCohesiveDyn import TestFaultCohesiveDyn
     suite.addTest(unittest.makeSuite(TestFaultCohesiveDyn))
 
+    from TestFaultCohesiveImpulses import TestFaultCohesiveImpulses
+    suite.addTest(unittest.makeSuite(TestFaultCohesiveImpulses))
+
     from TestSingleRupture import TestSingleRupture
     suite.addTest(unittest.makeSuite(TestSingleRupture))
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/feassemble/TestElasticityExplicit.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/feassemble/TestElasticityExplicit.py	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/feassemble/TestElasticityExplicit.py	2012-05-07 20:41:28 UTC (rev 20049)
@@ -249,7 +249,7 @@
     # Setup material
     from pylith.feassemble.FIATSimplex import FIATSimplex
     cell = FIATSimplex()
-    cell.inventory.shape = "triangle"
+    cell.inventory.dimension = 2
     cell.inventory.degree = 1
     cell.inventory.order = 1
     cell._configure()

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/feassemble/TestElasticityExplicitLgDeform.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/feassemble/TestElasticityExplicitLgDeform.py	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/feassemble/TestElasticityExplicitLgDeform.py	2012-05-07 20:41:28 UTC (rev 20049)
@@ -249,7 +249,7 @@
     # Setup material
     from pylith.feassemble.FIATSimplex import FIATSimplex
     cell = FIATSimplex()
-    cell.inventory.shape = "triangle"
+    cell.inventory.dimension = 2
     cell.inventory.degree = 1
     cell.inventory.order = 1
     cell._configure()

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/feassemble/TestElasticityImplicit.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/feassemble/TestElasticityImplicit.py	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/feassemble/TestElasticityImplicit.py	2012-05-07 20:41:28 UTC (rev 20049)
@@ -229,7 +229,7 @@
     # Setup material
     from pylith.feassemble.FIATSimplex import FIATSimplex
     cell = FIATSimplex()
-    cell.inventory.shape = "triangle"
+    cell.inventory.dimension = 2
     cell.inventory.degree = 1
     cell.inventory.order = 1
     cell._configure()

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/feassemble/TestElasticityImplicitLgDeform.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/feassemble/TestElasticityImplicitLgDeform.py	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/feassemble/TestElasticityImplicitLgDeform.py	2012-05-07 20:41:28 UTC (rev 20049)
@@ -229,7 +229,7 @@
     # Setup material
     from pylith.feassemble.FIATSimplex import FIATSimplex
     cell = FIATSimplex()
-    cell.inventory.shape = "triangle"
+    cell.inventory.dimension = 2
     cell.inventory.degree = 1
     cell.inventory.order = 1
     cell._configure()

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/feassemble/TestFIATSimplex.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/feassemble/TestFIATSimplex.py	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/feassemble/TestFIATSimplex.py	2012-05-07 20:41:28 UTC (rev 20049)
@@ -518,15 +518,15 @@
 
     from FIAT.reference_element import default_simplex
 
-    cell.shape = "line"
+    cell.cellDim = 1
     shape = cell._getShape()
     self.assertEqual(default_simplex(1).get_shape(), shape.get_shape())
 
-    cell.shape = "triangle"
+    cell.cellDim = 2
     shape = cell._getShape()
     self.assertEqual(default_simplex(2).get_shape(), shape.get_shape())
 
-    cell.shape = "tetrahedron"
+    cell.cellDim = 3
     shape = cell._getShape()
     self.assertEqual(default_simplex(3).get_shape(), shape.get_shape())
     return
@@ -537,7 +537,7 @@
     Test initialize() with line2 cell.
     """
     cell = FIATSimplex()
-    cell.inventory.shape  = "line"
+    cell.inventory.dimension = 1
     cell.inventory.degree = 1
     cell.inventory.order  = 1
     cell._configure()
@@ -555,7 +555,7 @@
     Test initialize() with line2 cell.
     """
     cell = FIATSimplex()
-    cell.inventory.shape  = "line"
+    cell.inventory.dimension = 1
     cell.inventory.degree = 1
     cell.inventory.order  = 1
     cell.inventory.collocateQuad = True
@@ -574,7 +574,7 @@
     Test initialize() with line3 cell.
     """
     cell = FIATSimplex()
-    cell.inventory.shape  = "line"
+    cell.inventory.dimension = 1
     cell.inventory.degree = 2
     cell.inventory.order  = 2
     cell._configure()
@@ -592,7 +592,7 @@
     Test initialize() with tri3 cell.
     """
     cell = FIATSimplex()
-    cell.inventory.shape  = "triangle"
+    cell.inventory.dimension = 2
     cell.inventory.degree = 1
     cell._configure()
     cell.initialize(spaceDim=2)
@@ -609,7 +609,7 @@
     Test initialize() with tri3 cell.
     """
     cell = FIATSimplex()
-    cell.inventory.shape  = "triangle"
+    cell.inventory.dimension = 2
     cell.inventory.degree = 1
     cell.inventory.collocateQuad = True
     cell._configure()
@@ -627,7 +627,7 @@
     Test initialize() with tri6 cell.
     """
     cell = FIATSimplex()
-    cell.inventory.shape  = "triangle"
+    cell.inventory.dimension = 2
     cell.inventory.degree = 2
     cell._configure()
     cell.initialize(spaceDim=2)
@@ -644,7 +644,7 @@
     Test initialize() with tet4 cell.
     """
     cell = FIATSimplex()
-    cell.inventory.shape  = "tetrahedron"
+    cell.inventory.dimension = 3
     cell.inventory.degree = 1
     cell._configure()
     cell.initialize(spaceDim=3)
@@ -661,7 +661,7 @@
     Test initialize() with tet4 cell.
     """
     cell = FIATSimplex()
-    cell.inventory.shape  = "tetrahedron"
+    cell.inventory.dimension = 3
     cell.inventory.degree = 1
     cell.inventory.collocateQuad = True
     cell._configure()

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/feassemble/TestMeshQuadrature.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/feassemble/TestMeshQuadrature.py	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/feassemble/TestMeshQuadrature.py	2012-05-07 20:41:28 UTC (rev 20049)
@@ -88,7 +88,7 @@
     Test initialize().
     """
     cell = FIATSimplex()
-    cell.inventory.shape = "line"
+    cell.inventory.dimension = 1
     cell.inventory.degree = 2
     cell.inventory.order = 2
     cell._configure()
@@ -154,7 +154,7 @@
     spaceDim = 1
 
     cell = FIATSimplex()
-    cell.inventory.shape = "line"
+    cell.inventory.dimension = 1
     cell._configure()
     
     quadrature = MeshQuadrature()
@@ -175,7 +175,7 @@
     spaceDim = 2
 
     cell = FIATSimplex()
-    cell.inventory.shape = "triangle"
+    cell.inventory.dimension = 2
     cell._configure()
     
     quadrature = MeshQuadrature()
@@ -196,7 +196,7 @@
     spaceDim = 3
 
     cell = FIATSimplex()
-    cell.inventory.shape = "tetrahedron"
+    cell.inventory.dimension = 3
     cell._configure()
     
     quadrature = MeshQuadrature()

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/feassemble/TestSubMeshQuadrature.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/feassemble/TestSubMeshQuadrature.py	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/feassemble/TestSubMeshQuadrature.py	2012-05-07 20:41:28 UTC (rev 20049)
@@ -88,7 +88,7 @@
     Test initialize().
     """
     cell = FIATSimplex()
-    cell.inventory.shape = "line"
+    cell.inventory.dimension = 1
     cell.inventory.degree = 2
     cell.inventory.order = 2
     cell._configure()
@@ -154,7 +154,7 @@
     spaceDim = 2
 
     cell = FIATSimplex()
-    cell.inventory.shape = "line"
+    cell.inventory.dimension = 1
     cell._configure()
     
     quadrature = SubMeshQuadrature()
@@ -175,7 +175,7 @@
     spaceDim = 3
 
     cell = FIATSimplex()
-    cell.inventory.shape = "triangle"
+    cell.inventory.dimension = 2
     cell._configure()
     
     quadrature = SubMeshQuadrature()

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/materials/TestMaterial.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/materials/TestMaterial.py	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/materials/TestMaterial.py	2012-05-07 20:41:28 UTC (rev 20049)
@@ -141,7 +141,7 @@
     """
     from pylith.feassemble.FIATSimplex import FIATSimplex
     cell = FIATSimplex()
-    cell.inventory.shape = "line"
+    cell.inventory.dimension = 1
     cell.inventory.order = 1
     cell.inventory.degree = 1
     cell._configure()

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/meshio/TestCellFilterAvg.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/meshio/TestCellFilterAvg.py	2012-05-07 20:37:29 UTC (rev 20048)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/meshio/TestCellFilterAvg.py	2012-05-07 20:41:28 UTC (rev 20049)
@@ -49,7 +49,7 @@
     
     from pylith.feassemble.FIATSimplex import FIATSimplex
     cell = FIATSimplex()
-    cell.inventory.shape = "line"
+    cell.inventory.dimension = 1
     cell.inventory.degree = 2
     cell.inventory.order = 2
     cell._configure()
@@ -99,7 +99,7 @@
     
     from pylith.feassemble.FIATSimplex import FIATSimplex
     cell = FIATSimplex()
-    cell.inventory.shape = "line"
+    cell.inventory.dimension = 1
     cell.inventory.degree = 2
     cell.inventory.order = 2
     cell._configure()



More information about the CIG-COMMITS mailing list