[cig-commits] r20406 - in short/3D/PyLith/trunk: . applications/utilities doc/presentations doc/presentations/logos doc/releasenotes doc/userguide doc/userguide/benchmarks doc/userguide/benchmarks/savageprescott doc/userguide/boundaryconditions doc/userguide/cover doc/userguide/extending doc/userguide/fileformats doc/userguide/install doc/userguide/intro doc/userguide/materials doc/userguide/runpylith doc/userguide/tutorials doc/userguide/tutorials/3dhex8 doc/userguide/tutorials/3dhex8/friction doc/userguide/tutorials/3dhex8/quasistatic doc/userguide/tutorials/3dhex8/surfload doc/userguide/tutorials/3dtet4 doc/userguide/tutorials/shearwave doc/userguide/tutorials/subduction doc/userguide/tutorials/subduction/figs doc/userguide/tutorials/twohex8 doc/userguide/tutorials/twoquad4 doc/userguide/tutorials/twotet4 doc/userguide/tutorials/twotet4-geoproj doc/userguide/tutorials/twotri3 examples examples/2d examples/2d/subduction examples/3d/hex8 examples/3d/hex8/spatialdb examples/3d/hex8/spatialdb/powerlaw examples/3d/tet4 examples/bar_shearwave/hex8 examples/bar_shearwave/quad4 examples/bar_shearwave/tet4 examples/bar_shearwave/tri3 examples/greensfns examples/greensfns/hex8 examples/greensfns/hex8/gfimpulses examples/greensfns/hex8/gfresponses examples/greensfns/hex8/gfspatialdb examples/meshing/surface_nurbs/contours examples/meshing/surface_nurbs/dem examples/meshing/surface_nurbs/triangles examples/twocells/twohex27-cubit examples/twocells/twohex8 examples/twocells/twoquad4 examples/twocells/twotet4 examples/twocells/twotet4-geoproj examples/twocells/twotri3 libsrc/pylith libsrc/pylith/bc libsrc/pylith/faults libsrc/pylith/feassemble libsrc/pylith/materials libsrc/pylith/meshio libsrc/pylith/problems libsrc/pylith/topology libsrc/pylith/utils modulesrc/bc modulesrc/faults modulesrc/materials modulesrc/problems playpen/euler playpen/faultfaces/test playpen/postproc playpen/postproc/fault playpen/powerlaw playpen/quadratic/twohex27 playpen/quadratic/twoquad9 playpen/quadratic/twotet10 playpen/reordering playpen/savpres_ss pylith pylith/bc pylith/faults pylith/feassemble pylith/materials pylith/meshio pylith/problems pylith/tests templates/friction templates/friction/tests templates/materials tests tests/2d tests/2d/faultstrip tests/2d/frictionslide tests/2d/maxwell tests/2d/plasticity/static tests/2d/slipdir tests/3d/cyclicfriction tests/3d/matprops tests/3d/plasticity/dynamic tests/3d/plasticity/threehex8/config tests/3d/refine tests/3d/relaxation tests/3d/slipdir tests/refinefaulttip tests_auto/1d/line2 tests_auto/1d/line3 tests_auto/2d/quad4 tests_auto/2d/quad9 tests_auto/2d/tri3 tests_auto/2d/tri6 tests_auto/3d/hex8 tests_auto/3d/tet4 tests_auto/3dnew/hex27 tests_auto/3dnew/hex8 tests_auto/3dnew/tet10 tests_auto/3dnew/tet4 unittests/libtests/faults unittests/libtests/faults/data unittests/libtests/materials unittests/libtests/materials/data unittests/libtests/meshio unittests/libtests/meshio/data unittests/pytests/bc unittests/pytests/faults unittests/pytests/faults/data unittests/pytests/feassemble unittests/pytests/friction unittests/pytests/materials unittests/pytests/meshio unittests/pytests/utils

brad at geodynamics.org brad at geodynamics.org
Mon Jun 25 10:37:06 PDT 2012


Author: brad
Date: 2012-06-25 10:37:03 -0700 (Mon, 25 Jun 2012)
New Revision: 20406

Added:
   short/3D/PyLith/trunk/doc/presentations/logos/cig_blackfg.png
   short/3D/PyLith/trunk/doc/presentations/pylith1.6/
   short/3D/PyLith/trunk/doc/presentations/pylith1.7/
   short/3D/PyLith/trunk/doc/releasenotes/announce_v1.7.0.txt
   short/3D/PyLith/trunk/doc/releasenotes/announce_v1.7.1.txt
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/dike/
   short/3D/PyLith/trunk/doc/userguide/tutorials/greensfns2d/
   short/3D/PyLith/trunk/doc/userguide/tutorials/subduction/figs/step04_soln.png
   short/3D/PyLith/trunk/examples/2d/greensfns/
   short/3D/PyLith/trunk/examples/2d/subduction/afterslip_tractions.py
   short/3D/PyLith/trunk/examples/2d/subduction/afterslip_tractions.spatialdb
   short/3D/PyLith/trunk/examples/2d/subduction/plot_faultinfo.py
   short/3D/PyLith/trunk/examples/2d/subduction/step04.cfg
   short/3D/PyLith/trunk/examples/3d/hex8/spatialdb/tractions_opening.spatialdb
   short/3D/PyLith/trunk/examples/3d/hex8/step20.cfg
   short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveImpulses.cc
   short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveImpulses.hh
   short/3D/PyLith/trunk/libsrc/pylith/faults/StaticPerturbation.cc
   short/3D/PyLith/trunk/libsrc/pylith/faults/StaticPerturbation.hh
   short/3D/PyLith/trunk/libsrc/pylith/faults/StaticPerturbation.icc
   short/3D/PyLith/trunk/libsrc/pylith/faults/TractPerturbation.cc
   short/3D/PyLith/trunk/libsrc/pylith/faults/TractPerturbation.hh
   short/3D/PyLith/trunk/libsrc/pylith/materials/PowerLawPlaneStrain.cc
   short/3D/PyLith/trunk/libsrc/pylith/materials/PowerLawPlaneStrain.hh
   short/3D/PyLith/trunk/libsrc/pylith/materials/PowerLawPlaneStrain.icc
   short/3D/PyLith/trunk/modulesrc/faults/FaultCohesiveImpulses.i
   short/3D/PyLith/trunk/modulesrc/faults/TractPerturbation.i
   short/3D/PyLith/trunk/modulesrc/materials/PowerLawPlaneStrain.i
   short/3D/PyLith/trunk/pylith/faults/FaultCohesiveImpulses.py
   short/3D/PyLith/trunk/pylith/faults/TractPerturbation.py
   short/3D/PyLith/trunk/pylith/materials/PowerLawPlaneStrain.py
   short/3D/PyLith/trunk/pylith/meshio/OutputFaultImpulses.py
   short/3D/PyLith/trunk/tests/2d/powerlaw/
   short/3D/PyLith/trunk/tests/runtests.sh
   short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveImpulses.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveImpulses.hh
   short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveImpulsesCases.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveImpulsesCases.hh
   short/3D/PyLith/trunk/unittests/libtests/faults/TestTractPerturbation.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/TestTractPerturbation.hh
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveImpulsesData.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveImpulsesData.hh
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveImpulsesDataHex8.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveImpulsesDataHex8.hh
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveImpulsesDataQuad4.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveImpulsesDataQuad4.hh
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveImpulsesDataTet4.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveImpulsesDataTet4.hh
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveImpulsesDataTri3.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveImpulsesDataTri3.hh
   short/3D/PyLith/trunk/unittests/libtests/faults/data/hex8_impulses.spatialdb
   short/3D/PyLith/trunk/unittests/libtests/faults/data/quad4_impulses.spatialdb
   short/3D/PyLith/trunk/unittests/libtests/faults/data/tet4_impulses.spatialdb
   short/3D/PyLith/trunk/unittests/libtests/faults/data/tri3_changetract.spatialdb
   short/3D/PyLith/trunk/unittests/libtests/faults/data/tri3_impulses.spatialdb
   short/3D/PyLith/trunk/unittests/libtests/materials/TestPowerLawPlaneStrain.cc
   short/3D/PyLith/trunk/unittests/libtests/materials/TestPowerLawPlaneStrain.hh
   short/3D/PyLith/trunk/unittests/libtests/materials/data/PowerLawPlaneStrainElastic.py
   short/3D/PyLith/trunk/unittests/libtests/materials/data/PowerLawPlaneStrainElasticData.cc
   short/3D/PyLith/trunk/unittests/libtests/materials/data/PowerLawPlaneStrainElasticData.hh
   short/3D/PyLith/trunk/unittests/libtests/materials/data/PowerLawPlaneStrainTimeDep.py
   short/3D/PyLith/trunk/unittests/libtests/materials/data/PowerLawPlaneStrainTimeDepData.cc
   short/3D/PyLith/trunk/unittests/libtests/materials/data/PowerLawPlaneStrainTimeDepData.hh
   short/3D/PyLith/trunk/unittests/pytests/faults/TestFaultCohesiveImpulses.py
   short/3D/PyLith/trunk/unittests/pytests/faults/TestTractPerturbation.py
   short/3D/PyLith/trunk/unittests/pytests/faults/data/tri3_changetractions.spatialdb
   short/3D/PyLith/trunk/unittests/pytests/faults/data/tri3_impulses.spatialdb
   short/3D/PyLith/trunk/unittests/pytests/materials/TestPowerLawPlaneStrain.py
Removed:
   short/3D/PyLith/trunk/examples/greensfns/Makefile.am
   short/3D/PyLith/trunk/examples/greensfns/hex8/Makefile.am
   short/3D/PyLith/trunk/examples/greensfns/hex8/gfimpulses/Makefile.am
   short/3D/PyLith/trunk/examples/greensfns/hex8/gfresponses/Makefile.am
   short/3D/PyLith/trunk/examples/greensfns/hex8/gfspatialdb/Makefile.am
   short/3D/PyLith/trunk/unittests/libtests/faults/data/hex8traction.mesh
   short/3D/PyLith/trunk/unittests/libtests/faults/data/quad4traction.mesh
   short/3D/PyLith/trunk/unittests/libtests/faults/data/tet4traction.mesh
   short/3D/PyLith/trunk/unittests/libtests/faults/data/tri3traction.mesh
Modified:
   short/3D/PyLith/trunk/README
   short/3D/PyLith/trunk/TODO
   short/3D/PyLith/trunk/applications/utilities/Makefile.am
   short/3D/PyLith/trunk/configure.ac
   short/3D/PyLith/trunk/doc/presentations/Makefile.am
   short/3D/PyLith/trunk/doc/releasenotes/checklist.txt
   short/3D/PyLith/trunk/doc/userguide/TODO
   short/3D/PyLith/trunk/doc/userguide/benchmarks/benchmarks.lyx
   short/3D/PyLith/trunk/doc/userguide/benchmarks/savageprescott/savageprescott.lyx
   short/3D/PyLith/trunk/doc/userguide/boundaryconditions/boundaryconditions.lyx
   short/3D/PyLith/trunk/doc/userguide/components.lyx
   short/3D/PyLith/trunk/doc/userguide/cover/cover.pdf
   short/3D/PyLith/trunk/doc/userguide/cover/cover.svg.gz
   short/3D/PyLith/trunk/doc/userguide/cover/cover_small.jpg
   short/3D/PyLith/trunk/doc/userguide/extending/extending.lyx
   short/3D/PyLith/trunk/doc/userguide/fileformats/fileformats.lyx
   short/3D/PyLith/trunk/doc/userguide/install/install.lyx
   short/3D/PyLith/trunk/doc/userguide/intro/intro.lyx
   short/3D/PyLith/trunk/doc/userguide/license.lyx
   short/3D/PyLith/trunk/doc/userguide/materials/materials.lyx
   short/3D/PyLith/trunk/doc/userguide/preface.lyx
   short/3D/PyLith/trunk/doc/userguide/runpylith/runpylith.lyx
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/3dhex8.lyx
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/friction/friction.lyx
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/quasistatic/quasistatic.lyx
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/surfload/surfload.lyx
   short/3D/PyLith/trunk/doc/userguide/tutorials/3dtet4/3dtet4.lyx
   short/3D/PyLith/trunk/doc/userguide/tutorials/shearwave/hex8.lyx
   short/3D/PyLith/trunk/doc/userguide/tutorials/shearwave/quad4.lyx
   short/3D/PyLith/trunk/doc/userguide/tutorials/shearwave/shearwave.lyx
   short/3D/PyLith/trunk/doc/userguide/tutorials/shearwave/tet4.lyx
   short/3D/PyLith/trunk/doc/userguide/tutorials/shearwave/tri3.lyx
   short/3D/PyLith/trunk/doc/userguide/tutorials/subduction/subduction.lyx
   short/3D/PyLith/trunk/doc/userguide/tutorials/tutorials.lyx
   short/3D/PyLith/trunk/doc/userguide/tutorials/twohex8/twohex8.lyx
   short/3D/PyLith/trunk/doc/userguide/tutorials/twoquad4/twoquad4.lyx
   short/3D/PyLith/trunk/doc/userguide/tutorials/twotet4-geoproj/twotet4-geoproj.lyx
   short/3D/PyLith/trunk/doc/userguide/tutorials/twotet4/twotet4.lyx
   short/3D/PyLith/trunk/doc/userguide/tutorials/twotri3/twotri3.lyx
   short/3D/PyLith/trunk/doc/userguide/userguide.lyx
   short/3D/PyLith/trunk/examples/2d/Makefile.am
   short/3D/PyLith/trunk/examples/2d/subduction/Makefile.am
   short/3D/PyLith/trunk/examples/2d/subduction/README
   short/3D/PyLith/trunk/examples/2d/subduction/pylithapp.cfg
   short/3D/PyLith/trunk/examples/2d/subduction/step01.cfg
   short/3D/PyLith/trunk/examples/2d/subduction/step02.cfg
   short/3D/PyLith/trunk/examples/2d/subduction/step03.cfg
   short/3D/PyLith/trunk/examples/3d/hex8/Makefile.am
   short/3D/PyLith/trunk/examples/3d/hex8/README
   short/3D/PyLith/trunk/examples/3d/hex8/spatialdb/powerlaw/powerlaw_gendb.cfg
   short/3D/PyLith/trunk/examples/3d/hex8/step02.cfg
   short/3D/PyLith/trunk/examples/3d/hex8/step05.cfg
   short/3D/PyLith/trunk/examples/3d/hex8/step18.cfg
   short/3D/PyLith/trunk/examples/3d/hex8/step19.cfg
   short/3D/PyLith/trunk/examples/3d/tet4/pylithapp.cfg
   short/3D/PyLith/trunk/examples/3d/tet4/step02.cfg
   short/3D/PyLith/trunk/examples/3d/tet4/step03.cfg
   short/3D/PyLith/trunk/examples/3d/tet4/step04.cfg
   short/3D/PyLith/trunk/examples/Makefile.am
   short/3D/PyLith/trunk/examples/bar_shearwave/hex8/pylithapp.cfg
   short/3D/PyLith/trunk/examples/bar_shearwave/quad4/dynamic.cfg
   short/3D/PyLith/trunk/examples/bar_shearwave/quad4/dynamic_ratestateageing.cfg
   short/3D/PyLith/trunk/examples/bar_shearwave/quad4/dynamic_slipweakening.cfg
   short/3D/PyLith/trunk/examples/bar_shearwave/quad4/dynamic_staticfriction.cfg
   short/3D/PyLith/trunk/examples/bar_shearwave/quad4/kinematic.cfg
   short/3D/PyLith/trunk/examples/bar_shearwave/quad4/pylithapp.cfg
   short/3D/PyLith/trunk/examples/bar_shearwave/tet4/pylithapp.cfg
   short/3D/PyLith/trunk/examples/bar_shearwave/tri3/pylithapp.cfg
   short/3D/PyLith/trunk/examples/greensfns/hex8/README
   short/3D/PyLith/trunk/examples/greensfns/hex8/gfgen.cfg
   short/3D/PyLith/trunk/examples/greensfns/hex8/gfoutput.cfg
   short/3D/PyLith/trunk/examples/greensfns/hex8/initial-run.cfg
   short/3D/PyLith/trunk/examples/greensfns/hex8/pylithapp.cfg
   short/3D/PyLith/trunk/examples/meshing/surface_nurbs/contours/cont2lines.cfg
   short/3D/PyLith/trunk/examples/meshing/surface_nurbs/contours/fill_contours.cfg
   short/3D/PyLith/trunk/examples/meshing/surface_nurbs/dem/dem2lines.cfg
   short/3D/PyLith/trunk/examples/meshing/surface_nurbs/triangles/mkfacets.py
   short/3D/PyLith/trunk/examples/run_examples.sh
   short/3D/PyLith/trunk/examples/twocells/twohex27-cubit/axialdisp.cfg
   short/3D/PyLith/trunk/examples/twocells/twohex27-cubit/dislocation.cfg
   short/3D/PyLith/trunk/examples/twocells/twohex27-cubit/pylithapp.cfg
   short/3D/PyLith/trunk/examples/twocells/twohex27-cubit/sheardisp.cfg
   short/3D/PyLith/trunk/examples/twocells/twohex8/axialdisp.cfg
   short/3D/PyLith/trunk/examples/twocells/twohex8/dislocation.cfg
   short/3D/PyLith/trunk/examples/twocells/twohex8/dislocation_sliptime.spatialdb
   short/3D/PyLith/trunk/examples/twocells/twohex8/pylithapp.cfg
   short/3D/PyLith/trunk/examples/twocells/twohex8/sheardisp.cfg
   short/3D/PyLith/trunk/examples/twocells/twoquad4/axialdisp.cfg
   short/3D/PyLith/trunk/examples/twocells/twoquad4/axialtract.cfg
   short/3D/PyLith/trunk/examples/twocells/twoquad4/dislocation.cfg
   short/3D/PyLith/trunk/examples/twocells/twoquad4/dislocation_sliptime.spatialdb
   short/3D/PyLith/trunk/examples/twocells/twoquad4/pylithapp.cfg
   short/3D/PyLith/trunk/examples/twocells/twoquad4/sheardisp.cfg
   short/3D/PyLith/trunk/examples/twocells/twotet4-geoproj/dislocation.cfg
   short/3D/PyLith/trunk/examples/twocells/twotet4-geoproj/dislocation_sliptime.spatialdb
   short/3D/PyLith/trunk/examples/twocells/twotet4-geoproj/pylithapp.cfg
   short/3D/PyLith/trunk/examples/twocells/twotet4/axialdisp.cfg
   short/3D/PyLith/trunk/examples/twocells/twotet4/dislocation.cfg
   short/3D/PyLith/trunk/examples/twocells/twotet4/dislocation_sliptime.spatialdb
   short/3D/PyLith/trunk/examples/twocells/twotet4/pylithapp.cfg
   short/3D/PyLith/trunk/examples/twocells/twotri3/axialdisp.cfg
   short/3D/PyLith/trunk/examples/twocells/twotri3/dislocation.cfg
   short/3D/PyLith/trunk/examples/twocells/twotri3/dislocation_sliptime.spatialdb
   short/3D/PyLith/trunk/examples/twocells/twotri3/pylithapp.cfg
   short/3D/PyLith/trunk/examples/twocells/twotri3/sheardisp.cfg
   short/3D/PyLith/trunk/libsrc/pylith/Makefile.am
   short/3D/PyLith/trunk/libsrc/pylith/bc/DirichletBoundary.cc
   short/3D/PyLith/trunk/libsrc/pylith/bc/Neumann.cc
   short/3D/PyLith/trunk/libsrc/pylith/bc/Neumann.hh
   short/3D/PyLith/trunk/libsrc/pylith/bc/TimeDependent.hh
   short/3D/PyLith/trunk/libsrc/pylith/bc/TimeDependentPoints.hh
   short/3D/PyLith/trunk/libsrc/pylith/faults/BruneSlipFn.cc
   short/3D/PyLith/trunk/libsrc/pylith/faults/BruneSlipFn.hh
   short/3D/PyLith/trunk/libsrc/pylith/faults/ConstRateSlipFn.cc
   short/3D/PyLith/trunk/libsrc/pylith/faults/ConstRateSlipFn.hh
   short/3D/PyLith/trunk/libsrc/pylith/faults/EqKinSrc.cc
   short/3D/PyLith/trunk/libsrc/pylith/faults/EqKinSrc.hh
   short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveDyn.cc
   short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveDyn.hh
   short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveKin.cc
   short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveLagrange.cc
   short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveLagrange.hh
   short/3D/PyLith/trunk/libsrc/pylith/faults/LiuCosSlipFn.cc
   short/3D/PyLith/trunk/libsrc/pylith/faults/LiuCosSlipFn.hh
   short/3D/PyLith/trunk/libsrc/pylith/faults/Makefile.am
   short/3D/PyLith/trunk/libsrc/pylith/faults/SlipTimeFn.hh
   short/3D/PyLith/trunk/libsrc/pylith/faults/StepSlipFn.cc
   short/3D/PyLith/trunk/libsrc/pylith/faults/StepSlipFn.hh
   short/3D/PyLith/trunk/libsrc/pylith/faults/TimeHistorySlipFn.cc
   short/3D/PyLith/trunk/libsrc/pylith/faults/TimeHistorySlipFn.hh
   short/3D/PyLith/trunk/libsrc/pylith/faults/faultsfwd.hh
   short/3D/PyLith/trunk/libsrc/pylith/feassemble/ElasticityExplicit.cc
   short/3D/PyLith/trunk/libsrc/pylith/materials/DruckerPrager3D.cc
   short/3D/PyLith/trunk/libsrc/pylith/materials/DruckerPrager3D.hh
   short/3D/PyLith/trunk/libsrc/pylith/materials/DruckerPragerPlaneStrain.cc
   short/3D/PyLith/trunk/libsrc/pylith/materials/DruckerPragerPlaneStrain.hh
   short/3D/PyLith/trunk/libsrc/pylith/materials/GenMaxwellIsotropic3D.cc
   short/3D/PyLith/trunk/libsrc/pylith/materials/GenMaxwellPlaneStrain.cc
   short/3D/PyLith/trunk/libsrc/pylith/materials/GenMaxwellQpQsIsotropic3D.cc
   short/3D/PyLith/trunk/libsrc/pylith/materials/Makefile.am
   short/3D/PyLith/trunk/libsrc/pylith/materials/Material.hh
   short/3D/PyLith/trunk/libsrc/pylith/materials/Material.icc
   short/3D/PyLith/trunk/libsrc/pylith/materials/MaxwellIsotropic3D.cc
   short/3D/PyLith/trunk/libsrc/pylith/materials/MaxwellPlaneStrain.cc
   short/3D/PyLith/trunk/libsrc/pylith/materials/PowerLaw3D.cc
   short/3D/PyLith/trunk/libsrc/pylith/materials/PowerLaw3D.hh
   short/3D/PyLith/trunk/libsrc/pylith/materials/materialsfwd.hh
   short/3D/PyLith/trunk/libsrc/pylith/meshio/DataWriterHDF5.cc
   short/3D/PyLith/trunk/libsrc/pylith/meshio/DataWriterHDF5.hh
   short/3D/PyLith/trunk/libsrc/pylith/meshio/DataWriterHDF5Ext.cc
   short/3D/PyLith/trunk/libsrc/pylith/meshio/DataWriterVTK.cc
   short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshBuilder.cc
   short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshIOAscii.cc
   short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshIOCubit.cc
   short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshIOHDF5.cc
   short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshIOLagrit.cc
   short/3D/PyLith/trunk/libsrc/pylith/meshio/OutputSolnPoints.cc
   short/3D/PyLith/trunk/libsrc/pylith/meshio/Xdmf.cc
   short/3D/PyLith/trunk/libsrc/pylith/problems/Formulation.cc
   short/3D/PyLith/trunk/libsrc/pylith/problems/Formulation.hh
   short/3D/PyLith/trunk/libsrc/pylith/problems/Solver.cc
   short/3D/PyLith/trunk/libsrc/pylith/problems/Solver.hh
   short/3D/PyLith/trunk/libsrc/pylith/problems/SolverLinear.cc
   short/3D/PyLith/trunk/libsrc/pylith/problems/SolverNonlinear.cc
   short/3D/PyLith/trunk/libsrc/pylith/topology/Distributor.cc
   short/3D/PyLith/trunk/libsrc/pylith/topology/Mesh.hh
   short/3D/PyLith/trunk/libsrc/pylith/topology/Mesh.icc
   short/3D/PyLith/trunk/libsrc/pylith/topology/RefineEdges2.cc
   short/3D/PyLith/trunk/libsrc/pylith/topology/ReverseCuthillMcKee.cc
   short/3D/PyLith/trunk/libsrc/pylith/utils/Makefile.am
   short/3D/PyLith/trunk/libsrc/pylith/utils/constdefs.h
   short/3D/PyLith/trunk/modulesrc/bc/TimeDependent.i
   short/3D/PyLith/trunk/modulesrc/faults/BruneSlipFn.i
   short/3D/PyLith/trunk/modulesrc/faults/ConstRateSlipFn.i
   short/3D/PyLith/trunk/modulesrc/faults/EqKinSrc.i
   short/3D/PyLith/trunk/modulesrc/faults/FaultCohesiveDyn.i
   short/3D/PyLith/trunk/modulesrc/faults/LiuCosSlipFn.i
   short/3D/PyLith/trunk/modulesrc/faults/Makefile.am
   short/3D/PyLith/trunk/modulesrc/faults/SlipTimeFn.i
   short/3D/PyLith/trunk/modulesrc/faults/StepSlipFn.i
   short/3D/PyLith/trunk/modulesrc/faults/TimeHistorySlipFn.i
   short/3D/PyLith/trunk/modulesrc/faults/faults.i
   short/3D/PyLith/trunk/modulesrc/materials/Makefile.am
   short/3D/PyLith/trunk/modulesrc/materials/materials.i
   short/3D/PyLith/trunk/modulesrc/problems/Formulation.i
   short/3D/PyLith/trunk/playpen/euler/euler.cfg
   short/3D/PyLith/trunk/playpen/faultfaces/test/pylithapp.cfg
   short/3D/PyLith/trunk/playpen/postproc/fault/faultinfo.cfg
   short/3D/PyLith/trunk/playpen/postproc/princaxes.cfg
   short/3D/PyLith/trunk/playpen/postproc/vtkcff.cfg
   short/3D/PyLith/trunk/playpen/postproc/vtkdiff.cfg
   short/3D/PyLith/trunk/playpen/powerlaw/powerlaw_gendb.cfg
   short/3D/PyLith/trunk/playpen/quadratic/twohex27/axialdisp.cfg
   short/3D/PyLith/trunk/playpen/quadratic/twohex27/dislocation.cfg
   short/3D/PyLith/trunk/playpen/quadratic/twohex27/pylithapp.cfg
   short/3D/PyLith/trunk/playpen/quadratic/twoquad9/axialdisp.cfg
   short/3D/PyLith/trunk/playpen/quadratic/twoquad9/dislocation.cfg
   short/3D/PyLith/trunk/playpen/quadratic/twoquad9/pylithapp.cfg
   short/3D/PyLith/trunk/playpen/quadratic/twotet10/dislocation.cfg
   short/3D/PyLith/trunk/playpen/quadratic/twotet10/pylithapp.cfg
   short/3D/PyLith/trunk/playpen/reordering/pylithapp.cfg
   short/3D/PyLith/trunk/playpen/savpres_ss/savpres_ss.cfg
   short/3D/PyLith/trunk/pylith/Makefile.am
   short/3D/PyLith/trunk/pylith/bc/DirichletBoundary.py
   short/3D/PyLith/trunk/pylith/bc/Neumann.py
   short/3D/PyLith/trunk/pylith/faults/Fault.py
   short/3D/PyLith/trunk/pylith/faults/FaultCohesiveDyn.py
   short/3D/PyLith/trunk/pylith/feassemble/FIATLagrange.py
   short/3D/PyLith/trunk/pylith/feassemble/FIATSimplex.py
   short/3D/PyLith/trunk/pylith/materials/GenMaxwellIsotropic3D.py
   short/3D/PyLith/trunk/pylith/materials/GenMaxwellPlaneStrain.py
   short/3D/PyLith/trunk/pylith/materials/GenMaxwellQpQsIsotropic3D.py
   short/3D/PyLith/trunk/pylith/materials/MaxwellPlaneStrain.py
   short/3D/PyLith/trunk/pylith/materials/__init__.py
   short/3D/PyLith/trunk/pylith/problems/Explicit.py
   short/3D/PyLith/trunk/pylith/problems/Formulation.py
   short/3D/PyLith/trunk/pylith/problems/GreensFns.py
   short/3D/PyLith/trunk/pylith/problems/Implicit.py
   short/3D/PyLith/trunk/pylith/problems/Solver.py
   short/3D/PyLith/trunk/pylith/problems/TimeDependent.py
   short/3D/PyLith/trunk/pylith/tests/Fault.py
   short/3D/PyLith/trunk/pylith/tests/PhysicalProperties.py
   short/3D/PyLith/trunk/pylith/tests/Solution.py
   short/3D/PyLith/trunk/pylith/tests/StateVariables.py
   short/3D/PyLith/trunk/pylith/tests/__init__.py
   short/3D/PyLith/trunk/setup.py
   short/3D/PyLith/trunk/templates/friction/Makefile.am
   short/3D/PyLith/trunk/templates/friction/ViscousFriction.cc
   short/3D/PyLith/trunk/templates/friction/ViscousFriction.hh
   short/3D/PyLith/trunk/templates/friction/ViscousFriction.i
   short/3D/PyLith/trunk/templates/friction/configure.ac
   short/3D/PyLith/trunk/templates/friction/frictioncontrib.i
   short/3D/PyLith/trunk/templates/friction/tests/TestViscousFriction.py
   short/3D/PyLith/trunk/templates/materials/Makefile.am
   short/3D/PyLith/trunk/templates/materials/PlaneStrainState.cc
   short/3D/PyLith/trunk/templates/materials/PlaneStrainState.hh
   short/3D/PyLith/trunk/templates/materials/PlaneStrainState.i
   short/3D/PyLith/trunk/templates/materials/configure.ac
   short/3D/PyLith/trunk/templates/materials/materialscontrib.i
   short/3D/PyLith/trunk/tests/2d/Makefile.am
   short/3D/PyLith/trunk/tests/2d/faultstrip/dynamic_slipweakening.cfg
   short/3D/PyLith/trunk/tests/2d/faultstrip/dynamic_timeweakening.cfg
   short/3D/PyLith/trunk/tests/2d/faultstrip/pylithapp.cfg
   short/3D/PyLith/trunk/tests/2d/frictionslide/pylithapp.cfg
   short/3D/PyLith/trunk/tests/2d/frictionslide/ratestate.cfg
   short/3D/PyLith/trunk/tests/2d/frictionslide/ratestate_stable.cfg
   short/3D/PyLith/trunk/tests/2d/frictionslide/ratestate_weak.cfg
   short/3D/PyLith/trunk/tests/2d/frictionslide/tension.cfg
   short/3D/PyLith/trunk/tests/2d/maxwell/axialdisp2d.cfg
   short/3D/PyLith/trunk/tests/2d/maxwell/axialdisp3d.cfg
   short/3D/PyLith/trunk/tests/2d/maxwell/planestrain2d.cfg
   short/3D/PyLith/trunk/tests/2d/maxwell/planestrain3d.cfg
   short/3D/PyLith/trunk/tests/2d/maxwell/pylithapp.cfg
   short/3D/PyLith/trunk/tests/2d/maxwell/sheardisp2d.cfg
   short/3D/PyLith/trunk/tests/2d/maxwell/sheardisp3d.cfg
   short/3D/PyLith/trunk/tests/2d/plasticity/static/axialdisp_fine_2d.cfg
   short/3D/PyLith/trunk/tests/2d/plasticity/static/axialdisp_fine_3d.cfg
   short/3D/PyLith/trunk/tests/2d/plasticity/static/axialdisp_twocells_2d.cfg
   short/3D/PyLith/trunk/tests/2d/plasticity/static/axialdisp_twocells_3d.cfg
   short/3D/PyLith/trunk/tests/2d/plasticity/static/planestrain_fine_2d.cfg
   short/3D/PyLith/trunk/tests/2d/plasticity/static/planestrain_fine_3d.cfg
   short/3D/PyLith/trunk/tests/2d/plasticity/static/planestrain_twocells_2d.cfg
   short/3D/PyLith/trunk/tests/2d/plasticity/static/planestrain_twocells_3d.cfg
   short/3D/PyLith/trunk/tests/2d/plasticity/static/pylithapp.cfg
   short/3D/PyLith/trunk/tests/2d/plasticity/static/sheardisp_fine_2d.cfg
   short/3D/PyLith/trunk/tests/2d/plasticity/static/sheardisp_fine_3d.cfg
   short/3D/PyLith/trunk/tests/2d/plasticity/static/sheardisp_twocells_2d.cfg
   short/3D/PyLith/trunk/tests/2d/plasticity/static/sheardisp_twocells_3d.cfg
   short/3D/PyLith/trunk/tests/2d/slipdir/fault_x.cfg
   short/3D/PyLith/trunk/tests/2d/slipdir/fault_xy1.cfg
   short/3D/PyLith/trunk/tests/2d/slipdir/fault_xy2.cfg
   short/3D/PyLith/trunk/tests/2d/slipdir/fault_y.cfg
   short/3D/PyLith/trunk/tests/2d/slipdir/pylithapp.cfg
   short/3D/PyLith/trunk/tests/3d/cyclicfriction/fieldsplit.cfg
   short/3D/PyLith/trunk/tests/3d/cyclicfriction/pylithapp.cfg
   short/3D/PyLith/trunk/tests/3d/matprops/pylithapp.cfg
   short/3D/PyLith/trunk/tests/3d/plasticity/dynamic/hex8.cfg
   short/3D/PyLith/trunk/tests/3d/plasticity/dynamic/hex8_pwave.cfg
   short/3D/PyLith/trunk/tests/3d/plasticity/dynamic/hex8_swave.cfg
   short/3D/PyLith/trunk/tests/3d/plasticity/dynamic/pwave.cfg
   short/3D/PyLith/trunk/tests/3d/plasticity/dynamic/pylithapp.cfg
   short/3D/PyLith/trunk/tests/3d/plasticity/dynamic/swave.cfg
   short/3D/PyLith/trunk/tests/3d/plasticity/dynamic/tet4.cfg
   short/3D/PyLith/trunk/tests/3d/plasticity/dynamic/tet4_pwave.cfg
   short/3D/PyLith/trunk/tests/3d/plasticity/dynamic/tet4_swave.cfg
   short/3D/PyLith/trunk/tests/3d/plasticity/threehex8/config/elas_ng_ni_v03.cfg
   short/3D/PyLith/trunk/tests/3d/plasticity/threehex8/config/plas_dp1_ng_ni_v03.cfg
   short/3D/PyLith/trunk/tests/3d/plasticity/threehex8/config/plas_dp2_ng_ni_v03.cfg
   short/3D/PyLith/trunk/tests/3d/plasticity/threehex8/config/plas_dp3_ng_ni_v03.cfg
   short/3D/PyLith/trunk/tests/3d/plasticity/threehex8/config/plas_vm1_ng_ni_v03.cfg
   short/3D/PyLith/trunk/tests/3d/plasticity/threehex8/config/pylithapp.cfg
   short/3D/PyLith/trunk/tests/3d/plasticity/threehex8/config/visc_e10_ng_ni_v03.cfg
   short/3D/PyLith/trunk/tests/3d/refine/pylithapp.cfg
   short/3D/PyLith/trunk/tests/3d/refine/tet4.cfg
   short/3D/PyLith/trunk/tests/3d/relaxation/pylithapp.cfg
   short/3D/PyLith/trunk/tests/3d/relaxation/shear_elastic.cfg
   short/3D/PyLith/trunk/tests/3d/relaxation/shear_genmaxwell.cfg
   short/3D/PyLith/trunk/tests/3d/relaxation/shear_genmaxwell_QpQs.cfg
   short/3D/PyLith/trunk/tests/3d/slipdir/fault_x.cfg
   short/3D/PyLith/trunk/tests/3d/slipdir/fault_xy.cfg
   short/3D/PyLith/trunk/tests/3d/slipdir/fault_xz1.cfg
   short/3D/PyLith/trunk/tests/3d/slipdir/fault_xz2.cfg
   short/3D/PyLith/trunk/tests/3d/slipdir/fault_y.cfg
   short/3D/PyLith/trunk/tests/3d/slipdir/fault_z.cfg
   short/3D/PyLith/trunk/tests/3d/slipdir/pylithapp.cfg
   short/3D/PyLith/trunk/tests/refinefaulttip/hex8.cfg
   short/3D/PyLith/trunk/tests/refinefaulttip/quad4.cfg
   short/3D/PyLith/trunk/tests/refinefaulttip/tet4.cfg
   short/3D/PyLith/trunk/tests/refinefaulttip/tri3.cfg
   short/3D/PyLith/trunk/tests_auto/1d/line2/TestDislocation.py
   short/3D/PyLith/trunk/tests_auto/1d/line2/TestExtensionDisp.py
   short/3D/PyLith/trunk/tests_auto/1d/line2/TestExtensionForce.py
   short/3D/PyLith/trunk/tests_auto/1d/line2/TestLine2.py
   short/3D/PyLith/trunk/tests_auto/1d/line2/dislocation.cfg
   short/3D/PyLith/trunk/tests_auto/1d/line2/extensiondisp.cfg
   short/3D/PyLith/trunk/tests_auto/1d/line2/extensionforce.cfg
   short/3D/PyLith/trunk/tests_auto/1d/line2/lgdeformtranslation.cfg
   short/3D/PyLith/trunk/tests_auto/1d/line3/TestAxial.py
   short/3D/PyLith/trunk/tests_auto/1d/line3/TestDislocation.py
   short/3D/PyLith/trunk/tests_auto/1d/line3/TestLine3.py
   short/3D/PyLith/trunk/tests_auto/1d/line3/axialextension.cfg
   short/3D/PyLith/trunk/tests_auto/1d/line3/dislocation.cfg
   short/3D/PyLith/trunk/tests_auto/2d/quad4/TestAxialDisp.py
   short/3D/PyLith/trunk/tests_auto/2d/quad4/TestDislocation.py
   short/3D/PyLith/trunk/tests_auto/2d/quad4/TestFrictionCompression.py
   short/3D/PyLith/trunk/tests_auto/2d/quad4/TestFrictionOpening.py
   short/3D/PyLith/trunk/tests_auto/2d/quad4/TestFrictionShearSliding.py
   short/3D/PyLith/trunk/tests_auto/2d/quad4/TestFrictionShearStick.py
   short/3D/PyLith/trunk/tests_auto/2d/quad4/TestLgDeformRigidBody.py
   short/3D/PyLith/trunk/tests_auto/2d/quad4/TestLgDeformTraction.py
   short/3D/PyLith/trunk/tests_auto/2d/quad4/TestQuad4.py
   short/3D/PyLith/trunk/tests_auto/2d/quad4/TestShearDisp.py
   short/3D/PyLith/trunk/tests_auto/2d/quad4/TestSlipWeakeningCompression.py
   short/3D/PyLith/trunk/tests_auto/2d/quad4/TestSlipWeakeningOpening.py
   short/3D/PyLith/trunk/tests_auto/2d/quad4/TestSlipWeakeningShearSliding.py
   short/3D/PyLith/trunk/tests_auto/2d/quad4/TestSlipWeakeningShearStick.py
   short/3D/PyLith/trunk/tests_auto/2d/quad4/axialdisp.cfg
   short/3D/PyLith/trunk/tests_auto/2d/quad4/axialdisp_gendb.py
   short/3D/PyLith/trunk/tests_auto/2d/quad4/axialdisp_soln.py
   short/3D/PyLith/trunk/tests_auto/2d/quad4/dislocation.cfg
   short/3D/PyLith/trunk/tests_auto/2d/quad4/dislocation2.cfg
   short/3D/PyLith/trunk/tests_auto/2d/quad4/dislocation_soln.py
   short/3D/PyLith/trunk/tests_auto/2d/quad4/fourcells_twofaults.cfg
   short/3D/PyLith/trunk/tests_auto/2d/quad4/friction_compression.cfg
   short/3D/PyLith/trunk/tests_auto/2d/quad4/friction_compression_soln.py
   short/3D/PyLith/trunk/tests_auto/2d/quad4/friction_opening.cfg
   short/3D/PyLith/trunk/tests_auto/2d/quad4/friction_opening_soln.py
   short/3D/PyLith/trunk/tests_auto/2d/quad4/friction_shear_sliding.cfg
   short/3D/PyLith/trunk/tests_auto/2d/quad4/friction_shear_sliding_soln.py
   short/3D/PyLith/trunk/tests_auto/2d/quad4/friction_shear_stick.cfg
   short/3D/PyLith/trunk/tests_auto/2d/quad4/friction_shear_stick_soln.py
   short/3D/PyLith/trunk/tests_auto/2d/quad4/lgdeformrigidbody.cfg
   short/3D/PyLith/trunk/tests_auto/2d/quad4/lgdeformtraction.cfg
   short/3D/PyLith/trunk/tests_auto/2d/quad4/lgdeformtraction_soln.py
   short/3D/PyLith/trunk/tests_auto/2d/quad4/rigidbody_gendb.py
   short/3D/PyLith/trunk/tests_auto/2d/quad4/rigidbody_soln.py
   short/3D/PyLith/trunk/tests_auto/2d/quad4/sheardisp.cfg
   short/3D/PyLith/trunk/tests_auto/2d/quad4/sheardisp_gendb.py
   short/3D/PyLith/trunk/tests_auto/2d/quad4/sheardisp_soln.py
   short/3D/PyLith/trunk/tests_auto/2d/quad4/slipweakening_compression.cfg
   short/3D/PyLith/trunk/tests_auto/2d/quad4/slipweakening_compression_soln.py
   short/3D/PyLith/trunk/tests_auto/2d/quad4/slipweakening_opening.cfg
   short/3D/PyLith/trunk/tests_auto/2d/quad4/slipweakening_opening_soln.py
   short/3D/PyLith/trunk/tests_auto/2d/quad4/slipweakening_shear_sliding.cfg
   short/3D/PyLith/trunk/tests_auto/2d/quad4/slipweakening_shear_sliding_soln.py
   short/3D/PyLith/trunk/tests_auto/2d/quad4/slipweakening_shear_stick.cfg
   short/3D/PyLith/trunk/tests_auto/2d/quad4/slipweakening_shear_stick_soln.py
   short/3D/PyLith/trunk/tests_auto/2d/quad4/testpylith.py
   short/3D/PyLith/trunk/tests_auto/2d/quad9/axialdisp.cfg
   short/3D/PyLith/trunk/tests_auto/2d/quad9/dislocation.cfg
   short/3D/PyLith/trunk/tests_auto/2d/tri3/TestAxialDisp.py
   short/3D/PyLith/trunk/tests_auto/2d/tri3/TestShearDisp.py
   short/3D/PyLith/trunk/tests_auto/2d/tri3/TestTri3.py
   short/3D/PyLith/trunk/tests_auto/2d/tri3/axialdisp.cfg
   short/3D/PyLith/trunk/tests_auto/2d/tri3/axialdisp_gendb.py
   short/3D/PyLith/trunk/tests_auto/2d/tri3/axialdisp_soln.py
   short/3D/PyLith/trunk/tests_auto/2d/tri3/dislocation.cfg
   short/3D/PyLith/trunk/tests_auto/2d/tri3/dislocation2.cfg
   short/3D/PyLith/trunk/tests_auto/2d/tri3/sheardisp.cfg
   short/3D/PyLith/trunk/tests_auto/2d/tri3/sheardisp_gendb.py
   short/3D/PyLith/trunk/tests_auto/2d/tri3/sheardisp_refine.cfg
   short/3D/PyLith/trunk/tests_auto/2d/tri3/sheardisp_soln.py
   short/3D/PyLith/trunk/tests_auto/2d/tri6/axialdisp.cfg
   short/3D/PyLith/trunk/tests_auto/2d/tri6/dislocation.cfg
   short/3D/PyLith/trunk/tests_auto/3d/hex8/axial-small-tractions.cfg
   short/3D/PyLith/trunk/tests_auto/3d/hex8/axialelasticisotropic.cfg
   short/3D/PyLith/trunk/tests_auto/3d/hex8/axialgenmax1-tract-8cells.cfg
   short/3D/PyLith/trunk/tests_auto/3d/hex8/axialgenmax2-tract-8cells.cfg
   short/3D/PyLith/trunk/tests_auto/3d/hex8/axialgenmax3-tract-8cells.cfg
   short/3D/PyLith/trunk/tests_auto/3d/hex8/axialgenmax4-tract-8cells.cfg
   short/3D/PyLith/trunk/tests_auto/3d/hex8/axialmaxwellisotropic.cfg
   short/3D/PyLith/trunk/tests_auto/3d/hex8/pylithapp.cfg
   short/3D/PyLith/trunk/tests_auto/3d/hex8/shearelastic-eightcells.cfg
   short/3D/PyLith/trunk/tests_auto/3d/hex8/shearelastic-fourcells.cfg
   short/3D/PyLith/trunk/tests_auto/3d/hex8/shearelastic-small.cfg
   short/3D/PyLith/trunk/tests_auto/3d/hex8/shearelastic-threecells.cfg
   short/3D/PyLith/trunk/tests_auto/3d/hex8/shearelastic-twocells.cfg
   short/3D/PyLith/trunk/tests_auto/3d/hex8/shearelastic-twocellsb.cfg
   short/3D/PyLith/trunk/tests_auto/3d/hex8/shearelasticisotropic.cfg
   short/3D/PyLith/trunk/tests_auto/3d/hex8/shearmaxwellisotropic.cfg
   short/3D/PyLith/trunk/tests_auto/3d/hex8/shearplanestrain.cfg
   short/3D/PyLith/trunk/tests_auto/3d/tet4/axialelasticisotropic.cfg
   short/3D/PyLith/trunk/tests_auto/3d/tet4/dislocation.cfg
   short/3D/PyLith/trunk/tests_auto/3d/tet4/shearelasticisotropic.cfg
   short/3D/PyLith/trunk/tests_auto/3dnew/hex27/axialdisp.cfg
   short/3D/PyLith/trunk/tests_auto/3dnew/hex27/dislocation.cfg
   short/3D/PyLith/trunk/tests_auto/3dnew/hex8/axialdisp.cfg
   short/3D/PyLith/trunk/tests_auto/3dnew/hex8/lgdeformrigidbody.cfg
   short/3D/PyLith/trunk/tests_auto/3dnew/hex8/lgdeformtraction.cfg
   short/3D/PyLith/trunk/tests_auto/3dnew/tet10/axialdisp.cfg
   short/3D/PyLith/trunk/tests_auto/3dnew/tet10/dislocation.cfg
   short/3D/PyLith/trunk/tests_auto/3dnew/tet4/axialdisp.cfg
   short/3D/PyLith/trunk/unittests/libtests/faults/Makefile.am
   short/3D/PyLith/trunk/unittests/libtests/faults/TestBruneSlipFn.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/TestBruneSlipFn.hh
   short/3D/PyLith/trunk/unittests/libtests/faults/TestConstRateSlipFn.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/TestConstRateSlipFn.hh
   short/3D/PyLith/trunk/unittests/libtests/faults/TestEqKinSrc.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/TestEqKinSrc.hh
   short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveDyn.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveDyn.hh
   short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveKin.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveKin.hh
   short/3D/PyLith/trunk/unittests/libtests/faults/TestLiuCosSlipFn.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/TestLiuCosSlipFn.hh
   short/3D/PyLith/trunk/unittests/libtests/faults/TestStepSlipFn.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/TestStepSlipFn.hh
   short/3D/PyLith/trunk/unittests/libtests/faults/TestTimeHistorySlipFn.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/TestTimeHistorySlipFn.hh
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDynDataHex8.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDynDataQuad4.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDynDataTet4.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDynDataTri3.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDynDataTri3d.cc
   short/3D/PyLith/trunk/unittests/libtests/faults/data/Makefile.am
   short/3D/PyLith/trunk/unittests/libtests/materials/Makefile.am
   short/3D/PyLith/trunk/unittests/libtests/materials/data/generate.sh
   short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterPoints.cc
   short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKPoints.cc
   short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterHDF5DataMeshLine2.cc
   short/3D/PyLith/trunk/unittests/libtests/meshio/data/OutputSolnPointsDataHex8.cc
   short/3D/PyLith/trunk/unittests/pytests/bc/TestAbsorbingDampers.py
   short/3D/PyLith/trunk/unittests/pytests/bc/TestNeumann.py
   short/3D/PyLith/trunk/unittests/pytests/faults/Makefile.am
   short/3D/PyLith/trunk/unittests/pytests/faults/TestFaultCohesiveDyn.py
   short/3D/PyLith/trunk/unittests/pytests/faults/TestFaultCohesiveKin.py
   short/3D/PyLith/trunk/unittests/pytests/faults/data/Makefile.am
   short/3D/PyLith/trunk/unittests/pytests/faults/testfaults.py
   short/3D/PyLith/trunk/unittests/pytests/feassemble/TestElasticityExplicit.py
   short/3D/PyLith/trunk/unittests/pytests/feassemble/TestElasticityExplicitLgDeform.py
   short/3D/PyLith/trunk/unittests/pytests/feassemble/TestElasticityImplicit.py
   short/3D/PyLith/trunk/unittests/pytests/feassemble/TestElasticityImplicitLgDeform.py
   short/3D/PyLith/trunk/unittests/pytests/feassemble/TestFIATSimplex.py
   short/3D/PyLith/trunk/unittests/pytests/feassemble/TestMeshQuadrature.py
   short/3D/PyLith/trunk/unittests/pytests/feassemble/TestSubMeshQuadrature.py
   short/3D/PyLith/trunk/unittests/pytests/friction/Makefile.am
   short/3D/PyLith/trunk/unittests/pytests/materials/Makefile.am
   short/3D/PyLith/trunk/unittests/pytests/materials/TestMaterial.py
   short/3D/PyLith/trunk/unittests/pytests/materials/testmaterials.py
   short/3D/PyLith/trunk/unittests/pytests/meshio/TestCellFilterAvg.py
   short/3D/PyLith/trunk/unittests/pytests/utils/Makefile.am
Log:
Merge from v1.7-trunk.

Modified: short/3D/PyLith/trunk/README
===================================================================
--- short/3D/PyLith/trunk/README	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/README	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,4 @@
-We are pleased to announce release of PyLith version 1.6.3
+We are pleased to announce release of PyLith version 1.7.1
 
 Please submit bug reports via the World Wide Web at:
     http://geodynamics.org/roundup    
@@ -62,6 +62,124 @@
 
 
 ======================================================================
+MIGRATING FROM VERSION 1.6 TO 1.7
+======================================================================
+
+Two changes are required when migrating from version 1.6 to 1.7.
+
+(1) The FIATSimplex object now has the same parameters as the
+    FIAGLagrange object.
+
+  Old setting                   New setting
+  ------------------------      ------------------
+  cell.shape = line             cell.dimension = 1
+  cell.shape = triangle         cell.dimension = 2
+  cell.shape = tetrahedron      cell.dimension = 3
+
+(2) Prescribed fault tractions for spontaneous earthquake rupture use
+    a new, more flexible implementation that follows the same
+    functional form for spatial and temporal variation as that used in
+    the Dirichlet and Neumann boundary conditions.
+
+  Old settings
+  --------------------------------------------------------------------
+  [pylithapp.timedependent.interfaces.fault]
+  db_initial_tractions = spatialdata.spatialdb.SimpleDB
+  db_initial_tractions.iohandler.filename = tractions.spatialdb
+  db_initial_tractions.label = Initial fault tractions
+
+  New settings
+  --------------------------------------------------------------------
+  traction_perturbation = pylith.faults.TractPerturbation
+  [pylithapp.timedependent.interfaces.fault.traction_perturbation]
+  db_initial = spatialdata.spatialdb.SimpleDB
+  db_initial.iohandler.filename = tractions.spatialdb
+  db_initial.label = Initial fault tractions
+
+
+----------------------------------------------------------------------
+Version 1.7.1
+----------------------------------------------------------------------
+
+* Bug fixes
+
+  - Fixed a couple of bugs in the spontaneous earthquake rupture for
+    quasi-static problems when running in parallel. These prevented
+    the nonlinear solve from converging and erroneously generated
+    fault-opening in a some cases.
+
+  - Minor updates to the documentation and manual. Added Green's
+    function examples to the manual.
+
+
+----------------------------------------------------------------------
+Version 1.7.0
+----------------------------------------------------------------------
+
+* New features
+
+  * User-friendly interface for Green's functions
+
+    A new problem type provides a user-friendly interface for
+    computing Green's functions associated with fault slip for complex
+    spatial variation in elastic properties. See examples/2d/greensfns
+    in the tutorials for examples.
+
+  * Output of solution field at user-specified locations
+ 
+    Added a new output manager for interpolation of the solution field
+    to user-specified point locations. This feature is useful for
+    comparison of the solution with observations and in computing
+    Green's functions. See examples/3d/hex8/step19 and
+    examples/2d/greensfns in the tutorials for examples.
+
+  * Plane strain version of Drucker-Prager elastoplastic model
+
+    Added a plane strain version of the Drucker-Prager elastoplastic
+    model. Additionally, the user can now select whether to use an
+    inscribed, intermediate, or circumscribed fit to the Mohr Coulomb
+    criterion.
+
+  * Spatial and temporal variation in tractions for spontaneous
+    earthquake rupture
+
+    Switched from a simple constant spatial variation in initial fault
+    tractions to the more flexible spatial and temporal variation
+    consistent with the Dirichlet, Neumann, and point force boundary
+    conditions. Also added a switch to turn on/off applying prescribed
+    fault tractions when the fault opens; the default behavior is to
+    stop applying prescribed fault tractions when the fault opens, but
+    turning this off allows simulation of dike intrusions via
+    prescribed fault tractions. See examples/3d/hex8/step20 in the
+    tutorials for an example of how to specify fault tractions with
+    the new implementation.
+  
+  * Ability to use PETSc GPU solvers
+
+    Added ability to build PyLith with either double (default) or
+    single precision floating point values to facilitate use of
+    GPUs. In order to use PETSc GPU solvers, CUDA and cusp must be
+    installed and PETSc must be configured to use CUDA. See the PyLith
+    manual and PETSc documentation for details.
+
+  * User-specified start time for simulations.
+
+    Users can set the simulation start time to any desired value. This
+    facilitates combining simulations to model the earthquake cycle.
+
+  * Elastic prestep in quasi-static simulations is optional.
+
+    The elastic prestep in quasi-static simulations can be skipped
+    (the default is to include the elastic prestep). This facilitates
+    combining simulations to model the earthquake cycle.
+
+* Bug fixes
+
+  - Fixed bug in the spontaneous earthquake rupture for quasi-static
+    problems when running in parallel. 
+
+
+======================================================================
 MIGRATING FROM VERSION 1.5 TO 1.6
 ======================================================================
 

Modified: short/3D/PyLith/trunk/TODO
===================================================================
--- short/3D/PyLith/trunk/TODO	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/TODO	2012-06-25 17:37:03 UTC (rev 20406)
@@ -11,33 +11,14 @@
     pylith step02.cfg ../../../share/debug_malloc.cfg
     pylith step04.cfg ../../../share/debug_malloc.cfg
 
-* Point interpolation
+* Prescribed fault with opening has zero tractions (step20) Appears to
+  be a feature/artifact associated with how we implement slip with
+  Lagrange multipliers.
 
-  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
 ======================================================================
 
-* Manual
-
-  - Order of tensor components for Xdmf files
-  - Drucker Prager fit to yield surface
-  - Drucker Prage allow tensile yield
-  - Slip-weakening healing parameter
-  - Green's functions
-    + Interpolation
-      * Accuracy of interpolation?
-  - Examples/Tutorials
-    + Table with concepts/features
-
 * configure
   
   + Check compatibility of PyLith options with PETSc
@@ -50,12 +31,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)
@@ -65,10 +40,6 @@
 1.8.0
 ======================================================================
 
-* Make nucleation for spontaneous rupture modular [BRAD]
-
-  spatial and temporal variation in shear/normal stress for nucleation
-
 * GenMaxwellQpQs [BRAD]
 
 * GPU utilization
@@ -439,16 +410,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
 ----------------------------------------------------------------------
@@ -458,8 +425,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/trunk/applications/utilities/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/applications/utilities/Makefile.am	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/applications/utilities/Makefile.am	2012-06-25 17:37:03 UTC (rev 20406)
@@ -47,14 +47,22 @@
 	    $(do_install) "$$d$$p.in" > "$(DESTDIR)$(bindir)/$$f"; \
 	    echo " chmod +x '$(DESTDIR)$(bindir)/$$f'"; \
 	    chmod +x "$(DESTDIR)$(bindir)/$$f"; \
-	  else :; fi; \
+	  else : \
+	    echo " $(do_install) '$$d$$p' > '$(DESTDIR)$(bindir)/$$p'"; \
+	    $(do_install) "$$d$$p" > "$(DESTDIR)$(bindir)/$$p"; \
+	    echo " chmod +x '$(DESTDIR)$(bindir)/$$p'"; \
+	    chmod +x "$(DESTDIR)$(bindir)/$$p"; \
+	 fi; \
 	done
 
 EXTRA_DIST = \
 	pylithinfo.in \
-	pylith_genxdmf.in
+	pylith_genxdmf.in \
+	powerlaw_gendb.py
 
-CLEANFILES = $(bin_SCRIPTS)
+CLEANFILES = \
+	pylithinfo \
+	pylith_genxdmf
 
 
 # End of file 

Modified: short/3D/PyLith/trunk/configure.ac
===================================================================
--- short/3D/PyLith/trunk/configure.ac	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/configure.ac	2012-06-25 17:37:03 UTC (rev 20406)
@@ -17,7 +17,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ(2.59)
-AC_INIT([PyLith], [1.7.0], [cig-short at geodynamics.org])
+AC_INIT([PyLith], [1.7.1], [cig-short at geodynamics.org])
 AC_CONFIG_AUX_DIR([./aux-config])
 AC_CONFIG_HEADER([portinfo])
 AC_CONFIG_MACRO_DIR([m4])
@@ -151,7 +151,7 @@
 #CIT_CHECK_LIB_MPI
 
 # PETSC
-CIT_PATH_PETSC([3.2.0])
+CIT_PATH_PETSC([3.3.0])
 CIT_HEADER_PETSC
 CIT_CHECK_LIB_PETSC
 CIT_CHECK_LIB_PETSC_SIEVE
@@ -320,6 +320,7 @@
 		tests/Makefile
 		tests/2d/Makefile
 		tests/2d/maxwell/Makefile
+		tests/2d/powerlaw/Makefile
 		tests/2d/slipdir/Makefile
 		tests/2d/frictionslide/Makefile
 		tests/3d/Makefile
@@ -352,6 +353,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
@@ -362,11 +368,6 @@
 		examples/bar_shearwave/tet4/output/Makefile
 		examples/bar_shearwave/tri3/Makefile
 		examples/bar_shearwave/tri3/output/Makefile
-		examples/greensfns/Makefile
-		examples/greensfns/hex8/Makefile
-		examples/greensfns/hex8/gfimpulses/Makefile
-		examples/greensfns/hex8/gfresponses/Makefile
-		examples/greensfns/hex8/gfspatialdb/Makefile
 		examples/twocells/twohex8/Makefile
 		examples/twocells/twoquad4/Makefile
 		examples/twocells/twotet4/Makefile

Modified: short/3D/PyLith/trunk/doc/presentations/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/doc/presentations/Makefile.am	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/doc/presentations/Makefile.am	2012-06-25 17:37:03 UTC (rev 20406)
@@ -21,7 +21,9 @@
 	pylith1.2/pylith_overview.pdf \
 	pylith1.3/pylith_overview.pdf \
 	pylith1.4/pylith_overview.pdf \
-	pylith1.5/pylith_overview.pdf
+	pylith1.5/pylith_overview.pdf \
+	pylith1.6/pylith_overview.pdf \
+	pylith1.7/pylith_overview.pdf
 
 
 # End of file 

Copied: short/3D/PyLith/trunk/doc/presentations/logos/cig_blackfg.png (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/doc/presentations/logos/cig_blackfg.png)
===================================================================
(Binary files differ)

Copied: short/3D/PyLith/trunk/doc/presentations/pylith1.6 (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/doc/presentations/pylith1.6)

Copied: short/3D/PyLith/trunk/doc/presentations/pylith1.7 (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/doc/presentations/pylith1.7)

Copied: short/3D/PyLith/trunk/doc/releasenotes/announce_v1.7.0.txt (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/doc/releasenotes/announce_v1.7.0.txt)
===================================================================
--- short/3D/PyLith/trunk/doc/releasenotes/announce_v1.7.0.txt	                        (rev 0)
+++ short/3D/PyLith/trunk/doc/releasenotes/announce_v1.7.0.txt	2012-06-25 17:37:03 UTC (rev 20406)
@@ -0,0 +1,95 @@
+Greetings,
+
+I am pleased to announce the release of PyLith 1.7.0, a finite-element
+code designed to solve dynamic elastic problems and quasi-static
+viscoelastic problems in tectonic deformation.
+
+This release adds several new features to PyLith, including (1)
+user-friendly interface for computing Green's functions, (2) output of
+solution field at user-specified locations, (3) plane strain version
+of the Drucker-Prager elastoplastic rheology, (4) prescribed spatial
+and temporal variation of fault tractions with spontaneous earthquake
+ruptures, (5) ability to use PETSc GPU solvers, (6) user-specified
+start time for simulations, and (7) elastic prestep in quasi-static
+simulations is optional.
+
+We strongly recommend all users of previous PyLith releases switch to
+this latest release. In addition to adding features this release also
+fixes a minor parallel processing bug related to fault friction in
+quasi-static simulations. 
+
+See the README file for changes required to switch to the v1.7.x
+release series from previous versions.
+
+You can download the source code and binaries from
+
+    http://geodynamics.org/cig/software/packages/short/pylith
+
+Detailed installation instructions for the binary packages are in the
+User Manual with detailed building instructions for a few platforms
+in the INSTALL file bundled with the PyLith Installer utility.
+
+
+RELEASE NOTES
+
+* New features
+
+  * User-friendly interface for Green's functions
+
+    A new problem type provides a user-friendly interface for
+    computing Green's functions associated with fault slip for complex
+    spatial variation in elastic properties. See examples/2d/greensfns
+    in the tutorials for examples.
+
+  * Output of solution field at user-specified locations
+ 
+    Added a new output manager for interpolation of the solution field
+    to user-specified point locations. This feature is useful for
+    comparison of the solution with observations and in computing
+    Green's functions. See examples/3d/hex8/step19 and
+    examples/2d/greensfns in the tutorials for examples.
+
+  * Plane strain version of Drucker-Prager elastoplastic model
+
+    Added a plane strain version of the Drucker-Prager elastoplastic
+    model. Additionally, the user can now select whether to use an
+    inscribed, intermediate, or circumscribed fit to the Mohr Coulomb
+    criterion.
+
+  * Spatial and temporal variation in tractions for spontaneous
+    earthquake rupture
+
+    Switched from a simple constant spatial variation in initial fault
+    tractions to the more flexible spatial and temporal variation
+    consistent with the Dirichlet, Neumann, and point force boundary
+    conditions. Also added a switch to turn on/off applying prescribed
+    fault tractions when the fault opens; the default behavior is to
+    stop applying prescribed fault tractions when the fault opens, but
+    turning this off allows simulation of dike intrusions via
+    prescribed fault tractions. See examples/3d/hex8/step20 in the
+    tutorials for an example of how to specify fault tractions with
+    the new implementation.
+  
+  * Ability to use PETSc GPU solvers
+
+    Added ability to build PyLith with either double (default) or
+    single precision floating point values to facilitate use of
+    GPUs. In order to use PETSc GPU solvers, CUDA and cusp must be
+    installed and PETSc must be configured to use CUDA. See the PyLith
+    manual and PETSc documentation for details.
+
+  * User-specified start time for simulations.
+
+    Users can set the simulation start time to any desired value. This
+    facilitates combining simulations to model the earthquake cycle.
+
+  * Elastic prestep in quasi-static simulations is optional.
+
+    The elastic prestep in quasi-static simulations can be skipped
+    (the default is to include the elastic prestep). This facilitates
+    combining simulations to model the earthquake cycle.
+
+* Bug fixes
+
+  - Fixed bug in the spontaneous earthquake rupture for quasi-static
+    problems when running in parallel. 

Copied: short/3D/PyLith/trunk/doc/releasenotes/announce_v1.7.1.txt (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/doc/releasenotes/announce_v1.7.1.txt)
===================================================================
--- short/3D/PyLith/trunk/doc/releasenotes/announce_v1.7.1.txt	                        (rev 0)
+++ short/3D/PyLith/trunk/doc/releasenotes/announce_v1.7.1.txt	2012-06-25 17:37:03 UTC (rev 20406)
@@ -0,0 +1,104 @@
+Greetings,
+
+I am pleased to announce the release of PyLith 1.7.1, a finite-element
+code designed to solve dynamic elastic problems and quasi-static
+viscoelastic problems in tectonic deformation.
+
+This release fixes a couple of bugs in PyLith v1.7.0. The PyLith v1.7
+release series adds several new features to PyLith, including (1)
+user-friendly interface for computing Green's functions, (2) output of
+solution field at user-specified locations, (3) plane strain version
+of the Drucker-Prager elastoplastic rheology, (4) prescribed spatial
+and temporal variation of fault tractions with spontaneous earthquake
+ruptures, (5) ability to use PETSc GPU solvers, (6) user-specified
+start time for simulations, and (7) elastic prestep in quasi-static
+simulations is optional.
+
+We strongly recommend all users of previous PyLith releases switch to
+this latest release. In addition to adding features this release also
+fixes a minor parallel processing bug related to fault friction in
+quasi-static simulations.
+
+See the README file for changes required to switch to the v1.7.x
+release series from previous versions.
+
+You can download the source code and binaries from
+
+    http://geodynamics.org/cig/software/packages/short/pylith
+
+Detailed installation instructions for the binary packages are in the
+User Manual with detailed building instructions for a few platforms in
+the INSTALL file bundled with the PyLith Installer utility.
+
+
+RELEASE NOTES - PyLith v1.7.1
+
+* Bug fixes
+
+  - Fixed a couple of bugs in the spontaneous earthquake rupture for
+    quasi-static problems when running in parallel. These prevented
+    the nonlinear solve from converging and erroneously generated
+    fault-opening in a some cases.
+
+  - Minor updates to the documentation and manual. Added Green's
+    function examples to the manual.
+
+RELEASE NOTES - PyLith v1.7.0
+
+* New features
+
+  * User-friendly interface for Green's functions
+
+    A new problem type provides a user-friendly interface for
+    computing Green's functions associated with fault slip for complex
+    spatial variation in elastic properties. See examples/2d/greensfns
+    in the tutorials for examples.
+
+  * Output of solution field at user-specified locations
+ 
+    Added a new output manager for interpolation of the solution field
+    to user-specified point locations. This feature is useful for
+    comparison of the solution with observations and in computing
+    Green's functions. See examples/3d/hex8/step19 and
+    examples/2d/greensfns in the tutorials for examples.
+
+  * Plane strain version of Drucker-Prager elastoplastic model
+
+    Added a plane strain version of the Drucker-Prager elastoplastic
+    model. Additionally, the user can now select whether to use an
+    inscribed, intermediate, or circumscribed fit to the Mohr Coulomb
+    criterion.
+
+  * Spatial and temporal variation in tractions for spontaneous
+    earthquake rupture
+
+    Switched from a simple constant spatial variation in initial fault
+    tractions to the more flexible spatial and temporal variation
+    consistent with the Dirichlet, Neumann, and point force boundary
+    conditions. Also added a switch to turn on/off applying prescribed
+    fault tractions when the fault opens; the default behavior is to
+    stop applying prescribed fault tractions when the fault opens, but
+    turning this off allows simulation of dike intrusions via
+    prescribed fault tractions. See examples/3d/hex8/step20 in the
+    tutorials for an example of how to specify fault tractions with
+    the new implementation.
+  
+  * Ability to use PETSc GPU solvers
+
+    Added ability to build PyLith with either double (default) or
+    single precision floating point values to facilitate use of
+    GPUs. In order to use PETSc GPU solvers, CUDA and cusp must be
+    installed and PETSc must be configured to use CUDA. See the PyLith
+    manual and PETSc documentation for details.
+
+  * User-specified start time for simulations.
+
+    Users can set the simulation start time to any desired value. This
+    facilitates combining simulations to model the earthquake cycle.
+
+  * Elastic prestep in quasi-static simulations is optional.
+
+    The elastic prestep in quasi-static simulations can be skipped
+    (the default is to include the elastic prestep). This facilitates
+    combining simulations to model the earthquake cycle.
+

Modified: short/3D/PyLith/trunk/doc/releasenotes/checklist.txt
===================================================================
--- short/3D/PyLith/trunk/doc/releasenotes/checklist.txt	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/doc/releasenotes/checklist.txt	2012-06-25 17:37:03 UTC (rev 20406)
@@ -18,6 +18,8 @@
 
   * Increment version number on cover.
 
+  * Increment version in preface.lyx.
+
   * Increment version in userguide.lyx.
 
   * Updated version numbers in install.lyx.

Modified: short/3D/PyLith/trunk/doc/userguide/TODO
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/TODO	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/doc/userguide/TODO	2012-06-25 17:37:03 UTC (rev 20406)
@@ -0,0 +1,5 @@
+Figures
+  Tikz for workflow
+  Dependencies
+  HDF5 layout
+  Replace fault implementation diagram
\ No newline at end of file

Modified: short/3D/PyLith/trunk/doc/userguide/benchmarks/benchmarks.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/benchmarks/benchmarks.lyx	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/doc/userguide/benchmarks/benchmarks.lyx	2012-06-25 17:37:03 UTC (rev 20406)
@@ -176,19 +176,21 @@
  through a vertical strike-slip fault), TPV205 (vertical strike-slip fault
  with high and low stress asperities), TPV210-2D (vertical slice through
  a 60 degree dipping normal fault), TPV210 (60 degree dipping normal fault),
- TPV14-2D and TPV15-2D (horizontal slice through a verticel strike-slip
- fault with a branch) and TPV14 and TPV15 (vertical strike-slip fault with
- a branch).
+ TPV11, TPV12, TPV13, TPV14-2D and TPV15-2D (horizontal slice through a
+ verticel strike-slip fault with a branch), TPV14 and TPV15 (vertical strike-sli
+p fault with a branch), and TPV 16 and 17.
 \end_layout
 
 \begin_layout Standard
 The benchmark results indicate that triangular and tetrahedral cells generate
  less numerical noise than quadrilateral or hexahedral cells.
- TPV14-2D, TPV15-2D, TPV14, and TPV15 use the numerical damping via an artificia
-l viscosity available in PyLith v1.6 to these high-frequency oscillations.
- All of the other results without high frequency oscillations posted on
- the SCEC benchmarks web page employ damping via similar methods to reduce
- numerical artifacts.
+ Results for all of the benchmarks listed above except TPV14-2D, TPV15-2D,
+ TPV14, and TPV15 have been updated using PyLith 1.7, which provides much
+ closer agreement with the other codes compared to previous versions of
+ PyLith.
+ We attribute the closer agreement to small adjustments of the fault implementat
+ion and some small bugfixes to the slip-weakening friction formulation.
+ 
 \end_layout
 
 \end_body

Modified: short/3D/PyLith/trunk/doc/userguide/benchmarks/savageprescott/savageprescott.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/benchmarks/savageprescott/savageprescott.lyx	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/doc/userguide/benchmarks/savageprescott/savageprescott.lyx	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,5 +1,5 @@
-#LyX 1.6.3 created this file. For more info see http://www.lyx.org/
-\lyxformat 345
+#LyX 2.0 created this file. For more info see http://www.lyx.org/
+\lyxformat 413
 \begin_document
 \begin_header
 \textclass book
@@ -7,18 +7,26 @@
 
 \end_preamble
 \use_default_options false
+\maintain_unincluded_children false
 \language english
+\language_package default
 \inputencoding latin1
+\fontencoding global
 \font_roman default
 \font_sans default
 \font_typewriter default
 \font_default_family default
+\use_non_tex_fonts false
 \font_sc false
 \font_osf false
 \font_sf_scale 100
 \font_tt_scale 100
 
 \graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
 \paperfontsize default
 \spacing single
 \use_hyperref false
@@ -26,9 +34,18 @@
 \use_geometry true
 \use_amsmath 0
 \use_esint 0
+\use_mhchem 1
+\use_mathdots 1
 \cite_engine basic
 \use_bibtopic false
+\use_indices false
 \paperorientation portrait
+\suppress_date false
+\use_refstyle 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
 \leftmargin 1in
 \topmargin 1in
 \rightmargin 1in
@@ -36,15 +53,16 @@
 \secnumdepth 3
 \tocdepth 3
 \paragraph_separation indent
-\defskip medskip
+\paragraph_indentation default
 \quotes_language english
 \papercolumns 1
 \papersides 1
 \paperpagestyle default
 \tracking_changes false
 \output_changes false
-\author "" 
-\author "" 
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
 \end_header
 
 \begin_body
@@ -156,24 +174,23 @@
  The simplest meshes have uniform resolution (all cells have equal dimensions);
  however, such meshes typically do not provide accurate solutions since
  the resolution is too coarse in the region of interest.
- For that reason, we also tested several meshes where the mesh resolution
- decreases away from the center.
- In the problem description that follows, we will focus on the graded3 mesh
- (in 
-\family typewriter
-meshes/spbm_hex8_graded4_20km.exo.gz
-\family default
-), which provides reasonable results.
- It will first be necessary to unzip this mesh so that it may be used by
+ For that reason, we also tested meshes where the mesh resolution decreases
+ away from the center.
+ In the problem description that follows, we will focus on the hexahedral
+ mesh with finer discretization neear the fault (meshes/hex8_6.7km.exo.gz),
+ which provides a good match with the analytical solution.
+ It will first be necessary to gunzip this mesh so that it may be used by
  PyLith.
 \end_layout
 
 \begin_layout Description
 Domain The domain for this mesh spans the region
-\begin_inset Formula \begin{gather*}
+\begin_inset Formula 
+\begin{gather*}
 -1000\leq x\leq1000\ km,\\
 -500\leq y\leq500\ km,\\
--400\ km\leq z\leq0.\end{gather*}
+-400\ km\leq z\leq0.
+\end{gather*}
 
 \end_inset
 
@@ -204,20 +221,22 @@
 \begin_inset Formula $\eta$
 \end_inset
 
-) of 4.73364e19 Pa-s, yielding a relaxation time (
+) of 2.36682e+19 Pa-s, yielding a relaxation time (
 \begin_inset Formula $2\eta/\mu$
 \end_inset
 
-) of 100 years.
+) of 50 years.
 \end_layout
 
 \begin_layout Description
 Fault The fault is a vertical, left-lateral strike-slip fault.
  The strike is parallel to the y-direction at the center of the model:
-\begin_inset Formula \begin{gather*}
+\begin_inset Formula 
+\begin{gather*}
 x=0\ km,\\
 -500\leq y\leq500\ km,\\
--40\ km\leq z\leq0.\end{gather*}
+-40\ km\leq z\leq0.
+\end{gather*}
 
 \end_inset
 
@@ -244,11 +263,11 @@
 ), half of the coseismic displacement and half of the steady creep is applied
  (see 
 \family typewriter
-parameters/finalslip_rupture.spatialdb
+finalslip.spatialdb
 \family default
  and 
 \family typewriter
-parameters/sliprate_creep.spatialdb
+creeprate.spatialdb
 \family default
 ).
 \end_layout
@@ -266,13 +285,10 @@
 \end_layout
 
 \begin_layout Description
-Discretization For the graded3 mesh (
-\family typewriter
-meshes/spbm_hex8_graded4_20km.exo
-\family default
-), the resolution at the outer boundaries is 20 km.
+Discretization For the nonuniform hexahedral mesh, the resolution at the
+ outer boundaries is 20 km.
  An inner region is then put through one level of refinement, so that near
- the center of the mesh the resolution is 10 km.
+ the center of the mesh the resolution is 6.7 km.
  All meshes were generated with CUBIT.
 \end_layout
 
@@ -363,16 +379,7 @@
 \end_layout
 
 \begin_layout Standard
-Alternatively, simply unzip the mesh you want to use (e.g., 
-\family typewriter
-meshes/spbm_hex8_graded3_20km.exo
-\family default
-).
- Change to the 
-\family typewriter
-parameters
-\family default
- directory.
+Alternatively, simply gunzip the mesh you want to use.
  There are a number of 
 \family typewriter
 .cfg
@@ -381,112 +388,67 @@
 \family typewriter
 pylithapp.cfg
 \family default
- file defining parameters common to all problems, and a 
+ file defining parameters common to all problems.
+ Each problem uses four 
 \family typewriter
-timedep.cfg
-\family default
- file defining fault slip behavior and output frequency.
- Each problem uses three 
-\family typewriter
 .cfg
 \family default
  files: 
 \family typewriter
 pylithapp.cfg
 \family default
-, a mesh-specific file (e.g., 
+, 
 \family typewriter
-spbm_hex8_graded3_20km.cfg
+fieldsplit.cfg
 \family default
-), and 
+ (algrebraic multigrid preconditioner), a cell-specific file (e.g., 
 \family typewriter
-timedep.cfg
+hex8.cfg
 \family default
-.
- There are also scripts for each mesh.
- You can then run the problem either as
+), and a resolution specific file (e.g., hex8_6.7km.cfg).
+ You can then run the problem by typing
 \end_layout
 
 \begin_layout LyX-Code
-pylith spbm_hex8_graded3_20km.cfg timedep.cfg
+pylith hex8.cfg hex8_6.7km.cfg fieldsplit.cfg
 \end_layout
 
 \begin_layout Standard
-or as
-\end_layout
-
-\begin_layout LyX-Code
-sh ./spbm_hex8_graded3_20km.sh
-\end_layout
-
-\begin_layout Standard
 This will run the problem for 10 earthquake cycles of 200 years each, using
  a time-step size of 10 years, for a total simulation time of 2000 years.
  Ground surface output occurs every 10 years, while all other outputs occur
  every 50 years.
- The graded3 benchmark requires  approximately 5 GB of disk space.
 \end_layout
 
 \begin_layout Standard
 Once the problem has run, results will be placed in the 
 \family typewriter
-results
+output
 \family default
- directory in the mesh-specific subdirectory.
+ directory.
  These results may be viewed directly with a package such as ParaView; however,
  to compare results to the analytical solution, some postprocessing is required.
- First, generate the analytical results by going to the 
+ First, generate the analytical results by running the 
 \family typewriter
-utils
+calc_analytic.py
 \family default
- directory and running the 
-\family typewriter
-savpres_ss.py
-\family default
  script.
- This will produce comma-delimited files for displacements and velocities
- (
+ This will produce files with displacements and velocities (
 \family typewriter
-savpres_displ.csv
+analytic_disp.txt
 \family default
-, 
+ and 
 \family typewriter
-savpres_vel.csv
+analytic_vel.txt
 \family default
-) that are easy to use with a plotting package.
- There is an additional script in the 
+) in the 
 \family typewriter
-utils
+output
 \family default
- directory (
-\family typewriter
-vtkdiff.py
-\family default
-) that computes velocities from PyLith displacement results.
- To generate velocity results, you can type, for example,
+ directory that are easy to use with a plotting package, such as matplotlib
+ or Matlab.
 \end_layout
 
-\begin_layout LyX-Code
-./vtkdiff.py vtkdiff_hex8_graded3_20km.cfg
-\end_layout
-
-\begin_layout Standard
-Results will be placed in the 
-\family typewriter
-results
-\family default
- directory for the appropriate model.
- This will create a set of VTK files that you can use with ParaView.
- You can generate profile results using ParaView (e.g., the ``Plot Over Line''
- filter).
- By loading the entire time series for the ground surface velocity results,
- it is possible to generate profile results for all time steps.
- For comparison with the analytical results, it is easiest to use a profile
- coincident with the x-axis that extends from x=0 to the right-hand side
- of the mesh.
- The profiles can also be saved as CSV files from ParaView.
-\end_layout
-
 \begin_layout Subsection
 Benchmark Results
 \end_layout
@@ -506,8 +468,7 @@
  following the last earthquake.
  We find very good agreement between the analytical and numerical solutions,
  even for meshes with uniform refinement.
- This is a relatively recent benchmark, and we have not yet explored quantitativ
-e fits as a function of mesh resolution.
+ We have not yet explored quantitative fits as a function of mesh resolution.
  For this benchmark, it is also important to consider the distance of the
  boundary from the region of interest.
  Also note that the agreement between analytical and numerical solutions

Modified: short/3D/PyLith/trunk/doc/userguide/boundaryconditions/boundaryconditions.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/boundaryconditions/boundaryconditions.lyx	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/doc/userguide/boundaryconditions/boundaryconditions.lyx	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,6562 +1,7860 @@
-#LyX 2.0 created this file. For more info see http://www.lyx.org/
-\lyxformat 413
-\begin_document
-\begin_header
-\textclass book
-\use_default_options false
-\maintain_unincluded_children false
-\language english
-\language_package default
-\inputencoding auto
-\fontencoding global
-\font_roman default
-\font_sans default
-\font_typewriter default
-\font_default_family default
-\use_non_tex_fonts false
-\font_sc false
-\font_osf false
-\font_sf_scale 100
-\font_tt_scale 100
-
-\graphics default
-\default_output_format default
-\output_sync 0
-\bibtex_command default
-\index_command default
-\paperfontsize default
-\spacing single
-\use_hyperref false
-\papersize default
-\use_geometry true
-\use_amsmath 1
-\use_esint 0
-\use_mhchem 1
-\use_mathdots 1
-\cite_engine basic
-\use_bibtopic false
-\use_indices false
-\paperorientation portrait
-\suppress_date false
-\use_refstyle 0
-\index Index
-\shortcut idx
-\color #008000
-\end_index
-\leftmargin 1in
-\topmargin 1in
-\rightmargin 1in
-\bottommargin 1in
-\secnumdepth 3
-\tocdepth 3
-\paragraph_separation indent
-\paragraph_indentation default
-\quotes_language english
-\papercolumns 1
-\papersides 1
-\paperpagestyle default
-\tracking_changes false
-\output_changes false
-\html_math_output 0
-\html_css_as_file 0
-\html_be_strict false
-\end_header
-
-\begin_body
-
-\begin_layout Chapter
-\begin_inset CommandInset label
-LatexCommand label
-name "cha:boundary:interface:conditions"
-
-\end_inset
-
-Boundary and Interface Conditions
-\end_layout
-
-\begin_layout Section
-Assigning Boundary Conditions
-\end_layout
-
-\begin_layout Standard
-There are four basic steps in assigning a specific boundary condition to
- a portion of the domain.
-\end_layout
-
-\begin_layout Enumerate
-Create sets of vertices in the mesh generation process for each boundary
- condition.
-\end_layout
-
-\begin_layout Enumerate
-Define boundary condition groups corresponding to the vertex sets.
-\end_layout
-
-\begin_layout Enumerate
-Set the parameters for each boundary condition group using 
-\family typewriter
-.cfg
-\family default
- or 
-\family typewriter
-.pml
-\family default
- files and/or command line arguments.
-\end_layout
-
-\begin_layout Enumerate
-Specify the spatial variation in parameters for the boundary condition using
- a spatial database file.
-\end_layout
-
-\begin_layout Subsection
-Creating Sets of Vertices
-\end_layout
-
-\begin_layout Standard
-The procedure for creating sets of vertices differs depending on the mesh
- generator.
- For meshes specified using the PyLith mesh ASCII format, the sets of vertices
- are specified using groups (see Appendix 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:MeshIOAscii"
-
-\end_inset
-
-).
- In CUBIT the groups of vertices are created using nodesets.
- Similarly, in LaGriT, psets are used.
- Note that we chose to associated boundary conditions with groups of vertices
- because nearly every mesh generation package supports associating a string
- or integer with groups of vertices.
- Note also that we currently associate boundary conditions with string identifie
-rs, so even if the mesh generator uses integers, the name is specified as
- the digits of the integer value.
- Finally, note that every vertex set that ultimately is associated with
- a boundary condition on a cell face (e.g., Neumann boundary conditions and
- fault interface conditions) must correspond to a simply-connected surface.
-\end_layout
-
-\begin_layout Subsection
-Arrays of Boundary Condition Components
-\end_layout
-
-\begin_layout Standard
-A dynamic array of boundary condition components associates a name (string)
- with each boundary condition.
- This dynamic array of boundary conditions replaces the boundary condition
- container in PyLith 1.0.
- User-defined containers are no longer necessary, and the predefined containers
- are no longer available (or necessary).
- The default boundary condition for each component in the array is the Dirichlet
-Points object.
- Other boundary conditions can be bound to the named items in the array
- via a 
-\family typewriter
-.cfg
-\family default
- file, 
-\family typewriter
-.pml
-\family default
- file, or the command line.
- The parameters for the boundary condition are set using the name of the
- boundary condition.
- An example of setting the array of boundary condition components and changing
- the types of boundary conditions in a 
-\family typewriter
-.cfg
-\family default
- file:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.problem]
-\end_layout
-
-\begin_layout LyX-Code
-bc = [x_neg,x_pos,y_pos,z_neg] ; Array of boundary conditions
-\end_layout
-
-\begin_layout LyX-Code
-# Default boundary condition is DirichletPoints
-\end_layout
-
-\begin_layout LyX-Code
-# Keep default value for bc.x_neg
-\end_layout
-
-\begin_layout LyX-Code
-bc.x_pos = pylith.bc.DirichletBoundary ; change BC type to DirichletBoundary
-\end_layout
-
-\begin_layout LyX-Code
-bc.y_pos = pylith.bc.AbsorbingDampers ; change BC type to AbsorbingDampers
-\end_layout
-
-\begin_layout LyX-Code
-bc.z_neg = pylith.bc.Neumann ; change BC type to Neumann (traction)
-\end_layout
-
-\begin_layout Section
-Time-Dependent Boundary Conditions
-\end_layout
-
-\begin_layout Standard
-Several boundary conditions use a common formulation for the spatial and
- temporal variation of the boundary condition parameters,
-\begin_inset Formula 
-\begin{equation}
-f(\vec{x})=f_{0}(\vec{x})+\dot{f}_{0}(\vec{x})(t-t_{0}(\vec{x}))+f_{1}(\vec{x})a(t-t_{1}(\vec{x})),
-\end{equation}
-
-\end_inset
-
-where 
-\begin_inset Formula $f(\vec{x})$
-\end_inset
-
- may be a scalar or vector parameter, 
-\begin_inset Formula $f_{0}(\vec{x})$
-\end_inset
-
- is a constant value, 
-\begin_inset Formula $\dot{f}_{0}(\vec{x})$
-\end_inset
-
- is a constant rate of change in the value, 
-\begin_inset Formula $t_{0}(\vec{x})$
-\end_inset
-
- is the onset time for the constant rate of change, 
-\begin_inset Formula $f_{1}(\vec{x})$
-\end_inset
-
- is the amplitude for the temporal modulation, 
-\begin_inset Formula $a(t)$
-\end_inset
-
- is the variation in amplitude with time, 
-\begin_inset Formula $t_{1}(\vec{x})$
-\end_inset
-
- is the onset time for the temporal modulation, and 
-\begin_inset Formula $\vec{x}$
-\end_inset
-
- is the position of a location in space.
- This common formulation permits easy specification of a scalar or vector
- with a constant value, constant rate of change of a value, and/or modulation
- of a value in time.
- One can specify just the initial value, just the rate of change of the
- value (along with the corresponding onset time), or just the modulation
- in amplitude (along with the corresponding temporal variation and onset
- time), or any combination of the three.
- The facilities associated with this formulation are:
-\end_layout
-
-\begin_layout Description
-db_initial Spatial database specifying the spatial variation in the initial
- value (default is none).
-\end_layout
-
-\begin_layout Description
-db_rate Spatial database specifying rate of change in the value (default
- is none).
-\end_layout
-
-\begin_layout Description
-db_change Spatial database specifying the amplitude of the temporal modulation
- (default is none).
-\end_layout
-
-\begin_layout Description
-th_change Time history database specifying the temporal change in amplitude
- (default is none).
-\end_layout
-
-\begin_layout Subsection
-Dirichlet Boundary Conditions
-\end_layout
-
-\begin_layout Standard
-Dirichlet boundary conditions in PyLith prescribe the displacement of a
- subset of the vertices of the finite-element mesh.
- While Dirichlet boundary conditions can be applied to any vertex, usually
- they are applied to vertices on the lateral and bottom boundaries of the
- domain.
- There are two types of Dirichlet boundary conditions, DirichletBC and Dirichlet
-Boundary.
- Both provide identical constraints on the solution, but DirichletBoundary
- is limited to vertices of a simply-connected surface, which allows diagnostic
- output of the prescribed displacements.
- DirichletBC can be applied to a set of unconnected vertices.
-\end_layout
-
-\begin_layout Subsubsection
-Dirichlet Boundary Condition Parameters
-\end_layout
-
-\begin_layout Standard
-The properties and components common to both the DirichletPoints and DirichletBo
-undary boundary conditions are:
-\end_layout
-
-\begin_layout Description
-label Label of the group of vertices associated with the boundary condition.
-\end_layout
-
-\begin_layout Description
-bc_dof Array of degrees of freedom to be fixed (first degree of freedom
- is 0).
-\end_layout
-
-\begin_layout Standard
-DirichletBoundary contains an additional component:
-\end_layout
-
-\begin_layout Description
-output Manager for output of displacements on boundary with specified displaceme
-nts.
-\end_layout
-
-\begin_layout Standard
-By default the output manager does not output any information.
- The specified displacements and velocities can be output by including ``displac
-ements'' and ``velocities'' in the output manager's 
-\family typewriter
-vertex_info_fields
-\family default
- array parameter.
- An example of setting the Dirichlet boundary condition parameters in a
- 
-\family typewriter
-.cfg
-\family default
- file is:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.problem]
-\end_layout
-
-\begin_layout LyX-Code
-bc = [mybc]
-\end_layout
-
-\begin_layout LyX-Code
-
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.problem.bc.mybc]
-\end_layout
-
-\begin_layout LyX-Code
-label = group A 
-\end_layout
-
-\begin_layout LyX-Code
-bc_dof = [2] ; fixed displacement in z direction
-\end_layout
-
-\begin_layout LyX-Code
-db_initial = spatialdata.spatialdb.SimpleDB
-\end_layout
-
-\begin_layout LyX-Code
-db_initial.iohandler.filename = disp_A.spatialdb
-\end_layout
-
-\begin_layout LyX-Code
-db_initial.query_type = nearest ; change query type to nearest point algorithm
-\end_layout
-
-\begin_layout LyX-Code
-db_rate = spatialdata.spatialdb.UniformDB
-\end_layout
-
-\begin_layout LyX-Code
-db_rate.values = [displacement-rate-z]
-\end_layout
-
-\begin_layout LyX-Code
-db_rate.data = [1.0e-06*m/s] ; velocity is 1.0e-06 m/s
-\end_layout
-
-\begin_layout Standard
-We have created an array with one boundary condition, mybc.
- The group of vertices associated with the boundary condition is group A.
- For the database associated with the constant displacement, we use a SimpleDB.
- We set the filename and query type for the database.
- For the rate of change of values, we use a UniformDB and specify the velocity
- in the z-direction to be 1.0e-06 m/s.
- See Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:spatial:databases"
-
-\end_inset
-
- for a discussion of the different types of spatial databases available.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float table
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\noindent
-\align center
-\begin_inset Caption
-
-\begin_layout Plain Layout
-\begin_inset CommandInset label
-LatexCommand label
-name "tab:dirichlet:output"
-
-\end_inset
-
-Fields available in output of DirichletBoundary boundary condition information.
-\end_layout
-
-\end_inset
-
-
-\begin_inset VSpace defskip
-\end_inset
-
-
-\begin_inset Tabular
-<lyxtabular version="3" rows="6" columns="3">
-<features tabularvalignment="middle">
-<column alignment="center" valignment="top" width="0">
-<column alignment="center" valignment="top" width="0">
-<column alignment="center" valignment="top" width="3in">
-<row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Field Type
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Field
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Description
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-vertex_info_fields
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-initial-value
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Initial displacement field in global coordinate system
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-rate-of-change
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Rate of change of displacement field in global coordinate system
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-rate-start-time
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Onset time in seconds for rate of change in displacement field
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-change-in-value
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Amplitude of change in displacement field in global coordinate system
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-change-start-time
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Onset time in seconds for the amplitude change in the displacement field
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection
-Dirichlet Boundary Condition Spatial Database Files
-\end_layout
-
-\begin_layout Standard
-The spatial database files for the Dirichlet boundary condition specify
- the fixed displacements.
- The spatial database file may contain displacements at more degrees of
- freedom than those specified in the Dirichlet boundary condition settings
- using the 
-\family typewriter
-bc_dof
-\family default
- setting.
- Only those listed in 
-\family typewriter
-bc_dof
-\family default
- will be used.
- This permits using the same spatial database file for multiple Dirichlet
- boundary conditions with the same displacement field.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float table
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\noindent
-\align center
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Values in the spatial databases used for Dirichlet boundary conditions.
-\end_layout
-
-\end_inset
-
-
-\begin_inset VSpace defskip
-\end_inset
-
-
-\begin_inset Tabular
-<lyxtabular version="3" rows="4" columns="2">
-<features tabularvalignment="middle">
-<column alignment="center" valignment="top" width="0">
-<column alignment="center" valignment="top" width="4in">
-<row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Spatial database
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Name in Spatial Database
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-db_initial
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-displacement-x, displacement-y, displacement-z
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-db_rate
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-displacement-rate-x, displacement-rate-y, displacement-rate-z, rate-start-time
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-db_change
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-displacement-x, displacement-y, displacement-z, change-start-time
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Neumann Boundary Conditions
-\end_layout
-
-\begin_layout Standard
-Neumann boundary conditions are surface tractions applied over a subset
- of the mesh.
- As with the DirichletBoundary condition, each Neumann boundary condition
- can only be applied to a simply-connected surface.
- The surface over which the tractions are applied always has a spatial dimension
- that is one less than the dimension of the finite-element mesh.
- Traction values are computed at the integration points of each cell on
- the surface, using values from a spatial database.
- The tractions are integrated over each cell and assembled to obtain the
- forces applied at the vertices.
- See Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sub:Tutorial-twoquad4-traction"
-
-\end_inset
-
- for a tutorial that uses Neumann boundary conditions.
-\end_layout
-
-\begin_layout Subsubsection
-Neumann Boundary Condition Parameters
-\end_layout
-
-\begin_layout Standard
-The Neumann boundary condition properties and components are:
-\end_layout
-
-\begin_layout Description
-label Name of the group of vertices defining the mesh boundary for the Neumann
- boundary condition.
-\end_layout
-
-\begin_layout Description
-up_dir This is a 3-vector that provides a hint for the direction perpendicular
- to the horizontal tangent direction that is not collinear with the direction
- normal to the surface.
- The default value is (0,0,1), which assumes that the z-axis is positive
- upward.
- This vector is only needed for three-dimensional problems where the positive
- upward direction differs from the default.
-\end_layout
-
-\begin_layout Description
-output The output manager associated with diagnostic output (traction vector).
-\end_layout
-
-\begin_layout Description
-quadrature The quadrature object to be used for numerical integration.
- Since we are integrating over a surface that is one dimension lower than
- the problem domain, this would typically be set to something like 
-\family typewriter
-Quadrature2Din3D
-\family default
- (for a three-dimensional problem).
-\end_layout
-
-\begin_layout Standard
-By default the output manager does not output any information.
- The specified tractions can be output in global coordinates by including
- ``tractions'' in the output manager's 
-\family typewriter
-cell_info_fields
-\family default
- array parameter.
- An example of setting these parameters in a 
-\family typewriter
-.cfg
-\family default
- file is:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent]
-\end_layout
-
-\begin_layout LyX-Code
-bc = [x_neg,x_pos,y_neg]
-\end_layout
-
-\begin_layout LyX-Code
-bc.x_pos = pylith.bc.Neumann ; Change BC type to Neumann
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.bc.x_pos]
-\end_layout
-
-\begin_layout LyX-Code
-label = x_pos ; Name of group of vertices for +x boundary
-\end_layout
-
-\begin_layout LyX-Code
-db_initial = spatialdata.spatialdb.SimpleDB
-\end_layout
-
-\begin_layout LyX-Code
-db_initial.label = Neumann BC +x edge
-\end_layout
-
-\begin_layout LyX-Code
-db_initial.iohandler.filename = axialtract.spatialdb
-\end_layout
-
-\begin_layout LyX-Code
-db_initial.query_type = nearest
-\end_layout
-
-\begin_layout LyX-Code
-quadrature.cell = pylith.feassemble.FIATLagrange
-\end_layout
-
-\begin_layout LyX-Code
-quadrature.cell.dimension = 1
-\end_layout
-
-\begin_layout LyX-Code
-quadrature.cell.quad_order = 2
-\end_layout
-
-\begin_layout Standard
-These settings correspond to the example problem described in Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sub:Tutorial-twoquad4-traction"
-
-\end_inset
-
-.
- It is necessary to set the boundary condition type to 
-\family typewriter
-pylith.bc.Neumann
-\family default
-, since the default value is 
-\family typewriter
-Dirichlet
-\family default
-BC.
- Constant tractions are used for this particular problem, so a quadrature
- order of one would have been sufficient; however, for problems involving
- more complex variations (e.g., a linear variation), a quadrature order of
- two will provide more accurate results.
- Note that there is no advantage to specifying an integration order higher
- than two, since linear elements are being used for this problem.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float table
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\noindent
-\align center
-\begin_inset Caption
-
-\begin_layout Plain Layout
-\begin_inset CommandInset label
-LatexCommand label
-name "tab:neumann:output"
-
-\end_inset
-
-Fields available in output of Neumann boundary condition information.
-\end_layout
-
-\end_inset
-
-
-\begin_inset VSpace defskip
-\end_inset
-
-
-\begin_inset Tabular
-<lyxtabular version="3" rows="6" columns="3">
-<features tabularvalignment="middle">
-<column alignment="center" valignment="top" width="0">
-<column alignment="center" valignment="top" width="0">
-<column alignment="center" valignment="top" width="3in">
-<row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Field Type
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Field
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Description
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-cell_info_fields
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-initial-value
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Initial traction field in global coordinate system
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-rate-of-change
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Rate of change of traction field in global coordinate system
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-rate-start-time
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Onset time in seconds for rate of change in traction field
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-change-in-value
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Amplitude of change in traction field in global coordinate system
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-change-start-time
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Onset time in seconds for the amplitude change in the traction field
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection
-Neumann Boundary Condition Spatial Database Files
-\end_layout
-
-\begin_layout Standard
-The spatial database files for the Neumann boundary condition specify the
- applied tractions.
- The number of traction components is equal to the spatial dimension for
- the problem.
- The tractions are specified in a local coordinate system for the boundary.
- The names of the components of the traction vector are:
-\end_layout
-
-\begin_layout Description
-one-dimensional 
-\family typewriter
-normal
-\end_layout
-
-\begin_layout Description
-two-dimensional 
-\family typewriter
-shear
-\family default
-, 
-\family typewriter
-normal
-\end_layout
-
-\begin_layout Description
-three-dimensional 
-\family typewriter
-horiz-shear
-\family default
-, 
-\family typewriter
-vert-shear
-\family default
-, 
-\family typewriter
-normal
-\end_layout
-
-\begin_layout Standard
-Ambiguities in specifying the shear tractions in 3D problems are resolved
- using the 
-\family typewriter
-up_dir
-\family default
- parameter.
- In the case of a horizontal surface, users will need to pick an alternative
- vector, as the default 
-\family typewriter
-up_dir
-\family default
- would coincide with the normal direction.
- In this case, the orientation for the 
-\family typewriter
-vert-shear-traction
-\family default
- component will correspond to whatever the user specifies for 
-\family typewriter
-up_dir
-\family default
-, rather than the actual vertical direction.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float table
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\noindent
-\align center
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Values in the spatial databases used for Dirichlet boundary conditions in
- three dimensions.
- In one- and two-dimensional problems, the names of the components are slightly
- different as described earlier in this section.
-\end_layout
-
-\end_inset
-
-
-\begin_inset VSpace defskip
-\end_inset
-
-
-\begin_inset Tabular
-<lyxtabular version="3" rows="4" columns="2">
-<features tabularvalignment="middle">
-<column alignment="center" valignment="top" width="0">
-<column alignment="center" valignment="top" width="4in">
-<row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Spatial database
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Name in Spatial Database
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-db_initial
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-traction-shear-horiz, traction-shear-vert, traction-normal
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-db_rate
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-traction-rate-horiz-shear, traction-rate-vert-shear, traction-rate-normal,
- rate-start-time
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-db_change
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-traction-horiz-shear, traction-vert-shear, traction-normal, change-start-time
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Point Force Boundary Conditions
-\end_layout
-
-\begin_layout Standard
-Point force boundary conditions in PyLith prescribe the application of point
- forces to a subset of the vertices of the finite-element mesh.
- While point force boundary conditions can be applied to any vertex, usually
- they are applied to vertices on the lateral, top, and bottom boundaries
- of the domain.
-\end_layout
-
-\begin_layout Subsubsection
-Point Force Parameters
-\end_layout
-
-\begin_layout Standard
-The properties and components common to both the DirichletBC and DirichletBounda
-ry boundary conditions are:
-\end_layout
-
-\begin_layout Description
-label Label of the group of vertices associated with the boundary condition.
-\end_layout
-
-\begin_layout Description
-bc_dof Array of degrees of freedom to which forces are applied (first degree
- of freedom is 0).
-\end_layout
-
-\begin_layout Standard
-An example of setting the point force boundary condition parameters in a
- 
-\family typewriter
-.cfg
-\family default
- file is:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.problem]
-\end_layout
-
-\begin_layout LyX-Code
-bc = [mybc]
-\end_layout
-
-\begin_layout LyX-Code
-bc.mybc = pylith.bc.PointForce
-\end_layout
-
-\begin_layout LyX-Code
-
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.problem.bc.mybc]
-\end_layout
-
-\begin_layout LyX-Code
-label = group A 
-\end_layout
-
-\begin_layout LyX-Code
-bc_dof = [2] ; fixed displacement in z direction
-\end_layout
-
-\begin_layout LyX-Code
-db_initial = spatialdata.spatialdb.SimpleDB
-\end_layout
-
-\begin_layout LyX-Code
-db_initial.iohandler.filename = force_A.spatialdb
-\end_layout
-
-\begin_layout LyX-Code
-db_initial.query_type = nearest ; change query type to nearest point algorithm
-\end_layout
-
-\begin_layout LyX-Code
-db_rate = spatialdata.spatialdb.UniformDB
-\end_layout
-
-\begin_layout LyX-Code
-db_rate.values = [force-rate-z]
-\end_layout
-
-\begin_layout LyX-Code
-db_rate.data = [1.0e+5*newton/s]
-\end_layout
-
-\begin_layout Standard
-We have created an array with one boundary condition, mybc.
- The group of vertices associated with the boundary condition is group A.
- For the database associated with the constant force, we use a SimpleDB.
- We set the filename and query type for the database.
- For the rate of change of values, we use a UniformDB and specify the rate
- of change in the force to be 1.0e+5 Newton/s.
- See Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:spatial:databases"
-
-\end_inset
-
- for a discussion of the different types of spatial databases available.
-\end_layout
-
-\begin_layout Subsubsection
-Point Force Spatial Database Files
-\end_layout
-
-\begin_layout Standard
-The spatial database files for the Dirichlet boundary condition specify
- the fixed displacements.
- The spatial database file may contain displacements at more degrees of
- freedom than those specified in the Dirichlet boundary condition settings
- using the 
-\family typewriter
-bc_dof
-\family default
- setting.
- Only those listed in 
-\family typewriter
-bc_dof
-\family default
- will be used.
- This permits using the same spatial database file for multiple Dirichlet
- boundary conditions with the same displacement field.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float table
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\noindent
-\align center
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Values in the spatial databases used for point force boundary conditions.
-\end_layout
-
-\end_inset
-
-
-\begin_inset VSpace defskip
-\end_inset
-
-
-\begin_inset Tabular
-<lyxtabular version="3" rows="4" columns="2">
-<features tabularvalignment="middle">
-<column alignment="center" valignment="top" width="0">
-<column alignment="center" valignment="top" width="4in">
-<row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Spatial database
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Name in Spatial Database
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-db_initial
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-force-x, force-y, force-z
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-db_rate
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-force-rate-x, force-rate-y, force-rate-z, rate-start-time
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-db_change
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-force-x, force-y, force-z, change-start-time
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Section
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:absorbing:boundaries"
-
-\end_inset
-
-Absorbing Boundary Conditions
-\end_layout
-
-\begin_layout Standard
-This boundary condition attempts to prevent seismic waves reflecting off
- of a boundary by placing simple dashpots on the boundary.
- Normally incident dilatational and shear waves are perfectly absorbed.
- Waves incident at other angles are only partially absorbed.
- This boundary condition is simpler than a perfectly matched layer (PML)
- boundary condition but does not perform quite as well, especially for surface
- waves.
- If the waves arriving at the absorbing boundary are relatively small in
- amplitude compared to the amplitudes of primary interest, this boundary
- condition gives reasonable results.
-\end_layout
-
-\begin_layout Standard
-The Absorbing boundary condition properties and components are:
-\end_layout
-
-\begin_layout Description
-label Name of the group of vertices defining the mesh boundary for the absorbing
- boundary condition.
-\end_layout
-
-\begin_layout Description
-up_dir This is a 3-vector that provides a hint for the direction perpendicular
- to the horizontal tangent direction that is not collinear with the direction
- normal to the surface.
- The default value is (0,0,1), which assumes that the z-axis is positive
- upward.
- This vector is only needed for three-dimensional problems where the positive
- upward direction differs from the default.
-\end_layout
-
-\begin_layout Description
-db The spatial database specifying the material properties for the seismic
- velocities.
-\end_layout
-
-\begin_layout Description
-quadrature The quadrature object to be used for numerical integration.
- Since we are integrating over a surface that is one dimension lower than
- the problem domain, this would typically be set to something like 
-\family typewriter
-Quadrature2Din3D
-\family default
- (for a three-dimensional problem).
-\end_layout
-
-\begin_layout Subsection
-Finite-Element Implementation of Absorbing Boundary
-\end_layout
-
-\begin_layout Standard
-Consider a plane wave propagating at a velocity 
-\begin_inset Formula $c$
-\end_inset
-
-.
- We can write the displacement field as
-\begin_inset Formula 
-\begin{equation}
-\vec{u}(\vec{x},t)=\vec{u^{t}}(t-\frac{\vec{x}}{c}),
-\end{equation}
-
-\end_inset
-
-where 
-\begin_inset Formula $\vec{x}$
-\end_inset
-
- is position, 
-\begin_inset Formula $t$
-\end_inset
-
- is time, and 
-\begin_inset Formula $\vec{u^{t}}$
-\end_inset
-
- is the shape of the propagating wave.
- For an absorbing boundary we want the traction on the boundary to be equal
- to the traction associated with wave propagating out of the domain.
- Starting with the expression for the traction on a boundary, 
-\begin_inset Formula $T_{i}=\sigma_{ij}n_{j},$
-\end_inset
-
- and using the local coordinate system for the boundary 
-\begin_inset Formula $s_{h}s_{v}n,$
-\end_inset
-
- where 
-\begin_inset Formula $\vec{n}$
-\end_inset
-
- is the direction normal to the boundary, 
-\begin_inset Formula $\overrightarrow{s}_{h}$
-\end_inset
-
- is the horizontal direction tangent to the boundary, and 
-\begin_inset Formula $\overrightarrow{s}_{v}$
-\end_inset
-
- is the vertical direction tangent to the boundary, the tractions on the
- boundary are
-\begin_inset Formula 
-\begin{gather}
-T_{s_{h}}=\sigma_{s_{h}n}\\
-T_{s_{v}}=\sigma_{s_{v}n}\\
-T_{n}=\sigma_{nn}.
-\end{gather}
-
-\end_inset
-
-In the case of a horizontal boundary, we can define an auxiliary direction
- in order to assign unique tangential directions.
- For a linear elastic isotropic material, 
-\begin_inset Formula $\sigma_{ij}=\lambda\epsilon_{kk}\delta_{ij}+2\mu\epsilon_{ij},$
-\end_inset
-
- and we can write the tractions as 
-\begin_inset Formula 
-\begin{gather}
-T_{s_{h}}=2\mu\epsilon_{s_{h}n}\\
-T_{s_{v}}=2\epsilon_{s_{v}n}\\
-T_{n}=(\lambda+2\mu)\epsilon_{nn}+\lambda(\epsilon_{s_{h}s_{h}}+\epsilon_{s_{v}s_{v}}).
-\end{gather}
-
-\end_inset
-
-For infinitesimal strains, 
-\begin_inset Formula $\epsilon_{ij}=\frac{1}{2}(u_{i,j}+u_{j,i})$
-\end_inset
-
- and we have
-\begin_inset Formula 
-\begin{gather}
-\epsilon_{s_{h}n}=\frac{1}{2}(u_{s_{h},n}+u_{n,s_{h}})\\
-\epsilon_{s_{v}n}=\frac{1}{2}(u_{s_{v},n}+u_{n,s_{v}})\\
-\epsilon_{nn}=u_{n,n}.
-\end{gather}
-
-\end_inset
-
-For our propagating plane wave, we recognize that
-\begin_inset Formula 
-\begin{equation}
-\frac{\partial\vec{u^{t}}(t-\frac{\vec{x}}{c})}{\partial x_{i}}=-\frac{1}{c}\frac{\partial\vec{u^{t}}(t-\frac{\vec{x}}{c})}{\partial t},
-\end{equation}
-
-\end_inset
-
-so that our expressions for the tractions become
-\begin_inset Formula 
-\begin{gather}
-T_{s_{h}}=-\frac{\mu}{c}\left(\frac{\partial u_{s_{h}}^{t}(t-\frac{\vec{x}}{c})}{\partial t}+\frac{\partial u_{n}^{t}(t-\frac{\vec{x}}{c})}{\partial t}\right),\\
-T_{s_{v}}=-\frac{\mu}{c}\left(\frac{\partial u_{s_{v}}^{t}(t-\frac{\vec{x}}{c})}{\partial t}+\frac{\partial u_{n}^{t}(t-\frac{\vec{x}}{c})}{\partial t}\right).
-\end{gather}
-
-\end_inset
-
-For the normal traction, consider a dilatational wave propagating normal
- to the boundary at speed 
-\begin_inset Formula $v_{p}$
-\end_inset
-
-; in this case 
-\begin_inset Formula $u_{s_{h}}=u_{s_{v}}=0$
-\end_inset
-
- and 
-\begin_inset Formula $c=v_{p}$
-\end_inset
-
-.
- For the shear tractions, consider a shear wave propagating normal to the
- boundary at speed 
-\begin_inset Formula $v_{s}$
-\end_inset
-
-; we can decompose this into one case where 
-\begin_inset Formula $u_{n}=u_{s_{v}}=0$
-\end_inset
-
- and another case where 
-\begin_inset Formula $u_{n}=u_{s_{h}}=0$
-\end_inset
-
-, with 
-\begin_inset Formula $c=v_{s}$
-\end_inset
-
- in both cases.
- We also recognize that 
-\begin_inset Formula $\mu=\rho v_{s}^{2}$
-\end_inset
-
- and 
-\begin_inset Formula $\lambda+2\mu=\rho v_{p}^{2}$
-\end_inset
-
-.
- This leads to the following expressions for the tractions:
-\begin_inset Formula 
-\begin{gather}
-T_{s_{h}}=-\rho v_{s}\frac{\partial u_{s_{h}}^{t}(t-\frac{\vec{x}}{c})}{\partial t}\\
-T_{s_{v}}=-\rho v_{s}\frac{\partial u_{v}^{t}(t-\frac{\vec{x}}{c})}{\partial t}\\
-T_{n}=-\rho v_{p}\frac{\partial u_{n}^{t}(t-\frac{\vec{x}}{c})}{\partial t}
-\end{gather}
-
-\end_inset
-
-We write the weak form of the boundary condition as
-\begin_inset Formula 
-\[
-\int_{S_{T}}T_{i}\phi_{i}\, dS=\int_{S_{T}}-\rho c_{i}\frac{\partial u_{i}}{\partial t}\phi_{i}\, dS,
-\]
-
-\end_inset
-
-where 
-\begin_inset Formula $c_{i}$
-\end_inset
-
- equals 
-\begin_inset Formula $v_{p}$
-\end_inset
-
- for the normal traction and 
-\begin_inset Formula $v_{s}$
-\end_inset
-
- for the shear tractions, and 
-\begin_inset Formula $\phi_{i}$
-\end_inset
-
- is our weighting function.
- We express the trial solution and weighting function as linear combinations
- of basis functions,
-\begin_inset Formula 
-\begin{gather}
-u_{i}=\sum_{m}a_{i}^{m}N^{m},\\
-\phi_{i}=\sum_{n}c_{i}^{n}N^{n}.
-\end{gather}
-
-\end_inset
-
-Substituting into our integral over the absorbing boundaries yields
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula 
-\begin{equation}
-\int_{S_{T}}T_{i}\phi_{i}\, dS=\int_{S_{T}}-\rho c_{i}\sum_{m}\dot{a}_{i}^{m}N^{m}\sum_{n}c_{i}^{n}N^{n}\, dS.
-\end{equation}
-
-\end_inset
-
-In the derivation of the governing equations, we recognized that the weighting
- function is arbitrary, so we form the residual by setting the terms associated
- with the coefficients 
-\begin_inset Formula $c_{i}^{n}$
-\end_inset
-
- to zero,
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula 
-\begin{equation}
-r_{i}^{n}=\sum_{\text{tract cells}}\sum_{\text{quad pts}}-\rho(x_{q})c_{i}(x_{q})\sum_{m}\dot{a}_{i}^{m}N^{m}(x_{q})N^{n}(x_{q})w_{q}|J_{cell}(x_{q})|,
-\end{equation}
-
-\end_inset
-
- where 
-\begin_inset Formula $x_{q}$
-\end_inset
-
- are the coordinates of the quadrature points, 
-\begin_inset Formula $w_{q}$
-\end_inset
-
- are the weights of the quadrature points, and 
-\begin_inset Formula $|J_{cell}(x_{q})|$
-\end_inset
-
- is the determinant of the Jacobian matrix evaluated at the quadrature points
- associated with mapping the reference cell to the actual cell.
-\end_layout
-
-\begin_layout Standard
-The appearance of velocity in the expression for the residual means that
- the absorbing dampers also contribute to the system Jacobian matrix.
- Use the central difference method, the velocity is written in terms of
- the displacements,
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula 
-\begin{equation}
-\dot{u}_{i}(t)=\frac{1}{2\Delta t}(u_{i}(t+\Delta t)-u_{i}(t-\Delta t)).
-\end{equation}
-
-\end_inset
-
-Expressing the displacement at time 
-\begin_inset Formula $t+\Delta t$
-\end_inset
-
- in terms of the displacement at time 
-\begin_inset Formula $t$
-\end_inset
-
- (
-\begin_inset Formula $u_{i}(t)$
-\end_inset
-
-) and the increment in the displacement at time 
-\begin_inset Formula $t$
-\end_inset
-
- (
-\begin_inset Formula $du_{i}(t)$
-\end_inset
-
-) leads to
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula 
-\begin{equation}
-\dot{u}_{i}(t)=\frac{1}{2\Delta t}(du_{i}(t)+u_{i}(t)-u_{i}(t-\Delta t))
-\end{equation}
-
-\end_inset
-
-The terms contributing to the system Jacobian are associated with the increment
- in the displacement at time time.
- Substituting into the governing equations and isolating the term associated
- with the increment in the displacement at time t yields
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula 
-\begin{equation}
-A_{ij}^{nm}=\sum_{\text{tract cells}}\sum_{\text{quad pts}}\delta_{ij}\frac{1}{2\Delta t}\rho(x_{q})v_{i}(x_{q})N^{m}(x_{q})N^{n}(x_{q})w_{q}|J_{cells}(x_{q})|,
-\end{equation}
-
-\end_inset
-
-where 
-\begin_inset Formula $A_{ij}^{mn}$
-\end_inset
-
- is a 
-\begin_inset Formula $nd$
-\end_inset
-
- by 
-\begin_inset Formula $md$
-\end_inset
-
- matrix (
-\begin_inset Formula $d$
-\end_inset
-
- is the dimension of the vector space), 
-\begin_inset Formula $m$
-\end_inset
-
- and 
-\begin_inset Formula $n$
-\end_inset
-
- refer to the basis functions and 
-\begin_inset Formula $i$
-\end_inset
-
- and 
-\begin_inset Formula $j$
-\end_inset
-
- are vector space components.
-\end_layout
-
-\begin_layout Section
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:fault"
-
-\end_inset
-
-Fault Interface Conditions
-\end_layout
-
-\begin_layout Standard
-Fault interfaces are used to create dislocations (jumps in the displacement
- field) in the model.
- The dislocations arise from slip across a fault surface.
- Both shear and tensile dislocations are supported.
- For fault interfaces, dislocations in 1D correspond to fault-opening (and
- closing), in 2D lateral-slip and fault opening, and in 3D lateral-slip,
- reverse-slip, and fault opening.
- PyLith supports kinematic (prescribed) slip and dynamic (spontaneous) rupture
- simulations.
-\end_layout
-
-\begin_layout Subsection
-Conventions
-\end_layout
-
-\begin_layout Standard
-Slip corresponds to relative motion across a fault surface.
- Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:fault:orientation"
-
-\end_inset
-
- shows the orientation of the slip vector in 3D with respect to the fault
- surface and coordinate axes.
- PyLith automatically determines the orientation of the fault surface.
- This alleviates the user from having to compute the strike, dip, and rake
- angles over potentially complex, nonplanar fault surfaces.
- Instead, the user specifies fault parameters in terms of lateral motion,
- reverse motion, and fault opening as shown in Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:fault:slip:motions"
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/faultOrientation.eps
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Orientation of a fault surface in 3D, where 
-\begin_inset Formula $\phi$
-\end_inset
-
- denotes the angle of the fault strike, 
-\begin_inset Formula $\delta$
-\end_inset
-
- denotes the angle of the fault dip, and 
-\begin_inset Formula $\lambda$
-\end_inset
-
- the rake angle.
- 
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:fault:orientation"
-
-\end_inset
-
- 
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/slipmotions.eps
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Sign conventions associated with fault slip.
- Positive values are associated with left-lateral, reverse, and fault opening
- motions.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:fault:slip:motions"
-
-\end_inset
-
- 
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Fault Implementation
-\end_layout
-
-\begin_layout Standard
-In order to create relative motion across the fault surface in the finite-elemen
-t mesh, additional degrees of freedom are added along with adjustment of
- the topology of the mesh.
- These additional degrees of freedom are associated with cohesive cells.
- These zero-volume cells allow control of the relative motion between vertices
- on the two sides of the fault.
- PyLith automatically adds cohesive cells for each fault surface.
- Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:fault:cohesive:quad4"
-
-\end_inset
-
- illustrates the results of inserting a cohesive cell in a mesh consisting
- of two quadrilateral cells.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/quad4cohesivekin.eps
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Example of cohesive cell inserted into a mesh of two quadrilateral cells.
- The zero thickness cohesive cell (shown with dashed lines) controls slip
- on the fault via the relative motion between vertices 3 and 7 and 2 and
- 6.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:fault:cohesive:quad4"
-
-\end_inset
-
- 
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Fault Parameters
-\end_layout
-
-\begin_layout Standard
-The principal parameters for fault interface conditions are:
-\end_layout
-
-\begin_layout Description
-id This is an integer identifier for the fault surface.
- It is used to specify the 
-\family typewriter
-material-id
-\family default
- of the cohesive cells in the mesh.
- Material identifiers must be unique so this value cannot be the same as
- any of the material models or any other fault.
-\end_layout
-
-\begin_layout Description
-name Name or label for the fault.
- This associates sets of vertices with the fault surface in addition to
- being used in error and diagnostic reports.
-\end_layout
-
-\begin_layout Description
-up_dir Up-dir or up direction (used in 2D and 3D simulations).
- In 2D the default in-plane slip is left-lateral, so we use the up-direction
- to resolve the ambiguity in specifying reverse slip.
- In 3D the up-direction is used to resolve the ambiguity in the along-strike
- and dip-dir directions.
- If the fault plane is horizontal, then the up-dir corresponds to the reverse-mo
-tion on the +z side of the fault.
- The only requirement for this direction is that it not be collinear with
- the fault normal direction.
- The default value of [0, 0, 1] is appropriate for most 3D problems.
-\end_layout
-
-\begin_layout Description
-quadrature Quadrature object used in integrating fault quantities.
-\end_layout
-
-\begin_layout Description
-output Manager for output of diagnostic and data fields for the fault.
-\end_layout
-
-\begin_layout Standard
-By default the output manager outputs both diagnostic information (e.g., fault
- normal direction) and the slip at each time step.
- Tables 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "tab:fault:kin:output"
-
-\end_inset
-
- and ?? list the fields available for output for a fault with kinematic
- (prescribed) earthquake rupture and a fault with dynamic rupture, respectively.
- The fault coordinate system is shown in Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:fault:slip:motions"
-
-\end_inset
-
-.
- The vectors in the fault coordinate system can be transformed to the global
- coordinate system using the direction vectors in the diagnostic output.
- An example of setting these parameters in a 
-\family typewriter
-.cfg
-\family default
- file is:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.problem]
-\end_layout
-
-\begin_layout LyX-Code
-interfaces = [fault]
-\end_layout
-
-\begin_layout LyX-Code
-
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.problem.interfaces]
-\end_layout
-
-\begin_layout LyX-Code
-fault = pylith.faults.FaultCohesiveKin ; default
-\end_layout
-
-\begin_layout LyX-Code
-
-\end_layout
-
-\begin_layout LyX-Code
-label = fault A ; Group of vertices defining the fault surface
-\end_layout
-
-\begin_layout LyX-Code
-id = 100 ; Value for material identifier associated with fault's cohesive
- cells
-\end_layout
-
-\begin_layout LyX-Code
-up_dir = [0, 0, 1] ; default
-\end_layout
-
-\begin_layout LyX-Code
-quadrature.cell = pylith.feassemble.FIATLagrange
-\end_layout
-
-\begin_layout LyX-Code
-quadrature.cell.dimension = 2
-\end_layout
-
-\begin_layout Standard
-The group of vertices has the label ``fault A.'' We replicate the default
- values for the fault ``up'' direction.
- These settings apply to a 2D fault surface embedded within a 3D mesh, so
- we use 2D Lagrange reference cells.
- The spatial database for elastic properties is used to determine the approximat
-e shear modulus and condition the equations for faster convergence rates.
-\end_layout
-
-\begin_layout Subsection
-Kinematic Earthquake Rupture
-\end_layout
-
-\begin_layout Standard
-Kinematic earthquake ruptures use the FaultCohesiveKin object to specify
- the slip as a function of time on the fault surface.
- Slip may evolve simultaneously over the fault surface instantaneously in
- a single time step (as is usually done in quasi-static simulations) or
- propagate over the fault surface over hundreds and up to thousands of time
- steps (as is usually done in a dynamic simulation).
-\end_layout
-
-\begin_layout Subsubsection
-Governing Equations
-\end_layout
-
-\begin_layout Standard
-The insertion of cohesive cells into the finite-element mesh has the effect
- of decoupling the motion of the two sides of the fault surface.
- In order to impose the desired relative motion, we must adjust the governing
- equations.
- PyLith employs Lagrange multiplier constraints to enforce the constraint
- of the relative motion in the strong sense.
- That is, we enforce the slip across the fault at each degree of freedom.
-\end_layout
-
-\begin_layout Standard
-In conventional implementations the additional degrees of freedom associated
- with the Lagrange multipliers results in a complex implementation.
- However, the use of Lagrange multiplier constraints with cohesive cells
- provides for a simple formulation; we simply add the additional degrees
- of freedom associated with the Lagrange multipliers to the cohesive cells
- as shown in Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:fault:cohesive:quad4"
-
-\end_inset
-
-.
- As a result, the fault implementation is completely confined to the cohesive
- cell.
- Furthermore, the Lagrange multiplier constraints correspond to forces required
- to impose the relative motions, so they are related to the change in stress
- on the fault surface associated with fault slip.
- If we write the algebraic system of equations we are solving in the form
-\begin_inset Formula 
-\begin{equation}
-\underline{A}\overrightarrow{u}=\overrightarrow{b}\,,
-\end{equation}
-
-\end_inset
-
-then including the Lagrange multiplier constraints results in
-\begin_inset Formula 
-\begin{equation}
-\left[\begin{array}{cc}
-\underline{A} & \underline{C}^{T}\\
-\underline{C} & 0
-\end{array}\right]\left[\begin{array}{c}
-\overrightarrow{u}\\
-\overrightarrow{l}
-\end{array}\right]=\left[\begin{array}{c}
-\overrightarrow{b}\\
-\overrightarrow{d}
-\end{array}\right]\,,\label{eq:fault:cohesive:lagrange}
-\end{equation}
-
-\end_inset
-
-where 
-\begin_inset Formula $\overrightarrow{l}$
-\end_inset
-
- is the vector of Lagrange multipliers and 
-\begin_inset Formula $\underline{C}$
-\end_inset
-
- is composed of rotation submatrices, 
-\begin_inset Formula $\underline{R}$
-\end_inset
-
-, associated with the direction cosines relating the relative displacements
- across the fault to the vector of fault slip, 
-\begin_inset Formula $\overrightarrow{d}$
-\end_inset
-
-.
- Note that by using the direction cosines to relate the relative motion
- across the fault, the slip vector and Lagrange multipliers (forces required
- to impose the slip) are in the local fault coordinate system (lateral motion,
- reverse motion, and fault opening).
- 
-\end_layout
-
-\begin_layout Paragraph
-Non-diagonal A
-\end_layout
-
-\begin_layout Standard
-The Lagrange multipliers contribute to both the system Jacobian matrix and
- the residual.
- Because we enforce the constraints in a strong sense, the terms do not
- involve integrals over the fault surface.
- The additional terms in the residual are
-\begin_inset Formula 
-\begin{gather}
-r_{i}^{n}=-C_{ji}^{pn}l_{j}^{p},\\
-r_{i}^{p}=d_{i}^{p}-C_{ij}^{pn}u_{j}^{n},
-\end{gather}
-
-\end_inset
-
-where 
-\begin_inset Formula $n$
-\end_inset
-
- denotes a conventional degree of freedom and 
-\begin_inset Formula $p$
-\end_inset
-
- denotes a degree of freedom associated with a Lagrange multiplier.
- The additional terms in the system Jacobian matrix are simply the direction
- cosines,
-\begin_inset Formula 
-\begin{gather}
-J_{ij}^{np}=C_{ji}^{pn},\\
-J_{ij}^{pn}=C_{ij}^{pn}.
-\end{gather}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Paragraph
-Diagonal A
-\end_layout
-
-\begin_layout Standard
-When we use a lumped system Jacobian matrix, we cannot lump the terms associated
- with the Lagrange multipliers.
- Instead, we formulate the Jacobian ignoring the contributions from the
- Lagrange multipliers, and then adjust the solution after the solve to account
- for their presence.
- Including the Lagrange multipliers in the general expression for the residual
- at time 
-\begin_inset Formula $t+\Delta t$
-\end_inset
-
-, we have
-\begin_inset Formula 
-\begin{equation}
-r_{i}^{n}(t+\Delta t)=A_{ij}^{nm}(u_{j}^{m}(t)+du_{j}^{m}(t))+C_{ki}^{pn}(l_{k}^{p}(t)+dl_{k}^{p}(t)),
-\end{equation}
-
-\end_inset
-
-where we have written the displacements and Lagrange multipliers at time
- 
-\begin_inset Formula $t+\Delta t$
-\end_inset
-
- in terms of the values at time 
-\begin_inset Formula $t$
-\end_inset
-
- and the increment from time 
-\begin_inset Formula $t$
-\end_inset
-
- to 
-\begin_inset Formula $t+\Delta t$
-\end_inset
-
-.
- When we solve the lumped system ignoring the Lagrange multipliers contributions
- to the Jacobian, we formulate the residual assuming the values 
-\begin_inset Formula $du_{i}^{n}$
-\end_inset
-
-(t) and 
-\begin_inset Formula $dl_{k}^{p}(t)$
-\end_inset
-
- are zero.
- So our task is to determine the increment in the Lagrange multiplier, 
-\begin_inset Formula $dl_{k}^{p}$
-\end_inset
-
-, and the correction to the displacement increment, 
-\begin_inset Formula $du_{i}^{n}$
-\end_inset
-
-, and by setting the residual with all terms included to zero; thus, we
- have
-\begin_inset Formula 
-\begin{gather}
-A_{ij}^{nm}(u_{j}^{m}(t)+du_{j}^{m}(t))+C_{ki}^{pn}(l_{k}^{p}(t)+dl_{k}^{p}(t))=0\text{ subject to}\\
-C_{ij}^{pn}(u_{j}^{n}(t)+du_{j}^{n}(t))=d_{i}^{p}.
-\end{gather}
-
-\end_inset
-
-Making use of the residual computed with 
-\begin_inset Formula $du_{i}^{n}(t)=0$
-\end_inset
-
- and 
-\begin_inset Formula $dl_{k}^{p}(t)=0$
-\end_inset
-
-,
-\begin_inset Formula 
-\begin{gather}
-r_{i}^{n}+A_{ij}^{nm}du_{j}^{m}+C_{ki}^{pn}dl_{k}^{p}=0\text{ subject to}\\
-C_{ij}^{pn}(u_{j}^{n}(t)+du_{j}^{n}(t))=d_{i}^{p}.
-\end{gather}
-
-\end_inset
-
-Explicitly writing the equations for the vertices on the negative and positive
- sides of the fault yields
-\begin_inset Formula 
-\begin{gather}
-r_{i}^{n-}+A_{ij}^{nm-}du_{j}^{m-}+R_{ki}^{pn}dl_{k}^{p}=0,\\
-r_{i}^{n+}+A_{ij}^{nm+}du_{j}^{m+}+R_{ki}^{pn}dl_{k}^{p}=0,\\
-R_{ij}^{pn}(u_{j}^{n+}+du_{j}^{n+}-u_{j}^{n-}-du_{j}^{n-})=d_{i}^{p}.
-\end{gather}
-
-\end_inset
-
-Solving the first two equations for 
-\begin_inset Formula $du_{j}^{m-}$
-\end_inset
-
- and 
-\begin_inset Formula $du_{j}^{m+}$
-\end_inset
-
- and combining them using the third equation leads to
-\begin_inset Formula 
-\begin{multline}
-R_{ij}^{pn}\left((A_{ij}^{nm+})^{-1}+(A_{ij}^{nm+})^{-1}\right)R_{ki}^{pn}dl_{k}^{p}=d_{i}^{p}-R_{ij}^{pn}(u_{j}^{n+}-u_{j}^{n-})\\
-+R_{ij}^{pn}\left((A_{ij}^{nm+})^{-1}r_{i}^{n+}-(A_{ij}^{nm-})^{-1}r_{i}^{n-}\right).
-\end{multline}
-
-\end_inset
-
-We do not allow overlap between the fault interface and the absorbing boundary,
- so 
-\begin_inset Formula $A_{ij}^{nm}$
-\end_inset
-
- is the same for all components at a vertex.
- As a result the matrix on the left hand side simplifies to
-\begin_inset Formula 
-\begin{equation}
-S_{ik}^{pn}=\delta_{ik}\left(\frac{1}{A^{nm+}}+\frac{1}{A^{nm-}}\right),
-\end{equation}
-
-\end_inset
-
-and
-\begin_inset Formula 
-\begin{equation}
-dl_{k}^{p}=(S_{ik}^{pn})^{-1}\left(d_{i}^{p}-R_{ij}^{pn}(u_{j}^{n+}-u_{j}^{n-})+R_{ij}^{pn}\left((A_{ij}^{nm+})^{-1}r_{i}^{n+}-(A_{ij}^{nm-})^{-1}r_{i}^{n-}\right)\right).
-\end{equation}
-
-\end_inset
-
-Now that we know the value of the increment in the Lagrange multiplier from
- time 
-\begin_inset Formula $t$
-\end_inset
-
- to time 
-\begin_inset Formula $t+\Delta t$
-\end_inset
-
-, we can correct the value for the displacement increment from time 
-\begin_inset Formula $t$
-\end_inset
-
- to 
-\begin_inset Formula $t+\Delta t$
-\end_inset
-
- using
-\begin_inset Formula 
-\begin{gather}
-\Delta du_{j}^{n-}=(A_{ij}^{nm-})^{-1}C_{ki}^{pn}dl_{k}^{p}\text{ and}\\
-\Delta du_{j}^{n+}=-(A_{ij}^{nm+})^{-1}C_{ki}^{pn}dl_{k}^{p}.
-\end{gather}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection
-Arrays of Kinematic Rupture Components
-\end_layout
-
-\begin_layout Standard
-Multiple earthquake ruptures can be specified on a single fault surface.
- This permits repeatedly rupturing the same portion of a fault or combining
- earthquake rupture on one subset of the fault surface with steady aseismic
- slip on another subset (the two subsets may overlap in both time and space).
- A dynamic array of kinematic earthquake rupture components associates a
- name (string) with each kinematic rupture.
- The default dynamic array contains a single earthquake rupture, ``rupture''.
- The 
-\family typewriter
-eq_srcs
-\family default
- is the 
-\family typewriter
-FaultCohesiveKin
-\family default
- facility for this dynamic array.
- An example of setting the array of kinematic rupture components in a 
-\family typewriter
-.cfg
-\family default
- file:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.problem.interfaces.fault]
-\end_layout
-
-\begin_layout LyX-Code
-eq_srcs = [earthquake,creep]
-\end_layout
-
-\begin_layout Standard
-The output manager includes generic fault information (orientation) as well
- as the final slip or slip rate (as in the case of the constant slip rate
- slip time function) and slip initiation time for each kinematic rupture.
- The name of the slip and slip initiation time vertex fields are of the
- form 
-\family typewriter
-final_slip_NAME
-\family default
- and 
-\family typewriter
-slip_time_NAME
-\family default
-, respectively, where 
-\family typewriter
-NAME
-\family default
- refers to the name used in the dynamic array of kinematic ruptures, 
-\family typewriter
-eq_srcs
-\family default
-.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float table
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\noindent
-\align center
-\begin_inset Caption
-
-\begin_layout Plain Layout
-\begin_inset CommandInset label
-LatexCommand label
-name "tab:fault:kin:output"
-
-\end_inset
-
-Fields available in output of fault information.
-\end_layout
-
-\end_inset
-
-
-\begin_inset VSpace defskip
-\end_inset
-
-
-\begin_inset Tabular
-<lyxtabular version="3" rows="8" columns="3">
-<features tabularvalignment="middle">
-<column alignment="center" valignment="top" width="0">
-<column alignment="center" valignment="top" width="0">
-<column alignment="center" valignment="top" width="3.5in">
-<row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Field Type
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Field
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Description
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-vertex_info_fields
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-normal_dir
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Direction of fault normal in global coordinate system
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-strike_dir
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Direction of fault strike in global coordinate system
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-dip_dir
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Up-dip direction on hanging wall in global coordinate system
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-final_slip_NAME
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Vector of final slip (in fault coordinate system) in meters
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-slip_time
-\family default
-_
-\family typewriter
-\noun on
-NAME
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" bottomline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Time at which slip begins in seconds
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-vertex_data_fields
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-slip
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Slip vector at time step (in fault coordinate system) in meters
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-tractions_change
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" bottomline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Change in fault tractions (in fault coordinate system) in Pa
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection
-Kinematic Rupture Parameters
-\end_layout
-
-\begin_layout Standard
-The kinematic rupture parameters include the origin time and slip time function.
- The slip initiation time in the slip time function is relative to the origin
- time (default is 0).
- This means that slip initiates at a point at a time corresponding to the
- sum of the kinematic rupture's origin time and the slip initiation time
- for that point.
- An example of specifying the kinematic earthquake rupture properties and
- components in a 
-\family typewriter
-.cfg
-\family default
- file:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.problem.interfaces.fault]
-\end_layout
-
-\begin_layout LyX-Code
-eq_srcs = [earthquake,creep]
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.problem.interfaces.fault.eq_srcs.earthquake]
-\end_layout
-
-\begin_layout LyX-Code
-origin_time = 0.0*s ; default origin time
-\end_layout
-
-\begin_layout LyX-Code
-slip_function = pylith.faults.StepSlipFn ; default slip time function
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.problem.interfaces.fault.eq_srcs.creep]
-\end_layout
-
-\begin_layout LyX-Code
-origin_time = 10.0*year ; start creep at 10.0 years
-\end_layout
-
-\begin_layout LyX-Code
-slip_function = pylith.faults.ConstRateSlipFn ; switch to constant slip rate
- slip function
-\end_layout
-
-\begin_layout Subsubsection
-Slip Time Function
-\end_layout
-
-\begin_layout Standard
-The current release of PyLith supports specification of the evolution of
- fault slip using analytical expressions for the slip time history at each
- point, where the parameters for the slip time function may vary over the
- fault surface.
- Currently, three slip time functions are available: (1) a step-function
- for quasi-static modeling of earthquake rupture, (2) a constant slip rate
- time function for modeling steady aseismic slip, and (3) the integral of
- Brune's far-field time function 
-\begin_inset CommandInset citation
-LatexCommand cite
-key "Brune:1970"
-
-\end_inset
-
- for modeling the dynamics of earthquake rupture.
- Additional slip time functions will likely be available in future releases.
- The default slip time function is the step-function slip function.
-\end_layout
-
-\begin_layout Paragraph
-Step-Function Slip Time Function
-\end_layout
-
-\begin_layout Standard
-This slip function prescribes a step in slip at a given time at a point:
- 
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula 
-\begin{gather}
-D(t)=\left\{ \begin{array}{cc}
-0 & 0\leq t<t_{r}\\
-D_{final} & t\ge t_{r}
-\end{array}\right.\,,
-\end{gather}
-
-\end_inset
-
-where 
-\begin_inset Formula $D(t)$
-\end_inset
-
- is slip at time 
-\begin_inset Formula $t$
-\end_inset
-
-, 
-\begin_inset Formula $D_{final}$
-\end_inset
-
- is the final slip, and 
-\begin_inset Formula $t_{r}$
-\end_inset
-
- is the slip initiation time (time when rupture reaches the location).
- The slip is specified independently for each of the components of slip,
- and the slip and slip starting time may vary over the fault surface.
-\end_layout
-
-\begin_layout Description
-final_slip Spatial database of slip (
-\begin_inset Formula $D_{final})$
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Description
-slip_time Spatial database of slip initiation times (
-\begin_inset Formula $t_{r}$
-\end_inset
-
-).
-\end_layout
-
-\begin_layout Standard
-An example of setting these parameters in a 
-\family typewriter
-.cfg
-\family default
- file is:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.problem.interfaces.fault.eq_srcs.rupture]
-\end_layout
-
-\begin_layout LyX-Code
-slip_function = pylith.faults.StepSlipFn
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.problem.interfaces.fault.eq_srcs.rupture.slip_function]
-\end_layout
-
-\begin_layout LyX-Code
-final_slip.iohandler.filename = final_slip.spatialdb
-\end_layout
-
-\begin_layout LyX-Code
-slip_time.iohandler.filename = sliptime.spatialdb
-\end_layout
-
-\begin_layout Standard
-The spatial database files for the slip time function specify the spatial
- variation in the parameters for the slip time function, as shown in Table
- 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "tab:step-function-db-params"
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float table
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\noindent
-\align center
-\begin_inset Caption
-
-\begin_layout Plain Layout
-\begin_inset CommandInset label
-LatexCommand label
-name "tab:step-function-db-params"
-
-\end_inset
-
-Values in spatial database used as parameters in the step function slip
- time function.
-\end_layout
-
-\end_inset
-
-
-\begin_inset VSpace defskip
-\end_inset
-
-
-\begin_inset Tabular
-<lyxtabular version="3" rows="5" columns="3">
-<features tabularvalignment="middle">
-<column alignment="left" valignment="top" width="0">
-<column alignment="left" valignment="top" width="0">
-<column alignment="left" valignment="top" width="2.5in">
-<row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Database
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Value
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Description
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-final_slip
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-left-lateral-slip
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Amount of left-lateral final slip in meters.
- Use negative values for right-lateral slip.
- Applies to faults in 2D and 3D only.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-reverse-slip
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Amount of reverse slip in meters.
- Use negative values for normal slip.
- Applies to faults in 3D only.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-fault-opening
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Amount of fault opening in meters.
- Negative values imply penetration.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-slip_time
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-slip_time
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Slip initiation time (
-\begin_inset Formula $t_{t})$
-\end_inset
-
- in seconds.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Paragraph
-Constant Slip Rate Slip Time Function
-\end_layout
-
-\begin_layout Standard
-This slip function prescribes a constant slip rate for the evolution of
- slip at a point: 
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula 
-\begin{gather}
-D(t)=\left\{ \begin{array}{cc}
-0 & 0\leq t<t_{r}\\
-V(t-t_{r}) & t\ge t_{r}
-\end{array}\right.\,,
-\end{gather}
-
-\end_inset
-
-where 
-\begin_inset Formula $D(t)$
-\end_inset
-
- is slip at time 
-\begin_inset Formula $t$
-\end_inset
-
-, 
-\begin_inset Formula $V$
-\end_inset
-
- is the slip rate, and 
-\begin_inset Formula $t_{r}$
-\end_inset
-
- is the slip initiation time (time when rupture reaches the location).
- The slip rate is specified independently for each of the components of
- slip, and the slip rate and slip starting time may vary over the fault
- surface.
-\end_layout
-
-\begin_layout Description
-slip_rate Spatial database of slip rate (
-\begin_inset Formula $V)$
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Description
-slip_time Spatial database of slip initiation times (
-\begin_inset Formula $t_{r}$
-\end_inset
-
-).
-\end_layout
-
-\begin_layout Standard
-An example of setting these parameters in a 
-\family typewriter
-.cfg
-\family default
- file is:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.problem.interfaces.fault.eq_srcs.ruptures]
-\end_layout
-
-\begin_layout LyX-Code
-slip_function = pylith.faults.ConstRateSlipFn
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.problem.interfaces.fault.eq_srcs.ruptures.slip_function]
-\end_layout
-
-\begin_layout LyX-Code
-slip_rate.iohandler.filename = slip_rate.spatialdb
-\end_layout
-
-\begin_layout LyX-Code
-slip_time.iohandler.filename = sliptime.spatialdb
-\end_layout
-
-\begin_layout Standard
-The spatial database files for the slip time function specify the spatial
- variation in the parameters for the slip time function, as shown in Table
- 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "tab:const-slip-rate-db-params"
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float table
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\noindent
-\align center
-\begin_inset Caption
-
-\begin_layout Plain Layout
-\begin_inset CommandInset label
-LatexCommand label
-name "tab:const-slip-rate-db-params"
-
-\end_inset
-
-Values in spatial database used as parameters in the constant slip rate
- slip time function.
-\end_layout
-
-\end_inset
-
-
-\begin_inset VSpace defskip
-\end_inset
-
-
-\begin_inset Tabular
-<lyxtabular version="3" rows="5" columns="3">
-<features tabularvalignment="middle">
-<column alignment="left" valignment="top" width="0">
-<column alignment="left" valignment="top" width="0">
-<column alignment="left" valignment="top" width="2.5in">
-<row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Database
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Value
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Description
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-slip_rate
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-left-lateral-slip
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Slip rate for left-lateral final slip in meters per second.
- Use negative values for right-lateral slip.
- Applies to faults in 2D and 3D only.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-reverse-slip
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Slip rate for reverse slip in meters per second.
- Use negative values for normal slip.
- Applies to faults in 3D only.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-fault-opening
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Slip rate for fault opening in meters per second.
- Negative values imply penetration.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-slip_time
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-slip_time
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Slip initiation time (
-\begin_inset Formula $t_{t})$
-\end_inset
-
- in seconds.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Paragraph
-Brune Slip Time Function
-\end_layout
-
-\begin_layout Standard
-We use an integral of Brune's far-field time function 
-\begin_inset CommandInset citation
-LatexCommand cite
-key "Brune:1970"
-
-\end_inset
-
- to describe the evolution in time of slip at a point: 
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula 
-\begin{gather}
-D(t)=\left\{ \begin{array}{cc}
-0 & 0\leq t<t_{r}\\
-D_{final}\left(1-exp\left(-\frac{t-t_{r}}{t_{0}}\right)\left(1+\frac{t-t_{r}}{t_{0}}\right)\right) & t\ge t_{r}
-\end{array}\right.\,,\\
-t_{0}=0.6195t_{\mathit{rise}}\,,
-\end{gather}
-
-\end_inset
-
-where 
-\begin_inset Formula $D(t)$
-\end_inset
-
- is slip at time 
-\begin_inset Formula $t$
-\end_inset
-
-, 
-\begin_inset Formula $D_{final}$
-\end_inset
-
- is the final slip at the location, 
-\begin_inset Formula $t_{r}$
-\end_inset
-
- is the slip initiation time (time when rupture reaches the location), and
- 
-\begin_inset Formula $t_{\mathit{rise}}$
-\end_inset
-
- is the rise time.
-\end_layout
-
-\begin_layout Description
-slip Spatial database of final slip distribution (
-\begin_inset Formula $D_{final})$
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Description
-slip_time Spatial database of slip initiation times (
-\begin_inset Formula $t_{r}$
-\end_inset
-
-).
-\end_layout
-
-\begin_layout Description
-rise_time Spatial database for rise time (
-\begin_inset Formula $t_{\mathit{rise}}$
-\end_inset
-
-).
-\end_layout
-
-\begin_layout Standard
-An example of setting these parameters in a 
-\family typewriter
-.cfg
-\family default
- file is:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.problem.interfaces.fault.eq_srcs.ruptures]
-\end_layout
-
-\begin_layout LyX-Code
-slip_function = pylith.faults.BruneSlipFn
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.problem.interfaces.fault.eq_srcs.rupture.slip_function]
-\end_layout
-
-\begin_layout LyX-Code
-slip.iohandler.filename = finalslip.spatialdb
-\end_layout
-
-\begin_layout LyX-Code
-rise_time.iohandler.filename = risetime.spatialdb
-\end_layout
-
-\begin_layout LyX-Code
-slip_time.iohandler.filename = sliptime.spatialdb
-\end_layout
-
-\begin_layout Standard
-The spatial database files for the slip time function specify the spatial
- variation in the parameters for the slip time function, as shown in Table
- 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "tab:Brune-slip-db-params"
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float table
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\noindent
-\align center
-\begin_inset Caption
-
-\begin_layout Plain Layout
-\begin_inset CommandInset label
-LatexCommand label
-name "tab:Brune-slip-db-params"
-
-\end_inset
-
-Values in spatial database used as parameters in the Brune slip time function.
-\end_layout
-
-\end_inset
-
-
-\begin_inset VSpace defskip
-\end_inset
-
-
-\begin_inset Tabular
-<lyxtabular version="3" rows="6" columns="3">
-<features tabularvalignment="middle">
-<column alignment="left" valignment="top" width="0">
-<column alignment="left" valignment="top" width="0">
-<column alignment="left" valignment="top" width="2.5in">
-<row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Database
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Value
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Description
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-slip
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-left-lateral-slip
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Amount of left-lateral final slip in meters.
- Use negative values for right-lateral slip.
- Applies to faults in 2D and 3D only.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-reverse-slip
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Amount of reverse slip in meters.
- Use negative values for normal slip.
- Applies to faults in 3D only.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-fault-opening
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Amount of fault opening in meters.
- Negative values imply penetration.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-rise_time
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-rise_time
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-Rise time 
-\family default
-(
-\begin_inset Formula $t_{r})$
-\end_inset
-
- in seconds.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-slip_time
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-slip_time
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Slip initiation time (
-\begin_inset Formula $t_{t})$
-\end_inset
-
- in meters.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Paragraph
-Liu-Cosine Slip Time Function
-\end_layout
-
-\begin_layout Standard
-This slip time function, proposed by Liu, Archuleta, and Hartzell for use
- in ground-motion modeling
-\begin_inset CommandInset citation
-LatexCommand cite
-key "Liu:etal:2006"
-
-\end_inset
-
-, combines several cosine and sine functions together to create a slip time
- history with a sharp rise and gradual termination with a finite duration
- of slip.
- The evolution of slip at a point follows: 
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula 
-\begin{gather}
-D(t)=\left\{ \begin{array}{cc}
-D_{\mathit{final}}C_{n}\left(0.7t-0.7\frac{t_{1}}{\pi}\sin\frac{\pi t}{t_{1}}-1.2\frac{t_{1}}{\pi}\left(\cos\frac{\pi t}{2t_{1}}-1\right)\right) & 0\leq t<t_{1}\\
-D_{\mathit{final}}C_{n}\left(1.0t-0.7\frac{t1}{\pi}\sin\frac{\pi t}{t_{1}}+0.3\frac{t2}{\pi}\sin\frac{\pi(t-t1)}{t_{2}}+\frac{1.2}{\pi}t_{1}-0.3t_{1}\right) & t_{1}\leq t<2t_{1}\\
-D_{\mathit{final}}C_{n}\left(0.7-0.7\cos\frac{\pi t}{t_{1}}+0.6\sin\frac{\pi t}{2t_{1}}\right) & 2t_{1}\leq t\leq t_{0}
-\end{array}\right.\,,\\
-C_{n}=\frac{\pi}{1.4\pi t_{1}+1.2t_{1}+0.3\pi t_{2}},\\
-t_{0}=1.525t_{\mathit{rise}},\\
-t_{1}=0.13t_{0},\\
-t_{2}=t_{0}-t_{1},
-\end{gather}
-
-\end_inset
-
-where 
-\begin_inset Formula $D(t)$
-\end_inset
-
- is slip at time 
-\begin_inset Formula $t$
-\end_inset
-
-, 
-\begin_inset Formula $D_{final}$
-\end_inset
-
- is the final slip at the location, 
-\begin_inset Formula $t_{r}$
-\end_inset
-
- is the slip initiation time (time when rupture reaches the location), and
- 
-\begin_inset Formula $t_{\mathit{rise}}$
-\end_inset
-
- is the rise time.
-\end_layout
-
-\begin_layout Description
-slip Spatial database of final slip distribution (
-\begin_inset Formula $D_{final})$
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Description
-slip_time Spatial database of slip initiation times (
-\begin_inset Formula $t_{r}$
-\end_inset
-
-).
-\end_layout
-
-\begin_layout Description
-rise_time Spatial database for rise time (
-\begin_inset Formula $t_{\mathit{rise}}$
-\end_inset
-
-).
-\end_layout
-
-\begin_layout Standard
-The spatial database files for the slip time function use the same parameters
- for the slip time function as the Brune slip time function shown in Table
- 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "tab:Brune-slip-db-params"
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Paragraph
-Time-History Slip Time Function
-\end_layout
-
-\begin_layout Standard
-This slip time function reads the slip time function from a data file, so
- it can have an arbitrary shape.
- The slip and slip initiation times are specified using spatial databases,
- so the slip time function, in general, will use a normalized amplitude.
-\end_layout
-
-\begin_layout Description
-slip Spatial database of final slip distribution (
-\begin_inset Formula $D_{final})$
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Description
-slip_time Spatial database of slip initiation times (
-\begin_inset Formula $t_{r}$
-\end_inset
-
-).
-\end_layout
-
-\begin_layout Description
-time_history Temporal database for slip evolution.
-\end_layout
-
-\begin_layout Standard
-An example of setting these parameters in a 
-\family typewriter
-.cfg
-\family default
- file is:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.problem.interfaces.fault.eq_srcs.ruptures]
-\end_layout
-
-\begin_layout LyX-Code
-slip_function = pylith.faults.TimeHistorySlipFn
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.problem.interfaces.fault.eq_srcs.rupture.slip_function]
-\end_layout
-
-\begin_layout LyX-Code
-slip.iohandler.filename = finalslip.spatialdb
-\end_layout
-
-\begin_layout LyX-Code
-slip_time.iohandler.filename = sliptime.spatialdb
-\end_layout
-
-\begin_layout LyX-Code
-time_history.iohandler.filename = myfunction.timedb
-\end_layout
-
-\begin_layout Standard
-The spatial database files for the slip time function specify the spatial
- variation in the parameters for the slip time function, as shown in Table
- 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "tab:Brune-slip-db-params-2"
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float table
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\noindent
-\align center
-\begin_inset Caption
-
-\begin_layout Plain Layout
-\begin_inset CommandInset label
-LatexCommand label
-name "tab:Brune-slip-db-params-2"
-
-\end_inset
-
-Values in spatial database used as parameters in the Brune slip time function.
-\end_layout
-
-\end_inset
-
-
-\begin_inset VSpace defskip
-\end_inset
-
-
-\begin_inset Tabular
-<lyxtabular version="3" rows="6" columns="3">
-<features tabularvalignment="middle">
-<column alignment="left" valignment="top" width="0">
-<column alignment="left" valignment="top" width="0">
-<column alignment="left" valignment="top" width="2.5in">
-<row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Database
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Value
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Description
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-slip
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-left-lateral-slip
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Amount of left-lateral final slip in meters.
- Use negative values for right-lateral slip.
- Applies to faults in 2D and 3D only.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-reverse-slip
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Amount of reverse slip in meters.
- Use negative values for normal slip.
- Applies to faults in 3D only.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-fault-opening
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Amount of fault opening in meters.
- Negative values imply penetration.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-rise_time
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-rise_time
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-Rise time 
-\family default
-(
-\begin_inset Formula $t_{r})$
-\end_inset
-
- in seconds.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-slip_time
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-slip_time
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Slip initiation time (
-\begin_inset Formula $t_{t})$
-\end_inset
-
- in meters.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Dynamic Earthquake Rupture
-\end_layout
-
-\begin_layout Standard
-Dynamic fault interfaces use the FaultCohesiveDyn object to specify a fault
- constitutive model to govern the fault tractions (friction) and the resulting
- slip.
- When friction is large enough such that there is no sliding on the fault,
- the fault is locked (slip is zero) and the Lagrange multipliers assume
- their values just as they do in kinematic ruptures.
- In this case, the Lagrange multipliers correspond to the forces necessary
- to keep the slip zero.
- When the driving forces exceed those allowed by friction, we reduce the
- values of the Lagrange multipliers to those consistent with friction from
- the fault constitutive model.
- When we reduce the Lagrange multipliers, we must increment the slip accordingly
- to maintain consistency in the algebraic system of equations.
-\end_layout
-
-\begin_layout Subsubsection
-Governing Equations
-\end_layout
-
-\begin_layout Standard
-The algebraic systems of equations for dynamic earthquake rupture are the
- same as those for kinematic rupture
-\begin_inset Formula 
-\begin{equation}
-\left[\begin{array}{cc}
-\underline{A} & \underline{C}^{T}\\
-\underline{C} & 0
-\end{array}\right]\left[\begin{array}{c}
-\overrightarrow{u}\\
-\overrightarrow{l}
-\end{array}\right]=\left[\begin{array}{c}
-\overrightarrow{b}\\
-\overrightarrow{d}
-\end{array}\right].
-\end{equation}
-
-\end_inset
-
-Enforcing the limits imposed on the Lagrange multipliers by the fault constituti
-ve model requires determining the increment in slip for an increment in
- the Lagrange multipliers.
- The increment in the Lagrange multipliers is the difference between the
- value computed for the current slip (either zero or the slip at the previous
- time step) and the value computed from the fault constitutive model.
- Starting from our system of algebraic equations,
-\begin_inset Formula 
-\begin{equation}
-A_{ij}^{nm}u_{j}^{m}+C_{ji}^{pn}l_{j}^{p}=b_{i}^{n},
-\end{equation}
-
-\end_inset
-
-we compute the sensitivity for the given loading and boundary conditions,
-\begin_inset Formula 
-\begin{equation}
-A_{ij}^{nm}\partial u_{j}^{m}=-C_{ji}^{pn}\partial l_{j}^{p}.
-\end{equation}
-
-\end_inset
-
-Computing the increment in the slip requires computing the increment in
- the displacements.
- Solving this equation rigorously would require inverting the system Jacobian,
- which we do not want to do unless it is diagonal (as it is in the case
- of the lumped formulations).
- 
-\end_layout
-
-\begin_layout Paragraph
-Non-diagonal A
-\end_layout
-
-\begin_layout Standard
-In general A is a sparse matrix with off-diagonal terms of the form
-\begin_inset Formula 
-\begin{equation}
-A=\left(\begin{array}{ccc}
-A_{0} & A_{1} & A_{2}\\
-A_{3} & A_{n-} & 0\\
-A_{4} & 0 & A_{n+}
-\end{array}\right),
-\end{equation}
-
-\end_inset
-
-where the degrees of freedom on either side of the fault are uncoupled.
- We formulate two small linear systems involving just the degrees of freedom
- associated with vertices on either the positive or negative sides of the
- fault,
-\begin_inset Formula 
-\begin{gather}
-A_{ij}^{nm-}\partial u_{j}^{m-}=-R_{ij}^{pn}\partial l_{j}^{p},\\
-A_{ij}^{nm+}\partial u_{j}^{m+}=R_{ij}^{pn}\partial l_{j}^{p},
-\end{gather}
-
-\end_inset
-
-where we have replaced 
-\begin_inset Formula $\underline{C}$
-\end_inset
-
- with 
-\begin_inset Formula $\underline{R}$
-\end_inset
-
- to denote the explicit inclusion of the signs for the terms in 
-\begin_inset Formula $\underline{C}$
-\end_inset
-
- associated with the positive (
-\begin_inset Formula $n^{+}$
-\end_inset
-
-) and negative (
-\begin_inset Formula $n^{-}$
-\end_inset
-
-) sides of the fault.
- After solving these two linear systems of equations, we compute the increment
- in slip using
-\begin_inset Formula 
-\begin{equation}
-\partial d_{i}^{p}=R_{ij}^{pn}(\partial u_{j}^{n+}-\partial u_{j}^{n-}).
-\end{equation}
-
-\end_inset
-
-The solution of these two linear systems gives the increment in slip assuming
- all the degrees of freedom except those immediately adjacent to the fault
- remain fixed.
- In real applications where the deformation associated with fault slip is
- localized around the fault, this provides good enough approximations so
- that the nonlinear solver converges quickly.
- In problems where deformation associated with slip on the fault is not
- localized (as in the case in some of the example problems), the increment
- in slip computed by solving these two linear systems is not a good approximatio
-n and the nonlinear solve requires a large number of iterations.
-\end_layout
-
-\begin_layout Standard
-We use the PETSc Krylov subspace solver (KSP) to solve these two linear
- systems.
- The PETSc settings for the KSP object are set in the same manner as the
- main solver, except we use the prefix friction_ in all of the settings
- related to the KSP solver for these two linear systems.
- For example, to use the recommended additive Schwarz preconditioner in
- the friction sensitivity solves, the settings in a .cfg file are:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.petsc]
-\end_layout
-
-\begin_layout LyX-Code
-friction_pc_type = asm
-\end_layout
-
-\begin_layout Standard
-See the examples in Sections 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:Tutorial-3d-hex8-friction"
-
-\end_inset
-
- and 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:tutorial:shearwave:quad4"
-
-\end_inset
-
- for details.
-\end_layout
-
-\begin_layout Paragraph
-Diagonal A
-\end_layout
-
-\begin_layout Standard
-With a lumped Jacobian matrix, we can solve for the increment in slip directly,
-\begin_inset Formula 
-\begin{equation}
-\partial d_{i}^{p}=-C_{ij}^{pn}(A_{jk}^{nm})^{-1}C_{lk}^{pm}\partial l_{l}^{p}.
-\end{equation}
-
-\end_inset
-
-By not allowing the fault interface to overlap with the absorbing boundary,
- the terms in 
-\begin_inset Formula $A$
-\end_inset
-
- for a given vertex are identical and the expression on the right-hand side
- reduces to
-\begin_inset Formula 
-\begin{equation}
-\partial d_{i}^{p}=-\left(\frac{1}{A^{n+}}+\frac{1}{A^{n-}}\right)\partial l_{i}^{p}.
-\end{equation}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection
-Dynamic Rupture Parameters
-\end_layout
-
-\begin_layout Standard
-The components of the FaultCohesiveDyn object include
-\end_layout
-
-\begin_layout Description
-db_initial_tractions Spatial database specifying the initial tractions on
- the fault surface.
-\end_layout
-
-\begin_layout Description
-friction Fault constitutive model.
-\end_layout
-
-\begin_layout Standard
-An example of specifying the dynamic earthquake rupture properties and component
-s in a 
-\family typewriter
-.cfg
-\family default
- file:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.problem.interfaces.fault]
-\end_layout
-
-\begin_layout LyX-Code
-db_initial_tractions = spatialdata.spatialdb.SimpleDB
-\end_layout
-
-\begin_layout LyX-Code
-db_initial_tractions.iohandler.filename = tractions.spatialdb
-\end_layout
-
-\begin_layout LyX-Code
-friction = pylith.friction.StaticFriction
-\end_layout
-
-\begin_layout LyX-Code
-friction.db_properties = spatialdata.spatialdb.SimpleDB
-\end_layout
-
-\begin_layout LyX-Code
-friction.db_properties.iohandler.filename = friction.spatialdb
-\end_layout
-
-\begin_layout Standard
-The initial tractions are specified using the same fault coordinate system
- as the slip directions in the kinematic ruptures.
- Table 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "tab:fault:cohesive:dyn:initial:tractions"
-
-\end_inset
-
- gives the values in the spatial database for initial tractions.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float table
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\noindent
-\align center
-\begin_inset Caption
-
-\begin_layout Plain Layout
-\begin_inset CommandInset label
-LatexCommand label
-name "tab:fault:cohesive:dyn:initial:tractions"
-
-\end_inset
-
-Values in spatial databases for initial tractions.
-\end_layout
-
-\end_inset
-
-
-\begin_inset VSpace defskip
-\end_inset
-
-
-\begin_inset Tabular
-<lyxtabular version="3" rows="7" columns="3">
-<features tabularvalignment="middle">
-<column alignment="left" valignment="top" width="0">
-<column alignment="left" valignment="top" width="0">
-<column alignment="left" valignment="top" width="2.5in">
-<row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Dimension
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Value
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Description
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-1-D
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-traction-normal
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Normal traction (tension is positive)
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-2-D
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-traction-shear
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Left-lateral shear traction (reverse shear for dipping faults)
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-traction-normal
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Normal traction (tension is positive)
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-3-D
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-traction-shear-leftlateral
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Left-lateral shear traction
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-traction-shear-updip
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Reverse shear traction
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-traction-normal
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Normal traction (tension is positive)
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection
-Fault Constitutive Models
-\begin_inset CommandInset label
-LatexCommand label
-name "sub:Fault-Constitutive-Models"
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-PyLith provides four fault constitutive models.
- Future releases may contain additional models and a template is provided
- for you to construct your own (see Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:Extending:FaultConstitutiveModels"
-
-\end_inset
-
-).
- The fault constitutive model implementations are independent of dimension
- and work in both 2-D and 3-D.
- In solving the governing equations, PyLith will use a scalar representation
- of the shear traction in 2-D and a vector representation of the shear traction
- in 3-D, with the shear traction resolved in the direction of current slip.
- The fault constitutive models contain a common set of properties and components
-:
-\end_layout
-
-\begin_layout Description
-label Name of the friction model.
-\end_layout
-
-\begin_layout Description
-db_properties Spatial database of the friction model parameters (default
- is SimpleDB).
-\end_layout
-
-\begin_layout Description
-db_initial_state Spatial database for initial state variables (default is
- none).
-\end_layout
-
-\begin_layout Paragraph
-Static Friction
-\end_layout
-
-\begin_layout Standard
-The static friction model produces shear tractions proportional to the fault
- normal traction plus a cohesive stress,
-\begin_inset Formula 
-\begin{equation}
-T_{f}=\begin{cases}
-T_{c}-\mu_{f}T_{n} & T_{n}\leq0\\
-0 & T_{n}>0
-\end{cases}.
-\end{equation}
-
-\end_inset
-
-The spatial database file for the static friction model properties specifies
- the spatial variation of the parameters given in Table 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "tab:static:friction:properties"
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float table
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\noindent
-\align center
-\begin_inset Caption
-
-\begin_layout Plain Layout
-\begin_inset CommandInset label
-LatexCommand label
-name "tab:static:friction:properties"
-
-\end_inset
-
-Values in the spatial database for constant friction parameters.
-\end_layout
-
-\end_inset
-
-
-\begin_inset VSpace defskip
-\end_inset
-
-
-\begin_inset Tabular
-<lyxtabular version="3" rows="3" columns="2">
-<features tabularvalignment="middle">
-<column alignment="left" valignment="top" width="0">
-<column alignment="left" valignment="top" width="2.5in">
-<row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Value
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Description
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-friction-coefficient
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Coefficient of friction, 
-\begin_inset Formula $\mu_{f}$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-cohesion
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Cohesive stress, 
-\begin_inset Formula $T_{c}$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Paragraph
-Slip-Weakening Friction
-\end_layout
-
-\begin_layout Standard
-The linear slip-weakening friction model produces shear tractions equal
- to the cohesive stress plus a contribution proportional to the fault normal
- traction that decreases from a static value to a dynamic value as slip
- progresses,
-\begin_inset Formula 
-\begin{equation}
-T_{f}=\begin{cases}
-T_{c}-(\mu_{s}-(\mu_{s}-\mu_{d})\frac{d}{d_{0}})T_{n} & d\leq d_{0}\text{ and }T_{n}\leq0\\
-T_{c}-\mu_{d}T_{n} & d>d_{0}\text{ and }T_{n}\leq0\\
-0 & T_{n}>0
-\end{cases}
-\end{equation}
-
-\end_inset
-
-The spatial database files for the slip-weakening friction model properties
- and state variables specify the spatial variation of the fault constitutive
- model parameters given in Table 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "tab:slip:weakening:properties:statevars"
-
-\end_inset
-
-.
- As long as the fault is locked, the initial state variables are zero, so
- specifying the initial state variables for slip-weakening friction is rare.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float table
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\noindent
-\align center
-\begin_inset Caption
-
-\begin_layout Plain Layout
-\begin_inset CommandInset label
-LatexCommand label
-name "tab:slip:weakening:properties:statevars"
-
-\end_inset
-
-Values in spatial databases for slip-weakening friction.
-\end_layout
-
-\end_inset
-
-
-\begin_inset VSpace defskip
-\end_inset
-
-
-\begin_inset Tabular
-<lyxtabular version="3" rows="7" columns="3">
-<features tabularvalignment="middle">
-<column alignment="left" valignment="top" width="0">
-<column alignment="left" valignment="top" width="0">
-<column alignment="left" valignment="top" width="2.5in">
-<row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Database
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Value
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Description
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-db_properties
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-static-coefficient
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Static coefficient of friction, 
-\begin_inset Formula $\mu_{s}$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-dynamic-coefficient
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Dynamic coefficient of friction, 
-\begin_inset Formula $\mu_{d}$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-slip-weakening-parameter
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Slip-weakening parameter, 
-\begin_inset Formula $d_{0}$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-cohesion
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Cohesive stress, 
-\begin_inset Formula $T_{c}$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-db_initial_state
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-cumulative-slip
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Cumulative slip, 
-\begin_inset Formula $d$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-previous-slip
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Slip at previous time step, 
-\begin_inset Formula $d(t-\Delta t)$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Paragraph
-Time-Weakening Friction
-\end_layout
-
-\begin_layout Standard
-The linear time-weakening friction model is analogous to the linear slip-weakeni
-ng friction model with time replacing slip.
- It produces shear tractions equal to the cohesive stress plus a contribution
- proportional to the fault normal traction that decreases from a static
- value to a dynamic value as time progresses,
-\begin_inset Formula 
-\begin{equation}
-T_{f}=\begin{cases}
-T_{c}-(\mu_{s}-(\mu_{s}-\mu_{d})\frac{t}{t_{0}})T_{n} & t\leq t_{0}\text{ and }T_{n}\leq0\\
-T_{c}-\mu_{d}T_{n} & t>t_{0}\text{ and }T_{n}\leq0\\
-0 & T_{n}>0
-\end{cases}
-\end{equation}
-
-\end_inset
-
-The spatial database files for the time-weakening friction model properties
- and state variables specify the spatial variation of the fault constitutive
- model parameters given in Table 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "tab:time:weakening:properties:statevars"
-
-\end_inset
-
-.
- As long as the fault is locked, the initial state variable is zero, so
- specifying the initial state variable for time-weakening friction is rare.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float table
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\noindent
-\align center
-\begin_inset Caption
-
-\begin_layout Plain Layout
-\begin_inset CommandInset label
-LatexCommand label
-name "tab:time:weakening:properties:statevars"
-
-\end_inset
-
-Values in spatial databases for time-weakening friction.
-\end_layout
-
-\end_inset
-
-
-\begin_inset VSpace defskip
-\end_inset
-
-
-\begin_inset Tabular
-<lyxtabular version="3" rows="6" columns="3">
-<features tabularvalignment="middle">
-<column alignment="left" valignment="top" width="0">
-<column alignment="left" valignment="top" width="0">
-<column alignment="left" valignment="top" width="2.5in">
-<row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Database
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Value
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Description
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-db_properties
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-static-coefficient
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Static coefficient of friction, 
-\begin_inset Formula $\mu_{s}$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-dynamic-coefficient
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Dynamic coefficient of friction, 
-\begin_inset Formula $\mu_{d}$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-time-weakening-parameter
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Time-weakening parameter, 
-\begin_inset Formula $t_{0}$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-cohesion
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Cohesive stress, 
-\begin_inset Formula $T_{c}$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-db_initial_state
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-elapsed-time
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Elasped time of slip, 
-\begin_inset Formula $t$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Paragraph
-Rate- and State-Friction with Ageing Law
-\end_layout
-
-\begin_layout Standard
-The Dietrich-Ruina rate and state friction model produces shear tractions
- equal to the cohesive stress plus a contribution proportional to the fault
- normal traction that depends on a state variable,
-\begin_inset Formula 
-\begin{gather}
-T_{f}=\begin{cases}
-T_{c}-\mu_{f}T_{n} & T_{n}\leq0\\
-0 & T_{n}>0
-\end{cases}\\
-\mu_{f}=a\sinh^{-1}\left(\frac{1}{2}\frac{V}{V_{0}}\exp\left(\frac{1}{a}\left(\mu_{0}+b\ln\left(\frac{V_{0}\theta}{L}\right)\right)\right)\right)\\
-\frac{d\theta}{dt}=1-\frac{V\theta}{L}
-\end{gather}
-
-\end_inset
-
-where 
-\begin_inset Formula $V$
-\end_inset
-
- is slip rate, 
-\begin_inset Formula $a$
-\end_inset
-
- and 
-\begin_inset Formula $b$
-\end_inset
-
- are coefficients, 
-\begin_inset Formula $L$
-\end_inset
-
- is the characteristic slip distance, 
-\begin_inset Formula $\theta$
-\end_inset
-
- is a state variable.
- We have used the regularization of the coefficient of friction proposed
- by Ben-Zion and Rice 
-\begin_inset CommandInset citation
-LatexCommand cite
-key "BenZion:Rice:1997"
-
-\end_inset
-
- to permit zero slip rate.
- Following Kaneko 
-\shape italic
-et al.
-
-\shape default
- 
-\begin_inset CommandInset citation
-LatexCommand cite
-key "Kaneko:etal:2008"
-
-\end_inset
-
-, we integrate the evolution equation for the state variable keeping slip
- rate constant to get
-\begin_inset Formula 
-\begin{equation}
-\theta(t+\Delta t)=\theta(t)\exp\left(\frac{-V(t)\Delta t}{L}\right)+\frac{L}{V(t)}\left(1-\exp\left(-\frac{V(t)\Delta t}{L}\right)\right).
-\end{equation}
-
-\end_inset
-
-As the slip rate approaches zero, the first exponential term approaches
- 1.
- Using the first three terms of the Taylor series expansion of the second
- exponential yields
-\begin_inset Formula 
-\begin{equation}
-\theta(t+\Delta t)=\begin{cases}
-\theta(t)\exp\left(-\frac{V(t)\Delta t}{L}\right)+\Delta t-\frac{1}{2}\frac{V(t)\Delta t^{2}}{L} & \frac{V(t)\Delta t}{L}<0.00001\\
-\theta(t)\exp\left(-\frac{V(t)\Delta t}{L}\right)+\frac{L}{V(t)}\left(1-\exp\left(-\frac{V(t)\Delta t}{L}\right)\right) & \frac{V(t)\Delta t}{L}\ge0.00001
-\end{cases}.
-\end{equation}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-The spatial database files for the rate and state friction model properties
- and state variables specify the spatial variation of the fault constitutive
- model parameters given in Table 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "tab:rate:state:ageing:properties:statevars"
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float table
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\noindent
-\align center
-\begin_inset Caption
-
-\begin_layout Plain Layout
-\begin_inset CommandInset label
-LatexCommand label
-name "tab:rate:state:ageing:properties:statevars"
-
-\end_inset
-
-Values in spatial databases for slip-weakening friction.
-\end_layout
-
-\end_inset
-
-
-\begin_inset VSpace defskip
-\end_inset
-
-
-\begin_inset Tabular
-<lyxtabular version="3" rows="8" columns="3">
-<features tabularvalignment="middle">
-<column alignment="left" valignment="top" width="0">
-<column alignment="left" valignment="top" width="0">
-<column alignment="left" valignment="top" width="2.5in">
-<row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Database
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Value
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Description
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-db_properties
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-reference-friction-coefficient
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Steady-state coefficient of friction at slip rate 
-\begin_inset Formula $V_{0}$
-\end_inset
-
-, 
-\begin_inset Formula $\mu_{s}$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-reference-slip-rate
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Reference slip rate, 
-\begin_inset Formula $V_{0}$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-characteristic-slip-distance
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Slip-weakening parameter, 
-\begin_inset Formula $L$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-constitutive-parameter-a
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Coefficient for the 
-\begin_inset Formula $\ln$
-\end_inset
-
- slip rate term, 
-\begin_inset Formula $a$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-constitutive-parameter-b
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Coefficient for the 
-\begin_inset Formula $\ln$
-\end_inset
-
- state variable term, 
-\begin_inset Formula $b$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-cohesion
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Cohesive stress, 
-\begin_inset Formula $T_{c}$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-db_initial_state
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-state-variable
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-State variable, 
-\begin_inset Formula $\theta$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Section
-Gravitational Body Forces
-\end_layout
-
-\begin_layout Standard
-Many problems in geophysics require the consideration of gravitational body
- forces.
- For example, it is often important to include the effects of the lithostatic
- (overburden) pressure.
- In future releases of PyLith that permit nonlinear bulk rheologies, body
- forces will affect plastic yield criteria and the deformation field for
- large deformation/finite strain problems.
- As described in Chapter 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "cha:Governing-Equations"
-
-\end_inset
-
-, the body forces contribute to the residual,
-\begin_inset Formula 
-\begin{equation}
-r_{i}^{n}=\int_{V}f_{i}N^{n}\: dV.
-\end{equation}
-
-\end_inset
-
-For gravitational body forces the body force per unit volume, 
-\begin_inset Formula $f_{i}$
-\end_inset
-
-, is given as the product of the mass density, 
-\begin_inset Formula $\rho$
-\end_inset
-
-, the scalar gravitational acceleration value, 
-\begin_inset Formula $g$
-\end_inset
-
-, and the gravitational acceleration orientation vector, 
-\begin_inset Formula $a_{i}$
-\end_inset
-
-:
-\begin_inset Formula 
-\begin{equation}
-f_{i}=\rho ga_{i}.
-\end{equation}
-
-\end_inset
-
-The mass density is a property of every material model, and is thus included
- in the spatial database with the physical properties for each material.
- The gravitational acceleration is assumed to be uniform and constant for
- a given problem, with a default value of 9.80665 m/s
-\begin_inset Formula $^{\text{2}}$
-\end_inset
-
-.
- The orientation vector will depend on the dimension of the problem as well
- as the coordinate system being used.
- The default orientation vector has components (0, 0, -1).
- This is appropriate for three-dimensional problems where the gravity vector
- is aligned with the negative z-axis, as would be the case in a geographic-proje
-cted coordinate system or a generic Cartesian coordinate system.
- For cases in which the curvature of the earth should be considered, the
- spatialdata package provides an earth-centered, earth-fixed (ECEF) coordinate
- system and a local georeferenced Cartesian system; in each of these cases
- the orientation vector is computed automatically, although this feature
- has not been tested.
- For problems in one or two dimensions where the orientation vector is constant,
- the vector will need to be explicitly specified.
- For example, in a two-dimensional problem, the vector might be specified
- as (0, -1, 0).
- The vector still has three components, although the extra component is
- not used.
-\end_layout
-
-\begin_layout Standard
-Gravity is turned off by default.
- To include gravitational effects in a simulation, you can turn it on as
- follows:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent]
-\end_layout
-
-\begin_layout LyX-Code
-use_gravity = true
-\end_layout
-
-\begin_layout Standard
-By simply adding this flag, the default gravity field values will be used
- and a 
-\family typewriter
-gravity_field
-\family default
- component will be assigned for the problem.
- The default values may be changed by altering the properties of 
-\family typewriter
-gravity_field
-\family default
-:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.gravity_field]
-\end_layout
-
-\begin_layout LyX-Code
-acceleration = 100.0*m*s**-2
-\end_layout
-
-\begin_layout LyX-Code
-gravity_dir = [0, -1, 0]
-\end_layout
-
-\begin_layout Standard
-An example problem using gravity is described in Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:Tutorial-3d-hex8-gravity"
-
-\end_inset
-
-.
-\end_layout
-
-\end_body
-\end_document
+#LyX 2.0 created this file. For more info see http://www.lyx.org/
+\lyxformat 413
+\begin_document
+\begin_header
+\textclass book
+\use_default_options false
+\maintain_unincluded_children false
+\language english
+\language_package default
+\inputencoding auto
+\fontencoding global
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry true
+\use_amsmath 1
+\use_esint 0
+\use_mhchem 1
+\use_mathdots 1
+\cite_engine basic
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\use_refstyle 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\leftmargin 1in
+\topmargin 1in
+\rightmargin 1in
+\bottommargin 1in
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\quotes_language english
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\end_header
+
+\begin_body
+
+\begin_layout Chapter
+\begin_inset CommandInset label
+LatexCommand label
+name "cha:boundary:interface:conditions"
+
+\end_inset
+
+Boundary and Interface Conditions
+\end_layout
+
+\begin_layout Section
+Assigning Boundary Conditions
+\end_layout
+
+\begin_layout Standard
+There are four basic steps in assigning a specific boundary condition to
+ a portion of the domain.
+\end_layout
+
+\begin_layout Enumerate
+Create sets of vertices in the mesh generation process for each boundary
+ condition.
+\end_layout
+
+\begin_layout Enumerate
+Define boundary condition groups corresponding to the vertex sets.
+\end_layout
+
+\begin_layout Enumerate
+Set the parameters for each boundary condition group using 
+\family typewriter
+.cfg
+\family default
+ or 
+\family typewriter
+.pml
+\family default
+ files and/or command line arguments.
+\end_layout
+
+\begin_layout Enumerate
+Specify the spatial variation in parameters for the boundary condition using
+ a spatial database file.
+\end_layout
+
+\begin_layout Subsection
+Creating Sets of Vertices
+\end_layout
+
+\begin_layout Standard
+The procedure for creating sets of vertices differs depending on the mesh
+ generator.
+ For meshes specified using the PyLith mesh ASCII format, the sets of vertices
+ are specified using groups (see Appendix 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:MeshIOAscii"
+
+\end_inset
+
+).
+ In CUBIT the groups of vertices are created using nodesets.
+ Similarly, in LaGriT, psets are used.
+ Note that we chose to associated boundary conditions with groups of vertices
+ because nearly every mesh generation package supports associating a string
+ or integer with groups of vertices.
+ Note also that we currently associate boundary conditions with string identifie
+rs, so even if the mesh generator uses integers, the name is specified as
+ the digits of the integer value.
+ Finally, note that every vertex set that ultimately is associated with
+ a boundary condition on a cell face (e.g., Neumann boundary conditions and
+ fault interface conditions) must correspond to a simply-connected surface.
+\end_layout
+
+\begin_layout Subsection
+Arrays of Boundary Condition Components
+\end_layout
+
+\begin_layout Standard
+A dynamic array of boundary condition components associates a name (string)
+ with each boundary condition.
+ This dynamic array of boundary conditions replaces the boundary condition
+ container in PyLith 1.0.
+ User-defined containers are no longer necessary, and the predefined containers
+ are no longer available (or necessary).
+ The default boundary condition for each component in the array is the Dirichlet
+Points object.
+ Other boundary conditions can be bound to the named items in the array
+ via a 
+\family typewriter
+.cfg
+\family default
+ file, 
+\family typewriter
+.pml
+\family default
+ file, or the command line.
+ The parameters for the boundary condition are set using the name of the
+ boundary condition.
+ An example of setting the array of boundary condition components and changing
+ the types of boundary conditions in a 
+\family typewriter
+.cfg
+\family default
+ file:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem]
+\end_layout
+
+\begin_layout LyX-Code
+bc = [x_neg,x_pos,y_pos,z_neg] ; Array of boundary conditions
+\end_layout
+
+\begin_layout LyX-Code
+# Default boundary condition is DirichletPoints
+\end_layout
+
+\begin_layout LyX-Code
+# Keep default value for bc.x_neg
+\end_layout
+
+\begin_layout LyX-Code
+bc.x_pos = pylith.bc.DirichletBoundary ; change BC type to DirichletBoundary
+\end_layout
+
+\begin_layout LyX-Code
+bc.y_pos = pylith.bc.AbsorbingDampers ; change BC type to AbsorbingDampers
+\end_layout
+
+\begin_layout LyX-Code
+bc.z_neg = pylith.bc.Neumann ; change BC type to Neumann (traction)
+\end_layout
+
+\begin_layout Section
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Time:Dependent:BC"
+
+\end_inset
+
+Time-Dependent Boundary Conditions
+\end_layout
+
+\begin_layout Standard
+Several boundary conditions use a common formulation for the spatial and
+ temporal variation of the boundary condition parameters,
+\begin_inset Formula 
+\begin{equation}
+f(\vec{x})=f_{0}(\vec{x})+\dot{f}_{0}(\vec{x})(t-t_{0}(\vec{x}))+f_{1}(\vec{x})a(t-t_{1}(\vec{x})),
+\end{equation}
+
+\end_inset
+
+where 
+\begin_inset Formula $f(\vec{x})$
+\end_inset
+
+ may be a scalar or vector parameter, 
+\begin_inset Formula $f_{0}(\vec{x})$
+\end_inset
+
+ is a constant value, 
+\begin_inset Formula $\dot{f}_{0}(\vec{x})$
+\end_inset
+
+ is a constant rate of change in the value, 
+\begin_inset Formula $t_{0}(\vec{x})$
+\end_inset
+
+ is the onset time for the constant rate of change, 
+\begin_inset Formula $f_{1}(\vec{x})$
+\end_inset
+
+ is the amplitude for the temporal modulation, 
+\begin_inset Formula $a(t)$
+\end_inset
+
+ is the variation in amplitude with time, 
+\begin_inset Formula $t_{1}(\vec{x})$
+\end_inset
+
+ is the onset time for the temporal modulation, and 
+\begin_inset Formula $\vec{x}$
+\end_inset
+
+ is the position of a location in space.
+ This common formulation permits easy specification of a scalar or vector
+ with a constant value, constant rate of change of a value, and/or modulation
+ of a value in time.
+ One can specify just the initial value, just the rate of change of the
+ value (along with the corresponding onset time), or just the modulation
+ in amplitude (along with the corresponding temporal variation and onset
+ time), or any combination of the three.
+ The facilities associated with this formulation are:
+\end_layout
+
+\begin_layout Description
+db_initial Spatial database specifying the spatial variation in the initial
+ value (default is none).
+\end_layout
+
+\begin_layout Description
+db_rate Spatial database specifying rate of change in the value (default
+ is none).
+\end_layout
+
+\begin_layout Description
+db_change Spatial database specifying the amplitude of the temporal modulation
+ (default is none).
+\end_layout
+
+\begin_layout Description
+th_change Time history database specifying the temporal change in amplitude
+ (default is none).
+\end_layout
+
+\begin_layout Subsection
+Dirichlet Boundary Conditions
+\end_layout
+
+\begin_layout Standard
+Dirichlet boundary conditions in PyLith prescribe the displacement of a
+ subset of the vertices of the finite-element mesh.
+ While Dirichlet boundary conditions can be applied to any vertex, usually
+ they are applied to vertices on the lateral and bottom boundaries of the
+ domain.
+ There are two types of Dirichlet boundary conditions, DirichletBC and Dirichlet
+Boundary.
+ Both provide identical constraints on the solution, but DirichletBoundary
+ is limited to vertices of a simply-connected surface, which allows diagnostic
+ output of the prescribed displacements.
+ DirichletBC can be applied to a set of unconnected vertices.
+\end_layout
+
+\begin_layout Subsubsection
+Dirichlet Boundary Condition Parameters
+\end_layout
+
+\begin_layout Standard
+The properties and components common to both the DirichletPoints and DirichletBo
+undary boundary conditions are:
+\end_layout
+
+\begin_layout Description
+label Label of the group of vertices associated with the boundary condition.
+\end_layout
+
+\begin_layout Description
+bc_dof Array of degrees of freedom to be fixed (first degree of freedom
+ is 0).
+\end_layout
+
+\begin_layout Standard
+DirichletBoundary contains an additional component:
+\end_layout
+
+\begin_layout Description
+output Manager for output of displacements on boundary with specified displaceme
+nts.
+\end_layout
+
+\begin_layout Standard
+By default the output manager does not output any information.
+ The specified displacements and velocities can be output by including ``displac
+ements'' and ``velocities'' in the output manager's 
+\family typewriter
+vertex_info_fields
+\family default
+ array parameter.
+ An example of setting the Dirichlet boundary condition parameters in a
+ 
+\family typewriter
+.cfg
+\family default
+ file is:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem]
+\end_layout
+
+\begin_layout LyX-Code
+bc = [mybc]
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.bc.mybc]
+\end_layout
+
+\begin_layout LyX-Code
+label = group A 
+\end_layout
+
+\begin_layout LyX-Code
+bc_dof = [2] ; fixed displacement in z direction
+\end_layout
+
+\begin_layout LyX-Code
+db_initial = spatialdata.spatialdb.SimpleDB
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.iohandler.filename = disp_A.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.query_type = nearest ; change query type to nearest point algorithm
+\end_layout
+
+\begin_layout LyX-Code
+db_rate = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.values = [displacement-rate-z]
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.data = [1.0e-06*m/s] ; velocity is 1.0e-06 m/s
+\end_layout
+
+\begin_layout Standard
+We have created an array with one boundary condition, mybc.
+ The group of vertices associated with the boundary condition is group A.
+ For the database associated with the constant displacement, we use a SimpleDB.
+ We set the filename and query type for the database.
+ For the rate of change of values, we use a UniformDB and specify the velocity
+ in the z-direction to be 1.0e-06 m/s.
+ See Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:spatial:databases"
+
+\end_inset
+
+ for a discussion of the different types of spatial databases available.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float table
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\noindent
+\align center
+\begin_inset Caption
+
+\begin_layout Plain Layout
+\begin_inset CommandInset label
+LatexCommand label
+name "tab:dirichlet:output"
+
+\end_inset
+
+Fields available in output of DirichletBoundary boundary condition information.
+\end_layout
+
+\end_inset
+
+
+\begin_inset VSpace defskip
+\end_inset
+
+
+\begin_inset Tabular
+<lyxtabular version="3" rows="6" columns="3">
+<features tabularvalignment="middle">
+<column alignment="center" valignment="top" width="0">
+<column alignment="center" valignment="top" width="0">
+<column alignment="center" valignment="top" width="3in">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Field Type
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Field
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Description
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+vertex_info_fields
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+displacement_initial
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Initial displacement field in global coordinate system
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+velocity
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Rate of change of displacement field in global coordinate system
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+velocity_start_time
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Onset time in seconds for rate of change in displacement field
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+displacement_change
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Amplitude of change in displacement field in global coordinate system
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+change_start_time
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Onset time in seconds for the amplitude change in the displacement field
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Dirichlet Boundary Condition Spatial Database Files
+\end_layout
+
+\begin_layout Standard
+The spatial database files for the Dirichlet boundary condition specify
+ the fixed displacements.
+ The spatial database file may contain displacements at more degrees of
+ freedom than those specified in the Dirichlet boundary condition settings
+ using the 
+\family typewriter
+bc_dof
+\family default
+ setting.
+ Only those listed in 
+\family typewriter
+bc_dof
+\family default
+ will be used.
+ This permits using the same spatial database file for multiple Dirichlet
+ boundary conditions with the same displacement field.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float table
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\noindent
+\align center
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Values in the spatial databases used for Dirichlet boundary conditions.
+\end_layout
+
+\end_inset
+
+
+\begin_inset VSpace defskip
+\end_inset
+
+
+\begin_inset Tabular
+<lyxtabular version="3" rows="4" columns="2">
+<features tabularvalignment="middle">
+<column alignment="center" valignment="top" width="0">
+<column alignment="center" valignment="top" width="4in">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Spatial database
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Name in Spatial Database
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+db_initial
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+displacement-x, displacement-y, displacement-z
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+db_rate
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+displacement-rate-x, displacement-rate-y, displacement-rate-z, rate-start-time
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+db_change
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+displacement-x, displacement-y, displacement-z, change-start-time
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Neumann Boundary Conditions
+\end_layout
+
+\begin_layout Standard
+Neumann boundary conditions are surface tractions applied over a subset
+ of the mesh.
+ As with the DirichletBoundary condition, each Neumann boundary condition
+ can only be applied to a simply-connected surface.
+ The surface over which the tractions are applied always has a spatial dimension
+ that is one less than the dimension of the finite-element mesh.
+ Traction values are computed at the integration points of each cell on
+ the surface, using values from a spatial database.
+ The tractions are integrated over each cell and assembled to obtain the
+ forces applied at the vertices.
+ See Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Tutorial-twoquad4-traction"
+
+\end_inset
+
+ for a tutorial that uses Neumann boundary conditions.
+\end_layout
+
+\begin_layout Subsubsection
+Neumann Boundary Condition Parameters
+\end_layout
+
+\begin_layout Standard
+The Neumann boundary condition properties and components are:
+\end_layout
+
+\begin_layout Description
+label Name of the group of vertices defining the mesh boundary for the Neumann
+ boundary condition.
+\end_layout
+
+\begin_layout Description
+up_dir This is a 3-vector that provides a hint for the direction perpendicular
+ to the horizontal tangent direction that is not collinear with the direction
+ normal to the surface.
+ The default value is (0,0,1), which assumes that the z-axis is positive
+ upward.
+ This vector is only needed for three-dimensional problems where the positive
+ upward direction differs from the default.
+\end_layout
+
+\begin_layout Description
+output The output manager associated with diagnostic output (traction vector).
+\end_layout
+
+\begin_layout Description
+quadrature The quadrature object to be used for numerical integration.
+ Since we are integrating over a surface that is one dimension lower than
+ the problem domain, this would typically be set to something like 
+\family typewriter
+Quadrature2Din3D
+\family default
+ (for a three-dimensional problem).
+\end_layout
+
+\begin_layout Standard
+By default the output manager does not output any information.
+ The specified tractions can be output in global coordinates by including
+ ``tractions'' in the output manager's 
+\family typewriter
+cell_info_fields
+\family default
+ array parameter.
+ An example of setting these parameters in a 
+\family typewriter
+.cfg
+\family default
+ file is:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent]
+\end_layout
+
+\begin_layout LyX-Code
+bc = [x_neg,x_pos,y_neg]
+\end_layout
+
+\begin_layout LyX-Code
+bc.x_pos = pylith.bc.Neumann ; Change BC type to Neumann
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.bc.x_pos]
+\end_layout
+
+\begin_layout LyX-Code
+label = x_pos ; Name of group of vertices for +x boundary
+\end_layout
+
+\begin_layout LyX-Code
+db_initial = spatialdata.spatialdb.SimpleDB
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.label = Neumann BC +x edge
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.iohandler.filename = axialtract.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.query_type = nearest
+\end_layout
+
+\begin_layout LyX-Code
+quadrature.cell = pylith.feassemble.FIATLagrange
+\end_layout
+
+\begin_layout LyX-Code
+quadrature.cell.dimension = 1
+\end_layout
+
+\begin_layout LyX-Code
+quadrature.cell.quad_order = 2
+\end_layout
+
+\begin_layout Standard
+These settings correspond to the example problem described in Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Tutorial-twoquad4-traction"
+
+\end_inset
+
+.
+ It is necessary to set the boundary condition type to 
+\family typewriter
+pylith.bc.Neumann
+\family default
+, since the default value is 
+\family typewriter
+Dirichlet
+\family default
+BC.
+ Constant tractions are used for this particular problem, so a quadrature
+ order of one would have been sufficient; however, for problems involving
+ more complex variations (e.g., a linear variation), a quadrature order of
+ two will provide more accurate results.
+ Note that there is no advantage to specifying an integration order higher
+ than two, since linear elements are being used for this problem.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float table
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\noindent
+\align center
+\begin_inset Caption
+
+\begin_layout Plain Layout
+\begin_inset CommandInset label
+LatexCommand label
+name "tab:neumann:output"
+
+\end_inset
+
+Fields available in output of Neumann boundary condition information.
+\end_layout
+
+\end_inset
+
+
+\begin_inset VSpace defskip
+\end_inset
+
+
+\begin_inset Tabular
+<lyxtabular version="3" rows="6" columns="3">
+<features tabularvalignment="middle">
+<column alignment="center" valignment="top" width="0">
+<column alignment="center" valignment="top" width="0">
+<column alignment="center" valignment="top" width="3in">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Field Type
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Field
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Description
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+cell_info_fields
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+tracton_initial
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Initial traction field in global coordinate system
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+traction_rate
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Rate of change of traction field in global coordinate system
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+rate_start_time
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Onset time in seconds for rate of change in traction field
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+traction_change
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Amplitude of change in traction field in global coordinate system
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+change_start_time
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Onset time in seconds for the amplitude change in the traction field
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Neumann Boundary Condition Spatial Database Files
+\end_layout
+
+\begin_layout Standard
+The spatial database files for the Neumann boundary condition specify the
+ applied tractions.
+ The number of traction components is equal to the spatial dimension for
+ the problem.
+ The tractions are specified in a local coordinate system for the boundary.
+ The names of the components of the traction vector are:
+\end_layout
+
+\begin_layout Description
+one-dimensional 
+\family typewriter
+normal
+\end_layout
+
+\begin_layout Description
+two-dimensional 
+\family typewriter
+shear
+\family default
+, 
+\family typewriter
+normal
+\end_layout
+
+\begin_layout Description
+three-dimensional 
+\family typewriter
+horiz-shear
+\family default
+, 
+\family typewriter
+vert-shear
+\family default
+, 
+\family typewriter
+normal
+\end_layout
+
+\begin_layout Standard
+Ambiguities in specifying the shear tractions in 3D problems are resolved
+ using the 
+\family typewriter
+up_dir
+\family default
+ parameter.
+ In the case of a horizontal surface, users will need to pick an alternative
+ vector, as the default 
+\family typewriter
+up_dir
+\family default
+ would coincide with the normal direction.
+ In this case, the orientation for the 
+\family typewriter
+vert-shear-traction
+\family default
+ component will correspond to whatever the user specifies for 
+\family typewriter
+up_dir
+\family default
+, rather than the actual vertical direction.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float table
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\noindent
+\align center
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Values in the spatial databases used for Dirichlet boundary conditions in
+ three dimensions.
+ In one- and two-dimensional problems, the names of the components are slightly
+ different as described earlier in this section.
+\end_layout
+
+\end_inset
+
+
+\begin_inset VSpace defskip
+\end_inset
+
+
+\begin_inset Tabular
+<lyxtabular version="3" rows="4" columns="2">
+<features tabularvalignment="middle">
+<column alignment="center" valignment="top" width="0">
+<column alignment="center" valignment="top" width="4in">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Spatial database
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Name in Spatial Database
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+db_initial
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+traction-shear-horiz, traction-shear-vert, traction-normal
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+db_rate
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+traction-rate-horiz-shear, traction-rate-vert-shear, traction-rate-normal,
+ rate-start-time
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+db_change
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+traction-horiz-shear, traction-vert-shear, traction-normal, change-start-time
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Point Force Boundary Conditions
+\end_layout
+
+\begin_layout Standard
+Point force boundary conditions in PyLith prescribe the application of point
+ forces to a subset of the vertices of the finite-element mesh.
+ While point force boundary conditions can be applied to any vertex, usually
+ they are applied to vertices on the lateral, top, and bottom boundaries
+ of the domain.
+\end_layout
+
+\begin_layout Subsubsection
+Point Force Parameters
+\end_layout
+
+\begin_layout Standard
+The properties and components common to both the DirichletBC and DirichletBounda
+ry boundary conditions are:
+\end_layout
+
+\begin_layout Description
+label Label of the group of vertices associated with the boundary condition.
+\end_layout
+
+\begin_layout Description
+bc_dof Array of degrees of freedom to which forces are applied (first degree
+ of freedom is 0).
+\end_layout
+
+\begin_layout Standard
+An example of setting the point force boundary condition parameters in a
+ 
+\family typewriter
+.cfg
+\family default
+ file is:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem]
+\end_layout
+
+\begin_layout LyX-Code
+bc = [mybc]
+\end_layout
+
+\begin_layout LyX-Code
+bc.mybc = pylith.bc.PointForce
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.bc.mybc]
+\end_layout
+
+\begin_layout LyX-Code
+label = group A 
+\end_layout
+
+\begin_layout LyX-Code
+bc_dof = [2] ; fixed displacement in z direction
+\end_layout
+
+\begin_layout LyX-Code
+db_initial = spatialdata.spatialdb.SimpleDB
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.iohandler.filename = force_A.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.query_type = nearest ; change query type to nearest point algorithm
+\end_layout
+
+\begin_layout LyX-Code
+db_rate = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.values = [force-rate-z]
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.data = [1.0e+5*newton/s]
+\end_layout
+
+\begin_layout Standard
+We have created an array with one boundary condition, mybc.
+ The group of vertices associated with the boundary condition is group A.
+ For the database associated with the constant force, we use a SimpleDB.
+ We set the filename and query type for the database.
+ For the rate of change of values, we use a UniformDB and specify the rate
+ of change in the force to be 1.0e+5 Newton/s.
+ See Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:spatial:databases"
+
+\end_inset
+
+ for a discussion of the different types of spatial databases available.
+\end_layout
+
+\begin_layout Subsubsection
+Point Force Spatial Database Files
+\end_layout
+
+\begin_layout Standard
+The spatial database files for the Dirichlet boundary condition specify
+ the fixed displacements.
+ The spatial database file may contain displacements at more degrees of
+ freedom than those specified in the Dirichlet boundary condition settings
+ using the 
+\family typewriter
+bc_dof
+\family default
+ setting.
+ Only those listed in 
+\family typewriter
+bc_dof
+\family default
+ will be used.
+ This permits using the same spatial database file for multiple Dirichlet
+ boundary conditions with the same displacement field.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float table
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\noindent
+\align center
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Values in the spatial databases used for point force boundary conditions.
+\end_layout
+
+\end_inset
+
+
+\begin_inset VSpace defskip
+\end_inset
+
+
+\begin_inset Tabular
+<lyxtabular version="3" rows="4" columns="2">
+<features tabularvalignment="middle">
+<column alignment="center" valignment="top" width="0">
+<column alignment="center" valignment="top" width="4in">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Spatial database
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Name in Spatial Database
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+db_initial
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+force-x, force-y, force-z
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+db_rate
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+force-rate-x, force-rate-y, force-rate-z, rate-start-time
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+db_change
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+force-x, force-y, force-z, change-start-time
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:absorbing:boundaries"
+
+\end_inset
+
+Absorbing Boundary Conditions
+\end_layout
+
+\begin_layout Standard
+This boundary condition attempts to prevent seismic waves reflecting off
+ of a boundary by placing simple dashpots on the boundary.
+ Normally incident dilatational and shear waves are perfectly absorbed.
+ Waves incident at other angles are only partially absorbed.
+ This boundary condition is simpler than a perfectly matched layer (PML)
+ boundary condition but does not perform quite as well, especially for surface
+ waves.
+ If the waves arriving at the absorbing boundary are relatively small in
+ amplitude compared to the amplitudes of primary interest, this boundary
+ condition gives reasonable results.
+\end_layout
+
+\begin_layout Standard
+The Absorbing boundary condition properties and components are:
+\end_layout
+
+\begin_layout Description
+label Name of the group of vertices defining the mesh boundary for the absorbing
+ boundary condition.
+\end_layout
+
+\begin_layout Description
+up_dir This is a 3-vector that provides a hint for the direction perpendicular
+ to the horizontal tangent direction that is not collinear with the direction
+ normal to the surface.
+ The default value is (0,0,1), which assumes that the z-axis is positive
+ upward.
+ This vector is only needed for three-dimensional problems where the positive
+ upward direction differs from the default.
+\end_layout
+
+\begin_layout Description
+db The spatial database specifying the material properties for the seismic
+ velocities.
+\end_layout
+
+\begin_layout Description
+quadrature The quadrature object to be used for numerical integration.
+ Since we are integrating over a surface that is one dimension lower than
+ the problem domain, this would typically be set to something like 
+\family typewriter
+Quadrature2Din3D
+\family default
+ (for a three-dimensional problem).
+\end_layout
+
+\begin_layout Subsection
+Finite-Element Implementation of Absorbing Boundary
+\end_layout
+
+\begin_layout Standard
+Consider a plane wave propagating at a velocity 
+\begin_inset Formula $c$
+\end_inset
+
+.
+ We can write the displacement field as
+\begin_inset Formula 
+\begin{equation}
+\vec{u}(\vec{x},t)=\vec{u^{t}}(t-\frac{\vec{x}}{c}),
+\end{equation}
+
+\end_inset
+
+where 
+\begin_inset Formula $\vec{x}$
+\end_inset
+
+ is position, 
+\begin_inset Formula $t$
+\end_inset
+
+ is time, and 
+\begin_inset Formula $\vec{u^{t}}$
+\end_inset
+
+ is the shape of the propagating wave.
+ For an absorbing boundary we want the traction on the boundary to be equal
+ to the traction associated with wave propagating out of the domain.
+ Starting with the expression for the traction on a boundary, 
+\begin_inset Formula $T_{i}=\sigma_{ij}n_{j},$
+\end_inset
+
+ and using the local coordinate system for the boundary 
+\begin_inset Formula $s_{h}s_{v}n,$
+\end_inset
+
+ where 
+\begin_inset Formula $\vec{n}$
+\end_inset
+
+ is the direction normal to the boundary, 
+\begin_inset Formula $\overrightarrow{s}_{h}$
+\end_inset
+
+ is the horizontal direction tangent to the boundary, and 
+\begin_inset Formula $\overrightarrow{s}_{v}$
+\end_inset
+
+ is the vertical direction tangent to the boundary, the tractions on the
+ boundary are
+\begin_inset Formula 
+\begin{gather}
+T_{s_{h}}=\sigma_{s_{h}n}\\
+T_{s_{v}}=\sigma_{s_{v}n}\\
+T_{n}=\sigma_{nn}.
+\end{gather}
+
+\end_inset
+
+In the case of a horizontal boundary, we can define an auxiliary direction
+ in order to assign unique tangential directions.
+ For a linear elastic isotropic material, 
+\begin_inset Formula $\sigma_{ij}=\lambda\epsilon_{kk}\delta_{ij}+2\mu\epsilon_{ij},$
+\end_inset
+
+ and we can write the tractions as 
+\begin_inset Formula 
+\begin{gather}
+T_{s_{h}}=2\mu\epsilon_{s_{h}n}\\
+T_{s_{v}}=2\epsilon_{s_{v}n}\\
+T_{n}=(\lambda+2\mu)\epsilon_{nn}+\lambda(\epsilon_{s_{h}s_{h}}+\epsilon_{s_{v}s_{v}}).
+\end{gather}
+
+\end_inset
+
+For infinitesimal strains, 
+\begin_inset Formula $\epsilon_{ij}=\frac{1}{2}(u_{i,j}+u_{j,i})$
+\end_inset
+
+ and we have
+\begin_inset Formula 
+\begin{gather}
+\epsilon_{s_{h}n}=\frac{1}{2}(u_{s_{h},n}+u_{n,s_{h}})\\
+\epsilon_{s_{v}n}=\frac{1}{2}(u_{s_{v},n}+u_{n,s_{v}})\\
+\epsilon_{nn}=u_{n,n}.
+\end{gather}
+
+\end_inset
+
+For our propagating plane wave, we recognize that
+\begin_inset Formula 
+\begin{equation}
+\frac{\partial\vec{u^{t}}(t-\frac{\vec{x}}{c})}{\partial x_{i}}=-\frac{1}{c}\frac{\partial\vec{u^{t}}(t-\frac{\vec{x}}{c})}{\partial t},
+\end{equation}
+
+\end_inset
+
+so that our expressions for the tractions become
+\begin_inset Formula 
+\begin{gather}
+T_{s_{h}}=-\frac{\mu}{c}\left(\frac{\partial u_{s_{h}}^{t}(t-\frac{\vec{x}}{c})}{\partial t}+\frac{\partial u_{n}^{t}(t-\frac{\vec{x}}{c})}{\partial t}\right),\\
+T_{s_{v}}=-\frac{\mu}{c}\left(\frac{\partial u_{s_{v}}^{t}(t-\frac{\vec{x}}{c})}{\partial t}+\frac{\partial u_{n}^{t}(t-\frac{\vec{x}}{c})}{\partial t}\right).
+\end{gather}
+
+\end_inset
+
+For the normal traction, consider a dilatational wave propagating normal
+ to the boundary at speed 
+\begin_inset Formula $v_{p}$
+\end_inset
+
+; in this case 
+\begin_inset Formula $u_{s_{h}}=u_{s_{v}}=0$
+\end_inset
+
+ and 
+\begin_inset Formula $c=v_{p}$
+\end_inset
+
+.
+ For the shear tractions, consider a shear wave propagating normal to the
+ boundary at speed 
+\begin_inset Formula $v_{s}$
+\end_inset
+
+; we can decompose this into one case where 
+\begin_inset Formula $u_{n}=u_{s_{v}}=0$
+\end_inset
+
+ and another case where 
+\begin_inset Formula $u_{n}=u_{s_{h}}=0$
+\end_inset
+
+, with 
+\begin_inset Formula $c=v_{s}$
+\end_inset
+
+ in both cases.
+ We also recognize that 
+\begin_inset Formula $\mu=\rho v_{s}^{2}$
+\end_inset
+
+ and 
+\begin_inset Formula $\lambda+2\mu=\rho v_{p}^{2}$
+\end_inset
+
+.
+ This leads to the following expressions for the tractions:
+\begin_inset Formula 
+\begin{gather}
+T_{s_{h}}=-\rho v_{s}\frac{\partial u_{s_{h}}^{t}(t-\frac{\vec{x}}{c})}{\partial t}\\
+T_{s_{v}}=-\rho v_{s}\frac{\partial u_{v}^{t}(t-\frac{\vec{x}}{c})}{\partial t}\\
+T_{n}=-\rho v_{p}\frac{\partial u_{n}^{t}(t-\frac{\vec{x}}{c})}{\partial t}
+\end{gather}
+
+\end_inset
+
+We write the weak form of the boundary condition as
+\begin_inset Formula 
+\[
+\int_{S_{T}}T_{i}\phi_{i}\, dS=\int_{S_{T}}-\rho c_{i}\frac{\partial u_{i}}{\partial t}\phi_{i}\, dS,
+\]
+
+\end_inset
+
+where 
+\begin_inset Formula $c_{i}$
+\end_inset
+
+ equals 
+\begin_inset Formula $v_{p}$
+\end_inset
+
+ for the normal traction and 
+\begin_inset Formula $v_{s}$
+\end_inset
+
+ for the shear tractions, and 
+\begin_inset Formula $\phi_{i}$
+\end_inset
+
+ is our weighting function.
+ We express the trial solution and weighting function as linear combinations
+ of basis functions,
+\begin_inset Formula 
+\begin{gather}
+u_{i}=\sum_{m}a_{i}^{m}N^{m},\\
+\phi_{i}=\sum_{n}c_{i}^{n}N^{n}.
+\end{gather}
+
+\end_inset
+
+Substituting into our integral over the absorbing boundaries yields
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula 
+\begin{equation}
+\int_{S_{T}}T_{i}\phi_{i}\, dS=\int_{S_{T}}-\rho c_{i}\sum_{m}\dot{a}_{i}^{m}N^{m}\sum_{n}c_{i}^{n}N^{n}\, dS.
+\end{equation}
+
+\end_inset
+
+In the derivation of the governing equations, we recognized that the weighting
+ function is arbitrary, so we form the residual by setting the terms associated
+ with the coefficients 
+\begin_inset Formula $c_{i}^{n}$
+\end_inset
+
+ to zero,
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula 
+\begin{equation}
+r_{i}^{n}=\sum_{\text{tract cells}}\sum_{\text{quad pts}}-\rho(x_{q})c_{i}(x_{q})\sum_{m}\dot{a}_{i}^{m}N^{m}(x_{q})N^{n}(x_{q})w_{q}|J_{cell}(x_{q})|,
+\end{equation}
+
+\end_inset
+
+ where 
+\begin_inset Formula $x_{q}$
+\end_inset
+
+ are the coordinates of the quadrature points, 
+\begin_inset Formula $w_{q}$
+\end_inset
+
+ are the weights of the quadrature points, and 
+\begin_inset Formula $|J_{cell}(x_{q})|$
+\end_inset
+
+ is the determinant of the Jacobian matrix evaluated at the quadrature points
+ associated with mapping the reference cell to the actual cell.
+\end_layout
+
+\begin_layout Standard
+The appearance of velocity in the expression for the residual means that
+ the absorbing dampers also contribute to the system Jacobian matrix.
+ Use the central difference method, the velocity is written in terms of
+ the displacements,
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula 
+\begin{equation}
+\dot{u}_{i}(t)=\frac{1}{2\Delta t}(u_{i}(t+\Delta t)-u_{i}(t-\Delta t)).
+\end{equation}
+
+\end_inset
+
+Expressing the displacement at time 
+\begin_inset Formula $t+\Delta t$
+\end_inset
+
+ in terms of the displacement at time 
+\begin_inset Formula $t$
+\end_inset
+
+ (
+\begin_inset Formula $u_{i}(t)$
+\end_inset
+
+) and the increment in the displacement at time 
+\begin_inset Formula $t$
+\end_inset
+
+ (
+\begin_inset Formula $du_{i}(t)$
+\end_inset
+
+) leads to
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula 
+\begin{equation}
+\dot{u}_{i}(t)=\frac{1}{2\Delta t}(du_{i}(t)+u_{i}(t)-u_{i}(t-\Delta t))
+\end{equation}
+
+\end_inset
+
+The terms contributing to the system Jacobian are associated with the increment
+ in the displacement at time time.
+ Substituting into the governing equations and isolating the term associated
+ with the increment in the displacement at time t yields
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula 
+\begin{equation}
+A_{ij}^{nm}=\sum_{\text{tract cells}}\sum_{\text{quad pts}}\delta_{ij}\frac{1}{2\Delta t}\rho(x_{q})v_{i}(x_{q})N^{m}(x_{q})N^{n}(x_{q})w_{q}|J_{cells}(x_{q})|,
+\end{equation}
+
+\end_inset
+
+where 
+\begin_inset Formula $A_{ij}^{mn}$
+\end_inset
+
+ is a 
+\begin_inset Formula $nd$
+\end_inset
+
+ by 
+\begin_inset Formula $md$
+\end_inset
+
+ matrix (
+\begin_inset Formula $d$
+\end_inset
+
+ is the dimension of the vector space), 
+\begin_inset Formula $m$
+\end_inset
+
+ and 
+\begin_inset Formula $n$
+\end_inset
+
+ refer to the basis functions and 
+\begin_inset Formula $i$
+\end_inset
+
+ and 
+\begin_inset Formula $j$
+\end_inset
+
+ are vector space components.
+\end_layout
+
+\begin_layout Section
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:fault"
+
+\end_inset
+
+Fault Interface Conditions
+\end_layout
+
+\begin_layout Standard
+Fault interfaces are used to create dislocations (jumps in the displacement
+ field) in the model.
+ The dislocations arise from slip across a fault surface.
+ Both shear and tensile dislocations are supported.
+ For fault interfaces, dislocations in 1D correspond to fault-opening (and
+ closing), in 2D lateral-slip and fault opening, and in 3D lateral-slip,
+ reverse-slip, and fault opening.
+ PyLith supports kinematic (prescribed) slip and dynamic (spontaneous) rupture
+ simulations.
+\end_layout
+
+\begin_layout Subsection
+Conventions
+\end_layout
+
+\begin_layout Standard
+Slip corresponds to relative motion across a fault surface.
+ Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:fault:orientation"
+
+\end_inset
+
+ shows the orientation of the slip vector in 3D with respect to the fault
+ surface and coordinate axes.
+ PyLith automatically determines the orientation of the fault surface.
+ This alleviates the user from having to compute the strike, dip, and rake
+ angles over potentially complex, nonplanar fault surfaces.
+ Instead, the user specifies fault parameters in terms of lateral motion,
+ reverse motion, and fault opening as shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:fault:slip:motions"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/faultOrientation.eps
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Orientation of a fault surface in 3D, where 
+\begin_inset Formula $\phi$
+\end_inset
+
+ denotes the angle of the fault strike, 
+\begin_inset Formula $\delta$
+\end_inset
+
+ denotes the angle of the fault dip, and 
+\begin_inset Formula $\lambda$
+\end_inset
+
+ the rake angle.
+ 
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:fault:orientation"
+
+\end_inset
+
+ 
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/slipmotions.eps
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Sign conventions associated with fault slip.
+ Positive values are associated with left-lateral, reverse, and fault opening
+ motions.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:fault:slip:motions"
+
+\end_inset
+
+ 
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Fault Implementation
+\end_layout
+
+\begin_layout Standard
+In order to create relative motion across the fault surface in the finite-elemen
+t mesh, additional degrees of freedom are added along with adjustment of
+ the topology of the mesh.
+ These additional degrees of freedom are associated with cohesive cells.
+ These zero-volume cells allow control of the relative motion between vertices
+ on the two sides of the fault.
+ PyLith automatically adds cohesive cells for each fault surface.
+ Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:fault:cohesive:quad4"
+
+\end_inset
+
+ illustrates the results of inserting a cohesive cell in a mesh consisting
+ of two quadrilateral cells.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/quad4cohesivekin.eps
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Example of cohesive cell inserted into a mesh of two quadrilateral cells.
+ The zero thickness cohesive cell (shown with dashed lines) controls slip
+ on the fault via the relative motion between vertices 3 and 7 and 2 and
+ 6.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:fault:cohesive:quad4"
+
+\end_inset
+
+ 
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Fault Parameters
+\end_layout
+
+\begin_layout Standard
+The principal parameters for fault interface conditions are:
+\end_layout
+
+\begin_layout Description
+id This is an integer identifier for the fault surface.
+ It is used to specify the 
+\family typewriter
+material-id
+\family default
+ of the cohesive cells in the mesh.
+ Material identifiers must be unique so this value cannot be the same as
+ any of the material models or any other fault.
+\end_layout
+
+\begin_layout Description
+name Name or label for the fault.
+ This associates sets of vertices with the fault surface in addition to
+ being used in error and diagnostic reports.
+\end_layout
+
+\begin_layout Description
+up_dir Up-dir or up direction (used in 2D and 3D simulations).
+ In 2D the default in-plane slip is left-lateral, so we use the up-direction
+ to resolve the ambiguity in specifying reverse slip.
+ In 3D the up-direction is used to resolve the ambiguity in the along-strike
+ and dip-dir directions.
+ If the fault plane is horizontal, then the up-dir corresponds to the reverse-mo
+tion on the +z side of the fault.
+ The only requirement for this direction is that it not be collinear with
+ the fault normal direction.
+ The default value of [0, 0, 1] is appropriate for most 3D problems.
+\end_layout
+
+\begin_layout Description
+quadrature Quadrature object used in integrating fault quantities.
+\end_layout
+
+\begin_layout Description
+output Manager for output of diagnostic and data fields for the fault.
+\end_layout
+
+\begin_layout Standard
+By default the output manager outputs both diagnostic information (e.g., fault
+ normal direction) and the slip at each time step.
+ Tables 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "tab:fault:kin:output"
+
+\end_inset
+
+ and 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "tab:fault:dyn:output"
+
+\end_inset
+
+ list the fields available for output for a fault with kinematic (prescribed)
+ earthquake rupture and a fault with dynamic rupture, respectively.
+ The fault coordinate system is shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:fault:slip:motions"
+
+\end_inset
+
+.
+ The vectors in the fault coordinate system can be transformed to the global
+ coordinate system using the direction vectors in the diagnostic output.
+ An example of setting these parameters in a 
+\family typewriter
+.cfg
+\family default
+ file is:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem]
+\end_layout
+
+\begin_layout LyX-Code
+interfaces = [fault]
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.interfaces]
+\end_layout
+
+\begin_layout LyX-Code
+fault = pylith.faults.FaultCohesiveKin ; default
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+label = fault A ; Group of vertices defining the fault surface
+\end_layout
+
+\begin_layout LyX-Code
+id = 100 ; Value for material identifier associated with fault's cohesive
+ cells
+\end_layout
+
+\begin_layout LyX-Code
+up_dir = [0, 0, 1] ; default
+\end_layout
+
+\begin_layout LyX-Code
+quadrature.cell = pylith.feassemble.FIATLagrange
+\end_layout
+
+\begin_layout LyX-Code
+quadrature.cell.dimension = 2
+\end_layout
+
+\begin_layout Standard
+The group of vertices has the label ``fault A.'' We replicate the default
+ values for the fault ``up'' direction.
+ These settings apply to a 2D fault surface embedded within a 3D mesh, so
+ we use 2D Lagrange reference cells.
+ The spatial database for elastic properties is used to determine the approximat
+e shear modulus and condition the equations for faster convergence rates.
+\end_layout
+
+\begin_layout Subsection
+Kinematic Earthquake Rupture
+\end_layout
+
+\begin_layout Standard
+Kinematic earthquake ruptures use the FaultCohesiveKin object to specify
+ the slip as a function of time on the fault surface.
+ Slip may evolve simultaneously over the fault surface instantaneously in
+ a single time step (as is usually done in quasi-static simulations) or
+ propagate over the fault surface over hundreds and up to thousands of time
+ steps (as is usually done in a dynamic simulation).
+\end_layout
+
+\begin_layout Subsubsection
+Governing Equations
+\end_layout
+
+\begin_layout Standard
+The insertion of cohesive cells into the finite-element mesh has the effect
+ of decoupling the motion of the two sides of the fault surface.
+ In order to impose the desired relative motion, we must adjust the governing
+ equations.
+ PyLith employs Lagrange multiplier constraints to enforce the constraint
+ of the relative motion in the strong sense.
+ That is, we enforce the slip across the fault at each degree of freedom.
+\end_layout
+
+\begin_layout Standard
+In conventional implementations the additional degrees of freedom associated
+ with the Lagrange multipliers results in a complex implementation.
+ However, the use of Lagrange multiplier constraints with cohesive cells
+ provides for a simple formulation; we simply add the additional degrees
+ of freedom associated with the Lagrange multipliers to the cohesive cells
+ as shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:fault:cohesive:quad4"
+
+\end_inset
+
+.
+ As a result, the fault implementation is completely confined to the cohesive
+ cell.
+ Furthermore, the Lagrange multiplier constraints correspond to forces required
+ to impose the relative motions, so they are related to the change in stress
+ on the fault surface associated with fault slip.
+ If we write the algebraic system of equations we are solving in the form
+\begin_inset Formula 
+\begin{equation}
+\underline{A}\overrightarrow{u}=\overrightarrow{b}\,,
+\end{equation}
+
+\end_inset
+
+then including the Lagrange multiplier constraints results in
+\begin_inset Formula 
+\begin{equation}
+\left[\begin{array}{cc}
+\underline{A} & \underline{C}^{T}\\
+\underline{C} & 0
+\end{array}\right]\left[\begin{array}{c}
+\overrightarrow{u}\\
+\overrightarrow{l}
+\end{array}\right]=\left[\begin{array}{c}
+\overrightarrow{b}\\
+\overrightarrow{d}
+\end{array}\right]\,,\label{eq:fault:cohesive:lagrange}
+\end{equation}
+
+\end_inset
+
+where 
+\begin_inset Formula $\overrightarrow{l}$
+\end_inset
+
+ is the vector of Lagrange multipliers and 
+\begin_inset Formula $\underline{C}$
+\end_inset
+
+ is composed of rotation submatrices, 
+\begin_inset Formula $\underline{R}$
+\end_inset
+
+, associated with the direction cosines relating the relative displacements
+ across the fault to the vector of fault slip, 
+\begin_inset Formula $\overrightarrow{d}$
+\end_inset
+
+.
+ Note that by using the direction cosines to relate the relative motion
+ across the fault, the slip vector and Lagrange multipliers (forces required
+ to impose the slip) are in the local fault coordinate system (lateral motion,
+ reverse motion, and fault opening).
+ 
+\end_layout
+
+\begin_layout Paragraph
+Non-diagonal A
+\end_layout
+
+\begin_layout Standard
+The Lagrange multipliers contribute to both the system Jacobian matrix and
+ the residual.
+ Because we enforce the constraints in a strong sense, the terms do not
+ involve integrals over the fault surface.
+ The additional terms in the residual are
+\begin_inset Formula 
+\begin{gather}
+r_{i}^{n}=-C_{ji}^{pn}l_{j}^{p},\\
+r_{i}^{p}=d_{i}^{p}-C_{ij}^{pn}u_{j}^{n},
+\end{gather}
+
+\end_inset
+
+where 
+\begin_inset Formula $n$
+\end_inset
+
+ denotes a conventional degree of freedom and 
+\begin_inset Formula $p$
+\end_inset
+
+ denotes a degree of freedom associated with a Lagrange multiplier.
+ The additional terms in the system Jacobian matrix are simply the direction
+ cosines,
+\begin_inset Formula 
+\begin{gather}
+J_{ij}^{np}=C_{ji}^{pn},\\
+J_{ij}^{pn}=C_{ij}^{pn}.
+\end{gather}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Paragraph
+Diagonal A
+\end_layout
+
+\begin_layout Standard
+When we use a lumped system Jacobian matrix, we cannot lump the terms associated
+ with the Lagrange multipliers.
+ Instead, we formulate the Jacobian ignoring the contributions from the
+ Lagrange multipliers, and then adjust the solution after the solve to account
+ for their presence.
+ Including the Lagrange multipliers in the general expression for the residual
+ at time 
+\begin_inset Formula $t+\Delta t$
+\end_inset
+
+, we have
+\begin_inset Formula 
+\begin{equation}
+r_{i}^{n}(t+\Delta t)=A_{ij}^{nm}(u_{j}^{m}(t)+du_{j}^{m}(t))+C_{ki}^{pn}(l_{k}^{p}(t)+dl_{k}^{p}(t)),
+\end{equation}
+
+\end_inset
+
+where we have written the displacements and Lagrange multipliers at time
+ 
+\begin_inset Formula $t+\Delta t$
+\end_inset
+
+ in terms of the values at time 
+\begin_inset Formula $t$
+\end_inset
+
+ and the increment from time 
+\begin_inset Formula $t$
+\end_inset
+
+ to 
+\begin_inset Formula $t+\Delta t$
+\end_inset
+
+.
+ When we solve the lumped system ignoring the Lagrange multipliers contributions
+ to the Jacobian, we formulate the residual assuming the values 
+\begin_inset Formula $du_{i}^{n}$
+\end_inset
+
+(t) and 
+\begin_inset Formula $dl_{k}^{p}(t)$
+\end_inset
+
+ are zero.
+ So our task is to determine the increment in the Lagrange multiplier, 
+\begin_inset Formula $dl_{k}^{p}$
+\end_inset
+
+, and the correction to the displacement increment, 
+\begin_inset Formula $du_{i}^{n}$
+\end_inset
+
+, and by setting the residual with all terms included to zero; thus, we
+ have
+\begin_inset Formula 
+\begin{gather}
+A_{ij}^{nm}(u_{j}^{m}(t)+du_{j}^{m}(t))+C_{ki}^{pn}(l_{k}^{p}(t)+dl_{k}^{p}(t))=0\text{ subject to}\\
+C_{ij}^{pn}(u_{j}^{n}(t)+du_{j}^{n}(t))=d_{i}^{p}.
+\end{gather}
+
+\end_inset
+
+Making use of the residual computed with 
+\begin_inset Formula $du_{i}^{n}(t)=0$
+\end_inset
+
+ and 
+\begin_inset Formula $dl_{k}^{p}(t)=0$
+\end_inset
+
+,
+\begin_inset Formula 
+\begin{gather}
+r_{i}^{n}+A_{ij}^{nm}du_{j}^{m}+C_{ki}^{pn}dl_{k}^{p}=0\text{ subject to}\\
+C_{ij}^{pn}(u_{j}^{n}(t)+du_{j}^{n}(t))=d_{i}^{p}.
+\end{gather}
+
+\end_inset
+
+Explicitly writing the equations for the vertices on the negative and positive
+ sides of the fault yields
+\begin_inset Formula 
+\begin{gather}
+r_{i}^{n-}+A_{ij}^{nm-}du_{j}^{m-}+R_{ki}^{pn}dl_{k}^{p}=0,\\
+r_{i}^{n+}+A_{ij}^{nm+}du_{j}^{m+}+R_{ki}^{pn}dl_{k}^{p}=0,\\
+R_{ij}^{pn}(u_{j}^{n+}+du_{j}^{n+}-u_{j}^{n-}-du_{j}^{n-})=d_{i}^{p}.
+\end{gather}
+
+\end_inset
+
+Solving the first two equations for 
+\begin_inset Formula $du_{j}^{m-}$
+\end_inset
+
+ and 
+\begin_inset Formula $du_{j}^{m+}$
+\end_inset
+
+ and combining them using the third equation leads to
+\begin_inset Formula 
+\begin{multline}
+R_{ij}^{pn}\left((A_{ij}^{nm+})^{-1}+(A_{ij}^{nm+})^{-1}\right)R_{ki}^{pn}dl_{k}^{p}=d_{i}^{p}-R_{ij}^{pn}(u_{j}^{n+}-u_{j}^{n-})\\
++R_{ij}^{pn}\left((A_{ij}^{nm+})^{-1}r_{i}^{n+}-(A_{ij}^{nm-})^{-1}r_{i}^{n-}\right).
+\end{multline}
+
+\end_inset
+
+We do not allow overlap between the fault interface and the absorbing boundary,
+ so 
+\begin_inset Formula $A_{ij}^{nm}$
+\end_inset
+
+ is the same for all components at a vertex.
+ As a result the matrix on the left hand side simplifies to
+\begin_inset Formula 
+\begin{equation}
+S_{ik}^{pn}=\delta_{ik}\left(\frac{1}{A^{nm+}}+\frac{1}{A^{nm-}}\right),
+\end{equation}
+
+\end_inset
+
+and
+\begin_inset Formula 
+\begin{equation}
+dl_{k}^{p}=(S_{ik}^{pn})^{-1}\left(d_{i}^{p}-R_{ij}^{pn}(u_{j}^{n+}-u_{j}^{n-})+R_{ij}^{pn}\left((A_{ij}^{nm+})^{-1}r_{i}^{n+}-(A_{ij}^{nm-})^{-1}r_{i}^{n-}\right)\right).
+\end{equation}
+
+\end_inset
+
+Now that we know the value of the increment in the Lagrange multiplier from
+ time 
+\begin_inset Formula $t$
+\end_inset
+
+ to time 
+\begin_inset Formula $t+\Delta t$
+\end_inset
+
+, we can correct the value for the displacement increment from time 
+\begin_inset Formula $t$
+\end_inset
+
+ to 
+\begin_inset Formula $t+\Delta t$
+\end_inset
+
+ using
+\begin_inset Formula 
+\begin{gather}
+\Delta du_{j}^{n-}=(A_{ij}^{nm-})^{-1}C_{ki}^{pn}dl_{k}^{p}\text{ and}\\
+\Delta du_{j}^{n+}=-(A_{ij}^{nm+})^{-1}C_{ki}^{pn}dl_{k}^{p}.
+\end{gather}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Arrays of Kinematic Rupture Components
+\end_layout
+
+\begin_layout Standard
+Multiple earthquake ruptures can be specified on a single fault surface.
+ This permits repeatedly rupturing the same portion of a fault or combining
+ earthquake rupture on one subset of the fault surface with steady aseismic
+ slip on another subset (the two subsets may overlap in both time and space).
+ A dynamic array of kinematic earthquake rupture components associates a
+ name (string) with each kinematic rupture.
+ The default dynamic array contains a single earthquake rupture, ``rupture''.
+ The 
+\family typewriter
+eq_srcs
+\family default
+ is the 
+\family typewriter
+FaultCohesiveKin
+\family default
+ facility for this dynamic array.
+ An example of setting the array of kinematic rupture components in a 
+\family typewriter
+.cfg
+\family default
+ file:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.interfaces.fault]
+\end_layout
+
+\begin_layout LyX-Code
+eq_srcs = [earthquake,creep]
+\end_layout
+
+\begin_layout Standard
+The output manager includes generic fault information (orientation) as well
+ as the final slip or slip rate (as in the case of the constant slip rate
+ slip time function) and slip initiation time for each kinematic rupture.
+ The name of the slip and slip initiation time vertex fields are of the
+ form 
+\family typewriter
+final_slip_NAME
+\family default
+ and 
+\family typewriter
+slip_time_NAME
+\family default
+, respectively, where 
+\family typewriter
+NAME
+\family default
+ refers to the name used in the dynamic array of kinematic ruptures, 
+\family typewriter
+eq_srcs
+\family default
+.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float table
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\noindent
+\align center
+\begin_inset Caption
+
+\begin_layout Plain Layout
+\begin_inset CommandInset label
+LatexCommand label
+name "tab:fault:kin:output"
+
+\end_inset
+
+Fields available in output of fault information.
+\end_layout
+
+\end_inset
+
+
+\begin_inset VSpace defskip
+\end_inset
+
+
+\begin_inset Tabular
+<lyxtabular version="3" rows="8" columns="3">
+<features tabularvalignment="middle">
+<column alignment="center" valignment="top" width="0">
+<column alignment="center" valignment="top" width="0">
+<column alignment="center" valignment="top" width="3.5in">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Field Type
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Field
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Description
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+vertex_info_fields
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+normal_dir
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Direction of fault normal in global coordinate system
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+strike_dir
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Direction of fault strike in global coordinate system
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+dip_dir
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Up-dip direction on hanging wall in global coordinate system
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+final_slip_NAME
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Vector of final slip (in fault coordinate system) in meters
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+slip_time
+\family default
+_
+\family typewriter
+\noun on
+NAME
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Time at which slip begins in seconds
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+vertex_data_fields
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+slip
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Slip vector at time step (in fault coordinate system) in meters
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+traction_change
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Change in fault tractions (in fault coordinate system) in Pa
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Kinematic Rupture Parameters
+\end_layout
+
+\begin_layout Standard
+The kinematic rupture parameters include the origin time and slip time function.
+ The slip initiation time in the slip time function is relative to the origin
+ time (default is 0).
+ This means that slip initiates at a point at a time corresponding to the
+ sum of the kinematic rupture's origin time and the slip initiation time
+ for that point.
+ An example of specifying the kinematic earthquake rupture properties and
+ components in a 
+\family typewriter
+.cfg
+\family default
+ file:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.interfaces.fault]
+\end_layout
+
+\begin_layout LyX-Code
+eq_srcs = [earthquake,creep]
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.interfaces.fault.eq_srcs.earthquake]
+\end_layout
+
+\begin_layout LyX-Code
+origin_time = 0.0*s ; default origin time
+\end_layout
+
+\begin_layout LyX-Code
+slip_function = pylith.faults.StepSlipFn ; default slip time function
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.interfaces.fault.eq_srcs.creep]
+\end_layout
+
+\begin_layout LyX-Code
+origin_time = 10.0*year ; start creep at 10.0 years
+\end_layout
+
+\begin_layout LyX-Code
+slip_function = pylith.faults.ConstRateSlipFn ; switch to constant slip rate
+ slip function
+\end_layout
+
+\begin_layout Subsubsection
+Slip Time Function
+\end_layout
+
+\begin_layout Standard
+The current release of PyLith supports specification of the evolution of
+ fault slip using analytical expressions for the slip time history at each
+ point, where the parameters for the slip time function may vary over the
+ fault surface.
+ Currently, three slip time functions are available: (1) a step-function
+ for quasi-static modeling of earthquake rupture, (2) a constant slip rate
+ time function for modeling steady aseismic slip, and (3) the integral of
+ Brune's far-field time function 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "Brune:1970"
+
+\end_inset
+
+ for modeling the dynamics of earthquake rupture.
+ Additional slip time functions will likely be available in future releases.
+ The default slip time function is the step-function slip function.
+\end_layout
+
+\begin_layout Paragraph
+Step-Function Slip Time Function
+\end_layout
+
+\begin_layout Standard
+This slip function prescribes a step in slip at a given time at a point:
+ 
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula 
+\begin{gather}
+D(t)=\left\{ \begin{array}{cc}
+0 & 0\leq t<t_{r}\\
+D_{final} & t\ge t_{r}
+\end{array}\right.\,,
+\end{gather}
+
+\end_inset
+
+where 
+\begin_inset Formula $D(t)$
+\end_inset
+
+ is slip at time 
+\begin_inset Formula $t$
+\end_inset
+
+, 
+\begin_inset Formula $D_{final}$
+\end_inset
+
+ is the final slip, and 
+\begin_inset Formula $t_{r}$
+\end_inset
+
+ is the slip initiation time (time when rupture reaches the location).
+ The slip is specified independently for each of the components of slip,
+ and the slip and slip starting time may vary over the fault surface.
+\end_layout
+
+\begin_layout Description
+final_slip Spatial database of slip (
+\begin_inset Formula $D_{final})$
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Description
+slip_time Spatial database of slip initiation times (
+\begin_inset Formula $t_{r}$
+\end_inset
+
+).
+\end_layout
+
+\begin_layout Standard
+An example of setting these parameters in a 
+\family typewriter
+.cfg
+\family default
+ file is:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.interfaces.fault.eq_srcs.rupture]
+\end_layout
+
+\begin_layout LyX-Code
+slip_function = pylith.faults.StepSlipFn
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.interfaces.fault.eq_srcs.rupture.slip_function]
+\end_layout
+
+\begin_layout LyX-Code
+final_slip.iohandler.filename = final_slip.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+slip_time.iohandler.filename = sliptime.spatialdb
+\end_layout
+
+\begin_layout Standard
+The spatial database files for the slip time function specify the spatial
+ variation in the parameters for the slip time function, as shown in Table
+ 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "tab:step-function-db-params"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float table
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\noindent
+\align center
+\begin_inset Caption
+
+\begin_layout Plain Layout
+\begin_inset CommandInset label
+LatexCommand label
+name "tab:step-function-db-params"
+
+\end_inset
+
+Values in spatial database used as parameters in the step function slip
+ time function.
+\end_layout
+
+\end_inset
+
+
+\begin_inset VSpace defskip
+\end_inset
+
+
+\begin_inset Tabular
+<lyxtabular version="3" rows="5" columns="3">
+<features tabularvalignment="middle">
+<column alignment="left" valignment="top" width="0">
+<column alignment="left" valignment="top" width="0">
+<column alignment="left" valignment="top" width="2.5in">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Spatial database
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Value
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Description
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+final_slip
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+left-lateral-slip
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Amount of left-lateral final slip in meters.
+ Use negative values for right-lateral slip.
+ Applies to faults in 2D and 3D only.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+reverse-slip
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Amount of reverse slip in meters.
+ Use negative values for normal slip.
+ Applies to faults in 3D only.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+fault-opening
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Amount of fault opening in meters.
+ Negative values imply penetration.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+slip_time
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+slip-time
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Slip initiation time (
+\begin_inset Formula $t_{t})$
+\end_inset
+
+ in seconds.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Paragraph
+Constant Slip Rate Slip Time Function
+\end_layout
+
+\begin_layout Standard
+This slip function prescribes a constant slip rate for the evolution of
+ slip at a point: 
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula 
+\begin{gather}
+D(t)=\left\{ \begin{array}{cc}
+0 & 0\leq t<t_{r}\\
+V(t-t_{r}) & t\ge t_{r}
+\end{array}\right.\,,
+\end{gather}
+
+\end_inset
+
+where 
+\begin_inset Formula $D(t)$
+\end_inset
+
+ is slip at time 
+\begin_inset Formula $t$
+\end_inset
+
+, 
+\begin_inset Formula $V$
+\end_inset
+
+ is the slip rate, and 
+\begin_inset Formula $t_{r}$
+\end_inset
+
+ is the slip initiation time (time when rupture reaches the location).
+ The slip rate is specified independently for each of the components of
+ slip, and the slip rate and slip starting time may vary over the fault
+ surface.
+\end_layout
+
+\begin_layout Description
+slip_rate Spatial database of slip rate (
+\begin_inset Formula $V)$
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Description
+slip_time Spatial database of slip initiation times (
+\begin_inset Formula $t_{r}$
+\end_inset
+
+).
+\end_layout
+
+\begin_layout Standard
+An example of setting these parameters in a 
+\family typewriter
+.cfg
+\family default
+ file is:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.interfaces.fault.eq_srcs.ruptures]
+\end_layout
+
+\begin_layout LyX-Code
+slip_function = pylith.faults.ConstRateSlipFn
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.interfaces.fault.eq_srcs.ruptures.slip_function]
+\end_layout
+
+\begin_layout LyX-Code
+slip_rate.iohandler.filename = slip_rate.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+slip_time.iohandler.filename = sliptime.spatialdb
+\end_layout
+
+\begin_layout Standard
+The spatial database files for the slip time function specify the spatial
+ variation in the parameters for the slip time function, as shown in Table
+ 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "tab:const-slip-rate-db-params"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float table
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\noindent
+\align center
+\begin_inset Caption
+
+\begin_layout Plain Layout
+\begin_inset CommandInset label
+LatexCommand label
+name "tab:const-slip-rate-db-params"
+
+\end_inset
+
+Values in spatial database used as parameters in the constant slip rate
+ slip time function.
+\end_layout
+
+\end_inset
+
+
+\begin_inset VSpace defskip
+\end_inset
+
+
+\begin_inset Tabular
+<lyxtabular version="3" rows="5" columns="3">
+<features tabularvalignment="middle">
+<column alignment="left" valignment="top" width="0">
+<column alignment="left" valignment="top" width="0">
+<column alignment="left" valignment="top" width="2.5in">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Spatial database
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Value
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Description
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+slip_rate
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+left-lateral-slip
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Slip rate for left-lateral final slip in meters per second.
+ Use negative values for right-lateral slip.
+ Applies to faults in 2D and 3D only.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+reverse-slip
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Slip rate for reverse slip in meters per second.
+ Use negative values for normal slip.
+ Applies to faults in 3D only.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+fault-opening
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Slip rate for fault opening in meters per second.
+ Negative values imply penetration.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+slip_time
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+slip-time
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Slip initiation time (
+\begin_inset Formula $t_{t})$
+\end_inset
+
+ in seconds.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Paragraph
+Brune Slip Time Function
+\end_layout
+
+\begin_layout Standard
+We use an integral of Brune's far-field time function 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "Brune:1970"
+
+\end_inset
+
+ to describe the evolution in time of slip at a point: 
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula 
+\begin{gather}
+D(t)=\left\{ \begin{array}{cc}
+0 & 0\leq t<t_{r}\\
+D_{final}\left(1-exp\left(-\frac{t-t_{r}}{t_{0}}\right)\left(1+\frac{t-t_{r}}{t_{0}}\right)\right) & t\ge t_{r}
+\end{array}\right.\,,\\
+t_{0}=0.6195t_{\mathit{rise}}\,,
+\end{gather}
+
+\end_inset
+
+where 
+\begin_inset Formula $D(t)$
+\end_inset
+
+ is slip at time 
+\begin_inset Formula $t$
+\end_inset
+
+, 
+\begin_inset Formula $D_{final}$
+\end_inset
+
+ is the final slip at the location, 
+\begin_inset Formula $t_{r}$
+\end_inset
+
+ is the slip initiation time (time when rupture reaches the location), and
+ 
+\begin_inset Formula $t_{\mathit{rise}}$
+\end_inset
+
+ is the rise time.
+\end_layout
+
+\begin_layout Description
+slip Spatial database of final slip distribution (
+\begin_inset Formula $D_{final})$
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Description
+slip_time Spatial database of slip initiation times (
+\begin_inset Formula $t_{r}$
+\end_inset
+
+).
+\end_layout
+
+\begin_layout Description
+rise_time Spatial database for rise time (
+\begin_inset Formula $t_{\mathit{rise}}$
+\end_inset
+
+).
+\end_layout
+
+\begin_layout Standard
+An example of setting these parameters in a 
+\family typewriter
+.cfg
+\family default
+ file is:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.interfaces.fault.eq_srcs.ruptures]
+\end_layout
+
+\begin_layout LyX-Code
+slip_function = pylith.faults.BruneSlipFn
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.interfaces.fault.eq_srcs.rupture.slip_function]
+\end_layout
+
+\begin_layout LyX-Code
+slip.iohandler.filename = finalslip.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+rise_time.iohandler.filename = risetime.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+slip_time.iohandler.filename = sliptime.spatialdb
+\end_layout
+
+\begin_layout Standard
+The spatial database files for the slip time function specify the spatial
+ variation in the parameters for the slip time function, as shown in Table
+ 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "tab:Brune-slip-db-params"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float table
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\noindent
+\align center
+\begin_inset Caption
+
+\begin_layout Plain Layout
+\begin_inset CommandInset label
+LatexCommand label
+name "tab:Brune-slip-db-params"
+
+\end_inset
+
+Values in spatial database used as parameters in the Brune slip time function.
+\end_layout
+
+\end_inset
+
+
+\begin_inset VSpace defskip
+\end_inset
+
+
+\begin_inset Tabular
+<lyxtabular version="3" rows="6" columns="3">
+<features tabularvalignment="middle">
+<column alignment="left" valignment="top" width="0">
+<column alignment="left" valignment="top" width="0">
+<column alignment="left" valignment="top" width="2.5in">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Spatial database
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Value
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Description
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+slip
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+left-lateral-slip
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Amount of left-lateral final slip in meters.
+ Use negative values for right-lateral slip.
+ Applies to faults in 2D and 3D only.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+reverse-slip
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Amount of reverse slip in meters.
+ Use negative values for normal slip.
+ Applies to faults in 3D only.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+fault-opening
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Amount of fault opening in meters.
+ Negative values imply penetration.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+rise_time
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+rise-time
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Rise time (
+\begin_inset Formula $t_{r})$
+\end_inset
+
+ in seconds.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+slip_time
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+slip-time
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Slip initiation time (
+\begin_inset Formula $t_{t})$
+\end_inset
+
+ in meters.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Paragraph
+Liu-Cosine Slip Time Function
+\end_layout
+
+\begin_layout Standard
+This slip time function, proposed by Liu, Archuleta, and Hartzell for use
+ in ground-motion modeling
+\begin_inset CommandInset citation
+LatexCommand cite
+key "Liu:etal:2006"
+
+\end_inset
+
+, combines several cosine and sine functions together to create a slip time
+ history with a sharp rise and gradual termination with a finite duration
+ of slip.
+ The evolution of slip at a point follows: 
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula 
+\begin{gather}
+D(t)=\left\{ \begin{array}{cc}
+D_{\mathit{final}}C_{n}\left(0.7t-0.7\frac{t_{1}}{\pi}\sin\frac{\pi t}{t_{1}}-1.2\frac{t_{1}}{\pi}\left(\cos\frac{\pi t}{2t_{1}}-1\right)\right) & 0\leq t<t_{1}\\
+D_{\mathit{final}}C_{n}\left(1.0t-0.7\frac{t1}{\pi}\sin\frac{\pi t}{t_{1}}+0.3\frac{t2}{\pi}\sin\frac{\pi(t-t1)}{t_{2}}+\frac{1.2}{\pi}t_{1}-0.3t_{1}\right) & t_{1}\leq t<2t_{1}\\
+D_{\mathit{final}}C_{n}\left(0.7-0.7\cos\frac{\pi t}{t_{1}}+0.6\sin\frac{\pi t}{2t_{1}}\right) & 2t_{1}\leq t\leq t_{0}
+\end{array}\right.\,,\\
+C_{n}=\frac{\pi}{1.4\pi t_{1}+1.2t_{1}+0.3\pi t_{2}},\\
+t_{0}=1.525t_{\mathit{rise}},\\
+t_{1}=0.13t_{0},\\
+t_{2}=t_{0}-t_{1},
+\end{gather}
+
+\end_inset
+
+where 
+\begin_inset Formula $D(t)$
+\end_inset
+
+ is slip at time 
+\begin_inset Formula $t$
+\end_inset
+
+, 
+\begin_inset Formula $D_{final}$
+\end_inset
+
+ is the final slip at the location, 
+\begin_inset Formula $t_{r}$
+\end_inset
+
+ is the slip initiation time (time when rupture reaches the location), and
+ 
+\begin_inset Formula $t_{\mathit{rise}}$
+\end_inset
+
+ is the rise time.
+\end_layout
+
+\begin_layout Description
+slip Spatial database of final slip distribution (
+\begin_inset Formula $D_{final})$
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Description
+slip_time Spatial database of slip initiation times (
+\begin_inset Formula $t_{r}$
+\end_inset
+
+).
+\end_layout
+
+\begin_layout Description
+rise_time Spatial database for rise time (
+\begin_inset Formula $t_{\mathit{rise}}$
+\end_inset
+
+).
+\end_layout
+
+\begin_layout Standard
+The spatial database files for the slip time function use the same parameters
+ for the slip time function as the Brune slip time function shown in Table
+ 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "tab:Brune-slip-db-params"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Paragraph
+Time-History Slip Time Function
+\end_layout
+
+\begin_layout Standard
+This slip time function reads the slip time function from a data file, so
+ it can have an arbitrary shape.
+ The slip and slip initiation times are specified using spatial databases,
+ so the slip time function, in general, will use a normalized amplitude.
+\end_layout
+
+\begin_layout Description
+slip Spatial database of final slip distribution (
+\begin_inset Formula $D_{final})$
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Description
+slip_time Spatial database of slip initiation times (
+\begin_inset Formula $t_{r}$
+\end_inset
+
+).
+\end_layout
+
+\begin_layout Description
+time_history Temporal database for slip evolution.
+\end_layout
+
+\begin_layout Standard
+An example of setting these parameters in a 
+\family typewriter
+.cfg
+\family default
+ file is:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.interfaces.fault.eq_srcs.ruptures]
+\end_layout
+
+\begin_layout LyX-Code
+slip_function = pylith.faults.TimeHistorySlipFn
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.interfaces.fault.eq_srcs.rupture.slip_function]
+\end_layout
+
+\begin_layout LyX-Code
+slip.iohandler.filename = finalslip.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+slip_time.iohandler.filename = sliptime.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+time_history.iohandler.filename = myfunction.timedb
+\end_layout
+
+\begin_layout Standard
+The spatial database files for the slip time function specify the spatial
+ variation in the parameters for the slip time function, as shown in Table
+ 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "tab:Brune-slip-db-params-2"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float table
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\noindent
+\align center
+\begin_inset Caption
+
+\begin_layout Plain Layout
+\begin_inset CommandInset label
+LatexCommand label
+name "tab:Brune-slip-db-params-2"
+
+\end_inset
+
+Values in spatial database used as parameters in the time history slip time
+ function.
+\end_layout
+
+\end_inset
+
+
+\begin_inset VSpace defskip
+\end_inset
+
+
+\begin_inset Tabular
+<lyxtabular version="3" rows="6" columns="3">
+<features tabularvalignment="middle">
+<column alignment="left" valignment="top" width="0">
+<column alignment="left" valignment="top" width="0">
+<column alignment="left" valignment="top" width="2.5in">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Spatial database
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Value
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Description
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+slip
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+left-lateral-slip
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Amount of left-lateral final slip in meters.
+ Use negative values for right-lateral slip.
+ Applies to faults in 2D and 3D only.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+reverse-slip
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Amount of reverse slip in meters.
+ Use negative values for normal slip.
+ Applies to faults in 3D only.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+fault-opening
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Amount of fault opening in meters.
+ Negative values imply penetration.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+rise_time
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+rise-time
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Rise time (
+\begin_inset Formula $t_{r})$
+\end_inset
+
+ in seconds.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+slip_time
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+slip-time
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Slip initiation time (
+\begin_inset Formula $t_{t})$
+\end_inset
+
+ in meters.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Dynamic Earthquake Rupture
+\end_layout
+
+\begin_layout Standard
+Dynamic fault interfaces use the FaultCohesiveDyn object to specify a fault
+ constitutive model to govern the fault tractions (friction) and the resulting
+ slip.
+ When friction is large enough such that there is no sliding on the fault,
+ the fault is locked (slip is zero) and the Lagrange multipliers assume
+ their values just as they do in kinematic ruptures.
+ In this case, the Lagrange multipliers correspond to the forces necessary
+ to keep the slip zero.
+ When the driving forces exceed those allowed by friction, we reduce the
+ values of the Lagrange multipliers to those consistent with friction from
+ the fault constitutive model.
+ When we reduce the Lagrange multipliers, we must increment the slip accordingly
+ to maintain consistency in the algebraic system of equations.
+\end_layout
+
+\begin_layout Subsubsection
+Governing Equations
+\end_layout
+
+\begin_layout Standard
+The algebraic systems of equations for dynamic earthquake rupture are the
+ same as those for kinematic rupture
+\begin_inset Formula 
+\begin{equation}
+\left[\begin{array}{cc}
+\underline{A} & \underline{C}^{T}\\
+\underline{C} & 0
+\end{array}\right]\left[\begin{array}{c}
+\overrightarrow{u}\\
+\overrightarrow{l}
+\end{array}\right]=\left[\begin{array}{c}
+\overrightarrow{b}\\
+\overrightarrow{d}
+\end{array}\right].
+\end{equation}
+
+\end_inset
+
+Enforcing the limits imposed on the Lagrange multipliers by the fault constituti
+ve model requires determining the increment in slip for an increment in
+ the Lagrange multipliers.
+ The increment in the Lagrange multipliers is the difference between the
+ value computed for the current slip (either zero or the slip at the previous
+ time step) and the value computed from the fault constitutive model.
+ Starting from our system of algebraic equations,
+\begin_inset Formula 
+\begin{equation}
+A_{ij}^{nm}u_{j}^{m}+C_{ji}^{pn}l_{j}^{p}=b_{i}^{n},
+\end{equation}
+
+\end_inset
+
+we compute the sensitivity for the given loading and boundary conditions,
+\begin_inset Formula 
+\begin{equation}
+A_{ij}^{nm}\partial u_{j}^{m}=-C_{ji}^{pn}\partial l_{j}^{p}.
+\end{equation}
+
+\end_inset
+
+Computing the increment in the slip requires computing the increment in
+ the displacements.
+ Solving this equation rigorously would require inverting the system Jacobian,
+ which we do not want to do unless it is diagonal (as it is in the case
+ of the lumped formulations).
+ 
+\end_layout
+
+\begin_layout Paragraph
+Non-diagonal A
+\end_layout
+
+\begin_layout Standard
+In general A is a sparse matrix with off-diagonal terms of the form
+\begin_inset Formula 
+\begin{equation}
+A=\left(\begin{array}{ccc}
+A_{0} & A_{1} & A_{2}\\
+A_{3} & A_{n-} & 0\\
+A_{4} & 0 & A_{n+}
+\end{array}\right),
+\end{equation}
+
+\end_inset
+
+where the degrees of freedom on either side of the fault are uncoupled.
+ We formulate two small linear systems involving just the degrees of freedom
+ associated with vertices on either the positive or negative sides of the
+ fault,
+\begin_inset Formula 
+\begin{gather}
+A_{ij}^{nm-}\partial u_{j}^{m-}=-R_{ij}^{pn}\partial l_{j}^{p},\\
+A_{ij}^{nm+}\partial u_{j}^{m+}=R_{ij}^{pn}\partial l_{j}^{p},
+\end{gather}
+
+\end_inset
+
+where we have replaced 
+\begin_inset Formula $\underline{C}$
+\end_inset
+
+ with 
+\begin_inset Formula $\underline{R}$
+\end_inset
+
+ to denote the explicit inclusion of the signs for the terms in 
+\begin_inset Formula $\underline{C}$
+\end_inset
+
+ associated with the positive (
+\begin_inset Formula $n^{+}$
+\end_inset
+
+) and negative (
+\begin_inset Formula $n^{-}$
+\end_inset
+
+) sides of the fault.
+ After solving these two linear systems of equations, we compute the increment
+ in slip using
+\begin_inset Formula 
+\begin{equation}
+\partial d_{i}^{p}=R_{ij}^{pn}(\partial u_{j}^{n+}-\partial u_{j}^{n-}).
+\end{equation}
+
+\end_inset
+
+The solution of these two linear systems gives the increment in slip assuming
+ all the degrees of freedom except those immediately adjacent to the fault
+ remain fixed.
+ In real applications where the deformation associated with fault slip is
+ localized around the fault, this provides good enough approximations so
+ that the nonlinear solver converges quickly.
+ In problems where deformation associated with slip on the fault is not
+ localized (as in the case in some of the example problems), the increment
+ in slip computed by solving these two linear systems is not a good approximatio
+n and the nonlinear solve requires a large number of iterations.
+\end_layout
+
+\begin_layout Standard
+We use the PETSc Krylov subspace solver (KSP) to solve these two linear
+ systems.
+ The PETSc settings for the KSP object are set in the same manner as the
+ main solver, except we use the prefix friction_ in all of the settings
+ related to the KSP solver for these two linear systems.
+ For example, to use the recommended additive Schwarz preconditioner in
+ the friction sensitivity solves, the settings in a .cfg file are:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.petsc]
+\end_layout
+
+\begin_layout LyX-Code
+friction_pc_type = asm
+\end_layout
+
+\begin_layout Standard
+See the examples in Sections 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Tutorial-3d-hex8-friction"
+
+\end_inset
+
+ and 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:tutorial:shearwave:quad4"
+
+\end_inset
+
+ for details.
+\end_layout
+
+\begin_layout Paragraph
+Diagonal A
+\end_layout
+
+\begin_layout Standard
+With a lumped Jacobian matrix, we can solve for the increment in slip directly,
+\begin_inset Formula 
+\begin{equation}
+\partial d_{i}^{p}=-C_{ij}^{pn}(A_{jk}^{nm})^{-1}C_{lk}^{pm}\partial l_{l}^{p}.
+\end{equation}
+
+\end_inset
+
+By not allowing the fault interface to overlap with the absorbing boundary,
+ the terms in 
+\begin_inset Formula $A$
+\end_inset
+
+ for a given vertex are identical and the expression on the right-hand side
+ reduces to
+\begin_inset Formula 
+\begin{equation}
+\partial d_{i}^{p}=-\left(\frac{1}{A^{n+}}+\frac{1}{A^{n-}}\right)\partial l_{i}^{p}.
+\end{equation}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Dynamic Rupture Parameters
+\end_layout
+
+\begin_layout Standard
+The components of the FaultCohesiveDyn object include
+\end_layout
+
+\begin_layout Description
+open_free_surface If true, enforce traction free surface when the fault
+ opens, otherwise apply prescribed tractions even when the fault opens (default
+ is true); to mimic a dike opening use false.
+\end_layout
+
+\begin_layout Description
+zero_tolerance Tolerance for detecting zero values (default is 1.0e-10);
+ should be larger than absolute tolerance in KSP solves.
+\end_layout
+
+\begin_layout Description
+traction_perturbation Prescribed tractions on fault surface (generally used
+ for nucleating earthquake ruptures, default is none).
+\end_layout
+
+\begin_layout Description
+friction Fault constitutive model.
+\end_layout
+
+\begin_layout Standard
+An example of specifying the dynamic earthquake rupture properties and component
+s in a 
+\family typewriter
+.cfg
+\family default
+ file:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.interfaces.fault]
+\end_layout
+
+\begin_layout LyX-Code
+open_free_surface = True ; default
+\end_layout
+
+\begin_layout LyX-Code
+traction_perturbation = pylith.faults.TractPerturbation ; not default
+\end_layout
+
+\begin_layout LyX-Code
+traction_perturbation.db_initial = spatialdata.spatialdb.SimpleDB
+\end_layout
+
+\begin_layout LyX-Code
+traction_perturbation.db_initial.iohandler.filename = tractions.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+friction = pylith.friction.StaticFriction
+\end_layout
+
+\begin_layout LyX-Code
+friction.db_properties = spatialdata.spatialdb.SimpleDB
+\end_layout
+
+\begin_layout LyX-Code
+friction.db_properties.iohandler.filename = friction.spatialdb
+\end_layout
+
+\begin_layout Standard
+The prescribed traction perturbation is specified using the same fault coordinat
+e system as the slip directions in the kinematic ruptures.
+ The perurbation has the same functional form as the time-dependent boundary
+ conditions (and same spatial databases).
+ Table 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "tab:fault:cohesive:dyn:prescribed:tractions"
+
+\end_inset
+
+ gives the values in the spatial database for the prescribed tractions.
+ Table 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "tab:fault:dyn:output"
+
+\end_inset
+
+ shows the fields available for output.
+ Additional fields are available depending on the fault constitutive model.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float table
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\noindent
+\align center
+\begin_inset Caption
+
+\begin_layout Plain Layout
+\begin_inset CommandInset label
+LatexCommand label
+name "tab:fault:cohesive:dyn:prescribed:tractions"
+
+\end_inset
+
+Values in spatial databases for prescribed tractions.
+\end_layout
+
+\end_inset
+
+
+\begin_inset VSpace defskip
+\end_inset
+
+
+\begin_inset Tabular
+<lyxtabular version="3" rows="22" columns="4">
+<features tabularvalignment="middle">
+<column alignment="left" valignment="top" width="0">
+<column alignment="left" valignment="top" width="0">
+<column alignment="left" valignment="top" width="0">
+<column alignment="left" valignment="top" width="2.5in">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Spatial database
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Dimension
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Value
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Description
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+db_initial
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+1-D
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+traction-normal
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Normal traction (tension is positive)
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+2-D
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+traction-shear
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Left-lateral shear traction (reverse shear for dipping faults)
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+traction-normal
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Normal traction (tension is positive)
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+3-D
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+traction-shear-leftlateral
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Left-lateral shear traction
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+traction-shear-updip
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Reverse shear traction
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+traction-normal
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Normal traction (tension is positive)
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+db_rate
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+1-D
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+traction-rate-normal
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Rate of change of normal traction (tension is positive)
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+2-D
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+traction-rate-shear
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Rate of change of left-lateral shear traction (reverse shear for dipping
+ faults)
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+traction-rate-normal
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Rate of change of normal traction (tension is positive)
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+3-D
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+traction-rate-leftlateral
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Rate of change of eft-lateral shear traction
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+traction-rate-shear-updip
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Rate of change of reverse shear traction
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+traction-rate-normal
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Rate of change of normal traction (tension is positive)
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+all
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+rate-start-time
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Time at which rate of change begins
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+db_change
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+1-D
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+traction-normal
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Change in normal traction (tension is positive)
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+2-D
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+traction-shear
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Change in left-lateral shear traction (reverse shear for dipping faults)
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+traction-normal
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Change in normal traction (tension is positive)
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+3-D
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+traction-leftlateral
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Change in left-lateral shear traction
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+traction-shear-updip
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Change in reverse shear traction
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+traction-normal
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Change in normal traction (tension is positive)
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+all
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+change-start-time
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Time at which change begins
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+th_change
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+all
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+None
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Time history for change
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Float table
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\noindent
+\align center
+\begin_inset Caption
+
+\begin_layout Plain Layout
+\begin_inset CommandInset label
+LatexCommand label
+name "tab:fault:dyn:output"
+
+\end_inset
+
+Fields available in output of fault information.
+\end_layout
+
+\end_inset
+
+
+\begin_inset VSpace defskip
+\end_inset
+
+
+\begin_inset Tabular
+<lyxtabular version="3" rows="11" columns="3">
+<features tabularvalignment="middle">
+<column alignment="center" valignment="top" width="0">
+<column alignment="center" valignment="top" width="0">
+<column alignment="center" valignment="top" width="3.5in">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Field Type
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Field
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Description
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+vertex_info_fields
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+normal_dir
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Direction of fault normal in global coordinate system
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+strike_dir
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Direction of fault strike in global coordinate system
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+dip_dir
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Up-dip direction on hanging wall in global coordinate system
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+traction_initial
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Initial tractions (if specified) in fault coordinate system
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+traction_rate
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Rate of change in tractions (if specified) in fault coordinate system
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+rate_start_time
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Time at which rate of change begins (if specified)
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+traction_change
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Change in tractions (if specified) in fault coordinate system
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+change_start_time
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Time at which change occurs (if specified)
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+vertex_data_fields
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+slip
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Slip vector at time step (in fault coordinate system) in meters
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+traction
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Fault tractions (in fault coordinate system) in Pa
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Fault Constitutive Models
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:fault:constitutive:models"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+PyLith provides four fault constitutive models.
+ Future releases may contain additional models, and a template is provided
+ for you to construct your own (see Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Extending:FaultConstitutiveModels"
+
+\end_inset
+
+).
+ The fault constitutive model implementations are independent of dimension
+ and work in both 2-D and 3-D.
+ In solving the governing equations, PyLith will use a scalar representation
+ of the shear traction in 2-D and a vector representation of the shear traction
+ in 3-D, with the shear traction resolved in the direction of current slip.
+ The fault constitutive models contain a common set of properties and components
+:
+\end_layout
+
+\begin_layout Description
+label Name of the friction model.
+\end_layout
+
+\begin_layout Description
+db_properties Spatial database of the friction model parameters (default
+ is SimpleDB).
+\end_layout
+
+\begin_layout Description
+db_initial_state Spatial database for initial state variables (default is
+ none).
+\end_layout
+
+\begin_layout Paragraph
+Static Friction
+\end_layout
+
+\begin_layout Standard
+The static friction model produces shear tractions proportional to the fault
+ normal traction plus a cohesive stress,
+\begin_inset Formula 
+\begin{equation}
+T_{f}=\begin{cases}
+T_{c}-\mu_{f}T_{n} & T_{n}\leq0\\
+0 & T_{n}>0
+\end{cases}.
+\end{equation}
+
+\end_inset
+
+The spatial database file for the static friction model properties specifies
+ the spatial variation of the parameters given in Table 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "tab:static:friction:properties"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float table
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\noindent
+\align center
+\begin_inset Caption
+
+\begin_layout Plain Layout
+\begin_inset CommandInset label
+LatexCommand label
+name "tab:static:friction:properties"
+
+\end_inset
+
+Values in the spatial database for constant friction parameters.
+\end_layout
+
+\end_inset
+
+
+\begin_inset VSpace defskip
+\end_inset
+
+
+\begin_inset Tabular
+<lyxtabular version="3" rows="3" columns="2">
+<features tabularvalignment="middle">
+<column alignment="left" valignment="top" width="0">
+<column alignment="left" valignment="top" width="2.5in">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Value
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Description
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+friction-coefficient
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Coefficient of friction, 
+\begin_inset Formula $\mu_{f}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+cohesion
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Cohesive stress, 
+\begin_inset Formula $T_{c}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Paragraph
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:friction:slip:weakening"
+
+\end_inset
+
+Slip-Weakening Friction
+\end_layout
+
+\begin_layout Standard
+The linear slip-weakening friction model produces shear tractions equal
+ to the cohesive stress plus a contribution proportional to the fault normal
+ traction that decreases from a static value to a dynamic value as slip
+ progresses,
+\begin_inset Formula 
+\begin{equation}
+T_{f}=\begin{cases}
+T_{c}-(\mu_{s}-(\mu_{s}-\mu_{d})\frac{d}{d_{0}})T_{n} & d\leq d_{0}\text{ and }T_{n}\leq0\\
+T_{c}-\mu_{d}T_{n} & d>d_{0}\text{ and }T_{n}\leq0\\
+0 & T_{n}>0
+\end{cases}
+\end{equation}
+
+\end_inset
+
+The spatial database files for the slip-weakening friction model properties
+ and state variables specify the spatial variation of the fault constitutive
+ model parameters given in Table 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "tab:slip:weakening:properties:statevars"
+
+\end_inset
+
+.
+ As long as the fault is locked, the initial state variables are zero, so
+ specifying the initial state variables for slip-weakening friction is rare.
+ The slip-weakening friction also includes a parameter, 
+\family typewriter
+force_healing
+\family default
+, to control healing.
+ In quasi-static simulations, one usually wants slip confined to a single
+ time step (
+\family typewriter
+force_healing
+\family default
+ = True), whereas in a dynamic simulation slip occurs over many time steps
+ (
+\family typewriter
+force_healing
+\family default
+ = False; default behavior) and fault healing is often neglected.
+ The properties include:
+\end_layout
+
+\begin_layout Description
+force_healing Flag indicating whether healing (cumalative slip state variable
+ reset to zero) is forced after every time step.
+\end_layout
+
+\begin_layout Standard
+An example of setting the properties for the rate and state friction component
+ in a 
+\family typewriter
+.cfg
+\family default
+ file is:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.interfaces.fault]
+\end_layout
+
+\begin_layout LyX-Code
+friction = pylith.friction.SlipWeakening ; Change friction model from the
+ default
+\end_layout
+
+\begin_layout LyX-Code
+friction.force_healing = False ; default value
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float table
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\noindent
+\align center
+\begin_inset Caption
+
+\begin_layout Plain Layout
+\begin_inset CommandInset label
+LatexCommand label
+name "tab:slip:weakening:properties:statevars"
+
+\end_inset
+
+Values in spatial databases for slip-weakening friction.
+\end_layout
+
+\end_inset
+
+
+\begin_inset VSpace defskip
+\end_inset
+
+
+\begin_inset Tabular
+<lyxtabular version="3" rows="7" columns="3">
+<features tabularvalignment="middle">
+<column alignment="left" valignment="top" width="0">
+<column alignment="left" valignment="top" width="0">
+<column alignment="left" valignment="top" width="2.5in">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Spatial database
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Value
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Description
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+db_properties
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+static-coefficient
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Static coefficient of friction, 
+\begin_inset Formula $\mu_{s}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+dynamic-coefficient
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Dynamic coefficient of friction, 
+\begin_inset Formula $\mu_{d}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+slip-weakening-parameter
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Slip-weakening parameter, 
+\begin_inset Formula $d_{0}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+cohesion
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Cohesive stress, 
+\begin_inset Formula $T_{c}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+db_initial_state
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+cumulative-slip
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Cumulative slip, 
+\begin_inset Formula $d$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+previous-slip
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Slip at previous time step, 
+\begin_inset Formula $d(t-\Delta t)$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Paragraph
+Time-Weakening Friction
+\end_layout
+
+\begin_layout Standard
+The linear time-weakening friction model is analogous to the linear slip-weakeni
+ng friction model with time replacing slip.
+ It produces shear tractions equal to the cohesive stress plus a contribution
+ proportional to the fault normal traction that decreases from a static
+ value to a dynamic value as time progresses,
+\begin_inset Formula 
+\begin{equation}
+T_{f}=\begin{cases}
+T_{c}-(\mu_{s}-(\mu_{s}-\mu_{d})\frac{t}{t_{0}})T_{n} & t\leq t_{0}\text{ and }T_{n}\leq0\\
+T_{c}-\mu_{d}T_{n} & t>t_{0}\text{ and }T_{n}\leq0\\
+0 & T_{n}>0
+\end{cases}
+\end{equation}
+
+\end_inset
+
+The spatial database files for the time-weakening friction model properties
+ and state variables specify the spatial variation of the fault constitutive
+ model parameters given in Table 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "tab:time:weakening:properties:statevars"
+
+\end_inset
+
+.
+ As long as the fault is locked, the initial state variable is zero, so
+ specifying the initial state variable for time-weakening friction is rare.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float table
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\noindent
+\align center
+\begin_inset Caption
+
+\begin_layout Plain Layout
+\begin_inset CommandInset label
+LatexCommand label
+name "tab:time:weakening:properties:statevars"
+
+\end_inset
+
+Values in spatial databases for time-weakening friction.
+\end_layout
+
+\end_inset
+
+
+\begin_inset VSpace defskip
+\end_inset
+
+
+\begin_inset Tabular
+<lyxtabular version="3" rows="6" columns="3">
+<features tabularvalignment="middle">
+<column alignment="left" valignment="top" width="0">
+<column alignment="left" valignment="top" width="0">
+<column alignment="left" valignment="top" width="2.5in">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Database
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Value
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Description
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+db_properties
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+static-coefficient
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Static coefficient of friction, 
+\begin_inset Formula $\mu_{s}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+dynamic-coefficient
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Dynamic coefficient of friction, 
+\begin_inset Formula $\mu_{d}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+time-weakening-parameter
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Time-weakening parameter, 
+\begin_inset Formula $t_{0}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+cohesion
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Cohesive stress, 
+\begin_inset Formula $T_{c}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+db_initial_state
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+elapsed-time
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Elasped time of slip, 
+\begin_inset Formula $t$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Paragraph
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:friction:rate:state:ageing"
+
+\end_inset
+
+Rate- and State-Friction with Ageing Law
+\end_layout
+
+\begin_layout Standard
+The Dieterich-Ruina rate and state friction model produces shear tractions
+ equal to the cohesive stress plus a contribution proportional to the fault
+ normal traction that depends on a state variable,
+\begin_inset Formula 
+\begin{gather}
+T_{f}=\begin{cases}
+T_{c}-\mu_{f}T_{n} & T_{n}\leq0\\
+0 & T_{n}>0
+\end{cases}\\
+\mu_{f}=\begin{cases}
+\mu_{0}+a\ln\left(\frac{V}{V_{0}}\right)+b\ln\left(\frac{V_{0}\theta}{L}\right) & V\ge V_{\mathit{min}}\\
+\mu_{0}+a\ln\left(\frac{V_{min}}{V}\right)+b\ln\left(\frac{V_{0}\theta}{L}\right)-a\left(1-\frac{V}{V_{min}}\right) & V<V_{min}
+\end{cases}\\
+\frac{d\theta}{dt}=1-\frac{V\theta}{L}
+\end{gather}
+
+\end_inset
+
+where 
+\begin_inset Formula $V$
+\end_inset
+
+ is slip rate, 
+\begin_inset Formula $V_{min}$
+\end_inset
+
+ is a minimum slip rate, 
+\begin_inset Formula $a$
+\end_inset
+
+ and 
+\begin_inset Formula $b$
+\end_inset
+
+ are coefficients, 
+\begin_inset Formula $L$
+\end_inset
+
+ is the characteristic slip distance, 
+\begin_inset Formula $\theta$
+\end_inset
+
+ is a state variable.
+ With an interative solver in quasi-static simulations with a small, but
+ nonzero residual tolerance we never encounter zero slip rates in quasi-static
+ simulations.
+ Instead we want to avoid significant variations in the coefficient of friction
+ for slip rates on the same order as our residual tolerance.
+ We regularize the rate and state friction model by iposing a linearization
+ of the variation of the coefficient of friction with slip rate when the
+ slip rate drops below a minimum slip rate, 
+\begin_inset Formula $V_{min}$
+\end_inset
+
+ (
+\family typewriter
+min_slip_rate
+\family default
+ property with a default value of 1.0e-12).
+ Note that this is different than the popular inverse hypoerbolic sine regulariz
+ation proposed by Ben-Zion and Rice 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "BenZion:Rice:1997"
+
+\end_inset
+
+ to permit zero slip rates.
+ Following Kaneko 
+\shape italic
+et al.
+
+\shape default
+ 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "Kaneko:etal:2008"
+
+\end_inset
+
+, we integrate the evolution equation for the state variable keeping slip
+ rate constant to get
+\begin_inset Formula 
+\begin{equation}
+\theta(t+\Delta t)=\theta(t)\exp\left(\frac{-V(t)\Delta t}{L}\right)+\frac{L}{V(t)}\left(1-\exp\left(-\frac{V(t)\Delta t}{L}\right)\right).
+\end{equation}
+
+\end_inset
+
+As the slip rate approaches zero, the first exponential term approaches
+ 1.
+ Using the first three terms of the Taylor series expansion of the second
+ exponential yields
+\begin_inset Formula 
+\begin{equation}
+\theta(t+\Delta t)=\begin{cases}
+\theta(t)\exp\left(-\frac{V(t)\Delta t}{L}\right)+\Delta t-\frac{1}{2}\frac{V(t)\Delta t^{2}}{L} & \frac{V(t)\Delta t}{L}<0.00001\\
+\theta(t)\exp\left(-\frac{V(t)\Delta t}{L}\right)+\frac{L}{V(t)}\left(1-\exp\left(-\frac{V(t)\Delta t}{L}\right)\right) & \frac{V(t)\Delta t}{L}\ge0.00001
+\end{cases}.
+\end{equation}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The properties include:
+\end_layout
+
+\begin_layout Description
+min_slip_rate Slip rate at which linearization occurs, 
+\begin_inset Formula $V_{min}$
+\end_inset
+
+.
+ Should be about one order of magnitude larger than absolute tolerance in
+ solve.
+\end_layout
+
+\begin_layout Standard
+An example of setting the properties for the rate and state friction component
+ in a 
+\family typewriter
+.cfg
+\family default
+ file is:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.interfaces.fault]
+\end_layout
+
+\begin_layout LyX-Code
+friction = pylith.friction.RateStateAgeing ; Change friction model from the
+ default
+\end_layout
+
+\begin_layout LyX-Code
+friction.min_slip_rate = 1.0e-12 ; default value
+\end_layout
+
+\begin_layout Standard
+The spatial database files for the rate and state friction model properties
+ and state variables specify the spatial variation of the fault constitutive
+ model parameters given in Table 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "tab:rate:state:ageing:properties:statevars"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float table
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\noindent
+\align center
+\begin_inset Caption
+
+\begin_layout Plain Layout
+\begin_inset CommandInset label
+LatexCommand label
+name "tab:rate:state:ageing:properties:statevars"
+
+\end_inset
+
+Values in spatial databases for Dieterich-Ruina rate-state friction.
+\end_layout
+
+\end_inset
+
+
+\begin_inset VSpace defskip
+\end_inset
+
+
+\begin_inset Tabular
+<lyxtabular version="3" rows="8" columns="3">
+<features tabularvalignment="middle">
+<column alignment="left" valignment="top" width="0">
+<column alignment="left" valignment="top" width="0">
+<column alignment="left" valignment="top" width="2.5in">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Database
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Value
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Description
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+db_properties
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+reference-friction-coefficient
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Steady-state coefficient of friction at slip rate 
+\begin_inset Formula $V_{0}$
+\end_inset
+
+, 
+\begin_inset Formula $\mu_{s}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+reference-slip-rate
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Reference slip rate, 
+\begin_inset Formula $V_{0}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+characteristic-slip-distance
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Slip-weakening parameter, 
+\begin_inset Formula $L$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+constitutive-parameter-a
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Coefficient for the 
+\begin_inset Formula $\ln$
+\end_inset
+
+ slip rate term, 
+\begin_inset Formula $a$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+constitutive-parameter-b
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Coefficient for the 
+\begin_inset Formula $\ln$
+\end_inset
+
+ state variable term, 
+\begin_inset Formula $b$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+cohesion
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Cohesive stress, 
+\begin_inset Formula $T_{c}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+db_initial_state
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+state-variable
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+State variable, 
+\begin_inset Formula $\theta$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:fault:cohesive:impulses"
+
+\end_inset
+
+Slip Impulses for Green's Functions
+\end_layout
+
+\begin_layout Standard
+Computing static Green's functions using the GreensFns problem requires
+ a specialized fault implementation, FaultCohesiveImpulses, to setup the
+ slip impulses.
+ The parameters controlling the slip impulses include the components involved
+ (lateral, reverse, and/or fault opening) and the amplitude of the pulses
+ (e.g., selecting a subset of a fault or including a spatial variation).
+ The GreensFns properties and facilities include:
+\end_layout
+
+\begin_layout Description
+threshold Threshold for non-zero amplitude; impulses will only be generated
+ at locations on the fault where the amplitude excees this threshold.
+\end_layout
+
+\begin_layout Description
+impulse_dof Array of components associated with impulses, e.g., [0, 1] for
+ slip involving the lateral and up-dip components.
+\end_layout
+
+\begin_layout Description
+db_impulse_amplitude Spatial database for amplitude of slip impulse (scalar
+ field).
+ Default is SimpleDB.
+\end_layout
+
+\begin_layout Standard
+An example of setting the properties and facilities for FaultCohesiveImpulses
+ in a 
+\family typewriter
+.cfg
+\family default
+ file is:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.interfaces]
+\end_layout
+
+\begin_layout LyX-Code
+fault = pylith.faults.FaultCohesiveImpulses ; Change from the default
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.interfaces.fault]
+\end_layout
+
+\begin_layout LyX-Code
+threshold = 1.0e-6*m ; default
+\end_layout
+
+\begin_layout LyX-Code
+impulse_dof = [0] ; lateral slip-only
+\end_layout
+
+\begin_layout LyX-Code
+db_impulse_amplitude.iohandler.filename = myimpulse.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+db_impulse_amplitude.label = Impulse amplitude
+\end_layout
+
+\begin_layout Section
+Gravitational Body Forces
+\end_layout
+
+\begin_layout Standard
+Many problems in geophysics require the consideration of gravitational body
+ forces.
+ For example, it is often important to include the effects of the lithostatic
+ (overburden) pressure.
+ In future releases of PyLith that permit nonlinear bulk rheologies, body
+ forces will affect plastic yield criteria and the deformation field for
+ large deformation/finite strain problems.
+ As described in Chapter 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "cha:Governing-Equations"
+
+\end_inset
+
+, the body forces contribute to the residual,
+\begin_inset Formula 
+\begin{equation}
+r_{i}^{n}=\int_{V}f_{i}N^{n}\: dV.
+\end{equation}
+
+\end_inset
+
+For gravitational body forces the body force per unit volume, 
+\begin_inset Formula $f_{i}$
+\end_inset
+
+, is given as the product of the mass density, 
+\begin_inset Formula $\rho$
+\end_inset
+
+, the scalar gravitational acceleration value, 
+\begin_inset Formula $g$
+\end_inset
+
+, and the gravitational acceleration orientation vector, 
+\begin_inset Formula $a_{i}$
+\end_inset
+
+:
+\begin_inset Formula 
+\begin{equation}
+f_{i}=\rho ga_{i}.
+\end{equation}
+
+\end_inset
+
+The mass density is a property of every material model, and is thus included
+ in the spatial database with the physical properties for each material.
+ The gravitational acceleration is assumed to be uniform and constant for
+ a given problem, with a default value of 9.80665 m/s
+\begin_inset Formula $^{\text{2}}$
+\end_inset
+
+.
+ The orientation vector will depend on the dimension of the problem as well
+ as the coordinate system being used.
+ The default orientation vector has components (0, 0, -1).
+ This is appropriate for three-dimensional problems where the gravity vector
+ is aligned with the negative z-axis, as would be the case in a geographic-proje
+cted coordinate system or a generic Cartesian coordinate system.
+ For cases in which the curvature of the earth should be considered, the
+ spatialdata package provides an earth-centered, earth-fixed (ECEF) coordinate
+ system and a local georeferenced Cartesian system; in each of these cases
+ the orientation vector is computed automatically, although this feature
+ has not been tested.
+ For problems in one or two dimensions where the orientation vector is constant,
+ the vector will need to be explicitly specified.
+ For example, in a two-dimensional problem, the vector might be specified
+ as (0, -1, 0).
+ The vector still has three components, although the extra component is
+ not used.
+\end_layout
+
+\begin_layout Standard
+Gravity is turned off by default.
+ To include gravitational effects in a simulation, you can turn it on as
+ follows:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent]
+\end_layout
+
+\begin_layout LyX-Code
+use_gravity = true
+\end_layout
+
+\begin_layout Standard
+By simply adding this flag, the default gravity field values will be used
+ and a 
+\family typewriter
+gravity_field
+\family default
+ component will be assigned for the problem.
+ The default values may be changed by altering the properties of 
+\family typewriter
+gravity_field
+\family default
+:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.gravity_field]
+\end_layout
+
+\begin_layout LyX-Code
+acceleration = 100.0*m*s**-2
+\end_layout
+
+\begin_layout LyX-Code
+gravity_dir = [0, -1, 0]
+\end_layout
+
+\begin_layout Standard
+An example problem using gravity is described in Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Tutorial-3d-hex8-gravity"
+
+\end_inset
+
+.
+\end_layout
+
+\end_body
+\end_document

Modified: short/3D/PyLith/trunk/doc/userguide/components.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/components.lyx	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/doc/userguide/components.lyx	2012-06-25 17:37:03 UTC (rev 20406)
@@ -122,6 +122,18 @@
 \begin_layout Description
 
 \family typewriter
+GreensFns pylith.problems.GreensFns
+\family default
+
+\begin_inset Newline newline
+\end_inset
+
+Static Green's function problem with slip impulses.
+\end_layout
+
+\begin_layout Description
+
+\family typewriter
 Implicit pylith.problems.Implicit
 \family default
 
@@ -497,62 +509,62 @@
 \begin_layout Description
 
 \family typewriter
-MaxwellPlaneStrain pylith.materials.MaxwellPlaneStrain
+ElasticIsotropic3D pylith.materials.ElasticIsotropic3D
 \family default
 
 \begin_inset Newline newline
 \end_inset
 
-Linear Maxwell viscoelastic bulk constitutive model for plane strain problems.
+Linearly elastic 3-D bulk constitutive model.
 \end_layout
 
 \begin_layout Description
 
 \family typewriter
-GenMaxwellPlaneStrain pylith.materials.GenMaxwellPlaneStrain
+MaxwellIsotropic3D pylith.materials.MaxwellIsotropic3D
 \family default
 
 \begin_inset Newline newline
 \end_inset
 
-Generalized Maxwell viscoelastic bulk constitutive model for plane strain
- problems.
+Linear Maxwell viscoelastic bulk constitutive model.
 \end_layout
 
 \begin_layout Description
 
 \family typewriter
-ElasticIsotropic3D pylith.materials.ElasticIsotropic3D
+MaxwellPlaneStrain pylith.materials.MaxwellPlaneStrain
 \family default
 
 \begin_inset Newline newline
 \end_inset
 
-Linearly elastic 3-D bulk constitutive model.
+Linear Maxwell viscoelastic bulk constitutive model for plane strain problems.
 \end_layout
 
 \begin_layout Description
 
 \family typewriter
-MaxwellIsotropic3D pylith.materials.MaxwellIsotropic3D
+GenMaxwellIsotropic3D pylith.materials.GenMaxwellIsotropic3D
 \family default
 
 \begin_inset Newline newline
 \end_inset
 
-Linear Maxwell viscoelastic bulk constitutive model.
+Generalized Maxwell viscoelastic bulk constitutive model.
 \end_layout
 
 \begin_layout Description
 
 \family typewriter
-GenMaxwellIsotropic3D pylith.materials.GenMaxwellIsotropic3D
+GenMaxwellPlaneStrain pylith.materials.GenMaxwellPlaneStrain
 \family default
 
 \begin_inset Newline newline
 \end_inset
 
-Generalized Maxwell viscoelastic bulk constitutive model.
+Generalized Maxwell viscoelastic bulk constitutive model for plane strain
+ problems.
 \end_layout
 
 \begin_layout Description
@@ -570,6 +582,18 @@
 \begin_layout Description
 
 \family typewriter
+PowerLawPlaneStrain pylith.materials.PowerLawPlaneStrain
+\family default
+
+\begin_inset Newline newline
+\end_inset
+
+Power-law viscoelastic bulk constitutive model for plane strain problems.
+\end_layout
+
+\begin_layout Description
+
+\family typewriter
 DruckerPrage3D pylith.materials.DruckerPrager3D
 \family default
 
@@ -582,6 +606,18 @@
 \begin_layout Description
 
 \family typewriter
+DruckerPragePlaneStrain pylith.materials.DruckerPragerPlaneStrain
+\family default
+
+\begin_inset Newline newline
+\end_inset
+
+Drucker-Prager elastoplastic bulk constitutive model for plane strain problems.
+\end_layout
+
+\begin_layout Description
+
+\family typewriter
 Homogeneous pylith.materials.Homogeneous
 \family default
 
@@ -701,6 +737,19 @@
 \begin_layout Description
 
 \family typewriter
+FaultCohesiveImpulses pylith.faults.FaultCohesive
+\family default
+Impulses
+\begin_inset Newline newline
+\end_inset
+
+Fault surface with Green's functions slip impulses implemented using cohesive
+ elements.
+\end_layout
+
+\begin_layout Description
+
+\family typewriter
 EqKinSrc pylith.faults.EqKinSrc
 \family default
 
@@ -784,6 +833,20 @@
 Slip-time function with a user-defined slip time function.
 \end_layout
 
+\begin_layout Description
+
+\family typewriter
+TractPerturbation pylith.faults.TractPerturbation
+\family default
+
+\begin_inset Newline newline
+\end_inset
+
+Prescribed traction perturbation applied to fault with constitituve model
+ in additional to tractions from deformation (generally used to nucleate
+ a rupture).
+\end_layout
+
 \begin_layout Subsection
 Friction components
 \end_layout
@@ -959,6 +1022,18 @@
 \begin_layout Description
 
 \family typewriter
+OutputSolnPoints pylith.meshio.OutputSoln
+\family default
+Points
+\begin_inset Newline newline
+\end_inset
+
+Output manager for solution data at arbitrary points in the domain.
+\end_layout
+
+\begin_layout Description
+
+\family typewriter
 OutputDirichlet pylith.meshio.OutputDirichlet
 \family default
 
@@ -1007,6 +1082,18 @@
 \begin_layout Description
 
 \family typewriter
+OutputFaultImpulses pylith.meshio.OutputFaultImpulses
+\family default
+
+\begin_inset Newline newline
+\end_inset
+
+Output manager for fault with static slip impulses.
+\end_layout
+
+\begin_layout Description
+
+\family typewriter
 OutputMatElastic pylith.meshio.OutputMatElastic
 \family default
 
@@ -1031,6 +1118,22 @@
 \begin_layout Description
 
 \family typewriter
+PointsList pylith.meshio.PointsList
+\family default
+
+\begin_inset Newline newline
+\end_inset
+
+Manager for text file container points for 
+\family typewriter
+OutputSolnPoints
+\family default
+.
+\end_layout
+
+\begin_layout Description
+
+\family typewriter
 DataWriterVTKMesh pylith.meshio.DataWriterVTKMesh
 \family default
 

Modified: short/3D/PyLith/trunk/doc/userguide/cover/cover.pdf
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/trunk/doc/userguide/cover/cover.svg.gz
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/trunk/doc/userguide/cover/cover_small.jpg
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/trunk/doc/userguide/extending/extending.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/extending/extending.lyx	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/doc/userguide/extending/extending.lyx	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,1035 +1,1053 @@
-#LyX 1.6.5 created this file. For more info see http://www.lyx.org/
-\lyxformat 345
-\begin_document
-\begin_header
-\textclass book
-\begin_preamble
-
-\end_preamble
-\use_default_options false
-\language english
-\inputencoding latin1
-\font_roman default
-\font_sans default
-\font_typewriter default
-\font_default_family default
-\font_sc false
-\font_osf false
-\font_sf_scale 100
-\font_tt_scale 100
-
-\graphics default
-\paperfontsize default
-\spacing single
-\use_hyperref false
-\papersize default
-\use_geometry true
-\use_amsmath 1
-\use_esint 0
-\cite_engine basic
-\use_bibtopic false
-\paperorientation portrait
-\leftmargin 1in
-\topmargin 1in
-\rightmargin 1in
-\bottommargin 2in
-\secnumdepth 3
-\tocdepth 3
-\paragraph_separation indent
-\defskip medskip
-\quotes_language english
-\papercolumns 1
-\papersides 2
-\paperpagestyle default
-\tracking_changes false
-\output_changes false
-\author "" 
-\author "" 
-\end_header
-
-\begin_body
-
-\begin_layout Chapter
-\begin_inset CommandInset label
-LatexCommand label
-name "cha:Extending"
-
-\end_inset
-
-Extending PyLith
-\end_layout
-
-\begin_layout Standard
-One of the powerful features of using the Pyre framework in PyLith is the
- ability to extend the functionality of the software without altering any
- of the PyLith code.
- Any of the components can be replaced with other compatible components.
- You are already familiar with this feature from running the examples; when
- you set the spatial database to UniformDB, SimpleDB, or SCECCVMH you are
- switching between different compatible components for a spatial database
- facility.
- Modifying the governing equations to include other physical processes requires
- changing the data structures associated with the solution and altering
- the PyLith code.
-\end_layout
-
-\begin_layout Standard
-In this section we provide examples of how to extend PyLith for components
- that users will most likely want to replace with their own custom versions.
- You will need a familiarity with Python, Makefiles, and C++ to write your
- own components.
- The primary steps in constructing a component to extend PyLith's functionality
- include:
-\end_layout
-
-\begin_layout Enumerate
-Setting up the source files for the component or set of components based
- on the templates.
-\end_layout
-
-\begin_layout Enumerate
-Edit the Python source file (
-\family typewriter
-.py
-\family default
-) for the component.
-\end_layout
-
-\begin_deeper
-\begin_layout Enumerate
-Define the user-specified properties and facilities.
-\end_layout
-
-\begin_layout Enumerate
-Transfer the user-specified data from the Python object to the corresponding
- C++ object via calls to the SWIG interface object.
-\end_layout
-
-\end_deeper
-\begin_layout Enumerate
-Edit the C++ header (
-\family typewriter
-.hh
-\family default
-) and implementation files (
-\family typewriter
-.cc
-\family default
-) for the component.
-\end_layout
-
-\begin_deeper
-\begin_layout Enumerate
-Implement the methods required to satisfy the interface definition of the
- component.
-\end_layout
-
-\begin_layout Enumerate
-Implement the desired functionality of the component in C++.
-\end_layout
-
-\end_deeper
-\begin_layout Enumerate
-Edit the SWIG interface files (
-\family typewriter
-.i
-\family default
-) that provide the glue between Python and C++.
-\end_layout
-
-\begin_layout Enumerate
-Edit the Python source file that tests the functionality of the component.
-\end_layout
-
-\begin_layout Enumerate
-Run configure, build, install, and run the tests of the component.
-\end_layout
-
-\begin_layout Section
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:Extending:SpatialDatabases"
-
-\end_inset
-
-Spatial Databases
-\end_layout
-
-\begin_layout Standard
-PyLith provides several types of spatial databases that can be used for
- specification of parameters associated with boundary conditions, earthquake
- ruptures, and physical properties.
- In this example we demonstrate how to provide a spatial database, UniformVelMod
-el, for specifying elastic properties.
- The source files are included in the source for the spatialdata package
- in the 
-\family typewriter
-templates/spatialdb
-\family default
- directory.
- The 
-\family typewriter
-README
-\family default
- file in 
-\family typewriter
-templates/spatialdb
-\family default
- provides detailed instructions for the various steps involved, and the
- source files contain numerous comments to help guide you through the customizat
-ion process.
- 
-\end_layout
-
-\begin_layout Standard
-The UniformVelModel component provides uniform physical properties: P wave
- speed, S wave speed, and density.
- Although this is a rather trivial specification of physical properties
- that could be easily done using a UniformDB, this example demonstrates
- how to create a user-defined component that matches the requirements of
- a spatial database for elastic physical properties.
- Adding additional physical properties is simply a matter of including some
- additional values in the spatial database.
- Furthermore, in cases where we are constructing a spatial database for
- a seismic velocity model, the data points are georeferenced.
- With our uniform physical properties we do not need to worry about any
- differences in coordinate systems between our seismic velocity model and
- points at which the model is queried.
- However, in many cases we do, so we illustrate this functionality by using
- a geographic projection as the coordinate system in our example.
-\end_layout
-
-\begin_layout Standard
-Using a top-down approach, the first step is to determine what information
- the user will need to supply to the component.
- Is the data for the spatial database in a file or a series of files? If
- so, file names and possible paths to a directory containing files with
- known names might be necessary.
- Are there other parameters that control the behavior of the component,
- such as a minimum shear wave speed? In our example the user supplies values
- for the P wave speed, S wave speed, and density.
- The user-supplied parameters become Pyre properties and facilities in the
- Python source file.
- Because our user supplied parameters are floating point values with dimensions,
- we create dimensional properties 
-\family typewriter
-vs
-\family default
-, 
-\family typewriter
-vp
-\family default
-, and 
-\family typewriter
-density
-\family default
-.
- In addition to defining the properties of the component, we also need to
- transfer these properties to the C++ object that does the real work.
- This is done by calling the C++ 
-\family typewriter
-vs()
-\family default
-, 
-\family typewriter
-vp()
-\family default
-, and 
-\family typewriter
-density()
-\family default
- accessor functions that are accessible via the Python module created by
- SWIG.
-\end_layout
-
-\begin_layout Standard
-In the C++ object we must implement the functions that are required by the
- spatial database interface.
- These functions are listed near the beginning of the UniformVelModel class
- definition at the top of the C++ header file, 
-\family typewriter
-UniformVelModel.hh
-\family default
-.
- The C++ object also includes the accessor functions that allow us to set
- the P wave speed, S wave speed, and density values to the user-specified
- values in the Python object.
- Additional information, such as a file name, parameters defined as data
- structures, etc., would be set via similar accessor functions.
- You can also add additional functions and data structures to the C++ class
- to provide the necessary operations and functionality of the spatial database.
- 
-\end_layout
-
-\begin_layout Standard
-In SimpleDB we use a separate class to read in the spatial database and
- yet another class to perform the actual query.
- In our example, the C++ object also creates and stores the UTM zone 10
- geographic projection for the seismic velocity model.
- When the spatial database gets a query for physical properties, we transform
- the coordinates of the query point from its coordinate system to the coordinate
- system of our seismic velocity model.
-\end_layout
-
-\begin_layout Standard
-In order to use SWIG to create the Python module that allows us to call
- C++ from Python, we use a ``main'' SWIG interface file (
-\family typewriter
-\size small
-spatialdbcontrib.i
-\family default
-\size default
- in this case) and then one for each object (
-\family typewriter
-\size small
-UniformVelModel.i
-\family default
-\size default
- in this case).
- This greatly simplifies keeping the Python module synchronized with the
- C++ and Python code.
- The 
-\family typewriter
-\size small
-UniformVelModel.i
-\family default
-\size default
- SWIG file is nearly identical to the corresponding C++ header file.
- There are a few differences, as noted in the comments within the file.
- Copying and pasting the C++ header file and then doing a little cleanup
- is a very quick and easy way to construct a SWIG interface file for a C++
- object.
- Because very little changes from SWIG module to SWIG module, it is usually
- easiest to construct the ``main'' SWIG interface by copying and customizing
- an existing one.
-\end_layout
-
-\begin_layout Standard
-Once the Python, C++, and SWIG interface files are complete, we are ready
- to build the module.
- The 
-\family typewriter
-Makefile.am
-\family default
- file defines how to compile and link the C++ library and generate the Python
- module via SWIG.
- The 
-\family typewriter
-configure.ac
-\family default
- file contains the information used to build a configure script.
- The configure script checks to make sure it can find all of the tools needed
- to build the component (C++ compiler, Python, installed spatial database
- package, etc.).
- See the README file for detailed instructions on how to generate the configure
- script, and build and install the component.
-\end_layout
-
-\begin_layout Standard
-We recommend constructing tests of the component to insure that it is functionin
-g properly before attempting to use it in an application.
- The 
-\family typewriter
-\size small
-tests
-\family default
-\size default
- directory within 
-\family typewriter
-\size small
-templates/spatialdb
-\family default
-\size default
- contains a Python script, 
-\family typewriter
-\size small
-testcontrib.py
-\family default
-\size default
-, that runs the tests of the UniformVelModel component defined in 
-\family typewriter
-\size small
-TestUniformVelModel.py
-\family default
-\size default
-.
- Normally, one would want to test each function individually to isolate
- errors and create C++ tests as well as the Python tests included here.
- In our rather simple example, we simply test the overall functionality
- of the component.
- For examples of thorough testing, see the spatialdata and PyLith source
- code.
-\end_layout
-
-\begin_layout Standard
-Once you have built, installed, and tested the UniformVelModel, it is time
- to use it in a simple example.
- Because the seismic velocity model uses georeferenced coordinates, our
- example must also use georeferenced coordinates.
- The dislocation example in the PyLith 
-\family typewriter
-examples/twocells/twotet4-geopro
-\family default
-j directory uses UTM zone 11 coordinates.
- The spatial database package will transform the coordinates between the
- two projections as defined in the UniformVelModel 
-\family typewriter
-query()
-\family default
- function.
- The dislocation example uses the SCEC CVM-H seismic velocity model.
- In order to replace the SCEC CVM-H seismic velocity with our uniform velocity
- model, in 
-\family typewriter
-pylithapp.cfg
-\family default
- we replace the lines
-\end_layout
-
-\begin_layout LyX-Code
-db_properties = spatialdata.spatialdb.SCECCVMH
-\end_layout
-
-\begin_layout LyX-Code
-db_properties.data_dir = /home/brad/data/sceccvm-h/vx53/bin
-\end_layout
-
-\begin_layout Standard
-with the lines
-\end_layout
-
-\begin_layout LyX-Code
-db_properties = spatialdata.spatialdb.contrib.UniformVelModel
-\end_layout
-
-\begin_layout Standard
-When you run the dislocation example, the 
-\family typewriter
-dislocation-statevars_info.vtk
-\family default
- file should reflect the use of physical properties from the uniform seismic
- velocity with 
-\begin_inset Formula $\mu=1.69\times10^{10}\mathrm{Pa}$
-\end_inset
-
-, 
-\begin_inset Formula $\lambda=1.6825\times10^{10}\mathrm{Pa}$
-\end_inset
-
-, and 
-\begin_inset Formula $\rho=2500\mathrm{kg/m^{3}}$
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Section
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:Extending:BulkConstitutiveModels"
-
-\end_inset
-
-Bulk Constitutive Models
-\end_layout
-
-\begin_layout Standard
-PyLith includes several linearly elastic and inelastic bulk constitutive
- models for 2D and 3D problems.
- In this example, we demonstrate how to extend PyLith by adding your own
- bulk constitutive model.
- We reimplement the 2D plane strain constitutive model while adding the
- current strain and stress tensors as state variables.
- This constitutive model, 
-\family typewriter
-PlaneStrainState
-\family default
-, is not particularly useful, but it illustrates the basic steps involved
- in creating a bulk constitutive model with state variables.
- The sources files are included with the main PyLith source code in the
- 
-\family typewriter
-templates/materials
-\family default
- directory.
- The 
-\family typewriter
-README
-\family default
- file in 
-\family typewriter
-templates/materials
-\family default
- provides detailed instructions for the various steps, and the source files
- contain numerous comments to guide you through the customization process.
-\end_layout
-
-\begin_layout Standard
-In contrast to our previous example of creating a customized spatial database,
- which involved gathering user-specified parameters via the Pyre framework,
- there are no user-defined parameters for bulk constitutive models.
- The specification of the physical properties and state variables associated
- with the constitutive model is handled directly in the C++ code.
- As a result, the Python object for the constitutive model component is
- very simple and customization is limited to simply changing the names of
- objects and labels.
-\end_layout
-
-\begin_layout Standard
-The properties and state variables used in the bulk constitutive model are
- set using arguments to the constructor of the C++ 
-\family typewriter
-ElasticMaterial
-\family default
- object.
- We define a number of constants at the top of the C++ file and use the
- 
-\family typewriter
-Metadata
-\family default
- object to define the properties and state variables.
- The C++ object for the bulk constitutive component includes a number of
- functions that implement elasticity behavior of a bulk material as well
- as several utility routines:
-\end_layout
-
-\begin_layout Description
-
-\family typewriter
-_dbToProperties()
-\family default
- Computes the physical properties used in the constitutive model equations
- from the physical properties supplied in spatial databases.
-\end_layout
-
-\begin_layout Description
-
-\family typewriter
-_nondimProperties()
-\family default
- Nondimensionalizes the physical properties used in the constitutive model
- equations.
-\end_layout
-
-\begin_layout Description
-
-\family typewriter
-_dimProperties()
-\family default
- Dimensionalizes the physical properties used in the constitutive model
- equations.
-\end_layout
-
-\begin_layout Description
-
-\family typewriter
-_stableTimeStepImplicit()
-\family default
- Computes the stable time step for implicit time stepping in quasi-static
- simulations given the current state (strain, stress, and state variables).
-\end_layout
-
-\begin_layout Description
-
-\family typewriter
-_calcDensity()
-\family default
- Computes the density given the physical properties and state variables.
- In most cases density is a physical property used in the constitutive equations
-, so this is a trivial function in those cases.
-\end_layout
-
-\begin_layout Description
-
-\family typewriter
-_calcStress()
-\family default
- Computes the stress tensor given the physical properties, state variables,
- total strain, initial stress, and initial strain.
-\end_layout
-
-\begin_layout Description
-
-\family typewriter
-_calcElasticConsts()
-\family default
- Computes the elastic constants given the physical properties, state variables,
- total strain, initial stress, and initial strain.
-\end_layout
-
-\begin_layout Description
-
-\family typewriter
-_updateStateVars()
-\family default
- Updates the state variables given the physical properties, total strain,
- initial stress, and initial strain.
- If a constitutive model does not use state variables, then this routine
- is omitted.
-\end_layout
-
-\begin_layout Standard
-Because it is sometimes convenient to supply physical properties for a bulk
- constitutive model that are equivalent but different from the ones that
- appear in the constitutive equations (e.g., P wave speed, S wave speed, and
- density rather then Lame's constants 
-\begin_inset Formula $\mu,$
-\end_inset
-
-
-\begin_inset Formula $\lambda,$
-\end_inset
-
- and density), each bulk constitutive model component has routines to convert
- the physical property parameters and state variables a user specifies via
- spatial databases to the physical property properties and state variables
- used in the constitutive model equations.
- In quasi-static problems, PyLith computes an elastic solution for the first
- time step (
-\begin_inset Formula $-\Delta t$
-\end_inset
-
- to 
-\begin_inset Formula $t$
-\end_inset
-
-).
- This means that for inelastic materials, we supply two sets of functions
- for the constitutive behavior: one set for the initial elastic step and
- one set for the remainder of the simulation.
- See the source code for the inelastic materials in PyLith for an illustration
- of an efficient mechanism for doing this.
-\end_layout
-
-\begin_layout Standard
-The SWIG interface files for a bulk constitutive component are setup in
- the same manner as in the previous example of creating a customized spatial
- database component.
- The ``main'' SWIG interface file (
-\family typewriter
-materialscontrib.i
-\family default
- in this case) sets up the Python module, and the SWIG interface file for
- the component (
-\family typewriter
-PlaneStrainState.i
-\family default
- in this case) defines the functions that should be included in the Python
- module.
- Note that because the C++ 
-\family typewriter
-ElasticMaterial
-\family default
- object defines a number of pure virtual methods (which merely specify the
- interface for the functions and do not implement default behavior), we
- must include many protected functions in the SWIG interface file.
- If these are omitted, SWIG will give a warning indicating that some of
- the functions remain abstract (i.e., some pure virtual functions defined
- in the parent class 
-\family typewriter
-ElasticMaterial
-\family default
- were not implemented in the child class 
-\family typewriter
-PlaneStrainState
-\family default
-), and no constructor is created.
- When this happens, you cannot create a 
-\family typewriter
-PlaneStrainState
-\family default
- Python object.
-\end_layout
-
-\begin_layout Standard
-Once the Python, C++, and SWIG interface files are complete, you are ready
- to configure and build the C++ library and Python module for the component.
- Edit the 
-\family typewriter
-Makefile.am
-\family default
- file as necessary, then generate the configure script, run configure, and
- then build and install the library and module (see the 
-\family typewriter
-README
-\family default
- file for detailed instructions).
-\end_layout
-
-\begin_layout Standard
-Because most functionality of the bulk constitutive model component is at
- the C++ level, properly constructed unit tests for the 
-\family typewriter
-component
-\family default
- should include tests for both the C++ code and Python code.
- The C++ unit tests can be quite complex, and it is best to examine those
- used for the bulk constitutive models included with PyLith.
- In this example we create the Python unit tests to verify that we can create
- a 
-\family typewriter
-PlaneStrainState
-\family default
- Python object and call some of the simple underlying C++ functions.
- The source files are in the 
-\family typewriter
-templates/materials/tests
-\family default
- directory.
- The 
-\family typewriter
-testcontrib.py
-\family default
- Python script runs the tests defined in 
-\family typewriter
-TestPlaneStrainState.py
-\family default
-.
-\end_layout
-
-\begin_layout Standard
-Once you have built, installed, and tested the 
-\family typewriter
-PlaneStrainState
-\family default
- component, it is time to use it in a simple example.
- You can try using it in any of the 2D examples.
- For the examples in 
-\family typewriter
-examples/twocells/twoquad4
-\family default
-, in 
-\family typewriter
-pylithapp.cfg
-\family default
- replace the line
-\end_layout
-
-\begin_layout LyX-Code
-material = pylith.materials.ElasticPlaneStrain
-\end_layout
-
-\begin_layout Standard
-with the line
-\end_layout
-
-\begin_layout LyX-Code
-material = pylith.materials.contrib.PlaneStrainState
-\end_layout
-
-\begin_layout Standard
-or simply add the command line argument
-\end_layout
-
-\begin_layout LyX-Code
-
-\family typewriter
---timedependent.homogeneous.material=pylith.materials.contrib.PlaneStrainState
-\end_layout
-
-\begin_layout Standard
-when running any of the 2D examples.
- The output should remain identical, but you should see the 
-\family typewriter
-PlaneStrainState
-\family default
- object listed in the information written to 
-\family typewriter
-stdout
-\family default
-.
-\end_layout
-
-\begin_layout Section
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:Extending:FaultConstitutiveModels"
-
-\end_inset
-
-Fault Constitutive Models
-\end_layout
-
-\begin_layout Standard
-PyLith includes a two of the most widely used fault constitutive models,
- but there are a wide range of models that have been proposed to explain
- earthquake source processes.
- In this example, we demonstrate how to extend PyLith by adding your own
- fault constitutive model.
- We implement a linear viscous fault constitutive model wherein the perturbation
- in the coefficient of friction is linearly proportional to the slip rate.
- This constitutive model, 
-\family typewriter
-ViscousFriction
-\family default
-, is not particularly useful, but it illustrates the basic steps involved
- in creating a fault constitutive model.
- The sources files are included with the main PyLith source code in the
- 
-\family typewriter
-templates/friction
-\family default
- directory.
- The 
-\family typewriter
-README
-\family default
- file in 
-\family typewriter
-templates/friction
-\family default
- provides detailed instructions for the various steps, and the source files
- contain numerous comments to guide you through the customization process.
-\end_layout
-
-\begin_layout Standard
-Similar to our previous example of creating a customized bulk constitutive
- model, the parameters are defined in the C++ code, not in the Pyre framework.
- As a result, the Python object for the fault constitutive model component
- is very simple and customization is limited to simply changing the names
- of objects and labels.
-\end_layout
-
-\begin_layout Standard
-The properties and state variables used in the fault constitutive model
- are set using arguments to the constructor of the C++ 
-\family typewriter
-FrictionModel
-\family default
- object, analogous to the 
-\family typewriter
-ElasticMaterial
-\family default
- object for bulk constitutive models.
- In fact, both types of constitutive models used the same underlying C++
- object (
-\family typewriter
-Metadata::ParamDescription
-\family default
-) to store the description of the parameters and state variables.
- We define a number of constants at the top of the C++ file and use the
- 
-\family typewriter
-Metadata
-\family default
- object to define the properties and state variables.
- The C++ object for the fault constitutive component includes a number of
- functions that implement friction as well as several utility routines:
-\end_layout
-
-\begin_layout Description
-
-\family typewriter
-_dbToProperties()
-\family default
- Computes the physical properties used in the constitutive model equations
- from the physical properties supplied in spatial databases.
-\end_layout
-
-\begin_layout Description
-
-\family typewriter
-_nondimProperties()
-\family default
- Nondimensionalizes the physical properties used in the constitutive model
- equations.
-\end_layout
-
-\begin_layout Description
-
-\family typewriter
-_dimProperties()
-\family default
- Dimensionalizes the physical properties used in the constitutive model
- equations.
-\end_layout
-
-\begin_layout Description
-
-\family typewriter
-_dbToStateVars()
-\family default
- Computes the initial state variables used in the constitutive model equations
- from the initial values supplied in spatial databases.
-\end_layout
-
-\begin_layout Description
-
-\family typewriter
-_nondimStateVars()
-\family default
- Nondimensionalizes the state variables used in the constitutive model equations.
-\end_layout
-
-\begin_layout Description
-
-\family typewriter
-_dimStateVars()
-\family default
- Dimensionalizes the state variables used in the constitutive model equations.
-\end_layout
-
-\begin_layout Description
-
-\family typewriter
-_calcFriction()
-\family default
- Computes the friction stress given the physical properties, state variables,
- slip, slip rate, and normal traction.
-\end_layout
-
-\begin_layout Description
-
-\family typewriter
-_updateStateVars()
-\family default
- Updates the state variables given the physical properties, slip, slip rate,
- and normal traction.
-\end_layout
-
-\begin_layout Standard
-If a constitutive model does not use state variables, then the state variable
- routines are omitted.
- 
-\end_layout
-
-\begin_layout Standard
-Because it is sometimes convenient to supply physical properties for a fault
- constitutive model that are equivalent but different from the ones that
- appear in the constitutive equations, each fault constitutive model component
- has routines to convert the physical property parameters and state variables
- a user specifies via spatial databases to the physical property properties
- and state variables used in the constitutive model equations.
- 
-\end_layout
-
-\begin_layout Standard
-The SWIG interface files for a fault constitutive component are setup in
- the same manner as in the previous examples of creating a bulk constitutive
- model or a customized spatial database component.
- The ``main'' SWIG interface file (
-\family typewriter
-frictioncontrib.i
-\family default
- in this case) sets up the Python module, and the SWIG interface file for
- the component (
-\family typewriter
-ViscousFriction.i
-\family default
- in this case) defines the functions that should be included in the Python
- module.
- Note that because the C++ 
-\family typewriter
-FrictionModel
-\family default
- object defines a number of pure virtual methods (which merely specify the
- interface for the functions and do not implement default behavior), we
- must include many protected functions in the SWIG interface file.
- If these are omitted, SWIG will give a warning indicating that some of
- the functions remain abstract (i.e., some pure virtual functions defined
- in the parent class 
-\family typewriter
-FrictionModel
-\family default
- were not implemented in the child class 
-\family typewriter
-ViscousFriction
-\family default
-), and no constructor is created.
- When this happens, you cannot create a 
-\family typewriter
-ViscousFriction
-\family default
- Python object.
-\end_layout
-
-\begin_layout Standard
-Once the Python, C++, and SWIG interface files are complete, you are ready
- to configure and build the C++ library and Python module for the component.
- Edit the 
-\family typewriter
-Makefile.am
-\family default
- file as necessary, then generate the configure script, run configure, and
- then build and install the library and module (see the 
-\family typewriter
-README
-\family default
- file for detailed instructions).
-\end_layout
-
-\begin_layout Standard
-Because most functionality of the fault constitutive model component is
- at the C++ level, properly constructed unit tests for the 
-\family typewriter
-component
-\family default
- should include tests for both the C++ code and Python code.
- The C++ unit tests can be quite complex, and it is best to examine those
- used for the fault constitutive models included with PyLith.
- In this example we create the Python unit tests to verify that we can create
- a 
-\family typewriter
-ViscousFriction
-\family default
- Python object and call some of the simple underlying C++ functions.
- The source files are in the 
-\family typewriter
-templates/friction/tests
-\family default
- directory.
- The 
-\family typewriter
-testcontrib.py
-\family default
- Python script runs the tests defined in 
-\family typewriter
-TestViscousFriction.py
-\family default
-.
-\end_layout
-
-\begin_layout Standard
-Once you have built, installed, and tested the 
-\family typewriter
-ViscousFriction
-\family default
- component, it is time to use it in a simple example.
- You can try using it in any of the 2D or 3D examples.
- For the examples in 
-\family typewriter
-examples/bar_shearwave/quad4, in shearwave_staticfriction.cfg
-\family default
- replace the line
-\end_layout
-
-\begin_layout LyX-Code
-friction = pylith.friction.StaticFriction
-\end_layout
-
-\begin_layout Standard
-with the line
-\end_layout
-
-\begin_layout LyX-Code
-friction = pylith.friction.contrib.ViscousFriction
-\end_layout
-
-\begin_layout Standard
-or simply add the command line argument
-\end_layout
-
-\begin_layout LyX-Code
-
-\family typewriter
---timedependent.interfaces.fault.friction=pylith.friction.contrib.ViscousFriction
-\end_layout
-
-\begin_layout Standard
-when running any of the friction examples.
- You will also need to supply a corresponding spatial database with the
- physical properties for the viscous friction constitutive model.
-\end_layout
-
-\end_body
-\end_document
+#LyX 2.0 created this file. For more info see http://www.lyx.org/
+\lyxformat 413
+\begin_document
+\begin_header
+\textclass book
+\begin_preamble
+
+\end_preamble
+\use_default_options false
+\maintain_unincluded_children false
+\language english
+\language_package default
+\inputencoding latin1
+\fontencoding global
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry true
+\use_amsmath 1
+\use_esint 0
+\use_mhchem 1
+\use_mathdots 1
+\cite_engine basic
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\use_refstyle 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\leftmargin 1in
+\topmargin 1in
+\rightmargin 1in
+\bottommargin 2in
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\quotes_language english
+\papercolumns 1
+\papersides 2
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\end_header
+
+\begin_body
+
+\begin_layout Chapter
+\begin_inset CommandInset label
+LatexCommand label
+name "cha:Extending"
+
+\end_inset
+
+Extending PyLith
+\end_layout
+
+\begin_layout Standard
+One of the powerful features of using the Pyre framework in PyLith is the
+ ability to extend the functionality of the software without altering any
+ of the PyLith code.
+ Any of the components can be replaced with other compatible components.
+ You are already familiar with this feature from running the examples; when
+ you set the spatial database to UniformDB, SimpleDB, or SCECCVMH you are
+ switching between different compatible components for a spatial database
+ facility.
+ Modifying the governing equations to include other physical processes requires
+ changing the data structures associated with the solution and altering
+ the PyLith code.
+\end_layout
+
+\begin_layout Standard
+In this section we provide examples of how to extend PyLith for components
+ that users will most likely want to replace with their own custom versions.
+ You will need a familiarity with Python, Makefiles, and C++ to write your
+ own components.
+ The primary steps in constructing a component to extend PyLith's functionality
+ include:
+\end_layout
+
+\begin_layout Enumerate
+Setting up the source files for the component or set of components based
+ on the templates.
+\end_layout
+
+\begin_layout Enumerate
+Edit the Python source file (
+\family typewriter
+.py
+\family default
+) for the component.
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+Define the user-specified properties and facilities.
+\end_layout
+
+\begin_layout Enumerate
+Transfer the user-specified data from the Python object to the corresponding
+ C++ object via calls to the SWIG interface object.
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+Edit the C++ header (
+\family typewriter
+.hh
+\family default
+) and implementation files (
+\family typewriter
+.cc
+\family default
+) for the component.
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+Implement the methods required to satisfy the interface definition of the
+ component.
+\end_layout
+
+\begin_layout Enumerate
+Implement the desired functionality of the component in C++.
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+Edit the SWIG interface files (
+\family typewriter
+.i
+\family default
+) that provide the glue between Python and C++.
+\end_layout
+
+\begin_layout Enumerate
+Edit the Python source file that tests the functionality of the component.
+\end_layout
+
+\begin_layout Enumerate
+Run configure, build, install, and run the tests of the component.
+\end_layout
+
+\begin_layout Section
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Extending:SpatialDatabases"
+
+\end_inset
+
+Spatial Databases
+\end_layout
+
+\begin_layout Standard
+PyLith provides several types of spatial databases that can be used for
+ specification of parameters associated with boundary conditions, earthquake
+ ruptures, and physical properties.
+ In this example we demonstrate how to provide a spatial database, UniformVelMod
+el, for specifying elastic properties.
+ The source files are included in the source for the spatialdata package
+ in the 
+\family typewriter
+templates/spatialdb
+\family default
+ directory.
+ The 
+\family typewriter
+README
+\family default
+ file in 
+\family typewriter
+templates/spatialdb
+\family default
+ provides detailed instructions for the various steps involved, and the
+ source files contain numerous comments to help guide you through the customizat
+ion process.
+ 
+\end_layout
+
+\begin_layout Standard
+The UniformVelModel component provides uniform physical properties: P wave
+ speed, S wave speed, and density.
+ Although this is a rather trivial specification of physical properties
+ that could be easily done using a UniformDB, this example demonstrates
+ how to create a user-defined component that matches the requirements of
+ a spatial database for elastic physical properties.
+ Adding additional physical properties is simply a matter of including some
+ additional values in the spatial database.
+ Furthermore, in cases where we are constructing a spatial database for
+ a seismic velocity model, the data points are georeferenced.
+ With our uniform physical properties we do not need to worry about any
+ differences in coordinate systems between our seismic velocity model and
+ points at which the model is queried.
+ However, in many cases we do, so we illustrate this functionality by using
+ a geographic projection as the coordinate system in our example.
+\end_layout
+
+\begin_layout Standard
+Using a top-down approach, the first step is to determine what information
+ the user will need to supply to the component.
+ Is the data for the spatial database in a file or a series of files? If
+ so, file names and possible paths to a directory containing files with
+ known names might be necessary.
+ Are there other parameters that control the behavior of the component,
+ such as a minimum shear wave speed? In our example the user supplies values
+ for the P wave speed, S wave speed, and density.
+ The user-supplied parameters become Pyre properties and facilities in the
+ Python source file.
+ Because our user supplied parameters are floating point values with dimensions,
+ we create dimensional properties 
+\family typewriter
+vs
+\family default
+, 
+\family typewriter
+vp
+\family default
+, and 
+\family typewriter
+density
+\family default
+.
+ In addition to defining the properties of the component, we also need to
+ transfer these properties to the C++ object that does the real work.
+ This is done by calling the C++ 
+\family typewriter
+vs()
+\family default
+, 
+\family typewriter
+vp()
+\family default
+, and 
+\family typewriter
+density()
+\family default
+ accessor functions that are accessible via the Python module created by
+ SWIG.
+\end_layout
+
+\begin_layout Standard
+In the C++ object we must implement the functions that are required by the
+ spatial database interface.
+ These functions are listed near the beginning of the UniformVelModel class
+ definition at the top of the C++ header file, 
+\family typewriter
+UniformVelModel.hh
+\family default
+.
+ The C++ object also includes the accessor functions that allow us to set
+ the P wave speed, S wave speed, and density values to the user-specified
+ values in the Python object.
+ Additional information, such as a file name, parameters defined as data
+ structures, etc., would be set via similar accessor functions.
+ You can also add additional functions and data structures to the C++ class
+ to provide the necessary operations and functionality of the spatial database.
+ 
+\end_layout
+
+\begin_layout Standard
+In SimpleDB we use a separate class to read in the spatial database and
+ yet another class to perform the actual query.
+ In our example, the C++ object also creates and stores the UTM zone 10
+ geographic projection for the seismic velocity model.
+ When the spatial database gets a query for physical properties, we transform
+ the coordinates of the query point from its coordinate system to the coordinate
+ system of our seismic velocity model.
+\end_layout
+
+\begin_layout Standard
+In order to use SWIG to create the Python module that allows us to call
+ C++ from Python, we use a ``main'' SWIG interface file (
+\family typewriter
+\size small
+spatialdbcontrib.i
+\family default
+\size default
+ in this case) and then one for each object (
+\family typewriter
+\size small
+UniformVelModel.i
+\family default
+\size default
+ in this case).
+ This greatly simplifies keeping the Python module synchronized with the
+ C++ and Python code.
+ The 
+\family typewriter
+\size small
+UniformVelModel.i
+\family default
+\size default
+ SWIG file is nearly identical to the corresponding C++ header file.
+ There are a few differences, as noted in the comments within the file.
+ Copying and pasting the C++ header file and then doing a little cleanup
+ is a very quick and easy way to construct a SWIG interface file for a C++
+ object.
+ Because very little changes from SWIG module to SWIG module, it is usually
+ easiest to construct the ``main'' SWIG interface by copying and customizing
+ an existing one.
+\end_layout
+
+\begin_layout Standard
+Once the Python, C++, and SWIG interface files are complete, we are ready
+ to build the module.
+ The 
+\family typewriter
+Makefile.am
+\family default
+ file defines how to compile and link the C++ library and generate the Python
+ module via SWIG.
+ The 
+\family typewriter
+configure.ac
+\family default
+ file contains the information used to build a configure script.
+ The configure script checks to make sure it can find all of the tools needed
+ to build the component (C++ compiler, Python, installed spatial database
+ package, etc.).
+ See the README file for detailed instructions on how to generate the configure
+ script, and build and install the component.
+\end_layout
+
+\begin_layout Standard
+We recommend constructing tests of the component to insure that it is functionin
+g properly before attempting to use it in an application.
+ The 
+\family typewriter
+\size small
+tests
+\family default
+\size default
+ directory within 
+\family typewriter
+\size small
+templates/spatialdb
+\family default
+\size default
+ contains a Python script, 
+\family typewriter
+\size small
+testcontrib.py
+\family default
+\size default
+, that runs the tests of the UniformVelModel component defined in 
+\family typewriter
+\size small
+TestUniformVelModel.py
+\family default
+\size default
+.
+ Normally, one would want to test each function individually to isolate
+ errors and create C++ tests as well as the Python tests included here.
+ In our rather simple example, we simply test the overall functionality
+ of the component.
+ For examples of thorough testing, see the spatialdata and PyLith source
+ code.
+\end_layout
+
+\begin_layout Standard
+Once you have built, installed, and tested the UniformVelModel, it is time
+ to use it in a simple example.
+ Because the seismic velocity model uses georeferenced coordinates, our
+ example must also use georeferenced coordinates.
+ The dislocation example in the PyLith 
+\family typewriter
+examples/twocells/twotet4-geopro
+\family default
+j directory uses UTM zone 11 coordinates.
+ The spatial database package will transform the coordinates between the
+ two projections as defined in the UniformVelModel 
+\family typewriter
+query()
+\family default
+ function.
+ The dislocation example uses the SCEC CVM-H seismic velocity model.
+ In order to replace the SCEC CVM-H seismic velocity with our uniform velocity
+ model, in 
+\family typewriter
+pylithapp.cfg
+\family default
+ we replace the lines
+\end_layout
+
+\begin_layout LyX-Code
+db_properties = spatialdata.spatialdb.SCECCVMH
+\end_layout
+
+\begin_layout LyX-Code
+db_properties.data_dir = /home/brad/data/sceccvm-h/vx53/bin
+\end_layout
+
+\begin_layout Standard
+with the lines
+\end_layout
+
+\begin_layout LyX-Code
+db_properties = spatialdata.spatialdb.contrib.UniformVelModel
+\end_layout
+
+\begin_layout Standard
+When you run the dislocation example, the 
+\family typewriter
+dislocation-statevars_info.vtk
+\family default
+ file should reflect the use of physical properties from the uniform seismic
+ velocity with 
+\begin_inset Formula $\mu=1.69\times10^{10}\mathrm{Pa}$
+\end_inset
+
+, 
+\begin_inset Formula $\lambda=1.6825\times10^{10}\mathrm{Pa}$
+\end_inset
+
+, and 
+\begin_inset Formula $\rho=2500\mathrm{kg/m^{3}}$
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Section
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Extending:BulkConstitutiveModels"
+
+\end_inset
+
+Bulk Constitutive Models
+\end_layout
+
+\begin_layout Standard
+PyLith includes several linearly elastic and inelastic bulk constitutive
+ models for 2D and 3D problems.
+ In this example, we demonstrate how to extend PyLith by adding your own
+ bulk constitutive model.
+ We reimplement the 2D plane strain constitutive model while adding the
+ current strain and stress tensors as state variables.
+ This constitutive model, 
+\family typewriter
+PlaneStrainState
+\family default
+, is not particularly useful, but it illustrates the basic steps involved
+ in creating a bulk constitutive model with state variables.
+ The sources files are included with the main PyLith source code in the
+ 
+\family typewriter
+templates/materials
+\family default
+ directory.
+ The 
+\family typewriter
+README
+\family default
+ file in 
+\family typewriter
+templates/materials
+\family default
+ provides detailed instructions for the various steps, and the source files
+ contain numerous comments to guide you through the customization process.
+\end_layout
+
+\begin_layout Standard
+In contrast to our previous example of creating a customized spatial database,
+ which involved gathering user-specified parameters via the Pyre framework,
+ there are no user-defined parameters for bulk constitutive models.
+ The specification of the physical properties and state variables associated
+ with the constitutive model is handled directly in the C++ code.
+ As a result, the Python object for the constitutive model component is
+ very simple and customization is limited to simply changing the names of
+ objects and labels.
+\end_layout
+
+\begin_layout Standard
+The properties and state variables used in the bulk constitutive model are
+ set using arguments to the constructor of the C++ 
+\family typewriter
+ElasticMaterial
+\family default
+ object.
+ We define a number of constants at the top of the C++ file and use the
+ 
+\family typewriter
+Metadata
+\family default
+ object to define the properties and state variables.
+ The C++ object for the bulk constitutive component includes a number of
+ functions that implement elasticity behavior of a bulk material as well
+ as several utility routines:
+\end_layout
+
+\begin_layout Description
+
+\family typewriter
+_dbToProperties()
+\family default
+ Computes the physical properties used in the constitutive model equations
+ from the physical properties supplied in spatial databases.
+\end_layout
+
+\begin_layout Description
+
+\family typewriter
+_nondimProperties()
+\family default
+ Nondimensionalizes the physical properties used in the constitutive model
+ equations.
+\end_layout
+
+\begin_layout Description
+
+\family typewriter
+_dimProperties()
+\family default
+ Dimensionalizes the physical properties used in the constitutive model
+ equations.
+\end_layout
+
+\begin_layout Description
+
+\family typewriter
+_stableTimeStepImplicit()
+\family default
+ Computes the stable time step for implicit time stepping in quasi-static
+ simulations given the current state (strain, stress, and state variables).
+\end_layout
+
+\begin_layout Description
+
+\family typewriter
+_calcDensity()
+\family default
+ Computes the density given the physical properties and state variables.
+ In most cases density is a physical property used in the constitutive equations
+, so this is a trivial function in those cases.
+\end_layout
+
+\begin_layout Description
+
+\family typewriter
+_calcStress()
+\family default
+ Computes the stress tensor given the physical properties, state variables,
+ total strain, initial stress, and initial strain.
+\end_layout
+
+\begin_layout Description
+
+\family typewriter
+_calcElasticConsts()
+\family default
+ Computes the elastic constants given the physical properties, state variables,
+ total strain, initial stress, and initial strain.
+\end_layout
+
+\begin_layout Description
+
+\family typewriter
+_updateStateVars()
+\family default
+ Updates the state variables given the physical properties, total strain,
+ initial stress, and initial strain.
+ If a constitutive model does not use state variables, then this routine
+ is omitted.
+\end_layout
+
+\begin_layout Standard
+Because it is sometimes convenient to supply physical properties for a bulk
+ constitutive model that are equivalent but different from the ones that
+ appear in the constitutive equations (e.g., P wave speed, S wave speed, and
+ density rather then Lame's constants 
+\begin_inset Formula $\mu,$
+\end_inset
+
+
+\begin_inset Formula $\lambda,$
+\end_inset
+
+ and density), each bulk constitutive model component has routines to convert
+ the physical property parameters and state variables a user specifies via
+ spatial databases to the physical property properties and state variables
+ used in the constitutive model equations.
+ In quasi-static problems, PyLith computes an elastic solution for the first
+ time step (
+\begin_inset Formula $-\Delta t$
+\end_inset
+
+ to 
+\begin_inset Formula $t$
+\end_inset
+
+).
+ This means that for inelastic materials, we supply two sets of functions
+ for the constitutive behavior: one set for the initial elastic step and
+ one set for the remainder of the simulation.
+ See the source code for the inelastic materials in PyLith for an illustration
+ of an efficient mechanism for doing this.
+\end_layout
+
+\begin_layout Standard
+The SWIG interface files for a bulk constitutive component are setup in
+ the same manner as in the previous example of creating a customized spatial
+ database component.
+ The ``main'' SWIG interface file (
+\family typewriter
+materialscontrib.i
+\family default
+ in this case) sets up the Python module, and the SWIG interface file for
+ the component (
+\family typewriter
+PlaneStrainState.i
+\family default
+ in this case) defines the functions that should be included in the Python
+ module.
+ Note that because the C++ 
+\family typewriter
+ElasticMaterial
+\family default
+ object defines a number of pure virtual methods (which merely specify the
+ interface for the functions and do not implement default behavior), we
+ must include many protected functions in the SWIG interface file.
+ If these are omitted, SWIG will give a warning indicating that some of
+ the functions remain abstract (i.e., some pure virtual functions defined
+ in the parent class 
+\family typewriter
+ElasticMaterial
+\family default
+ were not implemented in the child class 
+\family typewriter
+PlaneStrainState
+\family default
+), and no constructor is created.
+ When this happens, you cannot create a 
+\family typewriter
+PlaneStrainState
+\family default
+ Python object.
+\end_layout
+
+\begin_layout Standard
+Once the Python, C++, and SWIG interface files are complete, you are ready
+ to configure and build the C++ library and Python module for the component.
+ Edit the 
+\family typewriter
+Makefile.am
+\family default
+ file as necessary, then generate the configure script, run configure, and
+ then build and install the library and module (see the 
+\family typewriter
+README
+\family default
+ file for detailed instructions).
+\end_layout
+
+\begin_layout Standard
+Because most functionality of the bulk constitutive model component is at
+ the C++ level, properly constructed unit tests for the 
+\family typewriter
+component
+\family default
+ should include tests for both the C++ code and Python code.
+ The C++ unit tests can be quite complex, and it is best to examine those
+ used for the bulk constitutive models included with PyLith.
+ In this example we create the Python unit tests to verify that we can create
+ a 
+\family typewriter
+PlaneStrainState
+\family default
+ Python object and call some of the simple underlying C++ functions.
+ The source files are in the 
+\family typewriter
+templates/materials/tests
+\family default
+ directory.
+ The 
+\family typewriter
+testcontrib.py
+\family default
+ Python script runs the tests defined in 
+\family typewriter
+TestPlaneStrainState.py
+\family default
+.
+\end_layout
+
+\begin_layout Standard
+Once you have built, installed, and tested the 
+\family typewriter
+PlaneStrainState
+\family default
+ component, it is time to use it in a simple example.
+ You can try using it in any of the 2D examples.
+ For the examples in 
+\family typewriter
+examples/twocells/twoquad4
+\family default
+, in 
+\family typewriter
+pylithapp.cfg
+\family default
+ replace the line
+\end_layout
+
+\begin_layout LyX-Code
+material = pylith.materials.ElasticPlaneStrain
+\end_layout
+
+\begin_layout Standard
+with the line
+\end_layout
+
+\begin_layout LyX-Code
+material = pylith.materials.contrib.PlaneStrainState
+\end_layout
+
+\begin_layout Standard
+or simply add the command line argument
+\end_layout
+
+\begin_layout LyX-Code
+
+\family typewriter
+--timedependent.homogeneous.material=pylith.materials.contrib.PlaneStrainState
+\end_layout
+
+\begin_layout Standard
+when running any of the 2D examples.
+ The output should remain identical, but you should see the 
+\family typewriter
+PlaneStrainState
+\family default
+ object listed in the information written to 
+\family typewriter
+stdout
+\family default
+.
+\end_layout
+
+\begin_layout Section
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Extending:FaultConstitutiveModels"
+
+\end_inset
+
+Fault Constitutive Models
+\end_layout
+
+\begin_layout Standard
+PyLith includes two of the most widely used fault constitutive models, but
+ there are a wide range of models that have been proposed to explain earthquake
+ source processes.
+ In this example, we demonstrate how to extend PyLith by adding your own
+ fault constitutive model.
+ We implement a linear viscous fault constitutive model wherein the perturbation
+ in the coefficient of friction is linearly proportional to the slip rate.
+ This constitutive model, 
+\family typewriter
+ViscousFriction
+\family default
+, is not particularly useful, but it illustrates the basic steps involved
+ in creating a fault constitutive model.
+ The sources files are included with the main PyLith source code in the
+ 
+\family typewriter
+templates/friction
+\family default
+ directory.
+ The 
+\family typewriter
+README
+\family default
+ file in 
+\family typewriter
+templates/friction
+\family default
+ provides detailed instructions for the various steps, and the source files
+ contain numerous comments to guide you through the customization process.
+\end_layout
+
+\begin_layout Standard
+Similar to our previous example of creating a customized bulk constitutive
+ model, the parameters are defined in the C++ code, not in the Pyre framework.
+ As a result, the Python object for the fault constitutive model component
+ is very simple and customization is limited to simply changing the names
+ of objects and labels.
+\end_layout
+
+\begin_layout Standard
+The properties and state variables used in the fault constitutive model
+ are set using arguments to the constructor of the C++ 
+\family typewriter
+FrictionModel
+\family default
+ object, analogous to the 
+\family typewriter
+ElasticMaterial
+\family default
+ object for bulk constitutive models.
+ In fact, both types of constitutive models used the same underlying C++
+ object (
+\family typewriter
+Metadata::ParamDescription
+\family default
+) to store the description of the parameters and state variables.
+ We define a number of constants at the top of the C++ file and use the
+ 
+\family typewriter
+Metadata
+\family default
+ object to define the properties and state variables.
+ The C++ object for the fault constitutive component includes a number of
+ functions that implement friction as well as several utility routines:
+\end_layout
+
+\begin_layout Description
+
+\family typewriter
+_dbToProperties()
+\family default
+ Computes the physical properties used in the constitutive model equations
+ from the physical properties supplied in spatial databases.
+\end_layout
+
+\begin_layout Description
+
+\family typewriter
+_nondimProperties()
+\family default
+ Nondimensionalizes the physical properties used in the constitutive model
+ equations.
+\end_layout
+
+\begin_layout Description
+
+\family typewriter
+_dimProperties()
+\family default
+ Dimensionalizes the physical properties used in the constitutive model
+ equations.
+\end_layout
+
+\begin_layout Description
+
+\family typewriter
+_dbToStateVars()
+\family default
+ Computes the initial state variables used in the constitutive model equations
+ from the initial values supplied in spatial databases.
+\end_layout
+
+\begin_layout Description
+
+\family typewriter
+_nondimStateVars()
+\family default
+ Nondimensionalizes the state variables used in the constitutive model equations.
+\end_layout
+
+\begin_layout Description
+
+\family typewriter
+_dimStateVars()
+\family default
+ Dimensionalizes the state variables used in the constitutive model equations.
+\end_layout
+
+\begin_layout Description
+
+\family typewriter
+_calcFriction()
+\family default
+ Computes the friction stress given the physical properties, state variables,
+ slip, slip rate, and normal traction.
+\end_layout
+
+\begin_layout Description
+
+\family typewriter
+_updateStateVars()
+\family default
+ Updates the state variables given the physical properties, slip, slip rate,
+ and normal traction.
+\end_layout
+
+\begin_layout Standard
+If a constitutive model does not use state variables, then the state variable
+ routines are omitted.
+ 
+\end_layout
+
+\begin_layout Standard
+Because it is sometimes convenient to supply physical properties for a fault
+ constitutive model that are equivalent but different from the ones that
+ appear in the constitutive equations, each fault constitutive model component
+ has routines to convert the physical property parameters and state variables
+ a user specifies via spatial databases to the physical property properties
+ and state variables used in the constitutive model equations.
+ 
+\end_layout
+
+\begin_layout Standard
+The SWIG interface files for a fault constitutive component are setup in
+ the same manner as in the previous examples of creating a bulk constitutive
+ model or a customized spatial database component.
+ The ``main'' SWIG interface file (
+\family typewriter
+frictioncontrib.i
+\family default
+ in this case) sets up the Python module, and the SWIG interface file for
+ the component (
+\family typewriter
+ViscousFriction.i
+\family default
+ in this case) defines the functions that should be included in the Python
+ module.
+ Note that because the C++ 
+\family typewriter
+FrictionModel
+\family default
+ object defines a number of pure virtual methods (which merely specify the
+ interface for the functions and do not implement default behavior), we
+ must include many protected functions in the SWIG interface file.
+ If these are omitted, SWIG will give a warning indicating that some of
+ the functions remain abstract (i.e., some pure virtual functions defined
+ in the parent class 
+\family typewriter
+FrictionModel
+\family default
+ were not implemented in the child class 
+\family typewriter
+ViscousFriction
+\family default
+), and no constructor is created.
+ When this happens, you cannot create a 
+\family typewriter
+ViscousFriction
+\family default
+ Python object.
+\end_layout
+
+\begin_layout Standard
+Once the Python, C++, and SWIG interface files are complete, you are ready
+ to configure and build the C++ library and Python module for the component.
+ Edit the 
+\family typewriter
+Makefile.am
+\family default
+ file as necessary, then generate the configure script, run configure, and
+ then build and install the library and module (see the 
+\family typewriter
+README
+\family default
+ file for detailed instructions).
+\end_layout
+
+\begin_layout Standard
+Because most functionality of the fault constitutive model component is
+ at the C++ level, properly constructed unit tests for the 
+\family typewriter
+component
+\family default
+ should include tests for both the C++ code and Python code.
+ The C++ unit tests can be quite complex, and it is best to examine those
+ used for the fault constitutive models included with PyLith.
+ In this example we create the Python unit tests to verify that we can create
+ a 
+\family typewriter
+ViscousFriction
+\family default
+ Python object and call some of the simple underlying C++ functions.
+ The source files are in the 
+\family typewriter
+templates/friction/tests
+\family default
+ directory.
+ The 
+\family typewriter
+testcontrib.py
+\family default
+ Python script runs the tests defined in 
+\family typewriter
+TestViscousFriction.py
+\family default
+.
+\end_layout
+
+\begin_layout Standard
+Once you have built, installed, and tested the 
+\family typewriter
+ViscousFriction
+\family default
+ component, it is time to use it in a simple example.
+ You can try using it in any of the 2D or 3D examples.
+ For the examples in 
+\family typewriter
+examples/bar_shearwave/quad4, in shearwave_staticfriction.cfg
+\family default
+ replace the line
+\end_layout
+
+\begin_layout LyX-Code
+friction = pylith.friction.StaticFriction
+\end_layout
+
+\begin_layout Standard
+with the line
+\end_layout
+
+\begin_layout LyX-Code
+friction = pylith.friction.contrib.ViscousFriction
+\end_layout
+
+\begin_layout Standard
+or simply add the command line argument
+\end_layout
+
+\begin_layout LyX-Code
+
+\family typewriter
+--timedependent.interfaces.fault.friction=pylith.friction.contrib.ViscousFriction
+\end_layout
+
+\begin_layout Standard
+when running any of the friction examples.
+ You will also need to supply a corresponding spatial database with the
+ physical properties for the viscous friction constitutive model.
+\end_layout
+
+\end_body
+\end_document

Modified: short/3D/PyLith/trunk/doc/userguide/fileformats/fileformats.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/fileformats/fileformats.lyx	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/doc/userguide/fileformats/fileformats.lyx	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,5 +1,5 @@
-#LyX 1.6.2 created this file. For more info see http://www.lyx.org/
-\lyxformat 345
+#LyX 2.0 created this file. For more info see http://www.lyx.org/
+\lyxformat 413
 \begin_document
 \begin_header
 \textclass book
@@ -7,18 +7,26 @@
 
 \end_preamble
 \use_default_options false
+\maintain_unincluded_children false
 \language english
+\language_package default
 \inputencoding latin1
+\fontencoding global
 \font_roman default
 \font_sans default
 \font_typewriter default
 \font_default_family default
+\use_non_tex_fonts false
 \font_sc false
 \font_osf false
 \font_sf_scale 100
 \font_tt_scale 100
 
 \graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
 \paperfontsize default
 \spacing single
 \use_hyperref false
@@ -26,9 +34,18 @@
 \use_geometry true
 \use_amsmath 1
 \use_esint 0
+\use_mhchem 1
+\use_mathdots 1
 \cite_engine basic
 \use_bibtopic false
+\use_indices false
 \paperorientation portrait
+\suppress_date false
+\use_refstyle 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
 \leftmargin 1in
 \topmargin 1in
 \rightmargin 1in
@@ -36,15 +53,16 @@
 \secnumdepth 3
 \tocdepth 3
 \paragraph_separation indent
-\defskip medskip
+\paragraph_indentation default
 \quotes_language english
 \papercolumns 1
 \papersides 2
 \paperpagestyle default
 \tracking_changes false
 \output_changes false
-\author "" 
-\author "" 
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
 \end_header
 
 \begin_body
@@ -1581,5 +1599,96 @@
 
 \end_layout
 
+\begin_layout Section
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:FileFormat:PointsList"
+
+\end_inset
+
+Points List File
+\end_layout
+
+\begin_layout Standard
+This file lists the coordinates of the locations where output is requested
+ for the 
+\family typewriter
+OutputSolnPoints
+\family default
+ component.
+ The coordinate system is specified in the 
+\family typewriter
+OutputSolnPoints
+\family default
+ component.
+ 
+\end_layout
+
+\begin_layout LyX-Code
+# This time step file specifies five time steps with the units in years.
+\end_layout
+
+\begin_layout LyX-Code
+#
+\end_layout
+
+\begin_layout LyX-Code
+# Comments are limited to complete lines.
+ The default delimiter for comments
+\end_layout
+
+\begin_layout LyX-Code
+# is '#', which can be changed via parameters.
+ Additionally, the delimiter 
+\end_layout
+
+\begin_layout LyX-Code
+# separating values can also be customized (default is whitespace).
+\end_layout
+
+\begin_layout LyX-Code
+1.0  -2.0   0.0
+\end_layout
+
+\begin_layout LyX-Code
+2.0  -4.0  -0.1
+\end_layout
+
+\begin_layout LyX-Code
+0.0  +2.0   0.0
+\end_layout
+
+\begin_layout LyX-Code
+2.5  -0.2  -0.2 
+\end_layout
+
+\begin_layout LyX-Code
+0.0   2.0  +0.2
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Format of files with coordinates of points for output.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
 \end_body
 \end_document

Modified: short/3D/PyLith/trunk/doc/userguide/install/install.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/install/install.lyx	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/doc/userguide/install/install.lyx	2012-06-25 17:37:03 UTC (rev 20406)
@@ -190,8 +190,8 @@
 \end_layout
 
 \begin_layout Standard
-Binary executables are available for Linux, Mac OS X (Intel 10.4/10.5 and
- Intel 10.6), and Windows from the PyLith web page 
+Binary executables are available for Linux, Mac OS X (Intel 10.5 and Intel
+ 10.6/10.7), and Windows from the PyLith web page 
 \begin_inset Flex URL
 status collapsed
 
@@ -253,7 +253,7 @@
 
 \begin_deeper
 \begin_layout LyX-Code
-$ tar -xzf pylith-1.6.1-linux-i686.tgz
+$ tar -xzf pylith-1.7.1-linux-i686.tgz
 \end_layout
 
 \end_deeper
@@ -323,12 +323,12 @@
 
 \begin_layout Enumerate
 Unpack the tarball.
- For 10.4.x or 10.5.x operating system,
+ For the 10.5.x operating system
 \end_layout
 
 \begin_deeper
 \begin_layout LyX-Code
-$ tar -xzf pylith-1.6.1-darwin-10.4.tgz
+$ tar -xzf pylith-1.7.1-darwin-10.5.tgz
 \end_layout
 
 \end_deeper
@@ -453,7 +453,7 @@
 pylith
 \family default
  command automatically submits jobs to the batch queue.
- Pyre contains support for the LSF, PBS, and Globus batch systems.
+ Pyre contains support for the LSF, PBS, SGE, and Globus batch systems.
 \end_layout
 
 \begin_layout Standard

Modified: short/3D/PyLith/trunk/doc/userguide/intro/intro.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/intro/intro.lyx	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/doc/userguide/intro/intro.lyx	2012-06-25 17:37:03 UTC (rev 20406)
@@ -127,21 +127,23 @@
  The elements currently available include a linear bar in 1-D, linear triangles
  and quadrilaterals in 2-D, and linear tetrahedra and hexahedra in 3-D.
  Materials presently available include isotropic elastic, linear Maxwell
- viscoelastic (2-D and 3-D), generalized Maxwell viscoelastic (2-D and 3-D),
- power-law viscoelastic (3-D only), and Drucker-Prager elastoplastic (3-D
- only).
+ viscoelastic, generalized Maxwell viscoelastic, power-law viscoelastic,
+ and Drucker-Prager elastoplastic.
  Boundary conditions include Dirichlet (prescribed displacements and velocities)
 , Neumann (traction), point forces, and absorbing boundaries.
  Cohesive elements are used to implement slip across interior surfaces (faults)
  with both kinematically-specified fault slip and slip governed by fault
  constitutive models.
+ PyLith also includes an interface for computing static Green's functions
+ for fault slip.
 \end_layout
 
 \begin_layout Standard
 PyLith is under active development and we expect a number of additions and
  improvements in the near future.
  Likely enhancements will include additional bulk and fault constitutive
- models and generation of Green's functions to be used in inversions.
+ models, coupled quasi-static and dynamic simulations for earthquake cycle
+ modeling, and coupling between elasticity, heat flow, and/or fluid flow.
 \end_layout
 
 \begin_layout Section

Modified: short/3D/PyLith/trunk/doc/userguide/license.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/license.lyx	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/doc/userguide/license.lyx	2012-06-25 17:37:03 UTC (rev 20406)
@@ -72,7 +72,7 @@
 \end_layout
 
 \begin_layout Standard
-Copyright (C) 2010-2011 University of California, Davis
+Copyright (C) 2010-2012 University of California, Davis
 \end_layout
 
 \begin_layout Standard

Modified: short/3D/PyLith/trunk/doc/userguide/materials/materials.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/materials/materials.lyx	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/doc/userguide/materials/materials.lyx	2012-06-25 17:37:03 UTC (rev 20406)
@@ -199,6 +199,12 @@
 \end_layout
 
 \begin_layout Subsection
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:material:parameters"
+
+\end_inset
+
 Material Parameters
 \end_layout
 
@@ -874,7 +880,7 @@
 
 
 \begin_inset Tabular
-<lyxtabular version="3" rows="3" columns="4">
+<lyxtabular version="3" rows="5" columns="4">
 <features tabularvalignment="middle">
 <column alignment="center" valignment="top" width="1.25in">
 <column alignment="center" valignment="top" width="0.5in">
@@ -931,7 +937,7 @@
 \begin_inset Text
 
 \begin_layout Plain Layout
-total_strain, viscous_strain
+total_strain
 \end_layout
 
 \end_inset
@@ -1002,7 +1008,7 @@
 </cell>
 </row>
 <row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -1011,7 +1017,7 @@
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -1023,7 +1029,7 @@
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -1043,7 +1049,7 @@
 
 \end_inset
 </cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -1076,6 +1082,138 @@
 \end_inset
 </cell>
 </row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+viscous_strain, plastic_strain
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset Formula $\epsilon_{xx}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset Formula $\epsilon_{xx}$
+\end_inset
+
+, 
+\begin_inset Formula $\epsilon_{yy}$
+\end_inset
+
+, 
+\begin_inset Formula $\epsilon_{zz}$
+\end_inset
+
+, 
+\begin_inset Formula $\epsilon_{xy}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset Formula $\epsilon_{xx}$
+\end_inset
+
+, 
+\begin_inset Formula $\epsilon_{yy}$
+\end_inset
+
+, 
+\begin_inset Formula $\epsilon_{zz}$
+\end_inset
+
+, 
+\begin_inset Formula $\epsilon_{xy}$
+\end_inset
+
+, 
+\begin_inset Formula $\epsilon_{yz}$
+\end_inset
+
+, 
+\begin_inset Formula $\epsilon_{xz}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+stress4
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset Formula $\sigma_{xx}$
+\end_inset
+
+, 
+\begin_inset Formula $\sigma_{yy}$
+\end_inset
+
+, 
+\begin_inset Formula $\sigma_{zz}$
+\end_inset
+
+, 
+\begin_inset Formula $\sigma_{xy}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
 </lyxtabular>
 
 \end_inset
@@ -1086,8 +1224,234 @@
 \end_inset
 
 
+\begin_inset Float table
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Caption
+
+\begin_layout Plain Layout
+\begin_inset CommandInset label
+LatexCommand label
+name "tab:material:output:components"
+
+\end_inset
+
+Order of components in tensor values in Xdmf files for 3-D material models.
+ All nine tensor components are available even though the tensor is symmetric
+ with six independent components.
 \end_layout
 
+\end_inset
+
+
+\begin_inset Tabular
+<lyxtabular version="3" rows="7" columns="2">
+<features tabularvalignment="middle">
+<column alignment="center" valignment="top" width="1.25in">
+<column alignment="center" valignment="top" width="2.25in">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Index
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Component
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+0
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset Formula $\epsilon_{xx}$
+\end_inset
+
+, 
+\begin_inset Formula $\sigma_{xx}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+1, 3
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset Formula $\epsilon_{xy}$
+\end_inset
+
+, 
+\begin_inset Formula $\sigma_{xy}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+2, 6
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset Formula $\epsilon_{xz}$
+\end_inset
+
+, 
+\begin_inset Formula $\sigma_{xz}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+4
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset Formula $\epsilon_{yy}$
+\end_inset
+
+, 
+\begin_inset Formula $\sigma_{yy}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+5, 7
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset Formula $\epsilon_{yz}$
+\end_inset
+
+, 
+\begin_inset Formula $\sigma_{yz}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+8
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset Formula $\epsilon_{zz}$
+\end_inset
+
+, 
+\begin_inset Formula $\sigma_{zz}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
 \begin_layout Section
 Elastic Material Models
 \end_layout
@@ -1209,7 +1573,7 @@
 <column alignment="center" valignment="middle" width="0.85in">
 <column alignment="center" valignment="middle" width="2.47in">
 <row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -1234,7 +1598,7 @@
 </cell>
 </row>
 <row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -1259,7 +1623,7 @@
 </cell>
 </row>
 <row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -1284,7 +1648,7 @@
 </cell>
 </row>
 <row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -1575,7 +1939,7 @@
 \end_layout
 
 \begin_layout Standard
-At present, there are five viscoelastic material models available in PyLith
+At present, there are six viscoelastic material models available in PyLith
  (Table 
 \begin_inset CommandInset ref
 LatexCommand ref
@@ -1618,9 +1982,30 @@
 \begin_inset Formula $\sigma_{33}^{I}$
 \end_inset
 
- is provided.
+ is provided (
+\family typewriter
+stress_zz_initial
+\family default
+).
  Note that this is not an issue for the 2D elastic models, since this initial
  stress component is not needed.
+ For the PowerLawPlaneStrain model, all four of the stress components are
+ needed, so a 4-component stress state variable (
+\family typewriter
+stress4
+\family default
+) is provided in addition to the normal 3-component 
+\family typewriter
+stress
+\family default
+ state variable (see Table 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "tab:material-model-output"
+
+\end_inset
+
+).
 \end_layout
 
 \begin_layout Standard
@@ -1651,12 +2036,12 @@
 
 
 \begin_inset Tabular
-<lyxtabular version="3" rows="6" columns="2">
+<lyxtabular version="3" rows="7" columns="2">
 <features tabularvalignment="middle">
 <column alignment="left" valignment="top" width="2.85in">
 <column alignment="center" valignment="top" width="2.47in">
 <row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -1680,7 +2065,7 @@
 </cell>
 </row>
 <row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -1700,7 +2085,7 @@
 </cell>
 </row>
 <row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -1720,10 +2105,30 @@
 </cell>
 </row>
 <row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+PowerLawPlaneStrain
+\end_layout
+
+\end_inset
+</cell>
 <cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
+Plane strain Maxwell material with power-law viscous rheology
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
 MaxwellIsotropic3D
 \end_layout
 
@@ -1740,7 +2145,7 @@
 </cell>
 </row>
 <row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -1760,7 +2165,7 @@
 </cell>
 </row>
 <row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -2671,7 +3076,7 @@
 <column alignment="center" valignment="middle" width="0.85in">
 <column alignment="center" valignment="middle" width="2.47in">
 <row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -2696,7 +3101,7 @@
 </cell>
 </row>
 <row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -2721,7 +3126,7 @@
 </cell>
 </row>
 <row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -2746,7 +3151,7 @@
 </cell>
 </row>
 <row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -2771,7 +3176,7 @@
 </cell>
 </row>
 <row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -2841,7 +3246,7 @@
 <column alignment="center" valignment="middle" width="0.85in">
 <column alignment="center" valignment="middle" width="2.47in">
 <row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -2866,7 +3271,7 @@
 </cell>
 </row>
 <row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -2891,7 +3296,7 @@
 </cell>
 </row>
 <row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -2916,7 +3321,7 @@
 </cell>
 </row>
 <row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -2941,7 +3346,7 @@
 </cell>
 </row>
 <row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -2966,7 +3371,7 @@
 </cell>
 </row>
 <row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -2991,7 +3396,7 @@
 </cell>
 </row>
 <row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -3016,7 +3421,7 @@
 </cell>
 </row>
 <row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -3041,7 +3446,7 @@
 </cell>
 </row>
 <row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -3066,7 +3471,7 @@
 </cell>
 </row>
 <row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -4139,7 +4544,7 @@
 <column alignment="center" valignment="middle" width="0.85in">
 <column alignment="center" valignment="middle" width="2.47in">
 <row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -4164,7 +4569,7 @@
 </cell>
 </row>
 <row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -4189,7 +4594,7 @@
 </cell>
 </row>
 <row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -4214,7 +4619,7 @@
 </cell>
 </row>
 <row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -4239,7 +4644,7 @@
 </cell>
 </row>
 <row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -4264,7 +4669,7 @@
 </cell>
 </row>
 <row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -4289,7 +4694,7 @@
 </cell>
 </row>
 <row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -4330,11 +4735,10 @@
 \end_layout
 
 \begin_layout Standard
-At present, there are two elastoplastic material models available in PyLith.
- Both materials make use of the Drucker-Prager yield criterion.
- The only difference is that one model includes hardening/softening, and
- the other is for the case of perfect plasticity.
- Additional elastoplastic materials will be available in future versions.
+PyLith presently contains just a single elastoplastic material that implements
+ the Drucker-Prager yield criterion.
+ Future releases of PyLith may contain additional elastoplastic materials,
+ such as Drucker-Prager with hardening/softening.
 \end_layout
 
 \begin_layout Subsection
@@ -4462,83 +4866,364 @@
 
 \end_inset
 
-where
+and a flow rule given by:
 \begin_inset Formula 
 \begin{equation}
-\alpha_{f}=\frac{2\sin\phi\left(k\right)}{\sqrt{3}\left(3-\sin\phi\left(k\right)\right)}\:,\label{eq:101}
+g\left(\underline{\sigma},k\right)=\sqrt{J_{2}^{\prime}}+\alpha_{g}I_{1}\:.\label{eq:101}
 \end{equation}
 
 \end_inset
 
-and
+
+\end_layout
+
+\begin_layout Standard
+The yield surface represents a circular cone in principal stress space,
+ and the parameters can be related to the friction angle, 
+\begin_inset Formula $\phi$
+\end_inset
+
+, and the cohesion, 
+\begin_inset Formula $\bar{c}$
+\end_inset
+
+, of the Mohr-Coulomb model.
+ The yield surface in Haigh-Westergaard space (
+\begin_inset Formula $\zeta=\frac{1}{\sqrt{3}}I_{1},p=\sqrt{2J_{2}},\cos(3\theta)=\frac{3\sqrt{3}}{2}\frac{J_{3}}{J_{2}^{3/2}}$
+\end_inset
+
+) is
 \begin_inset Formula 
 \begin{equation}
-\beta=\frac{6\bar{c}\left(k\right)\cos\phi_{0}}{\sqrt{3}\left(3-\sin\phi_{0}\right)}\:.\label{eq:102}
+\left(\sqrt{3}\sin\left(\theta+\frac{\pi}{3}\right)-\sin\phi\cos\left(\theta+\frac{\pi}{3}\right)\right)p-\sqrt{2}\sin\phi\zeta=\sqrt{6}\overline{c}\cos\theta.\label{eq:drucker:prager:haigh:westergaard}
 \end{equation}
 
 \end_inset
 
-The friction angle, 
-\begin_inset Formula $\phi$
+The yield surface can be fit to the Mohr-Coulomb model in several different
+ ways.
+ The yield surface can touch the outer apices (
+\begin_inset Formula $\theta=\pi/3$
 \end_inset
 
-, and the cohesion, 
-\begin_inset Formula $\bar{c}$
+) of the Mohr-Coulomb model (inscribed version), the inner apices (
+\begin_inset Formula $\theta=0$
 \end_inset
 
-, may both be functions of the internal state parameter, and they correspond
- to the values used in the Mohr-Coulomb model.
- The initial friction angle is given by 
-\begin_inset Formula $\phi_{0}$
+) of the Mohr-Coulomb model (circumscribed version), or halfway between
+ the two (
+\begin_inset Formula $\theta=pi/6,$
 \end_inset
 
-.
- The yield surface defined by Equations 
+middle version).
+ Substituting these values for 
+\begin_inset Formula $\theta$
+\end_inset
+
+ into equation (
 \begin_inset CommandInset ref
 LatexCommand ref
-reference "eq:100"
+reference "eq:drucker:prager:haigh:westergaard"
 
 \end_inset
 
-, 
+) and casting it into the same form as equation (
 \begin_inset CommandInset ref
 LatexCommand ref
 reference "eq:101"
 
 \end_inset
 
+) yields the values of 
+\begin_inset Formula $\alpha_{f}$
+\end_inset
+
+, 
+\begin_inset Formula $\beta$
+\end_inset
+
 , and 
+\begin_inset Formula $\alpha_{g}$
+\end_inset
+
+ given in Table 
 \begin_inset CommandInset ref
 LatexCommand ref
-reference "eq:102"
+reference "tab:fit_mohr_coulomb"
 
 \end_inset
 
- represents a circular cone in principal stress space that is coincident
- with the outer apices of the corresponding Mohr-Coulomb yield surface.
- The flow rule is given by:
-\begin_inset Formula 
-\begin{equation}
-g\left(\underline{\sigma},k\right)=\sqrt{J_{2}^{\prime}}+\alpha_{g}I_{1}\:,\label{eq:103}
-\end{equation}
+, where 
+\begin_inset Formula $\phi_{0}$
+\end_inset
 
+ refers to the initial friction angle.
+ Similarly, the flow rule can be related to the dilatation angle, 
+\begin_inset Formula $\psi$
 \end_inset
 
-where
-\begin_inset Formula 
-\begin{equation}
-\alpha_{g}=\frac{2\sin\psi(k)}{\sqrt{3}\left(3-\sin\psi\left(k\right)\right)}\:.\label{eq:104}
-\end{equation}
+, of a Mohr-Coulomb model.
+ It is also possible for the Mohr-Coulomb parameters to be functions of
+ the internal state parameter, 
+\begin_inset Formula $k$
+\end_inset
 
+.
+ In PyLith, the fit to the Mohr-Coulomb yield surface and flow rule is controlle
+d by the 
+\family typewriter
+fit_mohr_coulomb
+\family default
+ property.
+ 
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float table
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+\begin_inset CommandInset label
+LatexCommand label
+name "tab:fit_mohr_coulomb"
+
 \end_inset
 
-The dilatation angle, 
-\begin_inset Formula $\psi$
+Options for fitting the Drucker-Prager plastic parameters to a Mohr-Coulomb
+ model using 
+\family typewriter
+fit_mohr_coulomb
+\family default
+.
+\end_layout
+
 \end_inset
 
-, may also be a function of the internal state parameter.
+
 \end_layout
 
+\begin_layout Plain Layout
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="4" columns="4">
+<features tabularvalignment="middle">
+<column alignment="center" valignment="top" width="0">
+<column alignment="center" valignment="top" width="0">
+<column alignment="center" valignment="top" width="0">
+<column alignment="center" valignment="top" width="0">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Parameter Value
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset Formula $\alpha_{f}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset Formula $\beta$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset Formula $\alpha_{g}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+inscribed
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset Formula $\frac{2\sin\phi\left(k\right)}{\sqrt{3}\left(3-\sin\phi\left(k\right)\right)}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset Formula $\frac{6\bar{c}\left(k\right)\cos\phi_{0}}{\sqrt{3}\left(3-\sin\phi_{0}\right)}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset Formula $\frac{2\sin\psi(k)}{\sqrt{3}\left(3-\sin\psi\left(k\right)\right)}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+middle
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset Formula $\frac{\sin\phi\left(k\right)}{3}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset Formula $\bar{c}\left(k\right)\cos\left(\phi_{0}\right)$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset Formula $\frac{\sin\psi\left(k\right)}{3}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+circumscribed
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset Formula $\frac{2\sin\phi\left(k\right)}{\sqrt{3}\left(3+\sin\phi\left(k\right)\right)}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset Formula $\frac{6\bar{c}\left(k\right)\cos\phi_{0}}{\sqrt{3}\left(3+\sin\phi_{0}\right)}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset Formula $\frac{2\sin\psi(k)}{\sqrt{3}\left(3+\sin\psi\left(k\right)\right)}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
 \begin_layout Standard
 As for the viscoelastic models, it is convenient to separate the deformation
  into deviatoric and volumetric parts:
@@ -4629,7 +5314,7 @@
 
 \end_inset
 
- refer to 
+ refer respectively to 
 \begin_inset Formula $\phi$
 \end_inset
 
@@ -4641,41 +5326,39 @@
 \begin_inset Formula $\psi$
 \end_inset
 
- in Equations 
+ in Table 
 \begin_inset CommandInset ref
 LatexCommand ref
-reference "eq:101"
+reference "tab:fit_mohr_coulomb"
 
 \end_inset
 
-, 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "eq:102"
-
-\end_inset
-
-, and 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "eq:104"
-
-\end_inset
-
-, respectively.
+.
  These are then converted to the properties 
 \begin_inset Formula $\alpha_{f}$
 \end_inset
 
- (alpha-yield), 
+ (
+\family typewriter
+alpha-yield
+\family default
+), 
 \begin_inset Formula $\beta$
 \end_inset
 
- (beta), and 
+ (
+\family typewriter
+beta
+\family default
+), and 
 \begin_inset Formula $\alpha_{g}$
 \end_inset
 
- (alpha-flow), as shown in Table 
+ (
+\family typewriter
+alpha-flow
+\family default
+), as shown in Table 
 \begin_inset CommandInset ref
 LatexCommand ref
 reference "tab:material-model-output"
@@ -4746,7 +5429,7 @@
  as:
 \begin_inset Formula 
 \begin{equation}
-^{t+\Delta t}P=\frac{^{t+\Delta t}I_{1}}{3}=\frac{1}{a_{m}}\left(^{t+\Delta t}\theta^{\prime}-\lambda\alpha_{g}\right)\:.\label{eq:113}
+^{t+\Delta t}P=\frac{^{t+\Delta t}I_{1}}{3}=\frac{1}{a_{m}}\left(^{t+\Delta t}\theta^{\prime}-\lambda\alpha_{g}\right)+P^{I}\:.\label{eq:113}
 \end{equation}
 
 \end_inset
@@ -4840,6 +5523,54 @@
 \end_layout
 
 \begin_layout Standard
+In certain cases where the mean stress is tensile, it is possible that the
+ flow rule will not allow the stresses to project back to the yield surface,
+ since they would project beyond the tip of the cone.
+ Although this stress state is not likely to be encountered for quasi-static
+ tectonic problems, it can occur for dynamic problems.
+ One simple solution is to redefine the plastic multiplier, 
+\begin_inset Formula $\lambda$
+\end_inset
+
+.
+ We do this by taking the smaller of the values yielded by Equation 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "eq:114"
+
+\end_inset
+
+ or by the following relation:
+\begin_inset Formula 
+\begin{equation}
+\lambda=\sqrt{2}\,\phantom{}^{t+\Delta t}d\:.\label{eq:127}
+\end{equation}
+
+\end_inset
+
+This is equivalent to setting the second deviatoric stress invariant to
+ zero in Equation 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "eq:110"
+
+\end_inset
+
+.
+ By default, PyLith does not allow such tensile yield, since this would
+ generally represent an error in problem setup for tectonic problems; however,
+ for cases where such behavior is necessary, the material flag 
+\family typewriter
+allow_tensile_yield
+\family default
+ may be set to 
+\family typewriter
+True
+\family default
+.
+\end_layout
+
+\begin_layout Standard
 To compute the elastoplastic tangent matrix we begin by writing Equation
  
 \begin_inset CommandInset ref
@@ -5207,6 +5938,58 @@
 
 \end_layout
 
+\begin_layout Standard
+In addition to the properties available for every material, the properties
+ for the Drucker-Prager model also includes:
+\end_layout
+
+\begin_layout Description
+fit_mohr_coulomb Fit to the yield surface to the Mohr-Coulomb model (default
+ is a inscribed).
+\end_layout
+
+\begin_layout Description
+allow_tensile_yield If true, allow yield beyond tensile strength; otherwise
+ an error message will occur when the model fails beyond the tensile strength
+ (default is false).
+\end_layout
+
+\begin_layout Standard
+An example of setting these parameters in a 
+\family typewriter
+.cfg
+\family default
+ file is:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent]
+\end_layout
+
+\begin_layout LyX-Code
+materials = [plastic]
+\end_layout
+
+\begin_layout LyX-Code
+materials.plastic = pylith.materials.DruckerPrager3D
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.materials.plastic]
+\end_layout
+
+\begin_layout LyX-Code
+fit_mohr_coulomb = inscribed ; default
+\end_layout
+
+\begin_layout LyX-Code
+allow_tensile_yield = False ; default
+\end_layout
+
 \begin_layout Section
 Initial State Variables
 \end_layout
@@ -5310,7 +6093,7 @@
 <column alignment="center" valignment="middle" width="0.85in">
 <column alignment="center" valignment="middle" width="2.47in">
 <row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -5335,7 +6118,7 @@
 </cell>
 </row>
 <row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -5357,7 +6140,7 @@
 </cell>
 </row>
 <row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout

Modified: short/3D/PyLith/trunk/doc/userguide/preface.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/preface.lyx	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/doc/userguide/preface.lyx	2012-06-25 17:37:03 UTC (rev 20406)
@@ -190,14 +190,14 @@
  Strand, and C.
  Williams (2011), 
 \emph on
-PyLith User Manual, Version 1.6.1.
+PyLith User Manual, Version 1.7.1.
 
 \emph default
  Davis, CA: Computational Infrastructure of Geodynamics.
 \begin_inset Newline newline
 \end_inset
 
-URL: geodynamics.org/cig/software/pylith/pylith_manual-1.6.pdf
+URL: geodynamics.org/cig/software/pylith/pylith_manual-1.7.pdf
 \end_layout
 
 \begin_layout Section

Modified: short/3D/PyLith/trunk/doc/userguide/runpylith/runpylith.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/runpylith/runpylith.lyx	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/doc/userguide/runpylith/runpylith.lyx	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,5025 +1,5601 @@
-#LyX 2.0 created this file. For more info see http://www.lyx.org/
-\lyxformat 413
-\begin_document
-\begin_header
-\textclass book
-\begin_preamble
-
-\end_preamble
-\use_default_options false
-\maintain_unincluded_children false
-\language english
-\language_package default
-\inputencoding latin1
-\fontencoding global
-\font_roman default
-\font_sans default
-\font_typewriter default
-\font_default_family default
-\use_non_tex_fonts false
-\font_sc false
-\font_osf false
-\font_sf_scale 100
-\font_tt_scale 100
-
-\graphics default
-\default_output_format default
-\output_sync 0
-\bibtex_command default
-\index_command default
-\paperfontsize default
-\spacing single
-\use_hyperref false
-\papersize default
-\use_geometry true
-\use_amsmath 1
-\use_esint 0
-\use_mhchem 1
-\use_mathdots 1
-\cite_engine basic
-\use_bibtopic false
-\use_indices false
-\paperorientation portrait
-\suppress_date false
-\use_refstyle 0
-\index Index
-\shortcut idx
-\color #008000
-\end_index
-\leftmargin 1in
-\topmargin 1in
-\rightmargin 1in
-\bottommargin 2in
-\secnumdepth 3
-\tocdepth 3
-\paragraph_separation indent
-\paragraph_indentation default
-\quotes_language english
-\papercolumns 1
-\papersides 2
-\paperpagestyle default
-\tracking_changes false
-\output_changes false
-\html_math_output 0
-\html_css_as_file 0
-\html_be_strict false
-\end_header
-
-\begin_body
-
-\begin_layout Chapter
-Running PyLith
-\end_layout
-
-\begin_layout Standard
-There are essentially three major inputs needed to run a problem with PyLith:
-\end_layout
-
-\begin_layout Enumerate
-A set of parameters describing the problem.
- These parameters describe the type of problem to be run, solver information,
- time-stepping information, boundary conditions, materials, etc.
- This information can be provided from the command-line or by using a 
-\family typewriter
-.cfg
-\family default
- or 
-\family typewriter
-.pml
-\family default
- file.
-\end_layout
-
-\begin_layout Enumerate
-Mesh information.
- This includes the topology of the finite-element mesh (coordinates of vertices
- and how the vertices are connected into cells), a material identifier for
- each cell, and sets of vertices associated with boundary conditions, faults,
- and output (for subsets of the mesh).
- This information can be provided using the PyLith mesh ASCII format (see
- Chapter 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "cha:Tutorials"
-
-\end_inset
-
- for examples and Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:MeshIOAscii"
-
-\end_inset
-
- for the format specification) or by importing the information from the
- LaGriT or CUBIT meshing packages (see Chapter 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "cha:Tutorials"
-
-\end_inset
-
- for examples).
-\end_layout
-
-\begin_layout Enumerate
-Databases specifying the material property values and boundary condition
- values to be used.
- Arbitrarily complex spatial variations in boundary and fault conditions
- and material properties may be given in the spatial database (see Chapter
- 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "cha:Tutorials"
-
-\end_inset
-
- for examples and Appendix 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:Spatialdata:SimpleIOAscii"
-
-\end_inset
-
- for the format specification).
-\end_layout
-
-\begin_layout Section
-Defining the Simulation
-\end_layout
-
-\begin_layout Standard
-The parameters for PyLith are specified as a hierarchy or tree of modules.
- The application assembles the hierarchy of modules from user input and
- then calls the 
-\family typewriter
-main
-\family default
- function in the top-level module in the same manner as a C or C++ program.
- The behavior of the application is determined by the modules included in
- the hierarchy as specified by the user.
- The Pyre framework provides the interface for defining this hierarchy.
- Pyre properties correspond to simple settings in the form of strings, integers,
- and real numbers.
- Pyre facilities correspond to software modules.
- Facilities may have their own facilities (branches in the tree) and any
- number of properties.
- See Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:Pyre:Architecture"
-
-\end_inset
-
- for the general concept of Pyre facilities and properties.
- The top-level object is the PyLith application with three facilities: 
-\family typewriter
-mesher
-\family default
-, 
-\family typewriter
-problem
-\family default
-, and 
-\family typewriter
-petsc
-\family default
-.
- The 
-\family typewriter
-mesher
-\family default
- specifies how to import the mesh, the 
-\family typewriter
-problem
-\family default
- specifies the physical properties, boundary conditions, etc., and 
-\family typewriter
-petsc
-\family default
- is used to specify PETSc settings.
- Appendix 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "cha:components"
-
-\end_inset
-
- contains a list of the components provided by PyLith and spatialdata.
-\end_layout
-
-\begin_layout Subsection
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:setting:parameters"
-
-\end_inset
-
-Setting PyLith Parameters
-\end_layout
-
-\begin_layout Standard
-There are several methods for setting input parameters for the 
-\family typewriter
-pylith
-\family default
- executable: via the command line or by using a text file in 
-\family typewriter
-.cfg
-\family default
- or 
-\family typewriter
-.pml
-\family default
- format.
- Both facilities and properties have default values provided, so you only
- need to set values when you want to deviate from the default behavior.
-\end_layout
-
-\begin_layout Subsubsection
-Units
-\end_layout
-
-\begin_layout Standard
-All dimensional parameters require units.
- The units are specified using Python and FORTRAN syntax, so square meters
- is m**2.
- Whitespace is not allowed in the string, for units and dimensioned quantities
- are multiplied by the units string; for example, two meters per second
- is 2.0*m/s.
- Available units are shown in Table 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "tab:pyre:units"
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float table
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Caption
-
-\begin_layout Plain Layout
-\begin_inset CommandInset label
-LatexCommand label
-name "tab:pyre:units"
-
-\end_inset
-
-Pyre supported units.
- Aliases are in parentheses.
-\end_layout
-
-\end_inset
-
-
-\begin_inset Tabular
-<lyxtabular version="3" rows="5" columns="2">
-<features tabularvalignment="middle">
-<column alignment="left" valignment="top" width="0.9in">
-<column alignment="left" valignment="top" width="4in">
-<row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Scale
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Available Units
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-length
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-meter (m), micrometer (um, micron), millimeter (mm), centimeter (cm), kilometer
- (km), inch, foot, yard, mile
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-time
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-second (s), nanosecond (ns), microsecond (us), millisecond (ms), minute,
- hour, day, year
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-mass
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-kilogram (kg), gram (g), centigram (cg), milligram (mg), ounce, pound, ton
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-pressure
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-pascal (Pa), kPa, MPa, GPa, bar, millibar, atmosphere (atm)
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection
-Using the Command Line
-\end_layout
-
-\begin_layout Standard
-Pyre uses the following syntax to change properties from the command line.
- To change the value of a property of a component, use:
-\end_layout
-
-\begin_layout LyX-Code
-
-\family typewriter
---[component].[property]=[value]
-\end_layout
-
-\begin_layout Standard
-Each component is attached to a facility, so the option above can also be
- written as: 
-\end_layout
-
-\begin_layout LyX-Code
-
-\family typewriter
---[facility].[property]=[value]
-\end_layout
-
-\begin_layout Standard
-Each facility has a default component attached to it.
- A different component can be attached to a facility by:
-\end_layout
-
-\begin_layout LyX-Code
-
-\family typewriter
---[facility]=[new_component] 
-\end_layout
-
-\begin_layout Standard
-PyLith's command-line arguments can control Pyre and PyLith properties and
- facilities, MPI settings, and PETSc settings.
- You can get more information on the available options by typing
-\end_layout
-
-\begin_layout LyX-Code
-
-\family typewriter
-$ pylith --help
-\end_layout
-
-\begin_layout Standard
-All PyLith-related properties are associated with the 
-\family typewriter
-pylithapp
-\family default
- component.
- You can get a list of all of these top-level properties along with a descriptio
-n of what they do by running PyLith with the 
-\family typewriter
---help-properties
-\family default
- command-line argument.
- To get information on user-configurable facilities and components, you
- can run PyLith with the 
-\family typewriter
---help-components
-\family default
- command-line argument.
- To find out about the properties associated with a given component, you
- can run PyLith with the 
-\family typewriter
---[component].help-properties
-\family default
- flag:
-\end_layout
-
-\begin_layout LyX-Code
-$ pylith --problem.help-properties
-\end_layout
-
-\begin_layout Standard
-Each component may also have sub-components associated with it:
-\end_layout
-
-\begin_layout LyX-Code
-$ pylith -- problem.help-components
-\end_layout
-
-\begin_layout Standard
-By starting at the top-level components, you can determine the components
- and properties at each level by working down to lower-level components:
-\end_layout
-
-\begin_layout LyX-Code
-$ pylith --problem.bc.help-components
-\end_layout
-
-\begin_layout LyX-Code
-$ pylith --problem.bc.help-properties
-\end_layout
-
-\begin_layout Standard
-Using the 
-\family typewriter
---help-components
-\family default
- and 
-\family typewriter
---help-properties
-\family default
- flags for the various components and sub-components is a good way to discover
- potential problems in a simulation.
-\end_layout
-
-\begin_layout Subsubsection
-Using a 
-\family typewriter
-.cfg
-\family default
- File
-\end_layout
-
-\begin_layout Standard
-Entering all those parameters via the command line involves the risk of
- typographical errors, which can lead to undesired results.
- You will generally find it easier to write a brief 
-\family typewriter
-.cfg
-\family default
- input file that contains the parameters.
- This file has a format similar to a Windows INI file.
- The file is composed of one or more sections which are formatted as follows:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.subcomponent1.subcomponent2]
-\end_layout
-
-\begin_layout LyX-Code
-# this is a comment
-\end_layout
-
-\begin_layout LyX-Code
-property1 = value1
-\end_layout
-
-\begin_layout LyX-Code
-property2 = value2 ; this is another comment
-\end_layout
-
-\begin_layout Standard
-We strongly recommend that you use 
-\family typewriter
-.cfg
-\family default
- files for your work.
- The files are syntax-colored in the vim editor.
-\end_layout
-
-\begin_layout Subsubsection
-Using a 
-\family typewriter
-.pml
-\family default
- File
-\end_layout
-
-\begin_layout Standard
-A 
-\family typewriter
-.pml
-\family default
- file is an XML file that specifies parameter values in a highly structured
- format.
- It is composed of nested sections which are formatted as follows:
-\end_layout
-
-\begin_layout LyX-Code
-<component name='component1'>
-\end_layout
-
-\begin_layout LyX-Code
-    <component name='component2'>
-\end_layout
-
-\begin_layout LyX-Code
-        <property name='property1'>value1</property>
-\end_layout
-
-\begin_layout LyX-Code
-        <property name='property2'>value2</property>
-\end_layout
-
-\begin_layout LyX-Code
-    </component>
-\end_layout
-
-\begin_layout LyX-Code
-</component>
-\end_layout
-
-\begin_layout Standard
-XML files are intended to be read and written by machines, not edited manually
- by humans.
- The 
-\family typewriter
-.pml
-\family default
- file format is intended for applications in which PyLith input files are
- generated by another program, e.g., a GUI, web application, or a high-level
- structured editor.
- This file format will not be discussed further here, but if you are interested
- in using 
-\family typewriter
-.pml
-\family default
- files, note that 
-\family typewriter
-.pml
-\family default
- files and 
-\family typewriter
-.cfg
-\family default
- files can be used interchangeably; in the following discussion, a file
- with a 
-\family typewriter
-.pml
-\family default
- extension can be substituted anywhere a 
-\family typewriter
-.cfg
-\family default
- file can be used.
-\end_layout
-
-\begin_layout Subsubsection
-Specification and Placement of Configuration Files
-\end_layout
-
-\begin_layout Standard
-Configuration files may be specified on the command line:
-\end_layout
-
-\begin_layout LyX-Code
-$ pylith example.cfg
-\end_layout
-
-\begin_layout Standard
-In addition, the Pyre framework searches for configuration files named 
-\family typewriter
-pylithapp.cfg
-\family default
- in several predefined locations.
- You may put settings in any or all of these locations, depending on the
- scope you want the settings to have:
-\end_layout
-
-\begin_layout Enumerate
-
-\family typewriter
-$PREFIX/etc/pylithapp.cfg
-\family default
-, for system-wide settings;
-\end_layout
-
-\begin_layout Enumerate
-
-\family typewriter
-$HOME/.pyre/pylithapp/pylithapp.cfg
-\family default
-, for user settings and preferences;
-\end_layout
-
-\begin_layout Enumerate
-the current directory (
-\family typewriter
-./pylithapp.cfg
-\family default
-), for local overrides.
- 
-\end_layout
-
-\begin_layout Standard
-Parameters given directly on the command line will override any input contained
- in a configuration file.
- Configuration files given on the command line override all others.
- The 
-\family typewriter
-pylithapp.cfg
-\family default
- files placed in (3) will override those in (2), (2) overrides (1), and
- (1) overrides only the built-in defaults.
-\end_layout
-
-\begin_layout Standard
-All of the example problems are set up using configuration files in the
- example directory, and specific problems are defined by including the appropria
-te configuration file on the command-line.
- Referring to the directory 
-\family typewriter
-examples/twocells/twohex8
-\family default
-, the following configuration files are present:
-\end_layout
-
-\begin_layout LyX-Code
-axialdisp.cfg
-\end_layout
-
-\begin_layout LyX-Code
-dislocation.cfg
-\end_layout
-
-\begin_layout LyX-Code
-pylithapp.cfg
-\end_layout
-
-\begin_layout LyX-Code
-sheardisp.cfg
-\end_layout
-
-\begin_layout Standard
-The settings in pylithapp.cfg will be read automatically, and additional
- settings are included by specifying one of the other files on the command-line:
-\end_layout
-
-\begin_layout LyX-Code
-$ pylith axialdisp.cfg
-\end_layout
-
-\begin_layout Standard
-If you want to see what settings are being used, you can either examine
- the 
-\family typewriter
-.cfg
-\family default
- files, or use the help flags as described above:
-\end_layout
-
-\begin_layout LyX-Code
-$ pylith axialdisp.cfg --problem.help-components
-\end_layout
-
-\begin_layout LyX-Code
-$ pylith axialdisp.cfg --problem.help-properties
-\end_layout
-
-\begin_layout LyX-Code
-$ pylith axialdisp.cfg --problem.bc.help-components
-\end_layout
-
-\begin_layout LyX-Code
-$ pylith axialdisp.cfg --problem.bc.help-properties
-\end_layout
-
-\begin_layout Standard
-This is generally a more useful way of determining problem settings, since
- it includes default values as well as those that have been specified in
- the 
-\family typewriter
-.cfg
-\family default
- file.
-\end_layout
-
-\begin_layout Subsubsection
-List of PyLith Parameters (
-\family typewriter
-pylithinfo
-\family default
-)
-\end_layout
-
-\begin_layout Standard
-The Python application 
-\family typewriter
-pylithinfo
-\family default
- writes all of the current parameters to a text file.
- The default name of the text file is 
-\family typewriter
-pylith_parameters.txt
-\family default
-.
- The usage synopsis is
-\end_layout
-
-\begin_layout LyX-Code
-$ pylithinfo [--verbose] [--fileout=pylith_parameters.txt] [PyLith args]
-\end_layout
-
-\begin_layout Standard
-where 
-\family typewriter
---verbose
-\family default
- (or 
-\family typewriter
--v
-\family default
-) turns on printing the descriptions of the properties and components as
- well as the location where the current value was set, and 
-\family typewriter
---fileout=pylith_parameters.txt
-\family default
- (or 
-\family typewriter
--o pylith_parameters.txt
-\family default
-) sets the name of the output file.
- The lines in the text file are indented to show the hierarchy of the properties
- and components.
- 
-\end_layout
-
-\begin_layout Subsection
-Mesh Information (
-\family typewriter
-mesher
-\family default
-)
-\end_layout
-
-\begin_layout Standard
-Geometrical and topological information for the finite element mesh may
- be provided by exporting an Exodus II format file from CUBIT, by exporting
- a GMV file and an accompanying Pset file from LaGriT, or by specifying
- the information in PyLith mesh ASCII format.
- See Chapter 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "cha:Tutorials"
-
-\end_inset
-
- for examples.
-\end_layout
-
-\begin_layout Standard
-PyLith supports linear cells in 1D (Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:1D-linear-elements"
-
-\end_inset
-
-), 2D (Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:2D-linear-elements"
-
-\end_inset
-
-), and 3D (Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:3D-linear-elements"
-
-\end_inset
-
-).
- The vertex ordering must follow the convention shown in Figures 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:1D-linear-elements"
-
-\end_inset
-
--
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:3D-linear-elements"
-
-\end_inset
-
-.
- Quadratic cells are also supported, but at present the only method for
- using these cells in PyLith is using PyLith ASCII format.
- PyLith does not yet support automatic generation of a quadratic mesh from
- the linear meshes created by CUBIT or LaGriT.
-\end_layout
-
-\begin_layout Standard
-The mesh information defines the vertex coordinates and specifies the vertices
- composing each cell in the mesh.
- The mesh information must also define at least one set of vertices for
- which displacement (Dirichlet) boundary conditions will be provided.
- In most realistic problems, there will be several vertex groups, each with
- a unique identifying label.
- For example, one group might define a surface of the mesh where displacement
- (Dirichlet) boundary conditions will be applied, another might define a
- surface where traction (Neumann) boundary conditions will be applied, while
- a third might specify a surface that defines a fault.
- Similarly, the mesh information contains cell labels that define the material
- type for each cell in the mesh.
- For a mesh with a single material type, there will only be a single label
- for every cell in the mesh.
- See Chapters 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "cha:material:models"
-
-\end_inset
-
- and 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "cha:boundary:interface:conditions"
-
-\end_inset
-
- for more detailed discussions of setting the materials and boundary conditions.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\noindent
-\align center
-\begin_inset Graphics
-	filename figs/bar2.eps
-
-\end_inset
-
- 
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Linear bar cell available for 1D problems.
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:1D-linear-elements"
-
-\end_inset
-
- 
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\noindent
-\align center
-\begin_inset Graphics
-	filename figs/tri3.eps
-
-\end_inset
-
-
-\begin_inset ERT
-status open
-
-\begin_layout Plain Layout
-
-
-\backslash
-hspace*{0.5in}
-\end_layout
-
-\end_inset
-
-
-\begin_inset Graphics
-	filename figs/quad4.eps
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Linear cells available for 2D problems are the triangle (left) and the quadrilat
-eral (right).
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:2D-linear-elements"
-
-\end_inset
-
- 
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\noindent
-\align center
-\begin_inset Graphics
-	filename figs/tet4.eps
-
-\end_inset
-
-
-\begin_inset ERT
-status open
-
-\begin_layout Plain Layout
-
-
-\backslash
-hspace*{0.5in}
-\end_layout
-
-\end_inset
-
-
-\begin_inset Graphics
-	filename figs/hex8.eps
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Linear cells available for 3D problems are the tetrahedron (left) and the
- hexahedron (right).
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:3D-linear-elements"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection
-Mesh Importer
-\end_layout
-
-\begin_layout Standard
-The default mesher component is MeshImporter, which provides the capabilities
- of reading the mesh from files.
- The MeshImporter has several properties and facilities:
-\end_layout
-
-\begin_layout Description
-reorder_mesh Reorder the vertices and cells using the reverse Cuthill-McKee
- algorithm (default is False).
-\end_layout
-
-\begin_layout Description
-reader Reader for a given type of mesh (default is MeshIOAscii).
-\end_layout
-
-\begin_layout Description
-distributor Handles distribution of the mesh among processors.
-\end_layout
-
-\begin_layout Description
-refiner Perform global uniform mesh refinement after distribution among
- processors (default is False).
-\end_layout
-
-\begin_layout Standard
-Reordering the mesh so that vertices and cells connected topologically also
- reside close together in memory improves overall performance and can improve
- solver performance as well.
-\end_layout
-
-\begin_layout Quote
-
-\color red
-Note:
-\color inherit
- The coordinate system associated with the mesh must be a Cartesian coordinate
- system.
- This includes generic Cartesian coordinate systems as well as geographic
- projections.
-\end_layout
-
-\begin_layout Subsubsection
-MeshIOAscii
-\end_layout
-
-\begin_layout Standard
-The MeshIOAscii object is intended for reading small, simple ASCII files
- containing a mesh constructed by hand.
- We use this file format extensively in the examples.
- Appendix 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:MeshIOAscii"
-
-\end_inset
-
- describes the format of the files.
- The properties and facilities of the MeshIOAscii object include:
-\end_layout
-
-\begin_layout Description
-filename Name of the mesh file.
-\end_layout
-
-\begin_layout Description
-coordsys Coordinate system associated with the mesh.
-\end_layout
-
-\begin_layout Subsubsection
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:MeshIOCubit"
-
-\end_inset
-
-MeshIOCubit
-\end_layout
-
-\begin_layout Standard
-The MeshIOCubit object reads the NetCDF Exodus II files output from CUBIT.
- Beginning with CUBIT 11.0, the names of the nodesets are included in the
- Exodus II files and PyLith can use these nodeset names or revert to using
- the nodeset ids.
- The properties and facilities associated with the MeshIOCubit object are:
-\end_layout
-
-\begin_layout Description
-filename Name of the Exodus II file.
-\end_layout
-
-\begin_layout Description
-use_nodeset_names Identify nodesets by name rather than id (default is True).
-\end_layout
-
-\begin_layout Description
-coordsys Coordinate system associated with the mesh.
-\end_layout
-
-\begin_layout Subsubsection
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:MeshIOLagrit"
-
-\end_inset
-
-MeshIOLagrit
-\end_layout
-
-\begin_layout Standard
-The MeshIOLagrit object is used to read ASCII and binary GMV and PSET files
- output from LaGriT.
- PyLith will automatically detect whether the files are ASCII or binary.
- We attempt to provide support for experimental 64-bit versions of LaGriT
- via flags indicating whether the FORTRAN code is using 32-bit or 64-bit
- integers.
- The MeshIOLagrit properties and facilities are:
-\end_layout
-
-\begin_layout Description
-filename_gmv Name of GMV file.
-\end_layout
-
-\begin_layout Description
-filename_pset Name of the PSET file.
-\end_layout
-
-\begin_layout Description
-flip_endian Flip the endian of values when reading binary files (default
- is False).
-\end_layout
-
-\begin_layout Description
-io_int32 Flag indicating that PSET files use 32-bit integers (default is
- True).
-\end_layout
-
-\begin_layout Description
-record_header_32bt Flag indicating FORTRAN record header is 32-bit (default
- is True)
-\end_layout
-
-\begin_layout Description
-coordsys Coordinate system associated with mesh.
-\end_layout
-
-\begin_layout Subsubsection
-Distributor
-\end_layout
-
-\begin_layout Standard
-The distributor users a partitioner to compute which cells should be placed
- on each processor, computes the overlap among the processors, and then
- distributes the mesh among the processors.
- The properties and facilities of the Distributor include:
-\end_layout
-
-\begin_layout Description
-partitioner Choice of partitioner (
-\begin_inset Quotes eld
-\end_inset
-
-parmetis
-\begin_inset Quotes erd
-\end_inset
-
- or 
-\begin_inset Quotes eld
-\end_inset
-
-chaco
-\begin_inset Quotes erd
-\end_inset
-
-, default is 
-\begin_inset Quotes eld
-\end_inset
-
-chaco
-\begin_inset Quotes erd
-\end_inset
-
-).
-\end_layout
-
-\begin_layout Description
-writer_partition Flag indicating that the partition information should be
- written to a file (default is False).
-\end_layout
-
-\begin_layout Description
-data_writer Writer for partition information (default is DataWriterVTKMesh
- for VTK output).
-\end_layout
-
-\begin_layout Standard
-ParMETIS is not included in the PyLith binaries due to licensing issues.
-\end_layout
-
-\begin_layout Subsubsection
-Refiner
-\end_layout
-
-\begin_layout Standard
-The refiner is used to decrease node spacing by a factor of two by subdividing
- each cell.
- In a 2-D triangular mesh a node is inserted at the midpoint of each edge,
- splitting each cell into four cells (see Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:uniform:refinement:2x"
-
-\end_inset
-
-).
- In a 2-D quadrilateral mesh a node is inserted at the midpoint of each
- edge and at the centroid of the cell, splitting each cell into four cells.
- In a 3-D tetrahedral mesh a node is inserted at the midpoint of each edge,
- splitting each cell into eight cells.
- In a 3-D hexahedral mesh a node is inserted at the midpoint of each edge,
- the centroid of each face, and at the centroid of the cell, splitting each
- cell into eight cells.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\noindent
-\align center
-\begin_inset Graphics
-	filename figs/refinement2x.eps
-	scale 125
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Global uniform mesh refinement of 2-D and 3-D linear cells.
- The blue lines and orange circles identify the edges and vertices in the
- original cells.
- The purple lines and green circles identify the new edges and vertices
- added to the original cells to refine the mesh by a factor of two.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:uniform:refinement:2x"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-Refinement occurs after distribution of the mesh among processors.
- This allows one to run much larger simulations by (1) permitting the mesh
- generator to construct a mesh with a node spacing twice as large as that
- needed in the simulation and (2) operations performed in serial during
- the simulation setup phase, such as, adjusting the topology to insert cohesive
- cells and distribution of the mesh among processors uses this much smaller
- coarse mesh.
- For 2-D problems the global mesh refinement increases the maximum problem
- size by a factor of four, and for 3-D problems it increases the maximum
- problem size by a factor of eight.
-\end_layout
-
-\begin_layout Subsection
-Problem Specification (
-\family typewriter
-problem
-\family default
-)
-\end_layout
-
-\begin_layout Standard
-The problem component specifies the basic parameters of the simulation,
- including the physical properties, the boundary conditions, and interface
- conditions (faults).
- The current release of PyLith contains one type of problem, 
-\family typewriter
-TimeDependent
-\family default
- for use in static, quasi-static, and dynamic simulations.
- Future releases may contain multiple types of problems, for example, computing
- Green's functions, as additional applications are developed.
- The general facilities include:
-\end_layout
-
-\begin_layout Description
-normalizer Scales used to nondimensionalize the problem (default is NondimElasti
-cQuasistatic).
-\end_layout
-
-\begin_layout Description
-materials Array of materials comprising the domain (default is 
-\family typewriter
-[material]
-\family default
-).
-\end_layout
-
-\begin_layout Description
-bc Array of boundary conditions (default is none).
-\end_layout
-
-\begin_layout Description
-interfaces Array of interface conditions, i.e., faults (default is none).
-\end_layout
-
-\begin_layout Description
-gravity_field Gravity field used to construct body forces (default is none).
-\end_layout
-
-\begin_layout Standard
-The properties for each material group are:
-\end_layout
-
-\begin_layout Description
-dimension Spatial dimension of the problem (default is 3)
-\end_layout
-
-\begin_layout Standard
-An example of setting these parameters in a 
-\family typewriter
-.cfg
-\family default
- file for a problem is:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent]
-\end_layout
-
-\begin_layout LyX-Code
-dimension = 3
-\end_layout
-
-\begin_layout LyX-Code
-normalizer = spatialdata.units.NondimElasticQuasistatic
-\end_layout
-
-\begin_layout LyX-Code
-materials = [elastic,viscoelastic]
-\end_layout
-
-\begin_layout LyX-Code
-bc = [boundary_east,boundary_bottom,boundary_west]
-\end_layout
-
-\begin_layout LyX-Code
-interfaces = [SanAndreas,SanJacinto]
-\end_layout
-
-\begin_layout LyX-Code
-gravity_field = spatialdata.spatialdb.GravityField
-\end_layout
-
-\begin_layout Subsubsection
-Nondimensionalization
-\end_layout
-
-\begin_layout Standard
-PyLith nondimensionalizes all parameters provided by the user so that the
- simulation solves the equations using nondimensional quantities.
- This permits application of PyLith to problems across a vast range of spatial
- and temporal scales.
- The scales used to nondimensionalize the problem are length, pressure,
- density, and time.
- PyLith provides two normalizer objects to make it easy to provide reasonable
- scales for the nondimensionalization.
- The 
-\family typewriter
-NondimElasticQuasistatic
-\family default
- normalizer has the following properties:
-\end_layout
-
-\begin_layout Description
-length_scale Length to nondimensionalize length (default is 1.0 km).
-\end_layout
-
-\begin_layout Description
-shear_modulus Shear modulus to nondimensionalize pressure (default is 3.0e+10
- Pa).
-\end_layout
-
-\begin_layout Description
-relaxation_time Relaxation time to nondimensionalize time (default is 1.0
- year).
-\end_layout
-
-\begin_layout Standard
-An example of setting these parameters in a 
-\family typewriter
-.cfg
-\family default
- file for a problem is:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.normalizer]
-\end_layout
-
-\begin_layout LyX-Code
-length_scale = 1.0*km
-\end_layout
-
-\begin_layout LyX-Code
-shear_modules = 3.0e+10*Pa
-\end_layout
-
-\begin_layout LyX-Code
-relaxation_time = 1.0*yr
-\end_layout
-
-\begin_layout Standard
-The 
-\family typewriter
-NondimElasticDynamic
-\family default
- normalizer has the following properties:
-\end_layout
-
-\begin_layout Description
-shear_wave_speed Shear wave speed used to nondimensionalize length and pressure
- (default is 3.0 km/s).
-\end_layout
-
-\begin_layout Description
-mass_density Mass density to nondimensionalize density and pressure (default
- is 3.0e+3 kg/m
-\begin_inset Formula $^{3}$
-\end_inset
-
-).
-\end_layout
-
-\begin_layout Description
-wave_period Period of seismic waves used to nondimensionalize time (default
- is 1.0 s).
-\end_layout
-
-\begin_layout Standard
-An example of setting these parameters in a 
-\family typewriter
-.cfg
-\family default
- file for a problem is:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.normalizer]
-\end_layout
-
-\begin_layout LyX-Code
-shear_wave_speed = 3.0*km/s
-\end_layout
-
-\begin_layout LyX-Code
-mass_density = 3.0e+3*kg/m**3
-\end_layout
-
-\begin_layout LyX-Code
-wave_period = 1.0*s
-\end_layout
-
-\begin_layout Subsection
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:petsc:options"
-
-\end_inset
-
-PETSc Settings (
-\family typewriter
-petsc
-\family default
-)
-\end_layout
-
-\begin_layout Standard
-In quasti-static problems with implicit time-stepping, PyLith relies on
- PETSc for the linear algebra computations, including linear Krylov subspace
- solvers and nonlinear solvers.
- For dynamic problems, lumping the mass matrix and using explicit time-stepping
- is much more efficient; this permits solving the linear system with a trivial
- solver so we do not use a PETSc solver in this case (see Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:solvers"
-
-\end_inset
-
-).
-\end_layout
-
-\begin_layout Standard
-PETSc options can be set in 
-\family typewriter
-.cfg
-\family default
- files in sections beginning with 
-\family typewriter
-[pylithapp.petsc]
-\family default
-.
- The options of primary interest in the case of PyLith are shown in Table
-\begin_inset space ~
-\end_inset
-
-
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "tab:petsc:options:defaults"
-
-\end_inset
-
-.
- PETSc options are used to control the selection and settings for the solvers
- underlying the SolverLinear and SolverNonlinear objects discussed in Section
- 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:solvers"
-
-\end_inset
-
-.
- A very wide range of elasticity problems in quasi-static simulations can
- be solved with reasonable runtimes by replacing the default Jacobi precondition
-er with the Additive Schwarz Method (ASM) using Incomplete LU (ILU) factorizatio
-n by default (see Table
-\begin_inset space ~
-\end_inset
-
-
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "tab:petsc:options:recommended"
-
-\end_inset
-
-).
- A more advanced set of solver settings that may provide better performance
- in many elasticity problems are given in Table 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "tab:petsc:options:advanced"
-
-\end_inset
-
-.
- These settings are limited to problems where we store the stiffness matrix
- as a nonsymmetric sparse matrix and require additional settings for the
- formulation,
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.formulation]
-\end_layout
-
-\begin_layout LyX-Code
-split_fields = True
-\end_layout
-
-\begin_layout LyX-Code
-use_custom_constraint_pc = True ; Use only if problem contains a fault
-\end_layout
-
-\begin_layout LyX-Code
-matrix_type = aij
-\end_layout
-
-\begin_layout Quote
-
-\series bold
-\color red
-Warning:
-\color inherit
- 
-\series default
-\color none
-These settings are only available if you build PETSc with Fortran enabled
- and the ML package.
- These features are included in the PyLith binary packages.
-\end_layout
-
-\begin_layout Quote
-
-\series bold
-\color red
-Warning:
-\color inherit
- 
-\series default
-\color none
-The split fields and algebraic multigrid preconditioning currently fails
- in problems with a nonzero null space.
- This most often occurs when a problem contains multiple faults that extend
- through the entire domain and create subdomains without any Dirichlet boundary
- conditions.
- The current workaround is to use the 
-\color inherit
-Additive Schwarz 
-\color none
-preconditioner without split fields.
- See Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:Troubleshooting"
-
-\end_inset
-
- for the error message encountered in this situation.
- 
-\end_layout
-
-\begin_layout Standard
-These more advanced settings allow each component of displacement, as well
- as Lagrange multipliers for fault tractions, to be preconditioned separately.
- This usually results in a much stronger preconditioner.
- In simulations with fault slip, the degrees of freedom associated with
- the Lagrange multipliers should be preconditioned with a custom preconditioner
- that uses a diagonal approximation of the Schur complement.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float table
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Caption
-
-\begin_layout Plain Layout
-\begin_inset CommandInset label
-LatexCommand label
-name "tab:petsc:options:defaults"
-
-\end_inset
-
-Useful command-line arguments for setting PETSc options.
-\end_layout
-
-\end_inset
-
-
-\begin_inset Tabular
-<lyxtabular version="3" rows="10" columns="3">
-<features tabularvalignment="middle">
-<column alignment="left" valignment="top" width="1.2in">
-<column alignment="center" valignment="middle" width="0.6in">
-<column alignment="left" valignment="top" width="3.8in">
-<row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Property
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Default Value
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Description
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-log_summary
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\shape italic
-false
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Print logging objects and events.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-ksp_monitor
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\shape italic
-false
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Dump preconditioned residual norm to stdout.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-ksp_view
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\shape italic
-false
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Print linear solver parameters.
- 
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-ksp_rtol
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\shape italic
-1.0e-05
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Convergence tolerance for relative decrease in residual norm.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-snes_monitor
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\shape italic
-false
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Dump residual norm to stdout for each nonlinear solve iteration.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-snes_view
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\shape italic
-false
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Print nonlinear solver parameters.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-snes_rtol
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\shape italic
-1.0e-5
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Convergence tolerance for relative decrease in residual norm.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-pc_type
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\shape italic
-jacobi
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Set preconditioner type.
- See 
-\begin_inset CommandInset href
-LatexCommand href
-name "PETSc documentation"
-target "http://www.mcs.anl.gov/petsc/petsc-as/documentation/linearsolvertable.html"
-
-\end_inset
-
- for a list of all preconditioner types.
- 
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-ksp_type
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\shape italic
-gmres
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Set linear solver type.
- See 
-\begin_inset CommandInset href
-LatexCommand href
-name "PETSc documentation"
-target "http://www.mcs.anl.gov/petsc/petsc-as/documentation/linearsolvertable.html"
-
-\end_inset
-
- for a list of all solver types.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\begin_inset Float table
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Caption
-
-\begin_layout Plain Layout
-\begin_inset CommandInset label
-LatexCommand label
-name "tab:petsc:options:recommended"
-
-\end_inset
-
-PETSc options that provide moderate performance in a wide range of quasi-static
- elasticity problems.
-\end_layout
-
-\end_inset
-
-
-\begin_inset Tabular
-<lyxtabular version="3" rows="13" columns="3">
-<features tabularvalignment="middle">
-<column alignment="left" valignment="top" width="2in">
-<column alignment="center" valignment="middle" width="0.75in">
-<column alignment="left" valignment="top" width="3in">
-<row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Property
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Value
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Description
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-pc_type
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\shape italic
-asm
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Additive Schwarz method.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-ksp_type
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\shape italic
-gmres
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-GMRES method from Saad and Schultz.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-sub_pc_factor_shift_type
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\emph on
-nonzero
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Turn on nonzero shifting for factorization.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-ksp_max_it
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\emph on
-100
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Maximum number of iterations permitted in linear solve.
- Depends on problem size.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-ksp_gmres_restart
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\shape italic
-50
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Number of iterations after which Gram-Schmidt orthogonalization is restarted.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-ksp_rtol
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\shape italic
-1.0e-08
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Linear solve convergence tolerance for relative decrease in residual norm.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-ksp_atol
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\shape italic
-\emph on
-1.0e-12
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Linear solve convergence tolerance for absolute value of residual norm.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-ksp_converged_reason
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\shape italic
-true
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Indicate why iterating stopped in linear solve.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-snes_max_it
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\shape italic
-100
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Maximum number of iterations permitted in nonlinear solve.
- Depends on how nonlinear the problem is.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-snes_rtol
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\shape italic
-1.0e-08
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Nonlinear solve convergence tolerance for relative decrease in residual
- norm.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-snes_atol
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\shape italic
-1.0e-12
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Nonlinear solve convergence tolerance for absolute value of residual norm.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-snes_converged_reason
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\shape italic
-true
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Indicate why iterating stopped in nonlinear solve.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float table
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Caption
-
-\begin_layout Plain Layout
-\begin_inset CommandInset label
-LatexCommand label
-name "tab:petsc:options:advanced"
-
-\end_inset
-
-PETSc options used with split fields algebraic multigrid preconditioning
- that often provide improved performance in quasi-static elasticity problems.
- N is the dimension of the problem.
- For simulations with faults, the number of split fields is N+1.
-\end_layout
-
-\end_inset
-
-
-\begin_inset Tabular
-<lyxtabular version="3" rows="5" columns="3">
-<features tabularvalignment="middle">
-<column alignment="left" valignment="top" width="2in">
-<column alignment="center" valignment="middle" width="0.75in">
-<column alignment="left" valignment="top" width="3in">
-<row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Property
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Value
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Description
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-fs_pc_type
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\shape italic
-field_split
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Precondition fields separately.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell multicolumn="1" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-fs_pc_fieldsplit_real_diagonal
-\end_layout
-
-\end_inset
-</cell>
-<cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Use diagonal blocks from the true operator, rather than the preconditioner.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-fs_pc_fieldsplit_type
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\shape italic
-multiplicative
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Apply each field preconditioning in sequence, which is stronger than all-at-once
- (additive).
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\family typewriter
-fs_fieldsplit_X_pc_type
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\shape italic
-ml
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Multilevel algebraic multigrid preconditioning using Trilinos/ML via PETSc.
- X=0,1,2, ..., N+1.
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Section
-Time-Dependent Problem
-\end_layout
-
-\begin_layout Standard
-PyLith currently only contains this one type of problem which is used for
- static, quasi-static, and dynamic simulations.
- The time-dependent problem adds the 
-\family typewriter
-formulation
-\family default
- facility to the general-problem.
- The formulation specifies the time-stepping formulation to integrate the
- elasticity equation.
- PyLith provides several alternative formulations, each specific to a different
- type of problem.
- Future versions of PyLith will likely include support for additional formulatio
-ns, such as large deformations with a lumped Jacobian matrix.
-\end_layout
-
-\begin_layout Description
-Implicit Implicit time stepping for static and quasi-static problems with
- infinitesimal strains.
- The implicit formulation neglects inertial terms (see Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "eq:elasticity:integral:quasistatic"
-
-\end_inset
-
-).
- 
-\end_layout
-
-\begin_layout Description
-ImplicitLgDeform Implicit time stepping for static and quasi-static problems
- including the effects of rigid body motion and small strains.
- This formulation requires the use of the nonlinear solver, which is selected
- automatically.
-\end_layout
-
-\begin_layout Description
-Explicit Explicit time stepping for dynamic problems with infinitesimal
- strains.
- This formulation uses consistent mass and damping matrices for the system
- Jacobian matrix.
-\end_layout
-
-\begin_layout Description
-ExplicitLgDeform Explicit time stepping for dynamic problems including the
- effects of rigid body motion and small strains.
- This formulation requires the use of the nonlinear solver, which is selected
- automatically.
-\end_layout
-
-\begin_layout Description
-ExplicitLumped Explicit time stepping for dynamic problems with infinitesimal
- strains and lumped system Jacobian.
- The cell matrices are lumped before assembly, permitting use of a vector
- for the diagonal system Jacobian matrix.
- The built-in lumped solver is selected automatically.
-\end_layout
-
-\begin_layout Description
-ExplicitLumpedTri3 Optimized elasticity formulation for linear triangular
- cells with one point quadrature for dynamic problems with infinitesimal
- strains and lumped system Jacobian.
- The built-in lumped solver is selected automatically.
-\end_layout
-
-\begin_layout Description
-ExplicitLumpedTet4 Optimized elasticity formulation for linear tetrahedral
- cells with one point quadrature for dynamic problems with infinitesimal
- strains and lumped system Jacobian.The built-in lumped solver is selected
- automatically.
-\end_layout
-
-\begin_layout Standard
-An example of setting the formulation facility to the implicit time stepping
- component is:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent]
-\end_layout
-
-\begin_layout LyX-Code
-formulation = pylith.problems.Implicit
-\end_layout
-
-\begin_layout Standard
-The formulation can be set to the other formulations in a similar fashion.
-\end_layout
-
-\begin_layout Subsection
-Time-Stepping Formulation
-\end_layout
-
-\begin_layout Standard
-The explicit and implicit time stepping formulations use a common set of
- facilities and properties.
- The facilities include
-\end_layout
-
-\begin_layout Description
-time_step Time step size specification (default is uniform time step).
-\end_layout
-
-\begin_layout Description
-solver Type of solver to use (default is SolverLinear).
-\end_layout
-
-\begin_layout Description
-output Array of output managers for output of the solution (default is [output]).
-\end_layout
-
-\begin_layout Description
-jacobian_viewer Viewer to dump the system Jacobian (sparse matrix) to a
- file for analysis (default is PETSc binary).
-\end_layout
-
-\begin_layout Standard
-The formulation properties include
-\end_layout
-
-\begin_layout Description
-matrix_type Type of PETSc matrix for the system Jacobian (sparse matrix,
- default is symmetric, block matrix with a block size of 1).
-\end_layout
-
-\begin_layout Description
-view_jacobian Flag to indicate if system Jacobian (sparse matrix) should
- be written to a file (default is false).
-\end_layout
-
-\begin_layout Description
-split_fields Split solution field into a displacement portion (fields 0..ndim-1)
- and a Lagrange multiplier portion (field ndim) to permit application of
- sophisticated PETSc preconditioners (default is false).
-\end_layout
-
-\begin_layout Standard
-An example of setting these parameters in a 
-\family typewriter
-.cfg
-\family default
- file is
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.formulation]
-\end_layout
-
-\begin_layout LyX-Code
-time_step = pylith.problems.TimeStepUniform
-\end_layout
-
-\begin_layout LyX-Code
-solver = pylith.problems.SolverLinear ; Nonlinear solver is pylith.problems.SolverNo
-nlinear
-\end_layout
-
-\begin_layout LyX-Code
-output = [domain,ground_surface]
-\end_layout
-
-\begin_layout LyX-Code
-matrix_type = sbaij ; To use a non-symmetric sparse matrix, set it to aij
-\end_layout
-
-\begin_layout LyX-Code
-view_jacobian = false
-\end_layout
-
-\begin_layout Subsection
-Numerical Damping in Explicit Time Stepping
-\end_layout
-
-\begin_layout Standard
-In explicit time-stepping formulations for elasticity, boundary conditions
- and fault slip can excite short waveform elastic waves that are not accurately
- resolved by the discretization.
- We use numerical damping via an artificial viscosity
-\begin_inset CommandInset citation
-LatexCommand cite
-key "Knopoff:Ni:2001,Day:Ely:2002"
-
-\end_inset
-
- to reduce these high frequency oscillations.
- In computing the strains for the elasticity term in equation 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "eq:elasticity:integral:dynamic:t"
-
-\end_inset
-
-, we use an adjusted displacement rather than the actual displacement, where
- 
-\begin_inset Formula 
-\begin{equation}
-\vec{u}^{adj}(t)=\vec{u}(t)+\eta^{*}\Delta t\vec{\dot{u}}(t),
-\end{equation}
-
-\end_inset
-
-
-\begin_inset Formula $\vec{u}^{adj}(t)$
-\end_inset
-
- is the adjusted displacement at time t, 
-\begin_inset Formula $\vec{u}(t)$
-\end_inset
-
-is the original displacement at time (t), 
-\begin_inset Formula $\eta^{*}$
-\end_inset
-
-is the normalized artificial viscosity, 
-\begin_inset Formula $\Delta t$
-\end_inset
-
- is the time step, and 
-\begin_inset Formula $\vec{\dot{u}}(t)$
-\end_inset
-
- is the velocity at time 
-\begin_inset Formula $t$
-\end_inset
-
-.
- The default value for the normalized artificial viscosity is 0.1.
- We have found values in the range 0.1-0.4 sufficiently suppress numerical
- noise while not excessively reducing the peak velocity.
- An example of setting the normalized artificial viscosity in a 
-\family typewriter
-.cfg
-\family default
- file is
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.formulation]
-\end_layout
-
-\begin_layout LyX-Code
-norm_viscosity = 0.2
-\end_layout
-
-\begin_layout Subsection
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:solvers"
-
-\end_inset
-
-Solvers
-\end_layout
-
-\begin_layout Standard
-PyLith supports three types of solvers.
- The linear solver, SolverLinear, corresponds to the PETSc KSP solver and
- is used in linear problems with linear elastic and viscoelastic bulk constituti
-ve models and kinematic fault ruptures.
- The nonlinear solver, SolverNonlinear, corresponds to the PETSc SNES solver
- and is used in nonlinear problems with nonlinear viscoelastic or elastoplastic
- bulk constitutive models, dynamic fault ruptures, or problems involving
- finite strain (small strain formulation).
- The lumped solver (SolverLumped) is a specialized solver used with the
- lumped system Jacobian matrix.
- The options for the PETSc KSP and SNES solvers are set via the top-level
- PETSc options (see Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:petsc:options"
-
-\end_inset
-
- and the PETSc documentation 
-\begin_inset Flex URL
-status collapsed
-
-\begin_layout Plain Layout
-
-www.mcs.anl.gov/petsc/petsc-as/documentation/index.html
-\end_layout
-
-\end_inset
-
-).
-\end_layout
-
-\begin_layout Subsection
-Time Stepping
-\end_layout
-
-\begin_layout Standard
-PyLith provides three choices for controlling the time step in time-dependent
- simulations.
- These include (1) a uniform, user-specified time step (which is the default),
- (2) nonuniform, user-specified time steps, and (3) nonuniform, automatically
- calculated time steps.
- The procedure for automatically selecting time steps requires that the
- material models provide a reasonable estimate of the time step for stable
- time integration.
- In general, quasi-static simulations should use automatically calculated
- time steps and dynamic simulations should use a uniform, user-specified
- time step.
-\end_layout
-
-\begin_layout Standard
-
-\series bold
-\color red
-Warning:
-\series default
-\color none
- 
-\color inherit
-Changing the time step requires recomputing the Jacobian of the system,
- which can greatly increase the runtime if the time-step size changes frequently.
-\end_layout
-
-\begin_layout Subsubsection
-Uniform, User-Specified Time Step
-\end_layout
-
-\begin_layout Standard
-With a uniform, user-specified time step, the user selects the time step
- that is used over the entire duration of the simulation.
- This value is used whether or not it yields a stable solution, so users
- should be careful when selecting the time-step value.
- The properties for the uniform, user-specified time step are:
-\end_layout
-
-\begin_layout Description
-total_time Time duration for simulation.
-\end_layout
-
-\begin_layout Description
-dt Time step for simulation.
-\end_layout
-
-\begin_layout Standard
-An example of setting a uniform, user-specified time step in a 
-\family typewriter
-.cfg
-\family default
- file is:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.problem.formulation]
-\end_layout
-
-\begin_layout LyX-Code
-time_step = pylith.problems.TimeStepUniform ; Default value
-\end_layout
-
-\begin_layout LyX-Code
-
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.problem.formulation.time_step]
-\end_layout
-
-\begin_layout LyX-Code
-total_time = 1000.0*year
-\end_layout
-
-\begin_layout LyX-Code
-dt = 0.5*year
-\end_layout
-
-\begin_layout Subsubsection
-Nonuniform, User-Specified Time Step
-\end_layout
-
-\begin_layout Standard
-The nonuniform, user-specified, time-step implementation allows the user
- to specify the time steps in an ASCII file (see Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:FileFormat:TimeStepUser"
-
-\end_inset
-
- for the format specification of the time-step file).
- If the total duration exceeds the time associated with the time steps,
- then a flag determines whether to cycle through the time steps or to use
- the last specified time step for the time remaining.
- The properties for the nonuniform, user-specified time step are:
-\end_layout
-
-\begin_layout Description
-total_time Time duration for simulation.
-\end_layout
-
-\begin_layout Description
-filename Name of file with time-step sizes.
-\end_layout
-
-\begin_layout Description
-loop_steps If true, cycle through time steps, otherwise keep using last
- time-step size for any time remaining.
-\end_layout
-
-\begin_layout Standard
-An example of setting the properties for nonuniform, user-specified time
- steps in a 
-\family typewriter
-.cfg
-\family default
- file is:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.problem.formulation]
-\end_layout
-
-\begin_layout LyX-Code
-time_step = pylith.problems.TimeStepUser ; Change the time step algorithm
-\end_layout
-
-\begin_layout LyX-Code
-
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.problem.formulation.time_step]
-\end_layout
-
-\begin_layout LyX-Code
-total_time = 1000.0*year
-\end_layout
-
-\begin_layout LyX-Code
-filename = timesteps.txt
-\end_layout
-
-\begin_layout LyX-Code
-loop_steps = false ; Default value
-\end_layout
-
-\begin_layout Subsubsection
-Nonuniform, Automatic Time Step
-\end_layout
-
-\begin_layout Standard
-This time-step implementation automatically calculates a stable time step
- based on the constitutive model and rate of deformation.
- As a result, this choice for choosing the time step relies on accurate
- calculation of a stable time step within each finite-element cell by the
- constitutive models.
- In order to provide some control over the time-step selection, the user
- can control the frequency that a new time step is calculated, the time
- step to use relative to the value determined by the constitutive models,
- and a maximum value for the time step.
- The properties for controlling the automatic time-step selection are:
-\end_layout
-
-\begin_layout Description
-total_time Time duration for simulation.
-\end_layout
-
-\begin_layout Description
-max_dt Maximum time step permitted.
-\end_layout
-
-\begin_layout Description
-adapt_skip Number of time steps to skip between calculating new stable time
- step.
-\end_layout
-
-\begin_layout Description
-stability_factor Safety factor for stable time step (default is 2.0).
-\end_layout
-
-\begin_layout Standard
-An example of setting the properties for the automatic time step in a 
-\family typewriter
-.cfg
-\family default
- file is:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.problem.formulation]
-\end_layout
-
-\begin_layout LyX-Code
-time_step = pylith.problems.TimeStepAdapt ; Change the time step algorithm
-\end_layout
-
-\begin_layout LyX-Code
-
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.problem.formulation.time_step]
-\end_layout
-
-\begin_layout LyX-Code
-total_time = 1000.0*year
-\end_layout
-
-\begin_layout LyX-Code
-max_dt = 10.0*year
-\end_layout
-
-\begin_layout LyX-Code
-adapt_skip = 10 ; Default value
-\end_layout
-
-\begin_layout LyX-Code
-stability_factor = 2.0 ; Default value
-\end_layout
-
-\begin_layout Section
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:spatial:databases"
-
-\end_inset
-
-Databases for Boundaries, Interfaces, and Material Properties
-\end_layout
-
-\begin_layout Standard
-Once the problem has been defined with PyLith parameters, and the mesh informati
-on has been provided, the final step is to specify the boundary conditions
- and material properties to be used.
- The mesh information provides labels defining sets of vertices to which
- boundary conditions or fault conditions will be applied, as well as cell
- labels that will be used to define the material type of each cell.
- For boundary conditions, the 
-\family typewriter
-.cfg
-\family default
- file is used to associate boundary condition types and spatial databases
- with each vertex group (see Chapter 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "cha:boundary:interface:conditions"
-
-\end_inset
-
-).
- For materials, the 
-\family typewriter
-.cfg
-\family default
- file is used to associate material types and spatial databases with cells
- identified by the material identifier (see Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:Material-models"
-
-\end_inset
-
-).
-\end_layout
-
-\begin_layout Standard
-The spatial databases define how the boundary conditions or material property
- values vary spatially, and they can be arbitrarily complex.
- The simplest example for a material database would be a mesh where all
- the cells of a given type have uniform properties (
-\begin_inset Quotes eld
-\end_inset
-
-point
-\begin_inset Quotes erd
-\end_inset
-
- or 0D variation).
- A slightly more complex case would be a mesh where the cells of a given
- type have properties that vary linearly along a given direction (
-\begin_inset Quotes eld
-\end_inset
-
-line
-\begin_inset Quotes erd
-\end_inset
-
- or 1D variation).
- In more complex models, the material properties might have different values
- at each point in the mesh (
-\begin_inset Quotes eld
-\end_inset
-
-volume
-\begin_inset Quotes erd
-\end_inset
-
- or 3D variation).
- This might be the case, for example, if the material properties are provided
- by a database of seismic velocities and densities.
- For boundary conditions the simplest case would be where all vertices in
- a given group have the same boundary condition parameters (
-\begin_inset Quotes eld
-\end_inset
-
-point
-\begin_inset Quotes erd
-\end_inset
-
- or 0D variation).
- A more complex case might specify a variation in the conditions on a given
- surface (
-\begin_inset Quotes eld
-\end_inset
-
-area
-\begin_inset Quotes erd
-\end_inset
-
- or 2D variation).
- This sort of condition might be used, for example, to specify the variation
- of slip on a fault plane.
- The examples discussed in Chapter 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "cha:Tutorials"
-
-\end_inset
-
- also contain more information regarding the specification and use of the
- spatial database files.
-\end_layout
-
-\begin_layout Subsection
-SimpleDB Spatial Database
-\end_layout
-
-\begin_layout Standard
-In most cases the default type of spatial database for faults, boundary
- conditions, and materials is 
-\family typewriter
-SimpleDB
-\family default
-.
- Spatial database files provide specification of a field over some set of
- points.
- There is no topology associated with the points.
- Although multiple values can be specified at each point with more than
- one value included in a search query, the interpolation of each value will
- be done independently.
- Time dependent variations of a field are not supported in these files.
- Spatial database files can specify spatial variations over zero, one, two,
- and three dimensions.
- Zero dimensional variations correspond to uniform values.
- One-dimensional spatial variations correspond to piecewise linear variations,
- which need not coincide with coordinate axes.
- Likewise, two-dimensional spatial variations correspond to variations on
- a planar surface (which need not coincide with the coordinate axes) and
- three-dimensional spatial variations correspond to variations over a volume.
- In one, two, or three dimensions, queries can use a 
-\begin_inset Quotes eld
-\end_inset
-
-nearest value
-\begin_inset Quotes erd
-\end_inset
-
- search or linear interpolation.
-\end_layout
-
-\begin_layout Standard
-The spatial database files need not provide the data using the same coordinate
- system as the mesh coordinate system, provided the two coordinate systems
- are compatible.
- Examples of compatible coordinate systems include geographic coordinates
- (longitude/latitude/elevation), and projected coordinates (e.g., coordinates
- in a transverse Mercator projection).
- Spatial database queries use the Proj.4 Cartographic Projections library
- 
-\begin_inset Flex URL
-status collapsed
-
-\begin_layout Plain Layout
-
-proj.maptools.org
-\end_layout
-
-\end_inset
-
- to convert between coordinate systems, so a large number of geographic
- projections are available with support for converting between NAD27 and
- WGS84 horizontal datums as well as several other frequently used datums.
- Because the interpolation is done in the coordinate system of the spatial
- database, geographic coordinates should only be used for very simple datasets,
- or undesirable results will occur.
- This is especially true when the spatial database coordinate system combines
- latitude, longitude, and elevation in meters (longitude and latitude in
- degrees are often much smaller than elevations in meters leading to distorted
- 
-\begin_inset Quotes eld
-\end_inset
-
-distance
-\begin_inset Quotes erd
-\end_inset
-
- between locations and interpolation).
-\end_layout
-
-\begin_layout Standard
-SimpleDB uses a simple ASCII file to specify the variation of values (e.g.,
- displacement field, slip field, physical properties) in space.
- The file format is described in Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:Spatialdata:SimpleIOAscii"
-
-\end_inset
-
-.
- The tutorials in Chapter 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "cha:Tutorials"
-
-\end_inset
-
- use SimpleDB files to specify the values for the boundary conditions, 
- physical properties, and fault slip.
-\end_layout
-
-\begin_layout Standard
-As in the other Pyre objects, spatial database objects contain parameters
- that can be set from the command line or using 
-\family typewriter
-.cfg or .pml
-\family default
- files.
- The parameters for a spatial database are:
-\end_layout
-
-\begin_layout Description
-label Label for the database, which is used in diagnostic messages.
-\end_layout
-
-\begin_layout Description
-query_type Type of search query to perform.
- Values for this parameter are ``linear'' and ``nearest'' (default).
-\end_layout
-
-\begin_layout Description
-iohandler Database importer.
- Only one importer is implemented, so you do not need to change this setting.
-\end_layout
-
-\begin_layout Description
-iohandler.filename Filename for the spatial database.
-\end_layout
-
-\begin_layout Standard
-An example of setting these parameters in a 
-\family typewriter
-.cfg
-\family default
- file is:
-\end_layout
-
-\begin_layout LyX-Code
-label = Material properties
-\end_layout
-
-\begin_layout LyX-Code
-query_type = linear
-\end_layout
-
-\begin_layout LyX-Code
-iohandler.filename = mydb.spatialdb
-\end_layout
-
-\begin_layout LyX-Code
-
-\end_layout
-
-\begin_layout Subsection
-UniformDB Spatial Database
-\end_layout
-
-\begin_layout Standard
-The SimpleDB spatial database is quite general, but when the values are
- uniform, it is often easier to use the UniformDB spatial database instead.
- With the UniformDB, you specify the values directly either on the command
- line or in a parameter-setting (
-\family typewriter
-.cfg
-\family default
-) file.
- On the other hand, if the values are used in more than one place, it is
- easier to place the values in a SimpleDB file, because they can then be
- referred to using the filename of the spatial database rather than having
- to repeatedly list all of the values on the command line or in a parameter-sett
-ing (
-\family typewriter
-.cfg
-\family default
-) file.
- The Pyre properties for a UniformDB are:
-\end_layout
-
-\begin_layout Description
-values Array of names of values in spatial database
-\end_layout
-
-\begin_layout Description
-data Array of values in spatial database
-\end_layout
-
-\begin_layout Subsubsection
-Example
-\end_layout
-
-\begin_layout Standard
-Specify the physical properties of a linearly elastic, isotropic material
- in a 
-\family typewriter
-pylithapp.cfg
-\family default
- file.
- The data values are dimensioned with the appropriate units using Python
- syntax.
-\end_layout
-
-\begin_layout LyX-Code
-
-\size small
-[pylithapp.timedependent.materials.material]
-\end_layout
-
-\begin_layout LyX-Code
-
-\size small
-db_properties = spatialdata.spatialdb.UniformDB ; Set the db to a UniformDB
-\end_layout
-
-\begin_layout LyX-Code
-
-\size small
-db_properties.values = [vp,vs,density] ; Set the names of the values in the
- database
-\end_layout
-
-\begin_layout LyX-Code
-
-\size small
-db_properties.data = [5773.5*m/s, 3333.3*m/s, 2700.0*kg/m**3] ; Set the values
- in the database
-\end_layout
-
-\begin_layout Subsubsection
-ZeroDispDB
-\end_layout
-
-\begin_layout Standard
-The ZeroDispDB is a a special case of the UniformDB for the Dirichlet boundary
- conditions.
- The values in the database are the ones requested by the Dirichlet boundary
- conditions, 
-\family typewriter
-displacement-x
-\family default
-, 
-\family typewriter
-displacement-y
-\family default
-, and 
-\family typewriter
-displacement-z
-\family default
-, and are all set to zero.
- This makes it trivial to set displacements to zero on a boundary.
- The examples discussed in Chapter 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "cha:Tutorials"
-
-\end_inset
-
- use this database.
-\end_layout
-
-\begin_layout Subsection
-\begin_inset CommandInset label
-LatexCommand label
-name "sub:SCECCVMH-Impl"
-
-\end_inset
-
-SCEC CVM-H Spatial Database
-\end_layout
-
-\begin_layout Standard
-Although the SimpleDB implementation is able to specify arbitrarily complex
- spatial variations, there are existing databases for physical properties,
- and when they are available, it is desirable to access these directly.
- One such database is the SCEC CVM-H database, which provides seismic velocities
- and density information for much of southern California.
- Spatialdata provides a direct interface to this database.
- See Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:Tutorial-Two-tet4-geoproj"
-
-\end_inset
-
- for an example of using the SCEC CVM-H database for physical properties
- of an elastic material.
- The interface is known to work with versions 5.2 and 5.3 of the SCEC CVM-H.
- Setting a minimum wave speed can be used to replace water and very soft
- soils that are incompressible or nearly incompressible with stiffer, compressib
-le materials.
- The Pyre properties for the SCEC CVM-H are:
-\end_layout
-
-\begin_layout Description
-data_dir Directory containing the SCEC CVM-H data files
-\end_layout
-
-\begin_layout Description
-min_vs Minimum shear wave speed.
- Corresponding minimum values for the dilatational wave speed (Vp) and density
- are computed.
- Default value is 500 m/s.
-\end_layout
-
-\begin_layout Description
-squash Squash topography/bathymetry to sea level (make the earth's surface
- flat)
-\end_layout
-
-\begin_layout Description
-squash_limit Elevation above which topography is squashed (geometry below
- this elevation remains undistorted)
-\end_layout
-
-\begin_layout Subsubsection
-Example
-\end_layout
-
-\begin_layout Standard
-Specify the physical properties of a linearly elastic, isotropic material
- using the SCEC CVM-H in a 
-\family typewriter
-pylithapp.cfg
-\family default
- file.
-\end_layout
-
-\begin_layout LyX-Code
-
-\size small
-[pylithapp.timedependent.materials.material]
-\end_layout
-
-\begin_layout LyX-Code
-
-\size small
-db_properties = spatialdata.spatialdb.SCECCVMH ; Set the database to the SCEC
- CVM-H
-\end_layout
-
-\begin_layout LyX-Code
-
-\size small
-db_properties.data_dir = /home/johndoe/data/sceccvm-h/vx53 ; Directory containing
-\begin_inset Newline newline
-\end_inset
-
-the database data files
-\end_layout
-
-\begin_layout LyX-Code
-
-\size small
-db_properties.min_vs = 500*m/s
-\end_layout
-
-\begin_layout LyX-Code
-
-\size small
-db_properties.squash = True ; Turn on squashing
-\end_layout
-
-\begin_layout LyX-Code
-
-\size small
-db_properties.squash_limit = -1000.0 ; Only distort the geometry above z =
- -1 km in 
-\begin_inset Newline newline
-\end_inset
-
-flattening the earth
-\end_layout
-
-\begin_layout Subsection
-CompositeDB Spatial Database
-\end_layout
-
-\begin_layout Standard
-For some problems, a boundary condition or material property may have subsets
- with different spatial variations.
- One example would be when we have separate databases to describe the elastic
- and inelastic bulk material properties for a region.
- In this case, it would be useful to have two different spatial databases,
- e.g., a seismic velocity model with Vp, Vs, and density values, and another
- database with the inelastic physical properties.
- We can use the 
-\family typewriter
-CompositeDB
-\family default
- spatial database for these cases.
- An example would be:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.materials.maxwell]
-\end_layout
-
-\begin_layout LyX-Code
-label = Maxwell material
-\end_layout
-
-\begin_layout LyX-Code
-id = 1
-\end_layout
-
-\begin_layout LyX-Code
-db_properties = spatialdata.spatialdb.CompositeDB
-\end_layout
-
-\begin_layout LyX-Code
-db_properties.db_A = spatialdata.spatialdb.SCECCVMH
-\end_layout
-
-\begin_layout LyX-Code
-db_properties.db_B = spatialdata.spatialdb.SimpleDB
-\end_layout
-
-\begin_layout LyX-Code
-quadrature.cell = pylith.feassemble.FIATSimplex
-\end_layout
-
-\begin_layout LyX-Code
-quadrature.cell.shape = tetrahedron
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.materials.maxwell.db_properties]
-\end_layout
-
-\begin_layout LyX-Code
-values_A = [density,vs,vp]
-\end_layout
-
-\begin_layout LyX-Code
-db_A.label = Elastic properties from CVM-H
-\end_layout
-
-\begin_layout LyX-Code
-db_A.data_dir = /Users/willic3/geoframe/tools/vx53/bin
-\end_layout
-
-\begin_layout LyX-Code
-db_A.squash = False
-\end_layout
-
-\begin_layout LyX-Code
-values_B = [viscosity]
-\end_layout
-
-\begin_layout LyX-Code
-db_B.label = Vertically varying Maxwell material
-\end_layout
-
-\begin_layout LyX-Code
-db_B.iohandler.filename = ../spatialdb/mat_vert_var_maxwell.spatialdb
-\end_layout
-
-\begin_layout Standard
-Here we have specified a 
-\family typewriter
-CompositeDB
-\family default
- where the elastic properties (
-\family typewriter
-density
-\family default
-, 
-\family typewriter
-vs
-\family default
-, 
-\family typewriter
-vp
-\family default
-) are given by the SCEC CVM-H, and 
-\family typewriter
-viscosity
-\family default
- is described by a 
-\family typewriter
-SimpleDB
-\family default
- (
-\family typewriter
-mat_vert_var_maxwell.spatialdb
-\family default
-).
- The user must first specify 
-\family typewriter
-db_properties
-\family default
- as a 
-\family typewriter
-CompositeDB
-\family default
-, and must then give the two components of this database (
-\family typewriter
-SCECCVMH
-\family default
- and 
-\family typewriter
-SimpleDB
-\family default
-).
- The values to query in each of these databases is also required.
- This is followed by the usual parameters for each of the spatial databases.
- The 
-\family typewriter
-CompositeDB
-\family default
- provides a flexible mechanism for specifying material properties or boundary
- conditions where the variations come from two different sources.
-\end_layout
-
-\begin_layout Subsection
-Time History Database
-\end_layout
-
-\begin_layout Standard
-The time history database specifies the temporal variation in the amplitude
- of a field associated with a boundary condition.
- It is used in conjunction with spatial databases to provide spatial and
- temporal variation of parameters for boundary conditions.
- The same time history is applied to all of the locations, but the time
- history may be shifted with a spatial variation in the onset time and scaled
- with a spatial variation in the amplitude.
- The time history database uses a simple ASCII file which is simpler than
- the one used by the SimpleDB spatial database.
- The file format is described in Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:Spatialdata:TimeHistoryIO"
-
-\end_inset
-
-.
- 
-\end_layout
-
-\begin_layout Standard
-As in the other Pyre objects, spatial database objects contain parameters
- that can be set from the command line or using 
-\family typewriter
-.cfg or .pml
-\family default
- files.
- The parameters for a spatial database are:
-\end_layout
-
-\begin_layout Description
-label Label for the time history database, which is used in diagnostic messages.
-\end_layout
-
-\begin_layout Description
-filename Filename for the time history database.
-\end_layout
-
-\begin_layout Standard
-An example of setting these parameters in a 
-\family typewriter
-.cfg
-\family default
- file is:
-\end_layout
-
-\begin_layout LyX-Code
-label = Displacement time history
-\end_layout
-
-\begin_layout LyX-Code
-filename = mytimehistory.timedb
-\end_layout
-
-\begin_layout Section
-Labels and Identifiers for Materials, Boundary Conditions, and Faults
-\end_layout
-
-\begin_layout Standard
-For materials, the ``label'' is a string used only for error messages.
- The ``id'' is an integer that corresponds to the material identifier in
- LaGriT (itetclr) and CUBIT (block id).
- The id also tags the cells in the mesh for associating cells with a specific
- material model and quadrature rule.
- For boundary conditions, the ``label'' is a string used to associate groups
- of vertices (psets in LaGriT and nodesets in CUBIT) with a boundary condition.
- Some mesh generators use strings (LaGriT) to identify groups of nodes while
- others (CUBIT) use strings and integers.
- The default behavior in PyLith is to use strings to identify groups for
- both LaGriT and CUBIT meshes, but the behavior for CUBIT meshes can be
- changed to use the nodeset id (see Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:MeshIOCubit"
-
-\end_inset
-
-).
- PyLith 1.0 had an ``id'' for boundary conditions, but we removed it from
- subsequent releases because it was not used.
- For faults the ``label'' is used in the same manner as the ``label'' for
- boundary conditions.
- That is, it associates a string with a group of vertices (pset in LaGriT
- and nodeset in CUBIT).
- The fault ``id'' is a integer used to tag the cohesive cells in the mesh
- with a specific fault and quadrature rule.
- Because we use the fault ``id'' to tag cohesive cells in the mesh the same
- way we tag normal cells to materials, it must be unique among the faults
- as well as the materials.
-\end_layout
-
-\begin_layout Section
-PyLith Output
-\end_layout
-
-\begin_layout Standard
-PyLith currently supports output to VTK and HDF5/Xdmf files, which can be
- imported directly into a number of visualization tools, such as ParaView,
- Visit, and MayaVi.
- The HDF5 files can also be directly accessed via Matlab and PyTables.
- PyLith 1.1 significantly expanded the information available for output,
- including fault information and state variables.
- Output of solution information for the domain, faults, materials, and boundary
- conditions is controlled by an output manager for each module.
- This allows the user to tailor the output to the problem.
- By default PyLith will write a number of files.
- Diagnostic information for each fault and material is written into a separate
- file as are the solution and state variables for the domain, each fault,
- and each material.
- For a fault the diagnostic fields include the final slip, the slip initiation
- time, and the fault normal vector.
- For a material the diagnostic fields include the density and the elastic
- constants.
- Additional diagnostic information can be included by setting the appropriate
- output parameters.
- See Chapters 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "cha:material:models"
-
-\end_inset
-
- and 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "cha:boundary:interface:conditions"
-
-\end_inset
-
- for more information on the available fields and the next section for output
- parameters.
- The other files for each fault and material include solution information
- at each time step where output was requested (also customizable by the
- user).
- For a fault the solution information includes the slip and the change in
- tractions on the fault surface.
- For a material the solution information includes the total strain and stress.
- For some materials fields for additional state variables may be available.
- For output via VTK files, each time step is written to a separate file,
- whereas for HDF5 files all of the time steps for a given domain, fault,
- or material are written into the same file.
- A single Xdmf metadata file is created for each HDF5 file.
-\end_layout
-
-\begin_layout Subsection
-Output Manager
-\end_layout
-
-\begin_layout Standard
-The OutputManager object controls the type of files written, the fields
- included in the output, and how often output is written.
- PyLith includes some specialized OutputManagers that prescribe what fields
- are output by default.
- In some cases, additional fields are available but not included by default.
- For example, in 3D problems, the along-strike and up-dip directions over
- the fault surface can be included in the diagnostic information.
- These are not included by default, because 1D problems have neither an
- along-strike nor up-dip direction and 2D problems do not have an up-dip
- direction.
-\end_layout
-
-\begin_layout Subsubsection
-Output Manager Parameters
-\end_layout
-
-\begin_layout Standard
-The parameters for the OutputManager are:
-\end_layout
-
-\begin_layout Description
-output_freq Flag indicating whether to write output based on the time or
- number of time steps since the last output.
- Permissible values are ``time_step'' and ``skip'' (default).
-\end_layout
-
-\begin_layout Description
-time_step Minimum time between output if 
-\family typewriter
-output_freq
-\family default
- is set to ``time_step''.
-\end_layout
-
-\begin_layout Description
-skip Number of time steps between output if 
-\family typewriter
-output_freq
-\family default
- is set to ``skip''.
- A value of 0 means every time step is written.
-\end_layout
-
-\begin_layout Description
-writer Writer for data (VTK writer or HDF5 writer).
-\end_layout
-
-\begin_layout Description
-coordsys Coordinate system for vertex coordinates (currently ignored).
-\end_layout
-
-\begin_layout Description
-vertex_filter Filter to apply to all vertex fields (see Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sub:vertex:field:filters"
-
-\end_inset
-
-).
-\end_layout
-
-\begin_layout Description
-cell_filter Filter to apply to all cell fields (see Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sub:cell:field:filters"
-
-\end_inset
-
-).
-\end_layout
-
-\begin_layout Standard
-An example of setting the output parameters for a material in a 
-\family typewriter
-.cfg
-\family default
- file is
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.materials.elastic.output]
-\end_layout
-
-\begin_layout LyX-Code
-output_freq = time_step
-\end_layout
-
-\begin_layout LyX-Code
-time_step = 1.0*yr
-\end_layout
-
-\begin_layout LyX-Code
-cell_filter = pylith.meshio.CellFilterAvgMesh
-\end_layout
-
-\begin_layout LyX-Code
-cell_info_fields = [density] ; limit diagnostic data to density
-\end_layout
-
-\begin_layout LyX-Code
-cell_data_fields = [total-strain,stress] ; default
-\end_layout
-
-\begin_layout LyX-Code
-writer.filename = dislocation-elastic.vtk
-\end_layout
-
-\begin_layout Subsubsection
-Output Over Subdomain
-\end_layout
-
-\begin_layout Standard
-Output of the solution over the entire domain for large problems generates
- very large data files.
- In some cases one is primarily interested in the solution over the ground
- surface.
- PyLith supports output of the solution on any boundary of the domain by
- associating an output manager with a group of vertices corresponding to
- the surface of the boundary.
- As with several of the boundary conditions, the boundary must be a simply-conne
-cted surface.
- The OutputSolnSubset is the specialized OutputManager that implements this
- feature and, by default, includes the displacement field in the output.
- In addition to the OutputManager parameters, the OutputSolnSubset includes:
-\end_layout
-
-\begin_layout Description
-label Label of group of vertices defining boundary surface.
-\end_layout
-
-\begin_layout Description
-vertex_data_fields Names of vertex data fields to output (default is [``displace
-ments'']).
-\end_layout
-
-\begin_layout Subsection
-Output Field Filters
-\end_layout
-
-\begin_layout Standard
-Output fields may not directly correspond to the information a user desires.
- For example, the default output for the state variables includes the physical
- properties at each quadrature point.
- Most visualization packages cannot handle cell fields with multiple points
- in a cell (the locations of the points within the cell are not included
- in the data file).
- In order to reduce the field to a single point within the cell, we would
- like to average the values.
- This is best done within PyLith before output, because it reduces the file
- size and the quadrature information provides the information necessary
- (the weights of the quadrature points) to compute the appropriate average
- over the cell.
-\end_layout
-
-\begin_layout Subsubsection
-\begin_inset CommandInset label
-LatexCommand label
-name "sub:vertex:field:filters"
-
-\end_inset
-
-Vertex Field Filters
-\end_layout
-
-\begin_layout Standard
-Currently the only filter available for vertex fields computes the magnitude
- of a vector at each location.
- Most visualization packages support this operation, so this filter is not
- very useful.
-\end_layout
-
-\begin_layout Description
-VertexFilterVecNorm Computes the magnitude of a vector field at each location.
-\end_layout
-
-\begin_layout Subsubsection
-\begin_inset CommandInset label
-LatexCommand label
-name "sub:cell:field:filters"
-
-\end_inset
-
-Cell Field Filters
-\end_layout
-
-\begin_layout Standard
-Most users will want to apply a filter to cell fields to average the fields
- over the cell, producing values at one location per cell for visualization.
-\end_layout
-
-\begin_layout Description
-CellFilterAvgMesh Compute the weighted average of the values within a bulk
- cell.
- The weights are determined from the quadrature associated with the cells.
-\end_layout
-
-\begin_layout Description
-CellFilterAvgSubMesh Compute the weighted average of the values for a boundary
- cell.
- The weights are determined from the quadrature associated with the cells.
-\end_layout
-
-\begin_layout Subsection
-VTK Output
-\end_layout
-
-\begin_layout Standard
-PyLith writes legacy (non-XML) VTK files.
- These are simple files with vertex coordinates, the mesh topology, and
- fields over vertices and/or cells.
- Each time step is written to a different file.
- The time stamp is included in the filename with the decimal point removed.
- This allows automatic generation of animations with many visualization
- packages that use VTK files.
- The default time stamp is the time in seconds, but this can be changed
- using the normalization constant to give a time stamp in years, tens of
- years, or any other value.
-\end_layout
-
-\begin_layout Subsubsection
-DataWriterVTK Parameters
-\end_layout
-
-\begin_layout Standard
-The parameters for the VTK writer are:
-\end_layout
-
-\begin_layout Description
-filename Name of VTK file
-\end_layout
-
-\begin_layout Description
-time_format C-style format string for time stamp in filename.
- The decimal point in the time stamp will be removed for compatibility with
- VTK visualization packages that provide seamless animation of data from
- multiple VTK files.
-\end_layout
-
-\begin_layout Description
-time_constant Value used to normalize time stamp in VTK files (default is
- 1.0 s).
-\end_layout
-
-\begin_layout Subsection
-HDF5/Xdmf Output
-\end_layout
-
-\begin_layout Standard
-HDF5 files provide a flexible framework for storing simulation data with
- datasets in groups logically organized in a tree structure analogous to
- files in directories.
- HDF5 output offers parallel, multi-dimensional array output in binary files,
- so it is much faster and more convenient than the VTK output which uses
- ASCII files and separate files for each time step.
- Standards for organizing datasets and groups in HDF5 files do not exist
- for general finite-element software in geodynamics.
- Consequently, PyLith uses its own simple layout show in Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:hdf5:layout"
-
-\end_inset
-
-.
- In order for visualization tools, such as ParaView, to determine which
- datasets to read and where to find them in the hierarchy of groups within
- the HDF5 file, we create an Xdmf (eXtensible Data Model and Format, 
-\begin_inset Flex URL
-status open
-
-\begin_layout Plain Layout
-
-www.xdmf.org
-\end_layout
-
-\end_inset
-
-) metadata file that provides this information.
- This file is written when PyLith closes the HDF5 file at the end of the
- simulation.
- In order to visualize the datasets in an HDF5 file, one simply opens the
- corresponding Xdmf file (the extension is 
-\family typewriter
-.xmf
-\family default
-) in ParaView or Visit.
- The Xdmf file contains the relative path to the HDF5 file so the files
- can be moved but must be located together in the same directory.
- 
-\end_layout
-
-\begin_layout Quote
-
-\series bold
-\color red
-Note:
-\color inherit
- 
-\series default
-The Xdmf format supports representation of two- and three-dimensional coordinate
-s of points, scalar vector field types, and three-dimensional vector and
- tensor vector field types but not two-dimensional vector or tensor vector
- field types.
- As a result, we separate the components of two-dimensional vector and tensor
- vector field objects and add the component as a suffix to the name of the
- field.
- The vector can be reconstructed within ParaView using the Calculator (see
- Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:Tutorial-Subduction"
-
-\end_inset
-
- for an example).
- Accessing the datasets in the HDF5 files using tools such as PyTables with
- visualization through MayaVi circumvents this problem, but requires writing
- Python scripts and a deeper knowledge of the visualization interface.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\noindent
-\align center
-\begin_inset Graphics
-	filename figs/hdf5layout.eps
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Layout of PyLith HDF5 file.
- The orange rectangles with rounded corners identify the groups and the
- blue rectangles with sharp corners identify the datasets.
- The dimensions of the data sets are shown in parentheses.
- Most HDF5 files will contain either 
-\family typewriter
-vertex_fields
-\family default
- or 
-\family typewriter
-cell_fields
-\family default
- but not both.
- 
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:hdf5:layout"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-HDF5 files do not contain self-correcting features that allow a file to
- be read if part of a dataset is corrupted.
- This type of error can occur if a job terminates abnormally in the middle
- or at the end of a simulation on a large cluster or other parallel machine.
- Fortunately, HDF5 also offers the ability to store datasets in external
- binary files with the locations specified by links in the HDF5 file.
- Note that the use of external data files results in one data file per dataset
- in addition to the HDF5 and Xdmf files.
- The external data files use the name of the HDF5 file with the dataset
- name added to the prefix and the 
-\family typewriter
-.h5
-\family default
- suffix replaced by 
-\family typewriter
-.dat
-\family default
-).
- The HDF5 files include relative paths to the external data files, so these
- files can also be moved, but they, too, must be kept together in the same
- directory.
- This provides a more robust method of output because one can generate an
- HDF5 file associated with the uncorrupted portions of the external data
- files should an error occur.
- Currently, PyLith does not include a utility to do this, but we plan to
- add one in a future release.
- Thus, there are two options when writing PyLith output to HDF5 files: (1)
- including the datasets directly in the HDF5 files themselves or (2) storing
- the datasets in external binary files with just metadata in the HDF5 files.
- Both methods provide similar performance because they will use MPI I/O
- if it is available.
- 
-\end_layout
-
-\begin_layout Quote
-
-\series bold
-\color red
-Warning:
-\color inherit
- 
-\series default
-Storing the datasets within the HDF5 file in a parallel simulation requires
- that the HDF5 library be configured with the 
-\family typewriter
---enable-parallel
-\family default
- option.
- 
-\color none
-The binary PyLith packages include this feature and it is a default setting
- in building HDF5 via the PyLith Installer.
-\end_layout
-
-\begin_layout Standard
-Accessing the datasets for additional analysis or visualization is identical
- in the two methods because the use of external data files is completely
- transparent to the user except for the presence of the additional files.
-\end_layout
-
-\begin_layout Subsubsection
-HDF5 utilities
-\end_layout
-
-\begin_layout Standard
-HDF5 includes several utilities for examining the contents of HDF5 files.
- 
-\family typewriter
-h5dump
-\family default
- is very handy for displaying the hierarchy, dimensions of datasets, attributes,
- and even the dataset values.
- 
-\end_layout
-
-\begin_layout Quote
-Dump the entire HDF5 file to stdout (not practical or useful for large files):
-\end_layout
-
-\begin_deeper
-\begin_layout LyX-Code
-h5dump mydata.h5
-\end_layout
-
-\end_deeper
-\begin_layout Quote
-Dump the hierarchy of an HDF5 file to stdout:
-\end_layout
-
-\begin_deeper
-\begin_layout LyX-Code
-h5dump -n mydata.h5
-\end_layout
-
-\end_deeper
-\begin_layout Quote
-Dump the hierarchy with dataset dimensions and attributes to stdout:
-\end_layout
-
-\begin_deeper
-\begin_layout LyX-Code
-h5dump -H mydata.h5
-\end_layout
-
-\end_deeper
-\begin_layout Quote
-Dump dataset 'vertices' in group '/geometry' to stdout:
-\end_layout
-
-\begin_deeper
-\begin_layout LyX-Code
-h5dump -d /geometry/vertices mydata.h5
-\end_layout
-
-\end_deeper
-\begin_layout Subsubsection
-DataWriterHDF5 Parameters
-\end_layout
-
-\begin_layout Standard
-This HDF5 writer stores the datasets inside the HDF5 file and the parameters
- are:
-\end_layout
-
-\begin_layout Description
-filename Name of HDF5 file (the Xdmf filename is generated from the same
- prefix).
-\end_layout
-
-\begin_layout Subsubsection
-DataWriterHDF5Ext Parameters
-\end_layout
-
-\begin_layout Standard
-This HDF5 writer stores the datasets using external data files (a more robust
- method for parallel runs) and the parameters are:
-\end_layout
-
-\begin_layout Description
-filename Name of HDF5 file (the external dataset filenames and the Xdmf
- filename are generated from the same prefix).
-\end_layout
-
-\begin_layout Standard
-An example of changing the writer from the default VTK writer to the HDF5
- writer with external datasets for output over the domain in a 
-\family typewriter
-.cfg
-\family default
- file is
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.domain.output]
-\end_layout
-
-\begin_layout LyX-Code
-output_freq = time_step
-\end_layout
-
-\begin_layout LyX-Code
-time_step = 1.0*yr
-\end_layout
-
-\begin_layout LyX-Code
-cell_data_fields = [displacement,velocity]
-\end_layout
-
-\begin_layout LyX-Code
-writer = pylith.meshio.DataWriterHDF5ExtMesh
-\end_layout
-
-\begin_layout LyX-Code
-writer.filename = dislocation.h5
-\end_layout
-
-\begin_layout Section
-Tips and Hints
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:Tips:Hints"
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Tips and Hints For Running PyLith
-\end_layout
-
-\begin_layout Itemize
-Examine the examples for a problem similar to the one you want to run and
- dissect it in detail.
-\end_layout
-
-\begin_layout Itemize
-Start with a uniform-resolution coarse mesh to debug the problem setup.
- Increase the resolution as necessary to resolve the solution fields of
- interest (resolving stresses/strains may require a higher resolution than
- that for resolving displacements).
-\end_layout
-
-\begin_layout Itemize
-Merge materials using the same material model.
- This will result in only one VTK file for each material model rather than
- several files.
-\end_layout
-
-\begin_layout Itemize
-The rate of convergence in quasi-static (implicit) problems can sometimes
- be improved by renumbering the vertices in the finite-element mesh to reduce
- the bandwidth of the sparse matrix.
- PyLith can use the reverse Cuthill-McKee algorithm to reorder the vertices
- and cells.
-\end_layout
-
-\begin_layout Itemize
-If you encounter errors or warnings, run 
-\family typewriter
-pylithinfo
-\family default
- or use the 
-\family typewriter
---help
-\family default
-, 
-\family typewriter
---help-components
-\family default
-, and 
-\family typewriter
---help-properties
-\family default
- command line arguments when running PyLith to check the parameters to make
- sure PyLith is using the parameters you intended.
-\end_layout
-
-\begin_layout Itemize
-Use the 
-\family typewriter
---petsc.log_summary
-\family default
-, 
-\family typewriter
---petsc.ksp_monitor
-\family default
-, 
-\family typewriter
---petsc.ksp_view
-\family default
-, 
-\family typewriter
---petsc.ksp_converged_reason
-\family default
-, and 
-\family typewriter
---petsc.snes_converged_reason
-\family default
- command line arguments (or set them in a parameter file) to view PyLith
- performance and monitor the convergence.
-\end_layout
-
-\begin_layout Itemize
-Turn on the journals (see the examples) to monitor the progress of the code.
-\end_layout
-
-\begin_layout Subsection
-Troubleshooting
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:Troubleshooting"
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Itemize
-
-\family typewriter
-ImportError: liblapack.so.2: cannot open shared object file: No such file
- or directory
-\end_layout
-
-\begin_layout Quote
-PyLith cannot find one of the libraries.
- You need to set up your environment variables (e.g., PATH, PYTHONPATH, and
- LD_LIBRARY_PATH) to match your installation.
- If you are using the PyLith binary on Linux or Mac OS X, run the command
- 
-\family typewriter
-source setup.sh 
-\family default
-in the directory where you unpacked the distribution.
- This will set up your environment variables for you.
- If you are building PyLith from source, please consult the instructions
- for building from source.
-\end_layout
-
-\begin_layout Itemize
-\paragraph_spacing single
-
-\family typewriter
->> {command line}:: 
-\begin_inset Newline newline
-\end_inset
-
--- pyre.inventory(error) 
-\begin_inset Newline newline
-\end_inset
-
--- p4wd <- 'true' 
-\begin_inset Newline newline
-\end_inset
-
--- unrecognized property 'p4wd' 
-\begin_inset Newline newline
-\end_inset
-
->> {command line}:: 
-\begin_inset Newline newline
-\end_inset
-
--- pyre.inventory(error) 
-\begin_inset Newline newline
-\end_inset
-
--- p4pg <- 'true' 
-\begin_inset Newline newline
-\end_inset
-
--- unrecognized property ' p4pg'
-\end_layout
-
-\begin_layout Quote
-Verify that the `mpirun' command included in the PyLith package is the first
- one on your PATH:
-\end_layout
-
-\begin_layout Quote
-
-\family typewriter
-$ which mpirun
-\end_layout
-
-\begin_layout Quote
-If it is not, adjust your PATH environment variable accordingly.
-\end_layout
-
-\begin_layout Itemize
-
-\family typewriter
-"merlin.DistributionNotFound: Cheetah" error
-\end_layout
-
-\begin_layout Quote
-This error occurs when trying to use the 32-bit linux binary on some 64-bit
- linux systems.
- One of the Python packages PyLith uses does not know how to determine the
- system architecture at runtime.
- The workaround is:
-\end_layout
-
-\begin_layout Enumerate
-Go to the lib/python2.6/site-packages directory.
-\end_layout
-
-\begin_layout Enumerate
-Unzip merlin-1.7-py2.6.egg (if it is a file and not a directory).
-\end_layout
-
-\begin_layout Enumerate
-Go to the merlin directory.
-\end_layout
-
-\begin_layout Enumerate
-Edit __init__.py.
- Replace line 308 plat = get_platform() with plat = "linux-i686"
-\end_layout
-
-\begin_layout Enumerate
-If merlin-1.7-py2.6.egg is a file, rezip merlin.
- Go to the site-packages directory and enter "zip -r merlin-1.7-py2.6.egg merlin".
-\end_layout
-
-\begin_layout Itemize
-
-\family typewriter
--- Solving equations.
-\begin_inset Newline newline
-\end_inset
-
-[0]PETSC ERROR: ---------------- Error Message -------------------------------
- 
-\begin_inset Newline newline
-\end_inset
-
-[0]PETSC ERROR: Detected zero pivot in LU factorization
-\begin_inset Newline newline
-\end_inset
-
- see http://www.mcs.anl.gov/petsc/petsc-as/documentation/faq.html#ZeroPivot!
-\end_layout
-
-\begin_layout Quote
-This usually occurs when the null space of the system Jacobian is nonzero,
- such as the case of a problem without Dirichlet boundary conditions on
- any boundary.
- If this arises when using the split fields and algebraic multigrid precondition
-ing and no additional Dirichlet boundary conditions are desired, then the
- workaround is to revert to using the Additive Schwarz preconditioning without
- split fields as discussed in Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:petsc:options"
-
-\end_inset
-
-.
- 
-\end_layout
-
-\begin_layout Itemize
-PyLith crashes with a bus error.
-\end_layout
-
-\begin_layout Quote
-This often indicates that PyLith is using incompatible versions of libraries.
- This can result from changing your environment variables after configuring
- or installing PyLith (when building from source) or errors in setting the
- environment variables (PATH, LD_LIBRARY_PATH, and PYTHONPATH).
- If the former case, simply reconfigure and rebuild PyLith.
- In the latter case, check your environment variables (order matters!) to
- make sure PyLith finds the desired directories before system directories.
- 
-\end_layout
-
-\begin_layout Itemize
-PyLith crashes with a segmentation fault.
-\end_layout
-
-\begin_layout Quote
-A segmentation fault might be caused by an error that wasn't trapped or
- a bug in the code.
- Please report these cases so that we can fix these problems (either trap
- the error and provide the user with an informative error message, or fix
- the bug).
- If this occurs with any of the problems distributed with PyLith, simply
- submit a bug report (see Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:Getting-Help-and"
-
-\end_inset
-
-) indicating which problem you ran and your platform.
- If the crash occurs for a problem you created, it is a great help if you
- can try to reproduce the crash with a very simple problem (e.g., adjust the
- boundary conditions or other parameters of one of the examples to reproduce
- the segmentation fault).
- Submit a bug report along with log files showing the backtrace from a debugger
- (e.g., gdb) and the valgrind log file (only available on Linux platforms).
- You can generate a backtrace using the debugger by using the 
-\family typewriter
---petsc.start_in_debugger
-\family default
- command line argument:
-\end_layout
-
-\begin_layout LyX-Code
-pylith [..args..] --petsc.start_in_debugger
-\end_layout
-
-\begin_layout LyX-Code
-(gdb) continue
-\end_layout
-
-\begin_layout LyX-Code
-(gdb) backtrace
-\end_layout
-
-\begin_layout Quote
-To use valgrind to detect the memory error, first go to your working directory
- and run the problem with 
-\family typewriter
---launcher.dry
-\family default
-:
-\end_layout
-
-\begin_layout LyX-Code
-pylith [..args..] --launcher.dry
-\end_layout
-
-\begin_layout Quote
-Instead of actually running the problem, this causes PyLith to dump the
- mpirun/mpiexec command it will execute.
- Copy and paste this command into your shell so you can run it directly.
- Insert the full path to valgrind before the full path to mpinemesis and
- tell valgrind to use a log file:
-\end_layout
-
-\begin_layout LyX-Code
-
-\size small
-mpirun -np 1 /path/to/valgrind --log-file=valgrind-log  /path/to/mpinemesis
- --pyre-start [..lots of junk..]
-\end_layout
-
-\end_body
-\end_document
+#LyX 2.0 created this file. For more info see http://www.lyx.org/
+\lyxformat 413
+\begin_document
+\begin_header
+\textclass book
+\begin_preamble
+
+\end_preamble
+\use_default_options false
+\maintain_unincluded_children false
+\language english
+\language_package default
+\inputencoding latin1
+\fontencoding global
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry true
+\use_amsmath 1
+\use_esint 0
+\use_mhchem 1
+\use_mathdots 1
+\cite_engine basic
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\use_refstyle 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\leftmargin 1in
+\topmargin 1in
+\rightmargin 1in
+\bottommargin 2in
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\quotes_language english
+\papercolumns 1
+\papersides 2
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\end_header
+
+\begin_body
+
+\begin_layout Chapter
+Running PyLith
+\end_layout
+
+\begin_layout Standard
+There are essentially three major inputs needed to run a problem with PyLith:
+\end_layout
+
+\begin_layout Enumerate
+A set of parameters describing the problem.
+ These parameters describe the type of problem to be run, solver information,
+ time-stepping information, boundary conditions, materials, etc.
+ This information can be provided from the command-line or by using a 
+\family typewriter
+.cfg
+\family default
+ or 
+\family typewriter
+.pml
+\family default
+ file.
+\end_layout
+
+\begin_layout Enumerate
+Mesh information.
+ This includes the topology of the finite-element mesh (coordinates of vertices
+ and how the vertices are connected into cells), a material identifier for
+ each cell, and sets of vertices associated with boundary conditions, faults,
+ and output (for subsets of the mesh).
+ This information can be provided using the PyLith mesh ASCII format (see
+ Chapter 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "cha:Tutorials"
+
+\end_inset
+
+ for examples and Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:MeshIOAscii"
+
+\end_inset
+
+ for the format specification) or by importing the information from the
+ LaGriT or CUBIT meshing packages (see Chapter 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "cha:Tutorials"
+
+\end_inset
+
+ for examples).
+\end_layout
+
+\begin_layout Enumerate
+Databases specifying the material property values and boundary condition
+ values to be used.
+ Arbitrarily complex spatial variations in boundary and fault conditions
+ and material properties may be given in the spatial database (see Chapter
+ 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "cha:Tutorials"
+
+\end_inset
+
+ for examples and Appendix 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Spatialdata:SimpleIOAscii"
+
+\end_inset
+
+ for the format specification).
+\end_layout
+
+\begin_layout Section
+Defining the Simulation
+\end_layout
+
+\begin_layout Standard
+The parameters for PyLith are specified as a hierarchy or tree of modules.
+ The application assembles the hierarchy of modules from user input and
+ then calls the 
+\family typewriter
+main
+\family default
+ function in the top-level module in the same manner as a C or C++ program.
+ The behavior of the application is determined by the modules included in
+ the hierarchy as specified by the user.
+ The Pyre framework provides the interface for defining this hierarchy.
+ Pyre properties correspond to simple settings in the form of strings, integers,
+ and real numbers.
+ Pyre facilities correspond to software modules.
+ Facilities may have their own facilities (branches in the tree) and any
+ number of properties.
+ See Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:Pyre:Architecture"
+
+\end_inset
+
+ for the general concept of Pyre facilities and properties.
+ The top-level object is the PyLith application with three facilities: 
+\family typewriter
+mesher
+\family default
+, 
+\family typewriter
+problem
+\family default
+, and 
+\family typewriter
+petsc
+\family default
+.
+ The 
+\family typewriter
+mesher
+\family default
+ specifies how to import the mesh, the 
+\family typewriter
+problem
+\family default
+ specifies the physical properties, boundary conditions, etc., and 
+\family typewriter
+petsc
+\family default
+ is used to specify PETSc settings.
+ Appendix 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "cha:components"
+
+\end_inset
+
+ contains a list of the components provided by PyLith and spatialdata.
+\end_layout
+
+\begin_layout Subsection
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:setting:parameters"
+
+\end_inset
+
+Setting PyLith Parameters
+\end_layout
+
+\begin_layout Standard
+There are several methods for setting input parameters for the 
+\family typewriter
+pylith
+\family default
+ executable: via the command line or by using a text file in 
+\family typewriter
+.cfg
+\family default
+ or 
+\family typewriter
+.pml
+\family default
+ format.
+ Both facilities and properties have default values provided, so you only
+ need to set values when you want to deviate from the default behavior.
+\end_layout
+
+\begin_layout Subsubsection
+Units
+\end_layout
+
+\begin_layout Standard
+All dimensional parameters require units.
+ The units are specified using Python and FORTRAN syntax, so square meters
+ is m**2.
+ Whitespace is not allowed in the string, for units and dimensioned quantities
+ are multiplied by the units string; for example, two meters per second
+ is 2.0*m/s.
+ Available units are shown in Table 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "tab:pyre:units"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float table
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Caption
+
+\begin_layout Plain Layout
+\begin_inset CommandInset label
+LatexCommand label
+name "tab:pyre:units"
+
+\end_inset
+
+Pyre supported units.
+ Aliases are in parentheses.
+\end_layout
+
+\end_inset
+
+
+\begin_inset Tabular
+<lyxtabular version="3" rows="5" columns="2">
+<features tabularvalignment="middle">
+<column alignment="left" valignment="top" width="0.9in">
+<column alignment="left" valignment="top" width="4in">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Scale
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Available Units
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+length
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+meter (m), micrometer (um, micron), millimeter (mm), centimeter (cm), kilometer
+ (km), inch, foot, yard, mile
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+time
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+second (s), nanosecond (ns), microsecond (us), millisecond (ms), minute,
+ hour, day, year
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+mass
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+kilogram (kg), gram (g), centigram (cg), milligram (mg), ounce, pound, ton
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+pressure
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+pascal (Pa), kPa, MPa, GPa, bar, millibar, atmosphere (atm)
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Using the Command Line
+\end_layout
+
+\begin_layout Standard
+Pyre uses the following syntax to change properties from the command line.
+ To change the value of a property of a component, use:
+\end_layout
+
+\begin_layout LyX-Code
+
+\family typewriter
+--[component].[property]=[value]
+\end_layout
+
+\begin_layout Standard
+Each component is attached to a facility, so the option above can also be
+ written as: 
+\end_layout
+
+\begin_layout LyX-Code
+
+\family typewriter
+--[facility].[property]=[value]
+\end_layout
+
+\begin_layout Standard
+Each facility has a default component attached to it.
+ A different component can be attached to a facility by:
+\end_layout
+
+\begin_layout LyX-Code
+
+\family typewriter
+--[facility]=[new_component] 
+\end_layout
+
+\begin_layout Standard
+PyLith's command-line arguments can control Pyre and PyLith properties and
+ facilities, MPI settings, and PETSc settings.
+ You can get more information on the available options by typing
+\end_layout
+
+\begin_layout LyX-Code
+
+\family typewriter
+$ pylith --help
+\end_layout
+
+\begin_layout Standard
+All PyLith-related properties are associated with the 
+\family typewriter
+pylithapp
+\family default
+ component.
+ You can get a list of all of these top-level properties along with a descriptio
+n of what they do by running PyLith with the 
+\family typewriter
+--help-properties
+\family default
+ command-line argument.
+ To get information on user-configurable facilities and components, you
+ can run PyLith with the 
+\family typewriter
+--help-components
+\family default
+ command-line argument.
+ To find out about the properties associated with a given component, you
+ can run PyLith with the 
+\family typewriter
+--[component].help-properties
+\family default
+ flag:
+\end_layout
+
+\begin_layout LyX-Code
+$ pylith --problem.help-properties
+\end_layout
+
+\begin_layout Standard
+Each component may also have sub-components associated with it:
+\end_layout
+
+\begin_layout LyX-Code
+$ pylith -- problem.help-components
+\end_layout
+
+\begin_layout Standard
+By starting at the top-level components, you can determine the components
+ and properties at each level by working down to lower-level components:
+\end_layout
+
+\begin_layout LyX-Code
+$ pylith --problem.bc.help-components
+\end_layout
+
+\begin_layout LyX-Code
+$ pylith --problem.bc.help-properties
+\end_layout
+
+\begin_layout Standard
+Using the 
+\family typewriter
+--help-components
+\family default
+ and 
+\family typewriter
+--help-properties
+\family default
+ flags for the various components and sub-components is a good way to discover
+ potential problems in a simulation.
+\end_layout
+
+\begin_layout Subsubsection
+Using a 
+\family typewriter
+.cfg
+\family default
+ File
+\end_layout
+
+\begin_layout Standard
+Entering all those parameters via the command line involves the risk of
+ typographical errors, which can lead to undesired results.
+ You will generally find it easier to write a brief 
+\family typewriter
+.cfg
+\family default
+ input file that contains the parameters.
+ This file has a format similar to a Windows INI file.
+ The file is composed of one or more sections which are formatted as follows:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.subcomponent1.subcomponent2]
+\end_layout
+
+\begin_layout LyX-Code
+# this is a comment
+\end_layout
+
+\begin_layout LyX-Code
+property1 = value1
+\end_layout
+
+\begin_layout LyX-Code
+property2 = value2 ; this is another comment
+\end_layout
+
+\begin_layout Standard
+We strongly recommend that you use 
+\family typewriter
+.cfg
+\family default
+ files for your work.
+ The files are syntax-colored in the vim editor.
+\end_layout
+
+\begin_layout Subsubsection
+Using a 
+\family typewriter
+.pml
+\family default
+ File
+\end_layout
+
+\begin_layout Standard
+A 
+\family typewriter
+.pml
+\family default
+ file is an XML file that specifies parameter values in a highly structured
+ format.
+ It is composed of nested sections which are formatted as follows:
+\end_layout
+
+\begin_layout LyX-Code
+<component name='component1'>
+\end_layout
+
+\begin_layout LyX-Code
+    <component name='component2'>
+\end_layout
+
+\begin_layout LyX-Code
+        <property name='property1'>value1</property>
+\end_layout
+
+\begin_layout LyX-Code
+        <property name='property2'>value2</property>
+\end_layout
+
+\begin_layout LyX-Code
+    </component>
+\end_layout
+
+\begin_layout LyX-Code
+</component>
+\end_layout
+
+\begin_layout Standard
+XML files are intended to be read and written by machines, not edited manually
+ by humans.
+ The 
+\family typewriter
+.pml
+\family default
+ file format is intended for applications in which PyLith input files are
+ generated by another program, e.g., a GUI, web application, or a high-level
+ structured editor.
+ This file format will not be discussed further here, but if you are interested
+ in using 
+\family typewriter
+.pml
+\family default
+ files, note that 
+\family typewriter
+.pml
+\family default
+ files and 
+\family typewriter
+.cfg
+\family default
+ files can be used interchangeably; in the following discussion, a file
+ with a 
+\family typewriter
+.pml
+\family default
+ extension can be substituted anywhere a 
+\family typewriter
+.cfg
+\family default
+ file can be used.
+\end_layout
+
+\begin_layout Subsubsection
+Specification and Placement of Configuration Files
+\end_layout
+
+\begin_layout Standard
+Configuration files may be specified on the command line:
+\end_layout
+
+\begin_layout LyX-Code
+$ pylith example.cfg
+\end_layout
+
+\begin_layout Standard
+In addition, the Pyre framework searches for configuration files named 
+\family typewriter
+pylithapp.cfg
+\family default
+ in several predefined locations.
+ You may put settings in any or all of these locations, depending on the
+ scope you want the settings to have:
+\end_layout
+
+\begin_layout Enumerate
+
+\family typewriter
+$PREFIX/etc/pylithapp.cfg
+\family default
+, for system-wide settings;
+\end_layout
+
+\begin_layout Enumerate
+
+\family typewriter
+$HOME/.pyre/pylithapp/pylithapp.cfg
+\family default
+, for user settings and preferences;
+\end_layout
+
+\begin_layout Enumerate
+the current directory (
+\family typewriter
+./pylithapp.cfg
+\family default
+), for local overrides.
+ 
+\end_layout
+
+\begin_layout Standard
+Parameters given directly on the command line will override any input contained
+ in a configuration file.
+ Configuration files given on the command line override all others.
+ The 
+\family typewriter
+pylithapp.cfg
+\family default
+ files placed in (3) will override those in (2), (2) overrides (1), and
+ (1) overrides only the built-in defaults.
+\end_layout
+
+\begin_layout Standard
+All of the example problems are set up using configuration files in the
+ example directory, and specific problems are defined by including the appropria
+te configuration file on the command-line.
+ Referring to the directory 
+\family typewriter
+examples/twocells/twohex8
+\family default
+, the following configuration files are present:
+\end_layout
+
+\begin_layout LyX-Code
+axialdisp.cfg
+\end_layout
+
+\begin_layout LyX-Code
+dislocation.cfg
+\end_layout
+
+\begin_layout LyX-Code
+pylithapp.cfg
+\end_layout
+
+\begin_layout LyX-Code
+sheardisp.cfg
+\end_layout
+
+\begin_layout Standard
+The settings in pylithapp.cfg will be read automatically, and additional
+ settings are included by specifying one of the other files on the command-line:
+\end_layout
+
+\begin_layout LyX-Code
+$ pylith axialdisp.cfg
+\end_layout
+
+\begin_layout Standard
+If you want to see what settings are being used, you can either examine
+ the 
+\family typewriter
+.cfg
+\family default
+ files, or use the help flags as described above:
+\end_layout
+
+\begin_layout LyX-Code
+$ pylith axialdisp.cfg --problem.help-components
+\end_layout
+
+\begin_layout LyX-Code
+$ pylith axialdisp.cfg --problem.help-properties
+\end_layout
+
+\begin_layout LyX-Code
+$ pylith axialdisp.cfg --problem.bc.help-components
+\end_layout
+
+\begin_layout LyX-Code
+$ pylith axialdisp.cfg --problem.bc.help-properties
+\end_layout
+
+\begin_layout Standard
+This is generally a more useful way of determining problem settings, since
+ it includes default values as well as those that have been specified in
+ the 
+\family typewriter
+.cfg
+\family default
+ file.
+\end_layout
+
+\begin_layout Subsubsection
+List of PyLith Parameters (
+\family typewriter
+pylithinfo
+\family default
+)
+\end_layout
+
+\begin_layout Standard
+The Python application 
+\family typewriter
+pylithinfo
+\family default
+ writes all of the current parameters to a text file.
+ The default name of the text file is 
+\family typewriter
+pylith_parameters.txt
+\family default
+.
+ The usage synopsis is
+\end_layout
+
+\begin_layout LyX-Code
+$ pylithinfo [--verbose] [--fileout=pylith_parameters.txt] [PyLith args]
+\end_layout
+
+\begin_layout Standard
+where 
+\family typewriter
+--verbose
+\family default
+ (or 
+\family typewriter
+-v
+\family default
+) turns on printing the descriptions of the properties and components as
+ well as the location where the current value was set, and 
+\family typewriter
+--fileout=pylith_parameters.txt
+\family default
+ (or 
+\family typewriter
+-o pylith_parameters.txt
+\family default
+) sets the name of the output file.
+ The lines in the text file are indented to show the hierarchy of the properties
+ and components.
+ 
+\end_layout
+
+\begin_layout Subsection
+Mesh Information (
+\family typewriter
+mesher
+\family default
+)
+\end_layout
+
+\begin_layout Standard
+Geometrical and topological information for the finite element mesh may
+ be provided by exporting an Exodus II format file from CUBIT, by exporting
+ a GMV file and an accompanying Pset file from LaGriT, or by specifying
+ the information in PyLith mesh ASCII format.
+ See Chapter 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "cha:Tutorials"
+
+\end_inset
+
+ for examples.
+\end_layout
+
+\begin_layout Standard
+PyLith supports linear cells in 1D (Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:1D-linear-elements"
+
+\end_inset
+
+), 2D (Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:2D-linear-elements"
+
+\end_inset
+
+), and 3D (Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:3D-linear-elements"
+
+\end_inset
+
+).
+ The vertex ordering must follow the convention shown in Figures 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:1D-linear-elements"
+
+\end_inset
+
+-
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:3D-linear-elements"
+
+\end_inset
+
+.
+ Quadratic cells are also supported, but at present the only method for
+ using these cells in PyLith is using PyLith ASCII format.
+ PyLith does not yet support automatic generation of a quadratic mesh from
+ the linear meshes created by CUBIT or LaGriT.
+\end_layout
+
+\begin_layout Standard
+The mesh information defines the vertex coordinates and specifies the vertices
+ composing each cell in the mesh.
+ The mesh information must also define at least one set of vertices for
+ which displacement (Dirichlet) boundary conditions will be provided.
+ In most realistic problems, there will be several vertex groups, each with
+ a unique identifying label.
+ For example, one group might define a surface of the mesh where displacement
+ (Dirichlet) boundary conditions will be applied, another might define a
+ surface where traction (Neumann) boundary conditions will be applied, while
+ a third might specify a surface that defines a fault.
+ Similarly, the mesh information contains cell labels that define the material
+ type for each cell in the mesh.
+ For a mesh with a single material type, there will only be a single label
+ for every cell in the mesh.
+ See Chapters 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "cha:material:models"
+
+\end_inset
+
+ and 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "cha:boundary:interface:conditions"
+
+\end_inset
+
+ for more detailed discussions of setting the materials and boundary conditions.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\noindent
+\align center
+\begin_inset Graphics
+	filename figs/bar2.eps
+
+\end_inset
+
+ 
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Linear bar cell available for 1D problems.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:1D-linear-elements"
+
+\end_inset
+
+ 
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\noindent
+\align center
+\begin_inset Graphics
+	filename figs/tri3.eps
+
+\end_inset
+
+
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+hspace*{0.5in}
+\end_layout
+
+\end_inset
+
+
+\begin_inset Graphics
+	filename figs/quad4.eps
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Linear cells available for 2D problems are the triangle (left) and the quadrilat
+eral (right).
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:2D-linear-elements"
+
+\end_inset
+
+ 
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\noindent
+\align center
+\begin_inset Graphics
+	filename figs/tet4.eps
+
+\end_inset
+
+
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+hspace*{0.5in}
+\end_layout
+
+\end_inset
+
+
+\begin_inset Graphics
+	filename figs/hex8.eps
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Linear cells available for 3D problems are the tetrahedron (left) and the
+ hexahedron (right).
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:3D-linear-elements"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Mesh Importer
+\end_layout
+
+\begin_layout Standard
+The default mesher component is MeshImporter, which provides the capabilities
+ of reading the mesh from files.
+ The MeshImporter has several properties and facilities:
+\end_layout
+
+\begin_layout Description
+reorder_mesh Reorder the vertices and cells using the reverse Cuthill-McKee
+ algorithm (default is False).
+\end_layout
+
+\begin_layout Description
+reader Reader for a given type of mesh (default is MeshIOAscii).
+\end_layout
+
+\begin_layout Description
+distributor Handles distribution of the mesh among processors.
+\end_layout
+
+\begin_layout Description
+refiner Perform global uniform mesh refinement after distribution among
+ processors (default is False).
+\end_layout
+
+\begin_layout Standard
+Reordering the mesh so that vertices and cells connected topologically also
+ reside close together in memory improves overall performance and can improve
+ solver performance as well.
+\end_layout
+
+\begin_layout Quote
+
+\color red
+Note:
+\color inherit
+ The coordinate system associated with the mesh must be a Cartesian coordinate
+ system.
+ This includes generic Cartesian coordinate systems as well as geographic
+ projections.
+\end_layout
+
+\begin_layout Subsubsection
+MeshIOAscii
+\end_layout
+
+\begin_layout Standard
+The MeshIOAscii object is intended for reading small, simple ASCII files
+ containing a mesh constructed by hand.
+ We use this file format extensively in the examples.
+ Appendix 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:MeshIOAscii"
+
+\end_inset
+
+ describes the format of the files.
+ The properties and facilities of the MeshIOAscii object include:
+\end_layout
+
+\begin_layout Description
+filename Name of the mesh file.
+\end_layout
+
+\begin_layout Description
+coordsys Coordinate system associated with the mesh.
+\end_layout
+
+\begin_layout Subsubsection
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:MeshIOCubit"
+
+\end_inset
+
+MeshIOCubit
+\end_layout
+
+\begin_layout Standard
+The MeshIOCubit object reads the NetCDF Exodus II files output from CUBIT.
+ Beginning with CUBIT 11.0, the names of the nodesets are included in the
+ Exodus II files and PyLith can use these nodeset names or revert to using
+ the nodeset ids.
+ The properties and facilities associated with the MeshIOCubit object are:
+\end_layout
+
+\begin_layout Description
+filename Name of the Exodus II file.
+\end_layout
+
+\begin_layout Description
+use_nodeset_names Identify nodesets by name rather than id (default is True).
+\end_layout
+
+\begin_layout Description
+coordsys Coordinate system associated with the mesh.
+\end_layout
+
+\begin_layout Subsubsection
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:MeshIOLagrit"
+
+\end_inset
+
+MeshIOLagrit
+\end_layout
+
+\begin_layout Standard
+The MeshIOLagrit object is used to read ASCII and binary GMV and PSET files
+ output from LaGriT.
+ PyLith will automatically detect whether the files are ASCII or binary.
+ We attempt to provide support for experimental 64-bit versions of LaGriT
+ via flags indicating whether the FORTRAN code is using 32-bit or 64-bit
+ integers.
+ The MeshIOLagrit properties and facilities are:
+\end_layout
+
+\begin_layout Description
+filename_gmv Name of GMV file.
+\end_layout
+
+\begin_layout Description
+filename_pset Name of the PSET file.
+\end_layout
+
+\begin_layout Description
+flip_endian Flip the endian of values when reading binary files (default
+ is False).
+\end_layout
+
+\begin_layout Description
+io_int32 Flag indicating that PSET files use 32-bit integers (default is
+ True).
+\end_layout
+
+\begin_layout Description
+record_header_32bt Flag indicating FORTRAN record header is 32-bit (default
+ is True)
+\end_layout
+
+\begin_layout Description
+coordsys Coordinate system associated with mesh.
+\end_layout
+
+\begin_layout Subsubsection
+Distributor
+\end_layout
+
+\begin_layout Standard
+The distributor users a partitioner to compute which cells should be placed
+ on each processor, computes the overlap among the processors, and then
+ distributes the mesh among the processors.
+ The properties and facilities of the Distributor include:
+\end_layout
+
+\begin_layout Description
+partitioner Choice of partitioner (
+\begin_inset Quotes eld
+\end_inset
+
+parmetis
+\begin_inset Quotes erd
+\end_inset
+
+ or 
+\begin_inset Quotes eld
+\end_inset
+
+chaco
+\begin_inset Quotes erd
+\end_inset
+
+, default is 
+\begin_inset Quotes eld
+\end_inset
+
+chaco
+\begin_inset Quotes erd
+\end_inset
+
+).
+\end_layout
+
+\begin_layout Description
+writer_partition Flag indicating that the partition information should be
+ written to a file (default is False).
+\end_layout
+
+\begin_layout Description
+data_writer Writer for partition information (default is DataWriterVTKMesh
+ for VTK output).
+\end_layout
+
+\begin_layout Standard
+ParMETIS is not included in the PyLith binaries due to licensing issues.
+\end_layout
+
+\begin_layout Subsubsection
+Refiner
+\end_layout
+
+\begin_layout Standard
+The refiner is used to decrease node spacing by a factor of two by subdividing
+ each cell.
+ In a 2D triangular mesh a node is inserted at the midpoint of each edge,
+ splitting each cell into four cells (see Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:uniform:refinement:2x"
+
+\end_inset
+
+).
+ In a 2D quadrilateral mesh a node is inserted at the midpoint of each edge
+ and at the centroid of the cell, splitting each cell into four cells.
+ In a 3D tetrahedral mesh a node is inserted at the midpoint of each edge,
+ splitting each cell into eight cells.
+ In a 3D hexahedral mesh a node is inserted at the midpoint of each edge,
+ the centroid of each face, and at the centroid of the cell, splitting each
+ cell into eight cells.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\noindent
+\align center
+\begin_inset Graphics
+	filename figs/refinement2x.eps
+	scale 125
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Global uniform mesh refinement of 2D and 3D linear cells.
+ The blue lines and orange circles identify the edges and vertices in the
+ original cells.
+ The purple lines and green circles identify the new edges and vertices
+ added to the original cells to refine the mesh by a factor of two.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:uniform:refinement:2x"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Refinement occurs after distribution of the mesh among processors.
+ This allows one to run much larger simulations by (1) permitting the mesh
+ generator to construct a mesh with a node spacing twice as large as that
+ needed in the simulation and (2) operations performed in serial during
+ the simulation setup phase, such as, adjusting the topology to insert cohesive
+ cells and distribution of the mesh among processors uses this much smaller
+ coarse mesh.
+ For 2D problems the global mesh refinement increases the maximum problem
+ size by a factor of four, and for 3D problems it increases the maximum
+ problem size by a factor of eight.
+\end_layout
+
+\begin_layout Subsection
+Problem Specification (
+\family typewriter
+problem
+\family default
+)
+\end_layout
+
+\begin_layout Standard
+The problem component specifies the basic parameters of the simulation,
+ including the physical properties, the boundary conditions, and interface
+ conditions (faults).
+ The current release of PyLith contains two types of problem, 
+\family typewriter
+TimeDependent
+\family default
+ for use in static, quasi-static, and dynamic simulations and 
+\family typewriter
+GreensFns
+\family default
+ for computing static Green's functions.
+ The general facilities include:
+\end_layout
+
+\begin_layout Description
+normalizer Scales used to nondimensionalize the problem (default is NondimElasti
+cQuasistatic).
+\end_layout
+
+\begin_layout Description
+materials Array of materials comprising the domain (default is 
+\family typewriter
+[material]
+\family default
+).
+\end_layout
+
+\begin_layout Description
+bc Array of boundary conditions (default is none).
+\end_layout
+
+\begin_layout Description
+interfaces Array of interface conditions, i.e., faults (default is none).
+\end_layout
+
+\begin_layout Description
+gravity_field Gravity field used to construct body forces (default is none).
+\end_layout
+
+\begin_layout Standard
+The properties for each material group are:
+\end_layout
+
+\begin_layout Description
+dimension Spatial dimension of the problem (default is 3)
+\end_layout
+
+\begin_layout Standard
+An example of setting these parameters in a 
+\family typewriter
+.cfg
+\family default
+ file for a problem is:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent]
+\end_layout
+
+\begin_layout LyX-Code
+dimension = 3
+\end_layout
+
+\begin_layout LyX-Code
+normalizer = spatialdata.units.NondimElasticQuasistatic
+\end_layout
+
+\begin_layout LyX-Code
+materials = [elastic,viscoelastic]
+\end_layout
+
+\begin_layout LyX-Code
+bc = [boundary_east,boundary_bottom,boundary_west]
+\end_layout
+
+\begin_layout LyX-Code
+interfaces = [SanAndreas,SanJacinto]
+\end_layout
+
+\begin_layout LyX-Code
+gravity_field = spatialdata.spatialdb.GravityField
+\end_layout
+
+\begin_layout Subsubsection
+Nondimensionalization
+\end_layout
+
+\begin_layout Standard
+PyLith nondimensionalizes all parameters provided by the user so that the
+ simulation solves the equations using nondimensional quantities.
+ This permits application of PyLith to problems across a vast range of spatial
+ and temporal scales.
+ The scales used to nondimensionalize the problem are length, pressure,
+ density, and time.
+ PyLith provides two normalizer objects to make it easy to provide reasonable
+ scales for the nondimensionalization.
+ The 
+\family typewriter
+NondimElasticQuasistatic
+\family default
+ normalizer has the following properties:
+\end_layout
+
+\begin_layout Description
+length_scale Length to nondimensionalize length (default is 1.0 km).
+\end_layout
+
+\begin_layout Description
+shear_modulus Shear modulus to nondimensionalize pressure (default is 3.0e+10
+ Pa).
+\end_layout
+
+\begin_layout Description
+relaxation_time Relaxation time to nondimensionalize time (default is 1.0
+ year).
+\end_layout
+
+\begin_layout Standard
+An example of setting these parameters in a 
+\family typewriter
+.cfg
+\family default
+ file for a problem is:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.normalizer]
+\end_layout
+
+\begin_layout LyX-Code
+length_scale = 1.0*km
+\end_layout
+
+\begin_layout LyX-Code
+shear_modules = 3.0e+10*Pa
+\end_layout
+
+\begin_layout LyX-Code
+relaxation_time = 1.0*yr
+\end_layout
+
+\begin_layout Standard
+The 
+\family typewriter
+NondimElasticDynamic
+\family default
+ normalizer has the following properties:
+\end_layout
+
+\begin_layout Description
+shear_wave_speed Shear wave speed used to nondimensionalize length and pressure
+ (default is 3.0 km/s).
+\end_layout
+
+\begin_layout Description
+mass_density Mass density to nondimensionalize density and pressure (default
+ is 3.0e+3 kg/m
+\begin_inset Formula $^{3}$
+\end_inset
+
+).
+\end_layout
+
+\begin_layout Description
+wave_period Period of seismic waves used to nondimensionalize time (default
+ is 1.0 s).
+\end_layout
+
+\begin_layout Standard
+An example of setting these parameters in a 
+\family typewriter
+.cfg
+\family default
+ file for a problem is:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.normalizer]
+\end_layout
+
+\begin_layout LyX-Code
+shear_wave_speed = 3.0*km/s
+\end_layout
+
+\begin_layout LyX-Code
+mass_density = 3.0e+3*kg/m**3
+\end_layout
+
+\begin_layout LyX-Code
+wave_period = 1.0*s
+\end_layout
+
+\begin_layout Subsection
+Finite-Element Integration Settings
+\end_layout
+
+\begin_layout Standard
+PyLith uses numerical quadrature to evaluate the finite-element integrals
+ for the residual and system Jacobian (see Chapter 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "cha:Governing-Equations"
+
+\end_inset
+
+).
+ PyLith employs FIAT (finite element automatic tabulator) to compute the
+ basis functions and their derivatives at the quadrature points for various
+ quadrature schemes and cell shapes.
+ The parameters for Lagrange cells (lines, quadrilaterals, hexahedra) are
+ specified using the FIATLagrange object, whereas the parameters for Simplex
+ cells (lines, triangles, tetrahedra) are specified using the FIATSimplex
+ object.
+ Both objects use the same set of parameters and PyLith will setup the basis
+ functions and quadrature scheme appropriately for the two families of cells.
+ The quadrature scheme and basis functions must be set for each material
+ and boundary condition involving finite-element integrations (Dirichlet
+ boundary conditions are constraints and do not involve integrations).
+ Furthermore, the integration schemes can be set independently.
+ The current version of PyLith supports basis functions with linear variations
+ in the field (P1); support for higher order cells will be added in the
+ future.
+ The properties for the FIATLagrange and FIATSimplex objects are
+\end_layout
+
+\begin_layout Description
+dimension Dimension of the cell (0,1,2,3; default is 3).
+\end_layout
+
+\begin_layout Description
+degree Degree of the finite-element cell (default is 1).
+\end_layout
+
+\begin_layout Description
+order Order of quadrature rule (default is degree+1); hardwired to be equal
+ to degree for faults.
+\end_layout
+
+\begin_layout Description
+collocate_quad Collocate quadrature points with vertices (default is False);
+ hardwired to True for faults.
+\end_layout
+
+\begin_layout Standard
+See Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:material:parameters"
+
+\end_inset
+
+ for an example of setting these properties for a material.
+\end_layout
+
+\begin_layout Subsection
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:petsc:options"
+
+\end_inset
+
+PETSc Settings (
+\family typewriter
+petsc
+\family default
+)
+\end_layout
+
+\begin_layout Standard
+In quasti-static problems with implicit time-stepping, PyLith relies on
+ PETSc for the linear algebra computations, including linear Krylov subspace
+ solvers and nonlinear solvers.
+ For dynamic problems, lumping the mass matrix and using explicit time-stepping
+ is much more efficient; this permits solving the linear system with a trivial
+ solver so we do not use a PETSc solver in this case (see Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:solvers"
+
+\end_inset
+
+).
+\end_layout
+
+\begin_layout Standard
+PETSc options can be set in 
+\family typewriter
+.cfg
+\family default
+ files in sections beginning with 
+\family typewriter
+[pylithapp.petsc]
+\family default
+.
+ The options of primary interest in the case of PyLith are shown in Table
+\begin_inset space ~
+\end_inset
+
+
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "tab:petsc:options:defaults"
+
+\end_inset
+
+.
+ PETSc options are used to control the selection and settings for the solvers
+ underlying the SolverLinear and SolverNonlinear objects discussed in Section
+ 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:solvers"
+
+\end_inset
+
+.
+ A very wide range of elasticity problems in quasi-static simulations can
+ be solved with reasonable runtimes by replacing the default Jacobi precondition
+er with the Additive Schwarz Method (ASM) using Incomplete LU (ILU) factorizatio
+n by default (see Table
+\begin_inset space ~
+\end_inset
+
+
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "tab:petsc:options:recommended"
+
+\end_inset
+
+).
+ A more advanced set of solver settings that may provide better performance
+ in many elasticity problems are given in Table 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "tab:petsc:options:advanced"
+
+\end_inset
+
+.
+ These settings are limited to problems where we store the stiffness matrix
+ as a nonsymmetric sparse matrix and require additional settings for the
+ formulation,
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.formulation]
+\end_layout
+
+\begin_layout LyX-Code
+split_fields = True
+\end_layout
+
+\begin_layout LyX-Code
+use_custom_constraint_pc = True ; Use only if problem contains a fault
+\end_layout
+
+\begin_layout LyX-Code
+matrix_type = aij
+\end_layout
+
+\begin_layout Quote
+
+\series bold
+\color red
+Warning:
+\color inherit
+ 
+\series default
+\color none
+These settings are only available if you build PETSc with Fortran enabled
+ and the ML package.
+ These features are included in the PyLith binary packages.
+\end_layout
+
+\begin_layout Quote
+
+\series bold
+\color red
+Warning:
+\color inherit
+ 
+\series default
+\color none
+The split fields and algebraic multigrid preconditioning currently fails
+ in problems with a nonzero null space.
+ This most often occurs when a problem contains multiple faults that extend
+ through the entire domain and create subdomains without any Dirichlet boundary
+ conditions.
+ The current workaround is to use the 
+\color inherit
+Additive Schwarz 
+\color none
+preconditioner without split fields.
+ See Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Troubleshooting"
+
+\end_inset
+
+ for the error message encountered in this situation.
+ 
+\end_layout
+
+\begin_layout Standard
+These more advanced settings allow the displacement fields and Lagrange
+ multipliers for fault tractions to be preconditioned separately.
+ This usually results in a much stronger preconditioner.
+ In simulations with fault slip, the degrees of freedom associated with
+ the Lagrange multipliers should be preconditioned with a custom preconditioner
+ that uses a diagonal approximation of the Schur complement.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float table
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Caption
+
+\begin_layout Plain Layout
+\begin_inset CommandInset label
+LatexCommand label
+name "tab:petsc:options:defaults"
+
+\end_inset
+
+Useful command-line arguments for setting PETSc options.
+\end_layout
+
+\end_inset
+
+
+\begin_inset Tabular
+<lyxtabular version="3" rows="10" columns="3">
+<features tabularvalignment="middle">
+<column alignment="left" valignment="top" width="1.2in">
+<column alignment="center" valignment="middle" width="0.6in">
+<column alignment="left" valignment="top" width="3.8in">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Property
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Default Value
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Description
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+log_summary
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\shape italic
+false
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Print logging objects and events.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+ksp_monitor
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\shape italic
+false
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Dump preconditioned residual norm to stdout.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+ksp_view
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\shape italic
+false
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Print linear solver parameters.
+ 
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+ksp_rtol
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\shape italic
+1.0e-05
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Convergence tolerance for relative decrease in residual norm.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+snes_monitor
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\shape italic
+false
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Dump residual norm to stdout for each nonlinear solve iteration.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+snes_view
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\shape italic
+false
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Print nonlinear solver parameters.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+snes_rtol
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\shape italic
+1.0e-5
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Convergence tolerance for relative decrease in residual norm.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+pc_type
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\shape italic
+jacobi
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Set preconditioner type.
+ See 
+\begin_inset CommandInset href
+LatexCommand href
+name "PETSc documentation"
+target "http://www.mcs.anl.gov/petsc/petsc-as/documentation/linearsolvertable.html"
+
+\end_inset
+
+ for a list of all preconditioner types.
+ 
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+ksp_type
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\shape italic
+gmres
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Set linear solver type.
+ See 
+\begin_inset CommandInset href
+LatexCommand href
+name "PETSc documentation"
+target "http://www.mcs.anl.gov/petsc/petsc-as/documentation/linearsolvertable.html"
+
+\end_inset
+
+ for a list of all solver types.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset Float table
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Caption
+
+\begin_layout Plain Layout
+\begin_inset CommandInset label
+LatexCommand label
+name "tab:petsc:options:recommended"
+
+\end_inset
+
+PETSc options that provide moderate performance in a wide range of quasi-static
+ elasticity problems.
+\end_layout
+
+\end_inset
+
+
+\begin_inset Tabular
+<lyxtabular version="3" rows="13" columns="3">
+<features tabularvalignment="middle">
+<column alignment="left" valignment="top" width="2in">
+<column alignment="center" valignment="middle" width="0.75in">
+<column alignment="left" valignment="top" width="3in">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Property
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Value
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Description
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+pc_type
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\shape italic
+asm
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Additive Schwarz method.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+ksp_type
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\shape italic
+gmres
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+GMRES method from Saad and Schultz.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+sub_pc_factor_shift_type
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\emph on
+nonzero
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Turn on nonzero shifting for factorization.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+ksp_max_it
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\emph on
+100
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Maximum number of iterations permitted in linear solve.
+ Depends on problem size.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+ksp_gmres_restart
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\shape italic
+50
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Number of iterations after which Gram-Schmidt orthogonalization is restarted.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+ksp_rtol
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\shape italic
+1.0e-08
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Linear solve convergence tolerance for relative decrease in residual norm.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+ksp_atol
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\shape italic
+\emph on
+1.0e-12
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Linear solve convergence tolerance for absolute value of residual norm.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+ksp_converged_reason
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\shape italic
+true
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Indicate why iterating stopped in linear solve.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+snes_max_it
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\shape italic
+100
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Maximum number of iterations permitted in nonlinear solve.
+ Depends on how nonlinear the problem is.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+snes_rtol
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\shape italic
+1.0e-08
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Nonlinear solve convergence tolerance for relative decrease in residual
+ norm.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+snes_atol
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\shape italic
+1.0e-12
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Nonlinear solve convergence tolerance for absolute value of residual norm.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+snes_converged_reason
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\shape italic
+true
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Indicate why iterating stopped in nonlinear solve.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float table
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Caption
+
+\begin_layout Plain Layout
+\begin_inset CommandInset label
+LatexCommand label
+name "tab:petsc:options:advanced"
+
+\end_inset
+
+PETSc options used with split fields algebraic multigrid preconditioning
+ that often provide improved performance in quasi-static elasticity problems.
+\end_layout
+
+\end_inset
+
+
+\begin_inset Tabular
+<lyxtabular version="3" rows="8" columns="3">
+<features tabularvalignment="middle">
+<column alignment="left" valignment="top" width="2.25in">
+<column alignment="center" valignment="middle" width="0.75in">
+<column alignment="left" valignment="top" width="3in">
+<row>
+<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Property
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Value
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Description
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+fs_pc_type
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\shape italic
+field_split
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Precondition fields separately.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+fs_pc_fieldsplit_real_diagonal
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\shape italic
+true
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Use diagonal blocks from the true operator, rather than the preconditioner.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+fs_pc_fieldsplit_type
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\shape italic
+multiplicative
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Apply each field preconditioning in sequence, which is stronger than all-at-once
+ (additive).
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+fs_fieldsplit_0_pc_type
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\shape italic
+ml
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Multilevel algebraic multigrid preconditioning using Trilinos/ML via PETSc.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+fs_fieldsplit_1_pc_type
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\shape italic
+jacobi
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Jacobi preconditioning for Lagrange multiplier block (only use if there
+ is at least one fault)
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+fs_fieldsplit_0_ksp_type
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\shape italic
+preonly
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Apply only the preconditioner.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+fs_fieldsplit_1_ksp_type
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\shape italic
+preonly
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Apply only the preconditioner.
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+PETSc Solvers and nVidia GPUs
+\end_layout
+
+\begin_layout Standard
+The development version of PETSc contains some support for using PETSc solvers
+ and nVidia GPUs via CUDA.
+ Building PETSc requires some additional dependencies as described in 
+\begin_inset Flex URL
+status collapsed
+
+\begin_layout Plain Layout
+
+http://www.mcs.anl.gov/petsc/documentation/installation.html#CUDA
+\end_layout
+
+\end_inset
+
+.
+ Additionally, PyLith must be configured with the 
+\family typewriter
+--enable-cuda
+\family default
+ option.
+ See the PyLith Installer documentation for how to enable support for CUDA
+ when building PETSc and PyLith with the installer (the installer does not
+ install CUDA or cusp).
+\end_layout
+
+\begin_layout Quote
+
+\series bold
+\color red
+Warning:
+\color inherit
+ 
+\series default
+\color none
+Development of PETSc solvers leveraging nVidia GPUs to accelerate the computatio
+ns is still a work in progress.
+ This feature requires building PETSc and PyLith from source after installing
+ CUDA and the development version of cusp.
+ If your GPU only supports single-precision floating point operations, then
+ PETSc must be built with single precision and without support for ML and
+ ParMetis/Metis.
+\end_layout
+
+\begin_layout Standard
+Solver and preconditioning options are relatively limited when using CUDA.
+ CUDA works with the Additive Schwarz preconditioner and GMRES linear solver.
+ Enabling use of CUDA with the PETSc solver involves just one setting:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.formulation.solver]
+\begin_inset Newline newline
+\end_inset
+
+use_cuda = True
+\end_layout
+
+\begin_layout Standard
+If the matrix type and vector types have not already been set, this will
+ set matrix type and vector types to 
+\family typewriter
+aijcusp
+\family default
+ and 
+\family typewriter
+cusp
+\family default
+, respectively, to indicate to PETSc that CUDA should be used by the solver.
+ If they have already been set to a value, then the values will not be changed
+ even if they are incompatible with using CUDA.
+\end_layout
+
+\begin_layout Section
+Time-Dependent Problem
+\end_layout
+
+\begin_layout Standard
+This type of problem applies to transient static, quasi-static, and dynamic
+ simulations.
+ The time-dependent problem adds the 
+\family typewriter
+formulation
+\family default
+ facility to the general-problem.
+ The formulation specifies the time-stepping formulation to integrate the
+ elasticity equation.
+ PyLith provides several alternative formulations, each specific to a different
+ type of problem.
+\end_layout
+
+\begin_layout Description
+Implicit Implicit time stepping for static and quasi-static problems with
+ infinitesimal strains.
+ The implicit formulation neglects inertial terms (see Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "eq:elasticity:integral:quasistatic"
+
+\end_inset
+
+).
+ 
+\end_layout
+
+\begin_layout Description
+ImplicitLgDeform Implicit time stepping for static and quasi-static problems
+ including the effects of rigid body motion and small strains.
+ This formulation requires the use of the nonlinear solver, which is selected
+ automatically.
+\end_layout
+
+\begin_layout Description
+Explicit Explicit time stepping for dynamic problems with infinitesimal
+ strains.
+ This formulation uses consistent mass and damping matrices for the system
+ Jacobian matrix.
+\end_layout
+
+\begin_layout Description
+ExplicitLgDeform Explicit time stepping for dynamic problems including the
+ effects of rigid body motion and small strains.
+ This formulation requires the use of the nonlinear solver, which is selected
+ automatically.
+\end_layout
+
+\begin_layout Description
+ExplicitLumped Explicit time stepping for dynamic problems with infinitesimal
+ strains and lumped system Jacobian.
+ The cell matrices are lumped before assembly, permitting use of a vector
+ for the diagonal system Jacobian matrix.
+ The built-in lumped solver is selected automatically.
+\end_layout
+
+\begin_layout Description
+ExplicitLumpedTri3 Optimized elasticity formulation for linear triangular
+ cells with one point quadrature for dynamic problems with infinitesimal
+ strains and lumped system Jacobian.
+ The built-in lumped solver is selected automatically.
+\end_layout
+
+\begin_layout Description
+ExplicitLumpedTet4 Optimized elasticity formulation for linear tetrahedral
+ cells with one point quadrature for dynamic problems with infinitesimal
+ strains and lumped system Jacobian.The built-in lumped solver is selected
+ automatically.
+\end_layout
+
+\begin_layout Standard
+In many quasi-static simulations it is convenient to compute a static problem
+ with elastic deformation prior to computing a transient response.
+ Up through PyLith version 1.6 this was hardwired into the Implicit Forumulation
+ as advancing from time step 
+\begin_inset Formula $t=-\Delta t$
+\end_inset
+
+ to 
+\begin_inset Formula $t=0$
+\end_inset
+
+, and it could not be turned off.
+ PyLith now includes a property, 
+\family typewriter
+elastic_prestep
+\family default
+ in the TimeDependent component to turn on/off this behavior (the default
+ is to retain the previous behavior of computing the elastic deformation).
+ 
+\end_layout
+
+\begin_layout Quote
+
+\series bold
+\color red
+Warning:
+\color inherit
+ 
+\series default
+\color none
+Turning off the elastic prestep calculation means the model only deforms
+ when an 
+\family typewriter
+\shape italic
+\color inherit
+increment
+\family default
+\shape default
+\color none
+ in loading or deformation is applied, because we the time-stepping formulation
+ is implemented using the increment in displacement.
+\end_layout
+
+\begin_layout Standard
+The TimeDependent properties and facilities include
+\end_layout
+
+\begin_layout Description
+elastic_preset If true, perform a static calculation with elastic behavior
+ before time stepping (default is True).
+\end_layout
+
+\begin_layout Description
+formulation Formulation for solving the partial differential equation.
+\end_layout
+
+\begin_layout Standard
+An example of setting the properties and components in a .cfg file is
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent]
+\end_layout
+
+\begin_layout LyX-Code
+formulation = pylith.problems.Implicit ; default
+\end_layout
+
+\begin_layout LyX-Code
+elastic_preset = True ; default
+\end_layout
+
+\begin_layout Standard
+The formulation value can be set to the other formulations in a similar
+ fashion.
+ 
+\end_layout
+
+\begin_layout Subsection
+Time-Stepping Formulation
+\end_layout
+
+\begin_layout Standard
+The explicit and implicit time stepping formulations use a common set of
+ facilities and properties.
+ The facilities include
+\end_layout
+
+\begin_layout Description
+time_step Time step size specification (default is uniform time step).
+\end_layout
+
+\begin_layout Description
+solver Type of solver to use (default is SolverLinear).
+\end_layout
+
+\begin_layout Description
+output Array of output managers for output of the solution (default is [output]).
+\end_layout
+
+\begin_layout Description
+jacobian_viewer Viewer to dump the system Jacobian (sparse matrix) to a
+ file for analysis (default is PETSc binary).
+\end_layout
+
+\begin_layout Standard
+The formulation properties include
+\end_layout
+
+\begin_layout Description
+matrix_type Type of PETSc matrix for the system Jacobian (sparse matrix,
+ default is symmetric, block matrix with a block size of 1).
+\end_layout
+
+\begin_layout Description
+view_jacobian Flag to indicate if system Jacobian (sparse matrix) should
+ be written to a file (default is false).
+\end_layout
+
+\begin_layout Description
+split_fields Split solution field into a displacement portion (fields 0..ndim-1)
+ and a Lagrange multiplier portion (field ndim) to permit application of
+ sophisticated PETSc preconditioners (default is false).
+\end_layout
+
+\begin_layout Standard
+An example of setting these parameters in a 
+\family typewriter
+.cfg
+\family default
+ file is
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.formulation]
+\end_layout
+
+\begin_layout LyX-Code
+time_step = pylith.problems.TimeStepUniform
+\end_layout
+
+\begin_layout LyX-Code
+solver = pylith.problems.SolverLinear ; Nonlinear solver is pylith.problems.SolverNo
+nlinear
+\end_layout
+
+\begin_layout LyX-Code
+output = [domain,ground_surface]
+\end_layout
+
+\begin_layout LyX-Code
+matrix_type = sbaij ; To use a non-symmetric sparse matrix, set it to aij
+\end_layout
+
+\begin_layout LyX-Code
+view_jacobian = false
+\end_layout
+
+\begin_layout Subsection
+Numerical Damping in Explicit Time Stepping
+\end_layout
+
+\begin_layout Standard
+In explicit time-stepping formulations for elasticity, boundary conditions
+ and fault slip can excite short waveform elastic waves that are not accurately
+ resolved by the discretization.
+ We use numerical damping via an artificial viscosity
+\begin_inset CommandInset citation
+LatexCommand cite
+key "Knopoff:Ni:2001,Day:Ely:2002"
+
+\end_inset
+
+ to reduce these high frequency oscillations.
+ In computing the strains for the elasticity term in equation 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "eq:elasticity:integral:dynamic:t"
+
+\end_inset
+
+, we use an adjusted displacement rather than the actual displacement, where
+ 
+\begin_inset Formula 
+\begin{equation}
+\vec{u}^{adj}(t)=\vec{u}(t)+\eta^{*}\Delta t\vec{\dot{u}}(t),
+\end{equation}
+
+\end_inset
+
+
+\begin_inset Formula $\vec{u}^{adj}(t)$
+\end_inset
+
+ is the adjusted displacement at time t, 
+\begin_inset Formula $\vec{u}(t)$
+\end_inset
+
+is the original displacement at time (t), 
+\begin_inset Formula $\eta^{*}$
+\end_inset
+
+is the normalized artificial viscosity, 
+\begin_inset Formula $\Delta t$
+\end_inset
+
+ is the time step, and 
+\begin_inset Formula $\vec{\dot{u}}(t)$
+\end_inset
+
+ is the velocity at time 
+\begin_inset Formula $t$
+\end_inset
+
+.
+ The default value for the normalized artificial viscosity is 0.1.
+ We have found values in the range 0.1-0.4 sufficiently suppress numerical
+ noise while not excessively reducing the peak velocity.
+ An example of setting the normalized artificial viscosity in a 
+\family typewriter
+.cfg
+\family default
+ file is
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.formulation]
+\end_layout
+
+\begin_layout LyX-Code
+norm_viscosity = 0.2
+\end_layout
+
+\begin_layout Subsection
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:solvers"
+
+\end_inset
+
+Solvers
+\end_layout
+
+\begin_layout Standard
+PyLith supports three types of solvers.
+ The linear solver, SolverLinear, corresponds to the PETSc KSP solver and
+ is used in linear problems with linear elastic and viscoelastic bulk constituti
+ve models and kinematic fault ruptures.
+ The nonlinear solver, SolverNonlinear, corresponds to the PETSc SNES solver
+ and is used in nonlinear problems with nonlinear viscoelastic or elastoplastic
+ bulk constitutive models, dynamic fault ruptures, or problems involving
+ finite strain (small strain formulation).
+ The lumped solver (SolverLumped) is a specialized solver used with the
+ lumped system Jacobian matrix.
+ The options for the PETSc KSP and SNES solvers are set via the top-level
+ PETSc options (see Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:petsc:options"
+
+\end_inset
+
+ and the PETSc documentation 
+\begin_inset Flex URL
+status collapsed
+
+\begin_layout Plain Layout
+
+www.mcs.anl.gov/petsc/petsc-as/documentation/index.html
+\end_layout
+
+\end_inset
+
+).
+\end_layout
+
+\begin_layout Subsection
+Time Stepping
+\end_layout
+
+\begin_layout Standard
+PyLith provides three choices for controlling the time step in time-dependent
+ simulations.
+ These include (1) a uniform, user-specified time step (which is the default),
+ (2) nonuniform, user-specified time steps, and (3) nonuniform, automatically
+ calculated time steps.
+ The procedure for automatically selecting time steps requires that the
+ material models provide a reasonable estimate of the time step for stable
+ time integration.
+ In general, quasi-static simulations should use automatically calculated
+ time steps and dynamic simulations should use a uniform, user-specified
+ time step.
+\end_layout
+
+\begin_layout Standard
+
+\series bold
+\color red
+Warning:
+\series default
+\color none
+ 
+\color inherit
+Changing the time step requires recomputing the Jacobian of the system,
+ which can greatly increase the runtime if the time-step size changes frequently.
+\end_layout
+
+\begin_layout Subsubsection
+Uniform, User-Specified Time Step
+\end_layout
+
+\begin_layout Standard
+With a uniform, user-specified time step, the user selects the time step
+ that is used over the entire duration of the simulation.
+ This value is used whether or not it yields a stable solution, so users
+ should be careful when selecting the time-step value.
+ The properties for the uniform, user-specified time step are:
+\end_layout
+
+\begin_layout Description
+total_time Time duration for simulation (default is 0.0 s).
+\end_layout
+
+\begin_layout Description
+start_time Start time for simulation (default is 0.0 s)
+\end_layout
+
+\begin_layout Description
+dt Time step for simulation.
+\end_layout
+
+\begin_layout Standard
+An example of setting a uniform, user-specified time step in a 
+\family typewriter
+.cfg
+\family default
+ file is:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.formulation]
+\end_layout
+
+\begin_layout LyX-Code
+time_step = pylith.problems.TimeStepUniform ; Default value
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.formulation.time_step]
+\end_layout
+
+\begin_layout LyX-Code
+total_time = 1000.0*year
+\end_layout
+
+\begin_layout LyX-Code
+dt = 0.5*year
+\end_layout
+
+\begin_layout Subsubsection
+Nonuniform, User-Specified Time Step
+\end_layout
+
+\begin_layout Standard
+The nonuniform, user-specified, time-step implementation allows the user
+ to specify the time steps in an ASCII file (see Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:FileFormat:TimeStepUser"
+
+\end_inset
+
+ for the format specification of the time-step file).
+ If the total duration exceeds the time associated with the time steps,
+ then a flag determines whether to cycle through the time steps or to use
+ the last specified time step for the time remaining.
+ The properties for the nonuniform, user-specified time step are:
+\end_layout
+
+\begin_layout Description
+total_time Time duration for simulation.
+\end_layout
+
+\begin_layout Description
+filename Name of file with time-step sizes.
+\end_layout
+
+\begin_layout Description
+loop_steps If true, cycle through time steps, otherwise keep using last
+ time-step size for any time remaining.
+\end_layout
+
+\begin_layout Standard
+An example of setting the properties for nonuniform, user-specified time
+ steps in a 
+\family typewriter
+.cfg
+\family default
+ file is:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.formulation]
+\end_layout
+
+\begin_layout LyX-Code
+time_step = pylith.problems.TimeStepUser ; Change the time step algorithm
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.formulation.time_step]
+\end_layout
+
+\begin_layout LyX-Code
+total_time = 1000.0*year
+\end_layout
+
+\begin_layout LyX-Code
+filename = timesteps.txt
+\end_layout
+
+\begin_layout LyX-Code
+loop_steps = false ; Default value
+\end_layout
+
+\begin_layout Subsubsection
+Nonuniform, Automatic Time Step
+\end_layout
+
+\begin_layout Standard
+This time-step implementation automatically calculates a stable time step
+ based on the constitutive model and rate of deformation.
+ As a result, this choice for choosing the time step relies on accurate
+ calculation of a stable time step within each finite-element cell by the
+ constitutive models.
+ In order to provide some control over the time-step selection, the user
+ can control the frequency that a new time step is calculated, the time
+ step to use relative to the value determined by the constitutive models,
+ and a maximum value for the time step.
+ The properties for controlling the automatic time-step selection are:
+\end_layout
+
+\begin_layout Description
+total_time Time duration for simulation.
+\end_layout
+
+\begin_layout Description
+max_dt Maximum time step permitted.
+\end_layout
+
+\begin_layout Description
+adapt_skip Number of time steps to skip between calculating new stable time
+ step.
+\end_layout
+
+\begin_layout Description
+stability_factor Safety factor for stable time step (default is 2.0).
+\end_layout
+
+\begin_layout Standard
+An example of setting the properties for the automatic time step in a 
+\family typewriter
+.cfg
+\family default
+ file is:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.formulation]
+\end_layout
+
+\begin_layout LyX-Code
+time_step = pylith.problems.TimeStepAdapt ; Change the time step algorithm
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.formulation.time_step]
+\end_layout
+
+\begin_layout LyX-Code
+total_time = 1000.0*year
+\end_layout
+
+\begin_layout LyX-Code
+max_dt = 10.0*year
+\end_layout
+
+\begin_layout LyX-Code
+adapt_skip = 10 ; Default value
+\end_layout
+
+\begin_layout LyX-Code
+stability_factor = 2.0 ; Default value
+\end_layout
+
+\begin_layout Section
+Green's Functions Problem
+\end_layout
+
+\begin_layout Standard
+This type of problem applies to computing static Green's functions for elastic
+ deformation.
+ The 
+\family typewriter
+GreensFns
+\family default
+ problem specializes the time-dependent facility to the case of static simulatio
+ns with slip impulses on a fault.
+ The default formulation is the Implicit formulation and should not be changed
+ as the other formulations are not applicable to static Green's functions.
+ In the output files, the deformation at each 
+\begin_inset Quotes eld
+\end_inset
+
+time step
+\begin_inset Quotes erd
+\end_inset
+
+ is the deformation for a different slip impulse.
+ The properties provide the ability to select which fault to use for slip
+ impulses.
+ The only fault component available for use with the 
+\family typewriter
+GreensFns
+\family default
+ problem is the 
+\family typewriter
+FaultCohesiveImpulses
+\family default
+ component discussed in Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:fault:cohesive:impulses"
+
+\end_inset
+
+.
+ The 
+\family typewriter
+GreensFns
+\family default
+ properties include:
+\end_layout
+
+\begin_layout Description
+fault_id Id of fault on which to impose slip impulses.
+\end_layout
+
+\begin_layout Standard
+An example of setting the properties for the GreensFns problem in a 
+\family typewriter
+.cfg
+\family default
+ file is:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp]
+\end_layout
+
+\begin_layout LyX-Code
+problem = pylith.problems.GreensFns ; Change problem type from the default
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.greensfns]
+\end_layout
+
+\begin_layout LyX-Code
+fault_id = 100 ; Default value
+\end_layout
+
+\begin_layout Standard
+
+\series bold
+\color red
+Warning:
+\series default
+\color none
+ 
+\color inherit
+The 
+\family typewriter
+GreensFns
+\family default
+ problem generates slip impulses on a fault.
+ The current version of PyLith requires that impulses can only be applied
+ to a single fault and the fault facility must be set to 
+\family typewriter
+FaultCohesiveImpulses
+\family default
+.
+\end_layout
+
+\begin_layout Section
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:spatial:databases"
+
+\end_inset
+
+Databases for Boundaries, Interfaces, and Material Properties
+\end_layout
+
+\begin_layout Standard
+Once the problem has been defined with PyLith parameters, and the mesh informati
+on has been provided, the final step is to specify the boundary conditions
+ and material properties to be used.
+ The mesh information provides labels defining sets of vertices to which
+ boundary conditions or fault conditions will be applied, as well as cell
+ labels that will be used to define the material type of each cell.
+ For boundary conditions, the 
+\family typewriter
+.cfg
+\family default
+ file is used to associate boundary condition types and spatial databases
+ with each vertex group (see Chapter 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "cha:boundary:interface:conditions"
+
+\end_inset
+
+).
+ For materials, the 
+\family typewriter
+.cfg
+\family default
+ file is used to associate material types and spatial databases with cells
+ identified by the material identifier (see Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:Material-models"
+
+\end_inset
+
+).
+\end_layout
+
+\begin_layout Standard
+The spatial databases define how the boundary conditions or material property
+ values vary spatially, and they can be arbitrarily complex.
+ The simplest example for a material database would be a mesh where all
+ the cells of a given type have uniform properties (
+\begin_inset Quotes eld
+\end_inset
+
+point
+\begin_inset Quotes erd
+\end_inset
+
+ or 0D variation).
+ A slightly more complex case would be a mesh where the cells of a given
+ type have properties that vary linearly along a given direction (
+\begin_inset Quotes eld
+\end_inset
+
+line
+\begin_inset Quotes erd
+\end_inset
+
+ or 1D variation).
+ In more complex models, the material properties might have different values
+ at each point in the mesh (
+\begin_inset Quotes eld
+\end_inset
+
+volume
+\begin_inset Quotes erd
+\end_inset
+
+ or 3D variation).
+ This might be the case, for example, if the material properties are provided
+ by a database of seismic velocities and densities.
+ For boundary conditions the simplest case would be where all vertices in
+ a given group have the same boundary condition parameters (
+\begin_inset Quotes eld
+\end_inset
+
+point
+\begin_inset Quotes erd
+\end_inset
+
+ or 0D variation).
+ A more complex case might specify a variation in the conditions on a given
+ surface (
+\begin_inset Quotes eld
+\end_inset
+
+area
+\begin_inset Quotes erd
+\end_inset
+
+ or 2D variation).
+ This sort of condition might be used, for example, to specify the variation
+ of slip on a fault plane.
+ The examples discussed in Chapter 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "cha:Tutorials"
+
+\end_inset
+
+ also contain more information regarding the specification and use of the
+ spatial database files.
+\end_layout
+
+\begin_layout Subsection
+SimpleDB Spatial Database
+\end_layout
+
+\begin_layout Standard
+In most cases the default type of spatial database for faults, boundary
+ conditions, and materials is 
+\family typewriter
+SimpleDB
+\family default
+.
+ Spatial database files provide specification of a field over some set of
+ points.
+ There is no topology associated with the points.
+ Although multiple values can be specified at each point with more than
+ one value included in a search query, the interpolation of each value will
+ be done independently.
+ Time dependent variations of a field are not supported in these files.
+ Spatial database files can specify spatial variations over zero, one, two,
+ and three dimensions.
+ Zero dimensional variations correspond to uniform values.
+ One-dimensional spatial variations correspond to piecewise linear variations,
+ which need not coincide with coordinate axes.
+ Likewise, two-dimensional spatial variations correspond to variations on
+ a planar surface (which need not coincide with the coordinate axes) and
+ three-dimensional spatial variations correspond to variations over a volume.
+ In one, two, or three dimensions, queries can use a 
+\begin_inset Quotes eld
+\end_inset
+
+nearest value
+\begin_inset Quotes erd
+\end_inset
+
+ search or linear interpolation.
+\end_layout
+
+\begin_layout Standard
+The spatial database files need not provide the data using the same coordinate
+ system as the mesh coordinate system, provided the two coordinate systems
+ are compatible.
+ Examples of compatible coordinate systems include geographic coordinates
+ (longitude/latitude/elevation), and projected coordinates (e.g., coordinates
+ in a transverse Mercator projection).
+ Spatial database queries use the Proj.4 Cartographic Projections library
+ 
+\begin_inset Flex URL
+status collapsed
+
+\begin_layout Plain Layout
+
+proj.maptools.org
+\end_layout
+
+\end_inset
+
+ to convert between coordinate systems, so a large number of geographic
+ projections are available with support for converting between NAD27 and
+ WGS84 horizontal datums as well as several other frequently used datums.
+ Because the interpolation is done in the coordinate system of the spatial
+ database, geographic coordinates should only be used for very simple datasets,
+ or undesirable results will occur.
+ This is especially true when the spatial database coordinate system combines
+ latitude, longitude, and elevation in meters (longitude and latitude in
+ degrees are often much smaller than elevations in meters leading to distorted
+ 
+\begin_inset Quotes eld
+\end_inset
+
+distance
+\begin_inset Quotes erd
+\end_inset
+
+ between locations and interpolation).
+\end_layout
+
+\begin_layout Standard
+SimpleDB uses a simple ASCII file to specify the variation of values (e.g.,
+ displacement field, slip field, physical properties) in space.
+ The file format is described in Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Spatialdata:SimpleIOAscii"
+
+\end_inset
+
+.
+ The tutorials in Chapter 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "cha:Tutorials"
+
+\end_inset
+
+ use SimpleDB files to specify the values for the boundary conditions, 
+ physical properties, and fault slip.
+\end_layout
+
+\begin_layout Standard
+As in the other Pyre objects, spatial database objects contain parameters
+ that can be set from the command line or using 
+\family typewriter
+.cfg or .pml
+\family default
+ files.
+ The parameters for a spatial database are:
+\end_layout
+
+\begin_layout Description
+label Label for the database, which is used in diagnostic messages.
+\end_layout
+
+\begin_layout Description
+query_type Type of search query to perform.
+ Values for this parameter are ``linear'' and ``nearest'' (default).
+\end_layout
+
+\begin_layout Description
+iohandler Database importer.
+ Only one importer is implemented, so you do not need to change this setting.
+\end_layout
+
+\begin_layout Description
+iohandler.filename Filename for the spatial database.
+\end_layout
+
+\begin_layout Standard
+An example of setting these parameters in a 
+\family typewriter
+.cfg
+\family default
+ file is:
+\end_layout
+
+\begin_layout LyX-Code
+label = Material properties
+\end_layout
+
+\begin_layout LyX-Code
+query_type = linear
+\end_layout
+
+\begin_layout LyX-Code
+iohandler.filename = mydb.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Subsection
+UniformDB Spatial Database
+\end_layout
+
+\begin_layout Standard
+The SimpleDB spatial database is quite general, but when the values are
+ uniform, it is often easier to use the UniformDB spatial database instead.
+ With the UniformDB, you specify the values directly either on the command
+ line or in a parameter-setting (
+\family typewriter
+.cfg
+\family default
+) file.
+ On the other hand, if the values are used in more than one place, it is
+ easier to place the values in a SimpleDB file, because they can then be
+ referred to using the filename of the spatial database rather than having
+ to repeatedly list all of the values on the command line or in a parameter-sett
+ing (
+\family typewriter
+.cfg
+\family default
+) file.
+ The Pyre properties for a UniformDB are:
+\end_layout
+
+\begin_layout Description
+values Array of names of values in spatial database
+\end_layout
+
+\begin_layout Description
+data Array of values in spatial database
+\end_layout
+
+\begin_layout Subsubsection
+Example
+\end_layout
+
+\begin_layout Standard
+Specify the physical properties of a linearly elastic, isotropic material
+ in a 
+\family typewriter
+pylithapp.cfg
+\family default
+ file.
+ The data values are dimensioned with the appropriate units using Python
+ syntax.
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+[pylithapp.timedependent.materials.material]
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+db_properties = spatialdata.spatialdb.UniformDB ; Set the db to a UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+db_properties.values = [vp,vs,density] ; Set the names of the values in the
+ database
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+db_properties.data = [5773.5*m/s, 3333.3*m/s, 2700.0*kg/m**3] ; Set the values
+ in the database
+\end_layout
+
+\begin_layout Subsubsection
+ZeroDispDB
+\end_layout
+
+\begin_layout Standard
+The ZeroDispDB is a a special case of the UniformDB for the Dirichlet boundary
+ conditions.
+ The values in the database are the ones requested by the Dirichlet boundary
+ conditions, 
+\family typewriter
+displacement-x
+\family default
+, 
+\family typewriter
+displacement-y
+\family default
+, and 
+\family typewriter
+displacement-z
+\family default
+, and are all set to zero.
+ This makes it trivial to set displacements to zero on a boundary.
+ The examples discussed in Chapter 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "cha:Tutorials"
+
+\end_inset
+
+ use this database.
+\end_layout
+
+\begin_layout Subsection
+\begin_inset CommandInset label
+LatexCommand label
+name "sub:SCECCVMH-Impl"
+
+\end_inset
+
+SCEC CVM-H Spatial Database
+\end_layout
+
+\begin_layout Standard
+Although the SimpleDB implementation is able to specify arbitrarily complex
+ spatial variations, there are existing databases for physical properties,
+ and when they are available, it is desirable to access these directly.
+ One such database is the SCEC CVM-H database, which provides seismic velocities
+ and density information for much of southern California.
+ Spatialdata provides a direct interface to this database.
+ See Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Tutorial-Two-tet4-geoproj"
+
+\end_inset
+
+ for an example of using the SCEC CVM-H database for physical properties
+ of an elastic material.
+ The interface is known to work with versions 5.2 and 5.3 of the SCEC CVM-H.
+ Setting a minimum wave speed can be used to replace water and very soft
+ soils that are incompressible or nearly incompressible with stiffer, compressib
+le materials.
+ The Pyre properties for the SCEC CVM-H are:
+\end_layout
+
+\begin_layout Description
+data_dir Directory containing the SCEC CVM-H data files
+\end_layout
+
+\begin_layout Description
+min_vs Minimum shear wave speed.
+ Corresponding minimum values for the dilatational wave speed (Vp) and density
+ are computed.
+ Default value is 500 m/s.
+\end_layout
+
+\begin_layout Description
+squash Squash topography/bathymetry to sea level (make the earth's surface
+ flat)
+\end_layout
+
+\begin_layout Description
+squash_limit Elevation above which topography is squashed (geometry below
+ this elevation remains undistorted)
+\end_layout
+
+\begin_layout Subsubsection
+Example
+\end_layout
+
+\begin_layout Standard
+Specify the physical properties of a linearly elastic, isotropic material
+ using the SCEC CVM-H in a 
+\family typewriter
+pylithapp.cfg
+\family default
+ file.
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+[pylithapp.timedependent.materials.material]
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+db_properties = spatialdata.spatialdb.SCECCVMH ; Set the database to the SCEC
+ CVM-H
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+db_properties.data_dir = /home/johndoe/data/sceccvm-h/vx53 ; Directory containing
+\begin_inset Newline newline
+\end_inset
+
+the database data files
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+db_properties.min_vs = 500*m/s
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+db_properties.squash = True ; Turn on squashing
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+db_properties.squash_limit = -1000.0 ; Only distort the geometry above z =
+ -1 km in 
+\begin_inset Newline newline
+\end_inset
+
+flattening the earth
+\end_layout
+
+\begin_layout Subsection
+CompositeDB Spatial Database
+\end_layout
+
+\begin_layout Standard
+For some problems, a boundary condition or material property may have subsets
+ with different spatial variations.
+ One example would be when we have separate databases to describe the elastic
+ and inelastic bulk material properties for a region.
+ In this case, it would be useful to have two different spatial databases,
+ e.g., a seismic velocity model with Vp, Vs, and density values, and another
+ database with the inelastic physical properties.
+ We can use the 
+\family typewriter
+CompositeDB
+\family default
+ spatial database for these cases.
+ An example would be:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.materials.maxwell]
+\end_layout
+
+\begin_layout LyX-Code
+label = Maxwell material
+\end_layout
+
+\begin_layout LyX-Code
+id = 1
+\end_layout
+
+\begin_layout LyX-Code
+db_properties = spatialdata.spatialdb.CompositeDB
+\end_layout
+
+\begin_layout LyX-Code
+db_properties.db_A = spatialdata.spatialdb.SCECCVMH
+\end_layout
+
+\begin_layout LyX-Code
+db_properties.db_B = spatialdata.spatialdb.SimpleDB
+\end_layout
+
+\begin_layout LyX-Code
+quadrature.cell = pylith.feassemble.FIATSimplex
+\end_layout
+
+\begin_layout LyX-Code
+quadrature.cell.dimension = 3
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.materials.maxwell.db_properties]
+\end_layout
+
+\begin_layout LyX-Code
+values_A = [density,vs,vp]
+\end_layout
+
+\begin_layout LyX-Code
+db_A.label = Elastic properties from CVM-H
+\end_layout
+
+\begin_layout LyX-Code
+db_A.data_dir = /Users/willic3/geoframe/tools/vx53/bin
+\end_layout
+
+\begin_layout LyX-Code
+db_A.squash = False
+\end_layout
+
+\begin_layout LyX-Code
+values_B = [viscosity]
+\end_layout
+
+\begin_layout LyX-Code
+db_B.label = Vertically varying Maxwell material
+\end_layout
+
+\begin_layout LyX-Code
+db_B.iohandler.filename = ../spatialdb/mat_vert_var_maxwell.spatialdb
+\end_layout
+
+\begin_layout Standard
+Here we have specified a 
+\family typewriter
+CompositeDB
+\family default
+ where the elastic properties (
+\family typewriter
+density
+\family default
+, 
+\family typewriter
+vs
+\family default
+, 
+\family typewriter
+vp
+\family default
+) are given by the SCEC CVM-H, and 
+\family typewriter
+viscosity
+\family default
+ is described by a 
+\family typewriter
+SimpleDB
+\family default
+ (
+\family typewriter
+mat_vert_var_maxwell.spatialdb
+\family default
+).
+ The user must first specify 
+\family typewriter
+db_properties
+\family default
+ as a 
+\family typewriter
+CompositeDB
+\family default
+, and must then give the two components of this database (
+\family typewriter
+SCECCVMH
+\family default
+ and 
+\family typewriter
+SimpleDB
+\family default
+).
+ The values to query in each of these databases is also required.
+ This is followed by the usual parameters for each of the spatial databases.
+ The 
+\family typewriter
+CompositeDB
+\family default
+ provides a flexible mechanism for specifying material properties or boundary
+ conditions where the variations come from two different sources.
+\end_layout
+
+\begin_layout Subsection
+Time History Database
+\end_layout
+
+\begin_layout Standard
+The time history database specifies the temporal variation in the amplitude
+ of a field associated with a boundary condition.
+ It is used in conjunction with spatial databases to provide spatial and
+ temporal variation of parameters for boundary conditions.
+ The same time history is applied to all of the locations, but the time
+ history may be shifted with a spatial variation in the onset time and scaled
+ with a spatial variation in the amplitude.
+ The time history database uses a simple ASCII file which is simpler than
+ the one used by the SimpleDB spatial database.
+ The file format is described in Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Spatialdata:TimeHistoryIO"
+
+\end_inset
+
+.
+ 
+\end_layout
+
+\begin_layout Standard
+As in the other Pyre objects, spatial database objects contain parameters
+ that can be set from the command line or using 
+\family typewriter
+.cfg or .pml
+\family default
+ files.
+ The parameters for a spatial database are:
+\end_layout
+
+\begin_layout Description
+label Label for the time history database, which is used in diagnostic messages.
+\end_layout
+
+\begin_layout Description
+filename Filename for the time history database.
+\end_layout
+
+\begin_layout Standard
+An example of setting these parameters in a 
+\family typewriter
+.cfg
+\family default
+ file is:
+\end_layout
+
+\begin_layout LyX-Code
+label = Displacement time history
+\end_layout
+
+\begin_layout LyX-Code
+filename = mytimehistory.timedb
+\end_layout
+
+\begin_layout Section
+Labels and Identifiers for Materials, Boundary Conditions, and Faults
+\end_layout
+
+\begin_layout Standard
+For materials, the ``label'' is a string used only for error messages.
+ The ``id'' is an integer that corresponds to the material identifier in
+ LaGriT (itetclr) and CUBIT (block id).
+ The id also tags the cells in the mesh for associating cells with a specific
+ material model and quadrature rule.
+ For boundary conditions, the ``label'' is a string used to associate groups
+ of vertices (psets in LaGriT and nodesets in CUBIT) with a boundary condition.
+ Some mesh generators use strings (LaGriT) to identify groups of nodes while
+ others (CUBIT) use strings and integers.
+ The default behavior in PyLith is to use strings to identify groups for
+ both LaGriT and CUBIT meshes, but the behavior for CUBIT meshes can be
+ changed to use the nodeset id (see Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:MeshIOCubit"
+
+\end_inset
+
+).
+ PyLith 1.0 had an ``id'' for boundary conditions, but we removed it from
+ subsequent releases because it was not used.
+ For faults the ``label'' is used in the same manner as the ``label'' for
+ boundary conditions.
+ That is, it associates a string with a group of vertices (pset in LaGriT
+ and nodeset in CUBIT).
+ The fault ``id'' is a integer used to tag the cohesive cells in the mesh
+ with a specific fault and quadrature rule.
+ Because we use the fault ``id'' to tag cohesive cells in the mesh the same
+ way we tag normal cells to materials, it must be unique among the faults
+ as well as the materials.
+\end_layout
+
+\begin_layout Section
+PyLith Output
+\end_layout
+
+\begin_layout Standard
+PyLith currently supports output to VTK and HDF5/Xdmf files, which can be
+ imported directly into a number of visualization tools, such as ParaView,
+ Visit, and MayaVi.
+ The HDF5 files can also be directly accessed via Matlab and PyTables.
+ PyLith 1.1 significantly expanded the information available for output,
+ including fault information and state variables.
+ Output of solution information for the domain, faults, materials, and boundary
+ conditions is controlled by an output manager for each module.
+ This allows the user to tailor the output to the problem.
+ By default PyLith will write a number of files.
+ Diagnostic information for each fault and material is written into a separate
+ file as are the solution and state variables for the domain, each fault,
+ and each material.
+ For a fault the diagnostic fields include the final slip, the slip initiation
+ time, and the fault normal vector.
+ For a material the diagnostic fields include the density and the elastic
+ constants.
+ Additional diagnostic information can be included by setting the appropriate
+ output parameters.
+ See Chapters 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "cha:material:models"
+
+\end_inset
+
+ and 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "cha:boundary:interface:conditions"
+
+\end_inset
+
+ for more information on the available fields and the next section for output
+ parameters.
+ The other files for each fault and material include solution information
+ at each time step where output was requested (also customizable by the
+ user).
+ For a fault the solution information includes the slip and the change in
+ tractions on the fault surface.
+ For a material the solution information includes the total strain and stress.
+ For some materials fields for additional state variables may be available.
+ For output via VTK files, each time step is written to a separate file,
+ whereas for HDF5 files all of the time steps for a given domain, fault,
+ or material are written into the same file.
+ A single Xdmf metadata file is created for each HDF5 file.
+\end_layout
+
+\begin_layout Subsection
+Output Manager
+\end_layout
+
+\begin_layout Standard
+The OutputManager object controls the type of files written, the fields
+ included in the output, and how often output is written.
+ PyLith includes some specialized OutputManagers that prescribe what fields
+ are output by default.
+ In some cases, additional fields are available but not included by default.
+ For example, in 3D problems, the along-strike and up-dip directions over
+ the fault surface can be included in the diagnostic information.
+ These are not included by default, because 1D problems have neither an
+ along-strike nor up-dip direction and 2D problems do not have an up-dip
+ direction.
+\end_layout
+
+\begin_layout Subsubsection
+Output Manager Parameters
+\end_layout
+
+\begin_layout Standard
+The parameters for the OutputManager are:
+\end_layout
+
+\begin_layout Description
+output_freq Flag indicating whether to write output based on the time or
+ number of time steps since the last output.
+ Permissible values are ``time_step'' and ``skip'' (default).
+\end_layout
+
+\begin_layout Description
+time_step Minimum time between output if 
+\family typewriter
+output_freq
+\family default
+ is set to ``time_step''.
+\end_layout
+
+\begin_layout Description
+skip Number of time steps between output if 
+\family typewriter
+output_freq
+\family default
+ is set to ``skip''.
+ A value of 0 means every time step is written.
+\end_layout
+
+\begin_layout Description
+writer Writer for data (VTK writer or HDF5 writer).
+\end_layout
+
+\begin_layout Description
+coordsys Coordinate system for vertex coordinates (currently ignored).
+\end_layout
+
+\begin_layout Description
+vertex_filter Filter to apply to all vertex fields (see Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:vertex:field:filters"
+
+\end_inset
+
+).
+\end_layout
+
+\begin_layout Description
+cell_filter Filter to apply to all cell fields (see Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:cell:field:filters"
+
+\end_inset
+
+).
+\end_layout
+
+\begin_layout Standard
+An example of setting the output parameters for a material in a 
+\family typewriter
+.cfg
+\family default
+ file is
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.materials.elastic.output]
+\end_layout
+
+\begin_layout LyX-Code
+output_freq = time_step
+\end_layout
+
+\begin_layout LyX-Code
+time_step = 1.0*yr
+\end_layout
+
+\begin_layout LyX-Code
+cell_filter = pylith.meshio.CellFilterAvgMesh
+\end_layout
+
+\begin_layout LyX-Code
+cell_info_fields = [density] ; limit diagnostic data to density
+\end_layout
+
+\begin_layout LyX-Code
+cell_data_fields = [total-strain,stress] ; default
+\end_layout
+
+\begin_layout LyX-Code
+writer.filename = dislocation-elastic.vtk
+\end_layout
+
+\begin_layout Subsubsection
+Output Over Subdomain
+\end_layout
+
+\begin_layout Standard
+Output of the solution over the entire domain for large problems generates
+ very large data files.
+ In some cases one is primarily interested in the solution over the ground
+ surface.
+ PyLith supports output of the solution on any boundary of the domain by
+ associating an output manager with a group of vertices corresponding to
+ the surface of the boundary.
+ As with several of the boundary conditions, the boundary must be a simply-conne
+cted surface.
+ The 
+\family typewriter
+OutputSolnSubset
+\family default
+ is the specialized OutputManager that implements this feature and, by default,
+ includes the displacement field in the output.
+ In addition to the 
+\family typewriter
+OutputManager
+\family default
+ parameters, the 
+\family typewriter
+OutputSolnSubset
+\family default
+ includes:
+\end_layout
+
+\begin_layout Description
+label Label of group of vertices defining boundary surface.
+\end_layout
+
+\begin_layout Description
+vertex_data_fields Names of vertex data fields to output (default is [``displace
+ments'']).
+\end_layout
+
+\begin_layout Subsection
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:output:points"
+
+\end_inset
+
+Output at Arbitrary Points
+\end_layout
+
+\begin_layout Standard
+In many situations with recorded observations, one would like to extract
+ the solution at the same locations as the recorded observation.
+ Rather than forcing the finite-element discretization to be consistent
+ with the observation points, PyLith includes a specialized output manager,
+ 
+\family typewriter
+OutputSolnPoints
+\family default
+, to interpolate the solution to arbitrary points.
+ By default, the output manager will include the displaceent time histories
+ in the output.
+ The locations are specified in a text file.
+ In addition to the 
+\family typewriter
+OutputManager
+\family default
+ parameters, the 
+\family typewriter
+OutputSolnSubset
+\family default
+ includes:
+\end_layout
+
+\begin_layout Description
+vertex_data_fields Names of vertex data fields to output (default is [``displace
+ments'']).
+\end_layout
+
+\begin_layout Description
+reader Reader for points list (default is 
+\family typewriter
+PointsList
+\family default
+).
+\end_layout
+
+\begin_layout Description
+writer Writer for output (default is 
+\family typewriter
+DataWriterVTKPoints
+\family default
+).
+ In most cases users will want to use the 
+\family typewriter
+DataWriterHDF5Mesh
+\family default
+.
+\end_layout
+
+\begin_layout Subsubsection
+PointsList Reader
+\end_layout
+
+\begin_layout Standard
+This object corresponds to a simple text file containing a list of points
+ (one per line) where output is desired.
+ The points are specified in the coordinate system specified by OutputSolnPoints.
+ The coordinates will be transformed into the coordinate system of the mesh
+ prior to interpolation.
+ The properties available to customize the behavior of 
+\family typewriter
+PointsList
+\family default
+ are:
+\end_layout
+
+\begin_layout Description
+filename Names of file containing list of points.
+\end_layout
+
+\begin_layout Description
+comment_delimiter Delimiter at beginning of line to identify comments (default
+ is #).
+\end_layout
+
+\begin_layout Description
+value_delimiter Delimiter used to separate values (default is whitespace).
+\end_layout
+
+\begin_layout Subsection
+Output Field Filters
+\end_layout
+
+\begin_layout Standard
+Output fields may not directly correspond to the information a user desires.
+ For example, the default output for the state variables includes the physical
+ properties at each quadrature point.
+ Most visualization packages cannot handle cell fields with multiple points
+ in a cell (the locations of the points within the cell are not included
+ in the data file).
+ In order to reduce the field to a single point within the cell, we would
+ like to average the values.
+ This is best done within PyLith before output, because it reduces the file
+ size and the quadrature information provides the information necessary
+ (the weights of the quadrature points) to compute the appropriate average
+ over the cell.
+\end_layout
+
+\begin_layout Subsubsection
+\begin_inset CommandInset label
+LatexCommand label
+name "sub:vertex:field:filters"
+
+\end_inset
+
+Vertex Field Filters
+\end_layout
+
+\begin_layout Standard
+Currently the only filter available for vertex fields computes the magnitude
+ of a vector at each location.
+ Most visualization packages support this operation, so this filter is not
+ very useful.
+\end_layout
+
+\begin_layout Description
+VertexFilterVecNorm Computes the magnitude of a vector field at each location.
+\end_layout
+
+\begin_layout Subsubsection
+\begin_inset CommandInset label
+LatexCommand label
+name "sub:cell:field:filters"
+
+\end_inset
+
+Cell Field Filters
+\end_layout
+
+\begin_layout Standard
+Most users will want to apply a filter to cell fields to average the fields
+ over the cell, producing values at one location per cell for visualization.
+\end_layout
+
+\begin_layout Description
+CellFilterAvgMesh Compute the weighted average of the values within a bulk
+ cell.
+ The weights are determined from the quadrature associated with the cells.
+\end_layout
+
+\begin_layout Description
+CellFilterAvgSubMesh Compute the weighted average of the values for a boundary
+ cell.
+ The weights are determined from the quadrature associated with the cells.
+\end_layout
+
+\begin_layout Subsection
+VTK Output
+\end_layout
+
+\begin_layout Standard
+PyLith writes legacy (non-XML) VTK files.
+ These are simple files with vertex coordinates, the mesh topology, and
+ fields over vertices and/or cells.
+ Each time step is written to a different file.
+ The time stamp is included in the filename with the decimal point removed.
+ This allows automatic generation of animations with many visualization
+ packages that use VTK files.
+ The default time stamp is the time in seconds, but this can be changed
+ using the normalization constant to give a time stamp in years, tens of
+ years, or any other value.
+\end_layout
+
+\begin_layout Subsubsection
+DataWriterVTK Parameters
+\end_layout
+
+\begin_layout Standard
+The parameters for the VTK writer are:
+\end_layout
+
+\begin_layout Description
+filename Name of VTK file
+\end_layout
+
+\begin_layout Description
+time_format C-style format string for time stamp in filename.
+ The decimal point in the time stamp will be removed for compatibility with
+ VTK visualization packages that provide seamless animation of data from
+ multiple VTK files.
+\end_layout
+
+\begin_layout Description
+time_constant Value used to normalize time stamp in VTK files (default is
+ 1.0 s).
+\end_layout
+
+\begin_layout Subsection
+\begin_inset CommandInset label
+LatexCommand label
+name "sub:HDF5/Xdmf-Output"
+
+\end_inset
+
+HDF5/Xdmf Output
+\end_layout
+
+\begin_layout Standard
+HDF5 files provide a flexible framework for storing simulation data with
+ datasets in groups logically organized in a tree structure analogous to
+ files in directories.
+ HDF5 output offers parallel, multi-dimensional array output in binary files,
+ so it is much faster and more convenient than the VTK output which uses
+ ASCII files and separate files for each time step.
+ Standards for organizing datasets and groups in HDF5 files do not exist
+ for general finite-element software in geodynamics.
+ Consequently, PyLith uses its own simple layout show in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:hdf5:layout"
+
+\end_inset
+
+.
+ In order for visualization tools, such as ParaView, to determine which
+ datasets to read and where to find them in the hierarchy of groups within
+ the HDF5 file, we create an Xdmf (eXtensible Data Model and Format, 
+\begin_inset Flex URL
+status open
+
+\begin_layout Plain Layout
+
+www.xdmf.org
+\end_layout
+
+\end_inset
+
+) metadata file that provides this information.
+ This file is written when PyLith closes the HDF5 file at the end of the
+ simulation.
+ In order to visualize the datasets in an HDF5 file, one simply opens the
+ corresponding Xdmf file (the extension is 
+\family typewriter
+.xmf
+\family default
+) in ParaView or Visit.
+ The Xdmf file contains the relative path to the HDF5 file so the files
+ can be moved but must be located together in the same directory.
+ 
+\end_layout
+
+\begin_layout Quote
+
+\series bold
+\color red
+Note:
+\color inherit
+ 
+\series default
+The Xdmf format supports representation of two- and three-dimensional coordinate
+s of points, scalar vector field types, and three-dimensional vector and
+ tensor vector field types but not two-dimensional vector or tensor vector
+ field types.
+ As a result, we separate the components of two-dimensional vector and tensor
+ vector field objects and add the component as a suffix to the name of the
+ field.
+ The vector can be reconstructed within ParaView using the Calculator (see
+ Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Tutorial-Subduction"
+
+\end_inset
+
+ for an example).
+ Accessing the datasets in the HDF5 files using tools such as h5py (included
+ with the PyLith binary and installed by default with the PyLith Installer)
+ and PyTables with visualization through MayaVi circumvents this problem,
+ but requires writing Python scripts and a deeper knowledge of the visualization
+ interface.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\noindent
+\align center
+\begin_inset Graphics
+	filename figs/hdf5layout.eps
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Layout of PyLith HDF5 file.
+ The orange rectangles with rounded corners identify the groups and the
+ blue rectangles with sharp corners identify the datasets.
+ The dimensions of the data sets are shown in parentheses.
+ Most HDF5 files will contain either 
+\family typewriter
+vertex_fields
+\family default
+ or 
+\family typewriter
+cell_fields
+\family default
+ but not both.
+ 
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:hdf5:layout"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+HDF5 files do not contain self-correcting features that allow a file to
+ be read if part of a dataset is corrupted.
+ This type of error can occur if a job terminates abnormally in the middle
+ or at the end of a simulation on a large cluster or other parallel machine.
+ Fortunately, HDF5 also offers the ability to store datasets in external
+ binary files with the locations specified by links in the HDF5 file.
+ Note that the use of external data files results in one data file per dataset
+ in addition to the HDF5 and Xdmf files.
+ The external data files use the name of the HDF5 file with the dataset
+ name added to the prefix and the 
+\family typewriter
+.h5
+\family default
+ suffix replaced by 
+\family typewriter
+.dat
+\family default
+).
+ The HDF5 files include relative paths to the external data files, so these
+ files can also be moved, but they, too, must be kept together in the same
+ directory.
+ This provides a more robust method of output because one can generate an
+ HDF5 file associated with the uncorrupted portions of the external data
+ files should an error occur.
+ Currently, PyLith does not include a utility to do this, but we plan to
+ add one in a future release.
+ Thus, there are two options when writing PyLith output to HDF5 files: (1)
+ including the datasets directly in the HDF5 files themselves or (2) storing
+ the datasets in external binary files with just metadata in the HDF5 files.
+ Both methods provide similar performance because they will use MPI I/O
+ if it is available.
+ 
+\end_layout
+
+\begin_layout Quote
+
+\series bold
+\color red
+Warning:
+\color inherit
+ 
+\series default
+Storing the datasets within the HDF5 file in a parallel simulation requires
+ that the HDF5 library be configured with the 
+\family typewriter
+--enable-parallel
+\family default
+ option.
+ 
+\color none
+The binary PyLith packages include this feature and it is a default setting
+ in building HDF5 via the PyLith Installer.
+\end_layout
+
+\begin_layout Standard
+Accessing the datasets for additional analysis or visualization is nearly
+ identical in the two methods because the use of external data files is
+ completely transparent to the user except for the presence of the additional
+ files.
+ Note that in order for ParaView to find the HDF5 and external data files,
+ it must be run from the same relative location where the simulation was
+ run.
+ For example, if the simulation was run from a directory called 
+\begin_inset Quotes eld
+\end_inset
+
+work
+\begin_inset Quotes erd
+\end_inset
+
+ and the HDF5/Xdmf files were written to 
+\begin_inset Quotes eld
+\end_inset
+
+work/output
+\begin_inset Quotes erd
+\end_inset
+
+, then ParaView should be run from the 
+\begin_inset Quotes eld
+\end_inset
+
+work
+\begin_inset Quotes erd
+\end_inset
+
+ directory.
+ See Table 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "tab:material:output:components"
+
+\end_inset
+
+ in Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:material:parameters"
+
+\end_inset
+
+for a table of component values for tensor output.
+\end_layout
+
+\begin_layout Subsubsection
+HDF5 Utilities
+\end_layout
+
+\begin_layout Standard
+HDF5 includes several utilities for examining the contents of HDF5 files.
+ 
+\family typewriter
+h5dump
+\family default
+ is very handy for displaying the hierarchy, dimensions of datasets, attributes,
+ and even the dataset values.
+ 
+\end_layout
+
+\begin_layout Quote
+Dump the entire HDF5 file to stdout (not practical or useful for large files):
+\end_layout
+
+\begin_deeper
+\begin_layout LyX-Code
+h5dump mydata.h5
+\end_layout
+
+\end_deeper
+\begin_layout Quote
+Dump the hierarchy of an HDF5 file to stdout:
+\end_layout
+
+\begin_deeper
+\begin_layout LyX-Code
+h5dump -n mydata.h5
+\end_layout
+
+\end_deeper
+\begin_layout Quote
+Dump the hierarchy with dataset dimensions and attributes to stdout:
+\end_layout
+
+\begin_deeper
+\begin_layout LyX-Code
+h5dump -H mydata.h5
+\end_layout
+
+\end_deeper
+\begin_layout Quote
+Dump dataset 'vertices' in group '/geometry' to stdout:
+\end_layout
+
+\begin_deeper
+\begin_layout LyX-Code
+h5dump -d /geometry/vertices mydata.h5
+\end_layout
+
+\end_deeper
+\begin_layout Subsubsection
+DataWriterHDF5 Parameters
+\end_layout
+
+\begin_layout Standard
+This HDF5 writer stores the datasets inside the HDF5 file and the parameters
+ are:
+\end_layout
+
+\begin_layout Description
+filename Name of HDF5 file (the Xdmf filename is generated from the same
+ prefix).
+\end_layout
+
+\begin_layout Subsubsection
+DataWriterHDF5Ext Parameters
+\end_layout
+
+\begin_layout Standard
+This HDF5 writer stores the datasets using external data files (a more robust
+ method for parallel runs) and the parameters are:
+\end_layout
+
+\begin_layout Description
+filename Name of HDF5 file (the external dataset filenames and the Xdmf
+ filename are generated from the same prefix).
+\end_layout
+
+\begin_layout Standard
+An example of changing the writer from the default VTK writer to the HDF5
+ writer with external datasets for output over the domain in a 
+\family typewriter
+.cfg
+\family default
+ file is
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.domain.output]
+\end_layout
+
+\begin_layout LyX-Code
+output_freq = time_step
+\end_layout
+
+\begin_layout LyX-Code
+time_step = 1.0*yr
+\end_layout
+
+\begin_layout LyX-Code
+cell_data_fields = [displacement,velocity]
+\end_layout
+
+\begin_layout LyX-Code
+writer = pylith.meshio.DataWriterHDF5ExtMesh
+\end_layout
+
+\begin_layout LyX-Code
+writer.filename = dislocation.h5
+\end_layout
+
+\begin_layout Section
+Tips and Hints
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Tips:Hints"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Tips and Hints For Running PyLith
+\end_layout
+
+\begin_layout Itemize
+Examine the examples for a problem similar to the one you want to run and
+ dissect it in detail.
+\end_layout
+
+\begin_layout Itemize
+Start with a uniform-resolution coarse mesh to debug the problem setup.
+ Increase the resolution as necessary to resolve the solution fields of
+ interest (resolving stresses/strains may require a higher resolution than
+ that for resolving displacements).
+\end_layout
+
+\begin_layout Itemize
+Merge materials using the same material model.
+ This will result in only one VTK or HDF5 file for each material model rather
+ than several files.
+\end_layout
+
+\begin_layout Itemize
+The rate of convergence in quasi-static (implicit) problems can sometimes
+ be improved by renumbering the vertices in the finite-element mesh to reduce
+ the bandwidth of the sparse matrix.
+ PyLith can use the reverse Cuthill-McKee algorithm to reorder the vertices
+ and cells.
+\end_layout
+
+\begin_layout Itemize
+If you encounter errors or warnings, run 
+\family typewriter
+pylithinfo
+\family default
+ or use the 
+\family typewriter
+--help
+\family default
+, 
+\family typewriter
+--help-components
+\family default
+, and 
+\family typewriter
+--help-properties
+\family default
+ command line arguments when running PyLith to check the parameters to make
+ sure PyLith is using the parameters you intended.
+\end_layout
+
+\begin_layout Itemize
+Use the 
+\family typewriter
+--petsc.log_summary
+\family default
+, 
+\family typewriter
+--petsc.ksp_monitor
+\family default
+, 
+\family typewriter
+--petsc.ksp_view
+\family default
+, 
+\family typewriter
+--petsc.ksp_converged_reason
+\family default
+, and 
+\family typewriter
+--petsc.snes_converged_reason
+\family default
+ command line arguments (or set them in a parameter file) to view PyLith
+ performance and monitor the convergence.
+\end_layout
+
+\begin_layout Itemize
+Turn on the journals (see the examples) to monitor the progress of the code.
+\end_layout
+
+\begin_layout Subsection
+Troubleshooting
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Troubleshooting"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Itemize
+Consult the PyLith FAQ webpage (
+\begin_inset Flex URL
+status open
+
+\begin_layout Plain Layout
+
+http://www.geodynamics.org/cig/community/workinggroups/short/workarea/pylith-wiki
+\end_layout
+
+\end_inset
+
+) which contains a growing list of common problems and their corresponding
+ solutions.
+\end_layout
+
+\begin_layout Itemize
+
+\family typewriter
+ImportError: liblapack.so.2: cannot open shared object file: No such file
+ or directory
+\end_layout
+
+\begin_layout Quote
+PyLith cannot find one of the libraries.
+ You need to set up your environment variables (e.g., PATH, PYTHONPATH, and
+ LD_LIBRARY_PATH) to match your installation.
+ If you are using the PyLith binary on Linux or Mac OS X, run the command
+ 
+\family typewriter
+source setup.sh 
+\family default
+in the directory where you unpacked the distribution.
+ This will set up your environment variables for you.
+ If you are building PyLith from source, please consult the instructions
+ for building from source.
+\end_layout
+
+\begin_layout Itemize
+\paragraph_spacing single
+
+\family typewriter
+>> {command line}:: 
+\begin_inset Newline newline
+\end_inset
+
+-- pyre.inventory(error) 
+\begin_inset Newline newline
+\end_inset
+
+-- p4wd <- 'true' 
+\begin_inset Newline newline
+\end_inset
+
+-- unrecognized property 'p4wd' 
+\begin_inset Newline newline
+\end_inset
+
+>> {command line}:: 
+\begin_inset Newline newline
+\end_inset
+
+-- pyre.inventory(error) 
+\begin_inset Newline newline
+\end_inset
+
+-- p4pg <- 'true' 
+\begin_inset Newline newline
+\end_inset
+
+-- unrecognized property ' p4pg'
+\end_layout
+
+\begin_layout Quote
+Verify that the `mpirun' command included in the PyLith package is the first
+ one on your PATH:
+\end_layout
+
+\begin_layout Quote
+
+\family typewriter
+$ which mpirun
+\end_layout
+
+\begin_layout Quote
+If it is not, adjust your PATH environment variable accordingly.
+\end_layout
+
+\begin_layout Itemize
+
+\family typewriter
+"merlin.DistributionNotFound: Cheetah" error
+\end_layout
+
+\begin_layout Quote
+This error occurs when trying to use the 32-bit linux binary on some 64-bit
+ linux systems.
+ One of the Python packages PyLith uses does not know how to determine the
+ system architecture at runtime.
+ The workaround is:
+\end_layout
+
+\begin_layout Enumerate
+Go to the lib/python2.6/site-packages directory.
+\end_layout
+
+\begin_layout Enumerate
+Unzip merlin-1.7-py2.6.egg (if it is a file and not a directory).
+\end_layout
+
+\begin_layout Enumerate
+Go to the merlin directory.
+\end_layout
+
+\begin_layout Enumerate
+Edit __init__.py.
+ Replace line 308 plat = get_platform() with plat = "linux-i686"
+\end_layout
+
+\begin_layout Enumerate
+If merlin-1.7-py2.6.egg is a file, rezip merlin.
+ Go to the site-packages directory and enter "zip -r merlin-1.7-py2.6.egg merlin".
+\end_layout
+
+\begin_layout Itemize
+
+\family typewriter
+-- Solving equations.
+\begin_inset Newline newline
+\end_inset
+
+[0]PETSC ERROR: ---------------- Error Message -------------------------------
+ 
+\begin_inset Newline newline
+\end_inset
+
+[0]PETSC ERROR: Detected zero pivot in LU factorization
+\begin_inset Newline newline
+\end_inset
+
+ see http://www.mcs.anl.gov/petsc/petsc-as/documentation/faq.html#ZeroPivot!
+\end_layout
+
+\begin_layout Quote
+This usually occurs when the null space of the system Jacobian is nonzero,
+ such as the case of a problem without Dirichlet boundary conditions on
+ any boundary.
+ If this arises when using the split fields and algebraic multigrid precondition
+ing and no additional Dirichlet boundary conditions are desired, then the
+ workaround is to revert to using the Additive Schwarz preconditioning without
+ split fields as discussed in Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:petsc:options"
+
+\end_inset
+
+.
+ 
+\end_layout
+
+\begin_layout Itemize
+PyLith crashes with a bus error.
+\end_layout
+
+\begin_layout Quote
+This often indicates that PyLith is using incompatible versions of libraries.
+ This can result from changing your environment variables after configuring
+ or installing PyLith (when building from source) or errors in setting the
+ environment variables (PATH, LD_LIBRARY_PATH, and PYTHONPATH).
+ If the former case, simply reconfigure and rebuild PyLith.
+ In the latter case, check your environment variables (order matters!) to
+ make sure PyLith finds the desired directories before system directories.
+ 
+\end_layout
+
+\begin_layout Itemize
+PyLith crashes with a segmentation fault.
+\end_layout
+
+\begin_layout Quote
+A segmentation fault might be caused by an error that wasn't trapped or
+ a bug in the code.
+ Please report these cases so that we can fix these problems (either trap
+ the error and provide the user with an informative error message, or fix
+ the bug).
+ If this occurs with any of the problems distributed with PyLith, simply
+ submit a bug report (see Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Getting-Help-and"
+
+\end_inset
+
+) indicating which problem you ran and your platform.
+ If the crash occurs for a problem you created, it is a great help if you
+ can try to reproduce the crash with a very simple problem (e.g., adjust the
+ boundary conditions or other parameters of one of the examples to reproduce
+ the segmentation fault).
+ Submit a bug report along with log files showing the backtrace from a debugger
+ (e.g., gdb) and the valgrind log file (only available on Linux platforms).
+ You can generate a backtrace using the debugger by using the 
+\family typewriter
+--petsc.start_in_debugger
+\family default
+ command line argument:
+\end_layout
+
+\begin_layout LyX-Code
+pylith [..args..] --petsc.start_in_debugger
+\end_layout
+
+\begin_layout LyX-Code
+(gdb) continue
+\end_layout
+
+\begin_layout LyX-Code
+(gdb) backtrace
+\end_layout
+
+\begin_layout Quote
+To use valgrind to detect the memory error, first go to your working directory
+ and run the problem with 
+\family typewriter
+--launcher.dry
+\family default
+:
+\end_layout
+
+\begin_layout LyX-Code
+pylith [..args..] --launcher.dry
+\end_layout
+
+\begin_layout Quote
+Instead of actually running the problem, this causes PyLith to dump the
+ mpirun/mpiexec command it will execute.
+ Copy and paste this command into your shell so you can run it directly.
+ Insert the full path to valgrind before the full path to mpinemesis and
+ tell valgrind to use a log file:
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+mpirun -np 1 /path/to/valgrind --log-file=valgrind-log  /path/to/mpinemesis
+ --pyre-start [..lots of junk..]
+\end_layout
+
+\end_body
+\end_document

Modified: short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/3dhex8.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/3dhex8.lyx	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/3dhex8.lyx	2012-06-25 17:37:03 UTC (rev 20406)
@@ -621,6 +621,13 @@
 \end_inset
 
 
+\begin_inset CommandInset include
+LatexCommand input
+filename "dike/dike.lyx"
+
+\end_inset
+
+
 \end_layout
 
 \end_body

Copied: short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/dike (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/doc/userguide/tutorials/3dhex8/dike)

Modified: short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/friction/friction.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/friction/friction.lyx	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/friction/friction.lyx	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,1192 +1,1199 @@
-#LyX 2.0 created this file. For more info see http://www.lyx.org/
-\lyxformat 413
-\begin_document
-\begin_header
-\textclass book
-\begin_preamble
-
-\end_preamble
-\use_default_options false
-\maintain_unincluded_children false
-\language english
-\language_package default
-\inputencoding latin1
-\fontencoding global
-\font_roman default
-\font_sans default
-\font_typewriter default
-\font_default_family default
-\use_non_tex_fonts false
-\font_sc false
-\font_osf false
-\font_sf_scale 100
-\font_tt_scale 100
-
-\graphics default
-\default_output_format default
-\output_sync 0
-\bibtex_command default
-\index_command default
-\paperfontsize default
-\spacing single
-\use_hyperref false
-\papersize default
-\use_geometry true
-\use_amsmath 0
-\use_esint 0
-\use_mhchem 1
-\use_mathdots 1
-\cite_engine basic
-\use_bibtopic false
-\use_indices false
-\paperorientation portrait
-\suppress_date false
-\use_refstyle 0
-\index Index
-\shortcut idx
-\color #008000
-\end_index
-\leftmargin 1in
-\topmargin 1in
-\rightmargin 1in
-\bottommargin 2in
-\secnumdepth 3
-\tocdepth 3
-\paragraph_separation indent
-\paragraph_indentation default
-\quotes_language english
-\papercolumns 1
-\papersides 1
-\paperpagestyle default
-\tracking_changes false
-\output_changes false
-\html_math_output 0
-\html_css_as_file 0
-\html_be_strict false
-\end_header
-
-\begin_body
-
-\begin_layout Subsection
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:Tutorial-3d-hex8-friction"
-
-\end_inset
-
-Fault Friction Examples
-\end_layout
-
-\begin_layout Standard
-PyLith features discussed in this tutorial:
-\end_layout
-
-\begin_layout Itemize
-Static fault friction
-\end_layout
-
-\begin_layout Itemize
-Slip-weakening fault friction
-\end_layout
-
-\begin_layout Itemize
-Rate-and-state fault friction
-\end_layout
-
-\begin_layout Itemize
-Nonlinear solver
-\end_layout
-
-\begin_layout Subsubsection
-Overview
-\end_layout
-
-\begin_layout Standard
-This set of examples provides an introduction to using fault friction in
- static and quasi-static problems with PyLith.
- Dynamic problems with fault friction are discussed in Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:tutorial:shearwave:quad4"
-
-\end_inset
-
-.
- The boundary conditions are all either static or quasi-static Dirichlet
- conditions, and only elastic materials are used.
- In all the fault friction examples we apply axial (x) displacements on
- both the positive and negative x-faces to maintain a compressive normal
- tractions on the fault.
- Otherwise, there would be no frictional resistance.
- Fault friction generates nonlinear behavior, so we use the nonlinear solver.
- All of the examples are contained in the directory 
-\family typewriter
-examples/3d/hex8
-\family default
-, and the corresponding 
-\family typewriter
-.cfg
-\family default
- files are 
-\family typewriter
-step10.cfg
-\family default
-, 
-\family typewriter
-step11.cfg
-\family default
-, 
-\family typewriter
-step12.cfg
-\family default
-, 
-\family typewriter
-step13.cfg
-\family default
-, and 
-\family typewriter
-step14.cfg
-\family default
-.
- Each example may be run as follows:
-\end_layout
-
-\begin_layout LyX-Code
-pylith stepXX.cfg
-\end_layout
-
-\begin_layout Standard
-This will cause PyLith to read the default parameters in 
-\family typewriter
-pylithapp.cfg
-\family default
-, and then override or augment them with the additional parameters in the
- 
-\family typewriter
-stepXX.cfg
-\family default
- file.
- Each 
-\family typewriter
-.cfg
-\family default
- file is extensively documented, to provide detailed information on the
- various parameters.
-\end_layout
-
-\begin_layout Subsubsection
-Step10 - Static Friction (Stick) with Static Dirichlet Boundary Conditions
-\end_layout
-
-\begin_layout Standard
-The 
-\family typewriter
-step10.cfg
-\family default
- file defines a problem that is identical to example step01, except for
- the presence of a vertical fault with static friction.
- In this case, the applied displacements are insufficient to cause the fault
- to slip, so the solution is identical to that in example step01.
- As in previous examples involving faults, we must first provide an array
- defining the fault interfaces:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent]
-\end_layout
-
-\begin_layout LyX-Code
-# Set interfaces to an array of 1 fault: 'fault'.
-\end_layout
-
-\begin_layout LyX-Code
-interfaces = [fault]
-\end_layout
-
-\begin_layout Standard
-Since all fault friction models are nonlinear we must also use the nonlinear
- solver:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.implicit]
-\end_layout
-
-\begin_layout LyX-Code
-# Fault friction is a nonlinear problem so we need to use the nonlinear
-\end_layout
-
-\begin_layout LyX-Code
-# solver.
-\end_layout
-
-\begin_layout LyX-Code
-solver = pylith.problems.SolverNonlinear
-\end_layout
-
-\begin_layout Standard
-We need to change the fault interface from the default (
-\family typewriter
-FaultCohesiveKin
-\family default
-) to 
-\family typewriter
-FaultCohesiveDyn
-\family default
- and we set the friction model to use:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.interfaces]
-\end_layout
-
-\begin_layout LyX-Code
-# Change fault to dynamic fault interface.
-\end_layout
-
-\begin_layout LyX-Code
-fault = pylith.faults.FaultCohesiveDyn
-\begin_inset Newline newline
-\end_inset
-
-
-\begin_inset Newline newline
-\end_inset
-
-
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.interfaces.fault]
-\end_layout
-
-\begin_layout LyX-Code
-# Use the static friction model.
-\end_layout
-
-\begin_layout LyX-Code
-friction = pylith.friction.StaticFriction
-\end_layout
-
-\begin_layout Standard
-The 
-\family typewriter
-StaticFriction
-\family default
- model requires values for the coefficient of friction and the cohesion
- (see Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sub:Fault-Constitutive-Models"
-
-\end_inset
-
-).
- We provide both of these using a 
-\family typewriter
-UniformDB
-\family default
-:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.interfaces.fault]
-\end_layout
-
-\begin_layout LyX-Code
-# Set static friction model parameters using a uniform DB.
- Set the
-\end_layout
-
-\begin_layout LyX-Code
-# static coefficient of friction to 0.6 and cohesion to 0.0 Pa.
-\end_layout
-
-\begin_layout LyX-Code
-friction.db_properties = spatialdata.spatialdb.UniformDB
-\end_layout
-
-\begin_layout LyX-Code
-friction.db_properties.label = Static friction
-\end_layout
-
-\begin_layout LyX-Code
-friction.db_properties.values = [friction-coefficient,cohesion]
-\end_layout
-
-\begin_layout LyX-Code
-friction.db_properties.data = [0.6,0.0*Pa]
-\end_layout
-
-\begin_layout Standard
-Fault friction models require additional PETSc settings:
-\end_layout
-
-\begin_layout LyX-Code
-# NOTE: There are additional settings specific to fault friction.
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.petsc]
-\end_layout
-
-\begin_layout LyX-Code
-# Friction sensitivity solve used to compute the increment in slip
-\end_layout
-
-\begin_layout LyX-Code
-# associated with changes in the Lagrange multiplier imposed by the
-\end_layout
-
-\begin_layout LyX-Code
-# fault constitutive model.
-\end_layout
-
-\begin_layout LyX-Code
-friction_pc_type = asm
-\end_layout
-
-\begin_layout LyX-Code
-friction_sub_pc_factor_shift_type = nonzero
-\end_layout
-
-\begin_layout LyX-Code
-friction_ksp_max_it = 25
-\end_layout
-
-\begin_layout LyX-Code
-friction_ksp_gmres_restart = 30
-\end_layout
-
-\begin_layout LyX-Code
-# Uncomment to view details of friction sensitivity solve.
-\end_layout
-
-\begin_layout LyX-Code
-#friction_ksp_monitor = true
-\end_layout
-
-\begin_layout LyX-Code
-#friction_ksp_view = true
-\end_layout
-
-\begin_layout LyX-Code
-friction_ksp_converged_reason = true
-\end_layout
-
-\begin_layout LyX-Code
-
-\end_layout
-
-\begin_layout Standard
-When we have run the simulation, the output VTK files will be contained
- in 
-\family typewriter
-examples/3d/hex8/output
-\family default
- (all with a prefix of 
-\family typewriter
-step10
-\family default
-).
- Results using ParaView are shown in Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:step10-fault-traction-slip"
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/step10-fault-traction-slip.jpg
-	lyxscale 50
-	width 10cm
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Magnitude of tractions on the fault for example step10 visualized using
- ParaView.
- 
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:step10-fault-traction-slip"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection
-Step11 - Static Friction (Slip) with Static Dirichlet Boundary Conditions
-\end_layout
-
-\begin_layout Standard
-In step11 we apply twice as much shear displacement as in step10, which
- is sufficient to induce slip on the fault.
- All other settings are identical.
- To change the amount of shear displacement, we change the spatial database
- for the positive and negative x-faces to a 
-\family typewriter
-UniformDB
-\family default
-, and apply the altered values within the 
-\family typewriter
-.cfg
-\family default
- file:
-\end_layout
-
-\begin_layout LyX-Code
-# +x face
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.bc.x_pos]
-\end_layout
-
-\begin_layout LyX-Code
-bc_dof = [0, 1]
-\end_layout
-
-\begin_layout LyX-Code
-label = face_xpos
-\end_layout
-
-\begin_layout LyX-Code
-db_initial = spatialdata.spatialdb.UniformDB
-\end_layout
-
-\begin_layout LyX-Code
-db_initial.label = Dirichlet BC on +x
-\end_layout
-
-\begin_layout LyX-Code
-db_initial.values = [displacement-x,displacement-y]
-\end_layout
-
-\begin_layout LyX-Code
-db_initial.data = [-1.0*m,2.0*m]
-\end_layout
-
-\begin_layout LyX-Code
-
-\end_layout
-
-\begin_layout LyX-Code
-# -x face
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.bc.x_neg]
-\end_layout
-
-\begin_layout LyX-Code
-bc_dof = [0, 1]
-\end_layout
-
-\begin_layout LyX-Code
-label = face_xneg
-\end_layout
-
-\begin_layout LyX-Code
-db_initial = spatialdata.spatialdb.UniformDB
-\end_layout
-
-\begin_layout LyX-Code
-db_initial.label = Dirichlet BC on -x
-\end_layout
-
-\begin_layout LyX-Code
-db_initial.values = [displacement-x,displacement-y]
-\end_layout
-
-\begin_layout LyX-Code
-db_initial.data = [1.0*m,-2.0*m]
-\end_layout
-
-\begin_layout Standard
-When we have run the simulation, the output VTK files will be contained
- in 
-\family typewriter
-examples/3d/hex8/output
-\family default
- (all with a prefix of 
-\family typewriter
-step11
-\family default
-).
- Results using ParaView are shown in Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:step11-fault-traction-slip"
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/step11-fault-traction-slip.jpg
-	lyxscale 50
-	width 10cm
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Magnitude of tractions on the fault for example step10 visualized using
- ParaView.
- Vectors of fault slip are also plotted.
- Note that PyLith outputs slip in the fault coordinate system, so we transform
- them to the global coordinate system using the Calculator in ParaView.
- A more general approach involves outputing the fault coordinate system
- information and using these fields in the Calculator.
- 
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:step11-fault-traction-slip"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection
-Step12 - Static Friction with Quasi-static Dirichlet Boundary Conditions
-\end_layout
-
-\begin_layout Standard
-The 
-\family typewriter
-step12.cfg
-\family default
- file describes a problem that is similar to examples step10 and step11,
- except that we apply velocity boundary conditions and run the simulation
- for 200 years.
- Once fault friction is overcome, the fault slips at a steady rate.
- To prevent convergence problems we set the time step size to a constant
- value of 5 years:
-\end_layout
-
-\begin_layout LyX-Code
-# Change the total simulation time to 200 years, and use a constant time
-\end_layout
-
-\begin_layout LyX-Code
-# step size of 5 years.
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.implicit.time_step]
-\end_layout
-
-\begin_layout LyX-Code
-total_time = 200.0*year
-\end_layout
-
-\begin_layout LyX-Code
-dt = 5.0*year
-\end_layout
-
-\begin_layout Standard
-As in the other fault friction examples, we apply initial displacements
- along the x-axis (to maintain a compressive stress on the fault), and we
- apply velocity boundary conditions that yield a left-lateral sense of motion:
-\end_layout
-
-\begin_layout LyX-Code
-# +x face -- Dirichlet
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.bc.x_pos]
-\end_layout
-
-\begin_layout LyX-Code
-bc_dof = [0,1]
-\end_layout
-
-\begin_layout LyX-Code
-label = face_xpos
-\end_layout
-
-\begin_layout LyX-Code
-db_initial = spatialdata.spatialdb.UniformDB
-\end_layout
-
-\begin_layout LyX-Code
-db_initial.label = Dirichlet BC on +x
-\end_layout
-
-\begin_layout LyX-Code
-db_initial.values = [displacement-x,displacement-y]
-\end_layout
-
-\begin_layout LyX-Code
-db_initial.data = [-1.0*m,0.0*m]
-\end_layout
-
-\begin_layout LyX-Code
-db_rate = spatialdata.spatialdb.UniformDB
-\end_layout
-
-\begin_layout LyX-Code
-db_rate.label = Dirichlet rate BC on +x
-\end_layout
-
-\begin_layout LyX-Code
-db_rate.values = [displacement-rate-x,displacement-rate-y,rate-start-time]
-\end_layout
-
-\begin_layout LyX-Code
-db_rate.data = [0.0*cm/year,1.0*cm/year,0.0*year]
-\begin_inset Newline newline
-\end_inset
-
-
-\begin_inset Newline newline
-\end_inset
-
-
-\end_layout
-
-\begin_layout LyX-Code
-# -x face
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.bc.x_neg]
-\end_layout
-
-\begin_layout LyX-Code
-bc_dof = [0, 1]
-\end_layout
-
-\begin_layout LyX-Code
-label = face_xneg
-\end_layout
-
-\begin_layout LyX-Code
-db_initial.label = Dirichlet BC on -x
-\end_layout
-
-\begin_layout LyX-Code
-db_rate = spatialdata.spatialdb.UniformDB
-\end_layout
-
-\begin_layout LyX-Code
-db_rate.label = Dirichlet rate BC on -x
-\end_layout
-
-\begin_layout LyX-Code
-db_rate.values = [displacement-rate-x,displacement-rate-y,rate-start-time]
-\end_layout
-
-\begin_layout LyX-Code
-db_rate.data = [0.0*cm/year,-1.0*cm/year,0.0*year]
-\end_layout
-
-\begin_layout Standard
-For this example, we keep the same coefficient of friction as examples step10
- and step11, but we include a cohesion of 2 MPa:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.interfaces.fault]
-\end_layout
-
-\begin_layout LyX-Code
-# Set static friction model parameters using a uniform DB.
- Set the
-\end_layout
-
-\begin_layout LyX-Code
-# static coefficient of friction to 0.6 and cohesion to 2.0 MPa.
-\end_layout
-
-\begin_layout LyX-Code
-friction.db_properties = spatialdata.spatialdb.UniformDB
-\end_layout
-
-\begin_layout LyX-Code
-friction.db_properties.label = Static friction
-\end_layout
-
-\begin_layout LyX-Code
-friction.db_properties.values = [friction-coefficient,cohesion]
-\end_layout
-
-\begin_layout LyX-Code
-friction.db_properties.data = [0.6,2.0*MPa]
-\end_layout
-
-\begin_layout Standard
-When we have run the simulation, the output VTK files will be contained
- in 
-\family typewriter
-examples/3d/hex8/output
-\family default
- (all with a prefix of 
-\family typewriter
-step12
-\family default
-).
- Results using ParaView are shown in Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:step12-displ-t200"
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/step12-displ-t200.jpg
-	lyxscale 50
-	width 10cm
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Displacement field for example step12 at t = 200 years visualized using
- ParaView.
- The mesh has been distorted by the computed displacements (magnified by
- 500), and the vectors show the computed displacements.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:step12-displ-t200"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection
-Step13 - Slip-weakening Friction with Quasi-static Dirichlet Boundary Conditions
-\end_layout
-
-\begin_layout Standard
-In this example we replace the static friction fault constitutive model
- in step12 with a slip-weakening friction fault constitutive model.
- Fault friction is overcome at about t = 80 years, the fault slips in each
- subsequent time step.
- We again use a constant time step size of 5 years and apply the same intial
- displacement and velocity boundary conditions.
-\end_layout
-
-\begin_layout Standard
-We first define the friction model for the simulation:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.interfaces.fault]
-\end_layout
-
-\begin_layout LyX-Code
-# Use the slip-weakening friction model.
-\end_layout
-
-\begin_layout LyX-Code
-friction = pylith.friction.SlipWeakening
-\end_layout
-
-\begin_layout Standard
-The slip-weakening constitutive model requires a static coefficient of friction,
- a dynamic coefficient of friction, a slip weakening parameter, and a cohesion
- (see Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sub:Fault-Constitutive-Models"
-
-\end_inset
-
-):
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.interfaces.fault]
-\end_layout
-
-\begin_layout LyX-Code
-# Set slip-weakening friction model parameters using a uniform DB.
- Set the
-\end_layout
-
-\begin_layout LyX-Code
-# parameters as follows:
-\end_layout
-
-\begin_layout LyX-Code
-# static coefficient of friction: 0.6
-\end_layout
-
-\begin_layout LyX-Code
-# dynamic coefficient of friction: 0.5
-\end_layout
-
-\begin_layout LyX-Code
-# slip-weakening parameter: 0.2 m
-\end_layout
-
-\begin_layout LyX-Code
-# cohesion: 0 Pa
-\end_layout
-
-\begin_layout LyX-Code
-friction.db_properties = spatialdata.spatialdb.UniformDB
-\end_layout
-
-\begin_layout LyX-Code
-friction.db_properties.label = Slip weakening
-\end_layout
-
-\begin_layout LyX-Code
-friction.db_properties.values = [static-coefficient,dynamic-coefficient,
-\begin_inset Newline newline
-\end_inset
-
-slip-weakening-parameter,cohesion]
-\end_layout
-
-\begin_layout LyX-Code
-friction.db_properties.data = [0.6,0.5,0.2*m,0.0*Pa]
-\end_layout
-
-\begin_layout Standard
-When we have run the simulation, the output VTK files will be contained
- in 
-\family typewriter
-examples/3d/hex8/output
-\family default
- (all with a prefix of 
-\family typewriter
-step1
-\family default
-3).
- Results using ParaView are shown in Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:step13-displ-t200"
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/step13-displ-t200.jpg
-	lyxscale 50
-	width 10cm
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Displacement field for example step13 at t = 200 years visualized using
- ParaView.
- The mesh has been distorted by the computed displacements (magnified by
- 500), and the vectors show the computed displacements.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:step13-displ-t200"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection
-Step14 - Rate-and-state Friction with Quasi-static Dirichlet Boundary Conditions
-\end_layout
-
-\begin_layout Standard
-In step14 we use a rate-and-state friction model with an ageing law instead
- of a slip-weakening friction model.
- Slip begins to occur at about t = 45 years, and continues in each subsequent
- time step.
- We again use a constant time step size of 5 years and apply the same intial
- displacement and velocity boundary conditions.
-\end_layout
-
-\begin_layout Standard
-We first define the friction model for the simulation:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.interfaces.fault]
-\end_layout
-
-\begin_layout LyX-Code
-# Use the rate-and-state aging friction model.
-\end_layout
-
-\begin_layout LyX-Code
-friction = pylith.friction.RateStateAgeing
-\end_layout
-
-\begin_layout Standard
-The rate-and-state constitutive model requires a reference coefficient of
- friction, a reference slip rate, a slip weakening parameter, an a-value,
- a b-value, and a cohesion (see 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sub:Fault-Constitutive-Models"
-
-\end_inset
-
-):
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.interfaces.fault]
-\end_layout
-
-\begin_layout LyX-Code
-# Set rate-and-state parameters using a UniformDB.
- Set the parameters as
-\end_layout
-
-\begin_layout LyX-Code
-# follows:
-\end_layout
-
-\begin_layout LyX-Code
-# reference coefficient of friction: 0.6
-\end_layout
-
-\begin_layout LyX-Code
-# reference slip rate: 1.0e-06 m/s
-\end_layout
-
-\begin_layout LyX-Code
-# slip-weakening parameter: 0.037 m
-\end_layout
-
-\begin_layout LyX-Code
-# a: 0.0125
-\end_layout
-
-\begin_layout LyX-Code
-# b: 0.0172
-\end_layout
-
-\begin_layout LyX-Code
-# cohesion: 0 Pa
-\end_layout
-
-\begin_layout LyX-Code
-friction.db_properties = spatialdata.spatialdb.UniformDB
-\end_layout
-
-\begin_layout LyX-Code
-friction.db_properties.label = Rate Stete Ageing
-\end_layout
-
-\begin_layout LyX-Code
-friction.db_properties.values = [reference-friction-coefficient,reference-slip-rat
-e,
-\begin_inset Newline newline
-\end_inset
-
-characteristic-slip-distance,constitutive-parameter-a,constitutive-parameter-b,c
-ohesion]
-\end_layout
-
-\begin_layout LyX-Code
-friction.db_properties.data = [0.6,1.0e-6*m/s,0.0370*m,0.0125,0.0172,0.0*Pa]
-\end_layout
-
-\begin_layout Standard
-For this model, we also want to set the initial value of the state variable:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.interfaces.fault]
-\end_layout
-
-\begin_layout LyX-Code
-# Set spatial database for the initial value of the state variable.
-\end_layout
-
-\begin_layout LyX-Code
-friction.db_initial_state = spatialdata.spatialdb.UniformDB
-\end_layout
-
-\begin_layout LyX-Code
-friction.db_initial_state.label = Rate State Ageing State
-\end_layout
-
-\begin_layout LyX-Code
-friction.db_initial_state.values = [state-variable]
-\end_layout
-
-\begin_layout LyX-Code
-friction.db_initial_state.data = [92.7*s]
-\end_layout
-
-\begin_layout Standard
-When we have run the simulation, the output VTK files will be contained
- in 
-\family typewriter
-examples/3d/hex8/output
-\family default
- (all with a prefix of 
-\family typewriter
-step1
-\family default
-4).
- Results using ParaView are shown in Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:step14-displ-t200"
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/step14-displ-t200.jpg
-	lyxscale 50
-	width 10cm
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Displacement field for example step14 at t = 200 years visualized using
- ParaView.
- The mesh has been distorted by the computed displacements (magnified by
- 500), and the vectors show the computed displacements.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:step14-displ-t200"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_body
-\end_document
+#LyX 2.0 created this file. For more info see http://www.lyx.org/
+\lyxformat 413
+\begin_document
+\begin_header
+\textclass book
+\begin_preamble
+
+\end_preamble
+\use_default_options false
+\maintain_unincluded_children false
+\language english
+\language_package default
+\inputencoding latin1
+\fontencoding global
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry true
+\use_amsmath 0
+\use_esint 0
+\use_mhchem 1
+\use_mathdots 1
+\cite_engine basic
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\use_refstyle 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\leftmargin 1in
+\topmargin 1in
+\rightmargin 1in
+\bottommargin 2in
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\quotes_language english
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\end_header
+
+\begin_body
+
+\begin_layout Subsection
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Tutorial-3d-hex8-friction"
+
+\end_inset
+
+Fault Friction Examples
+\end_layout
+
+\begin_layout Standard
+PyLith features discussed in this tutorial:
+\end_layout
+
+\begin_layout Itemize
+Static fault friction
+\end_layout
+
+\begin_layout Itemize
+Slip-weakening fault friction
+\end_layout
+
+\begin_layout Itemize
+Rate-and-state fault friction
+\end_layout
+
+\begin_layout Itemize
+Nonlinear solver
+\end_layout
+
+\begin_layout Subsubsection
+Overview
+\end_layout
+
+\begin_layout Standard
+This set of examples provides an introduction to using fault friction in
+ static and quasi-static problems with PyLith.
+ Dynamic problems with fault friction are discussed in Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:tutorial:shearwave:quad4"
+
+\end_inset
+
+.
+ The boundary conditions are all either static or quasi-static Dirichlet
+ conditions, and only elastic materials are used.
+ In all the fault friction examples we apply axial (x) displacements on
+ both the positive and negative x-faces to maintain a compressive normal
+ tractions on the fault.
+ Otherwise, there would be no frictional resistance.
+ Fault friction generates nonlinear behavior, so we use the nonlinear solver.
+ All of the examples are contained in the directory 
+\family typewriter
+examples/3d/hex8
+\family default
+, and the corresponding 
+\family typewriter
+.cfg
+\family default
+ files are 
+\family typewriter
+step10.cfg
+\family default
+, 
+\family typewriter
+step11.cfg
+\family default
+, 
+\family typewriter
+step12.cfg
+\family default
+, 
+\family typewriter
+step13.cfg
+\family default
+, and 
+\family typewriter
+step14.cfg
+\family default
+.
+ Each example may be run as follows:
+\end_layout
+
+\begin_layout LyX-Code
+pylith stepXX.cfg
+\end_layout
+
+\begin_layout Standard
+This will cause PyLith to read the default parameters in 
+\family typewriter
+pylithapp.cfg
+\family default
+, and then override or augment them with the additional parameters in the
+ 
+\family typewriter
+stepXX.cfg
+\family default
+ file.
+ Each 
+\family typewriter
+.cfg
+\family default
+ file is extensively documented, to provide detailed information on the
+ various parameters.
+\end_layout
+
+\begin_layout Subsubsection
+Step10 - Static Friction (Stick) with Static Dirichlet Boundary Conditions
+\end_layout
+
+\begin_layout Standard
+The 
+\family typewriter
+step10.cfg
+\family default
+ file defines a problem that is identical to example 
+\family typewriter
+step01
+\family default
+, except for the presence of a vertical fault with static friction.
+ In this case, the applied displacements are insufficient to cause the fault
+ to slip, so the solution is identical to that in example 
+\family typewriter
+step01
+\family default
+.
+ As in previous examples involving faults, we must first provide an array
+ defining the fault interfaces:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent]
+\end_layout
+
+\begin_layout LyX-Code
+# Set interfaces to an array of 1 fault: 'fault'.
+\end_layout
+
+\begin_layout LyX-Code
+interfaces = [fault]
+\end_layout
+
+\begin_layout Standard
+Since all fault friction models are nonlinear we must also use the nonlinear
+ solver:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.implicit]
+\end_layout
+
+\begin_layout LyX-Code
+# Fault friction is a nonlinear problem so we need to use the nonlinear
+\end_layout
+
+\begin_layout LyX-Code
+# solver.
+\end_layout
+
+\begin_layout LyX-Code
+solver = pylith.problems.SolverNonlinear
+\end_layout
+
+\begin_layout Standard
+We need to change the fault interface from the default (
+\family typewriter
+FaultCohesiveKin
+\family default
+) to 
+\family typewriter
+FaultCohesiveDyn
+\family default
+ and we set the friction model to use:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces]
+\end_layout
+
+\begin_layout LyX-Code
+# Change fault to dynamic fault interface.
+\end_layout
+
+\begin_layout LyX-Code
+fault = pylith.faults.FaultCohesiveDyn
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces.fault]
+\end_layout
+
+\begin_layout LyX-Code
+# Use the static friction model.
+\end_layout
+
+\begin_layout LyX-Code
+friction = pylith.friction.StaticFriction
+\end_layout
+
+\begin_layout Standard
+The 
+\family typewriter
+StaticFriction
+\family default
+ model requires values for the coefficient of friction and the cohesion
+ (see Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:fault:constitutive:models"
+
+\end_inset
+
+).
+ We provide both of these using a 
+\family typewriter
+UniformDB
+\family default
+:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces.fault]
+\end_layout
+
+\begin_layout LyX-Code
+# Set static friction model parameters using a uniform DB.
+ Set the
+\end_layout
+
+\begin_layout LyX-Code
+# static coefficient of friction to 0.6 and cohesion to 0.0 Pa.
+\end_layout
+
+\begin_layout LyX-Code
+friction.db_properties = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+friction.db_properties.label = Static friction
+\end_layout
+
+\begin_layout LyX-Code
+friction.db_properties.values = [friction-coefficient,cohesion]
+\end_layout
+
+\begin_layout LyX-Code
+friction.db_properties.data = [0.6,0.0*Pa]
+\end_layout
+
+\begin_layout Standard
+Fault friction models require additional PETSc settings:
+\end_layout
+
+\begin_layout LyX-Code
+# NOTE: There are additional settings specific to fault friction.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.petsc]
+\end_layout
+
+\begin_layout LyX-Code
+# Friction sensitivity solve used to compute the increment in slip
+\end_layout
+
+\begin_layout LyX-Code
+# associated with changes in the Lagrange multiplier imposed by the
+\end_layout
+
+\begin_layout LyX-Code
+# fault constitutive model.
+\end_layout
+
+\begin_layout LyX-Code
+friction_pc_type = asm
+\end_layout
+
+\begin_layout LyX-Code
+friction_sub_pc_factor_shift_type = nonzero
+\end_layout
+
+\begin_layout LyX-Code
+friction_ksp_max_it = 25
+\end_layout
+
+\begin_layout LyX-Code
+friction_ksp_gmres_restart = 30
+\end_layout
+
+\begin_layout LyX-Code
+# Uncomment to view details of friction sensitivity solve.
+\end_layout
+
+\begin_layout LyX-Code
+#friction_ksp_monitor = true
+\end_layout
+
+\begin_layout LyX-Code
+#friction_ksp_view = true
+\end_layout
+
+\begin_layout LyX-Code
+friction_ksp_converged_reason = true
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Standard
+When we have run the simulation, the output VTK files will be contained
+ in 
+\family typewriter
+examples/3d/hex8/output
+\family default
+ (all with a prefix of 
+\family typewriter
+step10
+\family default
+).
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step10-fault-traction-slip"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step10-fault-traction-slip.jpg
+	lyxscale 50
+	width 10cm
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Magnitude of tractions on the fault for example step10 visualized using
+ ParaView.
+ 
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:step10-fault-traction-slip"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Step11 - Static Friction (Slip) with Static Dirichlet Boundary Conditions
+\end_layout
+
+\begin_layout Standard
+In step11 we apply twice as much shear displacement as in step10, which
+ is sufficient to induce slip on the fault.
+ All other settings are identical.
+ To change the amount of shear displacement, we change the spatial database
+ for the positive and negative x-faces to a 
+\family typewriter
+UniformDB
+\family default
+, and apply the altered values within the 
+\family typewriter
+.cfg
+\family default
+ file:
+\end_layout
+
+\begin_layout LyX-Code
+# +x face
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.bc.x_pos]
+\end_layout
+
+\begin_layout LyX-Code
+bc_dof = [0, 1]
+\end_layout
+
+\begin_layout LyX-Code
+label = face_xpos
+\end_layout
+
+\begin_layout LyX-Code
+db_initial = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.label = Dirichlet BC on +x
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.values = [displacement-x,displacement-y]
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.data = [-1.0*m,2.0*m]
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+# -x face
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.bc.x_neg]
+\end_layout
+
+\begin_layout LyX-Code
+bc_dof = [0, 1]
+\end_layout
+
+\begin_layout LyX-Code
+label = face_xneg
+\end_layout
+
+\begin_layout LyX-Code
+db_initial = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.label = Dirichlet BC on -x
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.values = [displacement-x,displacement-y]
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.data = [1.0*m,-2.0*m]
+\end_layout
+
+\begin_layout Standard
+When we have run the simulation, the output VTK files will be contained
+ in 
+\family typewriter
+examples/3d/hex8/output
+\family default
+ (all with a prefix of 
+\family typewriter
+step11
+\family default
+).
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step11-fault-traction-slip"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step11-fault-traction-slip.jpg
+	lyxscale 50
+	width 10cm
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Magnitude of tractions on the fault for example step10 visualized using
+ ParaView.
+ Vectors of fault slip are also plotted.
+ Note that PyLith outputs slip in the fault coordinate system, so we transform
+ them to the global coordinate system using the Calculator in ParaView.
+ A more general approach involves outputing the fault coordinate system
+ information and using these fields in the Calculator.
+ 
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:step11-fault-traction-slip"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Step12 - Static Friction with Quasi-Static Dirichlet Boundary Conditions
+\end_layout
+
+\begin_layout Standard
+The 
+\family typewriter
+step12.cfg
+\family default
+ file describes a problem that is similar to examples step10 and step11,
+ except that we apply velocity boundary conditions and run the simulation
+ for 200 years.
+ Once fault friction is overcome, the fault slips at a steady rate.
+ To prevent convergence problems we set the time step size to a constant
+ value of 5 years:
+\end_layout
+
+\begin_layout LyX-Code
+# Change the total simulation time to 200 years, and use a constant time
+\end_layout
+
+\begin_layout LyX-Code
+# step size of 5 years.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.implicit.time_step]
+\end_layout
+
+\begin_layout LyX-Code
+total_time = 200.0*year
+\end_layout
+
+\begin_layout LyX-Code
+dt = 5.0*year
+\end_layout
+
+\begin_layout Standard
+As in the other fault friction examples, we apply initial displacements
+ along the x-axis (to maintain a compressive stress on the fault), and we
+ apply velocity boundary conditions that yield a left-lateral sense of motion:
+\end_layout
+
+\begin_layout LyX-Code
+# +x face -- Dirichlet
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.bc.x_pos]
+\end_layout
+
+\begin_layout LyX-Code
+bc_dof = [0,1]
+\end_layout
+
+\begin_layout LyX-Code
+label = face_xpos
+\end_layout
+
+\begin_layout LyX-Code
+db_initial = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.label = Dirichlet BC on +x
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.values = [displacement-x,displacement-y]
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.data = [-1.0*m,0.0*m]
+\end_layout
+
+\begin_layout LyX-Code
+db_rate = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.label = Dirichlet rate BC on +x
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.values = [displacement-rate-x,displacement-rate-y,rate-start-time]
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.data = [0.0*cm/year,1.0*cm/year,0.0*year]
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# -x face
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.bc.x_neg]
+\end_layout
+
+\begin_layout LyX-Code
+bc_dof = [0, 1]
+\end_layout
+
+\begin_layout LyX-Code
+label = face_xneg
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.label = Dirichlet BC on -x
+\end_layout
+
+\begin_layout LyX-Code
+db_rate = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.label = Dirichlet rate BC on -x
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.values = [displacement-rate-x,displacement-rate-y,rate-start-time]
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.data = [0.0*cm/year,-1.0*cm/year,0.0*year]
+\end_layout
+
+\begin_layout Standard
+For this example, we keep the same coefficient of friction as examples step10
+ and step11, but we include a cohesion of 2 MPa:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces.fault]
+\end_layout
+
+\begin_layout LyX-Code
+# Set static friction model parameters using a uniform DB.
+ Set the
+\end_layout
+
+\begin_layout LyX-Code
+# static coefficient of friction to 0.6 and cohesion to 2.0 MPa.
+\end_layout
+
+\begin_layout LyX-Code
+friction.db_properties = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+friction.db_properties.label = Static friction
+\end_layout
+
+\begin_layout LyX-Code
+friction.db_properties.values = [friction-coefficient,cohesion]
+\end_layout
+
+\begin_layout LyX-Code
+friction.db_properties.data = [0.6,2.0*MPa]
+\end_layout
+
+\begin_layout Standard
+When we have run the simulation, the output VTK files will be contained
+ in 
+\family typewriter
+examples/3d/hex8/output
+\family default
+ (all with a prefix of 
+\family typewriter
+step12
+\family default
+).
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step12-displ-t200"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step12-displ-t200.jpg
+	lyxscale 50
+	width 10cm
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Displacement field for example step12 at t = 200 years visualized using
+ ParaView.
+ The mesh has been distorted by the computed displacements (magnified by
+ 500), and the vectors show the computed displacements.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:step12-displ-t200"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Step13 - Slip-Weakening Friction with Quasi-Static Dirichlet Boundary Conditions
+\end_layout
+
+\begin_layout Standard
+In this example we replace the static friction fault constitutive model
+ in step12 with a slip-weakening friction fault constitutive model.
+ Fault friction is overcome at about t = 80 years, the fault slips in each
+ subsequent time step.
+ We again use a constant time step size of 5 years and apply the same intial
+ displacement and velocity boundary conditions.
+\end_layout
+
+\begin_layout Standard
+We first define the friction model for the simulation:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces.fault]
+\end_layout
+
+\begin_layout LyX-Code
+# Use the slip-weakening friction model.
+\end_layout
+
+\begin_layout LyX-Code
+friction = pylith.friction.SlipWeakening
+\end_layout
+
+\begin_layout Standard
+The slip-weakening constitutive model requires a static coefficient of friction,
+ a dynamic coefficient of friction, a slip weakening parameter, and a cohesion
+ (see Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:fault:constitutive:models"
+
+\end_inset
+
+):
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces.fault]
+\end_layout
+
+\begin_layout LyX-Code
+# Set slip-weakening friction model parameters using a uniform DB.
+ Set the
+\end_layout
+
+\begin_layout LyX-Code
+# parameters as follows:
+\end_layout
+
+\begin_layout LyX-Code
+# static coefficient of friction: 0.6
+\end_layout
+
+\begin_layout LyX-Code
+# dynamic coefficient of friction: 0.5
+\end_layout
+
+\begin_layout LyX-Code
+# slip-weakening parameter: 0.2 m
+\end_layout
+
+\begin_layout LyX-Code
+# cohesion: 0 Pa
+\end_layout
+
+\begin_layout LyX-Code
+friction.db_properties = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+friction.db_properties.label = Slip weakening
+\end_layout
+
+\begin_layout LyX-Code
+friction.db_properties.values = [static-coefficient,dynamic-coefficient,
+\begin_inset Newline newline
+\end_inset
+
+slip-weakening-parameter,cohesion]
+\end_layout
+
+\begin_layout LyX-Code
+friction.db_properties.data = [0.6,0.5,0.2*m,0.0*Pa]
+\end_layout
+
+\begin_layout Standard
+When we have run the simulation, the output VTK files will be contained
+ in 
+\family typewriter
+examples/3d/hex8/output
+\family default
+ (all with a prefix of 
+\family typewriter
+step1
+\family default
+3).
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step13-displ-t200"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step13-displ-t200.jpg
+	lyxscale 50
+	width 10cm
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Displacement field for example step13 at t = 200 years visualized using
+ ParaView.
+ The mesh has been distorted by the computed displacements (magnified by
+ 500), and the vectors show the computed displacements.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:step13-displ-t200"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Step14 - Rate-and-State Friction with Quasi-Static Dirichlet Boundary Conditions
+\end_layout
+
+\begin_layout Standard
+In step14 we use a rate-and-state friction model with an ageing law instead
+ of a slip-weakening friction model.
+ Slip begins to occur at about t = 45 years, and continues in each subsequent
+ time step.
+ We again use a constant time step size of 5 years and apply the same intial
+ displacement and velocity boundary conditions.
+\end_layout
+
+\begin_layout Standard
+We first define the friction model for the simulation:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces.fault]
+\end_layout
+
+\begin_layout LyX-Code
+# Use the rate-and-state aging friction model.
+\end_layout
+
+\begin_layout LyX-Code
+friction = pylith.friction.RateStateAgeing
+\end_layout
+
+\begin_layout Standard
+The rate-and-state constitutive model requires a reference coefficient of
+ friction, a reference slip rate, a slip weakening parameter, an a-value,
+ a b-value, and a cohesion (see 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:fault:constitutive:models"
+
+\end_inset
+
+):
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces.fault]
+\end_layout
+
+\begin_layout LyX-Code
+# Set rate-and-state parameters using a UniformDB.
+ Set the parameters as
+\end_layout
+
+\begin_layout LyX-Code
+# follows:
+\end_layout
+
+\begin_layout LyX-Code
+# reference coefficient of friction: 0.6
+\end_layout
+
+\begin_layout LyX-Code
+# reference slip rate: 1.0e-06 m/s
+\end_layout
+
+\begin_layout LyX-Code
+# slip-weakening parameter: 0.037 m
+\end_layout
+
+\begin_layout LyX-Code
+# a: 0.0125
+\end_layout
+
+\begin_layout LyX-Code
+# b: 0.0172
+\end_layout
+
+\begin_layout LyX-Code
+# cohesion: 0 Pa
+\end_layout
+
+\begin_layout LyX-Code
+friction.db_properties = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+friction.db_properties.label = Rate Stete Ageing
+\end_layout
+
+\begin_layout LyX-Code
+friction.db_properties.values = [reference-friction-coefficient,reference-slip-rat
+e,
+\begin_inset Newline newline
+\end_inset
+
+characteristic-slip-distance,constitutive-parameter-a,constitutive-parameter-b,c
+ohesion]
+\end_layout
+
+\begin_layout LyX-Code
+friction.db_properties.data = [0.6,1.0e-6*m/s,0.0370*m,0.0125,0.0172,0.0*Pa]
+\end_layout
+
+\begin_layout Standard
+For this model, we also want to set the initial value of the state variable:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces.fault]
+\end_layout
+
+\begin_layout LyX-Code
+# Set spatial database for the initial value of the state variable.
+\end_layout
+
+\begin_layout LyX-Code
+friction.db_initial_state = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+friction.db_initial_state.label = Rate State Ageing State
+\end_layout
+
+\begin_layout LyX-Code
+friction.db_initial_state.values = [state-variable]
+\end_layout
+
+\begin_layout LyX-Code
+friction.db_initial_state.data = [92.7*s]
+\end_layout
+
+\begin_layout Standard
+When we have run the simulation, the output VTK files will be contained
+ in 
+\family typewriter
+examples/3d/hex8/output
+\family default
+ (all with a prefix of 
+\family typewriter
+step1
+\family default
+4).
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step14-displ-t200"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step14-displ-t200.jpg
+	lyxscale 50
+	width 10cm
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Displacement field for example step14 at t = 200 years visualized using
+ ParaView.
+ The mesh has been distorted by the computed displacements (magnified by
+ 500), and the vectors show the computed displacements.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:step14-displ-t200"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document

Modified: short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/quasistatic/quasistatic.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/quasistatic/quasistatic.lyx	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/quasistatic/quasistatic.lyx	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,2492 +1,2526 @@
-#LyX 2.0 created this file. For more info see http://www.lyx.org/
-\lyxformat 413
-\begin_document
-\begin_header
-\textclass book
-\begin_preamble
-
-\end_preamble
-\use_default_options false
-\maintain_unincluded_children false
-\language english
-\language_package default
-\inputencoding latin1
-\fontencoding global
-\font_roman default
-\font_sans default
-\font_typewriter default
-\font_default_family default
-\use_non_tex_fonts false
-\font_sc false
-\font_osf false
-\font_sf_scale 100
-\font_tt_scale 100
-
-\graphics default
-\default_output_format default
-\output_sync 0
-\bibtex_command default
-\index_command default
-\paperfontsize default
-\spacing single
-\use_hyperref false
-\papersize default
-\use_geometry true
-\use_amsmath 0
-\use_esint 0
-\use_mhchem 1
-\use_mathdots 1
-\cite_engine basic
-\use_bibtopic false
-\use_indices false
-\paperorientation portrait
-\suppress_date false
-\use_refstyle 0
-\index Index
-\shortcut idx
-\color #008000
-\end_index
-\leftmargin 1in
-\topmargin 1in
-\rightmargin 1in
-\bottommargin 2in
-\secnumdepth 3
-\tocdepth 3
-\paragraph_separation indent
-\paragraph_indentation default
-\quotes_language english
-\papercolumns 1
-\papersides 1
-\paperpagestyle default
-\tracking_changes false
-\output_changes false
-\html_math_output 0
-\html_css_as_file 0
-\html_be_strict false
-\end_header
-
-\begin_body
-
-\begin_layout Subsection
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:Tutorial-3d-hex8-quasistatic"
-
-\end_inset
-
-Quasi-static Examples
-\end_layout
-
-\begin_layout Standard
-PyLith features discussed in this tutorial:
-\end_layout
-
-\begin_layout Itemize
-Quasi-static solution
-\end_layout
-
-\begin_layout Itemize
-Formatting timestamps of VTK output files
-\end_layout
-
-\begin_layout Itemize
-HDF5 output
-\end_layout
-
-\begin_layout Itemize
-Output of velocity field
-\end_layout
-
-\begin_layout Itemize
-Dirichlet displacement and velocity boundary conditions
-\end_layout
-
-\begin_layout Itemize
-Neumann traction boundary conditions and time-varying tractions
-\end_layout
-
-\begin_layout Itemize
-UniformDB spatial database
-\end_layout
-
-\begin_layout Itemize
-CompositeDB spatial database
-\end_layout
-
-\begin_layout Itemize
-Quasi-static fault rupture and fault creep
-\end_layout
-
-\begin_layout Itemize
-Multiple kinematic fault ruptures
-\end_layout
-
-\begin_layout Itemize
-Specifying more than one material
-\end_layout
-
-\begin_layout Itemize
-Nonlinear solver
-\end_layout
-
-\begin_layout Itemize
-Maxwell linear viscoelastic material
-\end_layout
-
-\begin_layout Itemize
-Power-law viscoelastic material
-\end_layout
-
-\begin_layout Itemize
-Drucker-Prager elastoplastic material
-\end_layout
-
-\begin_layout Itemize
-Adaptive time stepping
-\end_layout
-
-\begin_layout Subsubsection
-Overview
-\end_layout
-
-\begin_layout Standard
-This set of examples describes a set of quasi-static problems for PyLith.
- These quasi-static problems primarily demonstrate the usage of time-dependent
- boundary conditions and fault slip, as well as different rheologies.
- Some of the examples also demonstrate the usage of the nonlinear solver,
- which is required by the nonlinear rheologies (power-law viscoelastic and
- Drucker-Prager elastoplastic).
- Some of the examples also demonstrate the usage of HDF5 output, which is
- an alternative to the default VTK output.
- All of the examples are contained in the directory 
-\family typewriter
-examples/3d/hex8
-\family default
-, and the corresponding 
-\family typewriter
-.cfg
-\family default
- files are 
-\family typewriter
-step04.cfg
-\family default
-, 
-\family typewriter
-step05.cfg
-\family default
-, 
-\family typewriter
-step06.cfg
-\family default
-, 
-\family typewriter
-step07.cfg
-\family default
-, 
-\family typewriter
-step08.cfg
-\family default
-, and 
-\family typewriter
-step09.cfg
-\family default
-.
- Each example may be run as follows:
-\end_layout
-
-\begin_layout LyX-Code
-pylith stepXX.cfg
-\end_layout
-
-\begin_layout Standard
-This will cause PyLith to read the default parameters in 
-\family typewriter
-pylithapp.cfg
-\family default
-, and then override or augment them with the additional parameters in the
- 
-\family typewriter
-stepXX.cfg
-\family default
- file.
- Each 
-\family typewriter
-.cfg
-\family default
- file is extensively documented, to provide detailed information on the
- various parameters.
-\end_layout
-
-\begin_layout Subsubsection
-Step04 - Pure Dirichlet Velocity Boundary Conditions
-\end_layout
-
-\begin_layout Standard
-The 
-\family typewriter
-step04.cfg
-\family default
- file defines a problem with x-displacements fixed at zero on the positive
- and negative x-faces while velocity boundary conditions are applied in
- the y-directions on the same faces, yielding a left-lateral sense of movement.
- The bottom (negative z) boundary is held fixed in the z-direction.
- We also use a Maxwell viscoelastic material for the lower crust, and the
- simulation is run for 200 years using a constant time step size of 20 years.
- The default time stepping behavior is 
-\family typewriter
-TimeStepUniform
-\family default
-.
- We retain that behavior for this problem and provide the total simulation
- time and the time step size:
-\end_layout
-
-\begin_layout LyX-Code
-# Change the total simulation time to 200 years, and use a constant time
-\end_layout
-
-\begin_layout LyX-Code
-# step size of 20 years.
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.implicit.time_step]
-\end_layout
-
-\begin_layout LyX-Code
-total_time = 200.0*year
-\end_layout
-
-\begin_layout LyX-Code
-dt = 20.0*year 
-\end_layout
-
-\begin_layout Standard
-We then change the material type of the lower crust, provide a spatial database
- from which to obtain the material properties (using the default 
-\family typewriter
-SimpleDB
-\family default
-), and request additional output information for the material:
-\end_layout
-
-\begin_layout LyX-Code
-# Change material type of lower crust to Maxwell viscoelastic.
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent]
-\end_layout
-
-\begin_layout LyX-Code
-materials.lower_crust = pylith.materials.MaxwellIsotropic3D
-\begin_inset Newline newline
-\end_inset
-
-
-\begin_inset Newline newline
-\end_inset
-
-
-\end_layout
-
-\begin_layout LyX-Code
-# Provide a spatial database from which to obtain property values.
-\end_layout
-
-\begin_layout LyX-Code
-# Since there are additional properties and state variables for the Maxwell
-\end_layout
-
-\begin_layout LyX-Code
-# model, we explicitly request that they be output.
- Properties are named in
-\end_layout
-
-\begin_layout LyX-Code
-# cell_info_fields and state variables are named in cell_data_fields.
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.materials.lower_crust]
-\end_layout
-
-\begin_layout LyX-Code
-db_properties.iohandler.filename = spatialdb/mat_maxwell.spatialdb
-\end_layout
-
-\begin_layout LyX-Code
-output.cell_info_fields = [density,mu,lambda,maxwell_time]
-\end_layout
-
-\begin_layout LyX-Code
-output.cell_data_fields = [total_strain,stress,viscous_strain]
-\end_layout
-
-\begin_layout Standard
-Note that the default 
-\family typewriter
-output.cell_info_fields
-\family default
- are those corresponding to an elastic material (
-\family typewriter
-density
-\family default
-, 
-\family typewriter
-mu
-\family default
-, 
-\family typewriter
-lambda
-\family default
-), and the default 
-\family typewriter
-output.cell_data_fields
-\family default
- are 
-\family typewriter
-total_strain
-\family default
- and 
-\family typewriter
-stress
-\family default
-.
- For materials other than elastic, there are generally additional material
- properties and state variables, and the appropriate additional fields must
- be specifically requested for each material type.
-\end_layout
-
-\begin_layout Standard
-This example has no displacements in the elastic solution (t = 0), so we
- retain the default 
-\family typewriter
-ZeroDispDB
-\family default
- for all instances of 
-\family typewriter
-db_initial
-\family default
-.
- To apply the velocity boundary conditions, we must specify 
-\family typewriter
-db_rate
-\family default
-, which is zero by default.
- We use a 
-\family typewriter
-UniformDB
-\family default
- to assign the velocities:
-\end_layout
-
-\begin_layout LyX-Code
-# +x face
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.bc.x_pos]
-\end_layout
-
-\begin_layout LyX-Code
-bc_dof = [0, 1]
-\end_layout
-
-\begin_layout LyX-Code
-label = face_xpos
-\end_layout
-
-\begin_layout LyX-Code
-db_initial.label = Dirichlet BC on +x
-\end_layout
-
-\begin_layout LyX-Code
-db_rate = spatialdata.spatialdb.UniformDB
-\end_layout
-
-\begin_layout LyX-Code
-db_rate.label = Dirichlet rate BC on +x
-\end_layout
-
-\begin_layout LyX-Code
-db_rate.values = [displacement-rate-x,displacement-rate-y,rate-start-time]
-\end_layout
-
-\begin_layout LyX-Code
-db_rate.data = [0.0*cm/year,1.0*cm/year,0.0*year]
-\begin_inset Newline newline
-\end_inset
-
-
-\begin_inset Newline newline
-\end_inset
-
-
-\end_layout
-
-\begin_layout LyX-Code
-# -x face
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.bc.x_neg]
-\end_layout
-
-\begin_layout LyX-Code
-bc_dof = [0, 1]
-\end_layout
-
-\begin_layout LyX-Code
-label = face_xneg
-\end_layout
-
-\begin_layout LyX-Code
-db_initial.label = Dirichlet BC on -x
-\end_layout
-
-\begin_layout LyX-Code
-db_rate = spatialdata.spatialdb.UniformDB
-\end_layout
-
-\begin_layout LyX-Code
-db_rate.label = Dirichlet rate BC on +x
-\end_layout
-
-\begin_layout LyX-Code
-db_rate.values = [displacement-rate-x,displacement-rate-y,rate-start-time]
-\end_layout
-
-\begin_layout LyX-Code
-db_rate.data = [0.0*cm/year,-1.0*cm/year,0.0*year]
-\end_layout
-
-\begin_layout Standard
-Note that 
-\family typewriter
-db_rate
-\family default
- requires a start time, which allows the condition to be applied at any
- time during the simulation.
- For this example, we start the velocity boundary conditions at t = 0.
-\end_layout
-
-\begin_layout Standard
-Finally, we must provide information on VTK output.
- This is slightly more complicated than the static case, because we must
- decide the frequency with which output occurs for each output manager.
- We also assign a more user-friendly format to the output file time stamp,
- and we request that the time stamp is in units of 1 year (rather than the
- default value of seconds):
-\end_layout
-
-\begin_layout LyX-Code
-# Give basename for VTK domain output of solution over domain.
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.problem.formulation.output.domain]
-\end_layout
-
-\begin_layout LyX-Code
-# We specify that output occurs in terms of a given time frequency, and
-\end_layout
-
-\begin_layout LyX-Code
-# ask for output every 40 years.
- The time stamps of the output files are
-\end_layout
-
-\begin_layout LyX-Code
-# in years (rather than the default of seconds), and we give a format for
-\end_layout
-
-\begin_layout LyX-Code
-# the time stamp.
-\end_layout
-
-\begin_layout LyX-Code
-output_freq = time_step
-\end_layout
-
-\begin_layout LyX-Code
-time_step = 40.0*year
-\end_layout
-
-\begin_layout LyX-Code
-writer.filename = output/step04.vtk
-\end_layout
-
-\begin_layout LyX-Code
-writer.time_format = %04.0f
-\end_layout
-
-\begin_layout LyX-Code
-writer.time_constant = 1.0*year
-\begin_inset Newline newline
-\end_inset
-
-
-\begin_inset Newline newline
-\end_inset
-
-
-\end_layout
-
-\begin_layout LyX-Code
-# Give basename for VTK domain output of solution over ground surface.
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.problem.formulation.output.subdomain]
-\end_layout
-
-\begin_layout LyX-Code
-# Name of nodeset for ground surface.
-\end_layout
-
-\begin_layout LyX-Code
-label = face_zpos
-\end_layout
-
-\begin_layout LyX-Code
-# We keep the default output frequency behavior (skip every n steps), and
-\end_layout
-
-\begin_layout LyX-Code
-# ask to skip 0 steps between output, so that we get output every time step.
-\end_layout
-
-\begin_layout LyX-Code
-skip = 0
-\end_layout
-
-\begin_layout LyX-Code
-writer.filename = output/step04-groundsurf.vtk
-\end_layout
-
-\begin_layout LyX-Code
-writer.time_format = %04.0f
-\end_layout
-
-\begin_layout LyX-Code
-writer.time_constant = 1.0*year
-\end_layout
-
-\begin_layout Standard
-We provide similar output information for the two materials (
-\family typewriter
-upper_crust
-\family default
- and 
-\family typewriter
-lower_crust
-\family default
-).
- Note that for the domain output, we requested output in terms of a given
- time frequency, while for the subdomain we requested output in terms of
- number of time steps.
- When we have run the simulation, the output VTK files will be contained
- in 
-\family typewriter
-examples/3d/hex8/output
-\family default
- (all with a prefix of 
-\family typewriter
-step04
-\family default
-).
- Results using ParaView are shown in Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:step04-displ-t200"
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/step04-displ-t200.jpg
-	lyxscale 50
-	width 10cm
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Displacement field for example step04 at t = 200 years visualized using
- ParaView.
- The mesh has been distorted by the computed displacements (magnified by
- 500), and the vectors show the computed displacements.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:step04-displ-t200"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection
-Step05 - Time-varying Dirichlet and Neumann Boundary Conditions
-\end_layout
-
-\begin_layout Standard
-The 
-\family typewriter
-step05.cfg
-\family default
- file describes a problem with time-varying Dirichlet and Neumann boundary
- conditions.
- The example is similar to example step04, with a few important differences:
-\end_layout
-
-\begin_layout Itemize
-The Dirichlet boundary conditions on the negative x-face include an initial
- displacement (applied in the elastic solution), as well as a constant velocity.
-\end_layout
-
-\begin_layout Itemize
-Neumann (traction) boundary conditions are applied in the negative x-direction
- on the positive x-face, giving a compressive stress.
- An initial traction is applied in the elastic solution, and then at t =
- 100 years it begins decreasing linearly until it reaches zero at the end
- of the simulation (t = 200 years).
-\end_layout
-
-\begin_layout Standard
-We again use a Maxwell viscoelastic material for the lower crust.
-\end_layout
-
-\begin_layout Standard
-For the boundary conditions, we must first change the boundary condition
- type for the positive x-face from the default Dirichlet to Neumann:
-\end_layout
-
-\begin_layout LyX-Code
-# +x face -- first change bc type to Neumann
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.bc]
-\end_layout
-
-\begin_layout LyX-Code
-x_pos = pylith.bc.Neumann 
-\end_layout
-
-\begin_layout Standard
-We provide quadrature information for this face as we did for example step02.
- We then use a 
-\family typewriter
-UniformDB
-\family default
- for both the initial tractions as well as the traction rates.
- We provide a start time of 100 years for the traction rates, and use a
- rate of 0.01 MPa/year, so that by the end of 200 years we have completely
- cancelled the initial traction of -1 MPa:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.bc.x_pos]
-\end_layout
-
-\begin_layout LyX-Code
-# Fist specify a UniformDB for the initial tractions, along with the values.
-\end_layout
-
-\begin_layout LyX-Code
-db_initial = spatialdata.spatialdb.UniformDB
-\end_layout
-
-\begin_layout LyX-Code
-db_initial.label = Neumann BC on +x
-\end_layout
-
-\begin_layout LyX-Code
-db_initial.values = [traction-shear-horiz,traction-shear-vert,traction-normal]
-\end_layout
-
-\begin_layout LyX-Code
-db_initial.data = [0.0*MPa,0.0*MPa,-1.0*MPa]
-\begin_inset Newline newline
-\end_inset
-
-
-\begin_inset Newline newline
-\end_inset
-
-
-\end_layout
-
-\begin_layout LyX-Code
-# Provide information on traction rates.
-\end_layout
-
-\begin_layout LyX-Code
-db_rate = spatialdata.spatialdb.UniformDB
-\end_layout
-
-\begin_layout LyX-Code
-db_rate.label = Neumann rate BC on +x
-\end_layout
-
-\begin_layout LyX-Code
-db_rate.values = [traction-rate-shear-horiz,traction-rate-shear-vert,traction-rat
-e-normal,
-\begin_inset Newline newline
-\end_inset
-
-rate-start-time]
-\end_layout
-
-\begin_layout LyX-Code
-db_rate.data = [0.0*MPa/year,0.0*MPa/year,0.01*MPa/year,100.0*year]
-\end_layout
-
-\begin_layout Standard
-The boundary conditions on the negative x-face are analogous, but we are
- instead using Dirichlet boundary conditions, and the initial displacement
- is in the same direction as the applied velocities:
-\end_layout
-
-\begin_layout LyX-Code
-# -x face
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.bc.x_neg]
-\end_layout
-
-\begin_layout LyX-Code
-bc_dof = [0, 1]
-\end_layout
-
-\begin_layout LyX-Code
-label = face_xneg
-\begin_inset Newline newline
-\end_inset
-
-
-\begin_inset Newline newline
-\end_inset
-
-
-\end_layout
-
-\begin_layout LyX-Code
-# Initial displacements.
-\end_layout
-
-\begin_layout LyX-Code
-db_initial = spatialdata.spatialdb.UniformDB
-\end_layout
-
-\begin_layout LyX-Code
-db_initial.label = Dirichlet BC on -x
-\end_layout
-
-\begin_layout LyX-Code
-db_initial.values = [displacement-x,displacement-y]
-\end_layout
-
-\begin_layout LyX-Code
-db_initial.data = [0.0*cm,-0.5*cm]
-\begin_inset Newline newline
-\end_inset
-
-
-\begin_inset Newline newline
-\end_inset
-
-
-\end_layout
-
-\begin_layout LyX-Code
-# Velocities.
-\end_layout
-
-\begin_layout LyX-Code
-db_rate = spatialdata.spatialdb.UniformDB
-\end_layout
-
-\begin_layout LyX-Code
-db_rate.label = Dirichlet rate BC on -x
-\end_layout
-
-\begin_layout LyX-Code
-db_rate.values = [displacement-rate-x,displacement-rate-y,rate-start-time]
-\end_layout
-
-\begin_layout LyX-Code
-db_rate.data = [0.0*cm/year,-1.0*cm/year,0.0*year]
-\end_layout
-
-\begin_layout Standard
-The boundary conditions on the negative z-face are supplied in the same
- manner as for example step04.
- When we have run the simulation, the output VTK files will be contained
- in 
-\family typewriter
-examples/3d/hex8/output
-\family default
- (all with a prefix of 
-\family typewriter
-step05
-\family default
-).
- Results using ParaView are shown in Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:step05-displ-t40"
-
-\end_inset
-
-.
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/step05-displ-t40.jpg
-	lyxscale 50
-	width 10cm
-
-\end_inset
-
-
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Displacement field for example step05 at t = 40 years visualized using ParaView.
- The mesh has been distorted by the computed displacements (magnified by
- 500), and the vectors show the computed displacements.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:step05-displ-t40"
-
-\end_inset
-
-.
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection
-Step06 - Dirichlet Boundary Conditions with Time-Dependent Kinematic Fault
- Slip
-\end_layout
-
-\begin_layout Standard
-The 
-\family typewriter
-step06.cfg
-\family default
- file defines a problem with Dirichlet (displacement) boundary conditions
- corresponding to zero x and y-displacements applied on the negative and
- positive x-faces and a vertical fault that includes multiple earthquake
- ruptures as well as steady fault creep.
- The upper (locked) portion of the fault has 4 m of left-lateral slip every
- 200 years, while the lower (creeping) portion of the fault slips at a steady
- rate of 2 cm/year.
- The problem bears some similarity to the strike-slip fault model of Savage
- and Prescott 
-\begin_inset CommandInset citation
-LatexCommand cite
-key "Savage:Prescott:1978"
-
-\end_inset
-
-, except that the fault creep extends through the viscoelastic portion of
- the domain, and the far-field displacement boundary conditions are held
- fixed.
-\end_layout
-
-\begin_layout Standard
-In this example and the remainder of the examples in this section, we change
- the time stepping behavior from the default 
-\family typewriter
-TimeStepUniform
-\family default
- to 
-\family typewriter
-TimeStepAdapt
-\family default
-.
- For adaptive time stepping, we provide the maximum permissible time step
- size, along with a stability factor.
- The stability factor controls the time step size relative to the stable
- time step size provided by the different materials in the model.
- A 
-\family typewriter
-stability_factor
-\family default
- of 1.0 means we should use the stable time step size, while a 
-\family typewriter
-stability_factor
-\family default
- greater than 1.0 means we want to use a smaller time step size.
- A 
-\family typewriter
-stability_factor
-\family default
- less than 1.0 allows time step sizes greater than the stable time step size,
- which may provide inaccurate results.
- The adaptive time stepping information is provided as:
-\end_layout
-
-\begin_layout LyX-Code
-# Change time stepping algorithm from uniform time step, to adaptive
-\end_layout
-
-\begin_layout LyX-Code
-# time stepping.
-\end_layout
-
-\begin_layout LyX-Code
-time_step = pylith.problems.TimeStepAdapt
-\begin_inset Newline newline
-\end_inset
-
-
-\begin_inset Newline newline
-\end_inset
-
-
-\end_layout
-
-\begin_layout LyX-Code
-# Change the total simulation time to 700 years, and set the maximum time
-\end_layout
-
-\begin_layout LyX-Code
-# step size to 10 years.
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.implicit.time_step]
-\end_layout
-
-\begin_layout LyX-Code
-total_time = 700.0*year
-\end_layout
-
-\begin_layout LyX-Code
-max_dt = 10.0*year
-\end_layout
-
-\begin_layout LyX-Code
-stability_factor = 1.0 ; use time step equal to stable value from materials
-\end_layout
-
-\begin_layout Standard
-In this example and the remainder of the examples in this section, we also
- make use of HDF5 output rather than the default VTK output.
- HDF5 output is a new feature beginning with PyLith version 1.6, and it is
- much more efficient with the additional advantage that multiple time steps
- can be contained in a single file.
- PyLith also produces Xdmf files describing the contents of the HDF5 files,
- which allows the files to be read easily by applications such as ParaView.
- Since VTK output is still the default, we must change the value from the
- default.
- Also note that the filename suffix is 
-\family typewriter
-.h5
-\family default
-:
-\end_layout
-
-\begin_layout LyX-Code
-# Give basename for output of solution over domain.
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.problem.formulation.output.domain]
-\end_layout
-
-\begin_layout LyX-Code
-# We specify that output occurs in terms of a given time frequency, and
-\end_layout
-
-\begin_layout LyX-Code
-# ask for output every 50 years.
-\end_layout
-
-\begin_layout LyX-Code
-output_freq = time_step
-\end_layout
-
-\begin_layout LyX-Code
-time_step = 50.0*year
-\begin_inset Newline newline
-\end_inset
-
-
-\begin_inset Newline newline
-\end_inset
-
-
-\end_layout
-
-\begin_layout LyX-Code
-# We are using HDF5 output so we must change the default writer.
-\end_layout
-
-\begin_layout LyX-Code
-writer = pylith.meshio.DataWriterHDF5Mesh
-\end_layout
-
-\begin_layout LyX-Code
-writer.filename = output/step06.h5  
-\end_layout
-
-\begin_layout Standard
-Note that we no longer need the 
-\family typewriter
-writer.time_format
-\family default
- or 
-\family typewriter
-writer.time_constant
-\family default
- properties, since all time steps are contained in a single file.
- The HDF5 writer does not have these properties, so if we attempt to define
- them an error will result.
-\end_layout
-
-\begin_layout Standard
-We also set the writer for other output as well, since it is not the default.
- For subdomain output we use:
-\end_layout
-
-\begin_layout LyX-Code
-# Give basename for output of solution over ground surface.
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.problem.formulation.output.subdomain]
-\end_layout
-
-\begin_layout LyX-Code
-# Name of nodeset for ground surface.
-\end_layout
-
-\begin_layout LyX-Code
-label = face_zpos
-\begin_inset Newline newline
-\end_inset
-
-
-\begin_inset Newline newline
-\end_inset
-
-
-\end_layout
-
-\begin_layout LyX-Code
-# We keep the default output frequency behavior (skip every n steps), and
-\end_layout
-
-\begin_layout LyX-Code
-# ask to skip 0 steps between output, so that we get output every time step.
-\end_layout
-
-\begin_layout LyX-Code
-# We again switch the writer to produce HDF5 output.
-\end_layout
-
-\begin_layout LyX-Code
-# Note that we specifically ask for a submesh writer.
-\end_layout
-
-\begin_layout LyX-Code
-skip = 0
-\end_layout
-
-\begin_layout LyX-Code
-writer = pylith.meshio.DataWriterHDF5SubMesh
-\end_layout
-
-\begin_layout LyX-Code
-writer.filename = output/step06-groundsurf.h5  
-\end_layout
-
-\begin_layout Standard
-For fault output we use:
-\end_layout
-
-\begin_layout LyX-Code
-# Give basename for fault rupture output.
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.problem.interfaces.fault.output]
-\end_layout
-
-\begin_layout LyX-Code
-# We keep the default output frequency behavior (skip every n steps), and
-\end_layout
-
-\begin_layout LyX-Code
-# ask to skip 0 steps between output, so that we get output every time step.
-\end_layout
-
-\begin_layout LyX-Code
-# We again switch the writer to produce HDF5 output.
-\end_layout
-
-\begin_layout LyX-Code
-# Note that we specifically ask for a subsubmesh writer.
-\end_layout
-
-\begin_layout LyX-Code
-skip = 0
-\end_layout
-
-\begin_layout LyX-Code
-writer = pylith.meshio.DataWriterHDF5SubSubMesh
-\end_layout
-
-\begin_layout LyX-Code
-writer.filename = output/step06-fault.h5
-\end_layout
-
-\begin_layout Standard
-Note the usage of 
-\family typewriter
-pylith.meshio.DataWriterHDF5SubMesh
-\family default
- for subdomain output and
-\family typewriter
-
-\begin_inset Newline newline
-\end_inset
-
-pylith.meshio.DataWriterHDF5SubSubMesh
-\family default
- for fault output.
-\end_layout
-
-\begin_layout Standard
-Due to the simplicity of the boundary conditions, we are able to use the
- default 
-\family typewriter
-ZeroDispBC
-\family default
- for the positive and negative x-faces, as well as the negative z-face.
- As for example step03, we define a fault interface, we identify the nodeset
- corresponding to the fault, and we provide quadrature information for the
- fault.
- We then define an array of earthquake sources and provide an origin time
- for each:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.interfaces.fault]
-\end_layout
-
-\begin_layout LyX-Code
-# Set earthquake sources to an array consisting of creep and 3 ruptures.
-\end_layout
-
-\begin_layout LyX-Code
-eq_srcs = [creep,one,two,three]
-\end_layout
-
-\begin_layout LyX-Code
-eq_srcs.creep.origin_time = 00.0*year
-\end_layout
-
-\begin_layout LyX-Code
-eq_srcs.one.origin_time = 200.0*year
-\end_layout
-
-\begin_layout LyX-Code
-eq_srcs.two.origin_time = 400.0*year
-\end_layout
-
-\begin_layout LyX-Code
-eq_srcs.three.origin_time = 600.0*year
-\end_layout
-
-\begin_layout Standard
-Note that the creep begins at t = 0 years, while the ruptures (
-\family typewriter
-one
-\family default
-, 
-\family typewriter
-two
-\family default
-, 
-\family typewriter
-three
-\family default
-) occur at regular intervals of 200 years.
- We retain the default 
-\family typewriter
-StepSlipFn
-\family default
- for the ruptures.
- Each of the ruptures has the same amount of slip, and slip occurs simultaneousl
-y for the entire rupture region, so we can use the same 
-\family typewriter
-SimpleDB
-\family default
- files providing slip and slip time for each rupture:
-\end_layout
-
-\begin_layout LyX-Code
-# Define slip and origin time for first rupture.
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.interfaces.fault.eq_srcs.one.slip_function]
-\end_layout
-
-\begin_layout LyX-Code
-slip.iohandler.filename = spatialdb/finalslip_rupture.spatialdb
-\end_layout
-
-\begin_layout LyX-Code
-slip_time.iohandler.filename = spatialdb/sliptime.spatialdb
-\begin_inset Newline newline
-\end_inset
-
-
-\begin_inset Newline newline
-\end_inset
-
-
-\end_layout
-
-\begin_layout LyX-Code
-# Define slip and origin time for second rupture.
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.interfaces.fault.eq_srcs.two.slip_function]
-\end_layout
-
-\begin_layout LyX-Code
-slip.iohandler.filename = spatialdb/finalslip_rupture.spatialdb
-\end_layout
-
-\begin_layout LyX-Code
-slip_time.iohandler.filename = spatialdb/sliptime.spatialdb
-\begin_inset Newline newline
-\end_inset
-
-
-\begin_inset Newline newline
-\end_inset
-
-
-\end_layout
-
-\begin_layout LyX-Code
-# Define slip and origin time for third rupture.
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.interfaces.fault.eq_srcs.three.slip_function]
-\end_layout
-
-\begin_layout LyX-Code
-slip.iohandler.filename = spatialdb/finalslip_rupture.spatialdb
-\end_layout
-
-\begin_layout LyX-Code
-slip_time.iohandler.filename = spatialdb/sliptime.spatialdb
-\end_layout
-
-\begin_layout Standard
-For the creep source, we change the slip function to 
-\family typewriter
-ConstRateSlipFn
-\family default
-, and we use a 
-\family typewriter
-SimpleDB
-\family default
- for both the slip time and the slip rate:
-\end_layout
-
-\begin_layout LyX-Code
-# Define slip rate and origin time for fault creep.
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.interfaces.fault.eq_srcs.creep]
-\end_layout
-
-\begin_layout LyX-Code
-slip_function = pylith.faults.ConstRateSlipFn
-\end_layout
-
-\begin_layout LyX-Code
-slip_function.slip_rate.iohandler.filename = spatialdb/sliprate_creep.spatialdb
-\end_layout
-
-\begin_layout LyX-Code
-slip_function.slip_time.iohandler.filename = spatialdb/sliptime.spatialdb
-\end_layout
-
-\begin_layout Standard
-For all earthquake sources we provide both an 
-\family typewriter
-origin_time
-\family default
- and a 
-\family typewriter
-slip_function.slip_time
-\family default
-.
- The first provides the starting time for the entire earthquake source,
- while the second provides any spatial variation in the slip time with respect
- to the 
-\family typewriter
-origin_time
-\family default
- (if any).
- Since there are multiple earthquake sources of different types, there are
- a number of additional fault information fields available for output.
- We add these additional fields be output to the fault information file:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.interfaces.fault]
-\end_layout
-
-\begin_layout LyX-Code
-output.vertex_info_fields = [normal_dir,strike_dir,dip_dir,final_slip_creep,
-\begin_inset Newline newline
-\end_inset
-
-final_slip_one,final_slip_two,final_slip_three,slip_time_creep,slip_time_one,
-\begin_inset Newline newline
-\end_inset
-
-slip_time_two,slip_time_three]
-\end_layout
-
-\begin_layout Standard
-This additional information will be contained in file 
-\family typewriter
-step06-fault_info.
-\family default
-h5.
- It will contain final slip information for each earthquake source along
- with slip time information.
- When we have run the simulation, the output HDF5 and Xdmf files will be
- contained in 
-\family typewriter
-examples/3d/hex8/output
-\family default
- (all with a prefix of 
-\family typewriter
-step06
-\family default
-).
- To open the files in ParaView, the Xdmf (
-\family typewriter
-.xmf
-\family default
-) files should be opened, as these files describe the HDF5 data structure.
- Results using ParaView are shown in Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:step06-displ-t300"
-
-\end_inset
-
-.
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/step06-displ-t300.jpg
-	lyxscale 50
-	width 10cm
-
-\end_inset
-
-
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Displacement field for example step06 at t = 300 years visualized using
- ParaView.
- The mesh has been distorted by the computed displacements (magnified by
- 500), and the vectors show the computed displacements.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:step06-displ-t300"
-
-\end_inset
-
-.
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection
-Step07 - Dirichlet Velocity Boundary Conditions with Time-Dependent Kinematic
- Fault Slip
-\end_layout
-
-\begin_layout Standard
-In step07 we add velocity boundary conditions in the positive and negative
- y-directions on the positive and negative x-faces, so that the external
- boundaries keep pace with the average fault slip.
- This problem is nearly identical to the strike-slip fault model of Savage
- and Prescott 
-\begin_inset CommandInset citation
-LatexCommand cite
-key "Savage:Prescott:1978"
-
-\end_inset
-
-, except that the fault creep extends through the viscoelastic portion of
- the domain.
-\end_layout
-
-\begin_layout Standard
-We use the default 
-\family typewriter
-ZeroDispBC
-\family default
- for the initial displacements on the positive and negative x-faces, as
- well as the negative z-face.
- For the velocities on the positive and negative x-faces, we use a 
-\family typewriter
-UniformDB
-\family default
-:
-\end_layout
-
-\begin_layout LyX-Code
-# +x face
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.bc.x_pos]
-\end_layout
-
-\begin_layout LyX-Code
-bc_dof = [0, 1]
-\end_layout
-
-\begin_layout LyX-Code
-label = face_xpos
-\end_layout
-
-\begin_layout LyX-Code
-db_initial.label = Dirichlet BC on +x
-\end_layout
-
-\begin_layout LyX-Code
-db_rate = spatialdata.spatialdb.UniformDB
-\end_layout
-
-\begin_layout LyX-Code
-db_rate.label = Dirichlet rate BC on +x
-\end_layout
-
-\begin_layout LyX-Code
-db_rate.values = [displacement-rate-x,displacement-rate-y,rate-start-time]
-\end_layout
-
-\begin_layout LyX-Code
-db_rate.data = [0.0*cm/year,1.0*cm/year,0.0*year]
-\begin_inset Newline newline
-\end_inset
-
-
-\begin_inset Newline newline
-\end_inset
-
-
-\end_layout
-
-\begin_layout LyX-Code
-# -x face
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.bc.x_neg]
-\end_layout
-
-\begin_layout LyX-Code
-bc_dof = [0, 1]
-\end_layout
-
-\begin_layout LyX-Code
-label = face_xneg
-\end_layout
-
-\begin_layout LyX-Code
-db_initial.label = Dirichlet BC on -x
-\end_layout
-
-\begin_layout LyX-Code
-db_rate = spatialdata.spatialdb.UniformDB
-\end_layout
-
-\begin_layout LyX-Code
-db_rate.label = Dirichlet rate BC on +x
-\end_layout
-
-\begin_layout LyX-Code
-db_rate.values = [displacement-rate-x,displacement-rate-y,rate-start-time]
-\end_layout
-
-\begin_layout LyX-Code
-db_rate.data = [0.0*cm/year,-1.0*cm/year,0.0*year]
-\end_layout
-
-\begin_layout Standard
-The fault definition information is identical to example step06.
- In previous examples, we have just used the default output for the domain
- and subdomain (ground surface), which includes the displacements.
- In many cases, it is also useful to include the velocities.
- PyLith provides this information, computing the velocities for the current
- time step as the difference between the current displacements and the displacem
-ents from the previous time step, divided by the time step size.
- This is more accurate than computing the velocities from the displacement
- field output that has been decimated in time.
- We can obtain this information by explicitly requesting it in 
-\family typewriter
-vertex_data_fields
-\family default
-:
-\end_layout
-
-\begin_layout LyX-Code
-# Give basename for output of solution over domain.
-\begin_inset Newline newline
-\end_inset
-
-[pylithapp.problem.formulation.output.domain]
-\end_layout
-
-\begin_layout LyX-Code
-# We specify that output occurs in terms of a given time frequency, and
-\end_layout
-
-\begin_layout LyX-Code
-# ask for output every 50 years.
-\end_layout
-
-\begin_layout LyX-Code
-# We also request velocity output in addition to displacements.
-\begin_inset Newline newline
-\end_inset
-
-vertex_data_fields = [displacement,velocity]
-\end_layout
-
-\begin_layout LyX-Code
-output_freq = time_step
-\end_layout
-
-\begin_layout LyX-Code
-time_step = 50.0*year
-\begin_inset Newline newline
-\end_inset
-
-
-\begin_inset Newline newline
-\end_inset
-
-
-\end_layout
-
-\begin_layout LyX-Code
-# We are using HDF5 output so we must change the default writer.
-\end_layout
-
-\begin_layout LyX-Code
-writer = pylith.meshio.DataWriterHDF5Mesh
-\end_layout
-
-\begin_layout LyX-Code
-writer.filename = output/step07.h5
-\begin_inset Newline newline
-\end_inset
-
-
-\begin_inset Newline newline
-\end_inset
-
-
-\end_layout
-
-\begin_layout LyX-Code
-# Give basename for output of solution over ground surface.
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.problem.formulation.output.subdomain]
-\end_layout
-
-\begin_layout LyX-Code
-# Name of nodeset for ground surface.
-\end_layout
-
-\begin_layout LyX-Code
-label = face_zpos
-\begin_inset Newline newline
-\end_inset
-
-
-\begin_inset Newline newline
-\end_inset
-
-
-\end_layout
-
-\begin_layout LyX-Code
-# We also request velocity output in addition to displacements.
-\end_layout
-
-\begin_layout LyX-Code
-vertex_data_fields = [displacement,velocity]
-\end_layout
-
-\begin_layout LyX-Code
-# We keep the default output frequency behavior (skip every n steps), and
-\end_layout
-
-\begin_layout LyX-Code
-# ask to skip 0 steps between output, so that we get output every time step.
-\end_layout
-
-\begin_layout LyX-Code
-skip = 0
-\begin_inset Newline newline
-\end_inset
-
-
-\begin_inset Newline newline
-\end_inset
-
-
-\end_layout
-
-\begin_layout LyX-Code
-# We again switch the writer to produce HDF5 output.
-\end_layout
-
-\begin_layout LyX-Code
-# Note that we specifically ask for a submesh writer.
-\end_layout
-
-\begin_layout LyX-Code
-writer = pylith.meshio.DataWriterHDF5SubMesh
-\end_layout
-
-\begin_layout LyX-Code
-writer.filename = output/step07-groundsurf.h5
-\end_layout
-
-\begin_layout Standard
-When we have run the simulation, the output HDF5 and Xdmf files will be
- contained in 
-\family typewriter
-examples/3d/hex8/output
-\family default
- (all with a prefix of 
-\family typewriter
-step07
-\family default
-).
- As for example 
-\family typewriter
-step06
-\family default
-, make sure to open the 
-\family typewriter
-.xmf
-\family default
- files rather than the 
-\family typewriter
-.h5
-\family default
- files.
- Results using ParaView are shown in Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:step07-displ-vel-t300"
-
-\end_inset
-
-.
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/step07-displ-vel-t300.jpg
-	lyxscale 50
-	width 10cm
-
-\end_inset
-
-
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Displacement field (color contours) and velocity field (vectors) for example
- step07 at t = 300 years visualized using ParaView.
- The mesh has been distorted by the computed displacements (magnified by
- 500), and the vectors show the computed velocities.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:step07-displ-vel-t300"
-
-\end_inset
-
-.
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection
-Step08 - Dirichlet Velocity Boundary Conditions with Time-Dependent Kinematic
- Fault Slip and Power-Law Rheology
-\begin_inset CommandInset label
-LatexCommand label
-name "sub:Tutorial-Step08-Power-law"
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-The 
-\family typewriter
-step08.cfg
-\family default
- file defines a problem that is identical to example step07, except the
- the lower crust is composed of a power-law viscoelastic material.
- Since the material behavior is now nonlinear, we must use the nonlinear
- solver:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent]
-\end_layout
-
-\begin_layout LyX-Code
-# For this problem we must switch to a nonlinear solver.
-\end_layout
-
-\begin_layout LyX-Code
-implicit.solver = pylith.problems.SolverNonlinear
-\end_layout
-
-\begin_layout Standard
-Although we have not discussed the PyLith PETSc settings previously, note
- that the use of the nonlinear solver may require additional options if
- we wish to override the defaults.
- These settings are contained in 
-\family typewriter
-pylithapp.cfg
-\family default
-:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.petsc]
-\end_layout
-
-\begin_layout LyX-Code
-# Nonlinear solver monitoring options.
-\end_layout
-
-\begin_layout LyX-Code
-snes_rtol = 1.0e-8
-\end_layout
-
-\begin_layout LyX-Code
-snes_atol = 1.0e-12
-\end_layout
-
-\begin_layout LyX-Code
-snes_max_it = 100
-\end_layout
-
-\begin_layout LyX-Code
-snes_monitor = true
-\end_layout
-
-\begin_layout LyX-Code
-snes_view = true
-\end_layout
-
-\begin_layout LyX-Code
-snes_converged_reason = true
-\end_layout
-
-\begin_layout Standard
-These settings are ignored unless we are using the nonlinear solver.
-\end_layout
-
-\begin_layout Standard
-When setting the physical properties for the power-law material in PyLith,
- the parameters (see Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sub:Power-Law-Maxwell-Viscoelastic"
-
-\end_inset
-
-) do not generally correspond to the values provided in laboratory results.
- PyLith include a utility code, 
-\family typewriter
-powerlaw_gendb.py
-\family default
-, to simplify the process of using laboratory results with PyLith.
- This utility code is installed in the same location as PyLith.
- An example of how to use it is in 
-\family typewriter
-examples/3d/hex8/spatialdb/powerlaw
-\family default
-.
- The user must provide a spatial database defining the spatial distribution
- of laboratory-derived parameters (contained in 
-\family typewriter
-powerlaw_params.spatialdb
-\family default
-), another spatial database defining the temperature field in degrees K
- (contained in 
-\family typewriter
-temperature.spatialdb
-\family default
-), and a set of points for which values are desired (
-\family typewriter
-powerlaw_points.txt
-\family default
-).
- The parameters for the code are defined in 
-\family typewriter
-powerlaw_gendb.cfg
-\family default
-.
- The properties expected by PyLith are 
-\family typewriter
-reference_strain_rate
-\family default
-, 
-\family typewriter
-reference_stress
-\family default
-, and 
-\family typewriter
-power_law_exponent
-\family default
-.
- The user must specify either 
-\family typewriter
-reference_strain_rate
-\family default
- or 
-\family typewriter
-reference_stress
-\family default
- so that 
-\family typewriter
-powerlaw_gendb.py
-\family default
- can compute the other property.
- Default values of 1.0e-6 1/s and 1 MPa are provided.
- In this example, the same database was used for all parameters, and a separate
- database was used to define the temperature distribution.
- In practice, the user can provide any desired thermal model to provide
- the spatial database for the temperature.
- In this example, a simple 1D (vertically-varying) distribution was used.
- The utility code can be used by simply executing it from the 
-\family typewriter
-examples/3d/hex8/spatialdb/powerlaw
-\family default
- directory:
-\end_layout
-
-\begin_layout LyX-Code
-powerlaw_gendb.py
-\end_layout
-
-\begin_layout Standard
-This code will automatically read the parameters in powerlaw_gendb.cfg in
- creating the file
-\begin_inset Newline newline
-\end_inset
-
- 
-\family typewriter
-examples/3d/hex8/spatialdb/mat_powerlaw.spatialdb
-\family default
-.
-\end_layout
-
-\begin_layout Standard
-We first change the material type of the lower crust to 
-\family typewriter
-PowerLaw3D
-\family default
-:
-\end_layout
-
-\begin_layout LyX-Code
-# Change material type of lower crust to power-law viscoelastic.
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent]
-\end_layout
-
-\begin_layout LyX-Code
-materials.lower_crust = pylith.materials.PowerLaw3D
-\end_layout
-
-\begin_layout Standard
-In many cases, it is useful to obtain the material properties from two different
- sources.
- For example, the elastic properties may come from a seismic velocity model
- while the viscous properties may be derived from a thermal model.
- In such a case we can use a 
-\family typewriter
-CompositeDB
-\family default
-, which allows a different spatial database to be used for a subset of the
- properties.
- We do this as follows:
-\end_layout
-
-\begin_layout LyX-Code
-# Provide a spatial database from which to obtain property values.
-\end_layout
-
-\begin_layout LyX-Code
-# In this case, we prefer to obtain the power-law properties from one
-\end_layout
-
-\begin_layout LyX-Code
-# database and the elastic properties from another database, so we use
-\end_layout
-
-\begin_layout LyX-Code
-# a CompositeDB.
- Each part of the CompositeDB is a SimpleDB.
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.materials.lower_crust]
-\end_layout
-
-\begin_layout LyX-Code
-db_properties = spatialdata.spatialdb.CompositeDB
-\end_layout
-
-\begin_layout LyX-Code
-db_properties.db_A = spatialdata.spatialdb.SimpleDB
-\end_layout
-
-\begin_layout LyX-Code
-db_properties.db_B = spatialdata.spatialdb.SimpleDB
-\end_layout
-
-\begin_layout Standard
-We must define the properties that come from each spatial database and then
- provide the database parameters:
-\end_layout
-
-\begin_layout LyX-Code
-# Provide the values to be obtained from each database and the database
-\end_layout
-
-\begin_layout LyX-Code
-# name.
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.materials.lower_crust.db_properties]
-\end_layout
-
-\begin_layout LyX-Code
-values_A = [density,vs,vp]   ; Elastic properties.
-\end_layout
-
-\begin_layout LyX-Code
-db_A.label = Elastic properties
-\end_layout
-
-\begin_layout LyX-Code
-db_A.iohandler.filename = spatialdb/mat_elastic.spatialdb
-\end_layout
-
-\begin_layout LyX-Code
-values_B = [reference-stress,reference-strain-rate,power-law-exponent] 
-  ; Power-law properties.
-\end_layout
-
-\begin_layout LyX-Code
-db_B.label = Power-law properties
-\end_layout
-
-\begin_layout LyX-Code
-db_B.iohandler.filename = spatialdb/mat_powerlaw.spatialdb
-\end_layout
-
-\begin_layout Standard
-The 
-\family typewriter
-PowerLaw3D
-\family default
- material has additional properties and state variables with respect to
- the default 
-\family typewriter
-ElasticIsotropic3D
-\family default
- material, so we request that these properties be written to the 
-\family typewriter
-lower_crust
-\family default
- material files:
-\end_layout
-
-\begin_layout LyX-Code
-# Since there are additional properties and state variables for the
-\end_layout
-
-\begin_layout LyX-Code
-# power-law model, we explicitly request that they be output.
- Properties are
-\end_layout
-
-\begin_layout LyX-Code
-# named in cell_info_fields and state variables are named in
-\end_layout
-
-\begin_layout LyX-Code
-# cell_data_fields.
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.materials.lower_crust]
-\end_layout
-
-\begin_layout LyX-Code
-output.cell_info_fields = [density,mu,lambda,reference_strain_rate,reference_stre
-ss,
-\begin_inset Newline newline
-\end_inset
-
-power_law_exponent]
-\end_layout
-
-\begin_layout LyX-Code
-output.cell_data_fields = [total_strain,stress,viscous_strain]
-\end_layout
-
-\begin_layout Standard
-When we have run the simulation, the output HDF5 and Xdmf files will be
- contained in 
-\family typewriter
-examples/3d/hex8/output
-\family default
- (all with a prefix of 
-\family typewriter
-step08
-\family default
-).
- Results using ParaView are shown in Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:step08-strain-displ-t150"
-
-\end_inset
-
-.
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/step08-strain-displ-t150.jpg
-	lyxscale 50
-	width 10cm
-
-\end_inset
-
-
-\begin_inset Caption
-
-\begin_layout Plain Layout
-The XY-component of strain (color contours) and displacement field (vectors)
- for example step08 at t = 150 years visualized using ParaView.
- For this visualization, we loaded both the 
-\family typewriter
-step08-lower_crust.xmf
-\family default
- and 
-\family typewriter
-step08-upper_crust.xmf
-\family default
- files to contour the strain field, and superimposed on it the displacement
- field vectors from 
-\family typewriter
-step08.xmf
-\family default
-.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:step08-strain-displ-t150"
-
-\end_inset
-
-.
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection
-Step09 - Dirichlet Velocity Boundary Conditions with Time-Dependent Kinematic
- Fault Slip and Drucker-Prager Elastoplastic Rheology
-\end_layout
-
-\begin_layout Standard
-In this example we use a Drucker-Prager elastoplastic rheology in the lower
- crust.
- As in example step08, the material behavior is nonlinear so we again use
- the nonlinear solver.
- The material is elastoplastic, there is no inherent time-dependent response
- and the stable time step size for the material depends on the loading condition
-s.
- To avoid this, we set the maximum time step size to 5 years rather than
- the value of 10 years used in example step08:
-\end_layout
-
-\begin_layout LyX-Code
-# Change the total simulation time to 700 years, and set the maximum time
-\end_layout
-
-\begin_layout LyX-Code
-# step size to 5 years.
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.implicit.time_step]
-\end_layout
-
-\begin_layout LyX-Code
-total_time = 700.0*year
-\end_layout
-
-\begin_layout LyX-Code
-max_dt = 5.0*year
-\end_layout
-
-\begin_layout LyX-Code
-stability_factor = 1.0 ; use time step equal to stable value from materials
-\end_layout
-
-\begin_layout LyX-Code
-# For this problem we set adapt_skip to zero so that the time step size
- is
-\end_layout
-
-\begin_layout LyX-Code
-# readjusted every time step.
-\end_layout
-
-\begin_layout LyX-Code
-adapt_skip = 0
-\end_layout
-
-\begin_layout Standard
-We change the material type of the lower crust to 
-\family typewriter
-DruckerPrager3D
-\family default
-, and we again use a 
-\family typewriter
-CompositeDB
-\family default
- to assign the material properties:
-\end_layout
-
-\begin_layout LyX-Code
-# Change material type of lower crust to Drucker-Prager.
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent]
-\end_layout
-
-\begin_layout LyX-Code
-materials.lower_crust = pylith.materials.DruckerPrager3D
-\end_layout
-
-\begin_layout LyX-Code
-
-\end_layout
-
-\begin_layout LyX-Code
-# Provide a spatial database from which to obtain property values.
-\end_layout
-
-\begin_layout LyX-Code
-# In this case, we prefer to obtain the Drucker-Prager properties from one
-\end_layout
-
-\begin_layout LyX-Code
-# database and the elastic properties from another database, so we use
-\end_layout
-
-\begin_layout LyX-Code
-# a CompositeDB.
- Each part of the CompositeDB is a SimpleDB.
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.materials.lower_crust]
-\end_layout
-
-\begin_layout LyX-Code
-db_properties = spatialdata.spatialdb.CompositeDB
-\end_layout
-
-\begin_layout LyX-Code
-db_properties.db_A = spatialdata.spatialdb.SimpleDB
-\end_layout
-
-\begin_layout LyX-Code
-db_properties.db_B = spatialdata.spatialdb.SimpleDB
-\end_layout
-
-\begin_layout Standard
-As for the step08 example, we first define the properties that come from
- each spatial database and then provide the database filename:
-\end_layout
-
-\begin_layout LyX-Code
-# Provide the values to be obtained from each database and the database
-\end_layout
-
-\begin_layout LyX-Code
-# name.
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.materials.lower_crust.db_properties]
-\end_layout
-
-\begin_layout LyX-Code
-values_A = [density,vs,vp]   ; Elastic properties.
-\end_layout
-
-\begin_layout LyX-Code
-db_A.label = Elastic properties
-\end_layout
-
-\begin_layout LyX-Code
-db_A.iohandler.filename = spatialdb/mat_elastic.spatialdb
-\end_layout
-
-\begin_layout LyX-Code
-values_B = [friction-angle,cohesion,dilatation-angle]   ; Drucker-Prager
- properties.
-\end_layout
-
-\begin_layout LyX-Code
-db_B.label = Drucker-Prager properties
-\end_layout
-
-\begin_layout LyX-Code
-db_B.iohandler.filename = spatialdb/mat_druckerprager.spatialdb
-\end_layout
-
-\begin_layout Standard
-We also request output of the properties and state variables that are unique
- to the 
-\family typewriter
-DruckerPrager3D
-\family default
- material:
-\end_layout
-
-\begin_layout LyX-Code
-# Since there are additional properties and state variables for the
-\end_layout
-
-\begin_layout LyX-Code
-# Drucker-Prager model, we explicitly request that they be output.
-\end_layout
-
-\begin_layout LyX-Code
-# Properties are named in cell_info_fields and state variables are named
- in
-\end_layout
-
-\begin_layout LyX-Code
-# cell_data_fields.
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.materials.lower_crust]
-\end_layout
-
-\begin_layout LyX-Code
-output.cell_info_fields = [density,mu,lambda,alpha_yield,beta,alpha_flow]
-\end_layout
-
-\begin_layout LyX-Code
-output.cell_data_fields = [total_strain,stress,plastic_strain]
-\end_layout
-
-\begin_layout Standard
-When we have run the simulation, the output HDF5 and Xdmf files will be
- contained in 
-\family typewriter
-examples/3d/hex8/output
-\family default
- (all with a prefix of 
-\family typewriter
-step09
-\family default
-).
- Results using ParaView are shown in Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:step09-strain-displ-t150"
-
-\end_inset
-
-.
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/step08-strain-displ-t150.jpg
-	lyxscale 50
-	width 10cm
-
-\end_inset
-
-
-\begin_inset Caption
-
-\begin_layout Plain Layout
-The XY-component of strain (color contours) and displacement field (vectors)
- for example step09 at t = 150 years visualized using ParaView.
- For this visualization, we loaded both the 
-\family typewriter
-step09-lower_crust.xmf
-\family default
- and 
-\family typewriter
-step09-upper_crust.xmf
-\family default
- files to contour the strain field, and superimposed on it the displacement
- field vectors from 
-\family typewriter
-step09.xmf
-\family default
-.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:step09-strain-displ-t150"
-
-\end_inset
-
-.
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_body
-\end_document
+#LyX 2.0 created this file. For more info see http://www.lyx.org/
+\lyxformat 413
+\begin_document
+\begin_header
+\textclass book
+\begin_preamble
+
+\end_preamble
+\use_default_options false
+\maintain_unincluded_children false
+\language english
+\language_package default
+\inputencoding latin1
+\fontencoding global
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry true
+\use_amsmath 0
+\use_esint 0
+\use_mhchem 1
+\use_mathdots 1
+\cite_engine basic
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\use_refstyle 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\leftmargin 1in
+\topmargin 1in
+\rightmargin 1in
+\bottommargin 2in
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\quotes_language english
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\end_header
+
+\begin_body
+
+\begin_layout Subsection
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Tutorial-3d-hex8-quasistatic"
+
+\end_inset
+
+Quasi-Static Examples
+\end_layout
+
+\begin_layout Standard
+PyLith features discussed in this tutorial:
+\end_layout
+
+\begin_layout Itemize
+Quasi-static solution
+\end_layout
+
+\begin_layout Itemize
+Formatting timestamps of VTK output files
+\end_layout
+
+\begin_layout Itemize
+HDF5 output
+\end_layout
+
+\begin_layout Itemize
+Output of velocity field
+\end_layout
+
+\begin_layout Itemize
+Dirichlet displacement and velocity boundary conditions
+\end_layout
+
+\begin_layout Itemize
+Neumann traction boundary conditions and time-varying tractions
+\end_layout
+
+\begin_layout Itemize
+UniformDB spatial database
+\end_layout
+
+\begin_layout Itemize
+CompositeDB spatial database
+\end_layout
+
+\begin_layout Itemize
+Quasi-static fault rupture and fault creep
+\end_layout
+
+\begin_layout Itemize
+Multiple kinematic fault ruptures
+\end_layout
+
+\begin_layout Itemize
+Specifying more than one material
+\end_layout
+
+\begin_layout Itemize
+Nonlinear solver
+\end_layout
+
+\begin_layout Itemize
+Maxwell linear viscoelastic material
+\end_layout
+
+\begin_layout Itemize
+Power-law viscoelastic material
+\end_layout
+
+\begin_layout Itemize
+Drucker-Prager elastoplastic material
+\end_layout
+
+\begin_layout Itemize
+Adaptive time stepping
+\end_layout
+
+\begin_layout Subsubsection
+Overview
+\end_layout
+
+\begin_layout Standard
+This set of examples describes a set of quasi-static problems for PyLith.
+ These quasi-static problems primarily demonstrate the usage of time-dependent
+ boundary conditions and fault slip, as well as different rheologies.
+ Some of the examples also demonstrate the usage of the nonlinear solver,
+ which is required by the nonlinear rheologies (power-law viscoelastic and
+ Drucker-Prager elastoplastic).
+ Some of the examples also demonstrate the usage of HDF5 output, which is
+ an alternative to the default VTK output.
+ All of the examples are contained in the directory 
+\family typewriter
+examples/3d/hex8
+\family default
+, and the corresponding 
+\family typewriter
+.cfg
+\family default
+ files are 
+\family typewriter
+step04.cfg
+\family default
+, 
+\family typewriter
+step05.cfg
+\family default
+, 
+\family typewriter
+step06.cfg
+\family default
+, 
+\family typewriter
+step07.cfg
+\family default
+, 
+\family typewriter
+step08.cfg
+\family default
+, and 
+\family typewriter
+step09.cfg
+\family default
+.
+ Each example may be run as follows:
+\end_layout
+
+\begin_layout LyX-Code
+pylith stepXX.cfg
+\end_layout
+
+\begin_layout Standard
+This will cause PyLith to read the default parameters in 
+\family typewriter
+pylithapp.cfg
+\family default
+, and then override or augment them with the additional parameters in the
+ 
+\family typewriter
+stepXX.cfg
+\family default
+ file.
+ Each 
+\family typewriter
+.cfg
+\family default
+ file is extensively documented, to provide detailed information on the
+ various parameters.
+\end_layout
+
+\begin_layout Subsubsection
+Step04 - Pure Dirichlet Velocity Boundary Conditions
+\end_layout
+
+\begin_layout Standard
+The 
+\family typewriter
+step04.cfg
+\family default
+ file defines a problem with x-displacements fixed at zero on the positive
+ and negative x-faces while velocity boundary conditions are applied in
+ the y-directions on the same faces, yielding a left-lateral sense of movement.
+ The bottom (negative z) boundary is held fixed in the z-direction.
+ We also use a Maxwell viscoelastic material for the lower crust, and the
+ simulation is run for 200 years using a constant time-step size of 20 years.
+ The default time stepping behavior is 
+\family typewriter
+TimeStepUniform
+\family default
+.
+ We retain that behavior for this problem and provide the total simulation
+ time and the time-step size:
+\end_layout
+
+\begin_layout LyX-Code
+# Change the total simulation time to 200 years, and use a constant time
+\end_layout
+
+\begin_layout LyX-Code
+# step size of 20 years.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.implicit.time_step]
+\end_layout
+
+\begin_layout LyX-Code
+total_time = 200.0*year
+\end_layout
+
+\begin_layout LyX-Code
+dt = 20.0*year 
+\end_layout
+
+\begin_layout Standard
+We then change the material type of the lower crust, provide a spatial database
+ from which to obtain the material properties (using the default 
+\family typewriter
+SimpleDB
+\family default
+), and request additional output information for the material:
+\end_layout
+
+\begin_layout LyX-Code
+# Change material type of lower crust to Maxwell viscoelastic.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent]
+\end_layout
+
+\begin_layout LyX-Code
+materials.lower_crust = pylith.materials.MaxwellIsotropic3D
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# Provide a spatial database from which to obtain property values.
+\end_layout
+
+\begin_layout LyX-Code
+# Since there are additional properties and state variables for the Maxwell
+\end_layout
+
+\begin_layout LyX-Code
+# model, we explicitly request that they be output.
+ Properties are named in
+\end_layout
+
+\begin_layout LyX-Code
+# cell_info_fields and state variables are named in cell_data_fields.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.materials.lower_crust]
+\end_layout
+
+\begin_layout LyX-Code
+db_properties.iohandler.filename = spatialdb/mat_maxwell.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+output.cell_info_fields = [density,mu,lambda,maxwell_time]
+\end_layout
+
+\begin_layout LyX-Code
+output.cell_data_fields = [total_strain,stress,viscous_strain]
+\end_layout
+
+\begin_layout Standard
+Note that the default 
+\family typewriter
+output.cell_info_fields
+\family default
+ are those corresponding to an elastic material (
+\family typewriter
+density
+\family default
+, 
+\family typewriter
+mu
+\family default
+, 
+\family typewriter
+lambda
+\family default
+), and the default 
+\family typewriter
+output.cell_data_fields
+\family default
+ are 
+\family typewriter
+total_strain
+\family default
+ and 
+\family typewriter
+stress
+\family default
+.
+ For materials other than elastic, there are generally additional material
+ properties and state variables, and the appropriate additional fields must
+ be specifically requested for each material type.
+\end_layout
+
+\begin_layout Standard
+This example has no displacements in the elastic solution (t = 0), so we
+ retain the default 
+\family typewriter
+ZeroDispDB
+\family default
+ for all instances of 
+\family typewriter
+db_initial
+\family default
+.
+ To apply the velocity boundary conditions, we must specify 
+\family typewriter
+db_rate
+\family default
+, which is zero by default.
+ We use a 
+\family typewriter
+UniformDB
+\family default
+ to assign the velocities:
+\end_layout
+
+\begin_layout LyX-Code
+# +x face
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.bc.x_pos]
+\end_layout
+
+\begin_layout LyX-Code
+bc_dof = [0, 1]
+\end_layout
+
+\begin_layout LyX-Code
+label = face_xpos
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.label = Dirichlet BC on +x
+\end_layout
+
+\begin_layout LyX-Code
+db_rate = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.label = Dirichlet rate BC on +x
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.values = [displacement-rate-x,displacement-rate-y,rate-start-time]
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.data = [0.0*cm/year,1.0*cm/year,0.0*year]
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# -x face
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.bc.x_neg]
+\end_layout
+
+\begin_layout LyX-Code
+bc_dof = [0, 1]
+\end_layout
+
+\begin_layout LyX-Code
+label = face_xneg
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.label = Dirichlet BC on -x
+\end_layout
+
+\begin_layout LyX-Code
+db_rate = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.label = Dirichlet rate BC on +x
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.values = [displacement-rate-x,displacement-rate-y,rate-start-time]
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.data = [0.0*cm/year,-1.0*cm/year,0.0*year]
+\end_layout
+
+\begin_layout Standard
+Note that 
+\family typewriter
+db_rate
+\family default
+ requires a start time, which allows the condition to be applied at any
+ time during the simulation.
+ For this example, we start the velocity boundary conditions at t = 0.
+\end_layout
+
+\begin_layout Standard
+Finally, we must provide information on VTK output.
+ This is slightly more complicated than the static case, because we must
+ decide the frequency with which output occurs for each output manager.
+ We also assign a more user-friendly format to the output file time stamp,
+ and we request that the time stamp is in units of 1 year (rather than the
+ default value of seconds):
+\end_layout
+
+\begin_layout LyX-Code
+# Give basename for VTK domain output of solution over domain.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.formulation.output.domain]
+\end_layout
+
+\begin_layout LyX-Code
+# We specify that output occurs in terms of a given time frequency, and
+\end_layout
+
+\begin_layout LyX-Code
+# ask for output every 40 years.
+ The time stamps of the output files are
+\end_layout
+
+\begin_layout LyX-Code
+# in years (rather than the default of seconds), and we give a format for
+\end_layout
+
+\begin_layout LyX-Code
+# the time stamp.
+\end_layout
+
+\begin_layout LyX-Code
+output_freq = time_step
+\end_layout
+
+\begin_layout LyX-Code
+time_step = 40.0*year
+\end_layout
+
+\begin_layout LyX-Code
+writer.filename = output/step04.vtk
+\end_layout
+
+\begin_layout LyX-Code
+writer.time_format = %04.0f
+\end_layout
+
+\begin_layout LyX-Code
+writer.time_constant = 1.0*year
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# Give basename for VTK domain output of solution over ground surface.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.formulation.output.subdomain]
+\end_layout
+
+\begin_layout LyX-Code
+# Name of nodeset for ground surface.
+\end_layout
+
+\begin_layout LyX-Code
+label = face_zpos
+\end_layout
+
+\begin_layout LyX-Code
+# We keep the default output frequency behavior (skip every n steps), and
+\end_layout
+
+\begin_layout LyX-Code
+# ask to skip 0 steps between output, so that we get output every time step.
+\end_layout
+
+\begin_layout LyX-Code
+skip = 0
+\end_layout
+
+\begin_layout LyX-Code
+writer.filename = output/step04-groundsurf.vtk
+\end_layout
+
+\begin_layout LyX-Code
+writer.time_format = %04.0f
+\end_layout
+
+\begin_layout LyX-Code
+writer.time_constant = 1.0*year
+\end_layout
+
+\begin_layout Standard
+We provide similar output information for the two materials (
+\family typewriter
+upper_crust
+\family default
+ and 
+\family typewriter
+lower_crust
+\family default
+).
+ Note that for the domain output, we requested output in terms of a given
+ time frequency, while for the subdomain we requested output in terms of
+ number of time steps.
+ When we have run the simulation, the output VTK files will be contained
+ in 
+\family typewriter
+examples/3d/hex8/output
+\family default
+ (all with a prefix of 
+\family typewriter
+step04
+\family default
+).
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step04-displ-t200"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step04-displ-t200.jpg
+	lyxscale 50
+	width 10cm
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Displacement field for example step04 at t = 200 years visualized using
+ ParaView.
+ The mesh has been distorted by the computed displacements (magnified by
+ 500), and the vectors show the computed displacements.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:step04-displ-t200"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Step05 - Time-Varying Dirichlet and Neumann Boundary Conditions
+\end_layout
+
+\begin_layout Standard
+The 
+\family typewriter
+step05.cfg
+\family default
+ file describes a problem with time-varying Dirichlet and Neumann boundary
+ conditions.
+ The example is similar to example step04, with a few important differences:
+\end_layout
+
+\begin_layout Itemize
+The Dirichlet boundary conditions on the negative x-face include an initial
+ displacement (applied in the elastic solution), as well as a constant velocity.
+\end_layout
+
+\begin_layout Itemize
+Neumann (traction) boundary conditions are applied in the negative x-direction
+ on the positive x-face, giving a compressive stress.
+ An initial traction is applied in the elastic solution, and then at t =
+ 100 years it begins decreasing linearly until it reaches zero at the end
+ of the simulation (t = 200 years).
+\end_layout
+
+\begin_layout Standard
+We again use a Maxwell viscoelastic material for the lower crust.
+\end_layout
+
+\begin_layout Standard
+For the boundary conditions, we must first change the boundary condition
+ type for the positive x-face from the default Dirichlet to Neumann:
+\end_layout
+
+\begin_layout LyX-Code
+# +x face -- first change bc type to Neumann
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.bc]
+\end_layout
+
+\begin_layout LyX-Code
+x_pos = pylith.bc.Neumann 
+\end_layout
+
+\begin_layout Standard
+We provide quadrature information for this face as we did for example step02.
+ We then use a 
+\family typewriter
+UniformDB
+\family default
+ for both the initial tractions as well as the traction rates.
+ We provide a start time of 100 years for the traction rates, and use a
+ rate of 0.01 MPa/year, so that by the end of 200 years we have completely
+ cancelled the initial traction of -1 MPa:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.bc.x_pos]
+\end_layout
+
+\begin_layout LyX-Code
+# First specify a UniformDB for the initial tractions, along with the values.
+\end_layout
+
+\begin_layout LyX-Code
+db_initial = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.label = Neumann BC on +x
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.values = [traction-shear-horiz,traction-shear-vert,traction-normal]
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.data = [0.0*MPa,0.0*MPa,-1.0*MPa]
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# Provide information on traction rates.
+\end_layout
+
+\begin_layout LyX-Code
+db_rate = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.label = Neumann rate BC on +x
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.values = [traction-rate-shear-horiz,traction-rate-shear-vert,traction-rat
+e-normal,
+\begin_inset Newline newline
+\end_inset
+
+rate-start-time]
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.data = [0.0*MPa/year,0.0*MPa/year,0.01*MPa/year,100.0*year]
+\end_layout
+
+\begin_layout Standard
+The boundary conditions on the negative x-face are analogous, but we are
+ instead using Dirichlet boundary conditions, and the initial displacement
+ is in the same direction as the applied velocities:
+\end_layout
+
+\begin_layout LyX-Code
+# -x face
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.bc.x_neg]
+\end_layout
+
+\begin_layout LyX-Code
+bc_dof = [0, 1]
+\end_layout
+
+\begin_layout LyX-Code
+label = face_xneg
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# Initial displacements.
+\end_layout
+
+\begin_layout LyX-Code
+db_initial = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.label = Dirichlet BC on -x
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.values = [displacement-x,displacement-y]
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.data = [0.0*cm,-0.5*cm]
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# Velocities.
+\end_layout
+
+\begin_layout LyX-Code
+db_rate = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.label = Dirichlet rate BC on -x
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.values = [displacement-rate-x,displacement-rate-y,rate-start-time]
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.data = [0.0*cm/year,-1.0*cm/year,0.0*year]
+\end_layout
+
+\begin_layout Standard
+The boundary conditions on the negative z-face are supplied in the same
+ manner as for example step04.
+ When we have run the simulation, the output VTK files will be contained
+ in 
+\family typewriter
+examples/3d/hex8/output
+\family default
+ (all with a prefix of 
+\family typewriter
+step05
+\family default
+).
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step05-displ-t40"
+
+\end_inset
+
+.
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step05-displ-t40.jpg
+	lyxscale 50
+	width 10cm
+
+\end_inset
+
+
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Displacement field for example step05 at t = 40 years visualized using ParaView.
+ The mesh has been distorted by the computed displacements (magnified by
+ 500), and the vectors show the computed displacements.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:step05-displ-t40"
+
+\end_inset
+
+.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Step06 - Dirichlet Boundary Conditions with Time-Dependent Kinematic Fault
+ Slip
+\end_layout
+
+\begin_layout Standard
+The 
+\family typewriter
+step06.cfg
+\family default
+ file defines a problem with Dirichlet (displacement) boundary conditions
+ corresponding to zero x- and y-displacements applied on the negative and
+ positive x-faces and a vertical fault that includes multiple earthquake
+ ruptures as well as steady fault creep.
+ The upper (locked) portion of the fault has 4 m of left-lateral slip every
+ 200 years, while the lower (creeping) portion of the fault slips at a steady
+ rate of 2 cm/year.
+ The problem bears some similarity to the strike-slip fault model of Savage
+ and Prescott 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "Savage:Prescott:1978"
+
+\end_inset
+
+, except that the fault creep extends through the viscoelastic portion of
+ the domain, and the far-field displacement boundary conditions are held
+ fixed.
+\end_layout
+
+\begin_layout Standard
+In this example and the remainder of the examples in this section, we change
+ the time stepping behavior from the default 
+\family typewriter
+TimeStepUniform
+\family default
+ to 
+\family typewriter
+TimeStepAdapt
+\family default
+.
+ For adaptive time stepping, we provide the maximum permissible time-step
+ size, along with a stability factor.
+ The stability factor controls the time-step size relative to the stable
+ time-step size provided by the different materials in the model.
+ A 
+\family typewriter
+stability_factor
+\family default
+ of 1.0 means we should use the stable time-step size, while a 
+\family typewriter
+stability_factor
+\family default
+ greater than 1.0 means we want to use a smaller time-step size.
+ A 
+\family typewriter
+stability_factor
+\family default
+ less than 1.0 allows time-step sizes greater than the stable time-step size,
+ which may provide inaccurate results.
+ The adaptive time stepping information is provided as:
+\end_layout
+
+\begin_layout LyX-Code
+# Change time stepping algorithm from uniform time step, to adaptive
+\end_layout
+
+\begin_layout LyX-Code
+# time stepping.
+\end_layout
+
+\begin_layout LyX-Code
+time_step = pylith.problems.TimeStepAdapt
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# Change the total simulation time to 700 years, and set the maximum time
+\end_layout
+
+\begin_layout LyX-Code
+# step size to 10 years.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.implicit.time_step]
+\end_layout
+
+\begin_layout LyX-Code
+total_time = 700.0*year
+\end_layout
+
+\begin_layout LyX-Code
+max_dt = 10.0*year
+\end_layout
+
+\begin_layout LyX-Code
+stability_factor = 1.0 ; use time step equal to stable value from materials
+\end_layout
+
+\begin_layout Standard
+In this example and the remainder of the examples in this section, we also
+ make use of HDF5 output rather than the default VTK output.
+ HDF5 output is a new feature beginning with PyLith version 1.6, and it is
+ much more efficient with the additional advantage that multiple time steps
+ can be contained in a single file.
+ PyLith also produces Xdmf files describing the contents of the HDF5 files,
+ which allows the files to be read easily by applications such as ParaView.
+ Since VTK output is still the default, we must change the value from the
+ default.
+ Also note that the filename suffix is 
+\family typewriter
+.h5
+\family default
+:
+\end_layout
+
+\begin_layout LyX-Code
+# Give basename for output of solution over domain.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.formulation.output.domain]
+\end_layout
+
+\begin_layout LyX-Code
+# We specify that output occurs in terms of a given time frequency, and
+\end_layout
+
+\begin_layout LyX-Code
+# ask for output every 50 years.
+\end_layout
+
+\begin_layout LyX-Code
+output_freq = time_step
+\end_layout
+
+\begin_layout LyX-Code
+time_step = 50.0*year
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# We are using HDF5 output so we must change the default writer.
+\end_layout
+
+\begin_layout LyX-Code
+writer = pylith.meshio.DataWriterHDF5Mesh
+\end_layout
+
+\begin_layout LyX-Code
+writer.filename = output/step06.h5  
+\end_layout
+
+\begin_layout Standard
+Note that we no longer need the 
+\family typewriter
+writer.time_format
+\family default
+ or 
+\family typewriter
+writer.time_constant
+\family default
+ properties, since all time steps are contained in a single file.
+ The HDF5 writer does not have these properties, so if we attempt to define
+ them an error will result.
+\end_layout
+
+\begin_layout Standard
+We also set the writer for other output as well, since it is not the default.
+ For subdomain output we use:
+\end_layout
+
+\begin_layout LyX-Code
+# Give basename for output of solution over ground surface.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.formulation.output.subdomain]
+\end_layout
+
+\begin_layout LyX-Code
+# Name of nodeset for ground surface.
+\end_layout
+
+\begin_layout LyX-Code
+label = face_zpos
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# We keep the default output frequency behavior (skip every n steps), and
+\end_layout
+
+\begin_layout LyX-Code
+# ask to skip 0 steps between output, so that we get output every time step.
+\end_layout
+
+\begin_layout LyX-Code
+# We again switch the writer to produce HDF5 output.
+\end_layout
+
+\begin_layout LyX-Code
+# Note that we specifically ask for a submesh writer.
+\end_layout
+
+\begin_layout LyX-Code
+skip = 0
+\end_layout
+
+\begin_layout LyX-Code
+writer = pylith.meshio.DataWriterHDF5SubMesh
+\end_layout
+
+\begin_layout LyX-Code
+writer.filename = output/step06-groundsurf.h5  
+\end_layout
+
+\begin_layout Standard
+For fault output we use:
+\end_layout
+
+\begin_layout LyX-Code
+# Give basename for fault rupture output.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.interfaces.fault.output]
+\end_layout
+
+\begin_layout LyX-Code
+# We keep the default output frequency behavior (skip every n steps), and
+\end_layout
+
+\begin_layout LyX-Code
+# ask to skip 0 steps between output, so that we get output every time step.
+\end_layout
+
+\begin_layout LyX-Code
+# We again switch the writer to produce HDF5 output.
+\end_layout
+
+\begin_layout LyX-Code
+# Note that we specifically ask for a subsubmesh writer.
+\end_layout
+
+\begin_layout LyX-Code
+skip = 0
+\end_layout
+
+\begin_layout LyX-Code
+writer = pylith.meshio.DataWriterHDF5SubSubMesh
+\end_layout
+
+\begin_layout LyX-Code
+writer.filename = output/step06-fault.h5
+\end_layout
+
+\begin_layout Standard
+Note the usage of 
+\family typewriter
+pylith.meshio.DataWriterHDF5SubMesh
+\family default
+ for subdomain output and
+\family typewriter
+
+\begin_inset Newline newline
+\end_inset
+
+pylith.meshio.DataWriterHDF5SubSubMesh
+\family default
+ for fault output.
+\end_layout
+
+\begin_layout Standard
+Due to the simplicity of the boundary conditions, we are able to use the
+ default 
+\family typewriter
+ZeroDispBC
+\family default
+ for the positive and negative x-faces, as well as the negative z-face.
+ As for example step03, we define a fault interface, we identify the nodeset
+ corresponding to the fault, and we provide quadrature information for the
+ fault.
+ We then define an array of earthquake sources and provide an origin time
+ for each:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces.fault]
+\end_layout
+
+\begin_layout LyX-Code
+# Set earthquake sources to an array consisting of creep and 3 ruptures.
+\end_layout
+
+\begin_layout LyX-Code
+eq_srcs = [creep,one,two,three]
+\end_layout
+
+\begin_layout LyX-Code
+eq_srcs.creep.origin_time = 00.0*year
+\end_layout
+
+\begin_layout LyX-Code
+eq_srcs.one.origin_time = 200.0*year
+\end_layout
+
+\begin_layout LyX-Code
+eq_srcs.two.origin_time = 400.0*year
+\end_layout
+
+\begin_layout LyX-Code
+eq_srcs.three.origin_time = 600.0*year
+\end_layout
+
+\begin_layout Standard
+Note that the creep begins at t = 0 years, while the ruptures (
+\family typewriter
+one
+\family default
+, 
+\family typewriter
+two
+\family default
+, 
+\family typewriter
+three
+\family default
+) occur at regular intervals of 200 years.
+ We retain the default 
+\family typewriter
+StepSlipFn
+\family default
+ for the ruptures.
+ Each of the ruptures has the same amount of slip, and slip occurs simultaneousl
+y for the entire rupture region, so we can use the same 
+\family typewriter
+SimpleDB
+\family default
+ files providing slip and slip time for each rupture:
+\end_layout
+
+\begin_layout LyX-Code
+# Define slip and origin time for first rupture.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces.fault.eq_srcs.one.slip_function]
+\end_layout
+
+\begin_layout LyX-Code
+slip.iohandler.filename = spatialdb/finalslip_rupture.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+slip_time.iohandler.filename = spatialdb/sliptime.spatialdb
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# Define slip and origin time for second rupture.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces.fault.eq_srcs.two.slip_function]
+\end_layout
+
+\begin_layout LyX-Code
+slip.iohandler.filename = spatialdb/finalslip_rupture.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+slip_time.iohandler.filename = spatialdb/sliptime.spatialdb
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# Define slip and origin time for third rupture.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces.fault.eq_srcs.three.slip_function]
+\end_layout
+
+\begin_layout LyX-Code
+slip.iohandler.filename = spatialdb/finalslip_rupture.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+slip_time.iohandler.filename = spatialdb/sliptime.spatialdb
+\end_layout
+
+\begin_layout Standard
+For the creep source, we change the slip function to 
+\family typewriter
+ConstRateSlipFn
+\family default
+, and we use a 
+\family typewriter
+SimpleDB
+\family default
+ for both the slip time and the slip rate:
+\end_layout
+
+\begin_layout LyX-Code
+# Define slip rate and origin time for fault creep.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces.fault.eq_srcs.creep]
+\end_layout
+
+\begin_layout LyX-Code
+slip_function = pylith.faults.ConstRateSlipFn
+\end_layout
+
+\begin_layout LyX-Code
+slip_function.slip_rate.iohandler.filename = spatialdb/sliprate_creep.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+slip_function.slip_time.iohandler.filename = spatialdb/sliptime.spatialdb
+\end_layout
+
+\begin_layout Standard
+For all earthquake sources we provide both an 
+\family typewriter
+origin_time
+\family default
+ and a 
+\family typewriter
+slip_function.slip_time
+\family default
+.
+ The first provides the starting time for the entire earthquake source,
+ while the second provides any spatial variation in the slip time with respect
+ to the 
+\family typewriter
+origin_time
+\family default
+ (if any).
+ Since there are multiple earthquake sources of different types, there are
+ a number of additional fault information fields available for output.
+ We add these additional fields' output to the fault information file:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces.fault]
+\end_layout
+
+\begin_layout LyX-Code
+output.vertex_info_fields = [normal_dir,strike_dir,dip_dir,final_slip_creep,
+\begin_inset Newline newline
+\end_inset
+
+final_slip_one,final_slip_two,final_slip_three,slip_time_creep,slip_time_one,
+\begin_inset Newline newline
+\end_inset
+
+slip_time_two,slip_time_three]
+\end_layout
+
+\begin_layout Standard
+This additional information will be contained in file 
+\family typewriter
+step06-fault_info.h5
+\family default
+.
+ It will contain final slip information for each earthquake source along
+ with slip time information.
+ When we have run the simulation, the output HDF5 and Xdmf files will be
+ contained in 
+\family typewriter
+examples/3d/hex8/output
+\family default
+ (all with a prefix of 
+\family typewriter
+step06
+\family default
+).
+ To open the files in ParaView, the Xdmf (
+\family typewriter
+.xmf
+\family default
+) files should be opened, as these files describe the HDF5 data structure.
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step06-displ-t300"
+
+\end_inset
+
+.
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step06-displ-t300.jpg
+	lyxscale 50
+	width 10cm
+
+\end_inset
+
+
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Displacement field for example step06 at t = 300 years visualized using
+ ParaView.
+ The mesh has been distorted by the computed displacements (magnified by
+ 500), and the vectors show the computed displacements.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:step06-displ-t300"
+
+\end_inset
+
+.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Step07 - Dirichlet Velocity Boundary Conditions with Time-Dependent Kinematic
+ Fault Slip
+\end_layout
+
+\begin_layout Standard
+In 
+\family typewriter
+step07
+\family default
+ we add velocity boundary conditions in the positive and negative y-directions
+ on the positive and negative x-faces, so that the external boundaries keep
+ pace with the average fault slip.
+ This problem is nearly identical to the strike-slip fault model of Savage
+ and Prescott 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "Savage:Prescott:1978"
+
+\end_inset
+
+, except that the fault creep extends through the viscoelastic portion of
+ the domain.
+\end_layout
+
+\begin_layout Standard
+We use the default 
+\family typewriter
+ZeroDispBC
+\family default
+ for the initial displacements on the positive and negative x-faces, as
+ well as the negative z-face.
+ For the velocities on the positive and negative x-faces, we use a 
+\family typewriter
+UniformDB
+\family default
+:
+\end_layout
+
+\begin_layout LyX-Code
+# +x face
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.bc.x_pos]
+\end_layout
+
+\begin_layout LyX-Code
+bc_dof = [0, 1]
+\end_layout
+
+\begin_layout LyX-Code
+label = face_xpos
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.label = Dirichlet BC on +x
+\end_layout
+
+\begin_layout LyX-Code
+db_rate = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.label = Dirichlet rate BC on +x
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.values = [displacement-rate-x,displacement-rate-y,rate-start-time]
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.data = [0.0*cm/year,1.0*cm/year,0.0*year]
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# -x face
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.bc.x_neg]
+\end_layout
+
+\begin_layout LyX-Code
+bc_dof = [0, 1]
+\end_layout
+
+\begin_layout LyX-Code
+label = face_xneg
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.label = Dirichlet BC on -x
+\end_layout
+
+\begin_layout LyX-Code
+db_rate = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.label = Dirichlet rate BC on +x
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.values = [displacement-rate-x,displacement-rate-y,rate-start-time]
+\end_layout
+
+\begin_layout LyX-Code
+db_rate.data = [0.0*cm/year,-1.0*cm/year,0.0*year]
+\end_layout
+
+\begin_layout Standard
+The fault definition information is identical to example 
+\family typewriter
+step06
+\family default
+.
+ In previous examples, we have just used the default output for the domain
+ and subdomain (ground surface), which includes the displacements.
+ In many cases, it is also useful to include the velocities.
+ PyLith provides this information, computing the velocities for the current
+ time step as the difference between the current displacements and the displacem
+ents from the previous time step, divided by the time-step size.
+ This is more accurate than computing the velocities from the displacement
+ field output that has been decimated in time.
+ We can obtain this information by explicitly requesting it in 
+\family typewriter
+vertex_data_fields
+\family default
+:
+\end_layout
+
+\begin_layout LyX-Code
+# Give basename for output of solution over domain.
+\begin_inset Newline newline
+\end_inset
+
+[pylithapp.problem.formulation.output.domain]
+\end_layout
+
+\begin_layout LyX-Code
+# We specify that output occurs in terms of a given time frequency, and
+\end_layout
+
+\begin_layout LyX-Code
+# ask for output every 50 years.
+\end_layout
+
+\begin_layout LyX-Code
+# We also request velocity output in addition to displacements.
+\begin_inset Newline newline
+\end_inset
+
+vertex_data_fields = [displacement,velocity]
+\end_layout
+
+\begin_layout LyX-Code
+output_freq = time_step
+\end_layout
+
+\begin_layout LyX-Code
+time_step = 50.0*year
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# We are using HDF5 output so we must change the default writer.
+\end_layout
+
+\begin_layout LyX-Code
+writer = pylith.meshio.DataWriterHDF5Mesh
+\end_layout
+
+\begin_layout LyX-Code
+writer.filename = output/step07.h5
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# Give basename for output of solution over ground surface.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.formulation.output.subdomain]
+\end_layout
+
+\begin_layout LyX-Code
+# Name of nodeset for ground surface.
+\end_layout
+
+\begin_layout LyX-Code
+label = face_zpos
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# We also request velocity output in addition to displacements.
+\end_layout
+
+\begin_layout LyX-Code
+vertex_data_fields = [displacement,velocity]
+\end_layout
+
+\begin_layout LyX-Code
+# We keep the default output frequency behavior (skip every n steps), and
+\end_layout
+
+\begin_layout LyX-Code
+# ask to skip 0 steps between output, so that we get output every time step.
+\end_layout
+
+\begin_layout LyX-Code
+skip = 0
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# We again switch the writer to produce HDF5 output.
+\end_layout
+
+\begin_layout LyX-Code
+# Note that we specifically ask for a submesh writer.
+\end_layout
+
+\begin_layout LyX-Code
+writer = pylith.meshio.DataWriterHDF5SubMesh
+\end_layout
+
+\begin_layout LyX-Code
+writer.filename = output/step07-groundsurf.h5
+\end_layout
+
+\begin_layout Standard
+When we have run the simulation, the output HDF5 and Xdmf files will be
+ contained in 
+\family typewriter
+examples/3d/hex8/output
+\family default
+ (all with a prefix of 
+\family typewriter
+step07
+\family default
+).
+ As for example 
+\family typewriter
+step06
+\family default
+, make sure to open the 
+\family typewriter
+.xmf
+\family default
+ files rather than the 
+\family typewriter
+.h5
+\family default
+ files.
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step07-displ-vel-t300"
+
+\end_inset
+
+.
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step07-displ-vel-t300.jpg
+	lyxscale 50
+	width 10cm
+
+\end_inset
+
+
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Displacement field (color contours) and velocity field (vectors) for example
+ 
+\family typewriter
+step07
+\family default
+ at t = 300 years visualized using ParaView.
+ The mesh has been distorted by the computed displacements (magnified by
+ 500), and the vectors show the computed velocities.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:step07-displ-vel-t300"
+
+\end_inset
+
+.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Step08 - Dirichlet Velocity Boundary Conditions with Time-Dependent Kinematic
+ Fault Slip and Power-Law Rheology
+\begin_inset CommandInset label
+LatexCommand label
+name "sub:Tutorial-Step08-Power-law"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The 
+\family typewriter
+step08.cfg
+\family default
+ file defines a problem that is identical to example 
+\family typewriter
+step07
+\family default
+, except the the lower crust is composed of a power-law viscoelastic material.
+ Since the material behavior is now nonlinear, we must use the nonlinear
+ solver:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent]
+\end_layout
+
+\begin_layout LyX-Code
+# For this problem we must switch to a nonlinear solver.
+\end_layout
+
+\begin_layout LyX-Code
+implicit.solver = pylith.problems.SolverNonlinear
+\end_layout
+
+\begin_layout Standard
+Although we have not discussed the PyLith PETSc settings previously, note
+ that the use of the nonlinear solver may require additional options if
+ we wish to override the defaults.
+ These settings are contained in 
+\family typewriter
+pylithapp.cfg
+\family default
+:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.petsc]
+\end_layout
+
+\begin_layout LyX-Code
+# Nonlinear solver monitoring options.
+\end_layout
+
+\begin_layout LyX-Code
+snes_rtol = 1.0e-8
+\end_layout
+
+\begin_layout LyX-Code
+snes_atol = 1.0e-12
+\end_layout
+
+\begin_layout LyX-Code
+snes_max_it = 100
+\end_layout
+
+\begin_layout LyX-Code
+snes_monitor = true
+\end_layout
+
+\begin_layout LyX-Code
+snes_view = true
+\end_layout
+
+\begin_layout LyX-Code
+snes_converged_reason = true
+\end_layout
+
+\begin_layout Standard
+These settings are ignored unless we are using the nonlinear solver.
+\end_layout
+
+\begin_layout Standard
+When setting the physical properties for the power-law material in PyLith,
+ the parameters (see Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Power-Law-Maxwell-Viscoelastic"
+
+\end_inset
+
+) do not generally correspond to the values provided in laboratory results.
+ PyLith includes a utility code, 
+\family typewriter
+powerlaw_gendb.py
+\family default
+, to simplify the process of using laboratory results with PyLith.
+ This utility code is installed in the same location as PyLith.
+ An example of how to use it is in 
+\family typewriter
+examples/3d/hex8/spatialdb/powerlaw
+\family default
+.
+ The user must provide a spatial database defining the spatial distribution
+ of laboratory-derived parameters (contained in 
+\family typewriter
+powerlaw_params.spatialdb
+\family default
+), another spatial database defining the temperature field in degrees K
+ (contained in 
+\family typewriter
+temperature.spatialdb
+\family default
+), and a set of points for which values are desired (
+\family typewriter
+powerlaw_points.txt
+\family default
+).
+ The parameters for the code are defined in 
+\family typewriter
+powerlaw_gendb.cfg
+\family default
+.
+ The properties expected by PyLith are 
+\family typewriter
+reference_strain_rate
+\family default
+, 
+\family typewriter
+reference_stress
+\family default
+, and 
+\family typewriter
+power_law_exponent
+\family default
+.
+ The user must specify either 
+\family typewriter
+reference_strain_rate
+\family default
+ or 
+\family typewriter
+reference_stress
+\family default
+ so that 
+\family typewriter
+powerlaw_gendb.py
+\family default
+ can compute the other property.
+ Default values of 1.0e-6 1/s and 1 MPa are provided.
+ In this example, the same database was used for all parameters, and a separate
+ database was used to define the temperature distribution.
+ In practice, the user can provide any desired thermal model to provide
+ the spatial database for the temperature.
+ In this example, a simple 1D (vertically-varying) distribution was used.
+ The utility code can be used by simply executing it from the 
+\family typewriter
+examples/3d/hex8/spatialdb/powerlaw
+\family default
+ directory:
+\end_layout
+
+\begin_layout LyX-Code
+powerlaw_gendb.py
+\end_layout
+
+\begin_layout Standard
+This code will automatically read the parameters in powerlaw_gendb.cfg in
+ creating the file
+\begin_inset Newline newline
+\end_inset
+
+ 
+\family typewriter
+examples/3d/hex8/spatialdb/mat_powerlaw.spatialdb
+\family default
+.
+\end_layout
+
+\begin_layout Standard
+We first change the material type of the lower crust to 
+\family typewriter
+PowerLaw3D
+\family default
+:
+\end_layout
+
+\begin_layout LyX-Code
+# Change material type of lower crust to power-law viscoelastic.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent]
+\end_layout
+
+\begin_layout LyX-Code
+materials.lower_crust = pylith.materials.PowerLaw3D
+\end_layout
+
+\begin_layout Standard
+In many cases, it is useful to obtain the material properties from two different
+ sources.
+ For example, the elastic properties may come from a seismic velocity model
+ while the viscous properties may be derived from a thermal model.
+ In such a case we can use a 
+\family typewriter
+CompositeDB
+\family default
+, which allows a different spatial database to be used for a subset of the
+ properties.
+ We do this as follows:
+\end_layout
+
+\begin_layout LyX-Code
+# Provide a spatial database from which to obtain property values.
+\end_layout
+
+\begin_layout LyX-Code
+# In this case, we prefer to obtain the power-law properties from one
+\end_layout
+
+\begin_layout LyX-Code
+# database and the elastic properties from another database, so we use
+\end_layout
+
+\begin_layout LyX-Code
+# a CompositeDB.
+ Each part of the CompositeDB is a SimpleDB.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.materials.lower_crust]
+\end_layout
+
+\begin_layout LyX-Code
+db_properties = spatialdata.spatialdb.CompositeDB
+\end_layout
+
+\begin_layout LyX-Code
+db_properties.db_A = spatialdata.spatialdb.SimpleDB
+\end_layout
+
+\begin_layout LyX-Code
+db_properties.db_B = spatialdata.spatialdb.SimpleDB
+\end_layout
+
+\begin_layout Standard
+We must define the properties that come from each spatial database and then
+ provide the database parameters:
+\end_layout
+
+\begin_layout LyX-Code
+# Provide the values to be obtained from each database and the database
+\end_layout
+
+\begin_layout LyX-Code
+# name.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.materials.lower_crust.db_properties]
+\end_layout
+
+\begin_layout LyX-Code
+values_A = [density,vs,vp]   ; Elastic properties.
+\end_layout
+
+\begin_layout LyX-Code
+db_A.label = Elastic properties
+\end_layout
+
+\begin_layout LyX-Code
+db_A.iohandler.filename = spatialdb/mat_elastic.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+values_B = [reference-stress,reference-strain-rate,power-law-exponent] 
+  ; Power-law properties.
+\end_layout
+
+\begin_layout LyX-Code
+db_B.label = Power-law properties
+\end_layout
+
+\begin_layout LyX-Code
+db_B.iohandler.filename = spatialdb/mat_powerlaw.spatialdb
+\end_layout
+
+\begin_layout Standard
+The 
+\family typewriter
+PowerLaw3D
+\family default
+ material has additional properties and state variables with respect to
+ the default 
+\family typewriter
+ElasticIsotropic3D
+\family default
+ material, so we request that these properties be written to the 
+\family typewriter
+lower_crust
+\family default
+ material files:
+\end_layout
+
+\begin_layout LyX-Code
+# Since there are additional properties and state variables for the
+\end_layout
+
+\begin_layout LyX-Code
+# power-law model, we explicitly request that they be output.
+ Properties are
+\end_layout
+
+\begin_layout LyX-Code
+# named in cell_info_fields and state variables are named in
+\end_layout
+
+\begin_layout LyX-Code
+# cell_data_fields.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.materials.lower_crust]
+\end_layout
+
+\begin_layout LyX-Code
+output.cell_info_fields = [density,mu,lambda,reference_strain_rate,reference_stre
+ss,
+\begin_inset Newline newline
+\end_inset
+
+power_law_exponent]
+\end_layout
+
+\begin_layout LyX-Code
+output.cell_data_fields = [total_strain,stress,viscous_strain]
+\end_layout
+
+\begin_layout Standard
+When we have run the simulation, the output HDF5 and Xdmf files will be
+ contained in 
+\family typewriter
+examples/3d/hex8/output
+\family default
+ (all with a prefix of 
+\family typewriter
+step08
+\family default
+).
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step08-strain-displ-t150"
+
+\end_inset
+
+.
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step08-strain-displ-t150.jpg
+	lyxscale 50
+	width 10cm
+
+\end_inset
+
+
+\begin_inset Caption
+
+\begin_layout Plain Layout
+The XY-component of strain (color contours) and displacement field (vectors)
+ for example 
+\family typewriter
+step08
+\family default
+ at t = 150 years visualized using ParaView.
+ For this visualization, we loaded both the 
+\family typewriter
+step08-lower_crust.xmf
+\family default
+ and 
+\family typewriter
+step08-upper_crust.xmf
+\family default
+ files to contour the strain field, and superimposed on it the displacement
+ field vectors from 
+\family typewriter
+step08.xmf
+\family default
+.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:step08-strain-displ-t150"
+
+\end_inset
+
+.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Step09 - Dirichlet Velocity Boundary Conditions with Time-Dependent Kinematic
+ Fault Slip and Drucker-Prager Elastoplastic Rheology
+\end_layout
+
+\begin_layout Standard
+In this example we use a Drucker-Prager elastoplastic rheology in the lower
+ crust.
+ As in example 
+\family typewriter
+step08
+\family default
+, the material behavior is nonlinear so we again use the nonlinear solver.
+ The material is elastoplastic, there is no inherent time-dependent response
+ and the stable time-step size for the material depends on the loading condition
+s.
+ To avoid this, we set the maximum time-step size to 5 years rather than
+ the value of 10 years used in example 
+\family typewriter
+step08
+\family default
+:
+\end_layout
+
+\begin_layout LyX-Code
+# Change the total simulation time to 700 years, and set the maximum time
+\end_layout
+
+\begin_layout LyX-Code
+# step size to 5 years.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.implicit.time_step]
+\end_layout
+
+\begin_layout LyX-Code
+total_time = 700.0*year
+\end_layout
+
+\begin_layout LyX-Code
+max_dt = 5.0*year
+\end_layout
+
+\begin_layout LyX-Code
+stability_factor = 1.0 ; use time step equal to stable value from materials
+\end_layout
+
+\begin_layout LyX-Code
+# For this problem we set adapt_skip to zero so that the time step size
+ is
+\end_layout
+
+\begin_layout LyX-Code
+# readjusted every time step.
+\end_layout
+
+\begin_layout LyX-Code
+adapt_skip = 0
+\end_layout
+
+\begin_layout Standard
+We change the material type of the lower crust to 
+\family typewriter
+DruckerPrager3D
+\family default
+, and we again use a 
+\family typewriter
+CompositeDB
+\family default
+ to assign the material properties:
+\end_layout
+
+\begin_layout LyX-Code
+# Change material type of lower crust to Drucker-Prager.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent]
+\end_layout
+
+\begin_layout LyX-Code
+materials.lower_crust = pylith.materials.DruckerPrager3D
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+# Provide a spatial database from which to obtain property values.
+\end_layout
+
+\begin_layout LyX-Code
+# In this case, we prefer to obtain the Drucker-Prager properties from one
+\end_layout
+
+\begin_layout LyX-Code
+# database and the elastic properties from another database, so we use
+\end_layout
+
+\begin_layout LyX-Code
+# a CompositeDB.
+ Each part of the CompositeDB is a SimpleDB.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.materials.lower_crust]
+\end_layout
+
+\begin_layout LyX-Code
+db_properties = spatialdata.spatialdb.CompositeDB
+\end_layout
+
+\begin_layout LyX-Code
+db_properties.db_A = spatialdata.spatialdb.SimpleDB
+\end_layout
+
+\begin_layout LyX-Code
+db_properties.db_B = spatialdata.spatialdb.SimpleDB
+\end_layout
+
+\begin_layout Standard
+As for the 
+\family typewriter
+step08
+\family default
+ example, we first define the properties that come from each spatial database
+ and then provide the database filename:
+\end_layout
+
+\begin_layout LyX-Code
+# Provide the values to be obtained from each database and the database
+\end_layout
+
+\begin_layout LyX-Code
+# name.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.materials.lower_crust.db_properties]
+\end_layout
+
+\begin_layout LyX-Code
+values_A = [density,vs,vp]   ; Elastic properties.
+\end_layout
+
+\begin_layout LyX-Code
+db_A.label = Elastic properties
+\end_layout
+
+\begin_layout LyX-Code
+db_A.iohandler.filename = spatialdb/mat_elastic.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+values_B = [friction-angle,cohesion,dilatation-angle]   ; Drucker-Prager
+ properties.
+\end_layout
+
+\begin_layout LyX-Code
+db_B.label = Drucker-Prager properties
+\end_layout
+
+\begin_layout LyX-Code
+db_B.iohandler.filename = spatialdb/mat_druckerprager.spatialdb
+\end_layout
+
+\begin_layout Standard
+We also request output of the properties and state variables that are unique
+ to the 
+\family typewriter
+DruckerPrager3D
+\family default
+ material:
+\end_layout
+
+\begin_layout LyX-Code
+# Since there are additional properties and state variables for the
+\end_layout
+
+\begin_layout LyX-Code
+# Drucker-Prager model, we explicitly request that they be output.
+\end_layout
+
+\begin_layout LyX-Code
+# Properties are named in cell_info_fields and state variables are named
+ in
+\end_layout
+
+\begin_layout LyX-Code
+# cell_data_fields.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.materials.lower_crust]
+\end_layout
+
+\begin_layout LyX-Code
+output.cell_info_fields = [density,mu,lambda,alpha_yield,beta,alpha_flow]
+\end_layout
+
+\begin_layout LyX-Code
+output.cell_data_fields = [total_strain,stress,plastic_strain]
+\end_layout
+
+\begin_layout Standard
+When we have run the simulation, the output HDF5 and Xdmf files will be
+ contained in 
+\family typewriter
+examples/3d/hex8/output
+\family default
+ (all with a prefix of 
+\family typewriter
+step09
+\family default
+).
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step09-strain-displ-t150"
+
+\end_inset
+
+.
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step08-strain-displ-t150.jpg
+	lyxscale 50
+	width 10cm
+
+\end_inset
+
+
+\begin_inset Caption
+
+\begin_layout Plain Layout
+The XY-component of strain (color contours) and displacement field (vectors)
+ for example 
+\family typewriter
+step09
+\family default
+ at t = 150 years visualized using ParaView.
+ For this visualization, we loaded both the 
+\family typewriter
+step09-lower_crust.xmf
+\family default
+ and 
+\family typewriter
+step09-upper_crust.xmf
+\family default
+ files to contour the strain field, and superimposed on it the displacement
+ field vectors from 
+\family typewriter
+step09.xmf
+\family default
+.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:step09-strain-displ-t150"
+
+\end_inset
+
+.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document

Modified: short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/surfload/surfload.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/surfload/surfload.lyx	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/doc/userguide/tutorials/3dhex8/surfload/surfload.lyx	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,530 +1,562 @@
-#LyX 2.0 created this file. For more info see http://www.lyx.org/
-\lyxformat 413
-\begin_document
-\begin_header
-\textclass book
-\begin_preamble
-
-\end_preamble
-\use_default_options false
-\maintain_unincluded_children false
-\language english
-\language_package default
-\inputencoding latin1
-\fontencoding global
-\font_roman default
-\font_sans default
-\font_typewriter default
-\font_default_family default
-\use_non_tex_fonts false
-\font_sc false
-\font_osf false
-\font_sf_scale 100
-\font_tt_scale 100
-
-\graphics default
-\default_output_format default
-\output_sync 0
-\bibtex_command default
-\index_command default
-\paperfontsize default
-\spacing single
-\use_hyperref false
-\papersize default
-\use_geometry true
-\use_amsmath 0
-\use_esint 0
-\use_mhchem 1
-\use_mathdots 1
-\cite_engine basic
-\use_bibtopic false
-\use_indices false
-\paperorientation portrait
-\suppress_date false
-\use_refstyle 0
-\index Index
-\shortcut idx
-\color #008000
-\end_index
-\leftmargin 1in
-\topmargin 1in
-\rightmargin 1in
-\bottommargin 2in
-\secnumdepth 3
-\tocdepth 3
-\paragraph_separation indent
-\paragraph_indentation default
-\quotes_language english
-\papercolumns 1
-\papersides 1
-\paperpagestyle default
-\tracking_changes false
-\output_changes false
-\html_math_output 0
-\html_css_as_file 0
-\html_be_strict false
-\end_header
-
-\begin_body
-
-\begin_layout Subsection
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:Tutorial-3d-hex8-surfload"
-
-\end_inset
-
-Surface Load Traction Examples
-\end_layout
-
-\begin_layout Standard
-PyLith features discussed in this tutorial:
-\end_layout
-
-\begin_layout Itemize
-Time-dependent Neumann (traction) boundary conditions
-\end_layout
-
-\begin_layout Itemize
-Dirichlet boundary conditions
-\end_layout
-
-\begin_layout Itemize
-Elastic material
-\end_layout
-
-\begin_layout Subsubsection
-Overview
-\end_layout
-
-\begin_layout Standard
-This set of examples describes a set of problems for PyLith involving surface
- loading with a Neumann (traction) applied to the ground surface.
- The first example demonstrates the use of a surface load in a static problem,
- and the second example demonstates how to apply a cyclic load in a quasi-static
- problem.
- All of the examples are contained in the directory 
-\family typewriter
-examples/3d/hex8
-\family default
-, and the corresponding 
-\family typewriter
-.cfg
-\family default
- files are 
-\family typewriter
-step18.cfg
-\family default
- and 
-\family typewriter
-step19.cfg
-\family default
-.
- Each example may be run as follows:
-\end_layout
-
-\begin_layout LyX-Code
-pylith stepXX.cfg
-\end_layout
-
-\begin_layout Standard
-This will cause PyLith to read the default parameters in 
-\family typewriter
-pylithapp.cfg
-\family default
-, and then override or augment them with the additional parameters in the
- 
-\family typewriter
-stepXX.cfg
-\family default
- file.
- Each 
-\family typewriter
-.cfg
-\family default
- file is extensively documented, to provide detailed information on the
- various parameters.
-\end_layout
-
-\begin_layout Subsubsection
-Step18 - Static surface load
-\end_layout
-
-\begin_layout Standard
-The 
-\family typewriter
-step18.cfg
-\family default
- file defines a problem with a spatially varying axial surface load applied
- to the top surface with Dirichlet (roller) boundary conditions on the lateral
- and bottom surfaces.
- We first set the array of boundary conditions with one for each surface
- of the domain.
- As in the other examples, we also setup output for the ground surface.
-\end_layout
-
-\begin_layout Standard
-For the Dirichlet boundary conditions we fix the degree of freedom associated
- with motion normal to the boundary while leaving the other degrees of freedom
- free.
- We do not explicitly specify the use of a Dirichlet boundary condition
- because it is the default.
- Similarly, the ZeroDispDB is the default spatial database for the displacements
- in a Dirichlet boundary condition, so all we need to specify is the degree
- of freedom that is constrained, the name of the nodeset from CUBIT, and
- a label used in diagnostic output.
- For the Dirichlet boundary condition on the +x surface we have:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.bc.x_pos]
-\end_layout
-
-\begin_layout LyX-Code
-label = face_xpos
-\end_layout
-
-\begin_layout LyX-Code
-bc_dof = [0]
-\end_layout
-
-\begin_layout LyX-Code
-db_initial.label = Dirichlet BC on +x
-\end_layout
-
-\begin_layout Standard
-On the top surface we apply a Neumann boundary condition for the surface
- load, so we first set the boundary condition type and then specify the
- nodeset in CUBIT associated with this surface.
- For the static surface load, we use a spatial database for the initial
- value and linear interpolation.
- We integrate the surface tractions over the boundary, so we also specify
- the numerical integration scheme to use.
- Finally, we specify a vector for the up direction because the tractions
- are applied to a horizontal surface, resulting in ambiguous shear directions
- for our default orientation convention.
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.bc]
-\end_layout
-
-\begin_layout LyX-Code
-z_pos = pylith.bc.Neumann
-\begin_inset Newline newline
-\end_inset
-
-
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.bc.z_pos]
-\end_layout
-
-\begin_layout LyX-Code
-label = face_zpos
-\end_layout
-
-\begin_layout LyX-Code
-\begin_inset Newline newline
-\end_inset
-
-db_initial = spatialdata.spatialdb.SimpleDB
-\end_layout
-
-\begin_layout LyX-Code
-db_initial.label = Neumann BC on +z
-\end_layout
-
-\begin_layout LyX-Code
-db_initial.iohandler.filename = spatialdb/tractions_axial_pressure.spatialdb
-\end_layout
-
-\begin_layout LyX-Code
-# Use linear interpolation
-\end_layout
-
-\begin_layout LyX-Code
-db_initial.query_type = linear
-\begin_inset Newline newline
-\end_inset
-
-
-\end_layout
-
-\begin_layout LyX-Code
-# Diagnostic output
-\end_layout
-
-\begin_layout LyX-Code
-output.cell_info_fields = [initial-value]
-\end_layout
-
-\begin_layout LyX-Code
-output.writer.filename = output/step18-traction.vtk
-\end_layout
-
-\begin_layout LyX-Code
-output.cell_filter = pylith.meshio.CellFilterAvgSubMesh
-\begin_inset Newline newline
-\end_inset
-
-
-\end_layout
-
-\begin_layout LyX-Code
-# We must specify quadrature information for the cell faces.
-\end_layout
-
-\begin_layout LyX-Code
-quadrature.cell = pylith.feassemble.FIATLagrange
-\end_layout
-
-\begin_layout LyX-Code
-quadrature.cell.dimension = 2
-\end_layout
-
-\begin_layout LyX-Code
-quadrature.cell.quad_order = 2
-\begin_inset Newline newline
-\end_inset
-
-
-\end_layout
-
-\begin_layout LyX-Code
-# Because normal for +z surface is [0,0,1], the horizontal and
-\end_layout
-
-\begin_layout LyX-Code
-# vertical shear directions are ambiguous.
- We provide a "fake" up
-\end_layout
-
-\begin_layout LyX-Code
-# direction of [0,1,0] so that the horizontal shear direction ("up" x
-\end_layout
-
-\begin_layout LyX-Code
-# normal) is [1,0,0] and the vertical shear direction (normal x horiz
-\end_layout
-
-\begin_layout LyX-Code
-# shear dir) is [0,1,0].
-\end_layout
-
-\begin_layout LyX-Code
-up_dir = [0,1,0]
-\end_layout
-
-\begin_layout Standard
-When we have run the simulation, the output VTK files will be contained
- in 
-\family typewriter
-examples/3d/hex8/output
-\family default
- (all with a prefix of 
-\family typewriter
-step1
-\family default
-8).
- Results using ParaView are shown in Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:step18-displ"
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/step18-displ.jpg
-	lyxscale 50
-	width 10cm
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Displacement field for example step18 visualized using ParaView.
- The vectors show the displacement field while the colors in the wireframe
- correspond to the z-component of the displacement field.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:step18-displ"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection
-Step19 - Time-dependent surface load
-\end_layout
-
-\begin_layout Standard
-The 
-\family typewriter
-step19.cfg
-\family default
- file defines a problem that is identical to example step18, except that
- we vary the amplitude of the surface load as a function of time.
- We use a temporal database (analogous to our spatial databases for specifying
- spatial variations) to prescribe a piecewise linear variation of the amplitude
- with time as given in the file 
-\family typewriter
-spatialdb/loadcycle.timedb
-\family default
-.
- The amplitude begins at zero, progresses to 1.0, then 1.5, before decreasing
- in a symmetric fashion.
- The temporal database can use variable time steps to prescribe arbitrary
- time histories.
- 
-\end_layout
-
-\begin_layout Standard
-Rather than specify a spatial database for the initial value of the Neumann
- boundary condition corresponding to the surface load, we specify a spatial
- database for the change in value and the temporal database:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.bc.z_pos]
-\end_layout
-
-\begin_layout LyX-Code
-label = face_zpos
-\end_layout
-
-\begin_layout LyX-Code
-db_change = spatialdata.spatialdb.SimpleDB
-\end_layout
-
-\begin_layout LyX-Code
-db_change.label = Amplitude of Neumann BC on +z
-\end_layout
-
-\begin_layout LyX-Code
-db_change.iohandler.filename = spatialdb/tractions_axial_pressure.spatialdb
-\end_layout
-
-\begin_layout LyX-Code
-# Use linear interpolation
-\end_layout
-
-\begin_layout LyX-Code
-db_change.query_type = linear
-\begin_inset Newline newline
-\end_inset
-
-
-\end_layout
-
-\begin_layout LyX-Code
-th_change = spatialdata.spatialdb.TimeHistory
-\end_layout
-
-\begin_layout LyX-Code
-th_change.label = Time history for Neumann BC on +z
-\end_layout
-
-\begin_layout LyX-Code
-th_change.filename = spatialdb/loadcycle.timedb
-\end_layout
-
-\begin_layout Standard
-When we have run the simulation, the output VTK files will be contained
- in 
-\family typewriter
-examples/3d/hex8/output
-\family default
- (all with a prefix of 
-\family typewriter
-step1
-\family default
-9).
- Results using ParaView are shown in Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:step19-stress-t200"
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/step19-stress_t200.jpg
-	lyxscale 50
-	width 10cm
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Stress field (zz-component) for example step19 at t = 200 years visualized
- using ParaView.
- The stresses appear as 4 layers since we have used 
-\family typewriter
-CellFilterAvgMesh
-\family default
- for material output.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:step19-stress-t200"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_body
-\end_document
+#LyX 2.0 created this file. For more info see http://www.lyx.org/
+\lyxformat 413
+\begin_document
+\begin_header
+\textclass book
+\begin_preamble
+
+\end_preamble
+\use_default_options false
+\maintain_unincluded_children false
+\language english
+\language_package default
+\inputencoding latin1
+\fontencoding global
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry true
+\use_amsmath 0
+\use_esint 0
+\use_mhchem 1
+\use_mathdots 1
+\cite_engine basic
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\use_refstyle 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\leftmargin 1in
+\topmargin 1in
+\rightmargin 1in
+\bottommargin 2in
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\quotes_language english
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\end_header
+
+\begin_body
+
+\begin_layout Subsection
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Tutorial-3d-hex8-surfload"
+
+\end_inset
+
+Surface Load Traction Examples
+\end_layout
+
+\begin_layout Standard
+PyLith features discussed in this tutorial:
+\end_layout
+
+\begin_layout Itemize
+Time-dependent Neumann (traction) boundary conditions
+\end_layout
+
+\begin_layout Itemize
+Dirichlet boundary conditions
+\end_layout
+
+\begin_layout Itemize
+Elastic material
+\end_layout
+
+\begin_layout Itemize
+Output of solution at user-defined locations
+\end_layout
+
+\begin_layout Subsubsection
+Overview
+\end_layout
+
+\begin_layout Standard
+This set of examples describes a set of problems for PyLith involving surface
+ loading with a Neumann (traction) applied to the ground surface.
+ The first example demonstrates the use of a surface load in a static problem,
+ and the second example demonstates how to apply a cyclic load in a quasi-static
+ problem.
+ The second problem also includes output of the solution at user-defined
+ locations.
+ All of the examples are contained in the directory 
+\family typewriter
+examples/3d/hex8
+\family default
+, and the corresponding 
+\family typewriter
+.cfg
+\family default
+ files are 
+\family typewriter
+step18.cfg
+\family default
+ and 
+\family typewriter
+step19.cfg
+\family default
+.
+ Each example may be run as follows:
+\end_layout
+
+\begin_layout LyX-Code
+pylith stepXX.cfg
+\end_layout
+
+\begin_layout Standard
+This will cause PyLith to read the default parameters in 
+\family typewriter
+pylithapp.cfg
+\family default
+, and then override or augment them with the additional parameters in the
+ 
+\family typewriter
+stepXX.cfg
+\family default
+ file.
+ Each 
+\family typewriter
+.cfg
+\family default
+ file is extensively documented, to provide detailed information on the
+ various parameters.
+\end_layout
+
+\begin_layout Subsubsection
+Step18 - Static Surface Load
+\end_layout
+
+\begin_layout Standard
+The 
+\family typewriter
+step18.cfg
+\family default
+ file defines a problem with a spatially varying axial surface load applied
+ to the top surface with Dirichlet (roller) boundary conditions on the lateral
+ and bottom surfaces.
+ We first set the array of boundary conditions with one for each surface
+ of the domain.
+ As in the other examples, we also setup output for the ground surface.
+\end_layout
+
+\begin_layout Standard
+For the Dirichlet boundary conditions we fix the degree of freedom associated
+ with motion normal to the boundary while leaving the other degrees of freedom
+ free.
+ We do not explicitly specify the use of a Dirichlet boundary condition
+ because it is the default.
+ Similarly, the ZeroDispDB is the default spatial database for the displacements
+ in a Dirichlet boundary condition, so all we need to specify is the degree
+ of freedom that is constrained, the name of the nodeset from CUBIT, and
+ a label used in diagnostic output.
+ For the Dirichlet boundary condition on the +x surface we have:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.bc.x_pos]
+\end_layout
+
+\begin_layout LyX-Code
+label = face_xpos
+\end_layout
+
+\begin_layout LyX-Code
+bc_dof = [0]
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.label = Dirichlet BC on +x
+\end_layout
+
+\begin_layout Standard
+On the top surface we apply a Neumann boundary condition for the surface
+ load, so we first set the boundary condition type and then specify the
+ nodeset in CUBIT associated with this surface.
+ For the static surface load, we use a spatial database for the initial
+ value and linear interpolation.
+ We integrate the surface tractions over the boundary, so we also specify
+ the numerical integration scheme to use.
+ Finally, we specify a vector for the up direction because the tractions
+ are applied to a horizontal surface, resulting in ambiguous shear directions
+ for our default orientation convention.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.bc]
+\end_layout
+
+\begin_layout LyX-Code
+z_pos = pylith.bc.Neumann
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.bc.z_pos]
+\end_layout
+
+\begin_layout LyX-Code
+label = face_zpos
+\end_layout
+
+\begin_layout LyX-Code
+\begin_inset Newline newline
+\end_inset
+
+db_initial = spatialdata.spatialdb.SimpleDB
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.label = Neumann BC on +z
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.iohandler.filename = spatialdb/tractions_axial_pressure.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+# Use linear interpolation
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.query_type = linear
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# Diagnostic output
+\end_layout
+
+\begin_layout LyX-Code
+output.cell_info_fields = [initial-value]
+\end_layout
+
+\begin_layout LyX-Code
+output.writer.filename = output/step18-traction.vtk
+\end_layout
+
+\begin_layout LyX-Code
+output.cell_filter = pylith.meshio.CellFilterAvgSubMesh
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# We must specify quadrature information for the cell faces.
+\end_layout
+
+\begin_layout LyX-Code
+quadrature.cell = pylith.feassemble.FIATLagrange
+\end_layout
+
+\begin_layout LyX-Code
+quadrature.cell.dimension = 2
+\end_layout
+
+\begin_layout LyX-Code
+quadrature.cell.quad_order = 2
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# Because normal for +z surface is [0,0,1], the horizontal and
+\end_layout
+
+\begin_layout LyX-Code
+# vertical shear directions are ambiguous.
+ We provide a "fake" up
+\end_layout
+
+\begin_layout LyX-Code
+# direction of [0,1,0] so that the horizontal shear direction ("up" x
+\end_layout
+
+\begin_layout LyX-Code
+# normal) is [1,0,0] and the vertical shear direction (normal x horiz
+\end_layout
+
+\begin_layout LyX-Code
+# shear dir) is [0,1,0].
+\end_layout
+
+\begin_layout LyX-Code
+up_dir = [0,1,0]
+\end_layout
+
+\begin_layout Standard
+When we have run the simulation, the output VTK files will be contained
+ in 
+\family typewriter
+examples/3d/hex8/output
+\family default
+ (all with a prefix of 
+\family typewriter
+step1
+\family default
+8).
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step18-displ"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step18-displ.jpg
+	lyxscale 50
+	width 10cm
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Displacement field for example step18 visualized using ParaView.
+ The vectors show the displacement field while the colors in the wireframe
+ correspond to the z-component of the displacement field.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:step18-displ"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Step19 - Time-Dependent Surface Load
+\end_layout
+
+\begin_layout Standard
+The 
+\family typewriter
+step19.cfg
+\family default
+ file defines a problem that is identical to example step18, except that
+ we vary the amplitude of the surface load as a function of time.
+ We use a temporal database (analogous to our spatial databases for specifying
+ spatial variations) to prescribe a piecewise linear variation of the amplitude
+ with time as given in the file 
+\family typewriter
+spatialdb/loadcycle.timedb
+\family default
+.
+ The amplitude begins at zero, progresses to 1.0, then 1.5, before decreasing
+ in a symmetric fashion.
+ The temporal database can use variable time steps to prescribe arbitrary
+ time histories.
+ 
+\end_layout
+
+\begin_layout Standard
+Rather than specify a spatial database for the initial value of the Neumann
+ boundary condition corresponding to the surface load, we specify a spatial
+ database for the change in value and the temporal database:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.bc.z_pos]
+\end_layout
+
+\begin_layout LyX-Code
+label = face_zpos
+\end_layout
+
+\begin_layout LyX-Code
+db_change = spatialdata.spatialdb.SimpleDB
+\end_layout
+
+\begin_layout LyX-Code
+db_change.label = Amplitude of Neumann BC on +z
+\end_layout
+
+\begin_layout LyX-Code
+db_change.iohandler.filename = spatialdb/tractions_axial_pressure.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+# Use linear interpolation
+\end_layout
+
+\begin_layout LyX-Code
+db_change.query_type = linear
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+th_change = spatialdata.spatialdb.TimeHistory
+\end_layout
+
+\begin_layout LyX-Code
+th_change.label = Time history for Neumann BC on +z
+\end_layout
+
+\begin_layout LyX-Code
+th_change.filename = spatialdb/loadcycle.timedb
+\end_layout
+
+\begin_layout Standard
+When we have run the simulation, the output VTK files will be contained
+ in 
+\family typewriter
+examples/3d/hex8/output
+\family default
+ (all with a prefix of 
+\family typewriter
+step1
+\family default
+9).
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step19-stress-t200"
+
+\end_inset
+
+.
+ We also output the solution at user-defined locations, which are given
+ in the file 
+\family typewriter
+output_points.txt.
+
+\family default
+ See Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:output:points"
+
+\end_inset
+
+ for a discussion of the output parameters.
+ This type of output is designed for comparison against observations and
+ inversions and output via HDF5 files (see Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:HDF5/Xdmf-Output"
+
+\end_inset
+
+).
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step19-stress_t200.jpg
+	lyxscale 50
+	width 10cm
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Stress field (zz-component) for example 
+\family typewriter
+step19
+\family default
+ at t = 200 years visualized using ParaView.
+ The stresses appear as 4 layers since we have used 
+\family typewriter
+CellFilterAvgMesh
+\family default
+ for material output.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:step19-stress-t200"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document

Modified: short/3D/PyLith/trunk/doc/userguide/tutorials/3dtet4/3dtet4.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/tutorials/3dtet4/3dtet4.lyx	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/doc/userguide/tutorials/3dtet4/3dtet4.lyx	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,1954 +1,1954 @@
-#LyX 2.0 created this file. For more info see http://www.lyx.org/
-\lyxformat 413
-\begin_document
-\begin_header
-\textclass book
-\begin_preamble
-
-\end_preamble
-\use_default_options false
-\maintain_unincluded_children false
-\language english
-\language_package default
-\inputencoding latin1
-\fontencoding global
-\font_roman default
-\font_sans default
-\font_typewriter default
-\font_default_family default
-\use_non_tex_fonts false
-\font_sc false
-\font_osf false
-\font_sf_scale 100
-\font_tt_scale 100
-
-\graphics default
-\default_output_format default
-\output_sync 0
-\bibtex_command default
-\index_command default
-\paperfontsize default
-\spacing single
-\use_hyperref false
-\papersize default
-\use_geometry true
-\use_amsmath 0
-\use_esint 0
-\use_mhchem 1
-\use_mathdots 1
-\cite_engine basic
-\use_bibtopic false
-\use_indices false
-\paperorientation portrait
-\suppress_date false
-\use_refstyle 0
-\index Index
-\shortcut idx
-\color #008000
-\end_index
-\leftmargin 1in
-\topmargin 1in
-\rightmargin 1in
-\bottommargin 2in
-\secnumdepth 3
-\tocdepth 3
-\paragraph_separation indent
-\paragraph_indentation default
-\quotes_language english
-\papercolumns 1
-\papersides 1
-\paperpagestyle default
-\tracking_changes false
-\output_changes false
-\html_math_output 0
-\html_css_as_file 0
-\html_be_strict false
-\end_header
-
-\begin_body
-
-\begin_layout Section
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:Tutorial-3d-tet4"
-
-\end_inset
-
-Tutorial Using Tetrahedral Mesh Created by LaGriT
-\end_layout
-
-\begin_layout Standard
-PyLith features discussed in this tutorial:
-\end_layout
-
-\begin_layout Itemize
-Quasi-static solution
-\end_layout
-
-\begin_layout Itemize
-LaGriT mesh format
-\end_layout
-
-\begin_layout Itemize
-Dirichlet boundary conditions
-\end_layout
-
-\begin_layout Itemize
-Kinematic fault interface conditions
-\end_layout
-
-\begin_layout Itemize
-Linearly elastic isotropic material
-\end_layout
-
-\begin_layout Itemize
-Maxwell linear viscoelastic material
-\end_layout
-
-\begin_layout Itemize
-Specifying more than one material
-\end_layout
-
-\begin_layout Itemize
-VTK output
-\end_layout
-
-\begin_layout Itemize
-Linear tetrahedral cells
-\end_layout
-
-\begin_layout Itemize
-SimpleDB spatial database
-\end_layout
-
-\begin_layout Itemize
-ZeroDispDB spatial database
-\end_layout
-
-\begin_layout Itemize
-Custom algebraic multigrid preconditioner with split fields
-\end_layout
-
-\begin_layout Itemize
-Global uniform mesh refinement
-\end_layout
-
-\begin_layout Standard
-All of the files necessary to run the examples are contained in the directory
- 
-\family typewriter
-examples/3d/tet4.
-\end_layout
-
-\begin_layout Subsection
-Overview
-\end_layout
-
-\begin_layout Standard
-This tutorial is a simple 3D example of a quasi-static finite element problem.
- It is a mesh composed of 852 linear tetrahedra subject to displacement
- boundary conditions.
- This example demonstrates the usage of the LaGriT mesh generation package
- 
-\begin_inset Flex URL
-status collapsed
-
-\begin_layout Plain Layout
-
-lagrit.lanl.gov
-\end_layout
-
-\end_inset
-
- to create a mesh, as well as describing how to use a LaGriT-generated mesh
- in PyLith.
- In this tutorial, we will walk through the steps necessary to construct,
- run, and visualize the results for two problems that use the same mesh.
- For each of these problems we also consider a simulation using a custom
- algebraic multigrid preconditioner with a globally uniformly refined mesh
- that reduces the node spacing by a factor of two.
- In addition to this manual, each of the files for the example problems
- includes extensive comments.
-\end_layout
-
-\begin_layout Subsection
-Mesh Generation and Description
-\end_layout
-
-\begin_layout Standard
-The mesh for these examples is a simple rectangular prism (Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:3dtet4-mesh"
-
-\end_inset
-
-).
- This mesh would be quite difficult to generate by hand, so we use the LaGriT
- mesh generation package.
- For this example, we provide a documented command file in 
-\family typewriter
-examples/3d/tet4.
-
-\family default
- Examination of this command file should provide some insight into how to
- use LaGriT with PyLith.
- For more detailed information refer to the LaGriT web site 
-\begin_inset Flex URL
-status collapsed
-
-\begin_layout Plain Layout
-
-lagrit.lanl.gov
-\end_layout
-
-\end_inset
-
-.
- If you have LaGriT installed on your machine, you can use the command file
- to create your own mesh.
- Otherwise, you can use the mesh that has already been created.
-\end_layout
-
-\begin_layout Standard
-There are two ways to use the command file.
- The simplest method is to go to the
-\family sans
- 
-\family default
-examples directory (
-\family typewriter
-examples/3d/tet4
-\family default
-), start LaGriT, and then type:
-\end_layout
-
-\begin_layout LyX-Code
-input mesh_tet4_1000m.lagrit
-\end_layout
-
-\begin_layout Standard
-This will run the commands in that file, which will produce the necessary
- files to run the example.
- This method will create the mesh, but you will gain very little insight
- into what is being done.
- A more informative approach is to input each command directly.
- That way, you will see what each command does.
- You can simply copy and paste the commands from 
-\family typewriter
-mesh_tet4_1000m.lagrit
-\family default
-.
- For example, the first six commands, which define the block shape, are
-\end_layout
-
-\begin_layout LyX-Code
-define / domain_xm / -3.0e+3
-\end_layout
-
-\begin_layout LyX-Code
-define / domain_xp /  3.0e+3
-\end_layout
-
-\begin_layout LyX-Code
-define / domain_ym / -3.0e+3
-\end_layout
-
-\begin_layout LyX-Code
-define / domain_yp /  3.0e+3
-\end_layout
-
-\begin_layout LyX-Code
-define / domain_zm / -4.0e+3
-\end_layout
-
-\begin_layout LyX-Code
-define / domain_zp /  0.0e+3 
-\end_layout
-
-\begin_layout Standard
-Continuing through the remainder of the commands in 
-\family typewriter
-mesh_tet4_1000m.lagrit
-\family default
-, you will eventually end up with the files 
-\family typewriter
-tet4_1000m_binary.gmv
-\family default
-, 
-\family typewriter
-tet4_1000m_ascii.gmv
-\family default
-, 
-\family typewriter
-tet4_1000m_ascii.pset
-\family default
-, and 
-\family typewriter
-tet4_1000m_binary.pset
-\family default
-.
- The ASCII files are not actually needed, but we create them so users can
- see what is contained in the files.
- These files may also be used instead of the binary versions, if desired.
- The 
-\family typewriter
-.gmv
-\family default
- files define the mesh information, and they may be read directly by the
- GMV 
-\begin_inset Flex URL
-status collapsed
-
-\begin_layout Plain Layout
-
-laws.lanl.gov/XCM/gmv/GMVHome.html
-\end_layout
-
-\end_inset
-
- mesh visualization package.
- The 
-\family typewriter
-.pset
-\family default
- files specify the vertices corresponding to each set of vertices on a surface
- used in the problem, including the fault as well as external boundaries
- to which boundary conditions are applied.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/tet4-mesh.jpg
-	lyxscale 50
-	scale 45
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Mesh composed of linear tetrahedral cells generated by LaGriT used for the
- example problems.
- The different colors represent the different materials.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:3dtet4-mesh"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Additional Common Information
-\end_layout
-
-\begin_layout Standard
-In addition to the mesh, the example problems share additional information.
- In such cases it is generally useful to create a file named 
-\family typewriter
-pylithapp.cfg
-\family default
- in the run directory, since this file is read automatically every time
- PyLith is run.
- Settings specific to a particular problem may be placed in other 
-\family typewriter
-.cfg
-\family default
- files, as described later, and then those files are placed on the command
- line.
-  The settings contained in 
-\family typewriter
-pylithapp.cfg
-\family default
- for this problem consist of:
-\end_layout
-
-\begin_layout Description
-pylithapp.journal.info Settings that control the verbosity of the output for
- the different components.
-\end_layout
-
-\begin_layout Description
-pylithapp.mesh_generator Settings that control mesh importing, such as the
- importer type, the filenames, and the spatial dimension of the mesh.
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent Settings that control the problem, such as the total
- time, time step size, and number of entries in the material array.
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.materials Settings that control the material type,
- specify which material IDs are to be associated with a particular material
- type, and give the name of the spatial database containing material parameters
- for the mesh.
- The quadrature information is also given.
-\end_layout
-
-\begin_layout Description
-pylithapp.petsc PETSc settings to use for the problem, such as the preconditioner
- type.
-\end_layout
-
-\begin_layout Standard
-Since these examples use a mesh from LaGriT, we set the importer to 
-\family typewriter
-MeshIO
-\family default
-Lagrit:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.mesh_generator]
-\end_layout
-
-\begin_layout LyX-Code
-reader = pylith.meshio.MeshIOLagrit
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.mesh_generator.reader]
-\end_layout
-
-\begin_layout LyX-Code
-filename_gmv = mesh/tet4_1000m_binary.gmv
-\end_layout
-
-\begin_layout LyX-Code
-filename_pset = mesh/tet4_1000m_binary.pset
-\end_layout
-
-\begin_layout LyX-Code
-flip_endian = True
-\end_layout
-
-\begin_layout LyX-Code
-# record_header_32bit = False
-\end_layout
-
-\begin_layout Standard
-Notice that there are a couple of settings pertinent to binary files.
- The first flag (
-\family typewriter
-flip_endian
-\family default
-) is used if the binary files were produced on a machine with a different
- endianness than the machine on which they are being read.
- If you get an error when attempting to run an example, you may need to
- change the setting of this flag.
- The second flag (
-\family typewriter
-record_header_32bit
-\family default
-) may need to be set to 
-\family typewriter
-False
-\family default
- if the version of LaGriT being used has 64-bit Fortran record headers.
- 
-\end_layout
-
-\begin_layout Standard
-This example differs from previous examples, because we specify two material
- groups:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent]
-\end_layout
-
-\begin_layout LyX-Code
-materials = [elastic,viscoelastic]
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.materials.elastic]
-\end_layout
-
-\begin_layout LyX-Code
-label = Elastic material
-\end_layout
-
-\begin_layout LyX-Code
-id = 1
-\end_layout
-
-\begin_layout LyX-Code
-db.iohandler.filename = spatialdb/mat_elastic.spatialdb
-\end_layout
-
-\begin_layout LyX-Code
-quadrature.cell = pylith.feassemble.FIATSimplex
-\end_layout
-
-\begin_layout LyX-Code
-quadrature.cell.shape = tetrahedron
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.materials.viscoelastic]
-\end_layout
-
-\begin_layout LyX-Code
-label = Viscoelastic material
-\end_layout
-
-\begin_layout LyX-Code
-id = 2
-\end_layout
-
-\begin_layout LyX-Code
-db.iohandler.filename = spatialdb/mat_viscoelastic.spatialdb
-\end_layout
-
-\begin_layout LyX-Code
-quadrature.cell = pylith.feassemble.FIATSimplex
-\end_layout
-
-\begin_layout LyX-Code
-quadrature.cell.shape = tetrahedron
-\end_layout
-
-\begin_layout LyX-Code
-
-\end_layout
-
-\begin_layout LyX-Code
-
-\end_layout
-
-\begin_layout Standard
-The two materials correspond to the two different colors in Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:3dtet4-mesh"
-
-\end_inset
-
-.
- Each material uses a different spatial database because the physical parameters
- are different.
- In generating the mesh within LaGriT, the mesh contains four materials
- as a result of how LaGriT handles materials and interior interfaces.
- Near the end of the LaGriT command file, we merge the materials on each
- side of the fault into a single material to simplify the input and output
- from PyLith.
- For this example, values describing three-dimensional elastic material
- properties are given by the single point in the spatial databases, resulting
- in uniform physical properties within each material.
-\end_layout
-
-\begin_layout Subsection
-Shear Displacement Example
-\end_layout
-
-\begin_layout Standard
-The first example problem is shearing of the mesh along the y-direction,
- with displacement boundary conditions applied on the planes corresponding
- to the minimum and maximum x-values.
- Parameter settings that override or augment those in 
-\family typewriter
-pylithapp.cfg
-\family default
- are contained in the file 
-\family typewriter
-step01.cfg
-\family default
-.
- These settings are:
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent Specifies an implicit formulation for the problem
- and specifies the array of boundary conditions.
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.implicit Specifies an array of two output managers,
- one for the full domain, and another for a subdomain corresponding to the
- ground surface.
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.bc.x_pos Specifies the boundary conditions for the
- right side of the mesh, defining which degrees of freedom are being constrained
- (
-\family typewriter
-x
-\family default
- and 
-\family typewriter
-y
-\family default
-), providing the label (defined in 
-\family typewriter
-tet4_1000m_binary.pset
-\family default
-) defining the points desired, assigning a label to the boundary condition
- set, and giving the name of the spatial database defining the boundary
- conditions (
-\family typewriter
-fixeddisp_shear.spatialdb
-\family default
-).
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.bc.x_neg Specifies the boundary conditions for the
- left side of the mesh, defining which degrees of freedom are being constrained
- (
-\family typewriter
-x
-\family default
- and 
-\family typewriter
-y
-\family default
-), providing the label (defined in 
-\family typewriter
-tet4_1000m_binary.
-\family default
-pset) defining the points desired, assigning a label to the boundary condition
- set, and giving the name of the spatial database defining the boundary
- conditions (
-\family typewriter
-fixeddisp_shear.spatialdb
-\family default
-).
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.bc.z_neg Specifies the boundary conditions for the
- bottom of the mesh, defining which degrees of freedom are being constrained
- (
-\family typewriter
-x
-\family default
- and 
-\family typewriter
-y
-\family default
-), providing the label (defined in 
-\family typewriter
-tet4_1000m_binary.
-\family default
-pset) defining the points desired, assigning a label to the boundary condition
- set, and giving the name of the spatial database defining the boundary
- conditions (
-\family typewriter
-fixeddisp_shear.spatialdb
-\family default
-).
-\end_layout
-
-\begin_layout Description
-pylithapp.problem.formulation.output.domain.writer Gives the base filename for
- VTK output over the entire domain (
-\family typewriter
-shearxy.vtk
-\family default
-).
-\end_layout
-
-\begin_layout Description
-pylithapp.problem.formulation.output.subdomain Gives the label of the nodeset
- defining the subdomain and gives the base filename for VTK output over
- the subdomain corresponding to the ground surface (
-\family typewriter
-step01-groundsurf.vtk
-\family default
-).
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.materials.elastic.output Gives the base filename for
- state variable output files for the 
-\family typewriter
-elastic
-\family default
- material set (
-\family typewriter
-step01-elastic.vtk
-\family default
-), and causes state variables to be averaged over all quadrature points
- in each cell.
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.materials.viscoelastic.output Gives the base filename
- for state variable output files for the 
-\family typewriter
-viscoelastic
-\family default
- material set (
-\family typewriter
-step01-viscoelastic.vtk
-\family default
-), and causes state variables to be averaged over all quadrature points
- in each cell.
-\end_layout
-
-\begin_layout Standard
-The values for the Dirichlet boundary conditions are described in the file
- 
-\family typewriter
-fixeddisp_shear.spatialdb
-\family default
-, as specified in 
-\family typewriter
-step01.cfg
-\family default
-.
- The format of all spatial database files is similar.
- Because data are being specified using two control points (rather than
- being uniform over the mesh, for example), the data dimension is one.
-\end_layout
-
-\begin_layout Standard
-The files containing common information (
-\family typewriter
-\size small
-tet4_1000m_binary.gmv
-\family default
-, 
-\family typewriter
-tet4_1000m_binary.pset
-\family default
-, 
-\family typewriter
-pylithapp.cfg
-\family default
-, 
-\family typewriter
-mat_elastic.spatialdb
-\family default
-\size default
-, and 
-\family typewriter
-mat_viscoelastic.spatialdb
-\family default
-) along with the problem-specific files (
-\family typewriter
-\size small
-step01.cfg
-\family default
- and 
-\family typewriter
-fixeddisp_shear.spatialdb
-\family default
-\size default
-) provide a complete description of the problem, and we can then run this
- example by typing
-\end_layout
-
-\begin_layout LyX-Code
-pylith step01.cfg
-\end_layout
-
-\begin_layout Standard
-Once the problem has run, six files will be produced.
- The first file is named 
-\family typewriter
-step01_t0000000.vtk
-\family default
-.
- The 
-\family typewriter
-t0000000
-\family default
- indicates that the output is for the first (and only) time step, corresponding
- to an elastic solution.
- This file contains mesh information as well as displacement values at the
- mesh vertices.
- The second file is named 
-\family typewriter
-step01-statevars-elastic_t0000000.vtk
-\family default
-.
- This file contains the state variables for each cell in the material group
- 
-\family typewriter
-elastic
-\family default
-.
- The default fields are the total strain and stress fields.
- These values are computed at each quadrature point in the cell.
- We have requested that the values be averaged over all quadrature points
- for each cell; however, since we only have a single quadrature point for
- each linear tetrahedron, this will have no effect.
- The third file (
-\family typewriter
-step01-statevars-viscoelastic_info.vtk
-\family default
-) gives the material properties used for the 
-\family typewriter
-viscoelastic
-\family default
- material set.
- Since we have not specified which properties to write, the default properties
- (
-\family typewriter
-mu
-\family default
-, 
-\family typewriter
-lambda
-\family default
-, 
-\family typewriter
-density
-\family default
-) are written.
- There are two additional files containing the state variables for each
- of the material sets.
- The final file (
-\family typewriter
-step01-groundsurf_t0000000.vtk
-\family default
-) is analogous to 
-\family typewriter
-step01_t0000000.vtk
-\family default
-, but in this case the results are only given for a subset of the mesh correspon
-ding to the ground surface.
- Also, the cells in this file are one dimension lower than the cells described
- in 
-\family typewriter
-step01_t0000000.vtk
-\family default
-, so they are triangles rather than tetrahedra.
- All of the 
-\family typewriter
-.vtk
-\family default
- files may be used with a number of visualization packages.
- If the problem ran correctly, you should be able to generate a figure such
- as Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:3dtet4-shear"
-
-\end_inset
-
-, which was generated using ParaView.
-\end_layout
-
-\begin_layout Standard
-\align center
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/shear.jpg
-	lyxscale 50
-	scale 45
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Color contours and vectors of displacement for the axial displacement example
- using a mesh composed of linear tetrahedral cells generated by LaGriT.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:3dtet4-shear"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection
-Alternative solver and discretization settings
-\end_layout
-
-\begin_layout Standard
-Example 
-\family typewriter
-step01.cfg
-\family default
- uses the additive Schwarz preconditioner in conjunction with a classical
- Gram-Schmidt orthogonalization iterative solver.
- This preconditioner works reasonably well but the number of iterations
- generally scales with problem size.
- Even this small, simple problem requires 24 iterations.
- In this example (
-\family typewriter
-step02.cfg
-\family default
-), we use a more sophisticated preconditioner that preconditions the degrees
- of freedom associated with the three Cartesian coordinates separately while
- using an algebraic multigrid algorithm (see Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:petsc:options"
-
-\end_inset
-
- for details).
- Additionally, we illustrate the use of global uniform mesh refinement to
- increase the resolution of the solution by a factor of two.
- Because the mesh is refined in parallel after distribution, this technique
- can be used to run a larger problem than would be possible if the full
- resolution mesh had to be generated by the mesh generator.
- LaGriT runs only in serial and CUBIT has extremely limited parallel mesh
- generation capabilities.
- Table 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "tab:3dtet4:solver:cmp"
-
-\end_inset
-
- shows the improved efficiency of the solver using the split fields with
- the algebraic multigrid preconditioner, especially as the problem size
- becomes larger.
- We have found similar results for other problems.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float table
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Caption
-
-\begin_layout Plain Layout
-\begin_inset CommandInset label
-LatexCommand label
-name "tab:3dtet4:solver:cmp"
-
-\end_inset
-
-Number of iterations in linear solve for the Shear Displacement and Kinematic
- Fault Slip problems discussed in this section.
- The preconditioner using split fields and an algebraic multigrid algorithm
- solves the linear system with fewer iterations with only a small to moderate
- increase as the problem size grows.
-\end_layout
-
-\end_inset
-
-
-\begin_inset Tabular
-<lyxtabular version="3" rows="9" columns="4">
-<features tabularvalignment="middle">
-<column alignment="center" valignment="top" width="1.5in">
-<column alignment="center" valignment="middle" width="1.25in">
-<column alignment="center" valignment="top" width="1.5in">
-<column alignment="center" valignment="top" width="1in">
-<row>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Problem
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Preconditioner
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-Refinement
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\series bold
-# Iterations in Solve
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell multirow="3" alignment="left" valignment="middle" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Shear Displacement
-\end_layout
-
-\end_inset
-</cell>
-<cell multirow="3" alignment="left" valignment="middle" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-additive Schwarz
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-none (546 DOF)
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-24 (step01)
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell multirow="4" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell multirow="4" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-2x refinement
-\end_layout
-
-\begin_layout Plain Layout
-(3890 DOF)
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-48
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell multirow="4" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell multirow="3" alignment="left" valignment="middle" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-split fields with algebraic multigrid
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-none (546 DOF)
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-12
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell multirow="4" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell multirow="4" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-2x refinement
-\end_layout
-
-\begin_layout Plain Layout
-(3890 DOF)
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-17 (step02)
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell multirow="3" alignment="left" valignment="middle" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Kinematic Fault Slip
-\end_layout
-
-\end_inset
-</cell>
-<cell multirow="3" alignment="left" valignment="middle" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-additive Schwarz
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-none (735 DOF)
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-35 (step03)
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell multirow="4" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell multirow="4" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-2x refinement
-\end_layout
-
-\begin_layout Plain Layout
-(4527 DOF)
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-83
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell multirow="4" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell multirow="3" alignment="left" valignment="middle" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-split fields with algebraic multigrid
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-none (735 DOF)
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-33
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell multirow="4" alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell multirow="4" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-2x refinement
-\end_layout
-
-\begin_layout Plain Layout
-(4527 DOF)
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-53 (step04)
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-The field splitting and algebraic multigrid preconditioning are setup in
- 
-\family typewriter
-step02.cfg
-\family default
- with the following parameters:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.formulation]
-\end_layout
-
-\begin_layout LyX-Code
-split_fields = True
-\end_layout
-
-\begin_layout LyX-Code
-matrix_type = aij
-\end_layout
-
-\begin_layout LyX-Code
-
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.petsc]
-\end_layout
-
-\begin_layout LyX-Code
-fs_pc_type = fieldsplit
-\end_layout
-
-\begin_layout LyX-Code
-fs_pc_fieldsplit_real_diagonal = 
-\end_layout
-
-\begin_layout LyX-Code
-fs_pc_fieldsplit_type = multiplicative
-\end_layout
-
-\begin_layout LyX-Code
-fs_fieldsplit_0_pc_type = ml
-\end_layout
-
-\begin_layout LyX-Code
-fs_fieldsplit_1_pc_type = ml
-\end_layout
-
-\begin_layout LyX-Code
-fs_fieldsplit_2_pc_type = ml
-\end_layout
-
-\begin_layout LyX-Code
-fs_fieldsplit_0_ksp_type = preonly
-\end_layout
-
-\begin_layout LyX-Code
-fs_fieldsplit_1_ksp_type = preonly
-\end_layout
-
-\begin_layout LyX-Code
-fs_fieldsplit_2_ksp_type = preonly
-\end_layout
-
-\begin_layout Standard
-The uniform global refinement requires changing just a single parameter:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.mesh_generator]
-\end_layout
-
-\begin_layout LyX-Code
-refiner = pylith.topology.RefineUniform
-\end_layout
-
-\begin_layout Subsection
-Kinematic Fault Slip Example
-\end_layout
-
-\begin_layout Standard
-The next example problem is a right-lateral fault slip applied on the vertical
- fault defined by 
-\family typewriter
-x = 0
-\family default
-.
- The left and right sides of the mesh are fixed in the 
-\family typewriter
-x
-\family default
-, 
-\family typewriter
-y
-\family default
-, and 
-\family typewriter
-z
-\family default
- directions.
- Parameter settings that override or augment those in 
-\family typewriter
-pylithapp.cfg
-\family default
- are contained in the file 
-\family typewriter
-step03.cfg
-\family default
-.
- These settings are:
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent Specifies an implicit formulation for the problem,
- the array of boundary conditions, and the array of interfaces.
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.implicit Specifies an array of two output managers,
- one for the full domain, and another for a subdomain corresponding to the
- ground surface.
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.bc.x_pos Specifies the boundary conditions for the
- right side of the mesh, defining which degrees of freedom are being constrained
- (
-\family typewriter
-x
-\family default
-, 
-\family typewriter
-y
-\family default
-, and 
-\family typewriter
-z
-\family default
-), providing the label (defined in 
-\family typewriter
-tet4_1000m_binary.
-\family default
-pset) defining the points desired, and assigning a label to the boundary
- condition set.
- Rather than specifying a spatial database file to define the boundary condition
-s, we use the default spatial database (ZeroDispDB) for the Dirichlet boundary
- condition, which sets the displacements to zero.
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.bc.x_neg Specifies the boundary conditions for the
- left side of the mesh, defining which degrees of freedom are being constrained
- (
-\family typewriter
-x
-\family default
-, 
-\family typewriter
-y
-\family default
-, and 
-\family typewriter
-z
-\family default
-), providing the label (defined in 
-\family typewriter
-tet4_1000m_binary.
-\family default
-pset) defining the points desired, and assigning a label to the boundary
- condition set.
- Rather than specifying a spatial database file to define the boundary condition
-s, we use the default spatial database (ZeroDispDB) for the Dirichlet boundary
- condition, which sets the displacements to zero.
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.interfaces Gives the label (defined in 
-\family typewriter
-tet4_1000m_binary.
-\family default
-pset) defining the points on the fault, provides quadrature information,
- and then gives database names for material properties (needed for conditioning)
-, fault slip, peak fault slip rate, and fault slip time.
-\end_layout
-
-\begin_layout Description
-pylithapp.problem.formulation.output.output.writer Gives the base filename for
- VTK output over the entire domain (
-\family typewriter
-step03.vtk
-\family default
-).
-\end_layout
-
-\begin_layout Description
-pylithapp.problem.formulation.output.subdomain Gives the label of the nodeset
- defining the subdomain and gives the base filename for VTK output over
- the subdomain corresponding to the ground surface (
-\family typewriter
-step03-groundsurf.vtk
-\family default
-).
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.interfaces.fault.output.writer Gives the base filename
- for cohesive cell output files (
-\family typewriter
-step03-fault.vtk
-\family default
-).
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.materials.elastic.output Gives the base filename for
- state variable output files for the 
-\family typewriter
-elastic
-\family default
- material set (
-\family typewriter
-step03-statevars-elastic.vtk
-\family default
-), and causes state variables to be averaged over all quadrature points
- in each cell.
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.materials.viscoelastic.output Gives the base filename
- for state variable output files for the 
-\family typewriter
-viscoelastic
-\family default
- material set (
-\family typewriter
-step03-statevars-viscoelastic.vtk
-\family default
-), and causes state variables to be averaged over all quadrature points
- in each cell.
-\end_layout
-
-\begin_layout Standard
-The fault example requires three additional database files that were not
- needed for the simple displacement example.
- The first file (
-\family typewriter
-finalslip.spatialdb
-\family default
-) specifies a constant value of 2 m of right-lateral fault slip that then
- tapers linearly to zero from 2 km to 4 km depth, and a linearly-varying
- amount of reverse slip, with a maximum of 0.25 m at the surface, linearly
- tapering to 0 m at 2 km depth.
- The data dimension is one since the data vary linearly along a vertical
- line.
- The default slip time function is a step-function, so we also must provide
- the time at which slip begins.
- The elastic solution is associated with advancing from 
-\begin_inset Formula $t=-dt$
-\end_inset
-
- to 
-\begin_inset Formula $t=0$
-\end_inset
-
-, so we set the slip initiation time for the step-function to 0 in 
-\family typewriter
-dislocation_sliptime.spatialdb
-\family default
-.
-\end_layout
-
-\begin_layout Standard
-The files containing common information (
-\family typewriter
-\size small
-tet4_1000m_binary.gmv
-\family default
-, 
-\family typewriter
-tet4_1000m_binary.pset
-\family default
-, 
-\family typewriter
-pylithapp.cfg
-\family default
-, 
-\family typewriter
-mat_elastic.spatialdb
-\family default
-\size default
-, and 
-\family typewriter
-mat_viscoelastic.spatialdb
-\family default
-) along with the problem-specific files (
-\family typewriter
-\size small
-step03.cfg
-\family default
-, 
-\family typewriter
-finalslip.spatialdb
-\family default
-, and 
-\family typewriter
-sliptime.spatialdb
-\family default
-\size default
-) provide a complete description of the problem, and we can then run this
- example by typing
-\end_layout
-
-\begin_layout LyX-Code
-pylith step03.cfg
-\end_layout
-
-\begin_layout Standard
-Once the problem has run, eight files will be produced.
- The first file is named 
-\family typewriter
-step03_t0000000.vtk
-\family default
-.
- The 
-\family typewriter
-t0000000
-\family default
- indicates that the output is for the first (and only) time step, corresponding
- to an elastic solution.
- This file contains mesh information as well as displacement values at the
- mesh vertices.
- The second file is named 
-\family typewriter
-step03-statevars-elastic_t0000000.vtk
-\family default
-.
- This file contains the state variables for each cell in the material group
- 
-\family typewriter
-elastic
-\family default
-.
- The default fields are the total strain and stress fields.
- We have requested that the values be averaged over all quadrature points
- for each cell; however, since we only have a single quadrature point for
- each linear tetrahedron, this will have no effect.
- The third file (
-\family typewriter
-step03-statevars-viscoelastic_info.vtk
-\family default
-) gives the material properties used for the 
-\family typewriter
-viscoelastic
-\family default
- material set.
- Since we have not specified which properties to write, the default properties
- (
-\family typewriter
-mu
-\family default
-, 
-\family typewriter
-lambda
-\family default
-, 
-\family typewriter
-density
-\family default
-) are written.
- There are two additional files containing the state variables for each
- of the material sets.
- The file 
-\family typewriter
-step03-groundsurf_t0000000.vtk
-\family default
- is analogous to 
-\family typewriter
-step03_t0000000.vtk
-\family default
-, but in this case the results are only given for a subset of the mesh correspon
-ding to the ground surface.
- Also, the cells in this file are one dimension lower than the cells described
- in 
-\family typewriter
-step03_t0000000.vtk
-\family default
-, so they are triangles rather than tetrahedra.
- The file 
-\family typewriter
-step03-fault_t0000000.vtk
-\family default
- gives the specified fault slip for each vertex on the fault, along with
- the computed traction change for the cohesive cell.
- The final file, 
-\family typewriter
-step03-fault_info.vtk
-\family default
-, provides information such as the normal direction, final slip, and slip
- time for each vertex on the fault.
- All of the 
-\family typewriter
-.vtk
-\family default
- files may be used with a number of visualization packages.
- If the problem ran correctly, you should be able to generate a figure such
- as Figure
-\begin_inset CommandInset ref
-LatexCommand vref
-reference "fig:3dtet-disloc"
-
-\end_inset
-
-, which was generated using ParaView.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/dislocation.jpg
-	lyxscale 50
-	scale 45
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Color contours and vectors of displacement for the kinematic fault example
- using a mesh composed of linear tetrahedral cells generated by LaGriT.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:3dtet-disloc"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection
-Alternative solver and discretization settings
-\end_layout
-
-\begin_layout Standard
-As we did for the Shear Dislocation examples, in 
-\family typewriter
-step04.cfg
-\family default
- we switch to using the splits fields and algebraic multigrid preconditioner
- along with global uniform mesh refinement.
- Because PyLith implements fault slip using Lagrange multipliers, we make
- a few small adjusments to the solver settings.
- As discussed in Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:petsc:options"
-
-\end_inset
-
-, we use a custom preconditioner for the Lagrange multiplier degrees of
- freedom when preconditioning with field splitting.
- Within 
-\family typewriter
-step04.cfg
-\family default
- we turn on the use of the custom preconditioner for the Lagrange multiplier
- degrees of freedom and add the corresponding settings for the fourth field
- for the algebraic multigrid algorithm,
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.formulation]
-\end_layout
-
-\begin_layout LyX-Code
-split_fields = True
-\end_layout
-
-\begin_layout LyX-Code
-use_custom_constraint_pc = True
-\end_layout
-
-\begin_layout LyX-Code
-matrix_type = aij
-\end_layout
-
-\begin_layout LyX-Code
-
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.petsc]
-\end_layout
-
-\begin_layout LyX-Code
-fs_pc_type = fieldsplit
-\end_layout
-
-\begin_layout LyX-Code
-fs_pc_fieldsplit_real_diagonal =
-\end_layout
-
-\begin_layout LyX-Code
-fs_pc_fieldsplit_type = multiplicative
-\end_layout
-
-\begin_layout LyX-Code
-fs_fieldsplit_0_pc_type = ml
-\end_layout
-
-\begin_layout LyX-Code
-fs_fieldsplit_1_pc_type = ml
-\end_layout
-
-\begin_layout LyX-Code
-fs_fieldsplit_2_pc_type = ml
-\end_layout
-
-\begin_layout LyX-Code
-fs_fieldsplit_3_pc_type = ml
-\end_layout
-
-\begin_layout LyX-Code
-fs_fieldsplit_0_ksp_type = preonly
-\end_layout
-
-\begin_layout LyX-Code
-fs_fieldsplit_1_ksp_type = preonly
-\end_layout
-
-\begin_layout LyX-Code
-fs_fieldsplit_2_ksp_type = preonly
-\end_layout
-
-\begin_layout LyX-Code
-fs_fieldsplit_3_ksp_type = preonly
-\end_layout
-
-\begin_layout Standard
-Table 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "tab:3dtet4:solver:cmp"
-
-\end_inset
-
- shows the improved efficiency of the solver using the split fields with
- the algebraic multigrid preconditioner.
-\end_layout
-
-\end_body
-\end_document
+#LyX 2.0 created this file. For more info see http://www.lyx.org/
+\lyxformat 413
+\begin_document
+\begin_header
+\textclass book
+\begin_preamble
+
+\end_preamble
+\use_default_options false
+\maintain_unincluded_children false
+\language english
+\language_package default
+\inputencoding latin1
+\fontencoding global
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry true
+\use_amsmath 0
+\use_esint 0
+\use_mhchem 1
+\use_mathdots 1
+\cite_engine basic
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\use_refstyle 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\leftmargin 1in
+\topmargin 1in
+\rightmargin 1in
+\bottommargin 2in
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\quotes_language english
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\end_header
+
+\begin_body
+
+\begin_layout Section
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Tutorial-3d-tet4"
+
+\end_inset
+
+Tutorial Using Tetrahedral Mesh Created by LaGriT
+\end_layout
+
+\begin_layout Standard
+PyLith features discussed in this tutorial:
+\end_layout
+
+\begin_layout Itemize
+Quasi-static solution
+\end_layout
+
+\begin_layout Itemize
+LaGriT mesh format
+\end_layout
+
+\begin_layout Itemize
+Dirichlet boundary conditions
+\end_layout
+
+\begin_layout Itemize
+Kinematic fault interface conditions
+\end_layout
+
+\begin_layout Itemize
+Linearly elastic isotropic material
+\end_layout
+
+\begin_layout Itemize
+Maxwell linear viscoelastic material
+\end_layout
+
+\begin_layout Itemize
+Specifying more than one material
+\end_layout
+
+\begin_layout Itemize
+VTK output
+\end_layout
+
+\begin_layout Itemize
+Linear tetrahedral cells
+\end_layout
+
+\begin_layout Itemize
+SimpleDB spatial database
+\end_layout
+
+\begin_layout Itemize
+ZeroDispDB spatial database
+\end_layout
+
+\begin_layout Itemize
+Custom algebraic multigrid preconditioner with split fields
+\end_layout
+
+\begin_layout Itemize
+Global uniform mesh refinement
+\end_layout
+
+\begin_layout Standard
+All of the files necessary to run the examples are contained in the directory
+ 
+\family typewriter
+examples/3d/tet4.
+\end_layout
+
+\begin_layout Subsection
+Overview
+\end_layout
+
+\begin_layout Standard
+This tutorial is a simple 3D example of a quasi-static finite element problem.
+ It is a mesh composed of 852 linear tetrahedra subject to displacement
+ boundary conditions.
+ This example demonstrates the usage of the LaGriT mesh generation package
+ 
+\begin_inset Flex URL
+status collapsed
+
+\begin_layout Plain Layout
+
+lagrit.lanl.gov
+\end_layout
+
+\end_inset
+
+ to create a mesh, as well as describing how to use a LaGriT-generated mesh
+ in PyLith.
+ In this tutorial, we will walk through the steps necessary to construct,
+ run, and visualize the results for two problems that use the same mesh.
+ For each of these problems we also consider a simulation using a custom
+ algebraic multigrid preconditioner with a globally uniformly refined mesh
+ that reduces the node spacing by a factor of two.
+ In addition to this manual, each of the files for the example problems
+ includes extensive comments.
+\end_layout
+
+\begin_layout Subsection
+Mesh Generation and Description
+\end_layout
+
+\begin_layout Standard
+The mesh for these examples is a simple rectangular prism (Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:3dtet4-mesh"
+
+\end_inset
+
+).
+ This mesh would be quite difficult to generate by hand, so we use the LaGriT
+ mesh generation package.
+ For this example, we provide a documented command file in 
+\family typewriter
+examples/3d/tet4.
+
+\family default
+ Examination of this command file should provide some insight into how to
+ use LaGriT with PyLith.
+ For more detailed information refer to the LaGriT website 
+\begin_inset Flex URL
+status collapsed
+
+\begin_layout Plain Layout
+
+lagrit.lanl.gov
+\end_layout
+
+\end_inset
+
+.
+ If you have LaGriT installed on your machine, you can use the command file
+ to create your own mesh.
+ Otherwise, you can use the mesh that has already been created.
+\end_layout
+
+\begin_layout Standard
+There are two ways to use the command file.
+ The simplest method is to go to the
+\family sans
+ 
+\family default
+examples directory (
+\family typewriter
+examples/3d/tet4
+\family default
+), start LaGriT, and then type:
+\end_layout
+
+\begin_layout LyX-Code
+input mesh_tet4_1000m.lagrit
+\end_layout
+
+\begin_layout Standard
+This will run the commands in that file, which will produce the necessary
+ files to run the example.
+ This method will create the mesh, but you will gain very little insight
+ into what is being done.
+ A more informative approach is to input each command directly.
+ That way, you will see what each command does.
+ You can simply copy and paste the commands from 
+\family typewriter
+mesh_tet4_1000m.lagrit
+\family default
+.
+ For example, the first six commands, which define the block shape, are
+\end_layout
+
+\begin_layout LyX-Code
+define / domain_xm / -3.0e+3
+\end_layout
+
+\begin_layout LyX-Code
+define / domain_xp /  3.0e+3
+\end_layout
+
+\begin_layout LyX-Code
+define / domain_ym / -3.0e+3
+\end_layout
+
+\begin_layout LyX-Code
+define / domain_yp /  3.0e+3
+\end_layout
+
+\begin_layout LyX-Code
+define / domain_zm / -4.0e+3
+\end_layout
+
+\begin_layout LyX-Code
+define / domain_zp /  0.0e+3 
+\end_layout
+
+\begin_layout Standard
+Continuing through the remainder of the commands in 
+\family typewriter
+mesh_tet4_1000m.lagrit
+\family default
+, you will eventually end up with the files 
+\family typewriter
+tet4_1000m_binary.gmv
+\family default
+, 
+\family typewriter
+tet4_1000m_ascii.gmv
+\family default
+, 
+\family typewriter
+tet4_1000m_ascii.pset
+\family default
+, and 
+\family typewriter
+tet4_1000m_binary.pset
+\family default
+.
+ The ASCII files are not actually needed, but we create them so users can
+ see what is contained in the files.
+ These files may also be used instead of the binary versions, if desired.
+ The 
+\family typewriter
+.gmv
+\family default
+ files define the mesh information, and they may be read directly by the
+ GMV 
+\begin_inset Flex URL
+status collapsed
+
+\begin_layout Plain Layout
+
+laws.lanl.gov/XCM/gmv/GMVHome.html
+\end_layout
+
+\end_inset
+
+ mesh visualization package.
+ The 
+\family typewriter
+.pset
+\family default
+ files specify the vertices corresponding to each set of vertices on a surface
+ used in the problem, including the fault as well as external boundaries
+ to which boundary conditions are applied.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/tet4-mesh.jpg
+	lyxscale 50
+	scale 45
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Mesh composed of linear tetrahedral cells generated by LaGriT used for the
+ example problems.
+ The different colors represent the different materials.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:3dtet4-mesh"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Additional Common Information
+\end_layout
+
+\begin_layout Standard
+In addition to the mesh, the example problems share additional information.
+ In such cases it is generally useful to create a file named 
+\family typewriter
+pylithapp.cfg
+\family default
+ in the run directory, since this file is read automatically every time
+ PyLith is run.
+ Settings specific to a particular problem may be placed in other 
+\family typewriter
+.cfg
+\family default
+ files, as described later, and then those files are placed on the command
+ line.
+  The settings contained in 
+\family typewriter
+pylithapp.cfg
+\family default
+ for this problem consist of:
+\end_layout
+
+\begin_layout Description
+pylithapp.journal.info Settings that control the verbosity of the output for
+ the different components.
+\end_layout
+
+\begin_layout Description
+pylithapp.mesh_generator Settings that control mesh importing, such as the
+ importer type, the filenames, and the spatial dimension of the mesh.
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent Settings that control the problem, such as the total
+ time, time-step size, and number of entries in the material array.
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.materials Settings that control the material type,
+ specify which material IDs are to be associated with a particular material
+ type, and give the name of the spatial database containing material parameters
+ for the mesh.
+ The quadrature information is also given.
+\end_layout
+
+\begin_layout Description
+pylithapp.petsc PETSc settings to use for the problem, such as the preconditioner
+ type.
+\end_layout
+
+\begin_layout Standard
+Since these examples use a mesh from LaGriT, we set the importer to 
+\family typewriter
+MeshIO
+\family default
+Lagrit:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.mesh_generator]
+\end_layout
+
+\begin_layout LyX-Code
+reader = pylith.meshio.MeshIOLagrit
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.mesh_generator.reader]
+\end_layout
+
+\begin_layout LyX-Code
+filename_gmv = mesh/tet4_1000m_binary.gmv
+\end_layout
+
+\begin_layout LyX-Code
+filename_pset = mesh/tet4_1000m_binary.pset
+\end_layout
+
+\begin_layout LyX-Code
+flip_endian = True
+\end_layout
+
+\begin_layout LyX-Code
+# record_header_32bit = False
+\end_layout
+
+\begin_layout Standard
+Notice that there are a couple of settings pertinent to binary files.
+ The first flag (
+\family typewriter
+flip_endian
+\family default
+) is used if the binary files were produced on a machine with a different
+ endianness than the machine on which they are being read.
+ If you get an error when attempting to run an example, you may need to
+ change the setting of this flag.
+ The second flag (
+\family typewriter
+record_header_32bit
+\family default
+) may need to be set to 
+\family typewriter
+False
+\family default
+ if the version of LaGriT being used has 64-bit Fortran record headers.
+ 
+\end_layout
+
+\begin_layout Standard
+This example differs from previous examples, because we specify two material
+ groups:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent]
+\end_layout
+
+\begin_layout LyX-Code
+materials = [elastic,viscoelastic]
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.materials.elastic]
+\end_layout
+
+\begin_layout LyX-Code
+label = Elastic material
+\end_layout
+
+\begin_layout LyX-Code
+id = 1
+\end_layout
+
+\begin_layout LyX-Code
+db.iohandler.filename = spatialdb/mat_elastic.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+quadrature.cell = pylith.feassemble.FIATSimplex
+\end_layout
+
+\begin_layout LyX-Code
+quadrature.cell.shape = tetrahedron
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.materials.viscoelastic]
+\end_layout
+
+\begin_layout LyX-Code
+label = Viscoelastic material
+\end_layout
+
+\begin_layout LyX-Code
+id = 2
+\end_layout
+
+\begin_layout LyX-Code
+db.iohandler.filename = spatialdb/mat_viscoelastic.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+quadrature.cell = pylith.feassemble.FIATSimplex
+\end_layout
+
+\begin_layout LyX-Code
+quadrature.cell.shape = tetrahedron
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Standard
+The two materials correspond to the two different colors in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:3dtet4-mesh"
+
+\end_inset
+
+.
+ Each material uses a different spatial database because the physical parameters
+ are different.
+ In generating the mesh within LaGriT, the mesh contains four materials
+ as a result of how LaGriT handles materials and interior interfaces.
+ Near the end of the LaGriT command file, we merge the materials on each
+ side of the fault into a single material to simplify the input and output
+ from PyLith.
+ For this example, values describing three-dimensional elastic material
+ properties are given by the single point in the spatial databases, resulting
+ in uniform physical properties within each material.
+\end_layout
+
+\begin_layout Subsection
+Shear Displacement Example
+\end_layout
+
+\begin_layout Standard
+The first example problem is shearing of the mesh along the y-direction,
+ with displacement boundary conditions applied on the planes corresponding
+ to the minimum and maximum x-values.
+ Parameter settings that override or augment those in 
+\family typewriter
+pylithapp.cfg
+\family default
+ are contained in the file 
+\family typewriter
+step01.cfg
+\family default
+.
+ These settings are:
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent Specifies an implicit formulation for the problem
+ and specifies the array of boundary conditions.
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.implicit Specifies an array of two output managers,
+ one for the full domain, and another for a subdomain corresponding to the
+ ground surface.
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.bc.x_pos Specifies the boundary conditions for the
+ right side of the mesh, defining which degrees of freedom are being constrained
+ (
+\family typewriter
+x
+\family default
+ and 
+\family typewriter
+y
+\family default
+), providing the label (defined in 
+\family typewriter
+tet4_1000m_binary.pset
+\family default
+) defining the points desired, assigning a label to the boundary condition
+ set, and giving the name of the spatial database defining the boundary
+ conditions (
+\family typewriter
+fixeddisp_shear.spatialdb
+\family default
+).
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.bc.x_neg Specifies the boundary conditions for the
+ left side of the mesh, defining which degrees of freedom are being constrained
+ (
+\family typewriter
+x
+\family default
+ and 
+\family typewriter
+y
+\family default
+), providing the label (defined in 
+\family typewriter
+tet4_1000m_binary.
+\family default
+pset) defining the points desired, assigning a label to the boundary condition
+ set, and giving the name of the spatial database defining the boundary
+ conditions (
+\family typewriter
+fixeddisp_shear.spatialdb
+\family default
+).
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.bc.z_neg Specifies the boundary conditions for the
+ bottom of the mesh, defining which degrees of freedom are being constrained
+ (
+\family typewriter
+x
+\family default
+ and 
+\family typewriter
+y
+\family default
+), providing the label (defined in 
+\family typewriter
+tet4_1000m_binary.
+\family default
+pset) defining the points desired, assigning a label to the boundary condition
+ set, and giving the name of the spatial database defining the boundary
+ conditions (
+\family typewriter
+fixeddisp_shear.spatialdb
+\family default
+).
+\end_layout
+
+\begin_layout Description
+pylithapp.problem.formulation.output.domain.writer Gives the base filename for
+ VTK output over the entire domain (
+\family typewriter
+shearxy.vtk
+\family default
+).
+\end_layout
+
+\begin_layout Description
+pylithapp.problem.formulation.output.subdomain Gives the label of the nodeset
+ defining the subdomain and gives the base filename for VTK output over
+ the subdomain corresponding to the ground surface (
+\family typewriter
+step01-groundsurf.vtk
+\family default
+).
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.materials.elastic.output Gives the base filename for
+ state variable output files for the 
+\family typewriter
+elastic
+\family default
+ material set (
+\family typewriter
+step01-elastic.vtk
+\family default
+), and causes state variables to be averaged over all quadrature points
+ in each cell.
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.materials.viscoelastic.output Gives the base filename
+ for state variable output files for the 
+\family typewriter
+viscoelastic
+\family default
+ material set (
+\family typewriter
+step01-viscoelastic.vtk
+\family default
+), and causes state variables to be averaged over all quadrature points
+ in each cell.
+\end_layout
+
+\begin_layout Standard
+The values for the Dirichlet boundary conditions are described in the file
+ 
+\family typewriter
+fixeddisp_shear.spatialdb
+\family default
+, as specified in 
+\family typewriter
+step01.cfg
+\family default
+.
+ The format of all spatial database files is similar.
+ Because data are being specified using two control points (rather than
+ being uniform over the mesh, for example), the data dimension is one.
+\end_layout
+
+\begin_layout Standard
+The files containing common information (
+\family typewriter
+\size small
+tet4_1000m_binary.gmv
+\family default
+, 
+\family typewriter
+tet4_1000m_binary.pset
+\family default
+, 
+\family typewriter
+pylithapp.cfg
+\family default
+, 
+\family typewriter
+mat_elastic.spatialdb
+\family default
+\size default
+, and 
+\family typewriter
+mat_viscoelastic.spatialdb
+\family default
+) along with the problem-specific files (
+\family typewriter
+\size small
+step01.cfg
+\family default
+ and 
+\family typewriter
+fixeddisp_shear.spatialdb
+\family default
+\size default
+) provide a complete description of the problem, and we can then run this
+ example by typing
+\end_layout
+
+\begin_layout LyX-Code
+pylith step01.cfg
+\end_layout
+
+\begin_layout Standard
+Once the problem has run, six files will be produced.
+ The first file is named 
+\family typewriter
+step01_t0000000.vtk
+\family default
+.
+ The 
+\family typewriter
+t0000000
+\family default
+ indicates that the output is for the first (and only) time step, corresponding
+ to an elastic solution.
+ This file contains mesh information as well as displacement values at the
+ mesh vertices.
+ The second file is named 
+\family typewriter
+step01-statevars-elastic_t0000000.vtk
+\family default
+.
+ This file contains the state variables for each cell in the material group
+ 
+\family typewriter
+elastic
+\family default
+.
+ The default fields are the total strain and stress fields.
+ These values are computed at each quadrature point in the cell.
+ We have requested that the values be averaged over all quadrature points
+ for each cell; however, since we only have a single quadrature point for
+ each linear tetrahedron, this will have no effect.
+ The third file (
+\family typewriter
+step01-statevars-viscoelastic_info.vtk
+\family default
+) gives the material properties used for the 
+\family typewriter
+viscoelastic
+\family default
+ material set.
+ Since we have not specified which properties to write, the default properties
+ (
+\family typewriter
+mu
+\family default
+, 
+\family typewriter
+lambda
+\family default
+, 
+\family typewriter
+density
+\family default
+) are written.
+ There are two additional files containing the state variables for each
+ of the material sets.
+ The final file (
+\family typewriter
+step01-groundsurf_t0000000.vtk
+\family default
+) is analogous to 
+\family typewriter
+step01_t0000000.vtk
+\family default
+, but in this case the results are only given for a subset of the mesh correspon
+ding to the ground surface.
+ Also, the cells in this file are one dimension lower than the cells described
+ in 
+\family typewriter
+step01_t0000000.vtk
+\family default
+, so they are triangles rather than tetrahedra.
+ All of the 
+\family typewriter
+.vtk
+\family default
+ files may be used with a number of visualization packages.
+ If the problem ran correctly, you should be able to generate a figure such
+ as Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:3dtet4-shear"
+
+\end_inset
+
+, which was generated using ParaView.
+\end_layout
+
+\begin_layout Standard
+\align center
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/shear.jpg
+	lyxscale 50
+	scale 45
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Color contours and vectors of displacement for the axial displacement example
+ using a mesh composed of linear tetrahedral cells generated by LaGriT.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:3dtet4-shear"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Alternative Solver and Discretization Settings
+\end_layout
+
+\begin_layout Standard
+Example 
+\family typewriter
+step01.cfg
+\family default
+ uses the additive Schwarz preconditioner in conjunction with a classical
+ Gram-Schmidt orthogonalization iterative solver.
+ This preconditioner works reasonably well but the number of iterations
+ generally scales with problem size.
+ Even this small, simple problem requires 24 iterations.
+ In this example (
+\family typewriter
+step02.cfg
+\family default
+), we use a more sophisticated preconditioner that preconditions the degrees
+ of freedom associated with the three Cartesian coordinates separately while
+ using an algebraic multigrid algorithm (see Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:petsc:options"
+
+\end_inset
+
+ for details).
+ Additionally, we illustrate the use of global uniform mesh refinement to
+ increase the resolution of the solution by a factor of two.
+ Because the mesh is refined in parallel after distribution, this technique
+ can be used to run a larger problem than would be possible if the full
+ resolution mesh had to be generated by the mesh generator.
+ LaGriT runs only in serial and CUBIT has extremely limited parallel mesh
+ generation capabilities.
+ Table 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "tab:3dtet4:solver:cmp"
+
+\end_inset
+
+ shows the improved efficiency of the solver using the split fields with
+ the algebraic multigrid preconditioner, especially as the problem size
+ becomes larger.
+ We have found similar results for other problems.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float table
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Caption
+
+\begin_layout Plain Layout
+\begin_inset CommandInset label
+LatexCommand label
+name "tab:3dtet4:solver:cmp"
+
+\end_inset
+
+Number of iterations in linear solve for the Shear Displacement and Kinematic
+ Fault Slip problems discussed in this section.
+ The preconditioner using split fields and an algebraic multigrid algorithm
+ solves the linear system with fewer iterations with only a small to moderate
+ increase as the problem size grows.
+\end_layout
+
+\end_inset
+
+
+\begin_inset Tabular
+<lyxtabular version="3" rows="9" columns="4">
+<features tabularvalignment="middle">
+<column alignment="center" valignment="top" width="1.5in">
+<column alignment="center" valignment="middle" width="1.25in">
+<column alignment="center" valignment="top" width="1.5in">
+<column alignment="center" valignment="top" width="1in">
+<row>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Problem
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Preconditioner
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+Refinement
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\series bold
+# Iterations in Solve
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multirow="3" alignment="left" valignment="middle" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Shear Displacement
+\end_layout
+
+\end_inset
+</cell>
+<cell multirow="3" alignment="left" valignment="middle" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+additive Schwarz
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+none (546 DOF)
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+24 (step01)
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multirow="4" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell multirow="4" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+2x refinement
+\end_layout
+
+\begin_layout Plain Layout
+(3890 DOF)
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+48
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multirow="4" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell multirow="3" alignment="left" valignment="middle" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+split fields with algebraic multigrid
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+none (546 DOF)
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+12
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multirow="4" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell multirow="4" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+2x refinement
+\end_layout
+
+\begin_layout Plain Layout
+(3890 DOF)
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+17 (step02)
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multirow="3" alignment="left" valignment="middle" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Kinematic Fault Slip
+\end_layout
+
+\end_inset
+</cell>
+<cell multirow="3" alignment="left" valignment="middle" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+additive Schwarz
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+none (735 DOF)
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+35 (step03)
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multirow="4" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell multirow="4" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+2x refinement
+\end_layout
+
+\begin_layout Plain Layout
+(4527 DOF)
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+83
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multirow="4" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell multirow="3" alignment="left" valignment="middle" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+split fields with algebraic multigrid
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+none (735 DOF)
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+33
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell multirow="4" alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell multirow="4" alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+2x refinement
+\end_layout
+
+\begin_layout Plain Layout
+(4527 DOF)
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+53 (step04)
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+The field splitting and algebraic multigrid preconditioning are set up in
+ 
+\family typewriter
+step02.cfg
+\family default
+ with the following parameters:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.formulation]
+\end_layout
+
+\begin_layout LyX-Code
+split_fields = True
+\end_layout
+
+\begin_layout LyX-Code
+matrix_type = aij
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.petsc]
+\end_layout
+
+\begin_layout LyX-Code
+fs_pc_type = fieldsplit
+\end_layout
+
+\begin_layout LyX-Code
+fs_pc_fieldsplit_real_diagonal = 
+\end_layout
+
+\begin_layout LyX-Code
+fs_pc_fieldsplit_type = multiplicative
+\end_layout
+
+\begin_layout LyX-Code
+fs_fieldsplit_0_pc_type = ml
+\end_layout
+
+\begin_layout LyX-Code
+fs_fieldsplit_1_pc_type = ml
+\end_layout
+
+\begin_layout LyX-Code
+fs_fieldsplit_2_pc_type = ml
+\end_layout
+
+\begin_layout LyX-Code
+fs_fieldsplit_0_ksp_type = preonly
+\end_layout
+
+\begin_layout LyX-Code
+fs_fieldsplit_1_ksp_type = preonly
+\end_layout
+
+\begin_layout LyX-Code
+fs_fieldsplit_2_ksp_type = preonly
+\end_layout
+
+\begin_layout Standard
+The uniform global refinement requires changing just a single parameter:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.mesh_generator]
+\end_layout
+
+\begin_layout LyX-Code
+refiner = pylith.topology.RefineUniform
+\end_layout
+
+\begin_layout Subsection
+Kinematic Fault Slip Example
+\end_layout
+
+\begin_layout Standard
+The next example problem is a right-lateral fault slip applied on the vertical
+ fault defined by 
+\family typewriter
+x = 0
+\family default
+.
+ The left and right sides of the mesh are fixed in the 
+\family typewriter
+x
+\family default
+, 
+\family typewriter
+y
+\family default
+, and 
+\family typewriter
+z
+\family default
+ directions.
+ Parameter settings that override or augment those in 
+\family typewriter
+pylithapp.cfg
+\family default
+ are contained in the file 
+\family typewriter
+step03.cfg
+\family default
+.
+ These settings are:
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent Specifies an implicit formulation for the problem,
+ the array of boundary conditions, and the array of interfaces.
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.implicit Specifies an array of two output managers,
+ one for the full domain, and another for a subdomain corresponding to the
+ ground surface.
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.bc.x_pos Specifies the boundary conditions for the
+ right side of the mesh, defining which degrees of freedom are being constrained
+ (
+\family typewriter
+x
+\family default
+, 
+\family typewriter
+y
+\family default
+, and 
+\family typewriter
+z
+\family default
+), providing the label (defined in 
+\family typewriter
+tet4_1000m_binary.pset
+\family default
+) defining the points desired, and assigning a label to the boundary condition
+ set.
+ Rather than specifying a spatial database file to define the boundary condition
+s, we use the default spatial database (ZeroDispDB) for the Dirichlet boundary
+ condition, which sets the displacements to zero.
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.bc.x_neg Specifies the boundary conditions for the
+ left side of the mesh, defining which degrees of freedom are being constrained
+ (
+\family typewriter
+x
+\family default
+, 
+\family typewriter
+y
+\family default
+, and 
+\family typewriter
+z
+\family default
+), providing the label (defined in 
+\family typewriter
+tet4_1000m_binary.pset
+\family default
+) defining the points desired, and assigning a label to the boundary condition
+ set.
+ Rather than specifying a spatial database file to define the boundary condition
+s, we use the default spatial database (ZeroDispDB) for the Dirichlet boundary
+ condition, which sets the displacements to zero.
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.interfaces Gives the label (defined in 
+\family typewriter
+tet4_1000m_binary.pset
+\family default
+) defining the points on the fault, provides quadrature information, and
+ then gives database names for material properties (needed for conditioning),
+ fault slip, peak fault slip rate, and fault slip time.
+\end_layout
+
+\begin_layout Description
+pylithapp.problem.formulation.output.output.writer Gives the base filename for
+ VTK output over the entire domain (
+\family typewriter
+step03.vtk
+\family default
+).
+\end_layout
+
+\begin_layout Description
+pylithapp.problem.formulation.output.subdomain Gives the label of the nodeset
+ defining the subdomain and gives the base filename for VTK output over
+ the subdomain corresponding to the ground surface (
+\family typewriter
+step03-groundsurf.vtk
+\family default
+).
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.interfaces.fault.output.writer Gives the base filename
+ for cohesive cell output files (
+\family typewriter
+step03-fault.vtk
+\family default
+).
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.materials.elastic.output Gives the base filename for
+ state variable output files for the 
+\family typewriter
+elastic
+\family default
+ material set (
+\family typewriter
+step03-statevars-elastic.vtk
+\family default
+), and causes state variables to be averaged over all quadrature points
+ in each cell.
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.materials.viscoelastic.output Gives the base filename
+ for state variable output files for the 
+\family typewriter
+viscoelastic
+\family default
+ material set (
+\family typewriter
+step03-statevars-viscoelastic.vtk
+\family default
+), and causes state variables to be averaged over all quadrature points
+ in each cell.
+\end_layout
+
+\begin_layout Standard
+The fault example requires three additional database files that were not
+ needed for the simple displacement example.
+ The first file (
+\family typewriter
+finalslip.spatialdb
+\family default
+) specifies a constant value of 2 m of right-lateral fault slip that then
+ tapers linearly to zero from 2 km to 4 km depth, and a linearly-varying
+ amount of reverse slip, with a maximum of 0.25 m at the surface, linearly
+ tapering to 0 m at 2 km depth.
+ The data dimension is one since the data vary linearly along a vertical
+ line.
+ The default slip time function is a step-function, so we also must provide
+ the time at which slip begins.
+ The elastic solution is associated with advancing from 
+\begin_inset Formula $t=-dt$
+\end_inset
+
+ to 
+\begin_inset Formula $t=0$
+\end_inset
+
+, so we set the slip initiation time for the step-function to 0 in 
+\family typewriter
+dislocation_sliptime.spatialdb
+\family default
+.
+\end_layout
+
+\begin_layout Standard
+The files containing common information (
+\family typewriter
+\size small
+tet4_1000m_binary.gmv
+\family default
+, 
+\family typewriter
+tet4_1000m_binary.pset
+\family default
+, 
+\family typewriter
+pylithapp.cfg
+\family default
+, 
+\family typewriter
+mat_elastic.spatialdb
+\family default
+\size default
+, and 
+\family typewriter
+mat_viscoelastic.spatialdb
+\family default
+) along with the problem-specific files (
+\family typewriter
+\size small
+step03.cfg
+\family default
+, 
+\family typewriter
+finalslip.spatialdb
+\family default
+, and 
+\family typewriter
+sliptime.spatialdb
+\family default
+\size default
+) provide a complete description of the problem, and we can then run this
+ example by typing
+\end_layout
+
+\begin_layout LyX-Code
+pylith step03.cfg
+\end_layout
+
+\begin_layout Standard
+Once the problem has run, eight files will be produced.
+ The first file is named 
+\family typewriter
+step03_t0000000.vtk
+\family default
+.
+ The 
+\family typewriter
+t0000000
+\family default
+ indicates that the output is for the first (and only) time step, corresponding
+ to an elastic solution.
+ This file contains mesh information as well as displacement values at the
+ mesh vertices.
+ The second file is named 
+\family typewriter
+step03-statevars-elastic_t0000000.vtk
+\family default
+.
+ This file contains the state variables for each cell in the material group
+ 
+\family typewriter
+elastic
+\family default
+.
+ The default fields are the total strain and stress fields.
+ We have requested that the values be averaged over all quadrature points
+ for each cell; however, since we only have a single quadrature point for
+ each linear tetrahedron, this will have no effect.
+ The third file (
+\family typewriter
+step03-statevars-viscoelastic_info.vtk
+\family default
+) gives the material properties used for the 
+\family typewriter
+viscoelastic
+\family default
+ material set.
+ Since we have not specified which properties to write, the default properties
+ (
+\family typewriter
+mu
+\family default
+, 
+\family typewriter
+lambda
+\family default
+, 
+\family typewriter
+density
+\family default
+) are written.
+ There are two additional files containing the state variables for each
+ of the material sets.
+ The file 
+\family typewriter
+step03-groundsurf_t0000000.vtk
+\family default
+ is analogous to 
+\family typewriter
+step03_t0000000.vtk
+\family default
+, but in this case the results are only given for a subset of the mesh correspon
+ding to the ground surface.
+ Also, the cells in this file are one dimension lower than the cells described
+ in 
+\family typewriter
+step03_t0000000.vtk
+\family default
+, so they are triangles rather than tetrahedra.
+ The file 
+\family typewriter
+step03-fault_t0000000.vtk
+\family default
+ gives the specified fault slip for each vertex on the fault, along with
+ the computed traction change for the cohesive cell.
+ The final file, 
+\family typewriter
+step03-fault_info.vtk
+\family default
+, provides information such as the normal direction, final slip, and slip
+ time for each vertex on the fault.
+ All of the 
+\family typewriter
+.vtk
+\family default
+ files may be used with a number of visualization packages.
+ If the problem ran correctly, you should be able to generate a figure such
+ as Figure
+\begin_inset CommandInset ref
+LatexCommand vref
+reference "fig:3dtet-disloc"
+
+\end_inset
+
+, which was generated using ParaView.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/dislocation.jpg
+	lyxscale 50
+	scale 45
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Color contours and vectors of displacement for the kinematic fault example
+ using a mesh composed of linear tetrahedral cells generated by LaGriT.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:3dtet-disloc"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Alternative Solver and Discretization Settings
+\end_layout
+
+\begin_layout Standard
+As we did for the Shear Dislocation examples, in 
+\family typewriter
+step04.cfg
+\family default
+ we switch to using the split fields and algebraic multigrid preconditioner
+ along with global uniform mesh refinement.
+ Because PyLith implements fault slip using Lagrange multipliers, we make
+ a few small adjusments to the solver settings.
+ As discussed in Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:petsc:options"
+
+\end_inset
+
+, we use a custom preconditioner for the Lagrange multiplier degrees of
+ freedom when preconditioning with field splitting.
+ Within 
+\family typewriter
+step04.cfg
+\family default
+ we turn on the use of the custom preconditioner for the Lagrange multiplier
+ degrees of freedom and add the corresponding settings for the fourth field
+ for the algebraic multigrid algorithm,
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.formulation]
+\end_layout
+
+\begin_layout LyX-Code
+split_fields = True
+\end_layout
+
+\begin_layout LyX-Code
+use_custom_constraint_pc = True
+\end_layout
+
+\begin_layout LyX-Code
+matrix_type = aij
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.petsc]
+\end_layout
+
+\begin_layout LyX-Code
+fs_pc_type = fieldsplit
+\end_layout
+
+\begin_layout LyX-Code
+fs_pc_fieldsplit_real_diagonal =
+\end_layout
+
+\begin_layout LyX-Code
+fs_pc_fieldsplit_type = multiplicative
+\end_layout
+
+\begin_layout LyX-Code
+fs_fieldsplit_0_pc_type = ml
+\end_layout
+
+\begin_layout LyX-Code
+fs_fieldsplit_1_pc_type = ml
+\end_layout
+
+\begin_layout LyX-Code
+fs_fieldsplit_2_pc_type = ml
+\end_layout
+
+\begin_layout LyX-Code
+fs_fieldsplit_3_pc_type = ml
+\end_layout
+
+\begin_layout LyX-Code
+fs_fieldsplit_0_ksp_type = preonly
+\end_layout
+
+\begin_layout LyX-Code
+fs_fieldsplit_1_ksp_type = preonly
+\end_layout
+
+\begin_layout LyX-Code
+fs_fieldsplit_2_ksp_type = preonly
+\end_layout
+
+\begin_layout LyX-Code
+fs_fieldsplit_3_ksp_type = preonly
+\end_layout
+
+\begin_layout Standard
+Table 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "tab:3dtet4:solver:cmp"
+
+\end_inset
+
+ shows the improved efficiency of the solver using the split fields with
+ the algebraic multigrid preconditioner.
+\end_layout
+
+\end_body
+\end_document

Copied: short/3D/PyLith/trunk/doc/userguide/tutorials/greensfns2d (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/doc/userguide/tutorials/greensfns2d)

Modified: short/3D/PyLith/trunk/doc/userguide/tutorials/shearwave/hex8.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/tutorials/shearwave/hex8.lyx	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/doc/userguide/tutorials/shearwave/hex8.lyx	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,284 +1,288 @@
-#LyX 2.0 created this file. For more info see http://www.lyx.org/
-\lyxformat 413
-\begin_document
-\begin_header
-\textclass book
-\begin_preamble
-
-\end_preamble
-\use_default_options false
-\maintain_unincluded_children false
-\language english
-\language_package default
-\inputencoding latin1
-\fontencoding global
-\font_roman default
-\font_sans default
-\font_typewriter default
-\font_default_family default
-\use_non_tex_fonts false
-\font_sc false
-\font_osf false
-\font_sf_scale 100
-\font_tt_scale 100
-
-\graphics default
-\default_output_format default
-\output_sync 0
-\bibtex_command default
-\index_command default
-\paperfontsize default
-\spacing single
-\use_hyperref false
-\papersize default
-\use_geometry true
-\use_amsmath 0
-\use_esint 0
-\use_mhchem 1
-\use_mathdots 1
-\cite_engine basic
-\use_bibtopic false
-\use_indices false
-\paperorientation portrait
-\suppress_date false
-\use_refstyle 0
-\index Index
-\shortcut idx
-\color #008000
-\end_index
-\leftmargin 1in
-\topmargin 1in
-\rightmargin 1in
-\bottommargin 1in
-\secnumdepth 3
-\tocdepth 3
-\paragraph_separation indent
-\paragraph_indentation default
-\quotes_language english
-\papercolumns 1
-\papersides 1
-\paperpagestyle default
-\tracking_changes false
-\output_changes false
-\html_math_output 0
-\html_css_as_file 0
-\html_be_strict false
-\end_header
-
-\begin_body
-
-\begin_layout Section
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:tutorial:shearwave:hex8"
-
-\end_inset
-
-3-D Bar Discretized with Hexahedra
-\end_layout
-
-\begin_layout Standard
-PyLith features discussed in this tutorial:
-\end_layout
-
-\begin_layout Itemize
-Dynamic solution
-\end_layout
-
-\begin_layout Itemize
-CUBIT mesh format
-\end_layout
-
-\begin_layout Itemize
-Absorbing dampers boundary conditions
-\end_layout
-
-\begin_layout Itemize
-Kinematic fault interface conditions
-\end_layout
-
-\begin_layout Itemize
-Elastic isotropic linearly elastic material
-\end_layout
-
-\begin_layout Itemize
-VTK output
-\end_layout
-
-\begin_layout Itemize
-Linear hexahedral cells
-\end_layout
-
-\begin_layout Itemize
-SimpleDB spatial database
-\end_layout
-
-\begin_layout Itemize
-ZeroDispDB spatial database
-\end_layout
-
-\begin_layout Standard
-All of the files necessary to run the examples are contained in the directory
- 
-\family typewriter
-examples/bar_shearwave/hex8.
-\end_layout
-
-\begin_layout Subsection
-Mesh Generation
-\end_layout
-
-\begin_layout Standard
-The mesh is a simple rectangular prism 8 km by 400 m by 400m (Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:shearwave:hex8:mesh"
-
-\end_inset
-
-).
- This mesh could be generated via a simple script, but it is even easier
- to generate this mesh using CUBIT.
- We provide documented CUBIT journal files in 
-\family typewriter
-examples/bar_shearwave/hex8.
-
-\family default
- We first create the geometry, mesh the domain using hexahedral cells, and
- then create blocks and nodesets associated with the materials and boundary
- conditions.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/hex8mesh.jpg
-	lyxscale 50
-	scale 50
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Mesh composed of hexahedral cells generated by CUBIT used for the example
- problem.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:shearwave:hex8:mesh"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Simulation Parameters
-\end_layout
-
-\begin_layout Standard
-The simulation parameters match those in the tri3 and tet4 examples.
- As in the tet4 example, we fix both the longitudinal degree of freedom
- and the out-of-plane transverse degree of freedom.
- Using eight-point quadrature permits use of a time step of 1/20 s, which
- is slightly larger than the time step of 1/30 s used in the tri3 and tet4
- simulations.
- All of the parameters are set in the pylithapp.cfg file.
- To run the problem, simply run PyLith without any command line arguments:
-\end_layout
-
-\begin_layout LyX-Code
-pylith
-\end_layout
-
-\begin_layout Standard
-The VTK files will be written to the 
-\family typewriter
-output
-\family default
- directory.
- The output includes the displacement and velocity fields over the entire
- domain at every other time step (0.10 s), the slip and change in traction
- vectors on the fault surface in along-strike and normal directions at every
- other time step (0.10 s), and the strain and stress tensors for each cell
- at every 20th time step (1.0 s).
- If the problem ran correctly, you should be able to generate a figure such
- as Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:shearwave:hex8:deform"
-
-\end_inset
-
-, which was generated using ParaView.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/hex8deform30.jpg
-	lyxscale 50
-	scale 50
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Displacement field in the bar at 3.0 s.
- Deformation has been exaggerated by a factor of 800.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:shearwave:hex8:deform"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_body
-\end_document
+#LyX 2.0 created this file. For more info see http://www.lyx.org/
+\lyxformat 413
+\begin_document
+\begin_header
+\textclass book
+\begin_preamble
+
+\end_preamble
+\use_default_options false
+\maintain_unincluded_children false
+\language english
+\language_package default
+\inputencoding latin1
+\fontencoding global
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry true
+\use_amsmath 0
+\use_esint 0
+\use_mhchem 1
+\use_mathdots 1
+\cite_engine basic
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\use_refstyle 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\leftmargin 1in
+\topmargin 1in
+\rightmargin 1in
+\bottommargin 1in
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\quotes_language english
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\end_header
+
+\begin_body
+
+\begin_layout Section
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:tutorial:shearwave:hex8"
+
+\end_inset
+
+3-D Bar Discretized with Hexahedra
+\end_layout
+
+\begin_layout Standard
+PyLith features discussed in this tutorial:
+\end_layout
+
+\begin_layout Itemize
+Dynamic solution
+\end_layout
+
+\begin_layout Itemize
+CUBIT mesh format
+\end_layout
+
+\begin_layout Itemize
+Absorbing dampers boundary conditions
+\end_layout
+
+\begin_layout Itemize
+Kinematic fault interface conditions
+\end_layout
+
+\begin_layout Itemize
+Elastic isotropic linearly elastic material
+\end_layout
+
+\begin_layout Itemize
+VTK output
+\end_layout
+
+\begin_layout Itemize
+Linear hexahedral cells
+\end_layout
+
+\begin_layout Itemize
+SimpleDB spatial database
+\end_layout
+
+\begin_layout Itemize
+ZeroDispDB spatial database
+\end_layout
+
+\begin_layout Standard
+All of the files necessary to run the examples are contained in the directory
+ 
+\family typewriter
+examples/bar_shearwave/hex8.
+\end_layout
+
+\begin_layout Subsection
+Mesh Generation
+\end_layout
+
+\begin_layout Standard
+The mesh is a simple rectangular prism 8 km by 400 m by 400 m (Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:shearwave:hex8:mesh"
+
+\end_inset
+
+).
+ This mesh could be generated via a simple script, but it is even easier
+ to generate this mesh using CUBIT.
+ We provide documented CUBIT journal files in 
+\family typewriter
+examples/bar_shearwave/hex8.
+
+\family default
+ We first create the geometry, mesh the domain using hexahedral cells, and
+ then create blocks and nodesets associated with the materials and boundary
+ conditions.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/hex8mesh.jpg
+	lyxscale 50
+	scale 50
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Mesh composed of hexahedral cells generated by CUBIT used for the example
+ problem.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:shearwave:hex8:mesh"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Simulation Parameters
+\end_layout
+
+\begin_layout Standard
+The simulation parameters match those in the tri3 and tet4 examples.
+ As in the tet4 example, we fix both the longitudinal degree of freedom
+ and the out-of-plane transverse degree of freedom.
+ Using eight-point quadrature permits use of a time step of 1/20 s, which
+ is slightly larger than the time step of 1/30 s used in the tri3 and tet4
+ simulations.
+ All of the parameters are set in the 
+\family typewriter
+pylithapp.cfg
+\family default
+ file.
+ To run the problem, simply run PyLith without any command line arguments:
+\end_layout
+
+\begin_layout LyX-Code
+pylith
+\end_layout
+
+\begin_layout Standard
+The VTK files will be written to the 
+\family typewriter
+output
+\family default
+ directory.
+ The output includes the displacement and velocity fields over the entire
+ domain at every other time step (0.10 s), the slip and change in traction
+ vectors on the fault surface in along-strike and normal directions at every
+ other time step (0.10 s), and the strain and stress tensors for each cell
+ at every 20th time step (1.0 s).
+ If the problem ran correctly, you should be able to generate a figure such
+ as Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:shearwave:hex8:deform"
+
+\end_inset
+
+, which was generated using ParaView.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/hex8deform30.jpg
+	lyxscale 50
+	scale 50
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Displacement field in the bar at 3.0 s.
+ Deformation has been exaggerated by a factor of 800.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:shearwave:hex8:deform"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document

Modified: short/3D/PyLith/trunk/doc/userguide/tutorials/shearwave/quad4.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/tutorials/shearwave/quad4.lyx	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/doc/userguide/tutorials/shearwave/quad4.lyx	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,690 +1,704 @@
-#LyX 2.0 created this file. For more info see http://www.lyx.org/
-\lyxformat 413
-\begin_document
-\begin_header
-\textclass book
-\begin_preamble
-
-\end_preamble
-\use_default_options false
-\maintain_unincluded_children false
-\language english
-\language_package default
-\inputencoding latin1
-\fontencoding global
-\font_roman default
-\font_sans default
-\font_typewriter default
-\font_default_family default
-\use_non_tex_fonts false
-\font_sc false
-\font_osf false
-\font_sf_scale 100
-\font_tt_scale 100
-
-\graphics default
-\default_output_format default
-\output_sync 0
-\bibtex_command default
-\index_command default
-\paperfontsize default
-\spacing single
-\use_hyperref false
-\papersize default
-\use_geometry true
-\use_amsmath 0
-\use_esint 0
-\use_mhchem 1
-\use_mathdots 1
-\cite_engine basic
-\use_bibtopic false
-\use_indices false
-\paperorientation portrait
-\suppress_date false
-\use_refstyle 0
-\index Index
-\shortcut idx
-\color #008000
-\end_index
-\leftmargin 1in
-\topmargin 1in
-\rightmargin 1in
-\bottommargin 1in
-\secnumdepth 3
-\tocdepth 3
-\paragraph_separation indent
-\paragraph_indentation default
-\quotes_language english
-\papercolumns 1
-\papersides 1
-\paperpagestyle default
-\tracking_changes false
-\output_changes false
-\html_math_output 0
-\html_css_as_file 0
-\html_be_strict false
-\end_header
-
-\begin_body
-
-\begin_layout Section
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:tutorial:shearwave:quad4"
-
-\end_inset
-
-3-D Bar Discretized with Quadrilaterals
-\end_layout
-
-\begin_layout Standard
-PyLith features discussed in this tutorial:
-\end_layout
-
-\begin_layout Itemize
-Dynamic solution
-\end_layout
-
-\begin_layout Itemize
-CUBIT mesh format
-\end_layout
-
-\begin_layout Itemize
-Absorbing dampers boundary conditions
-\end_layout
-
-\begin_layout Itemize
-Kinematic fault interface conditions
-\end_layout
-
-\begin_layout Itemize
-Dynamic fault interface conditions
-\end_layout
-
-\begin_layout Itemize
-Plane strain linearly elastic material
-\end_layout
-
-\begin_layout Itemize
-VTK output
-\end_layout
-
-\begin_layout Itemize
-Linear quadrilateral cells
-\end_layout
-
-\begin_layout Itemize
-SimpleDB spatial database
-\end_layout
-
-\begin_layout Itemize
-ZeroDispDB spatial database
-\end_layout
-
-\begin_layout Itemize
-UniformDB spatial database
-\end_layout
-
-\begin_layout Standard
-All of the files necessary to run the examples are contained in the directory
- 
-\family typewriter
-examples/bar_shearwave/quad4.
-\end_layout
-
-\begin_layout Subsection
-Mesh Generation
-\end_layout
-
-\begin_layout Standard
-The mesh is a simple rectangular prism 8 km by 400 m by 400m (Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:shearwave:quad4:mesh"
-
-\end_inset
-
-).
- We provide documented CUBIT journal files in 
-\family typewriter
-examples/bar_shearwave/quad4.
-
-\family default
- We first create the geometry, mesh the domain using quadrilateral cells,
- and then create blocks and nodesets associated with the materials and boundary
- conditions.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/quad4mesh.jpg
-	lyxscale 50
-	scale 50
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Mesh composed of hexahedral cells generated by CUBIT used for the example
- problem.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:shearwave:quad4:mesh"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Kinematic Fault
-\end_layout
-
-\begin_layout Standard
-The simulation parameters match those in the tri3, tet4, and hex8 examples.
- Using four-point quadrature permits use of a time step of 1/20 s, which
- is slightly larger than the time step of 1/30 s used in the tri3 and tet4
- simulations.
- In contrast to the tri3, tet4, and hex8 shear wave examples which only
- contained a single simulation in a directory, in this example we consider
- several different simulations.
- Consequently, we separate the parameters into multiple 
-\family typewriter
-.cfg
-\family default
- files.
- The parameters common parameters are placed in 
-\family typewriter
-pylithapp.cfg
-\family default
- with the parameters specific to the kinematic fault example in 
-\family typewriter
-kinematic.cfg
-\family default
-.
- To run the problem, simply run PyLith via:
-\end_layout
-
-\begin_layout LyX-Code
-pylith kinematic.cfg
-\end_layout
-
-\begin_layout Standard
-The VTK files will be written to the 
-\family typewriter
-output
-\family default
- directory with the prefix 
-\family typewriter
-kinematic
-\family default
-.
- The output includes the displacement field over the entire domain at every
- other time step (0.10 s), the slip and traction vectors on the fault surface
- in along-strike and normal directions at every other time step (0.10 s),
- and the strain and stress tensors for each cell at every 20th time step
- (1.0 s).
- If the problem ran correctly, you should be able to generate a figure such
- as Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:shearwave:quad4:kinematic"
-
-\end_inset
-
-, which was generated using ParaView.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/quad4kinematic30.jpg
-	lyxscale 50
-	scale 50
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Displacement field in the bar at 3.0 s.
- Deformation has been exaggerated by a factor of 800.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:shearwave:quad4:kinematic"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Dynamic Fault
-\end_layout
-
-\begin_layout Standard
-In this set of examples we replace the kinematic fault interface with the
- dynamic fault interface, resulting in fault slip controlled by a fault-constitu
-tive model.
- See Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sub:Fault-Constitutive-Models"
-
-\end_inset
-
- for detailed information about the fault constitutive models available
- in PyLith.
- Because this is a dynamic simulation we want the generated shear wave to
- continue to be absorbed at the ends of the bar, so we drive the fault by
- imposing initial tractions directly on the fault surface rather than through
- deformation within the bar.
- We employ a UniformDB object to specify 6.1 MPa of right-lateral shear and
- 10.0 MPa of normal compression for the initial fault tractions.
- The parameters common to the dynamic fault simulations are in 
-\family typewriter
-dynamic.cfg
-\family default
-.
- We use the explicit time-stepping with a lumped Jacobian matrix.
- We also request that the fault output include slip, slip rate, and traction
- fields:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.interfaces.fault.output]
-\end_layout
-
-\begin_layout LyX-Code
-vertex_data_fields = [slip,slip_rate,traction]
-\end_layout
-
-\begin_layout Subsubsection
-Dynamic Fault with Static Friction
-\end_layout
-
-\begin_layout Standard
-The parameters specific to this example are related to the use of the static
- friction fault constitutive model.
- We set the fault constitutive model via
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.interfaces.fault]
-\end_layout
-
-\begin_layout LyX-Code
-friction = pylith.friction.StaticFriction
-\end_layout
-
-\begin_layout Standard
-and use a UniformDB to set the static friction parameters.
- We use a coefficient of friction of 0.6 and no cohesion (0 MPa).
- The parameters specific to this example are in 
-\family typewriter
-dynamic_staticfriction.cfg
-\family default
-, so we run the problem via:
-\end_layout
-
-\begin_layout LyX-Code
-pylith dynamic.cfg dynamic_staticfriction.cfg
-\end_layout
-
-\begin_layout Standard
-The VTK files will be written to the 
-\family typewriter
-output
-\family default
- directory with the prefix 
-\family typewriter
-staticfriction
-\family default
-.
- The output includes the displacement and velocity fields over the entire
- domain at every other time step (0.10 s), the slip, slip rate, and traction
- vectors on the fault surface in along-strike and normal directions at every
- other time step (0.10 s), and the strain and stress tensors for each cell
- at every 20th time step (1.0 s).
- If the problem ran correctly, you should be able to generate a figure such
- as Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:shearwave:quad4:staticfriction"
-
-\end_inset
-
-, which was generated using ParaView.
- The steady-state solution is a constant slip rate of 0.08 m/s, a shear traction
- of 6.0 MPa on the fault surface, and a uniform shear strain of 2e-5 in the
- bar with uniform, constant velocities in the y-direction of +0.04 m/s and
- -0.04 m/s on the -x and +x sides of the fault, respectively.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/quad4staticfriction30.jpg
-	lyxscale 50
-	scale 50
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Velocity field in the bar at 3.0 s for the static friction fault constitutive
- model.
- Deformation has been exaggerated by a factor of 800.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:shearwave:quad4:staticfriction"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection
-Dynamic Fault with Slip-Weakening Friction
-\end_layout
-
-\begin_layout Standard
-The parameters specific to this example are related to the use of the slip-weake
-ning friction fault constitutive model (see Section ??).
- We set the fault constitutive model via
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.interfaces.fault]
-\end_layout
-
-\begin_layout LyX-Code
-friction = pylith.friction.SlipWeakening
-\end_layout
-
-\begin_layout Standard
-and use a UniformDB to set the slip-weakening friction parameters.
- We use a static coefficient of friction of 0.6, a dynamic coefficient of
- friction of 0.5, a slip-weakening parameter of 0.2 m, and no cohesion (0
- MPa).
- The fault constitutive model is associated with the fault, so we can append
- the fault constitutive model parameters to the vertex information fields
- and the fault constitutive model state variables to the vertex data fields:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.interfaces.fault.output]
-\end_layout
-
-\begin_layout LyX-Code
-vertex_info_fields = [strike_dir,normal_dir,initial_traction,static_coefficient,
-\begin_inset Newline newline
-\end_inset
-
-dynamic_coefficient,slip_weakening_parameter,cohesion]
-\end_layout
-
-\begin_layout LyX-Code
-vertex_data_fields = [slip,traction,cumulative_slip,previous_slip]
-\end_layout
-
-\begin_layout Standard
-The parameters specific to this example are in 
-\family typewriter
-dynamic_slipweakening.cfg
-\family default
-, so we run the problem via:
-\end_layout
-
-\begin_layout LyX-Code
-pylith dynamic.cfg dynamic_slipweakening.cfg
-\end_layout
-
-\begin_layout Standard
-The VTK files will be written to the 
-\family typewriter
-output
-\family default
- directory with the prefix 
-\family typewriter
-slipweakening
-\family default
-.
- If the problem ran correctly, you should be able to generate a figure such
- as Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:shearwave:quad4:slipweakening"
-
-\end_inset
-
-, which was generated using ParaView.
- The steady-state solution is a constant slip rate of 0.88 m/s and shear
- traction of 5.0 MPa on the fault surface, a uniform shear strain of 2.2e-4
- in the bar with uniform, constant velocities in the y-direction of +0.44
- m/s and -0.44 m/s on the -x and +x sides of the fault, respectively.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/quad4slipweakening30.jpg
-	lyxscale 50
-	scale 50
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Velocity field in the bar at 3.0 s for the slip-weakening friction fault
- constitutive model.
- Deformation has been exaggerated by a factor of 800.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:shearwave:quad4:slipweakening"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection
-Dynamic Fault with Rate-State Friction
-\end_layout
-
-\begin_layout Standard
-The parameters specific to this example are related to the use of the rate-
- and state-friction fault constitutive model (see Section ??).
- The evolution of the state variable uses the ageing law.
- We set the fault constitutive model via
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.interfaces.fault]
-\end_layout
-
-\begin_layout LyX-Code
-friction = pylith.friction.RateStateAgeing
-\end_layout
-
-\begin_layout Standard
-and use a UniformDB to set the static friction parameters.
- We use a reference coefficient of friction of 0.6, reference slip rate of
- 1.0e-6 m/s, characteristic slip distance of 0.037 m, coefficients a and b
- of 0.0125 and 0.0172, and no cohesion (0 MPa).
- The parameters specific to this example are in 
-\family typewriter
-dynamic_ratestateageing.cfg
-\family default
-, so we run the problem via:
-\end_layout
-
-\begin_layout LyX-Code
-pylith dynamic.cfg dynamic_ratestateageing.cfg
-\end_layout
-
-\begin_layout Standard
-The VTK files will be written to the 
-\family typewriter
-output
-\family default
- directory with the prefix 
-\family typewriter
-ratestateageing
-\family default
-.
- If the problem ran correctly, you should be able to generate a figure such
- as Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:shearwave:quad4:ratestateageing"
-
-\end_inset
-
-, which was generated using ParaView.
- The steady-state solution is a constant slip rate of 0.572 m/s and shear
- traction of 5.385 MPa on the fault surface, a uniform shear strain of 1.43e-4
- in the bar with uniform, constant velocities in the y-direction of +0.286
- m/s and -0.286 m/s on the -x and +x sides of the fault, respectively.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/quad4ratestateageing30.jpg
-	lyxscale 50
-	scale 50
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Velocity field in the bar at 3.0 s for the rate- and state-friction fault
- constitutive model.
- Deformation has been exaggerated by a factor of 800.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:shearwave:quad4:ratestateageing"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_body
-\end_document
+#LyX 2.0 created this file. For more info see http://www.lyx.org/
+\lyxformat 413
+\begin_document
+\begin_header
+\textclass book
+\begin_preamble
+
+\end_preamble
+\use_default_options false
+\maintain_unincluded_children false
+\language english
+\language_package default
+\inputencoding latin1
+\fontencoding global
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry true
+\use_amsmath 0
+\use_esint 0
+\use_mhchem 1
+\use_mathdots 1
+\cite_engine basic
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\use_refstyle 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\leftmargin 1in
+\topmargin 1in
+\rightmargin 1in
+\bottommargin 1in
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\quotes_language english
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\end_header
+
+\begin_body
+
+\begin_layout Section
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:tutorial:shearwave:quad4"
+
+\end_inset
+
+3D Bar Discretized with Quadrilaterals
+\end_layout
+
+\begin_layout Standard
+PyLith features discussed in this tutorial:
+\end_layout
+
+\begin_layout Itemize
+Dynamic solution
+\end_layout
+
+\begin_layout Itemize
+CUBIT mesh format
+\end_layout
+
+\begin_layout Itemize
+Absorbing dampers boundary conditions
+\end_layout
+
+\begin_layout Itemize
+Kinematic fault interface conditions
+\end_layout
+
+\begin_layout Itemize
+Dynamic fault interface conditions
+\end_layout
+
+\begin_layout Itemize
+Plane strain linearly elastic material
+\end_layout
+
+\begin_layout Itemize
+VTK output
+\end_layout
+
+\begin_layout Itemize
+Linear quadrilateral cells
+\end_layout
+
+\begin_layout Itemize
+SimpleDB spatial database
+\end_layout
+
+\begin_layout Itemize
+ZeroDispDB spatial database
+\end_layout
+
+\begin_layout Itemize
+UniformDB spatial database
+\end_layout
+
+\begin_layout Standard
+All of the files necessary to run the examples are contained in the directory
+ 
+\family typewriter
+examples/bar_shearwave/quad4.
+\end_layout
+
+\begin_layout Subsection
+Mesh Generation
+\end_layout
+
+\begin_layout Standard
+The mesh is a simple rectangular prism 8 km by 400 m by 400 m (Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:shearwave:quad4:mesh"
+
+\end_inset
+
+).
+ We provide documented CUBIT journal files in 
+\family typewriter
+examples/bar_shearwave/quad4.
+
+\family default
+ We first create the geometry, mesh the domain using quadrilateral cells,
+ and then create blocks and nodesets associated with the materials and boundary
+ conditions.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/quad4mesh.jpg
+	lyxscale 50
+	scale 50
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Mesh composed of hexahedral cells generated by CUBIT used for the example
+ problem.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:shearwave:quad4:mesh"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Kinematic Fault
+\end_layout
+
+\begin_layout Standard
+The simulation parameters match those in the tri3, tet4, and hex8 examples.
+ Using four-point quadrature permits use of a time step of 1/20 s, which
+ is slightly larger than the time step of 1/30 s used in the tri3 and tet4
+ simulations.
+ In contrast to the tri3, tet4, and hex8 shear wave examples which only
+ contained a single simulation in a directory, in this example we consider
+ several different simulations.
+ Consequently, we separate the parameters into multiple 
+\family typewriter
+.cfg
+\family default
+ files.
+ The common parameters are placed in 
+\family typewriter
+pylithapp.cfg
+\family default
+ with the parameters specific to the kinematic fault example in 
+\family typewriter
+kinematic.cfg
+\family default
+.
+ To run the problem, simply run PyLith via:
+\end_layout
+
+\begin_layout LyX-Code
+pylith kinematic.cfg
+\end_layout
+
+\begin_layout Standard
+The VTK files will be written to the 
+\family typewriter
+output
+\family default
+ directory with the prefix 
+\family typewriter
+kinematic
+\family default
+.
+ The output includes the displacement field over the entire domain at every
+ other time step (0.10 s), the slip and traction vectors on the fault surface
+ in along-strike and normal directions at every other time step (0.10 s),
+ and the strain and stress tensors for each cell at every 20th time step
+ (1.0 s).
+ If the problem ran correctly, you should be able to generate a figure such
+ as Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:shearwave:quad4:kinematic"
+
+\end_inset
+
+, which was generated using ParaView.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/quad4kinematic30.jpg
+	lyxscale 50
+	scale 50
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Displacement field in the bar at 3.0 s.
+ Deformation has been exaggerated by a factor of 800.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:shearwave:quad4:kinematic"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Dynamic Fault
+\end_layout
+
+\begin_layout Standard
+In this set of examples we replace the kinematic fault interface with the
+ dynamic fault interface, resulting in fault slip controlled by a fault-constitu
+tive model.
+ See Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:fault:constitutive:models"
+
+\end_inset
+
+ for detailed information about the fault constitutive models available
+ in PyLith.
+ Because this is a dynamic simulation we want the generated shear wave to
+ continue to be absorbed at the ends of the bar, so we drive the fault by
+ imposing initial tractions directly on the fault surface rather than through
+ deformation within the bar.
+ We employ a UniformDB object to specify 6.1 MPa of right-lateral shear and
+ 10.0 MPa of normal compression for the initial fault tractions.
+ The parameters common to the dynamic fault simulations are in 
+\family typewriter
+dynamic.cfg
+\family default
+.
+ We use the explicit time-stepping with a lumped Jacobian matrix.
+ We also request that the fault output include slip, slip rate, and traction
+ fields:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces.fault.output]
+\end_layout
+
+\begin_layout LyX-Code
+vertex_data_fields = [slip,slip_rate,traction]
+\end_layout
+
+\begin_layout Subsubsection
+Dynamic Fault with Static Friction
+\end_layout
+
+\begin_layout Standard
+The parameters specific to this example are related to the use of the static
+ friction fault constitutive model.
+ We set the fault constitutive model via
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces.fault]
+\end_layout
+
+\begin_layout LyX-Code
+friction = pylith.friction.StaticFriction
+\end_layout
+
+\begin_layout Standard
+and use a UniformDB to set the static friction parameters.
+ We use a coefficient of friction of 0.6 and no cohesion (0 MPa).
+ The parameters specific to this example are in 
+\family typewriter
+dynamic_staticfriction.cfg
+\family default
+, so we run the problem via:
+\end_layout
+
+\begin_layout LyX-Code
+pylith dynamic.cfg dynamic_staticfriction.cfg
+\end_layout
+
+\begin_layout Standard
+The VTK files will be written to the 
+\family typewriter
+output
+\family default
+ directory with the prefix 
+\family typewriter
+staticfriction
+\family default
+.
+ The output includes the displacement and velocity fields over the entire
+ domain at every other time step (0.10 s), the slip, slip rate, and traction
+ vectors on the fault surface in along-strike and normal directions at every
+ other time step (0.10 s), and the strain and stress tensors for each cell
+ at every 20th time step (1.0 s).
+ If the problem ran correctly, you should be able to generate a figure such
+ as Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:shearwave:quad4:staticfriction"
+
+\end_inset
+
+, which was generated using ParaView.
+ The steady-state solution is a constant slip rate of 0.08 m/s, a shear traction
+ of 6.0 MPa on the fault surface, and a uniform shear strain of 2e-5 in the
+ bar with uniform, constant velocities in the y-direction of +0.04 m/s and
+ -0.04 m/s on the -x and +x sides of the fault, respectively.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/quad4staticfriction30.jpg
+	lyxscale 50
+	scale 50
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Velocity field in the bar at 3.0 s for the static friction fault constitutive
+ model.
+ Deformation has been exaggerated by a factor of 800.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:shearwave:quad4:staticfriction"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Dynamic Fault with Slip-Weakening Friction
+\end_layout
+
+\begin_layout Standard
+The parameters specific to this example are related to the use of the slip-weake
+ning friction fault constitutive model (see Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:fault:constitutive:models"
+
+\end_inset
+
+).
+ We set the fault constitutive model via
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces.fault]
+\end_layout
+
+\begin_layout LyX-Code
+friction = pylith.friction.SlipWeakening
+\end_layout
+
+\begin_layout Standard
+and use a UniformDB to set the slip-weakening friction parameters.
+ We use a static coefficient of friction of 0.6, a dynamic coefficient of
+ friction of 0.5, a slip-weakening parameter of 0.2 m, and no cohesion (0
+ MPa).
+ The fault constitutive model is associated with the fault, so we can append
+ the fault constitutive model parameters to the vertex information fields
+ and the fault constitutive model state variables to the vertex data fields:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces.fault.output]
+\end_layout
+
+\begin_layout LyX-Code
+vertex_info_fields = [strike_dir,normal_dir,initial_traction,static_coefficient,
+\begin_inset Newline newline
+\end_inset
+
+dynamic_coefficient,slip_weakening_parameter,cohesion]
+\end_layout
+
+\begin_layout LyX-Code
+vertex_data_fields = [slip,traction,cumulative_slip,previous_slip]
+\end_layout
+
+\begin_layout Standard
+The parameters specific to this example are in 
+\family typewriter
+dynamic_slipweakening.cfg
+\family default
+, so we run the problem via:
+\end_layout
+
+\begin_layout LyX-Code
+pylith dynamic.cfg dynamic_slipweakening.cfg
+\end_layout
+
+\begin_layout Standard
+The VTK files will be written to the 
+\family typewriter
+output
+\family default
+ directory with the prefix 
+\family typewriter
+slipweakening
+\family default
+.
+ If the problem ran correctly, you should be able to generate a figure such
+ as Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:shearwave:quad4:slipweakening"
+
+\end_inset
+
+, which was generated using ParaView.
+ The steady-state solution is a constant slip rate of 0.88 m/s and shear
+ traction of 5.0 MPa on the fault surface, a uniform shear strain of 2.2e-4
+ in the bar with uniform, constant velocities in the y-direction of +0.44
+ m/s and -0.44 m/s on the -x and +x sides of the fault, respectively.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/quad4slipweakening30.jpg
+	lyxscale 50
+	scale 50
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Velocity field in the bar at 3.0 s for the slip-weakening friction fault
+ constitutive model.
+ Deformation has been exaggerated by a factor of 800.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:shearwave:quad4:slipweakening"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Dynamic Fault with Rate-State Friction
+\end_layout
+
+\begin_layout Standard
+The parameters specific to this example are related to the use of the rate-
+ and state-friction fault constitutive model (see Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:fault:constitutive:models"
+
+\end_inset
+
+).
+ The evolution of the state variable uses the aging law.
+ We set the fault constitutive model via
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces.fault]
+\end_layout
+
+\begin_layout LyX-Code
+friction = pylith.friction.RateStateAgeing
+\end_layout
+
+\begin_layout Standard
+and use a UniformDB to set the static friction parameters.
+ We use a reference coefficient of friction of 0.6, reference slip rate of
+ 1.0e-6 m/s, characteristic slip distance of 0.037 m, coefficients a and b
+ of 0.0125 and 0.0172, and no cohesion (0 MPa).
+ The parameters specific to this example are in 
+\family typewriter
+dynamic_ratestateageing.cfg
+\family default
+, so we run the problem via:
+\end_layout
+
+\begin_layout LyX-Code
+pylith dynamic.cfg dynamic_ratestateageing.cfg
+\end_layout
+
+\begin_layout Standard
+The VTK files will be written to the 
+\family typewriter
+output
+\family default
+ directory with the prefix 
+\family typewriter
+ratestateageing
+\family default
+.
+ If the problem ran correctly, you should be able to generate a figure such
+ as Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:shearwave:quad4:ratestateageing"
+
+\end_inset
+
+, which was generated using ParaView.
+ The steady-state solution is a constant slip rate of 0.572 m/s and shear
+ traction of 5.385 MPa on the fault surface, a uniform shear strain of 1.43e-4
+ in the bar with uniform, constant velocities in the y-direction of +0.286
+ m/s and -0.286 m/s on the -x and +x sides of the fault, respectively.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/quad4ratestateageing30.jpg
+	lyxscale 50
+	scale 50
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Velocity field in the bar at 3.0 s for the rate- and state-friction fault
+ constitutive model.
+ Deformation has been exaggerated by a factor of 800.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:shearwave:quad4:ratestateageing"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document

Modified: short/3D/PyLith/trunk/doc/userguide/tutorials/shearwave/shearwave.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/tutorials/shearwave/shearwave.lyx	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/doc/userguide/tutorials/shearwave/shearwave.lyx	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,162 +1,180 @@
-#LyX 1.6.5 created this file. For more info see http://www.lyx.org/
-\lyxformat 345
-\begin_document
-\begin_header
-\textclass book
-\begin_preamble
-
-\end_preamble
-\use_default_options false
-\language english
-\inputencoding latin1
-\font_roman default
-\font_sans default
-\font_typewriter default
-\font_default_family default
-\font_sc false
-\font_osf false
-\font_sf_scale 100
-\font_tt_scale 100
-
-\graphics default
-\paperfontsize default
-\spacing single
-\use_hyperref false
-\papersize default
-\use_geometry true
-\use_amsmath 1
-\use_esint 0
-\cite_engine basic
-\use_bibtopic false
-\paperorientation portrait
-\leftmargin 1in
-\topmargin 1in
-\rightmargin 1in
-\bottommargin 2in
-\secnumdepth 3
-\tocdepth 3
-\paragraph_separation indent
-\defskip medskip
-\quotes_language english
-\papercolumns 1
-\papersides 2
-\paperpagestyle default
-\tracking_changes false
-\output_changes false
-\author "" 
-\author "" 
-\end_header
-
-\begin_body
-
-\begin_layout Section
-Shear Wave in a Bar
-\end_layout
-
-\begin_layout Standard
-This suite of examples focuses on the dynamics of a shear wave propagating
- down an 8 km long bar with a 400 m wide cross-section.
- Motion is limited to shear deformation by fixing the longitudinal degree
- of freedom.
- For each cell type (tri3, quad4, tet4, and hex8) we generate a shear wave
- using a kinematic fault rupture with simultaneous slip over the fault surface,
- which we place at the center of the bar.
- The discretization size is 200 m in all cases.
- The slip time histories follow the integral of Brune's far-field time function
- with slip initiating at 0.1 s, a left-lateral final slip of 1.0 m, and a
- rise time of 2.0 s.
- The shear wave speed in the bar is 1.0 km/s, so the shear wave reaches each
- end of the bar at 4.1 s.
- Absorbing boundaries on the ends of the bar prevent significant reflections.
- The bar comes to a rest with a static offset.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Float figure
-wide false
-sideways false
-status collapsed
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/bar.eps
-	lyxscale 50
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Domain for shear wave propagation in a 8.0 km bar with 400 m cross-section.
- We generate a shear wave via slip on a fault located in the middle of the
- bar while limiting deformation to the transverse direction.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:shearwave:domain"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-For the bar discretized with quad4 cells we also consider the fault subjected
- to frictional sliding controlled by static friction, linear slip-weakening
- friction, and rate- and state-friction.
- We use initial tractions applied to the fault to drive the dislocation
- and generate the shear wave.
- Because the fault tractions are constant in time, they continue to drive
- the motion even after the shear wave reaches the absorbing boundary, leading
- to a steady state solution with uniform shear deformation in the bar and
- a constant slip rate on the fault.
- 
-\end_layout
-
-\begin_layout Standard
-\begin_inset CommandInset include
-LatexCommand input
-filename "tri3.lyx"
-
-\end_inset
-
-
-\begin_inset CommandInset include
-LatexCommand input
-filename "tet4.lyx"
-
-\end_inset
-
-
-\begin_inset CommandInset include
-LatexCommand input
-filename "hex8.lyx"
-
-\end_inset
-
-
-\begin_inset CommandInset include
-LatexCommand input
-filename "quad4.lyx"
-
-\end_inset
-
-
-\end_layout
-
-\end_body
-\end_document
+#LyX 2.0 created this file. For more info see http://www.lyx.org/
+\lyxformat 413
+\begin_document
+\begin_header
+\textclass book
+\begin_preamble
+
+\end_preamble
+\use_default_options false
+\maintain_unincluded_children false
+\language english
+\language_package default
+\inputencoding latin1
+\fontencoding global
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry true
+\use_amsmath 1
+\use_esint 0
+\use_mhchem 1
+\use_mathdots 1
+\cite_engine basic
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\use_refstyle 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\leftmargin 1in
+\topmargin 1in
+\rightmargin 1in
+\bottommargin 2in
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\quotes_language english
+\papercolumns 1
+\papersides 2
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\end_header
+
+\begin_body
+
+\begin_layout Section
+Shear Wave in a Bar
+\end_layout
+
+\begin_layout Standard
+This suite of examples focuses on the dynamics of a shear wave propagating
+ down an 8 km-long bar with a 400 m-wide cross-section.
+ Motion is limited to shear deformation by fixing the longitudinal degree
+ of freedom.
+ For each cell type (tri3, quad4, tet4, and hex8) we generate a shear wave
+ using a kinematic fault rupture with simultaneous slip over the fault surface,
+ which we place at the center of the bar.
+ The discretization size is 200 m in all cases.
+ The slip-time histories follow the integral of Brune's far-field time function
+ with slip initiating at 0.1 s, a left-lateral final slip of 1.0 m, and a
+ rise time of 2.0 s.
+ The shear wave speed in the bar is 1.0 km/s, so the shear wave reaches each
+ end of the bar at 4.1 s.
+ Absorbing boundaries on the ends of the bar prevent significant reflections.
+ The bar comes to a rest with a static offset.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status collapsed
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/bar.eps
+	lyxscale 50
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Domain for shear wave propagation in a 8.0 km bar with 400 m cross-section.
+ We generate a shear wave via slip on a fault located in the middle of the
+ bar while limiting deformation to the transverse direction.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:shearwave:domain"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+For the bar discretized with quad4 cells we also consider the fault subjected
+ to frictional sliding controlled by static friction, linear slip-weakening
+ friction, and rate- and state-friction.
+ We use initial tractions applied to the fault to drive the dislocation
+ and generate the shear wave.
+ Because the fault tractions are constant in time, they continue to drive
+ the motion even after the shear wave reaches the absorbing boundary, leading
+ to a steady state solution with uniform shear deformation in the bar and
+ a constant slip rate on the fault.
+ 
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "tri3.lyx"
+
+\end_inset
+
+
+\begin_inset CommandInset include
+LatexCommand input
+filename "tet4.lyx"
+
+\end_inset
+
+
+\begin_inset CommandInset include
+LatexCommand input
+filename "hex8.lyx"
+
+\end_inset
+
+
+\begin_inset CommandInset include
+LatexCommand input
+filename "quad4.lyx"
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document

Modified: short/3D/PyLith/trunk/doc/userguide/tutorials/shearwave/tet4.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/tutorials/shearwave/tet4.lyx	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/doc/userguide/tutorials/shearwave/tet4.lyx	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,284 +1,288 @@
-#LyX 2.0 created this file. For more info see http://www.lyx.org/
-\lyxformat 413
-\begin_document
-\begin_header
-\textclass book
-\begin_preamble
-
-\end_preamble
-\use_default_options false
-\maintain_unincluded_children false
-\language english
-\language_package default
-\inputencoding latin1
-\fontencoding global
-\font_roman default
-\font_sans default
-\font_typewriter default
-\font_default_family default
-\use_non_tex_fonts false
-\font_sc false
-\font_osf false
-\font_sf_scale 100
-\font_tt_scale 100
-
-\graphics default
-\default_output_format default
-\output_sync 0
-\bibtex_command default
-\index_command default
-\paperfontsize default
-\spacing single
-\use_hyperref false
-\papersize default
-\use_geometry true
-\use_amsmath 0
-\use_esint 0
-\use_mhchem 1
-\use_mathdots 1
-\cite_engine basic
-\use_bibtopic false
-\use_indices false
-\paperorientation portrait
-\suppress_date false
-\use_refstyle 0
-\index Index
-\shortcut idx
-\color #008000
-\end_index
-\leftmargin 1in
-\topmargin 1in
-\rightmargin 1in
-\bottommargin 1in
-\secnumdepth 3
-\tocdepth 3
-\paragraph_separation indent
-\paragraph_indentation default
-\quotes_language english
-\papercolumns 1
-\papersides 1
-\paperpagestyle default
-\tracking_changes false
-\output_changes false
-\html_math_output 0
-\html_css_as_file 0
-\html_be_strict false
-\end_header
-
-\begin_body
-
-\begin_layout Section
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:tutorial:shearwave:tet4"
-
-\end_inset
-
-3-D Bar Discretized with Tetrahedra
-\end_layout
-
-\begin_layout Standard
-PyLith features discussed in this tutorial:
-\end_layout
-
-\begin_layout Itemize
-Dynamic solution
-\end_layout
-
-\begin_layout Itemize
-LaGriT mesh format
-\end_layout
-
-\begin_layout Itemize
-Absorbing dampers boundary conditions
-\end_layout
-
-\begin_layout Itemize
-Kinematic fault interface conditions
-\end_layout
-
-\begin_layout Itemize
-Elastic isotropic linearly elastic material
-\end_layout
-
-\begin_layout Itemize
-VTK output
-\end_layout
-
-\begin_layout Itemize
-Linear tetrahedral cells
-\end_layout
-
-\begin_layout Itemize
-SimpleDB spatial database
-\end_layout
-
-\begin_layout Itemize
-ZeroDispDB spatial database
-\end_layout
-
-\begin_layout Standard
-All of the files necessary to run the examples are contained in the directory
- 
-\family typewriter
-examples/bar_shearwave/tet4.
-\end_layout
-
-\begin_layout Subsection
-Mesh Generation
-\end_layout
-
-\begin_layout Standard
-The mesh is a simple rectangular prism 8 km by 400 m by 400m (Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:shearwave:tet4:mesh"
-
-\end_inset
-
-).
- This mesh could be generated via a simple script, but it is even easier
- to generate this mesh using LaGriT.
- We provide documented LaGriT files in 
-\family typewriter
-examples/bar_shearwave/tet4.
-
-\family default
- We first create the geometry, regions, mesh the domain using tetrahedral
- cells, and then create point sets associated with boundary conditions.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/tet4mesh.jpg
-	lyxscale 50
-	scale 50
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Mesh composed of tetrahedral cells generated by LaGriT used for the example
- problem.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:shearwave:tet4:mesh"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Simulation Parameters
-\end_layout
-
-\begin_layout Standard
-The simulation parameters match those in the tri3 example with the exception
- of using the LaGriT mesh reader and switching the from a two-dimensional
- problem to a three-dimensional problem.
- In addition to fixing the longitudinal degree of freedom, we also fix the
- out-of-plane transverse degree of freedom.
- Because the fault separates two material regions in LaGriT, we use two
- materials in PyLith.
- All of the parameters are set in the pylithapp.cfg file.
- To run the problem, simply run PyLith without any command line arguments:
-\end_layout
-
-\begin_layout LyX-Code
-pylith
-\end_layout
-
-\begin_layout Standard
-The VTK files will be written to the 
-\family typewriter
-output
-\family default
- directory.
- The output includes the displacement and velocity fields over the entire
- domain at every 3rd time step (0.10 s), the slip and change in traction
- vectors on the fault surface in along-strike and normal directions at every
- 3rd time step (0.10 s), and the strain and stress tensors for each cell
- at every 30th time step (1.0 s).
- If the problem ran correctly, you should be able to generate a figure such
- as Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:shearwave:tet4:deform"
-
-\end_inset
-
-, which was generated using ParaView.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/tet4deform30.jpg
-	lyxscale 50
-	scale 50
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Displacement field in the bar at 3.0 s.
- Deformation has been exaggerated by a factor of 800.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:shearwave:tet4:deform"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_body
-\end_document
+#LyX 2.0 created this file. For more info see http://www.lyx.org/
+\lyxformat 413
+\begin_document
+\begin_header
+\textclass book
+\begin_preamble
+
+\end_preamble
+\use_default_options false
+\maintain_unincluded_children false
+\language english
+\language_package default
+\inputencoding latin1
+\fontencoding global
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry true
+\use_amsmath 0
+\use_esint 0
+\use_mhchem 1
+\use_mathdots 1
+\cite_engine basic
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\use_refstyle 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\leftmargin 1in
+\topmargin 1in
+\rightmargin 1in
+\bottommargin 1in
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\quotes_language english
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\end_header
+
+\begin_body
+
+\begin_layout Section
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:tutorial:shearwave:tet4"
+
+\end_inset
+
+3D Bar Discretized with Tetrahedra
+\end_layout
+
+\begin_layout Standard
+PyLith features discussed in this tutorial:
+\end_layout
+
+\begin_layout Itemize
+Dynamic solution
+\end_layout
+
+\begin_layout Itemize
+LaGriT mesh format
+\end_layout
+
+\begin_layout Itemize
+Absorbing dampers boundary conditions
+\end_layout
+
+\begin_layout Itemize
+Kinematic fault interface conditions
+\end_layout
+
+\begin_layout Itemize
+Elastic isotropic linearly elastic material
+\end_layout
+
+\begin_layout Itemize
+VTK output
+\end_layout
+
+\begin_layout Itemize
+Linear tetrahedral cells
+\end_layout
+
+\begin_layout Itemize
+SimpleDB spatial database
+\end_layout
+
+\begin_layout Itemize
+ZeroDispDB spatial database
+\end_layout
+
+\begin_layout Standard
+All of the files necessary to run the examples are contained in the directory
+ 
+\family typewriter
+examples/bar_shearwave/tet4.
+\end_layout
+
+\begin_layout Subsection
+Mesh Generation
+\end_layout
+
+\begin_layout Standard
+The mesh is a simple rectangular prism 8 km by 400 m by 400m (Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:shearwave:tet4:mesh"
+
+\end_inset
+
+).
+ This mesh could be generated via a simple script, but it is even easier
+ to generate this mesh using LaGriT.
+ We provide documented LaGriT files in 
+\family typewriter
+examples/bar_shearwave/tet4.
+
+\family default
+ We first create the geometry and regions, mesh the domain using tetrahedral
+ cells, and then create point sets associated with boundary conditions.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/tet4mesh.jpg
+	lyxscale 50
+	scale 50
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Mesh composed of tetrahedral cells generated by LaGriT used for the example
+ problem.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:shearwave:tet4:mesh"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Simulation Parameters
+\end_layout
+
+\begin_layout Standard
+The simulation parameters match those in the tri3 example with the exception
+ of using the LaGriT mesh reader and switching from a two-dimensional problem
+ to a three-dimensional problem.
+ In addition to fixing the longitudinal degree of freedom, we also fix the
+ out-of-plane transverse degree of freedom.
+ Because the fault separates two material regions in LaGriT, we use two
+ materials in PyLith.
+ All of the parameters are set in the 
+\family typewriter
+pylithapp.cfg
+\family default
+ file.
+ To run the problem, simply run PyLith without any command line arguments:
+\end_layout
+
+\begin_layout LyX-Code
+pylith
+\end_layout
+
+\begin_layout Standard
+The VTK files will be written to the 
+\family typewriter
+output
+\family default
+ directory.
+ The output includes the displacement and velocity fields over the entire
+ domain at every 3rd time step (0.10 s), the slip and change in traction
+ vectors on the fault surface in along-strike and normal directions at every
+ 3rd time step (0.10 s), and the strain and stress tensors for each cell
+ at every 30th time step (1.0 s).
+ If the problem ran correctly, you should be able to generate a figure such
+ as Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:shearwave:tet4:deform"
+
+\end_inset
+
+, which was generated using ParaView.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/tet4deform30.jpg
+	lyxscale 50
+	scale 50
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Displacement field in the bar at 3.0 s.
+ Deformation has been exaggerated by a factor of 800.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:shearwave:tet4:deform"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document

Modified: short/3D/PyLith/trunk/doc/userguide/tutorials/shearwave/tri3.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/tutorials/shearwave/tri3.lyx	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/doc/userguide/tutorials/shearwave/tri3.lyx	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,348 +1,352 @@
-#LyX 2.0 created this file. For more info see http://www.lyx.org/
-\lyxformat 413
-\begin_document
-\begin_header
-\textclass book
-\begin_preamble
-
-\end_preamble
-\use_default_options false
-\maintain_unincluded_children false
-\language english
-\language_package default
-\inputencoding latin1
-\fontencoding global
-\font_roman default
-\font_sans default
-\font_typewriter default
-\font_default_family default
-\use_non_tex_fonts false
-\font_sc false
-\font_osf false
-\font_sf_scale 100
-\font_tt_scale 100
-
-\graphics default
-\default_output_format default
-\output_sync 0
-\bibtex_command default
-\index_command default
-\paperfontsize default
-\spacing single
-\use_hyperref false
-\papersize default
-\use_geometry true
-\use_amsmath 0
-\use_esint 0
-\use_mhchem 1
-\use_mathdots 1
-\cite_engine basic
-\use_bibtopic false
-\use_indices false
-\paperorientation portrait
-\suppress_date false
-\use_refstyle 0
-\index Index
-\shortcut idx
-\color #008000
-\end_index
-\leftmargin 1in
-\topmargin 1in
-\rightmargin 1in
-\bottommargin 1in
-\secnumdepth 3
-\tocdepth 3
-\paragraph_separation indent
-\paragraph_indentation default
-\quotes_language english
-\papercolumns 1
-\papersides 1
-\paperpagestyle default
-\tracking_changes false
-\output_changes false
-\html_math_output 0
-\html_css_as_file 0
-\html_be_strict false
-\end_header
-
-\begin_body
-
-\begin_layout Section
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:tutorial:shearwave:tri3"
-
-\end_inset
-
-2-D Bar Discretized with Triangles
-\end_layout
-
-\begin_layout Standard
-PyLith features discussed in this tutorial:
-\end_layout
-
-\begin_layout Itemize
-Dynamic solution
-\end_layout
-
-\begin_layout Itemize
-CUBIT format
-\end_layout
-
-\begin_layout Itemize
-Absorbing dampers boundary conditions
-\end_layout
-
-\begin_layout Itemize
-Kinematic fault interface conditions
-\end_layout
-
-\begin_layout Itemize
-Plane strain linearly elastic material
-\end_layout
-
-\begin_layout Itemize
-VTK output
-\end_layout
-
-\begin_layout Itemize
-Linear triangular cells
-\end_layout
-
-\begin_layout Itemize
-SimpleDB spatial database
-\end_layout
-
-\begin_layout Itemize
-ZeroDispDB spatial database
-\end_layout
-
-\begin_layout Standard
-All of the files necessary to run the examples are contained in the directory
- 
-\family typewriter
-examples/bar_shearwave/tri3.
-\end_layout
-
-\begin_layout Subsection
-Mesh Generation
-\end_layout
-
-\begin_layout Standard
-The mesh is a simple rectangle 8 km by 400 m (Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:shearwave:tet4:mesh"
-
-\end_inset
-
-).
- This mesh could be generated via a simple script, but it is even easier
- to generate this mesh using CUBIT.
- We provide documented journal files in 
-\family typewriter
-examples/bar_shearwave/tri3.
-
-\family default
- We first create the geometry, mesh the domain using triangular cells, and
- then create blocks and nodesets to associated the cells and vertices with
- materials and boundary conditions.
- See Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:Tutorial-3d-hex8"
-
-\end_inset
-
- for more information on using CUBIT to generate meshes.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/tri3mesh.jpg
-	lyxscale 50
-	scale 50
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Mesh composed of triangular cells generated by CUBIT used for the example
- problem.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:shearwave:tri3:mesh"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Simulation Parameters
-\end_layout
-
-\begin_layout Standard
-All of the parameters are set in the pylithapp.cfg file.
- The structure of the file follows the same pattern as in all of the other
- examples.
- We set the parameters for the journal information followed by the mesh
- reader, problem, materials, boundary conditions, fault, and output.
- We change the time-stepping formulation from the default value of implicit
- time stepping to explicit time stepping by setting the formulation object
- via
-\end_layout
-
-\begin_layout LyX-Code
-formulation = pylith.problems.Explicit
-\end_layout
-
-\begin_layout Standard
-We can switch to explicit time stepping with a lumped Jacobian matrix (rather
- than the full Jacobian matrix) by changing Explicit to ExplicitLumped.
- Using the ExplicitLumped object automatically triggers lumping of the Jacobian
- cell matrices and assembly into a vector rather than a sparse matrix.
- Lumping the Jacobian decouples the equations, so we can use a very simple
- direct solver.
- Use of this simple solver is also triggered by the selection of the ExplicitLum
-ped object.
- 
-\end_layout
-
-\begin_layout Standard
-For dynamic problems we use the NondimElasticDynamic object to nondimensionalize
- the equations.
- This object provides scales associated with wave propagation for nondimensional
-ization, including the minimum wave period, the shear wave speed, and mass
- density.
- In this example we use the default values of a minimum wave period of 1.0
- s, a shear wave speed of 3 km/s, and a mass density of 3000 kg/m
-\begin_inset Formula $^{3}$
-\end_inset
-
-.
- We simulate 12.0 s of motion with a time step of 1/30 s.
- This time step must follow the Courant–Friedrichs–Lewy condition; that
- is, the time step must be smaller than the time it takes the P wave to
- propagate across the shortest edge of a cell.
- 
-\end_layout
-
-\begin_layout Standard
-The boundary conditions include the absorbing dampers at the ends of the
- bar and a Dirichlet boundary condition to prevent longitudinal motion.
- Because we cannot overlap the Dirichlet BC with the fault, we use the nodeset
- associated with all vertices except the fault.
- For the output over the entire domain, we request both displacement and
- velocity fields:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.output]
-\end_layout
-
-\begin_layout LyX-Code
-vertex_data_fields = [displacement,velocity]
-\end_layout
-
-\begin_layout Standard
-To run the problem, simply run PyLith without any command line arguments:
-\end_layout
-
-\begin_layout LyX-Code
-pylith
-\end_layout
-
-\begin_layout Standard
-The VTK files will be written to the 
-\family typewriter
-output
-\family default
- directory.
- The output includes the displacement and velocity fields over the entire
- domain at every 3rd time step (0.10 s), the slip and change in traction
- vectors on the fault surface in along-strike and normal directions at every
- 3rd time step (0.10 s), and the strain and stress tensors for each cell
- at every 30th time step (1.0 s).
- If the problem ran correctly, you should be able to generate a figure such
- as Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:shearwave:tri3:deform"
-
-\end_inset
-
-, which was generated using ParaView.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/tri3deform30.jpg
-	lyxscale 50
-	scale 50
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Displacement field in the bar at 3.0 s.
- Deformation has been exaggerated by a factor of 800.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:shearwave:tri3:deform"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_body
-\end_document
+#LyX 2.0 created this file. For more info see http://www.lyx.org/
+\lyxformat 413
+\begin_document
+\begin_header
+\textclass book
+\begin_preamble
+
+\end_preamble
+\use_default_options false
+\maintain_unincluded_children false
+\language english
+\language_package default
+\inputencoding latin1
+\fontencoding global
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry true
+\use_amsmath 0
+\use_esint 0
+\use_mhchem 1
+\use_mathdots 1
+\cite_engine basic
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\use_refstyle 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\leftmargin 1in
+\topmargin 1in
+\rightmargin 1in
+\bottommargin 1in
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\quotes_language english
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\end_header
+
+\begin_body
+
+\begin_layout Section
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:tutorial:shearwave:tri3"
+
+\end_inset
+
+2D Bar Discretized with Triangles
+\end_layout
+
+\begin_layout Standard
+PyLith features discussed in this tutorial:
+\end_layout
+
+\begin_layout Itemize
+Dynamic solution
+\end_layout
+
+\begin_layout Itemize
+CUBIT format
+\end_layout
+
+\begin_layout Itemize
+Absorbing dampers boundary conditions
+\end_layout
+
+\begin_layout Itemize
+Kinematic fault interface conditions
+\end_layout
+
+\begin_layout Itemize
+Plane strain linearly elastic material
+\end_layout
+
+\begin_layout Itemize
+VTK output
+\end_layout
+
+\begin_layout Itemize
+Linear triangular cells
+\end_layout
+
+\begin_layout Itemize
+SimpleDB spatial database
+\end_layout
+
+\begin_layout Itemize
+ZeroDispDB spatial database
+\end_layout
+
+\begin_layout Standard
+All of the files necessary to run the examples are contained in the directory
+ 
+\family typewriter
+examples/bar_shearwave/tri3.
+\end_layout
+
+\begin_layout Subsection
+Mesh Generation
+\end_layout
+
+\begin_layout Standard
+The mesh is a simple rectangle 8 km by 400 m (Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:shearwave:tet4:mesh"
+
+\end_inset
+
+).
+ This mesh could be generated via a simple script, but it is even easier
+ to generate this mesh using CUBIT.
+ We provide documented journal files in 
+\family typewriter
+examples/bar_shearwave/tri3.
+
+\family default
+ We first create the geometry, mesh the domain using triangular cells, and
+ then create blocks and nodesets to associate the cells and vertices with
+ materials and boundary conditions.
+ See Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Tutorial-3d-hex8"
+
+\end_inset
+
+ for more information on using CUBIT to generate meshes.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/tri3mesh.jpg
+	lyxscale 50
+	scale 50
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Mesh composed of triangular cells generated by CUBIT used for the example
+ problem.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:shearwave:tri3:mesh"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Simulation Parameters
+\end_layout
+
+\begin_layout Standard
+All of the parameters are set in the 
+\family typewriter
+pylithapp.cfg
+\family default
+ file.
+ The structure of the file follows the same pattern as in all of the other
+ examples.
+ We set the parameters for the journal information followed by the mesh
+ reader, problem, materials, boundary conditions, fault, and output.
+ We change the time-stepping formulation from the default value of implicit
+ time stepping to explicit time stepping by setting the formulation object
+ via
+\end_layout
+
+\begin_layout LyX-Code
+formulation = pylith.problems.Explicit
+\end_layout
+
+\begin_layout Standard
+We can switch to explicit time stepping with a lumped Jacobian matrix (rather
+ than the full Jacobian matrix) by changing Explicit to ExplicitLumped.
+ Using the ExplicitLumped object automatically triggers lumping of the Jacobian
+ cell matrices and assembly into a vector rather than a sparse matrix.
+ Lumping the Jacobian decouples the equations, so we can use a very simple
+ direct solver.
+ Use of this simple solver is also triggered by the selection of the ExplicitLum
+ped object.
+ 
+\end_layout
+
+\begin_layout Standard
+For dynamic problems we use the NondimElasticDynamic object to nondimensionalize
+ the equations.
+ This object provides scales associated with wave propagation for nondimensional
+ization, including the minimum wave period, the shear wave speed, and mass
+ density.
+ In this example we use the default values of a minimum wave period of 1.0
+ s, a shear wave speed of 3 km/s, and a mass density of 3000 kg/m
+\begin_inset Formula $^{3}$
+\end_inset
+
+.
+ We simulate 12.0 s of motion with a time step of 1/30 s.
+ This time step must follow the Courant–Friedrichs–Lewy condition; that
+ is, the time step must be smaller than the time it takes the P wave to
+ propagate across the shortest edge of a cell.
+ 
+\end_layout
+
+\begin_layout Standard
+The boundary conditions include the absorbing dampers at the ends of the
+ bar and a Dirichlet boundary condition to prevent longitudinal motion.
+ Because we cannot overlap the Dirichlet BC with the fault, we use the nodeset
+ associated with all vertices except the fault.
+ For the output over the entire domain, we request both displacement and
+ velocity fields:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.output]
+\end_layout
+
+\begin_layout LyX-Code
+vertex_data_fields = [displacement,velocity]
+\end_layout
+
+\begin_layout Standard
+To run the problem, simply run PyLith without any command line arguments:
+\end_layout
+
+\begin_layout LyX-Code
+pylith
+\end_layout
+
+\begin_layout Standard
+The VTK files will be written to the 
+\family typewriter
+output
+\family default
+ directory.
+ The output includes the displacement and velocity fields over the entire
+ domain at every 3rd time step (0.10 s), the slip and change in traction
+ vectors on the fault surface in along-strike and normal directions at every
+ 3rd time step (0.10 s), and the strain and stress tensors for each cell
+ at every 30th time step (1.0 s).
+ If the problem ran correctly, you should be able to generate a figure such
+ as Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:shearwave:tri3:deform"
+
+\end_inset
+
+, which was generated using ParaView.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/tri3deform30.jpg
+	lyxscale 50
+	scale 50
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Displacement field in the bar at 3.0 s.
+ Deformation has been exaggerated by a factor of 800.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:shearwave:tri3:deform"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document

Copied: short/3D/PyLith/trunk/doc/userguide/tutorials/subduction/figs/step04_soln.png (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/doc/userguide/tutorials/subduction/figs/step04_soln.png)
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/trunk/doc/userguide/tutorials/subduction/subduction.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/tutorials/subduction/subduction.lyx	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/doc/userguide/tutorials/subduction/subduction.lyx	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,1073 +1,1289 @@
-#LyX 2.0 created this file. For more info see http://www.lyx.org/
-\lyxformat 413
-\begin_document
-\begin_header
-\textclass book
-\begin_preamble
-
-\end_preamble
-\use_default_options false
-\maintain_unincluded_children false
-\language english
-\language_package default
-\inputencoding latin1
-\fontencoding global
-\font_roman default
-\font_sans default
-\font_typewriter default
-\font_default_family default
-\use_non_tex_fonts false
-\font_sc false
-\font_osf false
-\font_sf_scale 100
-\font_tt_scale 100
-
-\graphics default
-\default_output_format default
-\output_sync 0
-\bibtex_command default
-\index_command default
-\paperfontsize default
-\spacing single
-\use_hyperref false
-\papersize default
-\use_geometry true
-\use_amsmath 0
-\use_esint 0
-\use_mhchem 1
-\use_mathdots 1
-\cite_engine basic
-\use_bibtopic false
-\use_indices false
-\paperorientation portrait
-\suppress_date false
-\use_refstyle 0
-\index Index
-\shortcut idx
-\color #008000
-\end_index
-\leftmargin 1in
-\topmargin 1in
-\rightmargin 1in
-\bottommargin 1in
-\secnumdepth 3
-\tocdepth 3
-\paragraph_separation indent
-\paragraph_indentation default
-\quotes_language english
-\papercolumns 1
-\papersides 1
-\paperpagestyle default
-\tracking_changes false
-\output_changes false
-\html_math_output 0
-\html_css_as_file 0
-\html_be_strict false
-\end_header
-
-\begin_body
-
-\begin_layout Section
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:Tutorial-Subduction"
-
-\end_inset
-
-Tutorial for Slip on a Subduction Zone
-\end_layout
-
-\begin_layout Standard
-PyLith features discussed in this tutorial:
-\end_layout
-
-\begin_layout Itemize
-Static solution
-\end_layout
-
-\begin_layout Itemize
-Quasi-static solution
-\end_layout
-
-\begin_layout Itemize
-CUBIT mesh generation
-\end_layout
-
-\begin_deeper
-\begin_layout Itemize
-Nonplanar geometry
-\end_layout
-
-\begin_layout Itemize
-Variable mesh resolution
-\end_layout
-
-\begin_layout Itemize
-APREPRO programming language
-\end_layout
-
-\end_deeper
-\begin_layout Itemize
-Linear triangular cells
-\end_layout
-
-\begin_layout Itemize
-HDF5 output
-\end_layout
-
-\begin_layout Itemize
-Dirichlet displacement and velocity boundary conditions
-\end_layout
-
-\begin_layout Itemize
-ZeroDispDB spatial database
-\end_layout
-
-\begin_layout Itemize
-SimpleDB spatial database
-\end_layout
-
-\begin_layout Itemize
-UniformDB spatial database
-\end_layout
-
-\begin_layout Itemize
-Multiple materials
-\end_layout
-
-\begin_layout Itemize
-Nonlinear solver
-\end_layout
-
-\begin_layout Itemize
-Plane strain linearly elastic material
-\end_layout
-
-\begin_layout Itemize
-Plane Maxwell linear viscoelastic material
-\end_layout
-
-\begin_layout Itemize
-Kinematic fault interface conditions
-\end_layout
-
-\begin_deeper
-\begin_layout Itemize
-Static fault rupture
-\end_layout
-
-\begin_layout Itemize
-Multiple faults
-\end_layout
-
-\begin_layout Itemize
-Spatially variable coseismic slip
-\end_layout
-
-\begin_layout Itemize
-Spatially variable aseismic creep
-\end_layout
-
-\end_deeper
-\begin_layout Standard
-All of the files necessary to run the examples are contained in the directory
- 
-\family typewriter
-examples/2d/subduction.
-\end_layout
-
-\begin_layout Subsection
-Overview
-\end_layout
-
-\begin_layout Standard
-This tutorial examines quasi-static interseismic and coseismic deformation
- in 2-D for a subduction zone (see Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:tutorial:subduction:overview"
-
-\end_inset
-
-).
- It is based on the 2011 M9.0 Tohoku earthquake off the east coast of Japan.
- Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:tutorial:subduction:steps"
-
-\end_inset
-
- shows the three steps of increasing complexity.
- Step 1 focuses on the coseismic slip, Step 2 focuses on interseismic deformatio
-n, and Step 3 combines the two into a pseudo-earthquake cycle deformation
- simulation.
- 
-\end_layout
-
-\begin_layout Standard
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/cartoon_general.eps
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Cartoon of subduction zone example.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:tutorial:subduction:overview"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Tabular
-<lyxtabular version="3" rows="2" columns="3">
-<features tabularvalignment="middle">
-<column alignment="center" valignment="top" width="0">
-<column alignment="center" valignment="top" width="0">
-<column alignment="center" valignment="top" width="0">
-<row>
-<cell alignment="center" valignment="top" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Step 1
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Step 2
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Step 3
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-\begin_inset Graphics
-	filename figs/step01.eps
-	lyxscale 66
-	width 2in
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-\begin_inset Graphics
-	filename figs/step02.eps
-	lyxscale 66
-	width 2in
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-\begin_inset Graphics
-	filename figs/step03.eps
-	lyxscale 66
-	width 2in
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Diagram of fault slip and boundary conditions for each step in the subduction
- zone tutorial.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:tutorial:subduction:steps"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Mesh Description
-\end_layout
-
-\begin_layout Standard
-We construct the mesh in CUBIT by constructing the geometry, prescribing
- the discretization, running the mesher, and then grouping cells and vertices
- for boundary conditions and materials.
- We use the APREPRO programming language within the journal files to enable
- use of units and to set variables for values used many times.
- An appendix in the CUBIT documentation discusses the features available
- with APREPRO in CUBIT.
- The CUBIT commands are in three separate journal files.
- The main driver is in the journal file mesh_tri3.jou.
- It calls the journal file geometry.jou to construct the geometry and createbc.jou
- to setup the groups associated with boundary conditions and materials.
- The journal files are documented and describe the various steps outlined
- below.
-\end_layout
-
-\begin_layout Enumerate
-Create the geometry defining the domain.
-\end_layout
-
-\begin_deeper
-\begin_layout Enumerate
-Create points.
-\end_layout
-
-\begin_layout Enumerate
-Connect points into spline curves.
-\end_layout
-
-\begin_layout Enumerate
-Split curves to separate them into sections bounding surfaces.
- 
-\end_layout
-
-\begin_layout Enumerate
-Connect curves into surfaces.
-\end_layout
-
-\begin_layout Enumerate
-Stitch surfaces together.
-\end_layout
-
-\end_deeper
-\begin_layout Enumerate
-Define meshing scheme and cell size variation.
-\end_layout
-
-\begin_deeper
-\begin_layout Enumerate
-Define cell size along curves near fault.
-\end_layout
-
-\begin_layout Enumerate
-Increase cell size away from fault at a geometric rate (bias).
-\end_layout
-
-\end_deeper
-\begin_layout Enumerate
-Generate mesh.
-\end_layout
-
-\begin_layout Enumerate
-Create blocks for materials and nodesets for boundary conditions.
-\end_layout
-
-\begin_layout Enumerate
-Export mesh.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/subduction_tri3.png
-	lyxscale 50
-	width 4.5in
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Variable resolution finite-element mesh with triangular cells.
- The nominal cell size increases at a geometric rate of 1.2 away from the
- region of coseismic slip.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:tutorial:subduction:mesh"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Common Information
-\end_layout
-
-\begin_layout Standard
-As in the examples discussed in previous sections of these tutorials, we
- place parameters common to the three steps in the 
-\family typewriter
-pylithapp.cfg
-\family default
- file so that we do not have to duplicate them for each step.
- The settings contained in 
-\family typewriter
-pylithapp.cfg
-\family default
- for this problem consist of:
-\end_layout
-
-\begin_layout Description
-pylithapp.journal.info Settings that control the verbosity of the output written
- to stdout for the different components.
-\end_layout
-
-\begin_layout Description
-pylithapp.mesh_generator Settings that control mesh importing, such as the
- importer type, the filename, and the spatial dimension of the mesh.
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent Settings that control the problem, such as the total
- time, time step size, and spatial dimension.
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.materials Settings that control the material type,
- specify which material IDs are to be associated with a particular material
- type, and give the name of the spatial database containing the physical
-  properties for the material.
- The quadrature information is also given.
-\end_layout
-
-\begin_layout Description
-pylithapp.problem.formulation.output Settings related output of the solution
- over the domain and subdomain (ground surface).
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.materials.
-\shape italic
-MATERIAL
-\shape default
-.output Settings related to output of the state variables for material 
-\shape italic
-MATERIAL
-\shape default
-.
-\end_layout
-
-\begin_layout Description
-pylithapp.petsc PETSc settings to use for the problem, such as the preconditioner
- type.
-\end_layout
-
-\begin_layout Standard
-The physical properties for each material are specified in spatial database
- files.
- For example, the elastic properties for the continental crust are in mat_concru
-st.spatialdb.
- The provided spatial database files all use just a single point to specify
- uniform physical properties within each material.
- A good exercise is to alter the spatial database files with the physical
- properties to match PREM.
-\end_layout
-
-\begin_layout Subsection
-Step 1: Coseismic Slip Simulation
-\end_layout
-
-\begin_layout Standard
-The first example problem is earthquake rupture involving coseismic slip
- along the interface between the subducting slab and the continental crust
- and upper most portion of the mantle below the continental crust.
- The spatial variation of slip comes from a cross-section of Gavin Hayes'
- finite-source model 
-\begin_inset Flex URL
-status collapsed
-
-\begin_layout Plain Layout
-
-earthquake.usgs.gov/earthquakes/eqinthenews/2011/usc0001xgp/finite_fault.php
-\end_layout
-
-\end_inset
-
-.
- On the lateral and bottom boundaries of the domain, we fix the degrees
- of freedom perpendicular to the boundary as shown in Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:tutorial:subduction:steps"
-
-\end_inset
-
-.
- Parameter settings that augment those in 
-\family typewriter
-pylithapp.cfg
-\family default
- are contained in the file 
-\family typewriter
-step01.cfg
-\family default
-.
- These settings are:
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.formulation.time_step Adjust the total simulation time
- to 0 years (static simulation).
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent Specifies the array of boundary conditions.
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.bc.
-\shape italic
-BOUNDARY
-\shape default
- Defines the settings for boundary 
-\shape italic
-BOUNDARY
-\shape default
-, including which degrees of freedom are being constrained (x or y), the
- label (defined in
-\family typewriter
- mesh_tri3.exo
-\family default
-) corresponding to the nodeset in CUBIT, and a label to the boundary condition
- used in any error messages.
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.interfaces.fault Specify the coseismic slip along the
- interface between the oceanic crust and continental crust with a small
- amount of slip penetrating into the upper mantle.
-\end_layout
-
-\begin_layout Description
-pylithapp.problem.formulation.output.domain Gives the base filenames for HDF5
- output (
-\family typewriter
-for example, step01.h5
-\family default
-).
-\end_layout
-
-\begin_layout Standard
-We run this example by typing
-\end_layout
-
-\begin_layout LyX-Code
-pylith step01.cfg
-\end_layout
-
-\begin_layout Standard
-The problem will produce twelve pairs of HDF5/Xdmf files.
- The HDF5 files contain the data and the Xdmf files contain the metadata
- required by ParaView and Visit (and possibly other visualization tools
- that use Xdmf files) to access the mesh and data sets in the HDF5 files.
- The files include the solution over the domain and ground surface (two
- pairs of files), physical properties, stress, and strain within each material
- (eight pairs of files), and fault parameters, slip, and traction (two pairs
- of files).
- 
-\end_layout
-
-\begin_layout Standard
-Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:tutorial:subduction:step01"
-
-\end_inset
-
-, which was created using ParaView, displays the magnitude of the displacement
- field with the deformation exaggerated by a factor of 1000.
- We construct a three-dimensional displacement vector from the two-dimensional
- displacement components using the Calculator with the expression
-\end_layout
-
-\begin_layout LyX-Code
-displacement_x*iHat + displacement_y*jHat + 0*kHat
-\end_layout
-
-\begin_layout Standard
-where we select the displacement components from the Scalars drop-down menu
- and the iHat, jHat, and kHat values from the Calculator buttons.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/step01_soln.png
-	lyxscale 50
-	width 4.5in
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Solution for Step 1.
- The colors indicate the magnitude of the displacement and the deformation
- is exaggerated by a factor of 1000.
- 
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:tutorial:subduction:step01"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Step 2: Interseismic Deformation Simulation
-\end_layout
-
-\begin_layout Standard
-In this example we simulate the interseismic deformation associated with
- the oceanic crust subducting beneath the continental crust and into the
- mantle.
- We prescribe steady aseismic slip of 8 cm/yr along the interfaces between
- the oceanic crust and mantle with the interface between the oceanic crust
- and continental crust locked as shown in Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:tutorial:subduction:steps"
-
-\end_inset
-
-.
- We adjust the Dirichlet boundary conditions on the lateral edges and bottom
- of the domain by pinning only the portions of the boundaries in the mantle
- and continental crust (i.e., not part of the oceanic crust).
- Parameter settings that augment those in 
-\family typewriter
-pylithapp.cfg
-\family default
- are contained in the file 
-\family typewriter
-step02.cfg
-\family default
-.
- These settings include:
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.formulation.time_step Adjust the total simulation time
- to 100 years.
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent Specifies the array of boundary conditions.
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.bc.
-\shape italic
-BOUNDARY
-\shape default
- Defines the settings for boundary 
-\shape italic
-BOUNDARY
-\shape default
-, including which degrees of freedom are being constrained (x or y), the
- label (defined in
-\family typewriter
- mesh_tri3.exo
-\family default
-) corresponding to the nodeset in CUBIT, and a label to the boundary condition
- used in any error messages.
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.interfaces Specify the steady aseismic slip as a constant
- slip rate on the fault surfaces.
- 
-\end_layout
-
-\begin_layout Description
-pylithapp.problem.formulation.output.domain Gives the base filename for HDF5
- output (
-\family typewriter
-for example, step02.h5
-\family default
-).
-\end_layout
-
-\begin_layout Standard
-We run this example by typing
-\end_layout
-
-\begin_layout LyX-Code
-pylith step02.cfg
-\end_layout
-
-\begin_layout Standard
-The simulation will produce pairs of HDF5/Xdmf files with separate files
- for each material and fault interface.
- Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:tutorial:subduction:step02"
-
-\end_inset
-
-, which was created using ParaView, displays the magnitude of the displacement
- field with the deformation exaggerated by a factor of 1000.
- Using the animation features within ParaView or Visit you can illustrate
- how the continental crust near the trench subsides during the interseismic
- deformation.
- 
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/step02_soln.png
-	lyxscale 50
-	width 4.5in
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Solution for Step 2 at 100 years.
- The colors indicate the magnitude of the displacement and the deformation
- is exaggerated by a factor of 1000.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:tutorial:subduction:step02"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Step 3: Pseudo-earthquake Cycle Model
-\end_layout
-
-\begin_layout Standard
-This simulation combines 300 years of interseismic deformation from Step
- 2 with the coseismic deformation from Step 1 applied at 150 years to create
- a simple model of the earthquake cycle.
- Parameter settings that augment those in 
-\family typewriter
-pylithapp.cfg
-\family default
- are contained in the file 
-\family typewriter
-step03.cfg
-\family default
-.
- These settings include:
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.formulation.time_step Adjust the total simulation time
- to 300 years.
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent Specifies the array of boundary conditions.
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.bc.
-\shape italic
-BOUNDARY
-\shape default
- The Dirichlet boundary conditions match those in Step 2.
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.interfaces On the interface between the subducting
- oceanic crust and the mantle, we prescribe the same steady, aseismic slip
- as that in Step 2.
- On the interface along the top of the subducting oceanic crust and the
- continental crust and mantle we create two earthquake ruptures, The first
- rupture applies the coseismic slip form Step 1 at 150 years, while the
- second rupture prescribes the same steady, aseismic slip as in Step 2.
-\end_layout
-
-\begin_layout Description
-pylithapp.problem.formulation.output.domain Gives the base filename for HDF5
- output (
-\family typewriter
-for example, step03.h5
-\family default
-).
-\end_layout
-
-\begin_layout Standard
-We run this example by typing
-\end_layout
-
-\begin_layout LyX-Code
-pylith step03.cfg
-\end_layout
-
-\begin_layout Standard
-The simulation will produce pairs of HDF5/Xdmf files with separate files
- for each material and fault interface.
- Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:tutorial:subduction:step03"
-
-\end_inset
-
-, which was created using ParaView, displays the magnitude of the displacement
- field with the deformation exaggerated by a factor of 1000.
- Using the animation features within ParaView or Visit you can illustrate
- how the continental crust near the trench rebounds during the earthquake
- after subsiding during the interseismic deformation.
- 
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/step03_soln.png
-	lyxscale 50
-	width 4.5in
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Solution for Step 3 at 150 years (immediately following the earthquake rupture).
- The colors indicate the magnitude of the displacement and the deformation
- is exaggerated by a factor of 1000.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:tutorial:subduction:step03"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Suggested Variations
-\end_layout
-
-\begin_layout Standard
-The list below includes some suggested modifications to the problem that
- will allow you to become more familiar with PyLith while examining some
- interesting physics.
-\end_layout
-
-\begin_layout Itemize
-Change the resolution of the mesh by editing the mesh_tri3.jou journal file.
- Change the resolution and bias factor.
-\end_layout
-
-\begin_layout Itemize
-Add depth dependent viscosity to the mantle and crust.
- This requires using the linear Maxwell plane strain bulk constitutive model
- in the crust as well and creating spatial databases that include viscosity
- for the crust.
- Specifying a depth dependent variation in the parameters will require adding
- points, updating num-locs accordingly, and changing data-dim to 1.
-\end_layout
-
-\begin_layout Itemize
-Modify the spatial database files for the material properties to use depth-depen
-dent elastic properties based on PREM (Dziewonski and Anderson, 1981, 10.1016/003
-1-9201(81)90046-7).
- See 
-\begin_inset Flex URL
-status open
-
-\begin_layout Plain Layout
-
-geophysics.ou.edu/solid_earth/prem.html
-\end_layout
-
-\end_inset
-
- for a simple table of values.
- Add points, update num-locs accordingly, and change data-dim to be 1.
-\end_layout
-
-\begin_layout Itemize
-Modify the CUBIT journal files to use quad4 cells rather than tri3 cells.
- This requires using the pave mesh scheme.
-\end_layout
-
-\begin_layout Itemize
-Create a simulation with multiple earthquake cycles by lengthening the duration
- of the simulation and adding additional earthquake ruptures.
- See 
-\family typewriter
-examples/3d/hex8/step06.cfg
-\family default
- for an example with multiple earthquake ruptures.
- Examine spinup towards a steady-state solution.
-\end_layout
-
-\end_body
-\end_document
+#LyX 2.0 created this file. For more info see http://www.lyx.org/
+\lyxformat 413
+\begin_document
+\begin_header
+\textclass book
+\begin_preamble
+
+\end_preamble
+\use_default_options false
+\maintain_unincluded_children false
+\language english
+\language_package default
+\inputencoding latin1
+\fontencoding global
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry true
+\use_amsmath 0
+\use_esint 0
+\use_mhchem 1
+\use_mathdots 1
+\cite_engine basic
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\use_refstyle 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\leftmargin 1in
+\topmargin 1in
+\rightmargin 1in
+\bottommargin 1in
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\quotes_language english
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\end_header
+
+\begin_body
+
+\begin_layout Section
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Tutorial-Subduction"
+
+\end_inset
+
+Tutorial for Slip on a Subduction Zone
+\end_layout
+
+\begin_layout Standard
+PyLith features discussed in this tutorial:
+\end_layout
+
+\begin_layout Itemize
+Static solution
+\end_layout
+
+\begin_layout Itemize
+Quasi-static solution
+\end_layout
+
+\begin_layout Itemize
+CUBIT mesh generation
+\end_layout
+
+\begin_deeper
+\begin_layout Itemize
+Nonplanar geometry
+\end_layout
+
+\begin_layout Itemize
+Variable mesh resolution
+\end_layout
+
+\begin_layout Itemize
+APREPRO programming language
+\end_layout
+
+\end_deeper
+\begin_layout Itemize
+Linear triangular cells
+\end_layout
+
+\begin_layout Itemize
+HDF5 output
+\end_layout
+
+\begin_layout Itemize
+Dirichlet displacement and velocity boundary conditions
+\end_layout
+
+\begin_layout Itemize
+ZeroDispDB spatial database
+\end_layout
+
+\begin_layout Itemize
+SimpleDB spatial database
+\end_layout
+
+\begin_layout Itemize
+UniformDB spatial database
+\end_layout
+
+\begin_layout Itemize
+Multiple materials
+\end_layout
+
+\begin_layout Itemize
+Nonlinear solver
+\end_layout
+
+\begin_layout Itemize
+Plane strain linearly elastic material
+\end_layout
+
+\begin_layout Itemize
+Plane Maxwell linear viscoelastic material
+\end_layout
+
+\begin_layout Itemize
+Prescribed slip
+\end_layout
+
+\begin_deeper
+\begin_layout Itemize
+Static fault rupture
+\end_layout
+
+\begin_layout Itemize
+Multiple faults
+\end_layout
+
+\begin_layout Itemize
+Spatially variable coseismic slip
+\end_layout
+
+\begin_layout Itemize
+Spatially variable aseismic creep
+\end_layout
+
+\end_deeper
+\begin_layout Itemize
+Afterslip via fault friction
+\end_layout
+
+\begin_deeper
+\begin_layout Itemize
+Static fault rupture
+\end_layout
+
+\begin_layout Itemize
+Static friction
+\end_layout
+
+\end_deeper
+\begin_layout Standard
+All of the files necessary to run the examples are contained in the directory
+ 
+\family typewriter
+examples/2d/subduction.
+\end_layout
+
+\begin_layout Subsection
+Overview
+\end_layout
+
+\begin_layout Standard
+This tutorial examines quasi-static interseismic and coseismic deformation
+ in 2D for a subduction zone (see Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:tutorial:subduction:overview"
+
+\end_inset
+
+).
+ It is based on the 2011 M9.0 Tohoku earthquake off the east coast of Japan.
+ Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:tutorial:subduction:steps"
+
+\end_inset
+
+ shows the three steps of increasing complexity.
+ Step 1 focuses on the coseismic slip, Step 2 focuses on interseismic deformatio
+n, and Step 3 combines the two into a pseudo-earthquake cycle deformation
+ simulation.
+ Step 4 focuses on using the change in tractions from Step 1 to construct
+ a simulation with afterslip controlled by frictional sliding.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/cartoon_general.eps
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Cartoon of subduction zone example.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:tutorial:subduction:overview"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Tabular
+<lyxtabular version="3" rows="2" columns="3">
+<features tabularvalignment="middle">
+<column alignment="center" valignment="top" width="0">
+<column alignment="center" valignment="top" width="0">
+<column alignment="center" valignment="top" width="0">
+<row>
+<cell alignment="center" valignment="top" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Step 1
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Step 2
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Step 3
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset Graphics
+	filename figs/step01.eps
+	lyxscale 66
+	width 2in
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset Graphics
+	filename figs/step02.eps
+	lyxscale 66
+	width 2in
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset Graphics
+	filename figs/step03.eps
+	lyxscale 66
+	width 2in
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Diagram of fault slip and boundary conditions for each step in the subduction
+ zone tutorial.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:tutorial:subduction:steps"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Mesh Description
+\end_layout
+
+\begin_layout Standard
+We construct the mesh in CUBIT by constructing the geometry, prescribing
+ the discretization, running the mesher, and then grouping cells and vertices
+ for boundary conditions and materials.
+ We use the APREPRO programming language within the journal files to enable
+ use of units and to set variables for values used many times.
+ An appendix in the CUBIT documentation discusses the features available
+ with APREPRO in CUBIT.
+ The CUBIT commands are in three separate journal files.
+ The main driver is in the journal file 
+\family typewriter
+mesh_tri3.jou
+\family default
+.
+ It calls the journal file 
+\family typewriter
+geometry.jou
+\family default
+ to construct the geometry and 
+\family typewriter
+createbc.jou
+\family default
+ to set up the groups associated with boundary conditions and materials.
+ The journal files are documented and describe the various steps outlined
+ below.
+\end_layout
+
+\begin_layout Enumerate
+Create the geometry defining the domain.
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+Create points.
+\end_layout
+
+\begin_layout Enumerate
+Connect points into spline curves.
+\end_layout
+
+\begin_layout Enumerate
+Split curves to separate them into sections bounding surfaces.
+ 
+\end_layout
+
+\begin_layout Enumerate
+Connect curves into surfaces.
+\end_layout
+
+\begin_layout Enumerate
+Stitch surfaces together.
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+Define meshing scheme and cell size variation.
+\end_layout
+
+\begin_deeper
+\begin_layout Enumerate
+Define cell size along curves near fault.
+\end_layout
+
+\begin_layout Enumerate
+Increase cell size away from fault at a geometric rate (bias).
+\end_layout
+
+\end_deeper
+\begin_layout Enumerate
+Generate mesh.
+\end_layout
+
+\begin_layout Enumerate
+Create blocks for materials and nodesets for boundary conditions.
+\end_layout
+
+\begin_layout Enumerate
+Export mesh.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/subduction_tri3.png
+	lyxscale 50
+	width 4.5in
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Variable resolution finite-element mesh with triangular cells.
+ The nominal cell size increases at a geometric rate of 1.2 away from the
+ region of coseismic slip.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:tutorial:subduction:mesh"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Common Information
+\end_layout
+
+\begin_layout Standard
+As in the examples discussed in previous sections of these tutorials, we
+ place parameters common to the three steps in the 
+\family typewriter
+pylithapp.cfg
+\family default
+ file so that we do not have to duplicate them for each step.
+ The settings contained in 
+\family typewriter
+pylithapp.cfg
+\family default
+ for this problem consist of:
+\end_layout
+
+\begin_layout Description
+pylithapp.journal.info Settings that control the verbosity of the output written
+ to stdout for the different components.
+\end_layout
+
+\begin_layout Description
+pylithapp.mesh_generator Settings that control mesh importing, such as the
+ importer type, the filename, and the spatial dimension of the mesh.
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent Settings that control the problem, such as the total
+ time, time-step size, and spatial dimension.
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.materials Settings that control the material type,
+ specify which material IDs are to be associated with a particular material
+ type, and give the name of the spatial database containing the physical
+ properties for the material.
+ The quadrature information is also given.
+\end_layout
+
+\begin_layout Description
+pylithapp.problem.formulation.output Settings related output of the solution
+ over the domain and subdomain (ground surface).
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.materials.
+\shape italic
+MATERIAL
+\shape default
+.output Settings related to output of the state variables for material 
+\shape italic
+MATERIAL
+\shape default
+.
+\end_layout
+
+\begin_layout Description
+pylithapp.petsc PETSc settings to use for the problem, such as the preconditioner
+ type.
+\end_layout
+
+\begin_layout Standard
+The physical properties for each material are specified in spatial database
+ files.
+ For example, the elastic properties for the continental crust are in 
+\family typewriter
+mat_concrust.spatialdb
+\family default
+.
+ The provided spatial database files all use just a single point to specify
+ uniform physical properties within each material.
+ A good exercise is to alter the spatial database files with the physical
+ properties to match PREM.
+\end_layout
+
+\begin_layout Subsection
+Step 1: Coseismic Slip Simulation
+\end_layout
+
+\begin_layout Standard
+The first example problem is earthquake rupture involving coseismic slip
+ along the interface between the subducting slab and the continental crust
+ and uppermost portion of the mantle below the continental crust.
+ The spatial variation of slip comes from a cross-section of Gavin Hayes'
+ finite-source model 
+\begin_inset Flex URL
+status collapsed
+
+\begin_layout Plain Layout
+
+earthquake.usgs.gov/earthquakes/eqinthenews/2011/usc0001xgp/finite_fault.php
+\end_layout
+
+\end_inset
+
+.
+ On the lateral and bottom boundaries of the domain, we fix the degrees
+ of freedom perpendicular to the boundary as shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:tutorial:subduction:steps"
+
+\end_inset
+
+.
+ Parameter settings that augment those in 
+\family typewriter
+pylithapp.cfg
+\family default
+ are contained in the file 
+\family typewriter
+step01.cfg
+\family default
+.
+ These settings are:
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.formulation.time_step Adjust the total simulation time
+ to 0 years (static simulation).
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent Specifies the array of boundary conditions.
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.bc.
+\shape italic
+BOUNDARY
+\shape default
+ Defines the settings for boundary 
+\shape italic
+BOUNDARY
+\shape default
+, including which degrees of freedom are being constrained (x or y), the
+ label (defined in
+\family typewriter
+ mesh_tri3.exo
+\family default
+) corresponding to the nodeset in CUBIT, and a label to the boundary condition
+ used in any error messages.
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.interfaces.fault Specify the coseismic slip along the
+ interface between the oceanic crust and continental crust with a small
+ amount of slip penetrating into the upper mantle.
+\end_layout
+
+\begin_layout Description
+pylithapp.problem.formulation.output.domain Gives the base filenames for HDF5
+ output (for example, 
+\family typewriter
+step01.h5
+\family default
+).
+\end_layout
+
+\begin_layout Standard
+We run this example by typing
+\end_layout
+
+\begin_layout LyX-Code
+pylith step01.cfg
+\end_layout
+
+\begin_layout Standard
+The problem will produce twelve pairs of HDF5/Xdmf files.
+ The HDF5 files contain the data and the Xdmf files contain the metadata
+ required by ParaView and Visit (and possibly other visualization tools
+ that use Xdmf files) to access the mesh and data sets in the HDF5 files.
+ The files include the solution over the domain and ground surface (two
+ pairs of files), physical properties, stress, and strain within each material
+ (eight pairs of files), and fault parameters, slip, and traction (two pairs
+ of files).
+ 
+\end_layout
+
+\begin_layout Standard
+Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:tutorial:subduction:step01"
+
+\end_inset
+
+, which was created using ParaView, displays the magnitude of the displacement
+ field with the deformation exaggerated by a factor of 1000.
+ We construct a three-dimensional displacement vector from the two-dimensional
+ displacement components using the Calculator with the expression
+\end_layout
+
+\begin_layout LyX-Code
+displacement_x*iHat + displacement_y*jHat
+\end_layout
+
+\begin_layout Standard
+where we select the displacement components from the Scalars drop-down menu
+ and the iHat, jHat, and kHat values from the Calculator buttons.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step01_soln.png
+	lyxscale 50
+	width 4.5in
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Solution for Step 1.
+ The colors indicate the magnitude of the displacement, and the deformation
+ is exaggerated by a factor of 1000.
+ 
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:tutorial:subduction:step01"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Step 2: Interseismic Deformation Simulation
+\end_layout
+
+\begin_layout Standard
+In this example we simulate the interseismic deformation associated with
+ the oceanic crust subducting beneath the continental crust and into the
+ mantle.
+ We prescribe steady aseismic slip of 8 cm/yr along the interfaces between
+ the oceanic crust and mantle with the interface between the oceanic crust
+ and continental crust locked as shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:tutorial:subduction:steps"
+
+\end_inset
+
+.
+ We adjust the Dirichlet boundary conditions on the lateral edges and bottom
+ of the domain by pinning only the portions of the boundaries in the mantle
+ and continental crust (i.e., not part of the oceanic crust).
+ Parameter settings that augment those in 
+\family typewriter
+pylithapp.cfg
+\family default
+ are contained in the file 
+\family typewriter
+step02.cfg
+\family default
+.
+ These settings include:
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.formulation.time_step Adjust the total simulation time
+ to 100 years.
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent Specifies the array of boundary conditions.
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.bc.
+\shape italic
+BOUNDARY
+\shape default
+ Defines the settings for boundary 
+\shape italic
+BOUNDARY
+\shape default
+, including which degrees of freedom are being constrained (x or y), the
+ label (defined in
+\family typewriter
+ mesh_tri3.exo
+\family default
+) corresponding to the nodeset in CUBIT, and a label to the boundary condition
+ used in any error messages.
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.interfaces Specify the steady aseismic slip as a constant
+ slip rate on the fault surfaces.
+ 
+\end_layout
+
+\begin_layout Description
+pylithapp.problem.formulation.output.domain Gives the base filename for HDF5
+ output (for example, 
+\family typewriter
+step02.h5
+\family default
+).
+\end_layout
+
+\begin_layout Standard
+We run this example by typing
+\end_layout
+
+\begin_layout LyX-Code
+pylith step02.cfg
+\end_layout
+
+\begin_layout Standard
+The simulation will produce pairs of HDF5/Xdmf files with separate files
+ for each material and fault interface.
+ Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:tutorial:subduction:step02"
+
+\end_inset
+
+, which was created using ParaView, displays the magnitude of the displacement
+ field with the deformation exaggerated by a factor of 1000.
+ Using the animation features within ParaView or Visit you can illustrate
+ how the continental crust near the trench subsides during the interseismic
+ deformation.
+ 
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step02_soln.png
+	lyxscale 50
+	width 4.5in
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Solution for Step 2 at 100 years.
+ The colors indicate the magnitude of the displacement, and the deformation
+ is exaggerated by a factor of 1000.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:tutorial:subduction:step02"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Step 3: Pseudo-Earthquake Cycle Model
+\end_layout
+
+\begin_layout Standard
+This simulation combines 300 years of interseismic deformation from Step
+ 2 with the coseismic deformation from Step 1 applied at 150 years to create
+ a simple model of the earthquake cycle.
+ Parameter settings that augment those in 
+\family typewriter
+pylithapp.cfg
+\family default
+ are contained in the file 
+\family typewriter
+step03.cfg
+\family default
+.
+ These settings include:
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.formulation.time_step Adjust the total simulation time
+ to 300 years.
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent Specifies the array of boundary conditions.
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.bc.
+\shape italic
+BOUNDARY
+\shape default
+ The Dirichlet boundary conditions match those in Step 2.
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.interfaces On the interface between the subducting
+ oceanic crust and the mantle, we prescribe the same steady, aseismic slip
+ as that in Step 2.
+ On the interface along the top of the subducting oceanic crust and the
+ continental crust and mantle we create two earthquake ruptures, The first
+ rupture applies the coseismic slip form Step 1 at 150 years, while the
+ second rupture prescribes the same steady, aseismic slip as in Step 2.
+\end_layout
+
+\begin_layout Description
+pylithapp.problem.formulation.output.domain Gives the base filename for HDF5
+ output (for example, 
+\family typewriter
+step03.h5
+\family default
+).
+\end_layout
+
+\begin_layout Standard
+We run this example by typing
+\end_layout
+
+\begin_layout LyX-Code
+pylith step03.cfg
+\end_layout
+
+\begin_layout Standard
+The simulation will produce pairs of HDF5/Xdmf files with separate files
+ for each material and fault interface.
+ Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:tutorial:subduction:step03"
+
+\end_inset
+
+, which was created using ParaView, displays the magnitude of the displacement
+ field with the deformation exaggerated by a factor of 1000.
+ Using the animation features within ParaView or Visit you can illustrate
+ how the continental crust near the trench rebounds during the earthquake
+ after subsiding during the interseismic deformation.
+ 
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step03_soln.png
+	lyxscale 50
+	width 4.5in
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Solution for Step 3 at 150 years (immediately following the earthquake rupture).
+ The colors indicate the magnitude of the displacement, and the deformation
+ is exaggerated by a factor of 1000.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:tutorial:subduction:step03"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Step 4: Frictional Afterslip Simulation
+\end_layout
+
+\begin_layout Standard
+This simulation demonstrates how to combine the change in tractions associated
+ with coseismic slip with a background stress field to compute afterslip
+ controlled by static friction.
+ The Python script 
+\family typewriter
+afterslip_tractions.py
+\family default
+ will create a spatial database file with initial tractions based on the
+ change in tractions from Step 1 and a background stress field.
+ The background stress field is simply normal tractions consistent with
+ the overburden (lithostatic load) for a uniform half-space and shear tractions
+ consistent with a coefficient of friction of 0.6.
+ The 
+\family typewriter
+afterslip_tractions.spatialdb
+\family default
+ file is provided, so you do not need to run the Python script 
+\family typewriter
+afterslip_tractions.py
+\family default
+; however, you can do so by typing
+\end_layout
+
+\begin_layout LyX-Code
+python afterslip_tractions.py
+\end_layout
+
+\begin_layout Standard
+We provide 2.0 MPa of strength excess associated with the background stress
+ field by using a cohesion of 2.0 MPa in the static friction model.
+ Slip will occur in regions where the coseismic slip increased the shear
+ tractions by more than 2.0 MPa.
+ On the lateral and bottom boundaries of the domain, we fix the degrees
+ of freedom perpendicular to the boundary as shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:tutorial:subduction:steps"
+
+\end_inset
+
+.
+ Parameter settings that augment those in 
+\family typewriter
+pylithapp.cfg
+\family default
+ are contained in the file 
+\family typewriter
+step04.cfg
+\family default
+.
+ These settings are:
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.formulation.time_step Adjust the total simulation time
+ to 0 years (static simulation).
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent Selects the nonlinear solver and specifies the array
+ of boundary conditions.
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.bc.
+\shape italic
+BOUNDARY
+\shape default
+ Defines the settings for boundary 
+\shape italic
+BOUNDARY
+\shape default
+, including which degrees of freedom are being constrained (x or y), the
+ label (defined in
+\family typewriter
+ mesh_tri3.exo
+\family default
+) corresponding to the nodeset in CUBIT, and a label to the boundary condition
+ used in any error messages.
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.interfaces.fault Specify a fault with a fault constitutive
+ model (static friction) and initial fault tractions.
+ 
+\end_layout
+
+\begin_layout Description
+pylithapp.problem.formulation.output.domain Gives the base filenames for HDF5
+ output (for example, 
+\family typewriter
+step04.h5
+\family default
+).
+\end_layout
+
+\begin_layout Standard
+We run this example by typing
+\end_layout
+
+\begin_layout LyX-Code
+pylith step04.cfg
+\end_layout
+
+\begin_layout Standard
+The problem will produce twelve pairs of HDF5/Xdmf files.
+ The HDF5 files contain the data and the Xdmf files contain the metadata
+ required by ParaView and Visit (and possibly other visualization tools
+ that use Xdmf files) to access the mesh and data sets in the HDF5 files.
+ The files include the solution over the domain and ground surface (two
+ pairs of files), physical properties, stress, and strain within each material
+ (eight pairs of files), and fault parameters, slip, and traction (two pairs
+ of files).
+ 
+\end_layout
+
+\begin_layout Standard
+Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:tutorial:subduction:step04"
+
+\end_inset
+
+, which was created using ParaView, displays the magnitude of the displacement
+ field with the original configuration.
+ Slip occurs down-dip from the coseismic slip as well as three areas with
+ sharp gradients in slip, including the trench.
+ The location of the afterslip can be shifted by changing the spatial variation
+ of the coseismic slip and background stress field.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step01_soln.png
+	lyxscale 50
+	width 4.5in
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Solution for Step 4.
+ The colors indicate the magnitude of the displacement.
+ 
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:tutorial:subduction:step04"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Suggested Variations
+\end_layout
+
+\begin_layout Standard
+The list below includes some suggested modifications to the problem that
+ will allow you to become more familiar with PyLith while examining some
+ interesting physics.
+\end_layout
+
+\begin_layout Itemize
+Change the resolution of the mesh by editing the 
+\family typewriter
+mesh_tri3.jou
+\family default
+ journal file.
+ Change the resolution and bias factor.
+\end_layout
+
+\begin_layout Itemize
+Add depth dependent viscosity to the mantle and crust.
+ This requires using the linear Maxwell plane strain bulk constitutive model
+ in the crust as well and creating spatial databases that include viscosity
+ for the crust.
+ Specifying a depth dependent variation in the parameters will require adding
+ points, updating num-locs accordingly, and changing data-dim to 1.
+\end_layout
+
+\begin_layout Itemize
+Modify the spatial database files for the material properties to use depth-depen
+dent elastic properties based on PREM (Dziewonski and Anderson, 1981, 10.1016/003
+1-9201(81)90046-7).
+ See 
+\begin_inset Flex URL
+status open
+
+\begin_layout Plain Layout
+
+geophysics.ou.edu/solid_earth/prem.html
+\end_layout
+
+\end_inset
+
+ for a simple table of values.
+ Add points, update num-locs accordingly, and change data-dim to 1.
+\end_layout
+
+\begin_layout Itemize
+Modify the CUBIT journal files to use quad4 cells rather than tri3 cells.
+ This requires using the pave mesh scheme.
+\end_layout
+
+\begin_layout Itemize
+Create a simulation with multiple earthquake cycles by lengthening the duration
+ of the simulation and adding additional earthquake ruptures.
+ See 
+\family typewriter
+examples/3d/hex8/step06.cfg
+\family default
+ for an example with multiple earthquake ruptures.
+ Examine spinup towards a steady-state solution.
+\end_layout
+
+\end_body
+\end_document

Modified: short/3D/PyLith/trunk/doc/userguide/tutorials/tutorials.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/tutorials/tutorials.lyx	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/doc/userguide/tutorials/tutorials.lyx	2012-06-25 17:37:03 UTC (rev 20406)
@@ -256,6 +256,13 @@
 \end_inset
 
 
+\begin_inset CommandInset include
+LatexCommand input
+filename "greensfns2d/greensfns2d.lyx"
+
+\end_inset
+
+
 \end_layout
 
 \begin_layout Section
@@ -263,24 +270,6 @@
 \end_layout
 
 \begin_layout Standard
-The 
-\family typewriter
-examples
-\family default
- directory also contains an example of using PyLith to compute Green's functions
- associated with slip at points on a fault surface in the 
-\family typewriter
-greensfns
-\family default
- directory.
- The files associated with this example contain comments to explain how
- the simulation is setup.
- Once you understand the examples described in detail in the previous sections
- of this chapter, you should have little trouble understanding this additional
- one.
-\end_layout
-
-\begin_layout Standard
 The CIG subversion software repository 
 \begin_inset Flex URL
 status collapsed

Modified: short/3D/PyLith/trunk/doc/userguide/tutorials/twohex8/twohex8.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/tutorials/twohex8/twohex8.lyx	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/doc/userguide/tutorials/twohex8/twohex8.lyx	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,855 +1,855 @@
-#LyX 2.0 created this file. For more info see http://www.lyx.org/
-\lyxformat 413
-\begin_document
-\begin_header
-\textclass book
-\begin_preamble
-
-\end_preamble
-\use_default_options false
-\maintain_unincluded_children false
-\language english
-\language_package default
-\inputencoding latin1
-\fontencoding global
-\font_roman default
-\font_sans default
-\font_typewriter default
-\font_default_family default
-\use_non_tex_fonts false
-\font_sc false
-\font_osf false
-\font_sf_scale 100
-\font_tt_scale 100
-
-\graphics default
-\default_output_format default
-\output_sync 0
-\bibtex_command default
-\index_command default
-\paperfontsize default
-\spacing single
-\use_hyperref false
-\papersize default
-\use_geometry true
-\use_amsmath 0
-\use_esint 0
-\use_mhchem 1
-\use_mathdots 1
-\cite_engine basic
-\use_bibtopic false
-\use_indices false
-\paperorientation portrait
-\suppress_date false
-\use_refstyle 0
-\index Index
-\shortcut idx
-\color #008000
-\end_index
-\leftmargin 1in
-\topmargin 1in
-\rightmargin 1in
-\bottommargin 2in
-\secnumdepth 3
-\tocdepth 3
-\paragraph_separation indent
-\paragraph_indentation default
-\quotes_language english
-\papercolumns 1
-\papersides 1
-\paperpagestyle default
-\tracking_changes false
-\output_changes false
-\html_math_output 0
-\html_css_as_file 0
-\html_be_strict false
-\end_header
-
-\begin_body
-
-\begin_layout Section
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:Tutorial-Two-hexahedra"
-
-\end_inset
-
-Tutorial Using Two Hexahedra
-\end_layout
-
-\begin_layout Standard
-PyLith features discussed in this tutorial:
-\end_layout
-
-\begin_layout Itemize
-Quasi-static solution
-\end_layout
-
-\begin_layout Itemize
-Mesh ASCII format
-\end_layout
-
-\begin_layout Itemize
-Dirichlet boundary conditions
-\end_layout
-
-\begin_layout Itemize
-Kinematic fault interface conditions
-\end_layout
-
-\begin_layout Itemize
-Maxwell viscoelastic material
-\end_layout
-
-\begin_layout Itemize
-VTK output
-\end_layout
-
-\begin_layout Itemize
-Trilinear hexahedral cells
-\end_layout
-
-\begin_layout Itemize
-SimpleDB spatial database
-\end_layout
-
-\begin_layout Itemize
-ZeroDispDB spatial database
-\end_layout
-
-\begin_layout Itemize
-UniformDB spatial database
-\end_layout
-
-\begin_layout Itemize
-Filtering of cell output fields
-\end_layout
-
-\begin_layout Standard
-All of the files necessary to run the examples are contained in the directory
- 
-\family typewriter
-examples/twocells/twohex8.
-\end_layout
-
-\begin_layout Subsection
-Overview
-\end_layout
-
-\begin_layout Standard
-This tutorial is a simple 3D example of a quasi-static finite element problem.
- It is a mesh composed of two trilinear hexahedra subject to displacement
- boundary conditions.
- One primary difference between this example and the example with two tetrahedra
- is that we use a Maxwell viscoelastic material model, and run the model
- for 10 time steps of 0.1 year each.
- Due to the simple geometry of the problem, the mesh may be constructed
- by hand, using PyLith mesh ASCII format to describe the mesh.
- In this tutorial, we will walk through the steps necessary to construct,
- run, and view three problems that use the same mesh.
- In addition to this manual, each of the files for the example problems
- includes extensive comments.
-\end_layout
-
-\begin_layout Subsection
-Mesh Description
-\end_layout
-
-\begin_layout Standard
-The mesh consists of two hexahedra forming a rectangular prism (Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:twohex8-mesh"
-
-\end_inset
-
-).
- The mesh geometry and topology are described in the file 
-\family typewriter
-twohex8.mesh
-\family default
-, which is in PyLith mesh ASCII format.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/twohex8-mesh.eps
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Mesh composed of two trilinear hexahedral cells used for the example problems.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:twohex8-mesh"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Additional Common Information
-\end_layout
-
-\begin_layout Standard
-In addition to the mesh, the three example problems share additional information
-, which we place in 
-\family typewriter
-pylithapp.cfg
-\family default
-.
- Note that in this example we make use of the UniformDB spatial database,
- rather than the SimpleDB implementation used to specify the physical properties
- in the other example problems.
- For simple distributions of material properties (or boundary conditions),
- this implementation is often easier to use.
- Examining 
-\family typewriter
-pylithapp.cfg
-\family default
-, we specify the material information with the following set of parameters:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.materials]
-\end_layout
-
-\begin_layout LyX-Code
-material = pylith.materials.MaxwellIsotropic3D
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.materials.material]
-\end_layout
-
-\begin_layout LyX-Code
-label = viscoelastic material
-\end_layout
-
-\begin_layout LyX-Code
-id = 1
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-db = spatialdata.spatialdb.UniformDB
-\end_layout
-
-\begin_layout LyX-Code
-db.values = [vp,vs,density,viscosity]
-\end_layout
-
-\begin_layout LyX-Code
-db.data = [5773.502691896258*m/s, 3333.333333333333*m/s, 2700.0*kg/m**3, 1.0e18*Pa*s]
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-quadrature.cell = pylith.feassemble.FIATLagrange
-\end_layout
-
-\begin_layout LyX-Code
-quadrature.cell.dimension = 3
-\end_layout
-
-\begin_layout Subsection
-Axial Displacement Example
-\end_layout
-
-\begin_layout Standard
-The first example problem is extension of the mesh along the long axis of
- the prism.
- Parameter settings that override or augment those in 
-\family typewriter
-pylithapp.cfg
-\family default
- are contained in the file 
-\family typewriter
-axialdisp.cfg
-\family default
-.
- These settings include:
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.bc.x_neg Defines which degrees of freedom are being
- constrained (x, y, and z), gives the label (
-\family typewriter
-x_neg
-\family default
-, defined in 
-\family typewriter
-twohex8.mesh
-\family default
-) defining the points desired, assigns a label to the boundary condition
- set, and gives the name of the spatial database with the values for the
- Dirichlet boundary conditions (
-\family typewriter
-axialdisp.spatialdb
-\family default
-).
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.bc.x_pos Defines which degrees of freedom are being
- constrained (x, y, and z), gives the label (
-\family typewriter
-x_
-\family default
-pos, defined in 
-\family typewriter
-twohex8.mesh
-\family default
-) defining the points desired, assigns a label to the boundary condition
- set, and gives the name of the spatial database with the values for the
- Dirichlet boundary conditions (
-\family typewriter
-axialdisp.spatialdb
-\family default
-).
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.materials.material.output Defines the filter to be used
- when writing cell state variables (average over the quadrature points of
- the cell), specifies which state variables and properties to output, gives
- the base filename for state variable output files, and defines the format
- to use when defining the output filenames for each time step.
-\end_layout
-
-\begin_layout Standard
-The values for the Dirichlet boundary conditions are given in the file 
-\family typewriter
-axialdisp.spatialdb
-\family default
-, as specified in 
-\family typewriter
-axialdisp.cfg
-\family default
-.
- Since data are being specified using two control points (rather than being
- uniform over the mesh, for example), the data dimension is one.
- Note that since we are using a Maxwell viscoelastic model, we request that
- additional state variables and properties be output:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.materials.material.output]
-\end_layout
-
-\begin_layout LyX-Code
-cell_data_fields = [total_strain,viscous_strain,stress]
-\end_layout
-
-\begin_layout LyX-Code
-cell_info_fields = [mu,lambda,density,maxwell_time]
-\end_layout
-
-\begin_layout Standard
-The files containing common information (
-\family typewriter
-twohex8.mesh
-\family default
-, 
-\family typewriter
-pylithapp.cfg
-\family default
-) along with the problem-specific files (
-\family typewriter
-axialdisp.cfg
-\family default
-, 
-\family typewriter
-axialdisp.spatialdb
-\family default
-) provide a complete description of the problem, and we can then run this
- example by typing
-\end_layout
-
-\begin_layout LyX-Code
-pylith axialdisp.cfg
-\end_layout
-
-\begin_layout Standard
-Once the problem has run, two sets of files will be produced, along with
- one additional file.
- The first set will have filenames such as 
-\family typewriter
-axialdisp_txxxx.vtk
-\family default
-, where 
-\family typewriter
-xxxx
-\family default
- is the time for which output has been produced.
- In 
-\family typewriter
-axialdisp.cfg
-\family default
- we specify that the time stamp should be normalized by a value of 1.0 years
- and the time stamp should be of the form 
-\family typewriter
-xxx.x
-\family default
- (recall that the decimal point is removed in the filename).
- As a result, the filenames contain the time in tenths of a year.
- These files will contain mesh information as well as displacement values
- for the mesh vertices at the given time.
- The second set of files will have names such as 
-\family typewriter
-axialdisp-statevars_txxxx.vtk
-\family default
-, where 
-\family typewriter
-xxxx
-\family default
- is the time in tenths of a year (as above) for which output has been produced.
- These files contain the state variables for each cell at the given time.
- The default fields are the total strain and stress fields; however, we
- have also requested the viscous strains.
- As specified in 
-\family typewriter
-axialdisp.cfg
-\family default
-, these values are averaged over each cell.
- The final file (
-\family typewriter
-axialdisp-statevars_info.vtk
-\family default
-) gives the material properties used for the problem.
- We have requested all of the properties available for this material model
- (
-\family typewriter
-mu
-\family default
-, 
-\family typewriter
-lambda
-\family default
-, 
-\family typewriter
-density
-\family default
-, 
-\family typewriter
-maxwell_time
-\family default
-).
- If the problem ran correctly, you should be able to generate a figure such
- as Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:twohex8-axial"
-
-\end_inset
-
-, which was generated using ParaView.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/axialdisp.jpg
-	lyxscale 50
-	scale 33
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Color contours and vectors of displacement for the axial displacement example
- using a mesh composed of two trilinear hexahedral cells.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:twohex8-axial"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Shear Displacement Example
-\end_layout
-
-\begin_layout Standard
-The second example problem is shearing of the mesh in the y direction.
- Parameter settings that override or augment those in 
-\family typewriter
-pylithapp.cfg
-\family default
- are contained in the file 
-\family typewriter
-sheardisp.cfg
-\family default
-.
- These settings include:
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.bc.x_neg Defines which degrees of freedom are being
- constrained (x, y, and z), gives the label (
-\family typewriter
-x_neg
-\family default
-, defined in 
-\family typewriter
-twohex8.mesh
-\family default
-) defining the points desired, assigns a label to the boundary condition
- set, and gives the name of the spatial database with the values for the
- Dirichlet boundary conditions (
-\family typewriter
-sheardisp.spatialdb
-\family default
-).
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.bc.x_pos Defines which degrees of freedom are being
- constrained (x, y, and z), gives the label (
-\family typewriter
-x_
-\family default
-pos, defined in 
-\family typewriter
-twohex8.mesh
-\family default
-) defining the points desired, assigns a label to the boundary condition
- set, and gives the name of the spatial database with the values for the
- Dirichlet boundary conditions (
-\family typewriter
-sheardisp.spatialdb
-\family default
-).
-\end_layout
-
-\begin_layout Standard
-The values for the Dirichlet boundary conditions are given in the file 
-\family typewriter
-sheardisp.spatialdb
-\family default
-, as specified in 
-\family typewriter
-sheardisp.cfg
-\family default
-.
- Data are being specified at two control points (rather than being uniform
- over the mesh, for example), so the data dimension is one.
- The files containing common information (
-\family typewriter
-twohex8.mesh
-\family default
-, 
-\family typewriter
-pylithapp.cfg
-\family default
-) along with the problem-specific files (
-\family typewriter
-sheardisp.cfg
-\family default
-, 
-\family typewriter
-sheardisp.spatialdb
-\family default
-) provide a complete description of the problem, and we can then run this
- example by typing
-\end_layout
-
-\begin_layout LyX-Code
-pylith sheardisp.cfg
-\end_layout
-
-\begin_layout Standard
-If the problem ran correctly, you should be able to generate a figure such
- as Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:twohex8-shear"
-
-\end_inset
-
-, which was generated using ParaView.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/sheardisp.jpg
-	lyxscale 50
-	scale 33
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Color contours and vectors of displacement for the shear displacement example
- using a mesh composed of two trilinear hexahedral cells.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:twohex8-shear"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Kinematic Fault Slip Example
-\end_layout
-
-\begin_layout Standard
-The next example problem is left-lateral fault slip applied between the
- two hexahedral cells using kinematic cohesive cells.
- The vertices away from the fault are held fixed in the x, y, and z directions.
- Parameter settings that override or augment those in 
-\family typewriter
-pylithapp.cfg
-\family default
- are contained in the file 
-\family typewriter
-dislocation.cfg
-\family default
-.
- These settings include:
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.bc.x_neg Defines which degrees of freedom are being
- constrained (x, y, and z), gives the label (
-\family typewriter
-x_neg
-\family default
-, defined in 
-\family typewriter
-twohex8.mesh
-\family default
-) defining the points desired, and assigns a label to the boundary condition
- set.
- In this case, we use the default spatial database (ZeroDispDB) for the
- Dirichlet boundary condition, which sets the displacements to zero.
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.bc.x_pos Defines which degrees of freedom are being
- constrained (x, y, and z), gives the label (
-\family typewriter
-x_
-\family default
-pos, defined in 
-\family typewriter
-twohex8.mesh
-\family default
-) defining the points desired, and assigns a label to the boundary condition
- set.
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.interfaces Gives the label (defined in 
-\family typewriter
-twohex8.mesh
-\family default
-) defining the points on the fault, provides quadrature information, and
- then gives database names for material properties (needed for conditioning),
- fault slip, peak fault slip rate, and fault slip time.
-\end_layout
-
-\begin_layout Standard
-The fault example requires three additional database files that were not
- needed for the simple displacement examples.
- The first file (
-\family typewriter
-dislocation_slip.spatialdb
-\family default
-) specifies 0.01 m of left-lateral fault slip for the entire fault.
- The data dimension is zero since the same data are applied to all points
- in the set.
- The default slip time function is a step-function, so we also must provide
- the time at which slip begins.
- The elastic solution is associated with advancing from 
-\begin_inset Formula $t=-dt$
-\end_inset
-
- to 
-\begin_inset Formula $t=0$
-\end_inset
-
-, so we set the slip initiation time for the step-function to 0 in 
-\family typewriter
-dislocation_sliptime.spatialdb
-\family default
-.
- The files containing common information (
-\family typewriter
-\size small
-twohex8.mesh
-\family default
-, 
-\family typewriter
-pylithapp.cfg
-\family default
-\size default
-) along with the problem-specific files (
-\family typewriter
-\size small
-dislocation.cfg
-\family default
-, 
-\family typewriter
-dislocation_slip.spatialdb
-\family default
-, 
-\family typewriter
-dislocation_sliptime.spatialdb
-\family default
-\size default
-) provide a complete description of the problem, and we can then run this
- example by typing
-\end_layout
-
-\begin_layout LyX-Code
-pylith dislocation.cfg
-\end_layout
-
-\begin_layout Standard
-If the problem ran correctly, you should be able to generate a figure such
- as Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:twohex8-disloc"
-
-\end_inset
-
-, which was generated using ParaView.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\noindent
-\align center
-\begin_inset Graphics
-	filename figs/dislocation.jpg
-	lyxscale 50
-	scale 33
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Color contours and vectors of displacement for the kinematic fault example
- using a mesh composed of two trilinear hexahedral cells.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:twohex8-disloc"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_body
-\end_document
+#LyX 2.0 created this file. For more info see http://www.lyx.org/
+\lyxformat 413
+\begin_document
+\begin_header
+\textclass book
+\begin_preamble
+
+\end_preamble
+\use_default_options false
+\maintain_unincluded_children false
+\language english
+\language_package default
+\inputencoding latin1
+\fontencoding global
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry true
+\use_amsmath 0
+\use_esint 0
+\use_mhchem 1
+\use_mathdots 1
+\cite_engine basic
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\use_refstyle 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\leftmargin 1in
+\topmargin 1in
+\rightmargin 1in
+\bottommargin 2in
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\quotes_language english
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\end_header
+
+\begin_body
+
+\begin_layout Section
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Tutorial-Two-hexahedra"
+
+\end_inset
+
+Tutorial Using Two Hexahedra
+\end_layout
+
+\begin_layout Standard
+PyLith features discussed in this tutorial:
+\end_layout
+
+\begin_layout Itemize
+Quasi-static solution
+\end_layout
+
+\begin_layout Itemize
+Mesh ASCII format
+\end_layout
+
+\begin_layout Itemize
+Dirichlet boundary conditions
+\end_layout
+
+\begin_layout Itemize
+Kinematic fault interface conditions
+\end_layout
+
+\begin_layout Itemize
+Maxwell viscoelastic material
+\end_layout
+
+\begin_layout Itemize
+VTK output
+\end_layout
+
+\begin_layout Itemize
+Trilinear hexahedral cells
+\end_layout
+
+\begin_layout Itemize
+SimpleDB spatial database
+\end_layout
+
+\begin_layout Itemize
+ZeroDispDB spatial database
+\end_layout
+
+\begin_layout Itemize
+UniformDB spatial database
+\end_layout
+
+\begin_layout Itemize
+Filtering of cell output fields
+\end_layout
+
+\begin_layout Standard
+All of the files necessary to run the examples are contained in the directory
+ 
+\family typewriter
+examples/twocells/twohex8.
+\end_layout
+
+\begin_layout Subsection
+Overview
+\end_layout
+
+\begin_layout Standard
+This tutorial is a simple 3D example of a quasi-static finite element problem.
+ It is a mesh composed of two trilinear hexahedra subject to displacement
+ boundary conditions.
+ One primary difference between this example and the example with two tetrahedra
+ is that we use a Maxwell viscoelastic material model, and run the model
+ for 10 time steps of 0.1 year each.
+ Due to the simple geometry of the problem, the mesh may be constructed
+ by hand, using PyLith mesh ASCII format to describe the mesh.
+ In this tutorial, we will walk through the steps necessary to construct,
+ run, and view three problems that use the same mesh.
+ In addition to this manual, each of the files for the example problems
+ includes extensive comments.
+\end_layout
+
+\begin_layout Subsection
+Mesh Description
+\end_layout
+
+\begin_layout Standard
+The mesh consists of two hexahedra forming a rectangular prism (Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:twohex8-mesh"
+
+\end_inset
+
+).
+ The mesh geometry and topology are described in the file 
+\family typewriter
+twohex8.mesh
+\family default
+, which is in PyLith mesh ASCII format.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/twohex8-mesh.eps
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Mesh composed of two trilinear hexahedral cells used for the example problems.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:twohex8-mesh"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Additional Common Information
+\end_layout
+
+\begin_layout Standard
+In addition to the mesh, the three example problems share additional information
+, which we place in 
+\family typewriter
+pylithapp.cfg
+\family default
+.
+ Note that in this example we make use of the UniformDB spatial database,
+ rather than the SimpleDB implementation used to specify the physical properties
+ in the other example problems.
+ For simple distributions of material properties (or boundary conditions),
+ this implementation is often easier to use.
+ Examining 
+\family typewriter
+pylithapp.cfg
+\family default
+, we specify the material information with the following set of parameters:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.materials]
+\end_layout
+
+\begin_layout LyX-Code
+material = pylith.materials.MaxwellIsotropic3D
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.materials.material]
+\end_layout
+
+\begin_layout LyX-Code
+label = viscoelastic material
+\end_layout
+
+\begin_layout LyX-Code
+id = 1
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+db = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+db.values = [vp,vs,density,viscosity]
+\end_layout
+
+\begin_layout LyX-Code
+db.data = [5773.502691896258*m/s, 3333.333333333333*m/s, 2700.0*kg/m**3, 1.0e18*Pa*s]
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+quadrature.cell = pylith.feassemble.FIATLagrange
+\end_layout
+
+\begin_layout LyX-Code
+quadrature.cell.dimension = 3
+\end_layout
+
+\begin_layout Subsection
+Axial Displacement Example
+\end_layout
+
+\begin_layout Standard
+The first example problem is extension of the mesh along the long axis of
+ the prism.
+ Parameter settings that override or augment those in 
+\family typewriter
+pylithapp.cfg
+\family default
+ are contained in the file 
+\family typewriter
+axialdisp.cfg
+\family default
+.
+ These settings include:
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.bc.x_neg Defines which degrees of freedom are being
+ constrained (x, y, and z), gives the label (
+\family typewriter
+x_neg
+\family default
+, defined in 
+\family typewriter
+twohex8.mesh
+\family default
+) defining the points desired, assigns a label to the boundary condition
+ set, and gives the name of the spatial database with the values for the
+ Dirichlet boundary conditions (
+\family typewriter
+axialdisp.spatialdb
+\family default
+).
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.bc.x_pos Defines which degrees of freedom are being
+ constrained (x, y, and z), gives the label (
+\family typewriter
+x_pos
+\family default
+, defined in 
+\family typewriter
+twohex8.mesh
+\family default
+) defining the points desired, assigns a label to the boundary condition
+ set, and gives the name of the spatial database with the values for the
+ Dirichlet boundary conditions (
+\family typewriter
+axialdisp.spatialdb
+\family default
+).
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.materials.material.output Defines the filter to be used
+ when writing cell state variables (average over the quadrature points of
+ the cell), specifies which state variables and properties to output, gives
+ the base filename for state variable output files, and defines the format
+ to use when defining the output filenames for each time step.
+\end_layout
+
+\begin_layout Standard
+The values for the Dirichlet boundary conditions are given in the file 
+\family typewriter
+axialdisp.spatialdb
+\family default
+, as specified in 
+\family typewriter
+axialdisp.cfg
+\family default
+.
+ Since data are being specified using two control points (rather than being
+ uniform over the mesh, for example), the data dimension is one.
+ Note that since we are using a Maxwell viscoelastic model, we request that
+ additional state variables and properties be output:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.materials.material.output]
+\end_layout
+
+\begin_layout LyX-Code
+cell_data_fields = [total_strain,viscous_strain,stress]
+\end_layout
+
+\begin_layout LyX-Code
+cell_info_fields = [mu,lambda,density,maxwell_time]
+\end_layout
+
+\begin_layout Standard
+The files containing common information (
+\family typewriter
+twohex8.mesh
+\family default
+, 
+\family typewriter
+pylithapp.cfg
+\family default
+) along with the problem-specific files (
+\family typewriter
+axialdisp.cfg
+\family default
+, 
+\family typewriter
+axialdisp.spatialdb
+\family default
+) provide a complete description of the problem, and we can then run this
+ example by typing
+\end_layout
+
+\begin_layout LyX-Code
+pylith axialdisp.cfg
+\end_layout
+
+\begin_layout Standard
+Once the problem has run, two sets of files will be produced, along with
+ one additional file.
+ The first set will have filenames such as 
+\family typewriter
+axialdisp_txxxx.vtk
+\family default
+, where 
+\family typewriter
+xxxx
+\family default
+ is the time for which output has been produced.
+ In 
+\family typewriter
+axialdisp.cfg
+\family default
+ we specify that the time stamp should be normalized by a value of 1.0 years
+ and the time stamp should be of the form 
+\family typewriter
+xxx.x
+\family default
+ (recall that the decimal point is removed in the filename).
+ As a result, the filenames contain the time in tenths of a year.
+ These files will contain mesh information as well as displacement values
+ for the mesh vertices at the given time.
+ The second set of files will have names such as 
+\family typewriter
+axialdisp-statevars_txxxx.vtk
+\family default
+, where 
+\family typewriter
+xxxx
+\family default
+ is the time in tenths of a year (as above) for which output has been produced.
+ These files contain the state variables for each cell at the given time.
+ The default fields are the total strain and stress fields; however, we
+ have also requested the viscous strains.
+ As specified in 
+\family typewriter
+axialdisp.cfg
+\family default
+, these values are averaged over each cell.
+ The final file (
+\family typewriter
+axialdisp-statevars_info.vtk
+\family default
+) gives the material properties used for the problem.
+ We have requested all of the properties available for this material model
+ (
+\family typewriter
+mu
+\family default
+, 
+\family typewriter
+lambda
+\family default
+, 
+\family typewriter
+density
+\family default
+, 
+\family typewriter
+maxwell_time
+\family default
+).
+ If the problem ran correctly, you should be able to produce a figure such
+ as Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:twohex8-axial"
+
+\end_inset
+
+, which was generated using ParaView.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/axialdisp.jpg
+	lyxscale 50
+	scale 33
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Color contours and vectors of displacement for the axial displacement example
+ using a mesh composed of two trilinear hexahedral cells.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:twohex8-axial"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Shear Displacement Example
+\end_layout
+
+\begin_layout Standard
+The second example problem is shearing of the mesh in the y direction.
+ Parameter settings that override or augment those in 
+\family typewriter
+pylithapp.cfg
+\family default
+ are contained in the file 
+\family typewriter
+sheardisp.cfg
+\family default
+.
+ These settings include:
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.bc.x_neg Defines which degrees of freedom are being
+ constrained (x, y, and z), gives the label (
+\family typewriter
+x_neg
+\family default
+, defined in 
+\family typewriter
+twohex8.mesh
+\family default
+) defining the points desired, assigns a label to the boundary condition
+ set, and gives the name of the spatial database with the values for the
+ Dirichlet boundary conditions (
+\family typewriter
+sheardisp.spatialdb
+\family default
+).
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.bc.x_pos Defines which degrees of freedom are being
+ constrained (x, y, and z), gives the label (
+\family typewriter
+x_pos
+\family default
+, defined in 
+\family typewriter
+twohex8.mesh
+\family default
+) defining the points desired, assigns a label to the boundary condition
+ set, and gives the name of the spatial database with the values for the
+ Dirichlet boundary conditions (
+\family typewriter
+sheardisp.spatialdb
+\family default
+).
+\end_layout
+
+\begin_layout Standard
+The values for the Dirichlet boundary conditions are given in the file 
+\family typewriter
+sheardisp.spatialdb
+\family default
+, as specified in 
+\family typewriter
+sheardisp.cfg
+\family default
+.
+ Data are being specified at two control points (rather than being uniform
+ over the mesh, for example), so the data dimension is one.
+ The files containing common information (
+\family typewriter
+twohex8.mesh
+\family default
+, 
+\family typewriter
+pylithapp.cfg
+\family default
+) along with the problem-specific files (
+\family typewriter
+sheardisp.cfg
+\family default
+, 
+\family typewriter
+sheardisp.spatialdb
+\family default
+) provide a complete description of the problem, and we can then run this
+ example by typing
+\end_layout
+
+\begin_layout LyX-Code
+pylith sheardisp.cfg
+\end_layout
+
+\begin_layout Standard
+If the problem ran correctly, you should be able to generate a figure such
+ as Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:twohex8-shear"
+
+\end_inset
+
+, which was generated using ParaView.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/sheardisp.jpg
+	lyxscale 50
+	scale 33
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Color contours and vectors of displacement for the shear displacement example
+ using a mesh composed of two trilinear hexahedral cells.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:twohex8-shear"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Kinematic Fault Slip Example
+\end_layout
+
+\begin_layout Standard
+The next example problem is left-lateral fault slip applied between the
+ two hexahedral cells using kinematic cohesive cells.
+ The vertices away from the fault are held fixed in the x, y, and z directions.
+ Parameter settings that override or augment those in 
+\family typewriter
+pylithapp.cfg
+\family default
+ are contained in the file 
+\family typewriter
+dislocation.cfg
+\family default
+.
+ These settings include:
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.bc.x_neg Defines which degrees of freedom are being
+ constrained (x, y, and z), gives the label (
+\family typewriter
+x_neg
+\family default
+, defined in 
+\family typewriter
+twohex8.mesh
+\family default
+) defining the points desired, and assigns a label to the boundary condition
+ set.
+ In this case, we use the default spatial database (ZeroDispDB) for the
+ Dirichlet boundary condition, which sets the displacements to zero.
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.bc.x_pos Defines which degrees of freedom are being
+ constrained (x, y, and z), gives the label (
+\family typewriter
+x_pos
+\family default
+, defined in 
+\family typewriter
+twohex8.mesh
+\family default
+) defining the points desired, and assigns a label to the boundary condition
+ set.
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.interfaces Gives the label (defined in 
+\family typewriter
+twohex8.mesh
+\family default
+) defining the points on the fault, provides quadrature information, and
+ then gives database names for material properties (needed for conditioning),
+ fault slip, peak fault slip rate, and fault slip time.
+\end_layout
+
+\begin_layout Standard
+The fault example requires three additional database files that were not
+ needed for the simple displacement examples.
+ The first file (
+\family typewriter
+dislocation_slip.spatialdb
+\family default
+) specifies 0.01 m of left-lateral fault slip for the entire fault.
+ The data dimension is zero since the same data are applied to all points
+ in the set.
+ The default slip time function is a step-function, so we also must provide
+ the time at which slip begins.
+ The elastic solution is associated with advancing from 
+\begin_inset Formula $t=-dt$
+\end_inset
+
+ to 
+\begin_inset Formula $t=0$
+\end_inset
+
+, so we set the slip initiation time for the step-function to 0 in 
+\family typewriter
+dislocation_sliptime.spatialdb
+\family default
+.
+ The files containing common information (
+\family typewriter
+\size small
+twohex8.mesh
+\family default
+, 
+\family typewriter
+pylithapp.cfg
+\family default
+\size default
+) along with the problem-specific files (
+\family typewriter
+\size small
+dislocation.cfg
+\family default
+, 
+\family typewriter
+dislocation_slip.spatialdb
+\family default
+, 
+\family typewriter
+dislocation_sliptime.spatialdb
+\family default
+\size default
+) provide a complete description of the problem, and we can then run this
+ example by typing
+\end_layout
+
+\begin_layout LyX-Code
+pylith dislocation.cfg
+\end_layout
+
+\begin_layout Standard
+If the problem ran correctly, you should be able to generate a figure such
+ as Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:twohex8-disloc"
+
+\end_inset
+
+, which was generated using ParaView.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\noindent
+\align center
+\begin_inset Graphics
+	filename figs/dislocation.jpg
+	lyxscale 50
+	scale 33
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Color contours and vectors of displacement for the kinematic fault example
+ using a mesh composed of two trilinear hexahedral cells.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:twohex8-disloc"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document

Modified: short/3D/PyLith/trunk/doc/userguide/tutorials/twoquad4/twoquad4.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/tutorials/twoquad4/twoquad4.lyx	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/doc/userguide/tutorials/twoquad4/twoquad4.lyx	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,1001 +1,1001 @@
-#LyX 2.0 created this file. For more info see http://www.lyx.org/
-\lyxformat 413
-\begin_document
-\begin_header
-\textclass book
-\begin_preamble
-
-\end_preamble
-\use_default_options false
-\maintain_unincluded_children false
-\language english
-\language_package default
-\inputencoding latin1
-\fontencoding global
-\font_roman default
-\font_sans default
-\font_typewriter default
-\font_default_family default
-\use_non_tex_fonts false
-\font_sc false
-\font_osf false
-\font_sf_scale 100
-\font_tt_scale 100
-
-\graphics default
-\default_output_format default
-\output_sync 0
-\bibtex_command default
-\index_command default
-\paperfontsize default
-\spacing single
-\use_hyperref false
-\papersize default
-\use_geometry true
-\use_amsmath 0
-\use_esint 0
-\use_mhchem 1
-\use_mathdots 1
-\cite_engine basic
-\use_bibtopic false
-\use_indices false
-\paperorientation portrait
-\suppress_date false
-\use_refstyle 0
-\index Index
-\shortcut idx
-\color #008000
-\end_index
-\leftmargin 1in
-\topmargin 1in
-\rightmargin 1in
-\bottommargin 1in
-\secnumdepth 3
-\tocdepth 3
-\paragraph_separation indent
-\paragraph_indentation default
-\quotes_language english
-\papercolumns 1
-\papersides 1
-\paperpagestyle default
-\tracking_changes false
-\output_changes false
-\html_math_output 0
-\html_css_as_file 0
-\html_be_strict false
-\end_header
-
-\begin_body
-
-\begin_layout Section
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:Tutorial-Two-quad4"
-
-\end_inset
-
-Tutorial Using Two Quadrilaterals
-\end_layout
-
-\begin_layout Standard
-PyLith features discussed in this tutorial:
-\end_layout
-
-\begin_layout Itemize
-Quasi-static solution
-\end_layout
-
-\begin_layout Itemize
-Mesh ASCII format
-\end_layout
-
-\begin_layout Itemize
-Dirichlet boundary conditions
-\end_layout
-
-\begin_layout Itemize
-Neumann boundary conditions
-\end_layout
-
-\begin_layout Itemize
-Kinematic fault interface conditions
-\end_layout
-
-\begin_layout Itemize
-Plane strain linearly elastic material
-\end_layout
-
-\begin_layout Itemize
-VTK output
-\end_layout
-
-\begin_layout Itemize
-Bilinear quadrilateral cells
-\end_layout
-
-\begin_layout Itemize
-SimpleDB spatial database
-\end_layout
-
-\begin_layout Itemize
-ZeroDispDB spatial database
-\end_layout
-
-\begin_layout Standard
-All of the files necessary to run the examples are contained in the directory
- 
-\family typewriter
-examples/twocells/twoquad4.
-\end_layout
-
-\begin_layout Subsection
-Overview
-\end_layout
-
-\begin_layout Standard
-This tutorial is another simple 2D example of a quasi-static finite element
- problem.
- It is a mesh composed of two bilinear quadrilaterals subject to displacement
- or traction boundary conditions, assuming plane-strain linear elastic behavior.
- Due to the simple geometry of the problem, the mesh may be constructed
- by hand, using PyLith mesh ASCII format to describe the mesh.
- In this tutorial, we will walk through the steps necessary to construct,
- run, and view four problems that use the same mesh.
- In addition to this manual, each of the files for the example problem includes
- extensive comments.
-\end_layout
-
-\begin_layout Subsection
-Mesh Description
-\end_layout
-
-\begin_layout Standard
-The mesh consists of two square cells with edge lengths of one unit forming
- a regular region (Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:twoquad4-mesh"
-
-\end_inset
-
-).
- The mesh geometry and topology are described in the file 
-\family typewriter
-twoquad4.mesh
-\family default
-, which is in PyLith mesh ASCII format.
- This file describes the dimensionality of the problem (in this case 2D),
- the coordinates of the vertices (nodes), the vertices composing each cell
- (element), the material ID to be associated with each cell, and then provides
- groups of vertices that may be used to define faults or surfaces to which
- boundary conditions may be applied.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/twoquad4-mesh.eps
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Mesh composed of two bilinear quadrilateral cells used for the example problems.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:twoquad4-mesh"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Additional Common Information
-\end_layout
-
-\begin_layout Standard
-In addition to the mesh, the four example problems share additional information.
- As in the previous examples, we place this information in 
-\family typewriter
-pylithapp.cfg
-\family default
-, since this file is read automatically every time PyLith is run.
- Settings specific to a particular problem may be placed in other 
-\family typewriter
-.cfg
-\family default
- files, as described later, and then those files are placed on the command
- line.
-\end_layout
-
-\begin_layout Subsection
-Axial Displacement Example
-\end_layout
-
-\begin_layout Standard
-The first example problem is extension of the mesh along the x axis.
- Parameter settings that override or augment those in 
-\family typewriter
-pylithapp.cfg
-\family default
- are contained in the file 
-\family typewriter
-axialdisp.cfg
-\family default
-.
- These include:
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.bc.x_neg Specifies the boundary conditions for the
- left side of the mesh, defining which degrees of freedom are being constrained
- (x), giving the label (defined in 
-\family typewriter
-twoquad4.mesh
-\family default
-) defining the points desired, assigning a label to the boundary condition
- set, and giving the name of the spatial database with the values for the
- Dirichlet boundary condition (
-\family typewriter
-axialdisp.spatialdb
-\family default
-).
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.bc.x_pos Specifies the boundary conditions for the
- right side of the mesh, defining which degrees of freedom are being constrained
- (x), giving the label (defined in 
-\family typewriter
-twoquad4.mesh
-\family default
-) defining the points desired, assigning a label to the boundary condition
- set, and giving the name of the spatial database defining the boundary
- conditions (
-\family typewriter
-axialdisp.spatialdb
-\family default
-).
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.bc.y_neg Specifies the boundary conditions for the
- bottom two corners of the mesh, defining which degrees of freedom are being
- constrained (y), giving the label (defined in 
-\family typewriter
-twoquad4.mesh
-\family default
-) defining the points desired, assigning a label to the boundary condition
- set, and giving the name of the spatial database with the values for the
- Dirichlet boundary condition (
-\family typewriter
-axialdisp.spatialdb
-\family default
-).
-\end_layout
-
-\begin_layout Standard
-The values for the Dirichlet boundary condition are given in the file 
-\family typewriter
-axialdisp.spatialdb
-\family default
-, as specified in 
-\family typewriter
-axialdisp.cfg
-\family default
-.
- Because the data are being specified using two control points with a linear
- variation in the values between the two (rather than being uniform over
- the mesh, for example), the data dimension is one.
-\end_layout
-
-\begin_layout Standard
-The files containing common information (
-\family typewriter
-twoquad4.mesh
-\family default
-, 
-\family typewriter
-pylithapp.cfg
-\family default
-, 
-\family typewriter
-matprops.spatialdb
-\family default
-) along with the problem-specific files (
-\family typewriter
-axialdisp.cfg
-\family default
-, 
-\family typewriter
-axialdisp.spatialdb
-\family default
-) provide a complete description of the problem, and we can then run this
- example by typing
-\end_layout
-
-\begin_layout LyX-Code
-pylith axialdisp.cfg
-\end_layout
-
-\begin_layout Standard
-As in the two triangle axial displacement example, three files will be produced.
- If the problem ran correctly, you should be able to generate a figure such
- as Figure 
-\begin_inset CommandInset ref
-LatexCommand vref
-reference "fig:twoquad4-axial"
-
-\end_inset
-
-, which was generated using ParaView.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-placement t
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/axialdisp.jpg
-	lyxscale 50
-	scale 33
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Color contours and vectors of displacement for the axial displacement example
- using a mesh composed of two bilinear quadrilateral cells.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:twoquad4-axial"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Shear Displacement Example
-\end_layout
-
-\begin_layout Standard
-The next example problem is shearing of the mesh in the y direction using
- displacements applied along the positive and negative x boundaries.
- Parameter settings that override or augment those in 
-\family typewriter
-pylithapp.cfg
-\family default
- are contained in the file 
-\family typewriter
-sheardisp.cfg
-\family default
-.
- These include:
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.bc.x_neg Specifies the boundary conditions for the
- left side of the mesh, defining which degrees of freedom are being constrained
- (x and y), giving the label (
-\family typewriter
-x_neg
-\family default
-, defined in 
-\family typewriter
-twoquad4.mesh
-\family default
-) defining the points desired, assigning a label to the boundary condition
- set, and giving the name of the spatial database with the values for the
- Dirichlet boundary condition (
-\family typewriter
-sheardisp.spatialdb
-\family default
-).
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.bc.x_pos Specifies the boundary conditions for the
- left side of the mesh, defining which degrees of freedom are being constrained
- (y only), giving the label (
-\family typewriter
-x_
-\family default
-pos, defined in 
-\family typewriter
-twoquad4.mesh
-\family default
-) defining the points desired, assigning a label to the boundary condition
- set, and giving the name of the spatial database with the values for the
- Dirichlet boundary condition (
-\family typewriter
-sheardisp.spatialdb
-\family default
-).
-\end_layout
-
-\begin_layout Standard
-The values for the Dirichlet boundary conditions are described in the file
- 
-\family typewriter
-sheardisp.spatialdb
-\family default
-, as specified in 
-\family typewriter
-sheardisp.cfg
-\family default
-.
- In this case, the desired displacement values are given at two control
- points, corresponding to the two edges we want to constrain.
- Since data are being specified at two points with a linear variations in
- the values between the points (rather than being uniform over the mesh,
- for example), the data dimension is one.
-\end_layout
-
-\begin_layout Standard
-The files containing common information (
-\family typewriter
-twoquad4.mesh
-\family default
-, 
-\family typewriter
-pylithapp.cfg
-\family default
-, 
-\family typewriter
-matprops.spatialdb
-\family default
-) along with the problem-specific files (
-\family typewriter
-sheardisp.cfg
-\family default
-, 
-\family typewriter
-sheardisp.spatialdb
-\family default
-) provide a complete description of the problem, and we can then run this
- example by typing
-\end_layout
-
-\begin_layout LyX-Code
-pylith sheardisp.cfg
-\end_layout
-
-\begin_layout Standard
-As in the previous example, three files will be produced.
- If the problem ran correctly, you should be able to generate a figure such
- as Figure 
-\begin_inset CommandInset ref
-LatexCommand vref
-reference "fig:twoquad4-shear"
-
-\end_inset
-
-, which was generated using ParaView.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/sheardispl.jpg
-	lyxscale 50
-	scale 33
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Color contours and vectors of displacement for the shear displacement example
- using a mesh composed of two bilinear quadrilateral cells.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:twoquad4-shear"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Kinematic Fault Slip Example
-\end_layout
-
-\begin_layout Standard
-The next example problem is a left-lateral fault slip applied between the
- two square cells using kinematic cohesive cells.
- The left and right boundaries are held fixed in the x and y directions.
- Parameter settings that override or augment those in 
-\family typewriter
-pylithapp.cfg
-\family default
- are contained in the file 
-\family typewriter
-dislocation.cfg
-\family default
-.
- These settings include:
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.bc.x_neg Specifies the boundary conditions for the
- left side of the mesh, defining which degrees of freedom are being constrained
- (x and y), giving the label (
-\family typewriter
-x_neg
-\family default
-, defined in 
-\family typewriter
-twoquad4.mesh
-\family default
-) defining the points desired, and assigning a label to the boundary condition
- set.
- Instead of specifying a spatial database file for the values of the Dirichlet
- boundary condition, we use the default spatial database (ZeroDispDB) for
- the Dirichlet boundary condition, which sets the displacements to zero
- for all time.
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.bc.x_pos Specifies the boundary conditions for the
- right side of the mesh, defining which degrees of freedom are being constrained
- (x and y), giving the label (
-\family typewriter
-x_neg
-\family default
-, defined in 
-\family typewriter
-twoquad4.mesh
-\family default
-) defining the points desired, and assigning a label to the boundary condition
- set.
- We use the ZeroDispDB for this boundary condition as well, which sets the
- displacements to zero for all time.
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.interfaces Gives the label (defined in 
-\family typewriter
-twoquad4.mesh
-\family default
-) defining the points on the fault, provides quadrature information, and
- then gives database names for material properties (needed for conditioning),
- fault slip, peak fault slip rate, and fault slip time.
-\end_layout
-
-\begin_layout Standard
-The fault example requires three additional database files that were not
- needed for the simple displacement examples.
- The first file (
-\family typewriter
-dislocation_slip.spatialdb
-\family default
-) specifies 0.01 m of left-lateral fault slip for the entire fault.
- The data dimension is zero since the same data are applied to all points
- in the set.
- The default slip time function is a step-function, so we also must provide
- the time at which slip begins.
- The elastic solution is associated with advancing from 
-\begin_inset Formula $t=-dt$
-\end_inset
-
- to 
-\begin_inset Formula $t=0$
-\end_inset
-
-, so we set the slip initiation time for the step-function to 0 in 
-\family typewriter
-dislocation_sliptime.spatialdb
-\family default
-.
-\end_layout
-
-\begin_layout Standard
-The files containing common information (
-\family typewriter
-twoquad4.mesh
-\family default
-, 
-\family typewriter
-pylithapp.cfg
-\family default
-, 
-\family typewriter
-matprops.spatialdb
-\family default
-) along with the problem-specific files (
-\family typewriter
-\size small
-dislocation.cfg
-\family default
-, 
-\family typewriter
-dislocation_slip.spatialdb
-\family default
-, 
-\family typewriter
-dislocation_sliptime.spatialdb
-\family default
-\size default
-) provide a complete description of the problem, and we can then run this
- example by typing
-\end_layout
-
-\begin_layout LyX-Code
-pylith dislocation.cfg
-\end_layout
-
-\begin_layout Standard
-The additional of a fault results in two additional output files (as in
- the two triangle fault example), 
-\family typewriter
-dislocation-fault_t0000000.vtk
-\family default
- and 
-\family typewriter
-dislocation-fault_info.vtk
-\family default
-.
- These files provide output of fault slip, change in tractions, and diagnostic
- information such as the normal direction, final slip, and slip time for
- each vertex on the fault.
- If the problem ran correctly, you should be able to generate a figure such
- as Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:twoquad4-disloc"
-
-\end_inset
-
-, which was generated using ParaView.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/dislocation.jpg
-	lyxscale 50
-	scale 33
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Color contours and vectors of displacement for the kinematic fault example
- using a mesh composed of two bilinear quadrilateral cells.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:twoquad4-disloc"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-\begin_inset CommandInset label
-LatexCommand label
-name "sub:Tutorial-twoquad4-traction"
-
-\end_inset
-
-Axial Traction Example
-\end_layout
-
-\begin_layout Standard
-The fourth example demonstrates the use of Neumann (traction) boundary condition
-s.
- Constant tractions are applied to the right edge of the mesh, while displacemen
-ts normal to the boundaries are held fixed along the left and bottom edges
- of the mesh.
- Parameter settings that override or augment those in 
-\family typewriter
-pylithapp.cfg
-\family default
- are contained in the file 
-\family typewriter
-axialtract.cfg
-\family default
-.
- These settings include:
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent Specifies an implicit formulation for the problem
- and specifies the array of boundary conditions.
- The boundary condition type for 
-\family typewriter
-x_pos
-\family default
- is explicitly set to 
-\family typewriter
-Neumann
-\family default
-, since the default boundary condition type is 
-\family typewriter
-Dirichlet
-\family default
-.
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.bc.x_neg Specifies the boundary conditions for the
- left side of the mesh, defining which degrees of freedom are being constrained
- (x) and giving the label (defined in 
-\family typewriter
-twoquad4.mesh
-\family default
-) defining the points desired.
- In this case, rather than specifying a spatial database file with values
- for the Dirichlet boundary conditions, we use the default spatial database
- (ZeroDispDB) for the Dirichlet boundary condition, which sets the displacements
- to zero for all time.
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.bc.x_pos Specifies the Neumann boundary conditions
- for the right side of the mesh, giving the label (defined in 
-\family typewriter
-twoquad4.mesh
-\family default
-) defining the points desired, assigning a label to the boundary condition
- set, and giving the name of the spatial database with the traction vectors
- for the Neumann boundary condition (
-\family typewriter
-axialtract.spatialdb
-\family default
-).
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.bc.y_neg Specifies the boundary conditions for the
- bottom two corners of the mesh, defining which degrees of freedom are being
- constrained (y) and giving the label (defined in 
-\family typewriter
-twoquad4.mesh
-\family default
-) defining the points desired.
- In this case, we again use the ZeroDispDB, which sets the displacements
- to zero for all time.
-\end_layout
-
-\begin_layout Description
-pylithapp.problem.formulation.output.output.writer Gives the base filename for
- VTK output 
-\begin_inset Newline newline
-\end_inset
-
-(
-\family typewriter
-axialtract.vtk
-\family default
-).
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.bc.x_pos.output Gives the field to be output for the
- 
-\family typewriter
-x_pos
-\family default
- boundary (
-\family typewriter
-tractions
-\family default
-), and gives the base filename for 
-\family typewriter
-x_pos
-\family default
- boundary output (
-\family typewriter
-axialtract-tractions.vtk
-\family default
-).
-\end_layout
-
-\begin_layout Standard
-The traction vectors for the Neumann boundary conditions are given in the
- file 
-\family typewriter
-axialtract.spatialdb
-\family default
-, as specified in 
-\family typewriter
-axialtract.cfg
-\family default
-.
- The files containing common information (
-\family typewriter
-twoquad4.mesh
-\family default
-, 
-\family typewriter
-pylithapp.cfg
-\family default
-, 
-\family typewriter
-matprops.spatialdb
-\family default
-) along with the problem-specific files (
-\family typewriter
-axialtract.cfg
-\family default
-, 
-\family typewriter
-axialtract.spatialdb
-\family default
-) provide a complete description of the problem, and we can then run this
- example by typing
-\end_layout
-
-\begin_layout LyX-Code
-pylith axialtract.cfg
-\end_layout
-
-\begin_layout Standard
-Once the problem has run, six files will be produced.
- This includes the five files as in the previous example plus 
-\family typewriter
-axialtract-tractions_info.vtk
-\family default
-, which gives the 
-\family typewriter
-x
-\family default
- and 
-\family typewriter
-y
-\family default
- components of traction applied at each integration point.
- If the problem ran correctly, you should be able to generate a figure such
- as Figure 
-\begin_inset CommandInset ref
-LatexCommand vref
-reference "fig:twoquad4-axialtract"
-
-\end_inset
-
-, which was generated using ParaView.
- The results may be compared against the analytical solution derived in
- Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sub:Analytical-Constant-Traction"
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/axialtract.jpg
-	lyxscale 50
-	scale 33
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Color contours and vectors of displacement for the axial traction example
- using a mesh composed of two bilinear quadrilateral cells.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:twoquad4-axialtract"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_body
-\end_document
+#LyX 2.0 created this file. For more info see http://www.lyx.org/
+\lyxformat 413
+\begin_document
+\begin_header
+\textclass book
+\begin_preamble
+
+\end_preamble
+\use_default_options false
+\maintain_unincluded_children false
+\language english
+\language_package default
+\inputencoding latin1
+\fontencoding global
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry true
+\use_amsmath 0
+\use_esint 0
+\use_mhchem 1
+\use_mathdots 1
+\cite_engine basic
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\use_refstyle 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\leftmargin 1in
+\topmargin 1in
+\rightmargin 1in
+\bottommargin 1in
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\quotes_language english
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\end_header
+
+\begin_body
+
+\begin_layout Section
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Tutorial-Two-quad4"
+
+\end_inset
+
+Tutorial Using Two Quadrilaterals
+\end_layout
+
+\begin_layout Standard
+PyLith features discussed in this tutorial:
+\end_layout
+
+\begin_layout Itemize
+Quasi-static solution
+\end_layout
+
+\begin_layout Itemize
+Mesh ASCII format
+\end_layout
+
+\begin_layout Itemize
+Dirichlet boundary conditions
+\end_layout
+
+\begin_layout Itemize
+Neumann boundary conditions
+\end_layout
+
+\begin_layout Itemize
+Kinematic fault interface conditions
+\end_layout
+
+\begin_layout Itemize
+Plane strain linearly elastic material
+\end_layout
+
+\begin_layout Itemize
+VTK output
+\end_layout
+
+\begin_layout Itemize
+Bilinear quadrilateral cells
+\end_layout
+
+\begin_layout Itemize
+SimpleDB spatial database
+\end_layout
+
+\begin_layout Itemize
+ZeroDispDB spatial database
+\end_layout
+
+\begin_layout Standard
+All of the files necessary to run the examples are contained in the directory
+ 
+\family typewriter
+examples/twocells/twoquad4.
+\end_layout
+
+\begin_layout Subsection
+Overview
+\end_layout
+
+\begin_layout Standard
+This tutorial is another simple 2D example of a quasi-static finite element
+ problem.
+ It is a mesh composed of two bilinear quadrilaterals subject to displacement
+ or traction boundary conditions, assuming plane-strain linear elastic behavior.
+ Due to the simple geometry of the problem, the mesh may be constructed
+ by hand, using PyLith mesh ASCII format to describe the mesh.
+ In this tutorial, we will walk through the steps necessary to construct,
+ run, and view four problems that use the same mesh.
+ In addition to this manual, each of the files for the example problem includes
+ extensive comments.
+\end_layout
+
+\begin_layout Subsection
+Mesh Description
+\end_layout
+
+\begin_layout Standard
+The mesh consists of two square cells with edge lengths of one unit forming
+ a regular region (Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:twoquad4-mesh"
+
+\end_inset
+
+).
+ The mesh geometry and topology are described in the file 
+\family typewriter
+twoquad4.mesh
+\family default
+, which is in PyLith mesh ASCII format.
+ This file describes the dimensionality of the problem (in this case 2D),
+ the coordinates of the vertices (nodes), the vertices composing each cell
+ (element), the material ID to be associated with each cell, and then provides
+ groups of vertices that may be used to define faults or surfaces to which
+ boundary conditions may be applied.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/twoquad4-mesh.eps
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Mesh composed of two bilinear quadrilateral cells used for the example problems.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:twoquad4-mesh"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Additional Common Information
+\end_layout
+
+\begin_layout Standard
+In addition to the mesh, the four example problems share additional information.
+ As in the previous examples, we place this information in 
+\family typewriter
+pylithapp.cfg
+\family default
+, since this file is read automatically every time PyLith is run.
+ Settings specific to a particular problem may be placed in other 
+\family typewriter
+.cfg
+\family default
+ files, as described later, and then those files are placed on the command
+ line.
+\end_layout
+
+\begin_layout Subsection
+Axial Displacement Example
+\end_layout
+
+\begin_layout Standard
+The first example problem is extension of the mesh along the x axis.
+ Parameter settings that override or augment those in 
+\family typewriter
+pylithapp.cfg
+\family default
+ are contained in the file 
+\family typewriter
+axialdisp.cfg
+\family default
+.
+ These include:
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.bc.x_neg Specifies the boundary conditions for the
+ left side of the mesh, defining which degrees of freedom are being constrained
+ (x), giving the label (defined in 
+\family typewriter
+twoquad4.mesh
+\family default
+) defining the points desired, assigning a label to the boundary condition
+ set, and giving the name of the spatial database with the values for the
+ Dirichlet boundary condition (
+\family typewriter
+axialdisp.spatialdb
+\family default
+).
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.bc.x_pos Specifies the boundary conditions for the
+ right side of the mesh, defining which degrees of freedom are being constrained
+ (x), giving the label (defined in 
+\family typewriter
+twoquad4.mesh
+\family default
+) defining the points desired, assigning a label to the boundary condition
+ set, and giving the name of the spatial database defining the boundary
+ conditions (
+\family typewriter
+axialdisp.spatialdb
+\family default
+).
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.bc.y_neg Specifies the boundary conditions for the
+ bottom two corners of the mesh, defining which degrees of freedom are being
+ constrained (y), giving the label (defined in 
+\family typewriter
+twoquad4.mesh
+\family default
+) defining the points desired, assigning a label to the boundary condition
+ set, and giving the name of the spatial database with the values for the
+ Dirichlet boundary condition (
+\family typewriter
+axialdisp.spatialdb
+\family default
+).
+\end_layout
+
+\begin_layout Standard
+The values for the Dirichlet boundary condition are given in the file 
+\family typewriter
+axialdisp.spatialdb
+\family default
+, as specified in 
+\family typewriter
+axialdisp.cfg
+\family default
+.
+ Because the data are being specified using two control points with a linear
+ variation in the values between the two (rather than being uniform over
+ the mesh, for example), the data dimension is one.
+\end_layout
+
+\begin_layout Standard
+The files containing common information (
+\family typewriter
+twoquad4.mesh
+\family default
+, 
+\family typewriter
+pylithapp.cfg
+\family default
+, 
+\family typewriter
+matprops.spatialdb
+\family default
+) along with the problem-specific files (
+\family typewriter
+axialdisp.cfg
+\family default
+, 
+\family typewriter
+axialdisp.spatialdb
+\family default
+) provide a complete description of the problem, and we can then run this
+ example by typing
+\end_layout
+
+\begin_layout LyX-Code
+pylith axialdisp.cfg
+\end_layout
+
+\begin_layout Standard
+As in the two triangle axial displacement example, three files will be produced.
+ If the problem ran correctly, you should be able to produce a figure such
+ as Figure 
+\begin_inset CommandInset ref
+LatexCommand vref
+reference "fig:twoquad4-axial"
+
+\end_inset
+
+, which was generated using ParaView.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+placement t
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/axialdisp.jpg
+	lyxscale 50
+	scale 33
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Color contours and vectors of displacement for the axial displacement example
+ using a mesh composed of two bilinear quadrilateral cells.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:twoquad4-axial"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Shear Displacement Example
+\end_layout
+
+\begin_layout Standard
+The next example problem is shearing of the mesh in the y direction using
+ displacements applied along the positive and negative x boundaries.
+ Parameter settings that override or augment those in 
+\family typewriter
+pylithapp.cfg
+\family default
+ are contained in the file 
+\family typewriter
+sheardisp.cfg
+\family default
+.
+ These include:
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.bc.x_neg Specifies the boundary conditions for the
+ left side of the mesh, defining which degrees of freedom are being constrained
+ (x and y), giving the label (
+\family typewriter
+x_neg
+\family default
+, defined in 
+\family typewriter
+twoquad4.mesh
+\family default
+) defining the points desired, assigning a label to the boundary condition
+ set, and giving the name of the spatial database with the values for the
+ Dirichlet boundary condition (
+\family typewriter
+sheardisp.spatialdb
+\family default
+).
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.bc.x_pos Specifies the boundary conditions for the
+ left side of the mesh, defining which degrees of freedom are being constrained
+ (y only), giving the label (
+\family typewriter
+x_
+\family default
+pos, defined in 
+\family typewriter
+twoquad4.mesh
+\family default
+) defining the points desired, assigning a label to the boundary condition
+ set, and giving the name of the spatial database with the values for the
+ Dirichlet boundary condition (
+\family typewriter
+sheardisp.spatialdb
+\family default
+).
+\end_layout
+
+\begin_layout Standard
+The values for the Dirichlet boundary conditions are described in the file
+ 
+\family typewriter
+sheardisp.spatialdb
+\family default
+, as specified in 
+\family typewriter
+sheardisp.cfg
+\family default
+.
+ In this case, the desired displacement values are given at two control
+ points, corresponding to the two edges we want to constrain.
+ Since data are being specified at two points with a linear variations in
+ the values between the points (rather than being uniform over the mesh,
+ for example), the data dimension is one.
+\end_layout
+
+\begin_layout Standard
+The files containing common information (
+\family typewriter
+twoquad4.mesh
+\family default
+, 
+\family typewriter
+pylithapp.cfg
+\family default
+, 
+\family typewriter
+matprops.spatialdb
+\family default
+) along with the problem-specific files (
+\family typewriter
+sheardisp.cfg
+\family default
+, 
+\family typewriter
+sheardisp.spatialdb
+\family default
+) provide a complete description of the problem, and we can then run this
+ example by typing
+\end_layout
+
+\begin_layout LyX-Code
+pylith sheardisp.cfg
+\end_layout
+
+\begin_layout Standard
+As in the previous example, three files will be produced.
+ If the problem ran correctly, you should be able to produce a figure such
+ as Figure 
+\begin_inset CommandInset ref
+LatexCommand vref
+reference "fig:twoquad4-shear"
+
+\end_inset
+
+, which was generated using ParaView.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/sheardispl.jpg
+	lyxscale 50
+	scale 33
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Color contours and vectors of displacement for the shear displacement example
+ using a mesh composed of two bilinear quadrilateral cells.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:twoquad4-shear"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Kinematic Fault Slip Example
+\end_layout
+
+\begin_layout Standard
+The next example problem is a left-lateral fault slip applied between the
+ two square cells using kinematic cohesive cells.
+ The left and right boundaries are held fixed in the x and y directions.
+ Parameter settings that override or augment those in 
+\family typewriter
+pylithapp.cfg
+\family default
+ are contained in the file 
+\family typewriter
+dislocation.cfg
+\family default
+.
+ These settings include:
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.bc.x_neg Specifies the boundary conditions for the
+ left side of the mesh, defining which degrees of freedom are being constrained
+ (x and y), giving the label (
+\family typewriter
+x_neg
+\family default
+, defined in 
+\family typewriter
+twoquad4.mesh
+\family default
+) defining the points desired, and assigning a label to the boundary condition
+ set.
+ Instead of specifying a spatial database file for the values of the Dirichlet
+ boundary condition, we use the default spatial database (ZeroDispDB) for
+ the Dirichlet boundary condition, which sets the displacements to zero
+ for all time.
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.bc.x_pos Specifies the boundary conditions for the
+ right side of the mesh, defining which degrees of freedom are being constrained
+ (x and y), giving the label (
+\family typewriter
+x_neg
+\family default
+, defined in 
+\family typewriter
+twoquad4.mesh
+\family default
+) defining the points desired, and assigning a label to the boundary condition
+ set.
+ We use the ZeroDispDB for this boundary condition as well, which sets the
+ displacements to zero for all time.
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.interfaces Gives the label (defined in 
+\family typewriter
+twoquad4.mesh
+\family default
+) defining the points on the fault, provides quadrature information, and
+ then gives database names for material properties (needed for conditioning),
+ fault slip, peak fault slip rate, and fault slip time.
+\end_layout
+
+\begin_layout Standard
+The fault example requires three additional database files that were not
+ needed for the simple displacement examples.
+ The first file (
+\family typewriter
+dislocation_slip.spatialdb
+\family default
+) specifies 0.01 m of left-lateral fault slip for the entire fault.
+ The data dimension is zero since the same data are applied to all points
+ in the set.
+ The default slip time function is a step-function, so we also must provide
+ the time at which slip begins.
+ The elastic solution is associated with advancing from 
+\begin_inset Formula $t=-dt$
+\end_inset
+
+ to 
+\begin_inset Formula $t=0$
+\end_inset
+
+, so we set the slip initiation time for the step-function to 0 in 
+\family typewriter
+dislocation_sliptime.spatialdb
+\family default
+.
+\end_layout
+
+\begin_layout Standard
+The files containing common information (
+\family typewriter
+twoquad4.mesh
+\family default
+, 
+\family typewriter
+pylithapp.cfg
+\family default
+, 
+\family typewriter
+matprops.spatialdb
+\family default
+) along with the problem-specific files (
+\family typewriter
+\size small
+dislocation.cfg
+\family default
+, 
+\family typewriter
+dislocation_slip.spatialdb
+\family default
+, 
+\family typewriter
+dislocation_sliptime.spatialdb
+\family default
+\size default
+) provide a complete description of the problem, and we can then run this
+ example by typing
+\end_layout
+
+\begin_layout LyX-Code
+pylith dislocation.cfg
+\end_layout
+
+\begin_layout Standard
+The addition of a fault results in two additional output files (as in the
+ two triangle fault example), 
+\family typewriter
+dislocation-fault_t0000000.vtk
+\family default
+ and 
+\family typewriter
+dislocation-fault_info.vtk
+\family default
+.
+ These files provide output of fault slip, change in tractions, and diagnostic
+ information such as the normal direction, final slip, and slip time for
+ each vertex on the fault.
+ If the problem ran correctly, you should be able to produce a figure such
+ as Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:twoquad4-disloc"
+
+\end_inset
+
+, which was generated using ParaView.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/dislocation.jpg
+	lyxscale 50
+	scale 33
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Color contours and vectors of displacement for the kinematic fault example
+ using a mesh composed of two bilinear quadrilateral cells.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:twoquad4-disloc"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+\begin_inset CommandInset label
+LatexCommand label
+name "sub:Tutorial-twoquad4-traction"
+
+\end_inset
+
+Axial Traction Example
+\end_layout
+
+\begin_layout Standard
+The fourth example demonstrates the use of Neumann (traction) boundary condition
+s.
+ Constant tractions are applied to the right edge of the mesh, while displacemen
+ts normal to the boundaries are held fixed along the left and bottom edges
+ of the mesh.
+ Parameter settings that override or augment those in 
+\family typewriter
+pylithapp.cfg
+\family default
+ are contained in the file 
+\family typewriter
+axialtract.cfg
+\family default
+.
+ These settings include:
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent Specifies an implicit formulation for the problem
+ and specifies the array of boundary conditions.
+ The boundary condition type for 
+\family typewriter
+x_pos
+\family default
+ is explicitly set to 
+\family typewriter
+Neumann
+\family default
+, since the default boundary condition type is 
+\family typewriter
+Dirichlet
+\family default
+.
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.bc.x_neg Specifies the boundary conditions for the
+ left side of the mesh, defining which degrees of freedom are being constrained
+ (x) and giving the label (defined in 
+\family typewriter
+twoquad4.mesh
+\family default
+) defining the points desired.
+ In this case, rather than specifying a spatial database file with values
+ for the Dirichlet boundary conditions, we use the default spatial database
+ (ZeroDispDB) for the Dirichlet boundary condition, which sets the displacements
+ to zero for all time.
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.bc.x_pos Specifies the Neumann boundary conditions
+ for the right side of the mesh, giving the label (defined in 
+\family typewriter
+twoquad4.mesh
+\family default
+) defining the points desired, assigning a label to the boundary condition
+ set, and giving the name of the spatial database with the traction vectors
+ for the Neumann boundary condition (
+\family typewriter
+axialtract.spatialdb
+\family default
+).
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.bc.y_neg Specifies the boundary conditions for the
+ bottom two corners of the mesh, defining which degrees of freedom are being
+ constrained (y) and giving the label (defined in 
+\family typewriter
+twoquad4.mesh
+\family default
+) defining the points desired.
+ In this case, we again use the ZeroDispDB, which sets the displacements
+ to zero for all time.
+\end_layout
+
+\begin_layout Description
+pylithapp.problem.formulation.output.output.writer Gives the base filename for
+ VTK output 
+\begin_inset Newline newline
+\end_inset
+
+(
+\family typewriter
+axialtract.vtk
+\family default
+).
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.bc.x_pos.output Gives the field to be output for the
+ 
+\family typewriter
+x_pos
+\family default
+ boundary (
+\family typewriter
+tractions
+\family default
+), and gives the base filename for 
+\family typewriter
+x_pos
+\family default
+ boundary output (
+\family typewriter
+axialtract-tractions.vtk
+\family default
+).
+\end_layout
+
+\begin_layout Standard
+The traction vectors for the Neumann boundary conditions are given in the
+ file 
+\family typewriter
+axialtract.spatialdb
+\family default
+, as specified in 
+\family typewriter
+axialtract.cfg
+\family default
+.
+ The files containing common information (
+\family typewriter
+twoquad4.mesh
+\family default
+, 
+\family typewriter
+pylithapp.cfg
+\family default
+, 
+\family typewriter
+matprops.spatialdb
+\family default
+) along with the problem-specific files (
+\family typewriter
+axialtract.cfg
+\family default
+, 
+\family typewriter
+axialtract.spatialdb
+\family default
+) provide a complete description of the problem, and we can then run this
+ example by typing
+\end_layout
+
+\begin_layout LyX-Code
+pylith axialtract.cfg
+\end_layout
+
+\begin_layout Standard
+Once the problem has run, six files will be produced.
+ This includes the five files as in the previous example plus 
+\family typewriter
+axialtract-tractions_info.vtk
+\family default
+, which gives the 
+\family typewriter
+x
+\family default
+ and 
+\family typewriter
+y
+\family default
+ components of traction applied at each integration point.
+ If the problem ran correctly, you should be able to produce a figure such
+ as Figure 
+\begin_inset CommandInset ref
+LatexCommand vref
+reference "fig:twoquad4-axialtract"
+
+\end_inset
+
+, which was generated using ParaView.
+ The results may be compared against the analytical solution derived in
+ Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Analytical-Constant-Traction"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/axialtract.jpg
+	lyxscale 50
+	scale 33
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Color contours and vectors of displacement for the axial traction example
+ using a mesh composed of two bilinear quadrilateral cells.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:twoquad4-axialtract"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document

Modified: short/3D/PyLith/trunk/doc/userguide/tutorials/twotet4/twotet4.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/tutorials/twotet4/twotet4.lyx	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/doc/userguide/tutorials/twotet4/twotet4.lyx	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,549 +1,549 @@
-#LyX 2.0 created this file. For more info see http://www.lyx.org/
-\lyxformat 413
-\begin_document
-\begin_header
-\textclass book
-\begin_preamble
-
-\end_preamble
-\use_default_options false
-\maintain_unincluded_children false
-\language english
-\language_package default
-\inputencoding latin1
-\fontencoding global
-\font_roman default
-\font_sans default
-\font_typewriter default
-\font_default_family default
-\use_non_tex_fonts false
-\font_sc false
-\font_osf false
-\font_sf_scale 100
-\font_tt_scale 100
-
-\graphics default
-\default_output_format default
-\output_sync 0
-\bibtex_command default
-\index_command default
-\paperfontsize default
-\spacing single
-\use_hyperref false
-\papersize default
-\use_geometry true
-\use_amsmath 0
-\use_esint 0
-\use_mhchem 1
-\use_mathdots 1
-\cite_engine basic
-\use_bibtopic false
-\use_indices false
-\paperorientation portrait
-\suppress_date false
-\use_refstyle 0
-\index Index
-\shortcut idx
-\color #008000
-\end_index
-\leftmargin 1in
-\topmargin 1in
-\rightmargin 1in
-\bottommargin 2in
-\secnumdepth 3
-\tocdepth 3
-\paragraph_separation indent
-\paragraph_indentation default
-\quotes_language english
-\papercolumns 1
-\papersides 1
-\paperpagestyle default
-\tracking_changes false
-\output_changes false
-\html_math_output 0
-\html_css_as_file 0
-\html_be_strict false
-\end_header
-
-\begin_body
-
-\begin_layout Section
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:Tutorial-Two-tet4"
-
-\end_inset
-
-Tutorial Using Two Tetrahedra
-\end_layout
-
-\begin_layout Standard
-PyLith features discussed in this tutorial:
-\end_layout
-
-\begin_layout Itemize
-Quasi-static solution
-\end_layout
-
-\begin_layout Itemize
-Mesh ASCII format
-\end_layout
-
-\begin_layout Itemize
-Dirichlet boundary conditions
-\end_layout
-
-\begin_layout Itemize
-Kinematic fault interface conditions
-\end_layout
-
-\begin_layout Itemize
-Linearly elastic isotropic material
-\end_layout
-
-\begin_layout Itemize
-VTK output
-\end_layout
-
-\begin_layout Itemize
-Linear tetrahedral cells
-\end_layout
-
-\begin_layout Itemize
-SimpleDB spatial database
-\end_layout
-
-\begin_layout Itemize
-ZeroDispDB spatial database
-\end_layout
-
-\begin_layout Standard
-All of the files necessary to run the examples are contained in the directory
- 
-\family typewriter
-examples/twocells/twotet4.
-\end_layout
-
-\begin_layout Subsection
-Overview
-\end_layout
-
-\begin_layout Standard
-This tutorial is a simple 3D example of a quasi-static finite element problem.
- It is a mesh composed of two linear tetrahedra subject to displacement
- boundary conditions, and is probably the simplest example of a 3D elastic
- problem.
- Due to the simple geometry of the problem, the mesh may be constructed
- by hand, using PyLith mesh ASCII format.
- In this tutorial, we will walk through the steps necessary to construct,
- run, and view two problems that use the same mesh.
- In addition to this manual, each of the files for the example problem includes
- extensive comments.
-\end_layout
-
-\begin_layout Subsection
-Mesh Description
-\end_layout
-
-\begin_layout Standard
-The mesh consists of two tetrahedra forming a pyramid shape (Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:twotet4-mesh"
-
-\end_inset
-
-).
- The mesh geometry and topology is described in the file 
-\family typewriter
-twotet4.mesh
-\family default
-, which is in PyLith mesh ASCII format.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/twotet4-mesh.eps
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Mesh composed of two linear tetrahedral cells used for example problems.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:twotet4-mesh"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Additional Common Information
-\end_layout
-
-\begin_layout Standard
-In addition to the mesh, the two example problems share additional information,
- which we place in 
-\family typewriter
-pylithapp.cfg
-\family default
-.
-\end_layout
-
-\begin_layout Subsection
-Axial Displacement Example
-\end_layout
-
-\begin_layout Standard
-The first example problem is extension of the mesh along the diagonal, extending
- along the base of the pyramid between two opposing vertices.
- Parameter settings that override or augment those in 
-\family typewriter
-pylithapp.cfg
-\family default
- are contained in the file 
-\family typewriter
-axialdisp.cfg
-\family default
-.
- These settings include:
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.bc.bc Defines which degrees of freedom are being constraine
-d (
-\family typewriter
-x
-\family default
-, 
-\family typewriter
-y
-\family default
-, and 
-\family typewriter
-z
-\family default
-), gives the label (defined in 
-\family typewriter
-twotet4.mesh
-\family default
-) defining the points desired, assigns a label to the boundary condition
- set, and gives the name of the spatial database defining the boundary condition
-s (
-\family typewriter
-axialdisp.spatialdb
-\family default
-).
-\end_layout
-
-\begin_layout Standard
-The values for the Dirichlet boundary conditions are described in the file
- 
-\family typewriter
-axialdisp.spatialdb
-\family default
-, as specified in 
-\family typewriter
-axialdisp.cfg
-\family default
-.
- Because data are being specified using two control points (rather than
- being uniform over the mesh), the data dimension is one.
-\end_layout
-
-\begin_layout Standard
-The files containing common information (
-\family typewriter
-twotet4.mesh
-\family default
-, 
-\family typewriter
-pylithapp.cfg
-\family default
-, 
-\family typewriter
-matprops.spatialdb
-\family default
-) along with the problem-specific files (
-\family typewriter
-axialdisp.cfg
-\family default
-, 
-\family typewriter
-axialdisp.spatialdb
-\family default
-) provide a complete description of the problem, and we can then run this
- example by typing
-\end_layout
-
-\begin_layout LyX-Code
-pylith axialdisp.cfg
-\end_layout
-
-\begin_layout Standard
-If the problem ran correctly, you should be able to generate a figure such
- as Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:twotet4-axial"
-
-\end_inset
-
-, which was generated using ParaView.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/axialdisp.jpg
-	lyxscale 50
-	scale 33
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Color contours and vectors of displacement for the axial displacement example
- using a mesh composed of two linear tetrahedral cells.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:twotet4-axial"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Kinematic Fault Slip Example
-\end_layout
-
-\begin_layout Standard
-The next example problem is a left-lateral fault slip applied between the
- two tetrahedral cells using kinematic cohesive cells.
- The vertices away from the fault are held fixed in the 
-\family typewriter
-x
-\family default
-, 
-\family typewriter
-y
-\family default
-, and 
-\family typewriter
-z
-\family default
- directions.
- Parameter settings that override or augment those in 
-\family typewriter
-pylithapp.cfg
-\family default
- are contained in the file 
-\family typewriter
-dislocation.cfg
-\family default
-.
- These settings include:
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.bc.bc Defines which degrees of freedom are being constraine
-d (
-\family typewriter
-x
-\family default
-, 
-\family typewriter
-y
-\family default
-, and 
-\family typewriter
-z
-\family default
-), gives the label (defined in 
-\family typewriter
-twotet4.mesh
-\family default
-) defining the points desired, and assigns a label to the boundary condition
- set.
- Rather than specifying a spatial database file to define the boundary condition
-s, we use the default spatial database (ZeroDispDB) for  the Dirichlet boundary
- condition, which sets the displacements to zero.
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.interfaces Gives the label (defined in 
-\family typewriter
-twotet4.mesh
-\family default
-) defining the points on the fault, provides quadrature information, and
- then gives database names for material properties (needed for conditioning),
- fault slip, peak fault slip rate, and fault slip time.
-\end_layout
-
-\begin_layout Standard
-The fault example requires three additional database files that were not
- needed for the simple displacement examples.
- The first file (
-\family typewriter
-dislocation_slip.spatialdb
-\family default
-) specifies 0.01 m of left-lateral fault slip for the entire fault.
- The data dimension is zero since the same data are applied to all points
- in the set.
- The default slip time function is a step-function, so we also must provide
- the time at which slip begins.
- The elastic solution is associated with advancing from 
-\begin_inset Formula $t=-dt$
-\end_inset
-
- to 
-\begin_inset Formula $t=0$
-\end_inset
-
-, so we set the slip initiation time for the step-function to 0 in 
-\family typewriter
-dislocation_sliptime.spatialdb
-\family default
-.
-\end_layout
-
-\begin_layout Standard
-The files containing common information (
-\family typewriter
-twotet4.mesh
-\family default
-, 
-\family typewriter
-pylithapp.cfg
-\family default
-, 
-\family typewriter
-matprops.spatialdb
-\family default
-) along with the problem-specific files (
-\family typewriter
-\size small
-dislocation.cfg
-\family default
-, 
-\family typewriter
-dislocation_slip.spatialdb
-\family default
-, 
-\family typewriter
-dislocation_sliptime.spatialdb
-\family default
-\size default
-) provide a complete description of the problem, and we can then run this
- example by typing
-\end_layout
-
-\begin_layout LyX-Code
-pylith dislocation.cfg
-\end_layout
-
-\begin_layout Standard
-If the problem ran correctly, you should be able to generate a figure such
- as Figure 
-\begin_inset CommandInset ref
-LatexCommand vref
-reference "fig:twotet4-disloc"
-
-\end_inset
-
-, which was generated using ParaView.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/dislocation.jpg
-	lyxscale 50
-	scale 33
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Color contours and vectors of displacement for the kinematic fault example
- using a mesh composed of two linear tetrahedral cells.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:twotet4-disloc"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_body
-\end_document
+#LyX 2.0 created this file. For more info see http://www.lyx.org/
+\lyxformat 413
+\begin_document
+\begin_header
+\textclass book
+\begin_preamble
+
+\end_preamble
+\use_default_options false
+\maintain_unincluded_children false
+\language english
+\language_package default
+\inputencoding latin1
+\fontencoding global
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry true
+\use_amsmath 0
+\use_esint 0
+\use_mhchem 1
+\use_mathdots 1
+\cite_engine basic
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\use_refstyle 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\leftmargin 1in
+\topmargin 1in
+\rightmargin 1in
+\bottommargin 2in
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\quotes_language english
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\end_header
+
+\begin_body
+
+\begin_layout Section
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Tutorial-Two-tet4"
+
+\end_inset
+
+Tutorial Using Two Tetrahedra
+\end_layout
+
+\begin_layout Standard
+PyLith features discussed in this tutorial:
+\end_layout
+
+\begin_layout Itemize
+Quasi-static solution
+\end_layout
+
+\begin_layout Itemize
+Mesh ASCII format
+\end_layout
+
+\begin_layout Itemize
+Dirichlet boundary conditions
+\end_layout
+
+\begin_layout Itemize
+Kinematic fault interface conditions
+\end_layout
+
+\begin_layout Itemize
+Linearly elastic isotropic material
+\end_layout
+
+\begin_layout Itemize
+VTK output
+\end_layout
+
+\begin_layout Itemize
+Linear tetrahedral cells
+\end_layout
+
+\begin_layout Itemize
+SimpleDB spatial database
+\end_layout
+
+\begin_layout Itemize
+ZeroDispDB spatial database
+\end_layout
+
+\begin_layout Standard
+All of the files necessary to run the examples are contained in the directory
+ 
+\family typewriter
+examples/twocells/twotet4.
+\end_layout
+
+\begin_layout Subsection
+Overview
+\end_layout
+
+\begin_layout Standard
+This tutorial is a simple 3D example of a quasi-static finite element problem.
+ It is a mesh composed of two linear tetrahedra subject to displacement
+ boundary conditions, and is probably the simplest example of a 3D elastic
+ problem.
+ Due to the simple geometry of the problem, the mesh may be constructed
+ by hand, using PyLith mesh ASCII format.
+ In this tutorial, we will walk through the steps necessary to construct,
+ run, and view two problems that use the same mesh.
+ In addition to this manual, each of the files for the example problem includes
+ extensive comments.
+\end_layout
+
+\begin_layout Subsection
+Mesh Description
+\end_layout
+
+\begin_layout Standard
+The mesh consists of two tetrahedra forming a pyramid shape (Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:twotet4-mesh"
+
+\end_inset
+
+).
+ The mesh geometry and topology is described in the file 
+\family typewriter
+twotet4.mesh
+\family default
+, which is in PyLith mesh ASCII format.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/twotet4-mesh.eps
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Mesh composed of two linear tetrahedral cells used for example problems.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:twotet4-mesh"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Additional Common Information
+\end_layout
+
+\begin_layout Standard
+In addition to the mesh, the two example problems share additional information,
+ which we place in 
+\family typewriter
+pylithapp.cfg
+\family default
+.
+\end_layout
+
+\begin_layout Subsection
+Axial Displacement Example
+\end_layout
+
+\begin_layout Standard
+The first example problem is extension of the mesh along the diagonal, extending
+ along the base of the pyramid between two opposing vertices.
+ Parameter settings that override or augment those in 
+\family typewriter
+pylithapp.cfg
+\family default
+ are contained in the file 
+\family typewriter
+axialdisp.cfg
+\family default
+.
+ These settings include:
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.bc.bc Defines which degrees of freedom are being constraine
+d (
+\family typewriter
+x
+\family default
+, 
+\family typewriter
+y
+\family default
+, and 
+\family typewriter
+z
+\family default
+), gives the label (defined in 
+\family typewriter
+twotet4.mesh
+\family default
+) defining the points desired, assigns a label to the boundary condition
+ set, and gives the name of the spatial database defining the boundary condition
+s (
+\family typewriter
+axialdisp.spatialdb
+\family default
+).
+\end_layout
+
+\begin_layout Standard
+The values for the Dirichlet boundary conditions are described in the file
+ 
+\family typewriter
+axialdisp.spatialdb
+\family default
+, as specified in 
+\family typewriter
+axialdisp.cfg
+\family default
+.
+ Because data are being specified using two control points (rather than
+ being uniform over the mesh), the data dimension is one.
+\end_layout
+
+\begin_layout Standard
+The files containing common information (
+\family typewriter
+twotet4.mesh
+\family default
+, 
+\family typewriter
+pylithapp.cfg
+\family default
+, 
+\family typewriter
+matprops.spatialdb
+\family default
+) along with the problem-specific files (
+\family typewriter
+axialdisp.cfg
+\family default
+, 
+\family typewriter
+axialdisp.spatialdb
+\family default
+) provide a complete description of the problem, and we can then run this
+ example by typing
+\end_layout
+
+\begin_layout LyX-Code
+pylith axialdisp.cfg
+\end_layout
+
+\begin_layout Standard
+If the problem ran correctly, you should be able to produce a figure such
+ as Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:twotet4-axial"
+
+\end_inset
+
+, which was generated using ParaView.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/axialdisp.jpg
+	lyxscale 50
+	scale 33
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Color contours and vectors of displacement for the axial displacement example
+ using a mesh composed of two linear tetrahedral cells.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:twotet4-axial"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Kinematic Fault Slip Example
+\end_layout
+
+\begin_layout Standard
+The next example problem is a left-lateral fault slip applied between the
+ two tetrahedral cells using kinematic cohesive cells.
+ The vertices away from the fault are held fixed in the 
+\family typewriter
+x
+\family default
+, 
+\family typewriter
+y
+\family default
+, and 
+\family typewriter
+z
+\family default
+ directions.
+ Parameter settings that override or augment those in 
+\family typewriter
+pylithapp.cfg
+\family default
+ are contained in the file 
+\family typewriter
+dislocation.cfg
+\family default
+.
+ These settings include:
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.bc.bc Defines which degrees of freedom are being constraine
+d (
+\family typewriter
+x
+\family default
+, 
+\family typewriter
+y
+\family default
+, and 
+\family typewriter
+z
+\family default
+), gives the label (defined in 
+\family typewriter
+twotet4.mesh
+\family default
+) defining the points desired, and assigns a label to the boundary condition
+ set.
+ Rather than specifying a spatial database file to define the boundary condition
+s, we use the default spatial database (ZeroDispDB) for the Dirichlet boundary
+ condition, which sets the displacements to zero.
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.interfaces Gives the label (defined in 
+\family typewriter
+twotet4.mesh
+\family default
+) defining the points on the fault, provides quadrature information, and
+ then gives database names for material properties (needed for conditioning),
+ fault slip, peak fault slip rate, and fault slip time.
+\end_layout
+
+\begin_layout Standard
+The fault example requires three additional database files that were not
+ needed for the simple displacement examples.
+ The first file (
+\family typewriter
+dislocation_slip.spatialdb
+\family default
+) specifies 0.01 m of left-lateral fault slip for the entire fault.
+ The data dimension is zero since the same data are applied to all points
+ in the set.
+ The default slip time function is a step-function, so we also must provide
+ the time at which slip begins.
+ The elastic solution is associated with advancing from 
+\begin_inset Formula $t=-dt$
+\end_inset
+
+ to 
+\begin_inset Formula $t=0$
+\end_inset
+
+, so we set the slip initiation time for the step-function to 0 in 
+\family typewriter
+dislocation_sliptime.spatialdb
+\family default
+.
+\end_layout
+
+\begin_layout Standard
+The files containing common information (
+\family typewriter
+twotet4.mesh
+\family default
+, 
+\family typewriter
+pylithapp.cfg
+\family default
+, 
+\family typewriter
+matprops.spatialdb
+\family default
+) along with the problem-specific files (
+\family typewriter
+\size small
+dislocation.cfg
+\family default
+, 
+\family typewriter
+dislocation_slip.spatialdb
+\family default
+, 
+\family typewriter
+dislocation_sliptime.spatialdb
+\family default
+\size default
+) provide a complete description of the problem, and we can then run this
+ example by typing
+\end_layout
+
+\begin_layout LyX-Code
+pylith dislocation.cfg
+\end_layout
+
+\begin_layout Standard
+If the problem ran correctly, you should be able to generate a figure such
+ as Figure 
+\begin_inset CommandInset ref
+LatexCommand vref
+reference "fig:twotet4-disloc"
+
+\end_inset
+
+, which was generated using ParaView.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/dislocation.jpg
+	lyxscale 50
+	scale 33
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Color contours and vectors of displacement for the kinematic fault example
+ using a mesh composed of two linear tetrahedral cells.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:twotet4-disloc"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document

Modified: short/3D/PyLith/trunk/doc/userguide/tutorials/twotet4-geoproj/twotet4-geoproj.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/tutorials/twotet4-geoproj/twotet4-geoproj.lyx	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/doc/userguide/tutorials/twotet4-geoproj/twotet4-geoproj.lyx	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,577 +1,577 @@
-#LyX 2.0 created this file. For more info see http://www.lyx.org/
-\lyxformat 413
-\begin_document
-\begin_header
-\textclass book
-\begin_preamble
-
-\end_preamble
-\use_default_options false
-\maintain_unincluded_children false
-\language english
-\language_package default
-\inputencoding latin1
-\fontencoding global
-\font_roman default
-\font_sans default
-\font_typewriter default
-\font_default_family default
-\use_non_tex_fonts false
-\font_sc false
-\font_osf false
-\font_sf_scale 100
-\font_tt_scale 100
-
-\graphics default
-\default_output_format default
-\output_sync 0
-\bibtex_command default
-\index_command default
-\paperfontsize default
-\spacing single
-\use_hyperref false
-\papersize default
-\use_geometry true
-\use_amsmath 0
-\use_esint 0
-\use_mhchem 1
-\use_mathdots 1
-\cite_engine basic
-\use_bibtopic false
-\use_indices false
-\paperorientation portrait
-\suppress_date false
-\use_refstyle 0
-\index Index
-\shortcut idx
-\color #008000
-\end_index
-\leftmargin 1in
-\topmargin 1in
-\rightmargin 1in
-\bottommargin 2in
-\secnumdepth 3
-\tocdepth 3
-\paragraph_separation indent
-\paragraph_indentation default
-\quotes_language english
-\papercolumns 1
-\papersides 1
-\paperpagestyle default
-\tracking_changes false
-\output_changes false
-\html_math_output 0
-\html_css_as_file 0
-\html_be_strict false
-\end_header
-
-\begin_body
-
-\begin_layout Section
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:Tutorial-Two-tet4-geoproj"
-
-\end_inset
-
-Tutorial Using Two Tetrahedra with Georeferenced Coordinate System Mesh
-\end_layout
-
-\begin_layout Standard
-PyLith features discussed in this tutorial:
-\end_layout
-
-\begin_layout Itemize
-Quasi-static solution
-\end_layout
-
-\begin_layout Itemize
-Mesh ASCII format
-\end_layout
-
-\begin_layout Itemize
-Dirichlet boundary conditions
-\end_layout
-
-\begin_layout Itemize
-Kinematic fault interface conditions
-\end_layout
-
-\begin_layout Itemize
-Linearly elastic isotropic material
-\end_layout
-
-\begin_layout Itemize
-VTK output
-\end_layout
-
-\begin_layout Itemize
-Linear tetrahedral cells
-\end_layout
-
-\begin_layout Itemize
-SimpleDB spatial database with geographic coordinates
-\end_layout
-
-\begin_layout Itemize
-SCEC CVM-H spatial database
-\end_layout
-
-\begin_layout Itemize
-ZeroDispDB spatial database
-\end_layout
-
-\begin_layout Standard
-All of the files necessary to run the examples are contained in the directory
- 
-\family typewriter
-examples/twocells/twotet4-geoproj.
-\end_layout
-
-\begin_layout Subsection
-Overview
-\end_layout
-
-\begin_layout Standard
-This tutorial is virtually identical to the other tutorial using two linear
- tetrahedra (See Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:Tutorial-Two-tet4"
-
-\end_inset
-
-).
- The primary difference is in how the material properties are assigned.
- For this tutorial, the physical properties come from the SCEC CVM-H database
- (described in Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sub:SCECCVMH-Impl"
-
-\end_inset
-
-).
- Using the SCEC CVM-H database is straightforward, requiring only a few
- modifications to 
-\family typewriter
-pylithapp.cfg
-\family default
-.
- Because the SCEC CVM-H database uses geographic coordinates, we must also
- use geographic coordinates in the PyLith mesh ASCII file and other spatial
- databases.
- Note that all of these geographic coordinate systems do not need to be
- the same.
- PyLith will automatically transform from one geographic coordinate system
- to another using the spatialdata package.
- The spatial databases should all use a georeferenced Cartesian coordinate
- system, such as a geographic projection to insure interpolation is performed
- properly.
- Since all aspects of this problem other than the material database and
- the coordinate system are identical to the examples in Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:Tutorial-Two-tet4"
-
-\end_inset
-
-, we only describe the kinematic fault problem in this tutorial.
-\end_layout
-
-\begin_layout Subsection
-Mesh Description
-\end_layout
-
-\begin_layout Standard
-The mesh consists of two tetrahedra forming a pyramid shape (Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:twotet4-geoproj-mesh"
-
-\end_inset
-
-).
- The mesh geometry and topology are described in the file 
-\family typewriter
-twotet4.mesh
-\family default
-, which is in PyLith mesh ASCII format.
- If you compare this mesh against the one used in 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:Tutorial-Two-tet4"
-
-\end_inset
-
-, you will notice that, although the mesh topology is the same, the vertex
- coordinates are significantly different.
- We use zone 11 UTM coordinates with the NAD27 datum for the mesh.
- Although we used the same coordinate system as the SCEC CVM-H, we could
- have also used any another geographic projection supported by spatialdata
- and Proj.4.
- See Appendix 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:Spatialdata:SimpleIOAscii"
-
-\end_inset
-
- for other examples of using geographic coordinates.
- 
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/twotet4-mesh.eps
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Mesh composed of two linear tetrahedral cells in a georeferenced coordinate
- system used for the example problems.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:twotet4-geoproj-mesh"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Additional Common Information
-\end_layout
-
-\begin_layout Standard
-This problem has some unique aspects compared to the other tutorials.
- First, all of the other tutorials use a Cartesian coordinate system, while
- this one uses a geographic coordinate system.
- In addition to using different vertex coordinates, we also define the coordinat
-e system for the mesh in 
-\family typewriter
-pylithapp.cfg
-\family default
-:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.mesh_generator.importer]
-\end_layout
-
-\begin_layout LyX-Code
-coordsys = spatialdata.geocoords.CSGeoProj
-\end_layout
-
-\begin_layout LyX-Code
-filename = twotet4.mesh
-\end_layout
-
-\begin_layout LyX-Code
-coordsys.space_dim = 3
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.mesh_generator.importer.coordsys]
-\end_layout
-
-\begin_layout LyX-Code
-datum_horiz = NAD27
-\end_layout
-
-\begin_layout LyX-Code
-datum_vert = mean sea level
-\end_layout
-
-\begin_layout LyX-Code
-ellipsoid = clrk66
-\end_layout
-
-\begin_layout LyX-Code
- 
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.mesh_generator.importer.coordsys.projector]
-\end_layout
-
-\begin_layout LyX-Code
-projection = utm
-\end_layout
-
-\begin_layout LyX-Code
-proj-options = +zone=11 
-\end_layout
-
-\begin_layout Standard
-At the top level, we define the type of coordinate system, give the file
- describing the mesh, and give the number of spatial dimensions for the
- coordinate system.
- We then provide the horizontal datum and vertical datum for the coordinate
- system, along with the ellipsoid to be used.
- Finally, we specify a UTM projection, and specify zone 11 as the zone to
- be used.
-\end_layout
-
-\begin_layout Standard
-In addition to the usual material information, we must specify that we want
- to use the 
-\family typewriter
-SCECCVMH
-\family default
- database implementation:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.materials.material]
-\end_layout
-
-\begin_layout LyX-Code
-db = spatialdata.spatialdb.SCECCVMH
-\end_layout
-
-\begin_layout LyX-Code
-db.data_dir = /home/brad/data/sceccvm-h/vx53/bin
-\end_layout
-
-\begin_layout Standard
-The first 
-\family typewriter
-db
-\family default
- option defines 
-\family typewriter
-SCECCVMH
-\family default
- as the spatial database to be used.
- The next line defines the location of the 
-\family typewriter
-vx53
-\family default
- data files, and must be changed to the location specified by the user when
- the package is installed.
- The package may be obtained from Harvard's Structural Geology and Tectonics
- 
-\begin_inset Flex URL
-status collapsed
-
-\begin_layout Plain Layout
-
-structure.harvard.edu/cvm-h
-\end_layout
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Standard
-The final difference with the other examples is in the description of the
- spatial databases.
- They must also use geographic coordinates.
- Examining 
-\family typewriter
-dislocation_slip.spatialdb
-\family default
-, we find:
-\end_layout
-
-\begin_layout LyX-Code
-// We are specifying the data in a projected geographic coordinate system.
-\end_layout
-
-\begin_layout LyX-Code
-cs-data = geo-projected {
-\end_layout
-
-\begin_layout LyX-Code
-  to-meters = 1.0
-\end_layout
-
-\begin_layout LyX-Code
-  ellipsoid = clrk66
-\end_layout
-
-\begin_layout LyX-Code
-  datum-horiz = NAD27
-\end_layout
-
-\begin_layout LyX-Code
-  datum-vert = mean sea level
-\end_layout
-
-\begin_layout LyX-Code
-  projector = projection {
-\end_layout
-
-\begin_layout LyX-Code
-    projection = utm
-\end_layout
-
-\begin_layout LyX-Code
-    units = m
-\end_layout
-
-\begin_layout LyX-Code
-    proj-options = +zone=11
-\end_layout
-
-\begin_layout LyX-Code
-  }
-\end_layout
-
-\begin_layout LyX-Code
-}
-\end_layout
-
-\begin_layout Subsection
-Kinematic Fault Slip Example
-\end_layout
-
-\begin_layout Standard
-This example problem is a left-lateral fault slip applied between the two
- tetrahedral cells using kinematic cohesive cells.
- Note that we vary the amount of fault slip for each vertex with this example,
- as described in 
-\family typewriter
-dislocation_slip.spatialdb
-\family default
-.
- The vertices away from the fault are held fixed in the x, y, and z directions.
- Parameter settings that override or augment those in 
-\family typewriter
-pylithapp.cfg
-\family default
- are contained in the file 
-\family typewriter
-dislocation.cfg
-\family default
-.
-\end_layout
-
-\begin_layout Standard
-Recall that we condition problems with the kinematic fault interface using
- the material properties.
- Since the material properties are being defined using the SCEC CVM-H database,
- this same database should be used as the material database for the faults.
- This also applies to the AbsorbingDampers boundary condition.
-\end_layout
-
-\begin_layout Standard
-The files containing common information (
-\family typewriter
-twotet4.mesh
-\family default
-, 
-\family typewriter
-pylithapp.cfg
-\family default
-) along with the problem-specific files (
-\family typewriter
-\size small
-dislocation.cfg
-\family default
-, 
-\family typewriter
-dislocation_slip.spatialdb
-\family default
-, 
-\family typewriter
-dislocation_sliptime.spatialdb
-\family default
-\size default
-) provide a complete description of the problem, and we can then run this
- example by typing
-\end_layout
-
-\begin_layout LyX-Code
-pylith dislocation.cfg
-\end_layout
-
-\begin_layout Standard
-If the problem ran correctly, you should be able to generate a figure such
- as Figure 
-\begin_inset CommandInset ref
-LatexCommand vref
-reference "fig:twotet4-geoproj-disloc"
-
-\end_inset
-
-, which was generated using ParaView.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/dislocation.jpg
-	lyxscale 50
-	scale 33
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Color contours and vectors of displacement for the kinematic fault example
- using a mesh composed of two linear tetrahedral cells in a georeferenced
- coordinate system.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:twotet4-geoproj-disloc"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_body
-\end_document
+#LyX 2.0 created this file. For more info see http://www.lyx.org/
+\lyxformat 413
+\begin_document
+\begin_header
+\textclass book
+\begin_preamble
+
+\end_preamble
+\use_default_options false
+\maintain_unincluded_children false
+\language english
+\language_package default
+\inputencoding latin1
+\fontencoding global
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry true
+\use_amsmath 0
+\use_esint 0
+\use_mhchem 1
+\use_mathdots 1
+\cite_engine basic
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\use_refstyle 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\leftmargin 1in
+\topmargin 1in
+\rightmargin 1in
+\bottommargin 2in
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\quotes_language english
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\end_header
+
+\begin_body
+
+\begin_layout Section
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Tutorial-Two-tet4-geoproj"
+
+\end_inset
+
+Tutorial Using Two Tetrahedra with Georeferenced Coordinate System Mesh
+\end_layout
+
+\begin_layout Standard
+PyLith features discussed in this tutorial:
+\end_layout
+
+\begin_layout Itemize
+Quasi-static solution
+\end_layout
+
+\begin_layout Itemize
+Mesh ASCII format
+\end_layout
+
+\begin_layout Itemize
+Dirichlet boundary conditions
+\end_layout
+
+\begin_layout Itemize
+Kinematic fault interface conditions
+\end_layout
+
+\begin_layout Itemize
+Linearly elastic isotropic material
+\end_layout
+
+\begin_layout Itemize
+VTK output
+\end_layout
+
+\begin_layout Itemize
+Linear tetrahedral cells
+\end_layout
+
+\begin_layout Itemize
+SimpleDB spatial database with geographic coordinates
+\end_layout
+
+\begin_layout Itemize
+SCEC CVM-H spatial database
+\end_layout
+
+\begin_layout Itemize
+ZeroDispDB spatial database
+\end_layout
+
+\begin_layout Standard
+All of the files necessary to run the examples are contained in the directory
+ 
+\family typewriter
+examples/twocells/twotet4-geoproj.
+\end_layout
+
+\begin_layout Subsection
+Overview
+\end_layout
+
+\begin_layout Standard
+This tutorial is virtually identical to the other tutorial using two linear
+ tetrahedra (See Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Tutorial-Two-tet4"
+
+\end_inset
+
+).
+ The primary difference is in how the material properties are assigned.
+ For this tutorial, the physical properties come from the SCEC CVM-H database
+ (described in Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:SCECCVMH-Impl"
+
+\end_inset
+
+).
+ Using the SCEC CVM-H database is straightforward, requiring only a few
+ modifications to 
+\family typewriter
+pylithapp.cfg
+\family default
+.
+ Because the SCEC CVM-H database uses geographic coordinates, we must also
+ use geographic coordinates in the PyLith mesh ASCII file and other spatial
+ databases.
+ Note that all of these geographic coordinate systems do not need to be
+ the same.
+ PyLith will automatically transform from one geographic coordinate system
+ to another using the spatialdata package.
+ The spatial databases should all use a georeferenced Cartesian coordinate
+ system, such as a geographic projection to insure interpolation is performed
+ properly.
+ Since all aspects of this problem other than the material database and
+ the coordinate system are identical to the examples in Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Tutorial-Two-tet4"
+
+\end_inset
+
+, we only describe the kinematic fault problem in this tutorial.
+\end_layout
+
+\begin_layout Subsection
+Mesh Description
+\end_layout
+
+\begin_layout Standard
+The mesh consists of two tetrahedra forming a pyramid shape (Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:twotet4-geoproj-mesh"
+
+\end_inset
+
+).
+ The mesh geometry and topology are described in the file 
+\family typewriter
+twotet4.mesh
+\family default
+, which is in PyLith mesh ASCII format.
+ If you compare this mesh against the one used in 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Tutorial-Two-tet4"
+
+\end_inset
+
+, you will notice that, although the mesh topology is the same, the vertex
+ coordinates are significantly different.
+ We use zone 11 UTM coordinates with the NAD27 datum for the mesh.
+ Although we used the same coordinate system as the SCEC CVM-H, we could
+ have also used any other geographic projection supported by spatialdata
+ and Proj.4.
+ See Appendix 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Spatialdata:SimpleIOAscii"
+
+\end_inset
+
+ for other examples of using geographic coordinates.
+ 
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/twotet4-mesh.eps
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Mesh composed of two linear tetrahedral cells in a georeferenced coordinate
+ system used for the example problems.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:twotet4-geoproj-mesh"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Additional Common Information
+\end_layout
+
+\begin_layout Standard
+This problem has some unique aspects compared to the other tutorials.
+ First, all of the other tutorials use a Cartesian coordinate system, while
+ this one uses a geographic coordinate system.
+ In addition to using different vertex coordinates, we also define the coordinat
+e system for the mesh in 
+\family typewriter
+pylithapp.cfg
+\family default
+:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.mesh_generator.importer]
+\end_layout
+
+\begin_layout LyX-Code
+coordsys = spatialdata.geocoords.CSGeoProj
+\end_layout
+
+\begin_layout LyX-Code
+filename = twotet4.mesh
+\end_layout
+
+\begin_layout LyX-Code
+coordsys.space_dim = 3
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.mesh_generator.importer.coordsys]
+\end_layout
+
+\begin_layout LyX-Code
+datum_horiz = NAD27
+\end_layout
+
+\begin_layout LyX-Code
+datum_vert = mean sea level
+\end_layout
+
+\begin_layout LyX-Code
+ellipsoid = clrk66
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.mesh_generator.importer.coordsys.projector]
+\end_layout
+
+\begin_layout LyX-Code
+projection = utm
+\end_layout
+
+\begin_layout LyX-Code
+proj-options = +zone=11 
+\end_layout
+
+\begin_layout Standard
+At the top level, we define the type of coordinate system, give the file
+ describing the mesh, and give the number of spatial dimensions for the
+ coordinate system.
+ We then provide the horizontal datum and vertical datum for the coordinate
+ system, along with the ellipsoid to be used.
+ Finally, we specify a UTM projection, and specify zone 11 as the zone to
+ be used.
+\end_layout
+
+\begin_layout Standard
+In addition to the usual material information, we must specify that we want
+ to use the 
+\family typewriter
+SCECCVMH
+\family default
+ database implementation:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.materials.material]
+\end_layout
+
+\begin_layout LyX-Code
+db = spatialdata.spatialdb.SCECCVMH
+\end_layout
+
+\begin_layout LyX-Code
+db.data_dir = /home/brad/data/sceccvm-h/vx53/bin
+\end_layout
+
+\begin_layout Standard
+The first 
+\family typewriter
+db
+\family default
+ option defines 
+\family typewriter
+SCECCVMH
+\family default
+ as the spatial database to be used.
+ The next line defines the location of the 
+\family typewriter
+vx53
+\family default
+ data files, and must be changed to the location specified by the user when
+ the package is installed.
+ The package may be obtained from Harvard's Structural Geology and Tectonics
+ 
+\begin_inset Flex URL
+status collapsed
+
+\begin_layout Plain Layout
+
+structure.harvard.edu/cvm-h
+\end_layout
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Standard
+The final difference with the other examples is in the description of the
+ spatial databases.
+ They must also use geographic coordinates.
+ Examining 
+\family typewriter
+dislocation_slip.spatialdb
+\family default
+, we find:
+\end_layout
+
+\begin_layout LyX-Code
+// We are specifying the data in a projected geographic coordinate system.
+\end_layout
+
+\begin_layout LyX-Code
+cs-data = geo-projected {
+\end_layout
+
+\begin_layout LyX-Code
+  to-meters = 1.0
+\end_layout
+
+\begin_layout LyX-Code
+  ellipsoid = clrk66
+\end_layout
+
+\begin_layout LyX-Code
+  datum-horiz = NAD27
+\end_layout
+
+\begin_layout LyX-Code
+  datum-vert = mean sea level
+\end_layout
+
+\begin_layout LyX-Code
+  projector = projection {
+\end_layout
+
+\begin_layout LyX-Code
+    projection = utm
+\end_layout
+
+\begin_layout LyX-Code
+    units = m
+\end_layout
+
+\begin_layout LyX-Code
+    proj-options = +zone=11
+\end_layout
+
+\begin_layout LyX-Code
+  }
+\end_layout
+
+\begin_layout LyX-Code
+}
+\end_layout
+
+\begin_layout Subsection
+Kinematic Fault Slip Example
+\end_layout
+
+\begin_layout Standard
+This example problem is a left-lateral fault slip applied between the two
+ tetrahedral cells using kinematic cohesive cells.
+ Note that we vary the amount of fault slip for each vertex with this example,
+ as described in 
+\family typewriter
+dislocation_slip.spatialdb
+\family default
+.
+ The vertices away from the fault are held fixed in the x, y, and z directions.
+ Parameter settings that override or augment those in 
+\family typewriter
+pylithapp.cfg
+\family default
+ are contained in the file 
+\family typewriter
+dislocation.cfg
+\family default
+.
+\end_layout
+
+\begin_layout Standard
+Recall that we condition problems with the kinematic fault interface using
+ the material properties.
+ Since the material properties are being defined using the SCEC CVM-H database,
+ this same database should be used as the material database for the faults.
+ This also applies to the AbsorbingDampers boundary condition.
+\end_layout
+
+\begin_layout Standard
+The files containing common information (
+\family typewriter
+twotet4.mesh
+\family default
+, 
+\family typewriter
+pylithapp.cfg
+\family default
+) along with the problem-specific files (
+\family typewriter
+\size small
+dislocation.cfg
+\family default
+, 
+\family typewriter
+dislocation_slip.spatialdb
+\family default
+, 
+\family typewriter
+dislocation_sliptime.spatialdb
+\family default
+\size default
+) provide a complete description of the problem, and we can then run this
+ example by typing
+\end_layout
+
+\begin_layout LyX-Code
+pylith dislocation.cfg
+\end_layout
+
+\begin_layout Standard
+If the problem ran correctly, you should be able to generate a figure such
+ as Figure 
+\begin_inset CommandInset ref
+LatexCommand vref
+reference "fig:twotet4-geoproj-disloc"
+
+\end_inset
+
+, which was generated using ParaView.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/dislocation.jpg
+	lyxscale 50
+	scale 33
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Color contours and vectors of displacement for the kinematic fault example
+ using a mesh composed of two linear tetrahedral cells in a georeferenced
+ coordinate system.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:twotet4-geoproj-disloc"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document

Modified: short/3D/PyLith/trunk/doc/userguide/tutorials/twotri3/twotri3.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/tutorials/twotri3/twotri3.lyx	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/doc/userguide/tutorials/twotri3/twotri3.lyx	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,870 +1,870 @@
-#LyX 2.0 created this file. For more info see http://www.lyx.org/
-\lyxformat 413
-\begin_document
-\begin_header
-\textclass book
-\begin_preamble
-
-\end_preamble
-\use_default_options false
-\maintain_unincluded_children false
-\language english
-\language_package default
-\inputencoding latin1
-\fontencoding global
-\font_roman default
-\font_sans default
-\font_typewriter default
-\font_default_family default
-\use_non_tex_fonts false
-\font_sc false
-\font_osf false
-\font_sf_scale 100
-\font_tt_scale 100
-
-\graphics default
-\default_output_format default
-\output_sync 0
-\bibtex_command default
-\index_command default
-\paperfontsize default
-\spacing single
-\use_hyperref false
-\papersize default
-\use_geometry true
-\use_amsmath 0
-\use_esint 0
-\use_mhchem 1
-\use_mathdots 1
-\cite_engine basic
-\use_bibtopic false
-\use_indices false
-\paperorientation portrait
-\suppress_date false
-\use_refstyle 0
-\index Index
-\shortcut idx
-\color #008000
-\end_index
-\leftmargin 1in
-\topmargin 1in
-\rightmargin 1in
-\bottommargin 1in
-\secnumdepth 3
-\tocdepth 3
-\paragraph_separation indent
-\paragraph_indentation default
-\quotes_language english
-\papercolumns 1
-\papersides 1
-\paperpagestyle default
-\tracking_changes false
-\output_changes false
-\html_math_output 0
-\html_css_as_file 0
-\html_be_strict false
-\end_header
-
-\begin_body
-
-\begin_layout Section
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:Tutorial-Two-triangle"
-
-\end_inset
-
-Tutorial Using Two Triangles
-\end_layout
-
-\begin_layout Standard
-PyLith features discussed in this tutorial:
-\end_layout
-
-\begin_layout Itemize
-Quasi-static solution
-\end_layout
-
-\begin_layout Itemize
-Mesh ASCII format
-\end_layout
-
-\begin_layout Itemize
-Dirichlet boundary conditions
-\end_layout
-
-\begin_layout Itemize
-Kinematic fault interface conditions
-\end_layout
-
-\begin_layout Itemize
-Plane strain linearly elastic material
-\end_layout
-
-\begin_layout Itemize
-VTK output
-\end_layout
-
-\begin_layout Itemize
-Linear triangular cells
-\end_layout
-
-\begin_layout Itemize
-SimpleDB spatial database
-\end_layout
-
-\begin_layout Itemize
-ZeroDispDB spatial database
-\end_layout
-
-\begin_layout Standard
-All of the files necessary to run the examples are contained in the directory
- 
-\family typewriter
-examples/twocells/twotri3.
-\end_layout
-
-\begin_layout Subsection
-Overview
-\end_layout
-
-\begin_layout Standard
-This tutorial is the simplest 2D example of a quasi-static finite element
- problem (a simpler problem would consist of a 1D bar).
- It is a mesh composed of two linear triangles subject to displacement boundary
- conditions, assuming plane-strain linear elastic behavior.
- Due to the simple geometry of the problem, the mesh may be constructed
- by hand, using PyLith mesh ASCII format.
- In this tutorial, we will walk through the steps necessary to construct,
- run, and view three problems that use the same mesh.
- In addition to this manual, each of the files for the example problem includes
- extensive comments.
-\end_layout
-
-\begin_layout Subsection
-Mesh Description
-\end_layout
-
-\begin_layout Standard
-The mesh consists of two triangles forming a square with edge lengths of
- one unit (Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:twotri3-mesh"
-
-\end_inset
-
-).
- The mesh geometry and topology are described in the file 
-\family typewriter
-twotri3.mesh
-\family default
-, which is in PyLith mesh ASCII format.
- This file format is described in Appendix 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "cha:File-Formats"
-
-\end_inset
-
-.
- This file describes the dimensionality of the problem (1D, 2D, or 3D),
- the coordinates of the vertices (nodes), the vertices composing each cell
- (element), the material ID to be associated with each cell, and groups
- of vertices that may be used to define faults or surfaces to which boundary
- conditions may be applied.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/twotri3-mesh.eps
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Mesh composed of two linear triangular cells used in the example problems.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:twotri3-mesh"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Additional Common Information
-\end_layout
-
-\begin_layout Standard
-In addition to the mesh, the three example problems share additional information.
- For problems of this type, it is generally useful to create a file named
- 
-\family typewriter
-pylithapp.cfg
-\family default
- in the working directory, since this file is read automatically every time
- PyLith is run.
- Settings specific to a particular problem may be placed in other 
-\family typewriter
-.cfg
-\family default
- files, as described later, and then those files are placed on the command
- line.
- The settings contained in 
-\family typewriter
-pylithapp.cfg
-\family default
- for this problem consist of:
-\end_layout
-
-\begin_layout Description
-pylithapp.journal.info Settings that control the verbosity of the output for
- the different components.
-\end_layout
-
-\begin_layout Description
-pylithapp.mesh_generator Settings that control mesh importing, such as the
- importer type, the filename, and the spatial dimension of the mesh.
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent Settings that control the problem, such as the total
- time, time step size, and spatial dimension.
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.materials Settings that control the material type,
- specify which material IDs are to be associated with a particular material
- type, and give the name of the spatial database containing the physical
-  properties for the material.
- The quadrature information is also given.
-\end_layout
-
-\begin_layout Description
-pylithapp.petsc PETSc settings to use for the problem, such as the preconditioner
- type.
-\end_layout
-
-\begin_layout Standard
-All of the problems in this directory use the same material database, as
- specified under 
-\end_layout
-
-\begin_layout LyX-Code
-
-\family typewriter
-pylithapp.timedependent.materials
-\family default
- 
-\end_layout
-
-\begin_layout Standard
-in 
-\family typewriter
-pylithapp.cfg
-\family default
-.
- This information is contained in the file 
-\family typewriter
-matprops.spatialdb
-\family default
-.
- Although the material model is specified in 
-\family typewriter
-pylithapp.cfg
-\family default
-, the values for the physical properties of the material are given in 
-\family typewriter
-matprops.spatialdb
-\family default
-.
- For this example, values describing elastic plane strain material properties
- are given at a single point, resulting in uniform material properties.
-\end_layout
-
-\begin_layout Subsection
-Axial Displacement Example
-\end_layout
-
-\begin_layout Standard
-The first example problem is extension of the mesh along the diagonal extending
- from the lower left to the upper right of the square mesh.
- Parameter settings that augment those in 
-\family typewriter
-pylithapp.cfg
-\family default
- are contained in the file 
-\family typewriter
-axialdisp.cfg
-\family default
-.
- These settings are:
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent Specifies an implicit formulation for the problem
- and specifies the array of boundary conditions.
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.bc.bc Defines which degrees of freedom are being constraine
-d (x and y), gives the label (defined in 
-\family typewriter
-twotri3.mesh
-\family default
-) defining the points desired, assigns a label to the boundary condition
- set, and gives the name of the spatial database with the values for the
- Dirichlet boundary condition (
-\family typewriter
-axialdisp.spatialdb
-\family default
-).
-\end_layout
-
-\begin_layout Description
-pylithapp.problem.formulation.output.output.writer Gives the base filename for
- VTK output 
-\begin_inset Newline newline
-\end_inset
-
-(
-\family typewriter
-axialdisp.vtk
-\family default
-).
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.materials.material.output Gives the base filename for
- state variable output files (
-\family typewriter
-axialdisp-statevars.vtk
-\family default
-).
-\end_layout
-
-\begin_layout Standard
-The values for the Dirichlet boundary condition are given in the file 
-\family typewriter
-axialdisp.spatialdb
-\family default
-, as specified in 
-\family typewriter
-axialdisp.cfg
-\family default
-.
- The format of all spatial database files is similar.
- In this case, the desired displacement values are given at two points (lower
- left and upper right).
- Since data are being specified at points (rather than being uniform over
- the mesh, for example), the data dimension is one.
-\end_layout
-
-\begin_layout Standard
-The files containing common information (
-\family typewriter
-twotri3.mesh
-\family default
-, 
-\family typewriter
-pylithapp.cfg
-\family default
-, 
-\family typewriter
-matprops.spatialdb
-\family default
-) along with the problem-specific files (
-\family typewriter
-axialdisp.cfg
-\family default
-, 
-\family typewriter
-axialdisp.spatialdb
-\family default
-) provide a complete description of the problem, and we can then run this
- example by typing
-\end_layout
-
-\begin_layout LyX-Code
-pylith axialdisp.cfg
-\end_layout
-
-\begin_layout Standard
-Once the problem has run, three files will be produced.
- The first file is named 
-\family typewriter
-axialdisp_t0000000.vtk
-\family default
-.
- The 
-\family typewriter
-t0000000
-\family default
- indicates that the output is for the first (and only) time step, corresponding
- to an elastic solution.
- This file contains mesh information as well as displacement values at the
- mesh vertices.
- The second file is named 
-\family typewriter
-axialdisp-statevars_t0000000.vtk
-\family default
-.
- This file contains the state variables for each cell.
- The default fields are the total strain and stress fields.
- Since the cells are linear triangles, there is a single quadrature point
- for each cell and thus a single set of stress and strain values for each
- cell.
- The final file (
-\family typewriter
-axialdisp-statevars_info.vtk
-\family default
-) gives the material properties used for the problem.
- Since we have not specified which properties to write, the default properties
- (
-\family typewriter
-mu
-\family default
-, 
-\family typewriter
-lambda
-\family default
-, 
-\family typewriter
-density
-\family default
-) are written.
- All of the 
-\family typewriter
-.vtk
-\family default
- files may be used with a number of visualization packages.
- If the problem ran correctly, you should be able to generate a figure such
- as Figure 
-\begin_inset CommandInset ref
-LatexCommand vref
-reference "fig:twotri3-axial"
-
-\end_inset
-
-, which was generated using ParaView.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/axialdisp.jpg
-	lyxscale 50
-	scale 33
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Color contours and vectors of displacement for the axial displacement example
- using a mesh composed of two linear triangular cells.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:twotri3-axial"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Shear Displacement Example
-\end_layout
-
-\begin_layout Standard
-The next example problem is shearing of the mesh in the y direction using
- displacements applied along the positive and negative x boundaries.
- Parameter settings that augment those in 
-\family typewriter
-pylithapp.cfg
-\family default
- are contained in the file 
-\family typewriter
-sheardisp.cfg
-\family default
-.
- These settings include:
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.bc.x_neg Specifies the boundary conditions for the
- left side of the mesh, defining which degrees of freedom are being constrained
- (x and y), giving the label (
-\family typewriter
-x_neg
-\family default
-, defined in 
-\family typewriter
-twotri3.mesh
-\family default
-) defining the points desired, assigning a label to the boundary condition
- set, and giving the name of the spatial database with the values for the
- Dirichlet boundary condition (
-\family typewriter
-sheardisp.spatialdb
-\family default
-).
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.bc.x_pos Specifies the boundary conditions for the
- left side of the mesh, defining which degrees of freedom are being constrained
- (y only), giving the label (
-\family typewriter
-x_
-\family default
-pos, defined in 
-\family typewriter
-twotri3.mesh
-\family default
-) defining the points desired, assigning a label to the boundary condition
- set, and giving the name of the spatial database with the values for the
- Dirichlet boundary condition (
-\family typewriter
-sheardisp.spatialdb
-\family default
-).
-\end_layout
-
-\begin_layout Standard
-The files containing common information (
-\family typewriter
-twotri3.mesh
-\family default
-, 
-\family typewriter
-pylithapp.cfg
-\family default
-, 
-\family typewriter
-matprops.spatialdb
-\family default
-) along with the problem-specific files (
-\family typewriter
-sheardisp.cfg
-\family default
-, 
-\family typewriter
-sheardisp.spatialdb
-\family default
-) provide a complete description of the problem, and we can then run this
- example by typing
-\end_layout
-
-\begin_layout LyX-Code
-pylith sheardisp.cfg
-\end_layout
-
-\begin_layout Standard
-Once the problem has run, three files will be produced as in the previous
- example.
- If the problem ran correctly, you should be able to generate a figure such
- as Figure 
-\begin_inset CommandInset ref
-LatexCommand vref
-reference "fig:twotri-shear"
-
-\end_inset
-
-, which was generated using ParaView.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/sheardisp.jpg
-	lyxscale 50
-	scale 33
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Color contours and vectors of displacement for the shear displacement example
- using a mesh composed of two linear triangular cells.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:twotri-shear"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Kinematic Fault Slip Example
-\end_layout
-
-\begin_layout Standard
-The next example problem is left-lateral fault slip applied between the
- two triangular cells using kinematic cohesive cells.
- The lower left and upper right boundaries are held fixed in the x and y
- directions.
- Parameter settings that augment those in 
-\family typewriter
-pylithapp.cfg
-\family default
- are contained in the file 
-\family typewriter
-dislocation.cfg
-\family default
-.
- The solution corresponds to rigid body rotation of each triangular cell.
- As a result, the tractions on the fault are zero.
- These settings include:
-\end_layout
-
-\begin_layout Description
-pylithapp.journal.info Turns on journaling for 1D quadrature (used for 2D
- faults) and for cohesive kinematic faults.
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.bc.bc Defines which degrees of freedom are being constraine
-d (x and y), gives the label (defined in 
-\family typewriter
-twotri3.mesh
-\family default
-) defining the points desired, and assigns a label to the boundary condition
- set.
- In this case, rather than specifying a spatial database file with the values
- for the Dirichlet boundary condition.
- The default database (ZeroDispDB) for Dirichlet boundary conditions is
- used, which sets the displacements to zero.
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.interfaces Gives the label (defined in 
-\family typewriter
-twotri3.mesh
-\family default
-) defining the points on the fault, provides quadrature information, and
- then gives database names for material properties (needed for conditioning),
- fault slip, peak fault slip rate, and fault slip time.
-\end_layout
-
-\begin_layout Description
-pylithapp.timedependent.interfaces.fault.output.writer Gives the base filename
- for cohesive cell output files (
-\family typewriter
-dislocation-fault.vtk
-\family default
-).
-\end_layout
-
-\begin_layout Standard
-Rather than specifying the displacement boundary conditions in a spatial
- database file, we use the default behavior for Dirichlet boundary conditions,
- which is a uniform, constant displacement of zero.
-\end_layout
-
-\begin_layout Standard
-The fault example requires three additional database files that were not
- needed for the simple displacement examples.
- The first file (
-\family typewriter
-dislocation_slip.spatialdb
-\family default
-) specifies 0.01 m of left-lateral fault slip for the entire fault.
- The data dimension is zero since the same data are applied to all points
- in the set.
- The default slip time function is a step-function, so we also must provide
- the time at which slip begins.
- The elastic solution is associated with advancing from 
-\begin_inset Formula $t=-dt$
-\end_inset
-
- to 
-\begin_inset Formula $t=0$
-\end_inset
-
-, so we set the slip initiation time for the step-function to 0 in 
-\family typewriter
-dislocation_sliptime.spatialdb
-\family default
-.
-\end_layout
-
-\begin_layout Standard
-The files containing common information (
-\family typewriter
-twotri3.mesh
-\family default
-, 
-\family typewriter
-pylithapp.cfg
-\family default
-, 
-\family typewriter
-matprops.spatialdb
-\family default
-) along with the problem-specific files (
-\family typewriter
-\size small
-dislocation.cfg
-\family default
-, 
-\family typewriter
-dislocation_slip.spatialdb
-\family default
-, 
-\family typewriter
-dislocation_sliptime.spatialdb
-\family default
-\size default
-) provide a complete description of the problem, and we can then run this
- example by typing
-\end_layout
-
-\begin_layout LyX-Code
-pylith dislocation.cfg
-\end_layout
-
-\begin_layout Standard
-Once the problem has run, five files are produced.
- In addition to the files produced in the previous two examples, this example
- produces two files associated with the fault interface.
- The file 
-\family typewriter
-dislocation-fault_t0000000.vtk
-\family default
- gives the fault slip for each vertex on the fault along with the computed
- traction change for the cohesive cell.
- The file 
-\family typewriter
-dislocation-fault_info.vtk
-\family default
- provides information such as the normal direction, final slip, and slip
- time for each vertex on the fault.
- If the problem ran correctly, you should be able to generate a figure such
- as Figure 
-\begin_inset CommandInset ref
-LatexCommand vref
-reference "fig:twotri-disloc"
-
-\end_inset
-
-, which was generated using ParaView.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/dislocation.jpg
-	lyxscale 50
-	scale 33
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Color contours and vectors of displacement for the kinematic fault example
- using a mesh composed of two linear triangular cells.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:twotri-disloc"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_body
-\end_document
+#LyX 2.0 created this file. For more info see http://www.lyx.org/
+\lyxformat 413
+\begin_document
+\begin_header
+\textclass book
+\begin_preamble
+
+\end_preamble
+\use_default_options false
+\maintain_unincluded_children false
+\language english
+\language_package default
+\inputencoding latin1
+\fontencoding global
+\font_roman default
+\font_sans default
+\font_typewriter default
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\paperfontsize default
+\spacing single
+\use_hyperref false
+\papersize default
+\use_geometry true
+\use_amsmath 0
+\use_esint 0
+\use_mhchem 1
+\use_mathdots 1
+\cite_engine basic
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\use_refstyle 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\leftmargin 1in
+\topmargin 1in
+\rightmargin 1in
+\bottommargin 1in
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\quotes_language english
+\papercolumns 1
+\papersides 1
+\paperpagestyle default
+\tracking_changes false
+\output_changes false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\end_header
+
+\begin_body
+
+\begin_layout Section
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Tutorial-Two-triangle"
+
+\end_inset
+
+Tutorial Using Two Triangles
+\end_layout
+
+\begin_layout Standard
+PyLith features discussed in this tutorial:
+\end_layout
+
+\begin_layout Itemize
+Quasi-static solution
+\end_layout
+
+\begin_layout Itemize
+Mesh ASCII format
+\end_layout
+
+\begin_layout Itemize
+Dirichlet boundary conditions
+\end_layout
+
+\begin_layout Itemize
+Kinematic fault interface conditions
+\end_layout
+
+\begin_layout Itemize
+Plane strain linearly elastic material
+\end_layout
+
+\begin_layout Itemize
+VTK output
+\end_layout
+
+\begin_layout Itemize
+Linear triangular cells
+\end_layout
+
+\begin_layout Itemize
+SimpleDB spatial database
+\end_layout
+
+\begin_layout Itemize
+ZeroDispDB spatial database
+\end_layout
+
+\begin_layout Standard
+All of the files necessary to run the examples are contained in the directory
+ 
+\family typewriter
+examples/twocells/twotri3.
+\end_layout
+
+\begin_layout Subsection
+Overview
+\end_layout
+
+\begin_layout Standard
+This tutorial is the simplest 2D example of a quasi-static finite element
+ problem (a simpler problem would consist of a 1D bar).
+ It is a mesh composed of two linear triangles subject to displacement boundary
+ conditions, assuming plane-strain linear elastic behavior.
+ Due to the simple geometry of the problem, the mesh may be constructed
+ by hand, using PyLith mesh ASCII format.
+ In this tutorial, we will walk through the steps necessary to construct,
+ run, and view three problems that use the same mesh.
+ In addition to this manual, each of the files for the example problem includes
+ extensive comments.
+\end_layout
+
+\begin_layout Subsection
+Mesh Description
+\end_layout
+
+\begin_layout Standard
+The mesh consists of two triangles forming a square with edge lengths of
+ one unit (Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:twotri3-mesh"
+
+\end_inset
+
+).
+ The mesh geometry and topology are described in the file 
+\family typewriter
+twotri3.mesh
+\family default
+, which is in PyLith mesh ASCII format.
+ This file format is described in Appendix 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "cha:File-Formats"
+
+\end_inset
+
+.
+ This file describes the dimensionality of the problem (1D, 2D, or 3D),
+ the coordinates of the vertices (nodes), the vertices composing each cell
+ (element), the material ID to be associated with each cell, and groups
+ of vertices that may be used to define faults or surfaces to which boundary
+ conditions may be applied.
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/twotri3-mesh.eps
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Mesh composed of two linear triangular cells used in the example problems.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:twotri3-mesh"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Additional Common Information
+\end_layout
+
+\begin_layout Standard
+In addition to the mesh, the three example problems share additional information.
+ For problems of this type, it is generally useful to create a file named
+ 
+\family typewriter
+pylithapp.cfg
+\family default
+ in the working directory, since this file is read automatically every time
+ PyLith is run.
+ Settings specific to a particular problem may be placed in other 
+\family typewriter
+.cfg
+\family default
+ files, as described later, and then those files are placed on the command
+ line.
+ The settings contained in 
+\family typewriter
+pylithapp.cfg
+\family default
+ for this problem consist of:
+\end_layout
+
+\begin_layout Description
+pylithapp.journal.info Settings that control the verbosity of the output for
+ the different components.
+\end_layout
+
+\begin_layout Description
+pylithapp.mesh_generator Settings that control mesh importing, such as the
+ importer type, the filename, and the spatial dimension of the mesh.
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent Settings that control the problem, such as the total
+ time, time step size, and spatial dimension.
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.materials Settings that control the material type,
+ specify which material IDs are to be associated with a particular material
+ type, and give the name of the spatial database containing the physical
+  properties for the material.
+ The quadrature information is also given.
+\end_layout
+
+\begin_layout Description
+pylithapp.petsc PETSc settings to use for the problem, such as the preconditioner
+ type.
+\end_layout
+
+\begin_layout Standard
+All of the problems in this directory use the same material database, as
+ specified under 
+\end_layout
+
+\begin_layout LyX-Code
+
+\family typewriter
+pylithapp.timedependent.materials
+\family default
+ 
+\end_layout
+
+\begin_layout Standard
+in 
+\family typewriter
+pylithapp.cfg
+\family default
+.
+ This information is contained in the file 
+\family typewriter
+matprops.spatialdb
+\family default
+.
+ Although the material model is specified in 
+\family typewriter
+pylithapp.cfg
+\family default
+, the values for the physical properties of the material are given in 
+\family typewriter
+matprops.spatialdb
+\family default
+.
+ For this example, values describing elastic plane strain material properties
+ are given at a single point, resulting in uniform material properties.
+\end_layout
+
+\begin_layout Subsection
+Axial Displacement Example
+\end_layout
+
+\begin_layout Standard
+The first example problem is extension of the mesh along the diagonal extending
+ from the lower left to the upper right of the square mesh.
+ Parameter settings that augment those in 
+\family typewriter
+pylithapp.cfg
+\family default
+ are contained in the file 
+\family typewriter
+axialdisp.cfg
+\family default
+.
+ These settings are:
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent Specifies an implicit formulation for the problem
+ and specifies the array of boundary conditions.
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.bc.bc Defines which degrees of freedom are being constraine
+d (x and y), gives the label (defined in 
+\family typewriter
+twotri3.mesh
+\family default
+) defining the points desired, assigns a label to the boundary condition
+ set, and gives the name of the spatial database with the values for the
+ Dirichlet boundary condition (
+\family typewriter
+axialdisp.spatialdb
+\family default
+).
+\end_layout
+
+\begin_layout Description
+pylithapp.problem.formulation.output.output.writer Gives the base filename for
+ VTK output 
+\begin_inset Newline newline
+\end_inset
+
+(
+\family typewriter
+axialdisp.vtk
+\family default
+).
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.materials.material.output Gives the base filename for
+ state variable output files (
+\family typewriter
+axialdisp-statevars.vtk
+\family default
+).
+\end_layout
+
+\begin_layout Standard
+The values for the Dirichlet boundary condition are given in the file 
+\family typewriter
+axialdisp.spatialdb
+\family default
+, as specified in 
+\family typewriter
+axialdisp.cfg
+\family default
+.
+ The format of all spatial database files is similar.
+ In this case, the desired displacement values are given at two points (lower
+ left and upper right).
+ Since data are being specified at points (rather than being uniform over
+ the mesh, for example), the data dimension is one.
+\end_layout
+
+\begin_layout Standard
+The files containing common information (
+\family typewriter
+twotri3.mesh
+\family default
+, 
+\family typewriter
+pylithapp.cfg
+\family default
+, 
+\family typewriter
+matprops.spatialdb
+\family default
+) along with the problem-specific files (
+\family typewriter
+axialdisp.cfg
+\family default
+, 
+\family typewriter
+axialdisp.spatialdb
+\family default
+) provide a complete description of the problem, and we can then run this
+ example by typing
+\end_layout
+
+\begin_layout LyX-Code
+pylith axialdisp.cfg
+\end_layout
+
+\begin_layout Standard
+Once the problem has run, three files will be produced.
+ The first file is named 
+\family typewriter
+axialdisp_t0000000.vtk
+\family default
+.
+ The 
+\family typewriter
+t0000000
+\family default
+ indicates that the output is for the first (and only) time step, corresponding
+ to an elastic solution.
+ This file contains mesh information as well as displacement values at the
+ mesh vertices.
+ The second file is named 
+\family typewriter
+axialdisp-statevars_t0000000.vtk
+\family default
+.
+ This file contains the state variables for each cell.
+ The default fields are the total strain and stress fields.
+ Since the cells are linear triangles, there is a single quadrature point
+ for each cell and thus a single set of stress and strain values for each
+ cell.
+ The final file (
+\family typewriter
+axialdisp-statevars_info.vtk
+\family default
+) gives the material properties used for the problem.
+ Since we have not specified which properties to write, the default properties
+ (
+\family typewriter
+mu
+\family default
+, 
+\family typewriter
+lambda
+\family default
+, 
+\family typewriter
+density
+\family default
+) are written.
+ All of the 
+\family typewriter
+.vtk
+\family default
+ files may be used with a number of visualization packages.
+ If the problem ran correctly, you should be able to generate a figure such
+ as Figure 
+\begin_inset CommandInset ref
+LatexCommand vref
+reference "fig:twotri3-axial"
+
+\end_inset
+
+, which was generated using ParaView.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/axialdisp.jpg
+	lyxscale 50
+	scale 33
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Color contours and vectors of displacement for the axial displacement example
+ using a mesh composed of two linear triangular cells.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:twotri3-axial"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Shear Displacement Example
+\end_layout
+
+\begin_layout Standard
+The next example problem is shearing of the mesh in the y direction using
+ displacements applied along the positive and negative x boundaries.
+ Parameter settings that augment those in 
+\family typewriter
+pylithapp.cfg
+\family default
+ are contained in the file 
+\family typewriter
+sheardisp.cfg
+\family default
+.
+ These settings include:
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.bc.x_neg Specifies the boundary conditions for the
+ left side of the mesh, defining which degrees of freedom are being constrained
+ (x and y), giving the label (
+\family typewriter
+x_neg
+\family default
+, defined in 
+\family typewriter
+twotri3.mesh
+\family default
+) defining the points desired, assigning a label to the boundary condition
+ set, and giving the name of the spatial database with the values for the
+ Dirichlet boundary condition (
+\family typewriter
+sheardisp.spatialdb
+\family default
+).
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.bc.x_pos Specifies the boundary conditions for the
+ left side of the mesh, defining which degrees of freedom are being constrained
+ (y only), giving the label (
+\family typewriter
+x_
+\family default
+pos, defined in 
+\family typewriter
+twotri3.mesh
+\family default
+) defining the points desired, assigning a label to the boundary condition
+ set, and giving the name of the spatial database with the values for the
+ Dirichlet boundary condition (
+\family typewriter
+sheardisp.spatialdb
+\family default
+).
+\end_layout
+
+\begin_layout Standard
+The files containing common information (
+\family typewriter
+twotri3.mesh
+\family default
+, 
+\family typewriter
+pylithapp.cfg
+\family default
+, 
+\family typewriter
+matprops.spatialdb
+\family default
+) along with the problem-specific files (
+\family typewriter
+sheardisp.cfg
+\family default
+, 
+\family typewriter
+sheardisp.spatialdb
+\family default
+) provide a complete description of the problem, and we can then run this
+ example by typing
+\end_layout
+
+\begin_layout LyX-Code
+pylith sheardisp.cfg
+\end_layout
+
+\begin_layout Standard
+Once the problem has run, three files will be produced as in the previous
+ example.
+ If the problem ran correctly, you should be able to generate a figure such
+ as Figure 
+\begin_inset CommandInset ref
+LatexCommand vref
+reference "fig:twotri-shear"
+
+\end_inset
+
+, which was generated using ParaView.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/sheardisp.jpg
+	lyxscale 50
+	scale 33
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Color contours and vectors of displacement for the shear displacement example
+ using a mesh composed of two linear triangular cells.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:twotri-shear"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Kinematic Fault Slip Example
+\end_layout
+
+\begin_layout Standard
+The next example problem is left-lateral fault slip applied between the
+ two triangular cells using kinematic cohesive cells.
+ The lower left and upper right boundaries are held fixed in the x and y
+ directions.
+ Parameter settings that augment those in 
+\family typewriter
+pylithapp.cfg
+\family default
+ are contained in the file 
+\family typewriter
+dislocation.cfg
+\family default
+.
+ The solution corresponds to rigid body rotation of each triangular cell.
+ As a result, the tractions on the fault are zero.
+ These settings include:
+\end_layout
+
+\begin_layout Description
+pylithapp.journal.info Turns on journaling for 1D quadrature (used for 2D
+ faults) and for cohesive kinematic faults.
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.bc.bc Defines which degrees of freedom are being constraine
+d (x and y), gives the label (defined in 
+\family typewriter
+twotri3.mesh
+\family default
+) defining the points desired, and assigns a label to the boundary condition
+ set.
+ In this case, rather than specifying a spatial database file with the values
+ for the Dirichlet boundary condition, the default database (ZeroDispDB)
+ for Dirichlet boundary conditions is used, which sets the displacements
+ to zero.
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.interfaces Gives the label (defined in 
+\family typewriter
+twotri3.mesh
+\family default
+) defining the points on the fault, provides quadrature information, and
+ then gives database names for material properties (needed for conditioning),
+ fault slip, peak fault slip rate, and fault slip time.
+\end_layout
+
+\begin_layout Description
+pylithapp.timedependent.interfaces.fault.output.writer Gives the base filename
+ for cohesive cell output files (
+\family typewriter
+dislocation-fault.vtk
+\family default
+).
+\end_layout
+
+\begin_layout Standard
+Rather than specifying the displacement boundary conditions in a spatial
+ database file, we use the default behavior for Dirichlet boundary conditions,
+ which is a uniform, constant displacement of zero.
+\end_layout
+
+\begin_layout Standard
+The fault example requires three additional database files that were not
+ needed for the simple displacement examples.
+ The first file (
+\family typewriter
+dislocation_slip.spatialdb
+\family default
+) specifies 0.01 m of left-lateral fault slip for the entire fault.
+ The data dimension is zero since the same data are applied to all points
+ in the set.
+ The default slip time function is a step-function, so we also must provide
+ the time at which slip begins.
+ The elastic solution is associated with advancing from 
+\begin_inset Formula $t=-dt$
+\end_inset
+
+ to 
+\begin_inset Formula $t=0$
+\end_inset
+
+, so we set the slip initiation time for the step-function to 0 in 
+\family typewriter
+dislocation_sliptime.spatialdb
+\family default
+.
+\end_layout
+
+\begin_layout Standard
+The files containing common information (
+\family typewriter
+twotri3.mesh
+\family default
+, 
+\family typewriter
+pylithapp.cfg
+\family default
+, 
+\family typewriter
+matprops.spatialdb
+\family default
+) along with the problem-specific files (
+\family typewriter
+\size small
+dislocation.cfg
+\family default
+, 
+\family typewriter
+dislocation_slip.spatialdb
+\family default
+, 
+\family typewriter
+dislocation_sliptime.spatialdb
+\family default
+\size default
+) provide a complete description of the problem, and we can then run this
+ example by typing
+\end_layout
+
+\begin_layout LyX-Code
+pylith dislocation.cfg
+\end_layout
+
+\begin_layout Standard
+Once the problem has run, five files are produced.
+ In addition to the files produced in the previous two examples, this example
+ produces two files associated with the fault interface.
+ The file 
+\family typewriter
+dislocation-fault_t0000000.vtk
+\family default
+ gives the fault slip for each vertex on the fault along with the computed
+ traction change for the cohesive cell.
+ The file 
+\family typewriter
+dislocation-fault_info.vtk
+\family default
+ provides information such as the normal direction, final slip, and slip
+ time for each vertex on the fault.
+ If the problem ran correctly, you should be able to generate a figure such
+ as Figure 
+\begin_inset CommandInset ref
+LatexCommand vref
+reference "fig:twotri-disloc"
+
+\end_inset
+
+, which was generated using ParaView.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/dislocation.jpg
+	lyxscale 50
+	scale 33
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Color contours and vectors of displacement for the kinematic fault example
+ using a mesh composed of two linear triangular cells.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:twotri-disloc"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document

Modified: short/3D/PyLith/trunk/doc/userguide/userguide.lyx
===================================================================
--- short/3D/PyLith/trunk/doc/userguide/userguide.lyx	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/doc/userguide/userguide.lyx	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,869 +1,886 @@
-#LyX 2.0 created this file. For more info see http://www.lyx.org/
-\lyxformat 413
-\begin_document
-\begin_header
-\textclass book
-\begin_preamble
-%\usepackage{hyperref}
-
-%\let\myUrl\url
-%\renewcommand{\url}[1]{(\myUrl{#1})}
-%\newcommand\Prefix[3]{\vphantom{#3}#1#2#3}
-\end_preamble
-\use_default_options false
-\maintain_unincluded_children false
-\language english
-\language_package default
-\inputencoding latin1
-\fontencoding global
-\font_roman default
-\font_sans default
-\font_typewriter default
-\font_default_family default
-\use_non_tex_fonts false
-\font_sc false
-\font_osf false
-\font_sf_scale 100
-\font_tt_scale 100
-
-\graphics default
-\default_output_format default
-\output_sync 0
-\bibtex_command default
-\index_command default
-\float_placement tbph
-\paperfontsize default
-\spacing single
-\use_hyperref true
-\pdf_bookmarks true
-\pdf_bookmarksnumbered false
-\pdf_bookmarksopen false
-\pdf_bookmarksopenlevel 1
-\pdf_breaklinks true
-\pdf_pdfborder true
-\pdf_colorlinks true
-\pdf_backref false
-\pdf_pdfusetitle true
-\papersize default
-\use_geometry true
-\use_amsmath 1
-\use_esint 0
-\use_mhchem 1
-\use_mathdots 1
-\cite_engine basic
-\use_bibtopic false
-\use_indices false
-\paperorientation portrait
-\suppress_date false
-\use_refstyle 0
-\index Index
-\shortcut idx
-\color #008000
-\end_index
-\leftmargin 1in
-\topmargin 1in
-\rightmargin 1in
-\bottommargin 1in
-\secnumdepth 3
-\tocdepth 3
-\paragraph_separation indent
-\paragraph_indentation default
-\quotes_language english
-\papercolumns 1
-\papersides 2
-\paperpagestyle plain
-\tracking_changes false
-\output_changes false
-\html_math_output 0
-\html_css_as_file 0
-\html_be_strict false
-\end_header
-
-\begin_body
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\noindent
-\align center
-\begin_inset Graphics
-	filename cover/cover.pdf
-	width 75page%
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset ERT
-status open
-
-\begin_layout Plain Layout
-
-
-\backslash
-thispagestyle{empty}
-\end_layout
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Title
-PyLith User Manual
-\end_layout
-
-\begin_layout Author
-© University of California, Davis
-\begin_inset Newline newline
-\end_inset
-
-Version 1.6.1
-\end_layout
-
-\begin_layout Date
-\noindent
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-today
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-frontmatter
-\end_layout
-
-\end_inset
-
-
-\begin_inset CommandInset toc
-LatexCommand tableofcontents
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset FloatList figure
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset FloatList table
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset CommandInset include
-LatexCommand input
-filename "preface.lyx"
-
-\end_inset
-
-
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-mainmatter
-\end_layout
-
-\end_inset
-
-
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-
-\backslash
-raggedbottom
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset CommandInset include
-LatexCommand input
-filename "intro/intro.lyx"
-
-\end_inset
-
-
-\begin_inset CommandInset include
-LatexCommand input
-filename "governingeqns/governingeqns.lyx"
-
-\end_inset
-
-
-\begin_inset CommandInset include
-LatexCommand input
-filename "install/install.lyx"
-
-\end_inset
-
-
-\begin_inset CommandInset include
-LatexCommand input
-filename "runpylith/runpylith.lyx"
-
-\end_inset
-
-
-\begin_inset CommandInset include
-LatexCommand input
-filename "materials/materials.lyx"
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset CommandInset include
-LatexCommand input
-filename "boundaryconditions/boundaryconditions.lyx"
-
-\end_inset
-
- 
-\begin_inset CommandInset include
-LatexCommand input
-filename "tutorials/tutorials.lyx"
-
-\end_inset
-
-
-\begin_inset CommandInset include
-LatexCommand input
-filename "benchmarks/benchmarks.lyx"
-
-\end_inset
-
-
-\begin_inset CommandInset include
-LatexCommand input
-filename "extending/extending.lyx"
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\start_of_appendix
-\begin_inset ERT
-status collapsed
-
-\begin_layout Plain Layout
-
-%dummy comment inserted by tex2lyx to ensure that this paragraph is not
- empty
-\end_layout
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-
-
-\begin_inset CommandInset include
-LatexCommand input
-filename "glossary.lyx"
-
-\end_inset
-
-
-\begin_inset CommandInset include
-LatexCommand input
-filename "components.lyx"
-
-\end_inset
-
-
-\begin_inset CommandInset include
-LatexCommand input
-filename "fileformats/fileformats.lyx"
-
-\end_inset
-
-
-\begin_inset CommandInset include
-LatexCommand include
-filename "materials/altformulations.lyx"
-
-\end_inset
-
-
-\begin_inset CommandInset include
-LatexCommand input
-filename "analyticalsolns/analyticalsolns.lyx"
-
-\end_inset
-
-
-\begin_inset CommandInset include
-LatexCommand input
-filename "license.lyx"
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Bibliography
-\labelwidthstring Bibliography
-\begin_inset CommandInset bibitem
-LatexCommand bibitem
-label "Aagaard et al., 2001a"
-key "Aagaard:etal:2001a"
-
-\end_inset
-
-Aagaard, B.T., J.F.
- Hall, and T.H.
- Heaton (2001), Characterization of near-source ground motions with earthquake
- simulations, 
-\emph on
-Earthquake Spectra, 17
-\emph default
-(2), 177-207.
-\end_layout
-
-\begin_layout Bibliography
-\labelwidthstring Bibliography
-\begin_inset CommandInset bibitem
-LatexCommand bibitem
-label "Aagaard et al., 2001b"
-key "Aagaard:etal:2001b"
-
-\end_inset
-
-Aagaard, B.T., T.H.
- Heaton, and J.F.
- Hall (2001), Dynamic earthquake ruptures in the presence of lithostatic
- normal stresses: Implications for friction models and heat production,
- 
-\emph on
-Bulletin of the Seismological Society of America, 91
-\emph default
-(6), 1765-1796.
-\end_layout
-
-\begin_layout Bibliography
-\labelwidthstring Bibliography
-\begin_inset CommandInset bibitem
-LatexCommand bibitem
-label "Aagaard et al., 2007"
-key "Aagaard:etal:2007"
-
-\end_inset
-
-Aagaard, B., C.
- Williams, and M.
- Knepley (2007), PyLith: A finite-element code for modeling quasi-static
- and dynamic crustal deformation, 
-\emph on
-Eos Trans.
- AGU, 88
-\emph default
-(52), Fall Meet.
- Suppl., Abstract T21B-0592.
-\end_layout
-
-\begin_layout Bibliography
-\labelwidthstring Bibliography
-\begin_inset CommandInset bibitem
-LatexCommand bibitem
-label "Aagaard et al., 2008"
-key "Aagaard:etal:2008"
-
-\end_inset
-
-Aagaard, B., C.
- Williams, and M.
- Knepley (2008), PyLith: A finite-element code for modeling quasi-static
- and dynamic crustal deformation, 
-\emph on
-Eos Trans.
- AGU
-\emph default
-, 
-\emph on
-89(
-\emph default
-53), Fall Meet.
- Suppl., Abstract T41A-1925.
-\end_layout
-
-\begin_layout Bibliography
-\labelwidthstring Bibliography
-\begin_inset CommandInset bibitem
-LatexCommand bibitem
-label "Bathe, 1995"
-key "Bathe:1995"
-
-\end_inset
-
-Bathe, K.-J.
- (1995), 
-\shape italic
-Finite-Element Procedures
-\shape default
-, Prentice Hall, Upper Saddle River, New Jersey, 1037 pp.
-\end_layout
-
-\begin_layout Bibliography
-\labelwidthstring Bibliography
-\begin_inset CommandInset bibitem
-LatexCommand bibitem
-label "Ben-Zion and Rice, 1997"
-key "BenZion:Rice:1997"
-
-\end_inset
-
-Ben-Zion, Y.
- and J.R.
- Rice (1997), Dynamic simulations of slip on a smooth fault in an elastic
- solid, J.
- Geophys.
- Res., 102, 17,771–17,784.
-\end_layout
-
-\begin_layout Bibliography
-\labelwidthstring Bibliography
-\begin_inset CommandInset bibitem
-LatexCommand bibitem
-label "Brune, 1970"
-key "Brune:1970"
-
-\end_inset
-
-Brune, J.N.
- (1970), Tectonic stress and spectra of seismic shear waves from earthquakes,
- 
-\emph on
-Journal of Geophysical Research, 75
-\emph default
-, 4997-5009.
-\end_layout
-
-\begin_layout Bibliography
-\labelwidthstring Bibliography
-\begin_inset CommandInset bibitem
-LatexCommand bibitem
-label "Day and Ely, 2002"
-key "Day:Ely:2002"
-
-\end_inset
-
-Day, S.M.
- and G.P.
- Ely (2002), Effct of a shallow weak zone on fault rupture: Numerical simulation
- of scale-model experiments, 
-\shape italic
-Bull.
- Seismol.
- Soc.
- Am.
-\shape default
-, 92(8), 3022-3041, doi: 10.1785/0120010273.
-\end_layout
-
-\begin_layout Bibliography
-\labelwidthstring Bibliography
-\begin_inset CommandInset bibitem
-LatexCommand bibitem
-label "Drucker and Prager, 1952"
-key "Drucker:Prager:1952"
-
-\end_inset
-
-Drucker, D.
- C.
- and Prager, W.
- (1952).
- Soil mechanics and plastic analysis for limit design, 
-\shape italic
-Quarterly of Applied Mathematics
-\shape default
-, 
-\shape italic
-10
-\shape default
-, 157–165.
-\end_layout
-
-\begin_layout Bibliography
-\labelwidthstring Bibliography
-\begin_inset CommandInset bibitem
-LatexCommand bibitem
-label "Liu et al., 2006"
-key "Liu:etal:2006"
-
-\end_inset
-
-Liu, P., R.J.
- Archuleta, S.H.
- Hartzell (2006), Prediction of broadband ground-motion time histories:
- Hybrid low/high-frequency method with correlated random source parameters,
- 
-\shape italic
-Bull.
- Seismol.
- Soc.
- Am.
-\shape default
-, 96, 2118-2130.
-\end_layout
-
-\begin_layout Bibliography
-\labelwidthstring Bibliography
-\begin_inset CommandInset bibitem
-LatexCommand bibitem
-label "Kaneko et al., 2008"
-key "Kaneko:etal:2008"
-
-\end_inset
-
-Kaneko, Y., N.
- Lapusta, and J.-P.
- Ampuero (2008), Spectral element modeling of spontaneous earthquake rupture
- on rate and state faults: Effect of velocity-strengthening friction at
- shallow depths, 
-\shape italic
-Journal of Geophysical Research
-\shape default
-, 113, B09317, doi:10.1029/2007JB005553.
-\end_layout
-
-\begin_layout Bibliography
-\labelwidthstring Bibliography
-\begin_inset CommandInset bibitem
-LatexCommand bibitem
-label "Kirby and Kronenberg, 1987"
-key "Kirby:Kronenberg:1987"
-
-\end_inset
-
-Kirby, S.
- H.
- and A.
- K.
- Kronenberg (1987), Rheology of the lithosphere: Selected topics, 
-\shape italic
-Reviews of Geophysics, 25
-\shape default
-, 1219-1244.
-\end_layout
-
-\begin_layout Bibliography
-\labelwidthstring Bibliography
-\begin_inset CommandInset bibitem
-LatexCommand bibitem
-label "Knopoff and Ni, 2001"
-key "Knopoff:Ni:2001"
-
-\end_inset
-
-Knopoff, L.
- and X.X.
- Ni (2001), Numerical instability at the edge of a dynamic fracture, 
-\emph on
-Geophysical Journal International, 
-\emph default
-147(3), 1-6, doi: 10.1046/j.1365-246x.2001.01567.x.
-\end_layout
-
-\begin_layout Bibliography
-\labelwidthstring Bibliography
-\begin_inset CommandInset bibitem
-LatexCommand bibitem
-label "Kojic and Bathe, 1987"
-key "Kojic:Bathe:1987"
-
-\end_inset
-
-Kojic, M.
- and K.-J.
- Bathe (1987), The `Effective Stress-Function' Algorithm for Thermo-Elasto-Plast
-icity and Creep, 
-\emph on
-Int.
- J.
- Num.
- Meth.
- Eng
-\emph default
-.
-\emph on
-, 24
-\emph default
-, 1509-1532.
-\end_layout
-
-\begin_layout Bibliography
-\labelwidthstring Bibliography
-\begin_inset CommandInset bibitem
-LatexCommand bibitem
-label "McGarr, 1988"
-key "McGarr:1988"
-
-\end_inset
-
-McGarr, A.
- (1988), On the state of lithospheric stress in the absence of applied tectonic
- forces, 
-\shape italic
-Journal of Geophysical Research
-\shape default
-, 
-\shape italic
-93
-\shape default
-, 13,609-13,617.
-\end_layout
-
-\begin_layout Bibliography
-\labelwidthstring Bibliography
-\begin_inset CommandInset bibitem
-LatexCommand bibitem
-label "Okada, 1992"
-key "Okada:1992"
-
-\end_inset
-
-Okada, Y., Internal deformation due to shear and tensile faults in a half-space
- (1992), 
-\shape italic
-Bull.
- Seismol.
- Soc.
- Am.
-\shape default
-, 
-\shape italic
-83
-\shape default
-, 1018-1040.
-\end_layout
-
-\begin_layout Bibliography
-\labelwidthstring Bibliography
-\begin_inset CommandInset bibitem
-LatexCommand bibitem
-label "Paterson, 1994"
-key "Paterson:1994"
-
-\end_inset
-
-Paterson, W.
- S.
- B.
- (1994), 
-\shape italic
-The Physics of Glaciers, Third Edition
-\shape default
-, Elsevier Science Ltd., Oxford, 480 pp.
-\end_layout
-
-\begin_layout Bibliography
-\labelwidthstring Bibliography
-\begin_inset CommandInset bibitem
-LatexCommand bibitem
-label "Prentice, 1968"
-key "Prentice:1968"
-
-\end_inset
-
-Prentice, J.
- H, (1968), Dimensional problem of the power law in rheology, 
-\shape italic
-Nature
-\shape default
-, 
-\shape italic
-217
-\shape default
-, 157.
-\end_layout
-
-\begin_layout Bibliography
-\labelwidthstring Bibliography
-\begin_inset CommandInset bibitem
-LatexCommand bibitem
-label "Savage and Prescott, 1978"
-key "Savage:Prescott:1978"
-
-\end_inset
-
-Savage, J.
- C.
- and W.
- H.
- Prescott (1978), Asthenosphere readjustment and the earthquake cycle, 
-\shape italic
-Journal of Geophysical
-\shape default
- 
-\shape italic
-Research
-\shape default
-\emph on
-, 83
-\emph default
-, 3369-3376.
-\end_layout
-
-\begin_layout Bibliography
-\labelwidthstring Bibliography
-\begin_inset CommandInset bibitem
-LatexCommand bibitem
-label "Taylor, 2003"
-key "Taylor:2003"
-
-\end_inset
-
-Taylor, R.L.
- (2003), `FEAP--A Finite Element Analysis Program', 
-\shape italic
-Version 7.5 Theory Manual
-\shape default
-, 154 pp.
-\end_layout
-
-\begin_layout Bibliography
-\labelwidthstring Bibliography
-\begin_inset CommandInset bibitem
-LatexCommand bibitem
-label "Timoshenko and Goodier, 1987"
-key "Timoshenko:Goodier:1987"
-
-\end_inset
-
-Timoshenko, S.P.
- and J.N.
- Goodier (1987), 
-\shape italic
-Theory of Elasticity, Third Edition
-\shape default
-, McGraw-Hill, New York, 567 pp.
-\end_layout
-
-\begin_layout Bibliography
-\labelwidthstring Bibliography
-\begin_inset CommandInset bibitem
-LatexCommand bibitem
-label "Williams et al., 2005"
-key "Williams:etal:2005"
-
-\end_inset
-
-Williams, C.A., B.
- Aagaard, and M.G.
- Knepley (2005), Development of software for studying earthquakes across
- multiple spatial and temporal scales by coupling quasi-static and dynamic
- simulations, 
-\emph on
-Eos Trans.
- AGU, 86
-\emph default
-(52), Fall Meet.
- Suppl., Abstract S53A-1072.
-\end_layout
-
-\begin_layout Bibliography
-\labelwidthstring Bibliography
-\begin_inset CommandInset bibitem
-LatexCommand bibitem
-label "Williams, 2006"
-key "Williams:2006"
-
-\end_inset
-
-Williams, C.A.
- (2006), Development of a package for modeling stress in the lithosphere,
- 
-\emph on
-Eos Trans.
- AGU,
-\emph default
- 
-\emph on
-87
-\emph default
-(36), Jt.
- Assem.
- Suppl., Abstract T24A-01 Invited.
-\end_layout
-
-\begin_layout Bibliography
-\labelwidthstring Bibliography
-\begin_inset CommandInset bibitem
-LatexCommand bibitem
-label "Zienkiewicz and Taylor, 2000"
-key "Zienkiewicz:Taylor:2000"
-
-\end_inset
-
-Zienkiewicz, O.C.
- and R.L.
- Taylor (2000), 
-\shape italic
-The Finite Element Method, Fifth Edition, Volume 2: Solid Mechanics
-\shape default
-, Butterworth-Heinemann, Oxford, 459 pp.125
-\end_layout
-
-\end_body
-\end_document
+#LyX 2.0 created this file. For more info see http://www.lyx.org/
+\lyxformat 413
+\begin_document
+\begin_header
+\textclass book
+\begin_preamble
+%\usepackage{hyperref}
+
+%\let\myUrl\url
+%\renewcommand{\url}[1]{(\myUrl{#1})}
+%\newcommand\Prefix[3]{\vphantom{#3}#1#2#3}
+\end_preamble
+\use_default_options false
+\maintain_unincluded_children false
+\language english
+\language_package default
+\inputencoding latin1
+\fontencoding T1
+\font_roman times
+\font_sans helvet
+\font_typewriter courier
+\font_default_family default
+\use_non_tex_fonts false
+\font_sc false
+\font_osf false
+\font_sf_scale 100
+\font_tt_scale 100
+
+\graphics default
+\default_output_format default
+\output_sync 0
+\bibtex_command default
+\index_command default
+\float_placement tbph
+\paperfontsize default
+\spacing single
+\use_hyperref true
+\pdf_bookmarks true
+\pdf_bookmarksnumbered false
+\pdf_bookmarksopen false
+\pdf_bookmarksopenlevel 1
+\pdf_breaklinks true
+\pdf_pdfborder true
+\pdf_colorlinks true
+\pdf_backref false
+\pdf_pdfusetitle true
+\papersize default
+\use_geometry true
+\use_amsmath 1
+\use_esint 0
+\use_mhchem 1
+\use_mathdots 1
+\cite_engine basic
+\use_bibtopic false
+\use_indices false
+\paperorientation portrait
+\suppress_date false
+\use_refstyle 0
+\index Index
+\shortcut idx
+\color #008000
+\end_index
+\leftmargin 1in
+\topmargin 1in
+\rightmargin 1in
+\bottommargin 1in
+\secnumdepth 3
+\tocdepth 3
+\paragraph_separation indent
+\paragraph_indentation default
+\quotes_language english
+\papercolumns 1
+\papersides 2
+\paperpagestyle plain
+\tracking_changes false
+\output_changes false
+\html_math_output 0
+\html_css_as_file 0
+\html_be_strict false
+\end_header
+
+\begin_body
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\noindent
+\align center
+\begin_inset Graphics
+	filename cover/cover.pdf
+	width 75page%
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+thispagestyle{empty}
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Title
+PyLith User Manual
+\end_layout
+
+\begin_layout Author
+© University of California, Davis
+\begin_inset Newline newline
+\end_inset
+
+Version 1.7.1
+\end_layout
+
+\begin_layout Date
+\noindent
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+today
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset ERT
+status open
+
+\begin_layout Plain Layout
+
+
+\backslash
+frontmatter
+\end_layout
+
+\end_inset
+
+
+\begin_inset CommandInset toc
+LatexCommand tableofcontents
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset FloatList figure
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset FloatList table
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "preface.lyx"
+
+\end_inset
+
+
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+mainmatter
+\end_layout
+
+\end_inset
+
+
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+
+\backslash
+raggedbottom
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "intro/intro.lyx"
+
+\end_inset
+
+
+\begin_inset CommandInset include
+LatexCommand input
+filename "governingeqns/governingeqns.lyx"
+
+\end_inset
+
+
+\begin_inset CommandInset include
+LatexCommand input
+filename "install/install.lyx"
+
+\end_inset
+
+
+\begin_inset CommandInset include
+LatexCommand input
+filename "runpylith/runpylith.lyx"
+
+\end_inset
+
+
+\begin_inset CommandInset include
+LatexCommand input
+filename "materials/materials.lyx"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "boundaryconditions/boundaryconditions.lyx"
+
+\end_inset
+
+ 
+\begin_inset CommandInset include
+LatexCommand input
+filename "tutorials/tutorials.lyx"
+
+\end_inset
+
+
+\begin_inset CommandInset include
+LatexCommand input
+filename "benchmarks/benchmarks.lyx"
+
+\end_inset
+
+
+\begin_inset CommandInset include
+LatexCommand input
+filename "extending/extending.lyx"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+\start_of_appendix
+\begin_inset ERT
+status collapsed
+
+\begin_layout Plain Layout
+
+%dummy comment inserted by tex2lyx to ensure that this paragraph is not
+ empty
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\begin_inset CommandInset include
+LatexCommand input
+filename "glossary.lyx"
+
+\end_inset
+
+
+\begin_inset CommandInset include
+LatexCommand input
+filename "components.lyx"
+
+\end_inset
+
+
+\begin_inset CommandInset include
+LatexCommand input
+filename "fileformats/fileformats.lyx"
+
+\end_inset
+
+
+\begin_inset CommandInset include
+LatexCommand include
+filename "materials/altformulations.lyx"
+
+\end_inset
+
+
+\begin_inset CommandInset include
+LatexCommand input
+filename "analyticalsolns/analyticalsolns.lyx"
+
+\end_inset
+
+
+\begin_inset CommandInset include
+LatexCommand input
+filename "license.lyx"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Bibliography
+\labelwidthstring Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "Aagaard et al., 2001a"
+key "Aagaard:etal:2001a"
+
+\end_inset
+
+Aagaard, B.T., J.F.
+ Hall, and T.H.
+ Heaton (2001), Characterization of near-source ground motions with earthquake
+ simulations, 
+\emph on
+Earthquake Spectra, 17
+\emph default
+(2), 177-207.
+\end_layout
+
+\begin_layout Bibliography
+\labelwidthstring Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "Aagaard et al., 2001b"
+key "Aagaard:etal:2001b"
+
+\end_inset
+
+Aagaard, B.T., T.H.
+ Heaton, and J.F.
+ Hall (2001), Dynamic earthquake ruptures in the presence of lithostatic
+ normal stresses: Implications for friction models and heat production,
+ 
+\emph on
+Bulletin of the Seismological Society of America, 91
+\emph default
+(6), 1765-1796.
+\end_layout
+
+\begin_layout Bibliography
+\labelwidthstring Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "Aagaard et al., 2007"
+key "Aagaard:etal:2007"
+
+\end_inset
+
+Aagaard, B., C.
+ Williams, and M.
+ Knepley (2007), PyLith: A finite-element code for modeling quasi-static
+ and dynamic crustal deformation, 
+\emph on
+Eos Trans.
+ AGU, 88
+\emph default
+(52), Fall Meet.
+ Suppl., Abstract T21B-0592.
+\end_layout
+
+\begin_layout Bibliography
+\labelwidthstring Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "Aagaard et al., 2008"
+key "Aagaard:etal:2008"
+
+\end_inset
+
+Aagaard, B., C.
+ Williams, and M.
+ Knepley (2008), PyLith: A finite-element code for modeling quasi-static
+ and dynamic crustal deformation, 
+\emph on
+Eos Trans.
+ AGU
+\emph default
+, 
+\emph on
+89(
+\emph default
+53), Fall Meet.
+ Suppl., Abstract T41A-1925.
+\end_layout
+
+\begin_layout Bibliography
+\labelwidthstring Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "Bathe, 1995"
+key "Bathe:1995"
+
+\end_inset
+
+Bathe, K.-J.
+ (1995), 
+\shape italic
+Finite-Element Procedures
+\shape default
+, Prentice Hall, Upper Saddle River, New Jersey, 1037 pp.
+\end_layout
+
+\begin_layout Bibliography
+\labelwidthstring Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "Ben-Zion and Rice, 1997"
+key "BenZion:Rice:1997"
+
+\end_inset
+
+Ben-Zion, Y.
+ and J.R.
+ Rice (1997), Dynamic simulations of slip on a smooth fault in an elastic
+ solid, J.
+ Geophys.
+ Res., 102, 17,771–17,784.
+\end_layout
+
+\begin_layout Bibliography
+\labelwidthstring Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "Brune, 1970"
+key "Brune:1970"
+
+\end_inset
+
+Brune, J.N.
+ (1970), Tectonic stress and spectra of seismic shear waves from earthquakes,
+ 
+\emph on
+Journal of Geophysical Research, 75
+\emph default
+, 4997-5009.
+\end_layout
+
+\begin_layout Bibliography
+\labelwidthstring Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "Day and Ely, 2002"
+key "Day:Ely:2002"
+
+\end_inset
+
+Day, S.M.
+ and G.P.
+ Ely (2002), Effct of a shallow weak zone on fault rupture: Numerical simulation
+ of scale-model experiments, 
+\shape italic
+Bull.
+ Seismol.
+ Soc.
+ Am.
+\shape default
+, 92(8), 3022-3041, doi: 10.1785/0120010273.
+\end_layout
+
+\begin_layout Bibliography
+\labelwidthstring Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "Drucker and Prager, 1952"
+key "Drucker:Prager:1952"
+
+\end_inset
+
+Drucker, D.
+ C.
+ and Prager, W.
+ (1952).
+ Soil mechanics and plastic analysis for limit design, 
+\shape italic
+Quarterly of Applied Mathematics
+\shape default
+, 
+\shape italic
+10
+\shape default
+, 157–165.
+\end_layout
+
+\begin_layout Bibliography
+\labelwidthstring Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "Liu et al., 2006"
+key "Liu:etal:2006"
+
+\end_inset
+
+Liu, P., R.J.
+ Archuleta, S.H.
+ Hartzell (2006), Prediction of broadband ground-motion time histories:
+ Hybrid low/high-frequency method with correlated random source parameters,
+ 
+\shape italic
+Bull.
+ Seismol.
+ Soc.
+ Am.
+\shape default
+, 96, 2118-2130.
+\end_layout
+
+\begin_layout Bibliography
+\labelwidthstring Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "Kaneko et al., 2008"
+key "Kaneko:etal:2008"
+
+\end_inset
+
+Kaneko, Y., N.
+ Lapusta, and J.-P.
+ Ampuero (2008), Spectral element modeling of spontaneous earthquake rupture
+ on rate and state faults: Effect of velocity-strengthening friction at
+ shallow depths, 
+\shape italic
+Journal of Geophysical Research
+\shape default
+, 113, B09317, doi:10.1029/2007JB005553.
+\end_layout
+
+\begin_layout Bibliography
+\labelwidthstring Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "Kirby and Kronenberg, 1987"
+key "Kirby:Kronenberg:1987"
+
+\end_inset
+
+Kirby, S.
+ H.
+ and A.
+ K.
+ Kronenberg (1987), Rheology of the lithosphere: Selected topics, 
+\shape italic
+Reviews of Geophysics, 25
+\shape default
+, 1219-1244.
+\end_layout
+
+\begin_layout Bibliography
+\labelwidthstring Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "Knopoff and Ni, 2001"
+key "Knopoff:Ni:2001"
+
+\end_inset
+
+Knopoff, L.
+ and X.X.
+ Ni (2001), Numerical instability at the edge of a dynamic fracture, 
+\emph on
+Geophysical Journal International, 
+\emph default
+147(3), 1-6, doi: 10.1046/j.1365-246x.2001.01567.x.
+\end_layout
+
+\begin_layout Bibliography
+\labelwidthstring Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "Kojic and Bathe, 1987"
+key "Kojic:Bathe:1987"
+
+\end_inset
+
+Kojic, M.
+ and K.-J.
+ Bathe (1987), The `Effective Stress-Function' Algorithm for Thermo-Elasto-Plast
+icity and Creep, 
+\emph on
+Int.
+ J.
+ Num.
+ Meth.
+ Eng
+\emph default
+.
+\emph on
+, 24
+\emph default
+, 1509-1532.
+\end_layout
+
+\begin_layout Bibliography
+\labelwidthstring Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "McGarr, 1988"
+key "McGarr:1988"
+
+\end_inset
+
+McGarr, A.
+ (1988), On the state of lithospheric stress in the absence of applied tectonic
+ forces, 
+\shape italic
+Journal of Geophysical Research
+\shape default
+, 
+\shape italic
+93
+\shape default
+, 13,609-13,617.
+\end_layout
+
+\begin_layout Bibliography
+\labelwidthstring Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "Menke, 1984"
+key "Menke:1984"
+
+\end_inset
+
+Menke, W.
+ (1984), 
+\shape italic
+Geophysical Data Analysis: Discrete Inverse Theory
+\shape default
+, Academic Press, Inc., Orlando, 260 pp.
+\end_layout
+
+\begin_layout Bibliography
+\labelwidthstring Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "Okada, 1992"
+key "Okada:1992"
+
+\end_inset
+
+Okada, Y., Internal deformation due to shear and tensile faults in a half-space
+ (1992), 
+\shape italic
+Bull.
+ Seismol.
+ Soc.
+ Am.
+\shape default
+, 
+\shape italic
+83
+\shape default
+, 1018-1040.
+\end_layout
+
+\begin_layout Bibliography
+\labelwidthstring Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "Paterson, 1994"
+key "Paterson:1994"
+
+\end_inset
+
+Paterson, W.
+ S.
+ B.
+ (1994), 
+\shape italic
+The Physics of Glaciers, Third Edition
+\shape default
+, Elsevier Science Ltd., Oxford, 480 pp.
+\end_layout
+
+\begin_layout Bibliography
+\labelwidthstring Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "Prentice, 1968"
+key "Prentice:1968"
+
+\end_inset
+
+Prentice, J.
+ H, (1968), Dimensional problem of the power law in rheology, 
+\shape italic
+Nature
+\shape default
+, 
+\shape italic
+217
+\shape default
+, 157.
+\end_layout
+
+\begin_layout Bibliography
+\labelwidthstring Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "Savage and Prescott, 1978"
+key "Savage:Prescott:1978"
+
+\end_inset
+
+Savage, J.
+ C.
+ and W.
+ H.
+ Prescott (1978), Asthenosphere readjustment and the earthquake cycle, 
+\shape italic
+Journal of Geophysical
+\shape default
+ 
+\shape italic
+Research
+\shape default
+\emph on
+, 83
+\emph default
+, 3369-3376.
+\end_layout
+
+\begin_layout Bibliography
+\labelwidthstring Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "Taylor, 2003"
+key "Taylor:2003"
+
+\end_inset
+
+Taylor, R.L.
+ (2003), `FEAP--A Finite Element Analysis Program', 
+\shape italic
+Version 7.5 Theory Manual
+\shape default
+, 154 pp.
+\end_layout
+
+\begin_layout Bibliography
+\labelwidthstring Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "Timoshenko and Goodier, 1987"
+key "Timoshenko:Goodier:1987"
+
+\end_inset
+
+Timoshenko, S.P.
+ and J.N.
+ Goodier (1987), 
+\shape italic
+Theory of Elasticity, Third Edition
+\shape default
+, McGraw-Hill, New York, 567 pp.
+\end_layout
+
+\begin_layout Bibliography
+\labelwidthstring Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "Williams et al., 2005"
+key "Williams:etal:2005"
+
+\end_inset
+
+Williams, C.A., B.
+ Aagaard, and M.G.
+ Knepley (2005), Development of software for studying earthquakes across
+ multiple spatial and temporal scales by coupling quasi-static and dynamic
+ simulations, 
+\emph on
+Eos Trans.
+ AGU, 86
+\emph default
+(52), Fall Meet.
+ Suppl., Abstract S53A-1072.
+\end_layout
+
+\begin_layout Bibliography
+\labelwidthstring Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "Williams, 2006"
+key "Williams:2006"
+
+\end_inset
+
+Williams, C.A.
+ (2006), Development of a package for modeling stress in the lithosphere,
+ 
+\emph on
+Eos Trans.
+ AGU,
+\emph default
+ 
+\emph on
+87
+\emph default
+(36), Jt.
+ Assem.
+ Suppl., Abstract T24A-01 Invited.
+\end_layout
+
+\begin_layout Bibliography
+\labelwidthstring Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
+label "Zienkiewicz and Taylor, 2000"
+key "Zienkiewicz:Taylor:2000"
+
+\end_inset
+
+Zienkiewicz, O.C.
+ and R.L.
+ Taylor (2000), 
+\shape italic
+The Finite Element Method, Fifth Edition, Volume 2: Solid Mechanics
+\shape default
+, Butterworth-Heinemann, Oxford, 459 pp.125
+\end_layout
+
+\end_body
+\end_document

Modified: short/3D/PyLith/trunk/examples/2d/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/examples/2d/Makefile.am	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/2d/Makefile.am	2012-06-25 17:37:03 UTC (rev 20406)
@@ -17,7 +17,8 @@
 #
 
 SUBDIRS = \
-	subduction 
+	subduction \
+	greensfns
 
 
 # End of file 

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

Modified: short/3D/PyLith/trunk/examples/2d/subduction/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/examples/2d/subduction/Makefile.am	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/2d/subduction/Makefile.am	2012-06-25 17:37:03 UTC (rev 20406)
@@ -22,6 +22,7 @@
 	step01.cfg \
 	step02.cfg \
 	step03.cfg \
+	step04.cfg \
 	geometry.jou \
 	mesh_tri3.jou \
 	createbc.jou \
@@ -31,7 +32,9 @@
 	mat_concrust.spatialdb \
 	mat_conmantle.spatialdb \
 	mat_oceancrust.spatialdb \
-	mat_oceanmantle.spatialdb 
+	mat_oceanmantle.spatialdb \
+	afterslip_tractions.spatialdb \
+	afterslip_tractions.py
 
 
 SUBDIRS = \

Modified: short/3D/PyLith/trunk/examples/2d/subduction/README
===================================================================
--- short/3D/PyLith/trunk/examples/2d/subduction/README	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/2d/subduction/README	2012-06-25 17:37:03 UTC (rev 20406)
@@ -86,6 +86,18 @@
     pylith step03.cfg
 
 
+Step 4. Friction controlled afterslip
+
+  This simulation uses the stress changes associated with the the
+  coseismic deformation in Step 1 in a simulation of afterslip
+  governed by static friction. The afterslip occurs at the down-dip
+  extent of rupture where the coseismic slip increases the shear
+  tractions.
+
+  Run the simulation via the following command:
+    pylith step04.cfg
+
+
 Suggestions variations
 
   The list below includes some suggested modifications to the problem

Copied: short/3D/PyLith/trunk/examples/2d/subduction/afterslip_tractions.py (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/examples/2d/subduction/afterslip_tractions.py)
===================================================================
--- short/3D/PyLith/trunk/examples/2d/subduction/afterslip_tractions.py	                        (rev 0)
+++ short/3D/PyLith/trunk/examples/2d/subduction/afterslip_tractions.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -0,0 +1,59 @@
+# This python script extracts the changes in fault tractions from
+# step01 and combines them with background depth-dependent fault
+# tractions to create initial fault tractions to drive frictional
+# afterslip.
+#
+# PREREQUISITES: numpy, h5py, output from step01
+#
+# Run the script:
+#  python afterslip_tractions.py
+
+import numpy
+import h5py
+
+# Load in change in tractions from coseismic simulation
+h5 = h5py.File("output/step01-fault.h5", 'r', driver="sec2")
+vertices = h5['geometry/vertices'][:]
+tractions_change = h5['vertex_fields/traction_change'][0,:,:]
+h5.close()
+
+# Parameters for tractions associated with background stress field
+# Nominal density
+density = 2900.0
+gacc = 9.80665
+coef_friction = 0.6
+
+# Background normal tractions are overburden and compressive
+# (negative, y is negative)
+tractions_bg_normal = density*gacc*(vertices[:,1])
+
+# Background shear tractions are reverse (in 2-D right-lateral is negative)
+# because the normal tractions are negative.
+tractions_bg_shear = coef_friction*tractions_bg_normal
+
+# Combine traction changes and background tractions
+tractions_shear = tractions_bg_shear + tractions_change[:,0]
+tractions_normal = tractions_bg_normal + tractions_change[:,1]
+
+# Create coordinate system for spatial database
+from spatialdata.geocoords.CSCart import CSCart
+cs = CSCart()
+cs._configure()
+cs.setSpaceDim(2)
+
+# Create writer for spatial database file
+from spatialdata.spatialdb.SimpleIOAscii import SimpleIOAscii
+writer = SimpleIOAscii()
+writer.inventory.filename = "afterslip_tractions.spatialdb"
+writer._configure()
+writer.write({'points': vertices,
+              'coordsys': cs,
+              'data_dim': 1,
+              'values': [{'name': "traction-shear",
+                          'units': "Pa",
+                          'data': tractions_shear},
+                         {'name': "traction-normal",
+                          'units': "Pa",
+                          'data': tractions_normal}]})
+
+# End of file

Copied: short/3D/PyLith/trunk/examples/2d/subduction/afterslip_tractions.spatialdb (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/examples/2d/subduction/afterslip_tractions.spatialdb)
===================================================================
--- short/3D/PyLith/trunk/examples/2d/subduction/afterslip_tractions.spatialdb	                        (rev 0)
+++ short/3D/PyLith/trunk/examples/2d/subduction/afterslip_tractions.spatialdb	2012-06-25 17:37:03 UTC (rev 20406)
@@ -0,0 +1,61 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values =      2
+  value-names =  traction-shear  traction-normal
+  value-units =  Pa  Pa
+  num-locs =     48
+  data-dim =    1
+  space-dim =    2
+  cs-data = cartesian {
+  to-meters = 1
+  space-dim = 2
+}
+}
+ -7.900000e+03 -4.000000e+04 -6.806167e+08 -1.138178e+09
+  6.217879e+04 -2.151659e+04 -3.827731e+08 -6.118344e+08
+  7.537575e+03 -3.538001e+04 -6.190239e+08 -1.007624e+09
+  2.301448e+04 -3.089404e+04 -5.233966e+08 -8.808484e+08
+  3.078374e+04 -2.876014e+04 -4.775233e+08 -8.191033e+08
+  3.858097e+04 -2.673089e+04 -4.527056e+08 -7.602052e+08
+  7.809440e+04 -1.900824e+04 -3.214286e+08 -5.416606e+08
+  7.011929e+04 -2.015270e+04 -3.414270e+08 -5.751686e+08
+  8.609358e+04 -1.804554e+04 -3.066258e+08 -5.143901e+08
+  1.500204e+05 -1.009572e+04 -1.617417e+08 -2.825305e+08
+  1.578557e+05 -8.221434e+03 -1.649012e+08 -2.353765e+08
+  1.021271e+05 -1.643855e+04 -2.770489e+08 -4.681209e+08
+  1.101485e+05 -1.568141e+04 -2.654716e+08 -4.457931e+08
+  1.181656e+05 -1.488009e+04 -2.429373e+08 -4.230659e+08
+  1.261718e+05 -1.397798e+04 -2.318145e+08 -3.965166e+08
+  1.341587e+05 -1.291802e+04 -2.164727e+08 -3.665086e+08
+  1.421138e+05 -1.164290e+04 -1.745752e+08 -3.305236e+08
+  1.656000e+05 -6.000000e+03 -1.210554e+08 -1.759786e+08
+ -1.827295e+02 -3.768493e+04 -6.498480e+08 -1.072043e+09
+  1.526778e+04 -3.310856e+04 -5.656255e+08 -9.436834e+08
+  4.641061e+04 -2.483068e+04 -4.189697e+08 -7.046004e+08
+  5.427594e+04 -2.308426e+04 -3.959394e+08 -6.559993e+08
+  9.410690e+04 -1.720783e+04 -2.902652e+08 -4.900463e+08
+ -1.253533e+05 -7.672410e+04 -1.309863e+09 -2.181960e+09
+ -2.391216e+05 -1.279221e+05 -2.182994e+09 -3.638046e+09
+ -6.921401e+04 -5.834591e+04 -9.976098e+08 -1.660803e+09
+ -5.071555e+05 -2.902538e+05 -4.952758e+09 -8.254536e+09
+ -6.000000e+05 -3.400000e+05 -5.801607e+09 -9.669356e+09
+ -3.707411e+05 -2.057980e+05 -3.511744e+09 -5.852682e+09
+ -3.197051e+05 -1.730797e+05 -2.953471e+09 -4.922257e+09
+ -2.760049e+05 -1.479104e+05 -2.524034e+09 -4.206485e+09
+ -2.080485e+05 -1.120422e+05 -1.912077e+09 -3.186437e+09
+ -1.410140e+05 -8.254640e+04 -1.409049e+09 -2.347527e+09
+ -9.212276e+04 -6.549934e+04 -1.118838e+09 -1.862407e+09
+ -1.012707e+05 -6.846624e+04 -1.169246e+09 -1.947230e+09
+ -5.390095e+04 -5.370808e+04 -9.240258e+08 -1.527955e+09
+ -6.156041e+04 -5.601732e+04 -9.693735e+08 -1.593212e+09
+ -3.090161e+04 -4.685024e+04 -8.042750e+08 -1.332769e+09
+ -2.323282e+04 -4.457215e+04 -7.585454e+08 -1.267450e+09
+ -1.818044e+05 -9.963948e+04 -1.700513e+09 -2.833707e+09
+ -8.449740e+04 -6.308054e+04 -1.078065e+09 -1.794688e+09
+ -7.686028e+04 -6.069846e+04 -1.037555e+09 -1.725958e+09
+ -4.623705e+04 -5.141357e+04 -8.685688e+08 -1.461076e+09
+ -3.857014e+04 -4.912917e+04 -8.259365e+08 -1.397715e+09
+ -1.556516e+04 -4.229027e+04 -7.172898e+08 -1.202252e+09
+ -4.316281e+05 -2.458566e+05 -4.195244e+09 -6.991855e+09
+ -1.596584e+05 -9.001740e+04 -1.536412e+09 -2.560041e+09
+ -1.122342e+05 -7.213547e+04 -1.231812e+09 -2.051539e+09

Copied: short/3D/PyLith/trunk/examples/2d/subduction/plot_faultinfo.py (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/examples/2d/subduction/plot_faultinfo.py)
===================================================================
--- short/3D/PyLith/trunk/examples/2d/subduction/plot_faultinfo.py	                        (rev 0)
+++ short/3D/PyLith/trunk/examples/2d/subduction/plot_faultinfo.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -0,0 +1,107 @@
+#!/usr/bin/env python
+"""
+This script generates a plot showing slip or fault tractions.
+"""
+
+# The code requires the numpy, h5py, and matplotlib packages.
+import numpy
+import h5py
+import matplotlib.pyplot as pyplot
+
+# ----------------------------------------------------------------------
+import sys
+
+plot = sys.argv[1]
+if not plot in ['step01_slip', 
+                'step01_stress',
+                'step04_bg',
+                'step04_initial',
+                ]:
+    raise ValueError("Unknown plot '%s'." % plot)
+
+# ----------------------------------------------------------------------
+def getStep01():
+  """
+  Function to get slip, tractions, and fault coordinates from step01.
+  """
+
+  # Open solution file and get slip and coordinates.
+  h5 = h5py.File("output/step01-fault.h5", "r", driver='sec2')
+  vertices = h5['geometry/vertices'][:]
+  slip = h5['vertex_fields/slip'][0,:,0].squeeze()
+  traction_change = h5['vertex_fields/traction_change'][0,:,:].squeeze()
+  h5.close()
+
+  # Sort by y-coordinate (elevation).
+  ids = numpy.argsort(vertices[:,1])
+  vertices = vertices[ids,:]
+  slip = slip[ids,:]
+  traction_change = traction_change[ids]
+
+  return (vertices, slip, traction_change)
+
+# ======================================================================
+(vertices, slip, traction_change) = getStep01()
+
+# Background stress field (from afterslip_tractions.py)
+density = 2900.0
+gacc = 9.80665
+mu_s = 0.6
+
+# Background normal tractions are overburden and compressive
+# (negative, y is negative)
+traction_bg_normal = density*gacc*(vertices[:,1])
+
+# Background shear tractions are reverse (in 2-D right-lateral is negative)
+# because the normal tractions are negative.
+traction_bg_shear = mu_s*traction_bg_normal
+
+# ----------------------------------------------------------------------
+figure = pyplot.figure(figsize=(5.0, 5.0), facecolor='white', dpi=150)
+figure.set_facecolor('white')
+
+axes = figure.add_axes([0.15, 0.1, 0.80, 0.87])
+
+if plot == "step01_slip":
+  axes.plot(slip, vertices[:,1]/1.0e+3)
+  axes.set_xlabel("Slip (m)")
+  axes.set_ylabel("Elevation (km)")
+  axes.set_ylim((-60.0, 0.0))
+
+elif plot == "step01_stress":
+  axes.plot(traction_change[:,0]/1.0e+6, vertices[:,1]/1.0e+3)
+  axes.set_xlabel("Traction Change (MPa)")
+  axes.set_ylabel("Elevation (km)")
+  axes.plot([0,0], [0, -600], linestyle='--', color='gray', alpha=0.5)
+  axes.set_ylim((-60.0, 0.0))
+
+elif plot == "step04_bg":
+  axes.plot(traction_bg_normal/1.0e+6, vertices[:,1]/1.0e+3, 
+            color='green', linestyle='--')
+  axes.plot(traction_bg_shear/1.0e+6, vertices[:,1]/1.0e+3, color='blue')
+  axes.set_xlabel("Traction (MPa)")
+  axes.set_ylabel("Elevation (km)")
+  axes.set_ylim((-60.0, 0.0))
+  axes.set_xlim((-2000.0, 0.0))
+  axes.legend(('Normal', 'Shear'), loc='upper left')
+
+
+elif plot == "step04_initial":
+  traction_initial_normal = traction_bg_normal + traction_change[:,1]
+  traction_initial_shear = traction_bg_shear + traction_change[:,0]
+  traction_friction = -2.0e+6 + mu_s*traction_initial_normal
+
+  axes.plot(traction_initial_normal/1.0e+6, vertices[:,1]/1.0e+3, 
+            color='green', linestyle='--')
+  axes.plot(traction_initial_shear/1.0e+6, vertices[:,1]/1.0e+3, color='blue')
+  axes.plot(traction_friction/1.0e+6, vertices[:,1]/1.0e+3, 
+            color='red', linestyle='-.')
+  axes.set_xlabel("Traction (MPa)")
+  axes.set_ylabel("Elevation (km)")
+  axes.set_ylim((-60.0, 0.0))
+  axes.set_xlim((-2000.0, 0.0))
+  axes.legend(('Normal', 'Shear', "Failure"), loc='upper left')
+
+
+pyplot.show()
+pyplot.savefig(plot)

Modified: short/3D/PyLith/trunk/examples/2d/subduction/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/2d/subduction/pylithapp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/2d/subduction/pylithapp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # This is not a self-contained simulation configuration file. This
@@ -76,7 +75,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 +90,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 +105,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 +120,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/trunk/examples/2d/subduction/step01.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/2d/subduction/step01.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/2d/subduction/step01.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------
@@ -36,13 +35,12 @@
 # boundary conditions
 # ----------------------------------------------------------------------
 [pylithapp.timedependent]
-# Set bc to an array of 5 boundary conditions:
+# Set bc to an array of 4 boundary conditions:
 #   'boundary_east_crust'
 #   'boundary_east_mantle'
 #   'boundary_west'
-#   'boundary_bottom_slab'
 #   'boundary_bottom_mantle'
-bc = [boundary_east_crust,boundary_east_mantle,boundary_west,boundary_bottom_slab,boundary_bottom_mantle]
+bc = [boundary_east_crust,boundary_east_mantle,boundary_west,boundary_bottom_mantle]
 
 # For all boundaries, we fix the displacement normal to the boundary
 # (roller boundary condition) by retaining the default ZeroDispDB,
@@ -50,12 +48,13 @@
 #
 # The label corresponds to the name of the nodeset in CUBIT.
 
-# East boundaries
+# East boundary (crust)
 [pylithapp.timedependent.bc.boundary_east_crust]
 bc_dof = [0]
 label = bndry_east_crust
 db_initial.label = Dirichlet BC on east boundary (crust)
 
+# East boundary (mantle)
 [pylithapp.timedependent.bc.boundary_east_mantle]
 bc_dof = [0]
 label = bndry_east_mantle
@@ -67,12 +66,7 @@
 label = bndry_west
 db_initial.label = Dirichlet BC on west boundary
 
-# Bottom boundaries
-[pylithapp.timedependent.bc.boundary_bottom_slab]
-bc_dof = [1]
-label = bndry_bot_slab
-db_initial.label = Dirichlet BC on bottom boundary (slab)
-
+# Bottom boundary (mantle)
 [pylithapp.timedependent.bc.boundary_bottom_mantle]
 bc_dof = [1]
 label = bndry_bot_mantle
@@ -91,12 +85,12 @@
 # Set the parameters for the fault interface condition.
 [pylithapp.timedependent.interfaces.fault]
 # The label corresponds to the name of the nodeset in CUBIT.
-label = fault_coseismic
+label = fault_slabtop
 
 # 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/trunk/examples/2d/subduction/step02.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/2d/subduction/step02.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/2d/subduction/step02.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------
@@ -85,7 +84,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 +112,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/trunk/examples/2d/subduction/step03.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/2d/subduction/step03.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/2d/subduction/step03.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------
@@ -85,7 +84,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 +129,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]

Copied: short/3D/PyLith/trunk/examples/2d/subduction/step04.cfg (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/examples/2d/subduction/step04.cfg)
===================================================================
--- short/3D/PyLith/trunk/examples/2d/subduction/step04.cfg	                        (rev 0)
+++ short/3D/PyLith/trunk/examples/2d/subduction/step04.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -0,0 +1,176 @@
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# PROBLEM DESCRIPTION
+# ----------------------------------------------------------------------
+#
+# This simulation computes afterslip following the coseismic rupture
+# (imposed in step01) with slip occurring where the fault tractions
+# increase. We assume initial tractions on the fault surface that are
+# 2.0 MPa below the friction threshold before adding in changes in
+# fault tractions from coseismic slip.
+#
+# ----------------------------------------------------------------------
+# RUNNING THE SIMULATON
+# ----------------------------------------------------------------------
+#
+# This is not a self-contained simulation configuration file. This
+# file specifies only the boundary conditions and earthquake
+# parameters for the simulation. The general quasi-static and mesh
+# parameters are specificed in the pylithapp.cfg file which PyLith
+# reads by default.
+#
+# To run the simulation:
+# pylith step04.cfg
+#
+# Output will be directed to directory output.
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.formulation.time_step]
+total_time = 0.0*year
+
+[pylithapp.timedependent]
+# For this problem that uses friction we must switch to a nonlinear solver.
+implicit.solver = pylith.problems.SolverNonlinear
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+# Set bc to an array of 4 boundary conditions:
+#   'boundary_east_crust'
+#   'boundary_east_mantle'
+#   'boundary_west'
+#   'boundary_bottom_mantle'
+bc = [boundary_east_crust,boundary_east_mantle,boundary_west,boundary_bottom_mantle]
+
+# For all boundaries, we fix the displacement normal to the boundary
+# (roller boundary condition) by retaining the default ZeroDispDB,
+# which specifies a zero value.
+#
+# The label corresponds to the name of the nodeset in CUBIT.
+
+# East boundary (crust)
+[pylithapp.timedependent.bc.boundary_east_crust]
+bc_dof = [0]
+label = bndry_east_crust
+db_initial.label = Dirichlet BC on east boundary (crust)
+
+# East boundary (mantle)
+[pylithapp.timedependent.bc.boundary_east_mantle]
+bc_dof = [0]
+label = bndry_east_mantle
+db_initial.label = Dirichlet BC on east boundary (mantle)
+
+# West boundary
+[pylithapp.timedependent.bc.boundary_west]
+bc_dof = [0]
+label = bndry_west
+db_initial.label = Dirichlet BC on west boundary
+
+# Bottom boundary (mantle)
+[pylithapp.timedependent.bc.boundary_bottom_mantle]
+bc_dof = [1]
+label = bndry_bot_mantle
+db_initial.label = Dirichlet BC on bottom boundary (mantle)
+
+
+# ----------------------------------------------------------------------
+# faults
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+interfaces = [fault]
+
+# Set the type of fault interface condition.
+[pylithapp.timedependent.interfaces]
+fault = pylith.faults.FaultCohesiveDyn
+
+# Set the parameters for the fault interface condition.
+[pylithapp.timedependent.interfaces.fault]
+# The label corresponds to the name of the nodeset in CUBIT.
+label = fault_slabtop
+
+# We must define the quadrature information for fault cells.
+# The fault cells are 1D (line).
+quadrature.cell = pylith.feassemble.FIATSimplex
+quadrature.cell.dimension = 1
+
+# Specify zero tolerance for detecting slip. Must be larger than the
+# KSP absolute tolerance.
+zero_tolerance = 1.0e-9
+
+# Friction model
+friction = pylith.friction.StaticFriction
+friction.label = Static friction
+
+friction.db_properties = spatialdata.spatialdb.UniformDB
+friction.db_properties.label = Static friction
+friction.db_properties.values = [friction-coefficient, cohesion]
+friction.db_properties.data = [0.6, 2.0*MPa]
+
+# Initial tractions
+traction_perturbation = pylith.faults.TractPerturbation
+
+[pylithapp.timedependent.interfaces.fault.traction_perturbation]
+db_initial = spatialdata.spatialdb.SimpleDB
+db_initial.label = Initial fault tractions
+db_initial.iohandler.filename = afterslip_tractions.spatialdb
+db_initial.query_type = nearest
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+# Domain
+[pylithapp.problem.formulation.output.domain]
+writer.filename = output/step04.h5
+
+# Ground surface
+[pylithapp.problem.formulation.output.subdomain]
+writer.filename = output/step04-groundsurf.h5
+
+# Fault
+[pylithapp.problem.interfaces.fault.output]
+writer = pylith.meshio.DataWriterHDF5SubSubMesh
+writer.filename = output/step04-fault.h5
+
+# Materials
+[pylithapp.timedependent.materials.continent_crust.output]
+writer.filename = output/step04-concrust.h5
+
+[pylithapp.timedependent.materials.continent_mantle.output]
+writer.filename = output/step04-conmantle.h5
+
+[pylithapp.timedependent.materials.ocean_crust.output]
+writer.filename = output/step04-oceancrust.h5
+
+[pylithapp.timedependent.materials.ocean_mantle.output]
+writer.filename = output/step04-oceanmantle.h5
+
+
+# ----------------------------------------------------------------------
+# PETSc
+# ----------------------------------------------------------------------
+# 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
+
+# Convergence parameters.  Tighten tolerances to be less than zero
+# tolerance for slip. Increase number of iterations.
+ksp_rtol = 1.0e-12
+ksp_atol = 1.0e-13
+ksp_max_it = 800
+
+# End of file

Modified: short/3D/PyLith/trunk/examples/3d/hex8/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/Makefile.am	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/3d/hex8/Makefile.am	2012-06-25 17:37:03 UTC (rev 20406)
@@ -38,6 +38,7 @@
 	step17.cfg \
 	step18.cfg \
 	step19.cfg \
+	step20.cfg \
 	mesh/geometry.jou \
 	mesh/mesh_hex8_1000m.jou \
 	mesh/box_hex8_1000m.exo \
@@ -58,7 +59,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/trunk/examples/3d/hex8/README
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/README	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/3d/hex8/README	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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.
+

Modified: short/3D/PyLith/trunk/examples/3d/hex8/spatialdb/powerlaw/powerlaw_gendb.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/spatialdb/powerlaw/powerlaw_gendb.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/3d/hex8/spatialdb/powerlaw/powerlaw_gendb.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [powerlaw_gendb]
 
 reference_value = strain_rate

Copied: short/3D/PyLith/trunk/examples/3d/hex8/spatialdb/tractions_opening.spatialdb (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/examples/3d/hex8/spatialdb/tractions_opening.spatialdb)
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/spatialdb/tractions_opening.spatialdb	                        (rev 0)
+++ short/3D/PyLith/trunk/examples/3d/hex8/spatialdb/tractions_opening.spatialdb	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/examples/3d/hex8/step02.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/step02.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/3d/hex8/step02.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -83,7 +83,7 @@
 db_initial.label = Neumann BC on +x
 db_initial.iohandler.filename = spatialdb/tractions_axial_shear.spatialdb
 
-output.cell_info_fields = [initial-value]
+output.cell_info_fields = [initial_value]
 output.writer.filename = output/step02-traction.vtk
 output.cell_filter = pylith.meshio.CellFilterAvgSubMesh
 

Modified: short/3D/PyLith/trunk/examples/3d/hex8/step05.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/step05.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/3d/hex8/step05.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -106,7 +106,7 @@
 quadrature.cell.dimension = 2
 quadrature.cell.quad_order = 2
 
-# Fist specify a UniformDB for the initial tractions, along with the values.
+# First specify a UniformDB for the initial tractions, along with the values.
 db_initial = spatialdata.spatialdb.UniformDB
 db_initial.label = Neumann BC on +x
 db_initial.values = [traction-shear-horiz,traction-shear-vert,traction-normal]

Modified: short/3D/PyLith/trunk/examples/3d/hex8/step18.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/step18.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/3d/hex8/step18.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -104,7 +104,7 @@
 # Use linear interpolation
 db_initial.query_type = linear
 
-output.cell_info_fields = [initial-value]
+output.cell_info_fields = [initial_value]
 output.writer.filename = output/step18-traction.vtk
 output.cell_filter = pylith.meshio.CellFilterAvgSubMesh
 

Modified: short/3D/PyLith/trunk/examples/3d/hex8/step19.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/step19.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/3d/hex8/step19.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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
 # ----------------------------------------------------------------------
@@ -112,7 +112,7 @@
 th_change.label = Time history for Neumann BC on +z
 th_change.filename = spatialdb/loadcycle.timedb
 
-output.cell_info_fields = [change-in-value,change-start-time]
+output.cell_info_fields = [change_in_value,change_start_time]
 output.writer.filename = output/step19-traction.vtk
 output.cell_filter = pylith.meshio.CellFilterAvgSubMesh
 

Copied: short/3D/PyLith/trunk/examples/3d/hex8/step20.cfg (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/examples/3d/hex8/step20.cfg)
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/step20.cfg	                        (rev 0)
+++ short/3D/PyLith/trunk/examples/3d/hex8/step20.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -0,0 +1,174 @@
+[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 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.
+total_time = 0.0*year
+# Define an appropriate 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
+
+# Apply tractions to fault surface even when it is open.
+open_free_surface = False
+
+# 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]
+
+# Prescribed tractions for fluid intrusion.
+traction_perturbation = pylith.faults.TractPerturbation
+
+[pylithapp.timedependent.interfaces.fault.traction_perturbation]
+db_initial = spatialdata.spatialdb.SimpleDB
+db_initial.label = Initial fault tractions
+db_initial.iohandler.filename = spatialdb/tractions_opening.spatialdb
+db_initial.query_type = nearest
+
+# ----------------------------------------------------------------------
+# 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 = [traction_initial_value]
+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
+
+
+# ----------------------------------------------------------------------
+# 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
+

Modified: short/3D/PyLith/trunk/examples/3d/tet4/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/tet4/pylithapp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/3d/tet4/pylithapp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------
@@ -78,7 +77,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 +85,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/trunk/examples/3d/tet4/step02.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/tet4/step02.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/3d/tet4/step02.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -102,15 +102,8 @@
 matrix_type = aij
 
 [pylithapp.petsc]
-# 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/trunk/examples/3d/tet4/step03.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/tet4/step03.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/3d/tet4/step03.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/examples/3d/tet4/step04.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/tet4/step04.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/3d/tet4/step04.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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
@@ -125,16 +125,11 @@
 
 [pylithapp.petsc]
 # Note that with 3 displacement components plus the Lagrange
-# multiplier vertices, we have split the fields into 4.
+# multiplier vertices, we have split the fields into 2.
 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/trunk/examples/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/examples/Makefile.am	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/Makefile.am	2012-06-25 17:37:03 UTC (rev 20406)
@@ -20,7 +20,6 @@
 	2d \
 	3d \
 	bar_shearwave \
-	greensfns \
 	meshing \
 	twocells
 

Modified: short/3D/PyLith/trunk/examples/bar_shearwave/hex8/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/bar_shearwave/hex8/pylithapp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/bar_shearwave/hex8/pylithapp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/examples/bar_shearwave/quad4/dynamic.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/bar_shearwave/quad4/dynamic.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/bar_shearwave/quad4/dynamic.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # This is not a self-contained simulation configuration file. This
@@ -34,16 +33,19 @@
 # Specify the initial tractions on the fault using a uniform DB.
 #  shear: 6.1 MPa (right-lateral)
 #  normal 10 MPa (compressive)
-db_initial_tractions = spatialdata.spatialdb.UniformDB
-db_initial_tractions.label = Initial fault tractions
-db_initial_tractions.values = [traction-shear,traction-normal]
-db_initial_tractions.data = [-6.1*MPa, -10.0*MPa]
+traction_perturbation = pylith.faults.TractPerturbation
 
+[pylithapp.timedependent.interfaces.fault.traction_perturbation]
+db_initial = spatialdata.spatialdb.UniformDB
+db_initial.label = Initial fault tractions
+db_initial.values = [traction-shear,traction-normal]
+db_initial.data = [-6.1*MPa, -10.0*MPa]
+
 # ----------------------------------------------------------------------
 # output
 # ----------------------------------------------------------------------
 [pylithapp.timedependent.interfaces.fault.output]
-vertex_info_fields=[initial_traction]
+vertex_info_fields=[traction_initial_value]
 vertex_data_fields=[slip,slip_rate,traction]
 skip = 1
 writer.time_format = %05.2f

Modified: short/3D/PyLith/trunk/examples/bar_shearwave/quad4/dynamic_ratestateageing.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/bar_shearwave/quad4/dynamic_ratestateageing.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/bar_shearwave/quad4/dynamic_ratestateageing.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/examples/bar_shearwave/quad4/dynamic_slipweakening.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/bar_shearwave/quad4/dynamic_slipweakening.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/bar_shearwave/quad4/dynamic_slipweakening.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------
@@ -55,7 +54,7 @@
 
 # Add friction model parameters to fault info file in addition to
 # default values.
-vertex_info_fields = [strike_dir,normal_dir,initial_traction,static_coefficient,dynamic_coefficient,slip_weakening_parameter,cohesion]
+vertex_info_fields = [strike_dir,normal_dir,traction_initial_value,static_coefficient,dynamic_coefficient,slip_weakening_parameter,cohesion]
 
 # Add output of state variables cumulative slip and previous slip to default
 # values.

Modified: short/3D/PyLith/trunk/examples/bar_shearwave/quad4/dynamic_staticfriction.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/bar_shearwave/quad4/dynamic_staticfriction.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/bar_shearwave/quad4/dynamic_staticfriction.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/examples/bar_shearwave/quad4/kinematic.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/bar_shearwave/quad4/kinematic.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/bar_shearwave/quad4/kinematic.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/examples/bar_shearwave/quad4/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/bar_shearwave/quad4/pylithapp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/bar_shearwave/quad4/pylithapp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # This is not a self-contained simulation configuration file. This

Modified: short/3D/PyLith/trunk/examples/bar_shearwave/tet4/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/bar_shearwave/tet4/pylithapp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/bar_shearwave/tet4/pylithapp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------
@@ -105,7 +104,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 +122,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 +141,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 +157,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 +192,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/trunk/examples/bar_shearwave/tri3/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/bar_shearwave/tri3/pylithapp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/bar_shearwave/tri3/pylithapp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------
@@ -102,7 +101,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 +120,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 +136,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 +173,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

Deleted: short/3D/PyLith/trunk/examples/greensfns/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/examples/greensfns/Makefile.am	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/greensfns/Makefile.am	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,23 +0,0 @@
-# -*- Makefile -*-
-#
-# ----------------------------------------------------------------------
-#
-# 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.
-#
-# ----------------------------------------------------------------------
-#
-
-SUBDIRS = \
-	hex8
-
-
-# End of file 

Deleted: short/3D/PyLith/trunk/examples/greensfns/hex8/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/examples/greensfns/hex8/Makefile.am	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/greensfns/hex8/Makefile.am	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,40 +0,0 @@
-# -*- Makefile -*-
-#
-# ----------------------------------------------------------------------
-#
-# 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.
-#
-# ----------------------------------------------------------------------
-#
-
-dist_noinst_DATA = \
-	README \
-	geometry.jou \
-	mesh_hex8_1000m.jou \
-	box_hex8_1000m.exo \
-	finalslip.spatialdb \
-	gfgen.cfg \
-	gfgen.py \
-	gfoutput.cfg \
-	pylithapp.cfg \
-	initial-run.cfg \
-	mat_elastic.spatialdb \
-	sliptime.spatialdb
-
-
-SUBDIRS = \
-	gfimpulses \
-	gfresponses \
-	gfspatialdb
-
-
-# End of file 

Modified: short/3D/PyLith/trunk/examples/greensfns/hex8/README
===================================================================
--- short/3D/PyLith/trunk/examples/greensfns/hex8/README	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/greensfns/hex8/README	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,3 +1,9 @@
+**********************************************************************
+This example is obsolete. Please see examples/2d/greensfns for an
+up-to-date example.
+**********************************************************************
+
+
 In this directory are files that allow a primitive method of generating
 Green's functions using PyLith.  The impulses are specified amounts of
 strike-slip applied on the vertices of a fault, and the responses are

Modified: short/3D/PyLith/trunk/examples/greensfns/hex8/gfgen.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/greensfns/hex8/gfgen.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/greensfns/hex8/gfgen.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [gfgen]
 
 # Configuration file for gfgen.py application.

Deleted: short/3D/PyLith/trunk/examples/greensfns/hex8/gfimpulses/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/examples/greensfns/hex8/gfimpulses/Makefile.am	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/greensfns/hex8/gfimpulses/Makefile.am	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,20 +0,0 @@
-# -*- Makefile -*-
-#
-# ----------------------------------------------------------------------
-#
-# 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.
-#
-# ----------------------------------------------------------------------
-#
-
-
-# End of file 

Modified: short/3D/PyLith/trunk/examples/greensfns/hex8/gfoutput.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/greensfns/hex8/gfoutput.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/greensfns/hex8/gfoutput.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # This is not a self-contained simulation configuration file. This

Deleted: short/3D/PyLith/trunk/examples/greensfns/hex8/gfresponses/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/examples/greensfns/hex8/gfresponses/Makefile.am	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/greensfns/hex8/gfresponses/Makefile.am	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,20 +0,0 @@
-# -*- Makefile -*-
-#
-# ----------------------------------------------------------------------
-#
-# 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.
-#
-# ----------------------------------------------------------------------
-#
-
-
-# End of file 

Deleted: short/3D/PyLith/trunk/examples/greensfns/hex8/gfspatialdb/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/examples/greensfns/hex8/gfspatialdb/Makefile.am	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/greensfns/hex8/gfspatialdb/Makefile.am	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,20 +0,0 @@
-# -*- Makefile -*-
-#
-# ----------------------------------------------------------------------
-#
-# 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.
-#
-# ----------------------------------------------------------------------
-#
-
-
-# End of file 

Modified: short/3D/PyLith/trunk/examples/greensfns/hex8/initial-run.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/greensfns/hex8/initial-run.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/greensfns/hex8/initial-run.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # This is not a self-contained simulation configuration file. This

Modified: short/3D/PyLith/trunk/examples/greensfns/hex8/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/greensfns/hex8/pylithapp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/greensfns/hex8/pylithapp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/examples/meshing/surface_nurbs/contours/cont2lines.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/meshing/surface_nurbs/contours/cont2lines.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/meshing/surface_nurbs/contours/cont2lines.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [cont2lines]
 in_file = hikurangi_shiftrot_fill.txt
 out_root = journal/hikurangi_shiftrot_fill

Modified: short/3D/PyLith/trunk/examples/meshing/surface_nurbs/contours/fill_contours.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/meshing/surface_nurbs/contours/fill_contours.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/meshing/surface_nurbs/contours/fill_contours.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [fill_contours]
 in_file = hikurangi_shiftrot.txt
 out_file = hikurangi_shiftrot_fill.txt

Modified: short/3D/PyLith/trunk/examples/meshing/surface_nurbs/dem/dem2lines.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/meshing/surface_nurbs/dem/dem2lines.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/meshing/surface_nurbs/dem/dem2lines.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [dem2lines]
 input_dem = ruapehu-nzmg-1km.txt
 vtk_output_file = ruapehu-nzmg-1km-resampled.vtk

Modified: short/3D/PyLith/trunk/examples/meshing/surface_nurbs/triangles/mkfacets.py
===================================================================
--- short/3D/PyLith/trunk/examples/meshing/surface_nurbs/triangles/mkfacets.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/meshing/surface_nurbs/triangles/mkfacets.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -5,7 +5,8 @@
 # meshing package if you have installed it.
 
 # Import necessary packages.
-import subprocess
+import os
+import os
 # import pdb
 # pdb.set_trace()
 
@@ -15,10 +16,7 @@
 facetsOut = "ruapehu-nzmg-1km.fac"
 
 # Triangulate the points to get connectivities.
-c = open(connectFile, 'w')
-triCall = ["triangulate", vertexFile, "-V"]
-retCode = subprocess.Popen(triCall, stdout=c)
-c.close()
+os.system('triangulate '+vertexFile+' > '+connectFile)
 
 # Read connectivities and vertices.
 v = open(vertexFile, 'r')

Modified: short/3D/PyLith/trunk/examples/run_examples.sh
===================================================================
--- short/3D/PyLith/trunk/examples/run_examples.sh	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/run_examples.sh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -68,16 +68,16 @@
 
 # 3d/hex8
 dir="3d/hex8"
-examples="step01.cfg step02.cfg step03.cfg step04.cfg step05.cfg step06.cfg step07.cfg step08.cfg step09.cfg step10.cfg step11.cfg step12.cfg step13.cfg step14.cfg step15.cfg step16.cfg step17.cfg step18.cfg step19.cfg"
+examples="step01.cfg step02.cfg step03.cfg step04.cfg step05.cfg step06.cfg step07.cfg step08.cfg step09.cfg step10.cfg step11.cfg step12.cfg step13.cfg step14.cfg step15.cfg step16.cfg step17.cfg step18.cfg step19.cfg step20.cfg"
 run_examples
 
-examples="step01.cfg step03.cfg step06.cfg step15.cfg step19.cfg"
+examples="step01.cfg step03.cfg step06.cfg step15.cfg step19.cfg step20.cfg"
 run_examples 2
 
 # ----------------------------------------------------------------------
 # subduction
 dir="2d/subduction"
-examples="step01.cfg step02.cfg step03.cfg"
+examples="step01.cfg step02.cfg step03.cfg step04.cfg"
 run_examples
 run_examples 2
 run_examples 4
@@ -108,6 +108,16 @@
 
 
 # ----------------------------------------------------------------------
+# greensfns
+dir="2d/greensfns/strikeslip"
+examples="eqsim.cfg --problem=pylith.problems.GreensFns"
+run_examples
+
+dir="2d/greensfns/reverse"
+examples="eqsim.cfg --problem=pylith.problems.GreensFns"
+run_examples
+
+# ----------------------------------------------------------------------
 # Return to examples dir
 cd ${examples_dir}
   

Modified: short/3D/PyLith/trunk/examples/twocells/twohex27-cubit/axialdisp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twohex27-cubit/axialdisp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/twocells/twohex27-cubit/axialdisp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # The settings in this file (axialdisp.cfg) will be read if it is
 # specified on the command line:

Modified: short/3D/PyLith/trunk/examples/twocells/twohex27-cubit/dislocation.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twohex27-cubit/dislocation.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/twocells/twohex27-cubit/dislocation.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # The settings in this file (dislocation.cfg) will be read if it is
 # specified on the command line:

Modified: short/3D/PyLith/trunk/examples/twocells/twohex27-cubit/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twohex27-cubit/pylithapp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/twocells/twohex27-cubit/pylithapp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # The settings in this file (pylithapp.cfg) will be read automatically
 # by pylith, as long as the file is placed in the run directory.

Modified: short/3D/PyLith/trunk/examples/twocells/twohex27-cubit/sheardisp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twohex27-cubit/sheardisp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/twocells/twohex27-cubit/sheardisp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # The settings in this file (sheardisp.cfg) will be read if it is
 # specified on the command line:

Modified: short/3D/PyLith/trunk/examples/twocells/twohex8/axialdisp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twohex8/axialdisp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/twocells/twohex8/axialdisp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # The settings in this file (axialdisp.cfg) will be read if it is
 # specified on the command line:

Modified: short/3D/PyLith/trunk/examples/twocells/twohex8/dislocation.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twohex8/dislocation.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/twocells/twohex8/dislocation.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # The settings in this file (dislocation.cfg) will be read if it is
 # specified on the command line:

Modified: short/3D/PyLith/trunk/examples/twocells/twohex8/dislocation_sliptime.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twohex8/dislocation_sliptime.spatialdb	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/twocells/twohex8/dislocation_sliptime.spatialdb	2012-06-25 17:37:03 UTC (rev 20406)
@@ -9,7 +9,7 @@
   num-values = 1
   value-names =  slip-time
 
-  // The fault slip time has units of meters.
+  // The fault slip time has units of seconds.
   value-units =  s
 
   // The value is specified at one spatial location.

Modified: short/3D/PyLith/trunk/examples/twocells/twohex8/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twohex8/pylithapp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/twocells/twohex8/pylithapp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # The settings in this file (pylithapp.cfg) will be read automatically
 # by pylith, as long as the file is placed in the run directory.

Modified: short/3D/PyLith/trunk/examples/twocells/twohex8/sheardisp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twohex8/sheardisp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/twocells/twohex8/sheardisp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # The settings in this file (sheardisp.cfg) will be read if it is
 # specified on the command line:

Modified: short/3D/PyLith/trunk/examples/twocells/twoquad4/axialdisp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twoquad4/axialdisp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/twocells/twoquad4/axialdisp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # To run this problem, type "pylith axialdisp.cfg". The settings in
 # pylithapp.cfg will be read by default. See the README for how to run

Modified: short/3D/PyLith/trunk/examples/twocells/twoquad4/axialtract.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twoquad4/axialtract.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/twocells/twoquad4/axialtract.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # This is a simple problem to demonstrate the usage of Neumann
 # (traction) boundary conditions. 
@@ -170,7 +169,7 @@
 
 # Give basename for VTK output of traction BC information.
 [pylithapp.timedependent.bc.x_pos.output]
-cell_info_fields = [initial-value]
+cell_info_fields = [initial_value]
 writer.filename = axialtract-tractions.vtk
 
 # Give basename for VTK fault output.

Modified: short/3D/PyLith/trunk/examples/twocells/twoquad4/dislocation.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twoquad4/dislocation.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/twocells/twoquad4/dislocation.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # The settings in this file (dislocation.cfg) will be read if it is
 # specified on the command line:

Modified: short/3D/PyLith/trunk/examples/twocells/twoquad4/dislocation_sliptime.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twoquad4/dislocation_sliptime.spatialdb	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/twocells/twoquad4/dislocation_sliptime.spatialdb	2012-06-25 17:37:03 UTC (rev 20406)
@@ -9,7 +9,7 @@
   num-values = 1
   value-names =  slip-time
 
-  // The fault slip time has units of meters.
+  // The fault slip time has units of seconds.
   value-units =  s
 
   // The value is specified at one spatial location.

Modified: short/3D/PyLith/trunk/examples/twocells/twoquad4/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twoquad4/pylithapp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/twocells/twoquad4/pylithapp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # The settings in this file (pylithapp.cfg) will be read automatically
 # by pylith, as long as the file is placed in the run directory.

Modified: short/3D/PyLith/trunk/examples/twocells/twoquad4/sheardisp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twoquad4/sheardisp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/twocells/twoquad4/sheardisp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # The settings in this file (sheardisp.cfg) will be read if it is
 # specified on the command line:

Modified: short/3D/PyLith/trunk/examples/twocells/twotet4/axialdisp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twotet4/axialdisp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/twocells/twotet4/axialdisp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # The settings in this file (axialdisp.cfg) will be read if it is
 # specified on the command line:

Modified: short/3D/PyLith/trunk/examples/twocells/twotet4/dislocation.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twotet4/dislocation.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/twocells/twotet4/dislocation.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # The settings in this file (dislocation.cfg) will be read if it is
 # specified on the command line:
@@ -79,7 +78,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/trunk/examples/twocells/twotet4/dislocation_sliptime.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twotet4/dislocation_sliptime.spatialdb	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/twocells/twotet4/dislocation_sliptime.spatialdb	2012-06-25 17:37:03 UTC (rev 20406)
@@ -9,7 +9,7 @@
   num-values = 1
   value-names =  slip-time
 
-  // The fault slip time has units of meters.
+  // The fault slip time has units of seconds.
   value-units =  s
 
   // The value is specified at one spatial location.

Modified: short/3D/PyLith/trunk/examples/twocells/twotet4/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twotet4/pylithapp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/twocells/twotet4/pylithapp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # The settings in this file (pylithapp.cfg) will be read automatically
 # by pylith, as long as the file is placed in the run directory.
@@ -85,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
 
 # ----------------------------------------------------------------------
 # PETSc

Modified: short/3D/PyLith/trunk/examples/twocells/twotet4-geoproj/dislocation.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twotet4-geoproj/dislocation.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/twocells/twotet4-geoproj/dislocation.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # The settings in this file (dislocation.cfg) will be read if it is
 # specified on the command line:
@@ -85,7 +84,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/trunk/examples/twocells/twotet4-geoproj/dislocation_sliptime.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twotet4-geoproj/dislocation_sliptime.spatialdb	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/twocells/twotet4-geoproj/dislocation_sliptime.spatialdb	2012-06-25 17:37:03 UTC (rev 20406)
@@ -9,7 +9,7 @@
   num-values = 1
   value-names =  slip-time
 
-  // The fault slip time has units of meters.
+  // The fault slip time has units of seconds.
   value-units =  s
 
   // The value is specified at one spatial location.

Modified: short/3D/PyLith/trunk/examples/twocells/twotet4-geoproj/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twotet4-geoproj/pylithapp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/twocells/twotet4-geoproj/pylithapp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # The settings in this file (pylithapp.cfg) will be read automatically
 # by pylith, as long as the file is placed in the run directory.
@@ -90,7 +89,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/trunk/examples/twocells/twotri3/axialdisp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twotri3/axialdisp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/twocells/twotri3/axialdisp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # To run this problem, type "pylith axialdisp.cfg". The settings in
 # pylithapp.cfg will be read by default. See the README for how to run

Modified: short/3D/PyLith/trunk/examples/twocells/twotri3/dislocation.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twotri3/dislocation.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/twocells/twotri3/dislocation.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # To run this problem, type "pylith dislocation.cfg". The settings in
 # pylithapp.cfg will be read by default. See the README for how to run
@@ -80,7 +79,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/trunk/examples/twocells/twotri3/dislocation_sliptime.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twotri3/dislocation_sliptime.spatialdb	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/twocells/twotri3/dislocation_sliptime.spatialdb	2012-06-25 17:37:03 UTC (rev 20406)
@@ -9,7 +9,7 @@
   num-values = 1
   value-names =  slip-time
 
-  // The fault slip time has units of meters.
+  // The fault slip time has units of slip time.
   value-units =  s
 
   // The value is specified at one spatial location.

Modified: short/3D/PyLith/trunk/examples/twocells/twotri3/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twotri3/pylithapp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/twocells/twotri3/pylithapp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # The settings in this file (pylithapp.cfg) will be read automatically
 # by pylith, as long as the file is placed in the run directory.
@@ -84,7 +83,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/trunk/examples/twocells/twotri3/sheardisp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twotri3/sheardisp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/examples/twocells/twotri3/sheardisp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # To run this problem, type "pylith sheardisp.cfg". The settings in
 # pylithapp.cfg will be read by default. See the README for how to run
@@ -22,7 +21,6 @@
 # vertical motion. The right boundary is free in the horizontal
 # direvtion with upward vertical motion.
 
-# -*- Python -*-
 
 [pylithapp]
 

Modified: short/3D/PyLith/trunk/libsrc/pylith/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/Makefile.am	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/Makefile.am	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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 \
@@ -120,6 +122,7 @@
 	materials/MaxwellIsotropic3D.cc \
 	materials/MaxwellPlaneStrain.cc \
 	materials/PowerLaw3D.cc \
+	materials/PowerLawPlaneStrain.cc \
 	materials/DruckerPrager3D.cc \
 	materials/DruckerPragerPlaneStrain.cc \
 	meshio/BinaryIO.cc \

Modified: short/3D/PyLith/trunk/libsrc/pylith/bc/DirichletBoundary.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/bc/DirichletBoundary.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/bc/DirichletBoundary.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -104,15 +104,15 @@
 
   logger.stagePop();
 
-  if (0 == strcasecmp(name, "initial-value"))
+  if (0 == strcasecmp(name, "initial_value"))
     return _bufferVector("initial", "initial_displacement", lengthScale);
-  else if (0 == strcasecmp(name, "rate-of-change"))
+  else if (0 == strcasecmp(name, "rate_of_change"))
     return _bufferVector("rate", "velocity", rateScale);
-  else if (0 == strcasecmp(name, "change-in-value"))
+  else if (0 == strcasecmp(name, "change_in_value"))
     return _bufferVector("change", "displacement_change", lengthScale);
-  else if (0 == strcasecmp(name, "rate-start-time"))
+  else if (0 == strcasecmp(name, "rate_start_time"))
     return _bufferScalar("rate time", "velocity_start_time", timeScale);
-  else if (0 == strcasecmp(name, "change-start-time"))
+  else if (0 == strcasecmp(name, "change_start_time"))
     return _bufferScalar("change time", "change_start_time", timeScale);
   else {
     std::ostringstream msg;

Modified: short/3D/PyLith/trunk/libsrc/pylith/bc/Neumann.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/bc/Neumann.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/bc/Neumann.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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
   
 // ----------------------------------------------------------------------
@@ -203,19 +203,19 @@
   assert(_parameters);
   assert(name);
 
-  if (0 == strcasecmp(name, "initial-value"))
+  if (0 == strcasecmp(name, "initial_value"))
     return _parameters->get("initial");
 
-  else if (0 == strcasecmp(name, "rate-of-change"))
+  else if (0 == strcasecmp(name, "rate_of_change"))
     return _parameters->get("rate");
 
-  else if (0 == strcasecmp(name, "change-in-value"))
+  else if (0 == strcasecmp(name, "change_in_value"))
     return _parameters->get("change");
 
-  else if (0 == strcasecmp(name, "rate-start-time"))
+  else if (0 == strcasecmp(name, "rate_start_time"))
     return _parameters->get("rate time");
 
-  else if (0 == strcasecmp(name, "change-start-time"))
+  else if (0 == strcasecmp(name, "change_start_time"))
     return _parameters->get("change time");
 
   else {
@@ -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/trunk/libsrc/pylith/bc/Neumann.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/bc/Neumann.hh	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/bc/Neumann.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/libsrc/pylith/bc/TimeDependent.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/bc/TimeDependent.hh	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/bc/TimeDependent.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/libsrc/pylith/bc/TimeDependentPoints.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/bc/TimeDependentPoints.hh	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/bc/TimeDependentPoints.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/libsrc/pylith/faults/BruneSlipFn.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/BruneSlipFn.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/BruneSlipFn.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/libsrc/pylith/faults/BruneSlipFn.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/BruneSlipFn.hh	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/BruneSlipFn.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/libsrc/pylith/faults/ConstRateSlipFn.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/ConstRateSlipFn.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/ConstRateSlipFn.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/libsrc/pylith/faults/ConstRateSlipFn.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/ConstRateSlipFn.hh	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/ConstRateSlipFn.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/libsrc/pylith/faults/EqKinSrc.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/EqKinSrc.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/EqKinSrc.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/libsrc/pylith/faults/EqKinSrc.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/EqKinSrc.hh	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/EqKinSrc.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/libsrc/pylith/faults/FaultCohesiveDyn.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveDyn.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveDyn.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -21,6 +21,7 @@
 #include "FaultCohesiveDyn.hh" // implementation of object methods
 
 #include "CohesiveTopology.hh" // USES CohesiveTopology
+#include "TractPerturbation.hh" // HOLDSA TractPerturbation
 
 #include "pylith/feassemble/Quadrature.hh" // USES Quadrature
 #include "pylith/feassemble/CellGeometry.hh" // USES CellGeometry
@@ -28,6 +29,7 @@
 #include "pylith/topology/SubMesh.hh" // USES SubMesh
 #include "pylith/topology/Field.hh" // USES Field
 #include "pylith/topology/Fields.hh" // USES Fields
+#include "pylith/topology/FieldsNew.hh" // USES FieldsNew
 #include "pylith/topology/Jacobian.hh" // USES Jacobian
 #include "pylith/topology/SolutionFields.hh" // USES SolutionFields
 #include "pylith/friction/FrictionModel.hh" // USES FrictionModel
@@ -53,6 +55,7 @@
 // ----------------------------------------------------------------------
 typedef pylith::topology::Mesh::SieveMesh SieveMesh;
 typedef pylith::topology::Mesh::RealSection RealSection;
+typedef pylith::topology::Mesh::RealUniformSection RealUniformSection;
 typedef pylith::topology::SubMesh::SieveMesh SieveSubMesh;
 
 typedef pylith::topology::Field<pylith::topology::SubMesh>::RestrictVisitor RestrictVisitor;
@@ -63,7 +66,8 @@
 // Default constructor.
 pylith::faults::FaultCohesiveDyn::FaultCohesiveDyn(void) :
   _zeroTolerance(1.0e-10),
-  _dbInitialTract(0),
+  _openFreeSurf(true),
+  _tractPerturbation(0),
   _friction(0),
   _jacobian(0),
   _ksp(0)
@@ -83,11 +87,11 @@
 { // deallocate
   FaultCohesiveLagrange::deallocate();
 
-  _dbInitialTract = 0; // :TODO: Use shared pointer
+  _tractPerturbation = 0; // :TODO: Use shared pointer
   _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
@@ -96,10 +100,10 @@
 // ----------------------------------------------------------------------
 // Sets the spatial database for the inital tractions
 void
-pylith::faults::FaultCohesiveDyn::dbInitialTract(spatialdata::spatialdb::SpatialDB* db)
-{ // dbInitial
-  _dbInitialTract = db;
-} // dbInitial
+pylith::faults::FaultCohesiveDyn::tractPerturbation(TractPerturbation* tract)
+{ // tractPerturbation
+  _tractPerturbation = tract;
+} // tractPerturbation
 
 // ----------------------------------------------------------------------
 // Get the friction (constitutive) model.  
@@ -125,29 +129,41 @@
 } // 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);
 
   // Get initial tractions using a spatial database.
-  _setupInitialTractions();
+  if (_tractPerturbation) {
+    const topology::Field<topology::SubMesh>& orientation = _fields->get("orientation");
+    _tractPerturbation->initialize(*_faultMesh, orientation, *_normalizer);
+  } // if
 
   // 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");
@@ -172,9 +188,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:
@@ -214,11 +230,22 @@
   scalar_array dispTpdtVertexP(spaceDim);
   scalar_array dispTpdtVertexL(spaceDim);
 
-  scalar_array initialTractionsVertex(spaceDim);
-  ALE::Obj<RealSection> initialTractionsSection;
-  if (_dbInitialTract) {
-    initialTractionsSection = _fields->get("initial traction").section();
-    assert(!initialTractionsSection.isNull());
+  scalar_array tractPerturbVertex(spaceDim);
+  ALE::Obj<RealUniformSection> tractPerturbSection;
+  int tractPerturbIndex = 0;
+  int tractPerturbFiberDim = 0;
+  if (_tractPerturbation) {
+    _tractPerturbation->calculate(t);
+    
+    const topology::FieldsNew<topology::SubMesh>* params = _tractPerturbation->parameterFields();
+    assert(params);
+    tractPerturbSection = params->section();
+    assert(!tractPerturbSection.isNull());
+
+    tractPerturbFiberDim = params->fiberDim();
+    tractPerturbIndex = params->sectionIndex("value");
+    const int valueFiberDim = params->sectionFiberDim("value");
+    assert(valueFiberDim == spaceDim);
   } // if
 
   const ALE::Obj<RealSection>& areaSection = _fields->get("area").section();
@@ -257,13 +284,17 @@
     _logger->eventBegin(restrictEvent);
 #endif
 
-    // Get initial tractions at fault vertex.
-    if (_dbInitialTract) {
-      initialTractionsSection->restrictPoint(v_fault, 
-					     &initialTractionsVertex[0], 
-					     initialTractionsVertex.size());
+    // Get prescribed traction perturbation at fault vertex.
+    if (_tractPerturbation) {
+      assert(tractPerturbFiberDim == tractPerturbSection->getFiberDimension(v_fault));
+      const PylithScalar* paramsVertex = tractPerturbSection->restrictPoint(v_fault);
+      assert(paramsVertex);
+      
+      for (int iDim=0; iDim < spaceDim; ++iDim) {
+	tractPerturbVertex[iDim] = paramsVertex[tractPerturbIndex+iDim];
+      } // for
     } else {
-      initialTractionsVertex = 0.0;
+      tractPerturbVertex = 0.0;
     } // if/else
 
     // Get orientation associated with fault vertex.
@@ -332,10 +363,13 @@
     
     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);
+      residualVertexN = areaVertex * (dispTpdtVertexL - tractPerturbVertex);
 
     } else { // opening, normal traction should be zero
       if (fabs(tractionNormal) > _zeroTolerance) {
@@ -381,8 +415,8 @@
 				      const PylithScalar t,
 				      topology::SolutionFields* const fields)
 { // updateStateVars
-  assert(0 != fields);
-  assert(0 != _fields);
+  assert(fields);
+  assert(_fields);
 
   _updateRelMotion(*fields);
 
@@ -558,6 +592,10 @@
       fields->get("dispIncr(t->t+dt)").section();
   assert(!dispIncrSection.isNull());
 
+  const ALE::Obj<RealSection>& dispIncrAdjSection =
+      fields->get("dispIncr adjust").section();
+  assert(!dispIncrAdjSection.isNull());
+
   scalar_array dTractionTpdtVertex(spaceDim);
   scalar_array dLagrangeTpdtVertex(spaceDim);
   const ALE::Obj<RealSection>& dLagrangeTpdtSection =
@@ -608,19 +646,16 @@
 
     // Get displacement increment values.
     assert(spaceDim == dispIncrSection->getFiberDimension(v_negative));
-    const PylithScalar* dispIncrVertexN = 
-      dispIncrSection->restrictPoint(v_negative);
+    const PylithScalar* dispIncrVertexN = dispIncrSection->restrictPoint(v_negative);
     assert(dispIncrVertexN);
 
     assert(spaceDim == dispIncrSection->getFiberDimension(v_positive));
-    const PylithScalar* dispIncrVertexP = 
-      dispIncrSection->restrictPoint(v_positive);
+    const PylithScalar* dispIncrVertexP = dispIncrSection->restrictPoint(v_positive);
     assert(dispIncrVertexP);
 
     // Get orientation
     assert(spaceDim*spaceDim == orientationSection->getFiberDimension(v_fault));
-    const PylithScalar* orientationVertex = 
-      orientationSection->restrictPoint(v_fault);
+    const PylithScalar* orientationVertex = orientationSection->restrictPoint(v_fault);
 
     // Get Lagrange multiplier values from disp(t), and dispIncr(t->t+dt)
     assert(spaceDim == dispTSection->getFiberDimension(v_lagrange));
@@ -628,8 +663,7 @@
     assert(lagrangeTVertex);
 
     assert(spaceDim == dispIncrSection->getFiberDimension(v_lagrange));
-    const PylithScalar* lagrangeTIncrVertex = 
-      dispIncrSection->restrictPoint(v_lagrange);
+    const PylithScalar* lagrangeTIncrVertex = dispIncrSection->restrictPoint(v_lagrange);
     assert(lagrangeTIncrVertex);
 
     // Step 1: Prevent nonphysical trial solutions. The product of the
@@ -747,6 +781,7 @@
         dLagrangeTpdtSection->getFiberDimension(v_fault));
     dLagrangeTpdtSection->updatePoint(v_fault, &dLagrangeTpdtVertex[0]);
 
+#if 0 // UNNECESSARY?
     // Update displacement in trial solution (if necessary) so that it
     // conforms to physical constraints.
     if (0.0 != dSlipVertexNormal) {
@@ -763,12 +798,13 @@
       // Update displacement field
       assert(dDispTIncrVertexN.size() ==
 	     dispIncrSection->getFiberDimension(v_negative));
-      dispIncrSection->updateAddPoint(v_negative, &dDispTIncrVertexN[0]);
+      dispIncrAdjSection->updateAddPoint(v_negative, &dDispTIncrVertexN[0]);
       
       assert(dDispTIncrVertexP.size() ==
 	     dispIncrSection->getFiberDimension(v_positive));
-      dispIncrSection->updateAddPoint(v_positive, &dDispTIncrVertexP[0]);    
+      dispIncrAdjSection->updateAddPoint(v_positive, &dDispTIncrVertexP[0]);    
     } // if
+#endif
 
   } // for
 
@@ -817,7 +853,8 @@
       break;
 
 #if 0
-    std::cout << "alphaL: " << pow(10.0, logAlphaL)
+    const int rank = _faultMesh->sieveMesh()->commRank();
+    std::cout << "["<<rank<<"] alphaL: " << pow(10.0, logAlphaL)
 	      << ", residuaL: " << residualL
 	      << ", alphaM: " << pow(10.0, logAlphaM)
 	      << ", residualM: " << residualM
@@ -890,6 +927,13 @@
   const ALE::Obj<RealSection>& sensDispRelSection = _fields->get("sensitivity relative disp").section();
   assert(!sensDispRelSection.isNull());
 
+  const ALE::Obj<SieveMesh>& sieveMesh = fields->mesh().sieveMesh();
+  assert(!sieveMesh.isNull());
+  const ALE::Obj<SieveMesh::order_type>& globalOrder =
+    sieveMesh->getFactory()->getGlobalOrder(sieveMesh, "default", 
+					    dispIncrSection);
+  assert(!globalOrder.isNull());
+
   for (int iVertex=0; iVertex < numVertices; ++iVertex) {
     const int v_fault = _cohesiveVertices[iVertex].fault;
     const int v_lagrange = _cohesiveVertices[iVertex].lagrange;
@@ -1087,25 +1131,31 @@
     std::cout << std::endl;
 #endif
 
-    // Update Lagrange multiplier increment.
-    assert(dLagrangeTpdtVertex.size() ==
-	   dispIncrSection->getFiberDimension(v_lagrange));
-    dispIncrSection->updateAddPoint(v_lagrange, &dLagrangeTpdtVertex[0]);
+    // Compute contribution to adjusting solution only if Lagrange
+    // constraint is local (the adjustment is assembled across processors).
+    if (globalOrder->isLocal(v_lagrange)) {
 
-    // Update displacement field
-    assert(dDispTIncrVertexN.size() ==
-	   dispIncrSection->getFiberDimension(v_negative));
-    dispIncrSection->updateAddPoint(v_negative, &dDispTIncrVertexN[0]);
-    
-    assert(dDispTIncrVertexP.size() ==
-	   dispIncrSection->getFiberDimension(v_positive));
-    dispIncrSection->updateAddPoint(v_positive, &dDispTIncrVertexP[0]);
-    
+      // Update Lagrange multiplier increment.
+      assert(dLagrangeTpdtVertex.size() ==
+	     dispIncrSection->getFiberDimension(v_lagrange));
+      dispIncrAdjSection->updateAddPoint(v_lagrange, &dLagrangeTpdtVertex[0]);
+
+      // Update displacement field
+      assert(dDispTIncrVertexN.size() ==
+	     dispIncrSection->getFiberDimension(v_negative));
+      dispIncrAdjSection->updateAddPoint(v_negative, &dDispTIncrVertexN[0]);
+      
+      assert(dDispTIncrVertexP.size() ==
+	     dispIncrSection->getFiberDimension(v_positive));
+      dispIncrAdjSection->updateAddPoint(v_positive, &dDispTIncrVertexP[0]);
+    } // if
+
   } // for
 
 #if 0 // DEBUGGING
   //dLagrangeTpdtSection->view("AFTER dLagrange");
-  dispIncrSection->view("AFTER DISP INCR (t->t+dt)");
+  dispIncrAdjSection->view("AFTER DISP INCR adjust");
+  dispIncrSection->view("AFTER DISP INCR");
 #endif
 } // constrainSolnSpace
 
@@ -1127,8 +1177,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:
@@ -1460,17 +1510,19 @@
 // Get vertex field associated with integrator.
 const pylith::topology::Field<pylith::topology::SubMesh>&
 pylith::faults::FaultCohesiveDyn::vertexField(const char* name,
-                                               const topology::SolutionFields* fields)
+					      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)) {
@@ -1481,7 +1533,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)) {
@@ -1492,7 +1544,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)) {
@@ -1540,19 +1592,8 @@
     buffer.copy(dirSection);
     return buffer;
 
-  } else if (0 == strcasecmp("initial_traction", name)) {
-    assert(0 != _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);
-    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 =
@@ -1563,6 +1604,19 @@
   } else if (_friction->hasPropStateVar(name)) {
     return _friction->getField(name);
 
+  } else if (_tractPerturbation && _tractPerturbation->hasParameter(name)) {
+    const topology::Field<topology::SubMesh>& param = _tractPerturbation->vertexField(name, fields);
+    if (param.vectorFieldType() == topology::FieldBase::VECTOR) {
+      _allocateBufferVectorField();
+      topology::Field<topology::SubMesh>& buffer =
+        _fields->get("buffer (vector)");
+      buffer.copy(param);
+      FaultCohesiveLagrange::globalToFault(&buffer, orientation);
+      return buffer;
+    } else {
+      return param;
+    } // if/else
+
   } else {
     std::ostringstream msg;
     msg << "Request for unknown vertex field '" << name << "' for fault '"
@@ -1574,7 +1628,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)");
 
@@ -1582,141 +1636,16 @@
 } // vertexField
 
 // ----------------------------------------------------------------------
-void
-pylith::faults::FaultCohesiveDyn::_setupInitialTractions(void)
-{ // _setupInitialTractions
-  assert(0 != _normalizer);
-
-  // If no initial tractions specified, leave method
-  if (0 == _dbInitialTract)
-    return;
-
-  assert(0 != _normalizer);
-  const PylithScalar pressureScale = _normalizer->pressureScale();
-  const PylithScalar lengthScale = _normalizer->lengthScale();
-
-  const int spaceDim = _quadrature->spaceDim();
-
-  // Create section to hold initial tractions.
-  _fields->add("initial traction", "initial_traction");
-  topology::Field<topology::SubMesh>& initialTractions = 
-    _fields->get("initial traction");
-  topology::Field<topology::SubMesh>& dispRel = _fields->get("relative disp");
-  initialTractions.cloneSection(dispRel);
-  initialTractions.scale(pressureScale);
-
-  scalar_array initialTractionsVertex(spaceDim);
-  scalar_array initialTractionsVertexGlobal(spaceDim);
-  const ALE::Obj<RealSection>& initialTractionsSection = 
-    initialTractions.section();
-  assert(!initialTractionsSection.isNull());
-
-  const ALE::Obj<RealSection>& orientationSection =
-    _fields->get("orientation").section();
-  assert(!orientationSection.isNull());
-
-  const spatialdata::geocoords::CoordSys* cs = _faultMesh->coordsys();
-  assert(0 != 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(0 != _dbInitialTract);
-  _dbInitialTract->open();
-  switch (spaceDim) { // switch
-  case 1: {
-    const char* valueNames[] = { "traction-normal" };
-    _dbInitialTract->queryVals(valueNames, 1);
-    break;
-  } // case 1
-  case 2: {
-    const char* valueNames[] = { "traction-shear", "traction-normal" };
-    _dbInitialTract->queryVals(valueNames, 2);
-    break;
-  } // case 2
-  case 3: {
-    const char* valueNames[] = { "traction-shear-leftlateral",
-				 "traction-shear-updip", "traction-normal" };
-    _dbInitialTract->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 Neumann.");
-  } // switch
-
-  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());
-
-    assert(spaceDim*spaceDim == orientationSection->getFiberDimension(v_fault));
-    const PylithScalar* orientationVertex = 
-      orientationSection->restrictPoint(v_fault);
-    assert(orientationVertex);
-
-    _normalizer->dimensionalize(&coordsVertex[0], coordsVertex.size(),
-				lengthScale);
-
-    initialTractionsVertex = 0.0;
-    int err = _dbInitialTract->query(&initialTractionsVertex[0], 
-				     initialTractionsVertex.size(),
-				     &coordsVertex[0], coordsVertex.size(), cs);
-    if (err) {
-      std::ostringstream msg;
-      msg << "Could not find parameters for physical properties at \n" << "(";
-      for (int i = 0; i < spaceDim; ++i)
-	msg << "  " << coordsVertex[i];
-      msg << ") in friction model " << label() << "\n"
-	  << "using spatial database '" << _dbInitialTract->label() << "'.";
-      throw std::runtime_error(msg.str());
-    } // if
-    _normalizer->nondimensionalize(&initialTractionsVertex[0],
-				   initialTractionsVertex.size(), 
-				   pressureScale);
-
-    // Rotate tractions from fault coordinate system to global
-    // coordinate system
-    initialTractionsVertexGlobal = 0.0;
-    for (int iDim=0; iDim < spaceDim; ++iDim) {
-      for (int jDim=0; jDim < spaceDim; ++jDim) {
-	initialTractionsVertexGlobal[iDim] += 
-	  orientationVertex[jDim*spaceDim+iDim] *
-	  initialTractionsVertex[jDim];
-      } // for
-    } // for
-
-    assert(initialTractionsVertexGlobal.size() ==
-	   initialTractionsSection->getFiberDimension(v_fault));
-    initialTractionsSection->updatePoint(v_fault, 
-					 &initialTractionsVertexGlobal[0]);
-  } // for
-
-  // Close properties database
-  _dbInitialTract->close();
-
-  //initialTractions.view("INITIAL TRACTIONS"); // DEBUGGING
-} // _setupInitialTractions
-
-// ----------------------------------------------------------------------
 // Compute tractions on fault surface using solution.
 void
 pylith::faults::FaultCohesiveDyn::_calcTractions(
     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();
@@ -1791,7 +1720,7 @@
 void
 pylith::faults::FaultCohesiveDyn::_updateRelMotion(const topology::SolutionFields& fields)
 { // _updateRelMotion
-  assert(0 != _fields);
+  assert(_fields);
 
   const int spaceDim = _quadrature->spaceDim();
 
@@ -1885,8 +1814,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();
 
@@ -1934,7 +1863,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.
@@ -1970,8 +1899,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();
@@ -1986,29 +1915,23 @@
   // Get cohesive cells
   const ALE::Obj<SieveMesh>& sieveMesh = fields.mesh().sieveMesh();
   assert(!sieveMesh.isNull());
-  const ALE::Obj<SieveMesh::label_sequence>& cellsCohesive =
-    sieveMesh->getLabelStratum("material-id", id());
+  const ALE::Obj<SieveMesh::label_sequence>& cellsCohesive = sieveMesh->getLabelStratum("material-id", id());
   assert(!cellsCohesive.isNull());
-  const SieveMesh::label_sequence::iterator cellsCohesiveBegin =
-    cellsCohesive->begin();
-  const SieveMesh::label_sequence::iterator cellsCohesiveEnd =
-    cellsCohesive->end();
+  const SieveMesh::label_sequence::iterator cellsCohesiveBegin = cellsCohesive->begin();
+  const SieveMesh::label_sequence::iterator cellsCohesiveEnd = cellsCohesive->end();
 
   // 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());
   const ALE::Obj<SieveMesh::sieve_type>& sieve = sieveMesh->getSieve();
   assert(!sieve.isNull());
-  const int closureSize = 
-    int(pow(sieve->getMaxConeSize(), sieveMesh->depth()));
+  const int closureSize = int(pow(sieve->getMaxConeSize(), sieveMesh->depth()));
   assert(closureSize >= 0);
-  ALE::ISieveVisitor::NConeRetriever<SieveMesh::sieve_type> 
-    ncV(*sieve, closureSize);
-  int_array indicesGlobal(subnrows);
+  ALE::ISieveVisitor::NConeRetriever<SieveMesh::sieve_type> ncV(*sieve, closureSize);
 
   // Get fault Sieve mesh
   const ALE::Obj<SieveSubMesh>& faultSieveMesh = _faultMesh->sieveMesh();
@@ -2020,9 +1943,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());
@@ -2031,57 +1954,87 @@
 				      *globalOrderFault, closureSize*spaceDim);
 
   const int iCone = (negativeSide) ? 0 : 1;
+
+  const int numCohesiveCells = cellsCohesive->size();
+  IS* cellsIS = (numCohesiveCells > 0) ? new IS[numCohesiveCells] : 0;
+  int_array indicesGlobal(subnrows);
+  int_array indicesLocal(numCohesiveCells*subnrows);
+  int_array indicesPerm(subnrows);
+
+  PetscErrorCode err = 0;
+  int iCohesiveCell = 0;
   for (SieveMesh::label_sequence::iterator c_iter=cellsCohesiveBegin;
        c_iter != cellsCohesiveEnd;
-       ++c_iter) {
+       ++c_iter, ++iCohesiveCell) {
     // Get cone for cohesive cell
     ncV.clear();
-    ALE::ISieveTraversal<SieveMesh::sieve_type>::orientedClosure(*sieve,
-								 *c_iter, ncV);
+    ALE::ISieveTraversal<SieveMesh::sieve_type>::orientedClosure(*sieve, *c_iter, ncV);
     const int coneSize = ncV.getSize();
     assert(coneSize == 3*numBasis);
-    const SieveMesh::point_type *cohesiveCone = ncV.getPoints();
-    assert(0 != cohesiveCone);
+    const SieveMesh::point_type* cohesiveCone = ncV.getPoints();
+    assert(cohesiveCone);
 
-    const SieveMesh::point_type c_fault = _cohesiveToFault[*c_iter];
-    jacobianSubCell = 0.0;
-
     // Get indices
     for (int iBasis = 0; iBasis < numBasis; ++iBasis) {
       // negative side of the fault: iCone=0
       // positive side of the fault: iCone=1
       const int v_domain = cohesiveCone[iCone*numBasis+iBasis];
-      
-      for (int iDim=0, iB=iBasis*spaceDim; iDim < spaceDim; ++iDim) {
-	if (globalOrderDomain->isLocal(v_domain))
-	  indicesGlobal[iB+iDim] = globalOrderDomain->getIndex(v_domain) + iDim;
-	else
-	  indicesGlobal[iB+iDim] = -1;
 
-	// Set matrix diagonal entries to 1.0 (used when vertex is not
-	// local).  This happens if a vertex is not on the same
-	// processor as the cohesive cell.
-	jacobianSubCell[(iB+iDim)*numBasis*spaceDim+iB+iDim] = 1.0;
+      for (int iDim=0, iB=iBasis*spaceDim; iDim < spaceDim; ++iDim) {
+	indicesGlobal[iB+iDim] = globalOrderDomain->getIndex(v_domain) + iDim;
       } // for
     } // for
-    
-    PetscErrorCode err = MatGetValues(jacobianDomainMatrix, 
-				      indicesGlobal.size(), &indicesGlobal[0],
-				      indicesGlobal.size(), &indicesGlobal[0],
-				      &jacobianSubCell[0]);
-    CHECK_PETSC_ERROR_MSG(err, "Restrict from PETSc Mat failed.");
 
+    for (int i=0; i < subnrows; ++i) {
+      indicesPerm[i]  = i;
+    } // for
+    err = PetscSortIntWithArray(indicesGlobal.size(), &indicesGlobal[0], &indicesPerm[0]);CHECK_PETSC_ERROR(err);
+
+    for (int i=0; i < subnrows; ++i) {
+      indicesLocal[iCohesiveCell*subnrows+indicesPerm[i]] = i;
+    } // for
+    cellsIS[iCohesiveCell] = PETSC_NULL;
+    err = ISCreateGeneral(PETSC_COMM_SELF, indicesGlobal.size(), &indicesGlobal[0], PETSC_COPY_VALUES, &cellsIS[iCohesiveCell]);CHECK_PETSC_ERROR(err);
+
+  } // for
+
+  PetscMat* submatrices = 0;
+  err = MatGetSubMatrices(jacobianDomainMatrix, numCohesiveCells, cellsIS, cellsIS, MAT_INITIAL_MATRIX, &submatrices);CHECK_PETSC_ERROR(err);
+
+  iCohesiveCell = 0;
+  for (SieveMesh::label_sequence::iterator c_iter=cellsCohesiveBegin;
+       c_iter != cellsCohesiveEnd;
+       ++c_iter, ++iCohesiveCell) {
+    // Get values for submatrix associated with cohesive cell
+    jacobianSubCell = 0.0;
+    err = MatGetValues(submatrices[iCohesiveCell], 
+		       subnrows, &indicesLocal[iCohesiveCell*subnrows],
+		       subnrows, &indicesLocal[iCohesiveCell*subnrows],
+		       &jacobianSubCell[0]);CHECK_PETSC_ERROR_MSG(err, "Restrict from PETSc Mat failed.");
+
     // Insert cell contribution into PETSc Matrix
+    const SieveMesh::point_type c_fault = _cohesiveToFault[*c_iter];
     jacobianFaultVisitor.clear();
     err = updateOperator(jacobianFaultMatrix, *faultSieveMesh->getSieve(),
 			 jacobianFaultVisitor, c_fault,
 			 &jacobianSubCell[0], INSERT_VALUES);
     CHECK_PETSC_ERROR_MSG(err, "Update to PETSc Mat failed.");
+
+    // Destory IS for cohesiveCell
+    err = ISDestroy(&cellsIS[iCohesiveCell]);CHECK_PETSC_ERROR(err);
   } // for
 
+  err = MatDestroyMatrices(numCohesiveCells, &submatrices);CHECK_PETSC_ERROR(err);
+  delete[] cellsIS; cellsIS = 0;
+
   _jacobian->assemble("final_assembly");
 
-  //_jacobian->view(); // DEBUGGING
+#if 0 // DEBUGGING
+  std::cout << "DOMAIN JACOBIAN" << std::endl;
+  jacobian.view();
+  std::cout << "SENSITIVITY JACOBIAN" << std::endl;
+  _jacobian->view();
+#endif
 } // _sensitivityUpdateJacobian
 
 // ----------------------------------------------------------------------
@@ -2092,7 +2045,7 @@
   /** Compute residual -L^T dLagrange
    *
    * Note: We need all entries for L, even those on other processors,
-   * so we compute L rather than extract entries from the Jacoiab.
+   * so we compute L rather than extract entries from the Jacobian.
    */
 
   const PylithScalar signFault = (negativeSide) ?  1.0 : -1.0;
@@ -2196,15 +2149,16 @@
 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");
-  const topology::Field<topology::SubMesh>& solution =
-      _fields->get("sensitivity solution");
+  topology::Field<topology::SubMesh>& residual = _fields->get("sensitivity residual");
+  topology::Field<topology::SubMesh>& solution = _fields->get("sensitivity solution");
 
+  // Assemble residual over processors.
+  residual.complete();
+
   // Update PetscVector view of field.
   residual.scatterSectionToVector();
 
@@ -2232,8 +2186,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();
 
@@ -2331,34 +2285,42 @@
   scalar_array tractionTpdtVertex(spaceDim); // fault coordinates
   scalar_array tractionMisfitVertex(spaceDim); // fault coordinates
 
-  const ALE::Obj<RealSection>& orientationSection =
-      _fields->get("orientation").section();
+  const ALE::Obj<RealSection>& orientationSection = _fields->get("orientation").section();
   assert(!orientationSection.isNull());
 
-  const ALE::Obj<RealSection>& dLagrangeTpdtSection =
-      _fields->get("sensitivity dLagrange").section();
+  const ALE::Obj<RealSection>& dLagrangeTpdtSection = _fields->get("sensitivity dLagrange").section();
   assert(!dLagrangeTpdtSection.isNull());
 
-  const ALE::Obj<RealSection>& sensDispRelSection = 
-    _fields->get("sensitivity relative disp").section();
+  const ALE::Obj<RealSection>& sensDispRelSection = _fields->get("sensitivity relative disp").section();
   assert(!sensDispRelSection.isNull());
 
   const ALE::Obj<RealSection>& dispTSection = fields->get("disp(t)").section();
   assert(!dispTSection.isNull());
 
-  const ALE::Obj<RealSection>& dispIncrSection =
-      fields->get("dispIncr(t->t+dt)").section();
+  const ALE::Obj<RealSection>& dispIncrSection = fields->get("dispIncr(t->t+dt)").section();
   assert(!dispIncrSection.isNull());
 
+
+  // Get fault information
+  const ALE::Obj<SieveMesh>& sieveMesh = fields->mesh().sieveMesh();
+  assert(!sieveMesh.isNull());
+  const ALE::Obj<SieveMesh::order_type>& globalOrder =
+      sieveMesh->getFactory()->getGlobalOrder(sieveMesh, "default", dispIncrSection);
+  assert(!globalOrder.isNull());
+
   bool isOpening = false;
   PylithScalar norm2 = 0.0;
-  const int numVertices = _cohesiveVertices.size();
+  int numVertices = _cohesiveVertices.size();
   for (int iVertex=0; iVertex < numVertices; ++iVertex) {
     const int v_lagrange = _cohesiveVertices[iVertex].lagrange;
     const int v_fault = _cohesiveVertices[iVertex].fault;
     const int v_negative = _cohesiveVertices[iVertex].negative;
     const int v_positive = _cohesiveVertices[iVertex].positive;
 
+    // Compute contribution only if Lagrange constraint is local.
+    if (!globalOrder->isLocal(v_lagrange))
+      continue;
+
     // Get displacement values
     assert(spaceDim == dispTSection->getFiberDimension(v_negative));
     const PylithScalar* dispTVertexN = dispTSection->restrictPoint(v_negative);
@@ -2370,24 +2332,20 @@
 
     // Get displacement increment values.
     assert(spaceDim == dispIncrSection->getFiberDimension(v_negative));
-    const PylithScalar* dispIncrVertexN = 
-      dispIncrSection->restrictPoint(v_negative);
+    const PylithScalar* dispIncrVertexN = dispIncrSection->restrictPoint(v_negative);
     assert(dispIncrVertexN);
 
     assert(spaceDim == dispIncrSection->getFiberDimension(v_positive));
-    const PylithScalar* dispIncrVertexP = 
-      dispIncrSection->restrictPoint(v_positive);
+    const PylithScalar* dispIncrVertexP = dispIncrSection->restrictPoint(v_positive);
     assert(dispIncrVertexP);
 
     // Get orientation
     assert(spaceDim*spaceDim == orientationSection->getFiberDimension(v_fault));
-    const PylithScalar* orientationVertex = 
-      orientationSection->restrictPoint(v_fault);
+    const PylithScalar* orientationVertex = orientationSection->restrictPoint(v_fault);
 
     // Get change in relative displacement from sensitivity solve.
     assert(spaceDim == sensDispRelSection->getFiberDimension(v_fault));
-    const PylithScalar* dDispRelVertex = 
-      sensDispRelSection->restrictPoint(v_fault);
+    const PylithScalar* dDispRelVertex = sensDispRelSection->restrictPoint(v_fault);
     assert(dDispRelVertex);
 
     // Get Lagrange multiplier values from disp(t), and dispIncr(t->t+dt)
@@ -2396,13 +2354,11 @@
     assert(lagrangeTVertex);
 
     assert(spaceDim == dispIncrSection->getFiberDimension(v_lagrange));
-    const PylithScalar* lagrangeTIncrVertex = 
-      dispIncrSection->restrictPoint(v_lagrange);
+    const PylithScalar* lagrangeTIncrVertex = dispIncrSection->restrictPoint(v_lagrange);
     assert(lagrangeTIncrVertex);
 
     assert(spaceDim == dLagrangeTpdtSection->getFiberDimension(v_fault));
-    const PylithScalar* dLagrangeTpdtVertex = 
-      dLagrangeTpdtSection->restrictPoint(v_fault);
+    const PylithScalar* dLagrangeTpdtVertex = dLagrangeTpdtSection->restrictPoint(v_fault);
     assert(dLagrangeTpdtVertex);
 
     // Compute slip, slip rate, and traction at time t+dt as part of
@@ -2516,7 +2472,17 @@
     norm2 = PYLITH_MAXFLOAT;
   } // if
 
-  return sqrt(norm2) / numVertices;
+  PylithScalar norm2Total = 0.0;
+  int numVerticesTotal = 0;
+  if (sizeof(PylithScalar) == 8) {
+    MPI_Allreduce(&norm2, &norm2Total, 1, MPI_DOUBLE, MPI_SUM, fields->mesh().comm());
+  } else {
+    MPI_Allreduce(&norm2, &norm2Total, 1, MPI_FLOAT, MPI_SUM, fields->mesh().comm());
+  } // if/else
+  MPI_Allreduce(&numVertices, &numVerticesTotal, 1, MPI_INT, MPI_SUM, fields->mesh().comm());
+
+  assert(numVerticesTotal > 0);
+  return sqrt(norm2Total) / numVerticesTotal;
 } // _constrainSolnSpaceNorm
 
 
@@ -2530,7 +2496,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/trunk/libsrc/pylith/faults/FaultCohesiveDyn.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveDyn.hh	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveDyn.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -55,11 +55,11 @@
   virtual
   void deallocate(void);
   
-  /** Sets the spatial database for the inital tractions.
+  /** Sets the traction perturbation for prescribed tractions.
    *
-   * @param db spatial database for initial tractions
+   * @param tract Spatial and temporal variation of tractions.
    */
-  void dbInitialTract(spatialdata::spatialdb::SpatialDB* db);
+  void tractPerturbation(TractPerturbation* tract);
   
   /** Set the friction (constitutive) model.
    *
@@ -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.
    *
@@ -142,10 +152,6 @@
   // PRIVATE METHODS ////////////////////////////////////////////////////
 private :
 
-  /** Get initial tractions using a spatial database.
-   */
-  void _setupInitialTractions(void);
-
   /** Compute tractions on fault surface using solution.
    *
    * @param tractions Field for tractions.
@@ -265,11 +271,16 @@
   // 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;
 
-  /// Database for initial tractions.
-  spatialdata::spatialdb::SpatialDB* _dbInitialTract;
+  /// Prescribed traction variation.
+  TractPerturbation* _tractPerturbation;
 
   /// To identify constitutive model
   friction::FrictionModel* _friction;

Copied: short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveImpulses.cc (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/libsrc/pylith/faults/FaultCohesiveImpulses.cc)
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveImpulses.cc	                        (rev 0)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveImpulses.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -0,0 +1,488 @@
+// -*- 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("area", name)) {
+    topology::Field<topology::SubMesh>& area = _fields->get("area");
+    return area;
+
+  } 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/trunk/libsrc/pylith/faults/FaultCohesiveImpulses.hh (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/libsrc/pylith/faults/FaultCohesiveImpulses.hh)
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveImpulses.hh	                        (rev 0)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveImpulses.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/libsrc/pylith/faults/FaultCohesiveKin.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveKin.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveKin.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/libsrc/pylith/faults/FaultCohesiveLagrange.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveLagrange.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveLagrange.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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.
@@ -1425,8 +1535,9 @@
 void
 pylith::faults::FaultCohesiveLagrange::_calcArea(void)
 { // _calcArea
-  assert(0 != _faultMesh);
-  assert(0 != _fields);
+  assert(_faultMesh);
+  assert(_fields);
+  assert(_normalizer);
 
   // Containers for area information
   const int cellDim = _quadrature->cellDim();
@@ -1459,6 +1570,8 @@
   area.newSection(dispRel, 1);
   area.allocate();
   area.vectorFieldType(topology::FieldBase::SCALAR);
+  const PylithScalar lengthScale = _normalizer->lengthScale();
+  area.scale(pow(lengthScale, (spaceDim-1)));
   area.zero();
   const ALE::Obj<RealSection>& areaSection = area.section();
   assert(!areaSection.isNull());
@@ -1599,112 +1712,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/trunk/libsrc/pylith/faults/FaultCohesiveLagrange.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveLagrange.hh	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveLagrange.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/libsrc/pylith/faults/LiuCosSlipFn.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/LiuCosSlipFn.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/LiuCosSlipFn.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/libsrc/pylith/faults/LiuCosSlipFn.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/LiuCosSlipFn.hh	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/LiuCosSlipFn.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/libsrc/pylith/faults/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/Makefile.am	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/Makefile.am	2012-06-25 17:37:03 UTC (rev 20406)
@@ -26,6 +26,14 @@
 	ConstRateSlipFn.icc \
 	CohesiveTopology.hh \
 	EqKinSrc.hh \
+	LiuCosSlipFn.hh \
+	LiuCosSlipFn.icc \
+	SlipTimeFn.hh \
+	StepSlipFn.hh \
+	StepSlipFn.icc \
+	TimeHistorySlipFn.hh \
+	TimeHistorySlipFn.icc \
+	TractPerturbation.hh \
 	Fault.hh \
 	Fault.icc \
 	FaultCohesive.hh \
@@ -34,13 +42,7 @@
 	FaultCohesiveTract.hh \
 	FaultCohesiveDyn.hh \
 	FaultCohesiveKin.hh \
-	LiuCosSlipFn.hh \
-	LiuCosSlipFn.icc \
-	SlipTimeFn.hh \
-	StepSlipFn.hh \
-	StepSlipFn.icc \
-	TimeHistorySlipFn.hh \
-	TimeHistorySlipFn.icc \
+	FaultCohesiveImpulses.hh \
 	faultsfwd.hh
 
 noinst_HEADERS = \

Modified: short/3D/PyLith/trunk/libsrc/pylith/faults/SlipTimeFn.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/SlipTimeFn.hh	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/SlipTimeFn.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/libsrc/pylith/faults/StaticPerturbation.cc (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/libsrc/pylith/faults/StaticPerturbation.cc)
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/StaticPerturbation.cc	                        (rev 0)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/StaticPerturbation.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/libsrc/pylith/faults/StaticPerturbation.hh (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/libsrc/pylith/faults/StaticPerturbation.hh)
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/StaticPerturbation.hh	                        (rev 0)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/StaticPerturbation.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/libsrc/pylith/faults/StaticPerturbation.icc (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/libsrc/pylith/faults/StaticPerturbation.icc)
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/StaticPerturbation.icc	                        (rev 0)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/StaticPerturbation.icc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/libsrc/pylith/faults/StepSlipFn.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/StepSlipFn.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/StepSlipFn.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/libsrc/pylith/faults/StepSlipFn.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/StepSlipFn.hh	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/StepSlipFn.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/libsrc/pylith/faults/TimeHistorySlipFn.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/TimeHistorySlipFn.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/TimeHistorySlipFn.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/libsrc/pylith/faults/TimeHistorySlipFn.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/TimeHistorySlipFn.hh	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/TimeHistorySlipFn.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/libsrc/pylith/faults/TractPerturbation.cc (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/libsrc/pylith/faults/TractPerturbation.cc)
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/TractPerturbation.cc	                        (rev 0)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/TractPerturbation.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -0,0 +1,472 @@
+// -*- 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
+
+// ----------------------------------------------------------------------
+// Get parameter fields.
+const pylith::topology::FieldsNew<pylith::topology::SubMesh>*
+pylith::faults::TractPerturbation::parameterFields(void) const
+{ // parameterFields
+  return _parameters;
+} // parameterFields
+
+// ----------------------------------------------------------------------
+// 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", "traction_initial", spaceDim, topology::FieldBase::VECTOR, pressureScale);
+  if (_dbRate) {
+    _parameters->add("rate", "traction_rate", spaceDim, topology::FieldBase::VECTOR, rateScale);
+    _parameters->add("rate time", "rate_start_time", 1, topology::FieldBase::SCALAR, timeScale);
+  } // if
+  if (_dbChange) {
+    _parameters->add("change", "traction_change", spaceDim, topology::FieldBase::VECTOR, pressureScale);
+    _parameters->add("change time", "change_start_time", 1, topology::FieldBase::SCALAR, timeScale);
+  } // if
+  _parameters->allocate(topology::FieldBase::VERTICES_FIELD, 0);
+  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-leftlateral",
+				    "traction-shear-updip",
+				    "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-leftlateral",
+				    "traction-rate-shear-updip",
+				    "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-leftlateral",
+				    "traction-shear-updip",
+				    "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
+
+// ----------------------------------------------------------------------
+// Calculate temporal and spatial variation of value over the list of Submesh.
+void
+pylith::faults::TractPerturbation::calculate(const PylithScalar t)
+{ // calculate
+  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
+}  // calculate
+
+
+// ----------------------------------------------------------------------
+// Determine if perturbation has a given parameter.
+bool
+pylith::faults::TractPerturbation::hasParameter(const char* name) const
+{ // hasParameter
+  if (0 == strcasecmp(name, "traction_initial_value"))
+    return (0 != _dbInitial);
+  else if (0 == strcasecmp(name, "traction_rate_of_change"))
+    return (0 != _dbRate);
+  else if (0 == strcasecmp(name, "traction_change_in_value"))
+    return (0 != _dbChange);
+  else if (0 == strcasecmp(name, "traction_rate_start_time"))
+    return (0 != _dbRate);
+  else if (0 == strcasecmp(name, "traction_change_start_time"))
+    return (0 != _dbChange);
+  else
+    return false;
+} // hasParameter
+
+// ----------------------------------------------------------------------
+// Get vertex field with traction perturbation information.
+const pylith::topology::Field<pylith::topology::SubMesh>&
+pylith::faults::TractPerturbation::vertexField(const char* name,
+					       const topology::SolutionFields* const fields)
+{ // vertexField
+  assert(_parameters);
+  assert(name);
+
+  if (0 == strcasecmp(name, "traction_initial_value"))
+    return _parameters->get("initial");
+
+  else if (0 == strcasecmp(name, "traction_rate_of_change"))
+    return _parameters->get("rate");
+
+  else if (0 == strcasecmp(name, "traction_change_in_value"))
+    return _parameters->get("change");
+
+  else if (0 == strcasecmp(name, "traction_rate_start_time"))
+    return _parameters->get("rate time");
+
+  else if (0 == strcasecmp(name, "traction_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>& coordsSection = sieveMesh->getRealSection("coordinates");
+  assert(!coordsSection.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) {
+    assert(spaceDim == coordsSection->getFiberDimension(*v_iter));
+    coordsSection->restrictPoint(*v_iter, &coordsVertexGlobal[0], coordsVertexGlobal.size());
+    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
+
+// End of file

Copied: short/3D/PyLith/trunk/libsrc/pylith/faults/TractPerturbation.hh (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/libsrc/pylith/faults/TractPerturbation.hh)
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/TractPerturbation.hh	                        (rev 0)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/TractPerturbation.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -0,0 +1,151 @@
+// -*- 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);
+
+  /** Get parameter fields.
+   *
+   * @returns Parameter fields.
+   */
+  const topology::FieldsNew<topology::SubMesh>* parameterFields(void) const;
+  
+  /** 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);
+
+  /** Calculate spatial and temporal variation of value.
+   *
+   * @param t Current time.
+   */
+  void calculate(const PylithScalar t);
+
+  /** Determine if perturbation has a given parameter.
+   *
+   * @param name Name of parameter field.
+   * @returns True if perturbation has parameter field, false otherwise.
+   */
+  bool hasParameter(const char* name) 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,
+	      const 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);
+
+// 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/trunk/libsrc/pylith/faults/faultsfwd.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/faultsfwd.hh	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/faultsfwd.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/libsrc/pylith/feassemble/ElasticityExplicit.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/feassemble/ElasticityExplicit.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/feassemble/ElasticityExplicit.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/libsrc/pylith/materials/DruckerPrager3D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/materials/DruckerPrager3D.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/materials/DruckerPrager3D.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -159,7 +159,7 @@
   _calcStressFn(0),
   _updateStateVarsFn(0)
 { // constructor
-  useElasticBehavior(true);
+  useElasticBehavior(false);
 } // constructor
 
 // ----------------------------------------------------------------------
@@ -1272,10 +1272,8 @@
 
     PylithScalar plasticMult = 0.0;
     if (_allowTensileYield) {
-      plasticMult = std::min(sqrt(2.0) * d,
-			     plasticFac *
-			     (meanStrainFac * meanStrainPPTpdt + dFac * d -
-			      beta));
+      plasticMult = std::min(PylithScalar(sqrt(2.0)*d), 
+			     plasticFac * (meanStrainFac * meanStrainPPTpdt + dFac * d - beta));
     } else {
       plasticMult = plasticFac *
 	(meanStrainFac * meanStrainPPTpdt + dFac * d - beta);

Modified: short/3D/PyLith/trunk/libsrc/pylith/materials/DruckerPrager3D.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/materials/DruckerPrager3D.hh	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/materials/DruckerPrager3D.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -465,31 +465,7 @@
 				     const PylithScalar* initialStrain,
 				     const int initialStrainSize);
 
-  /** Compute scalar product, assuming vector form of a tensor.
-   *
-   * @param tensor1 First tensor.
-   * @param tensor2 Second tensor.
-   */
-  /*
-  PylithScalar _scalarProduct(const PylithScalar* tensor1,
-			const PylithScalar* tensor2) const;
-  */
 
-  /** Compute tensor mean, assuming vector form of a tensor.
-   *
-   * @param vec Tensor represented as a vector.
-   */
-  PylithScalar _calcMean(const PylithScalar* vec) const;
-
-  /** Compute deviatoric components, assuming vector form of a tensor.
-   *
-   * @param vec Tensor represented as a vector.
-   * @param vecMean Tensor mean.
-   */
-  PylithScalar _calcDeviatoric(const PylithScalar* vec,
-			 const PylithScalar vecMean) const;
-
-
   // PRIVATE MEMBERS ////////////////////////////////////////////////////
 private :
 

Modified: short/3D/PyLith/trunk/libsrc/pylith/materials/DruckerPragerPlaneStrain.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/materials/DruckerPragerPlaneStrain.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/materials/DruckerPragerPlaneStrain.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -165,7 +165,7 @@
   _calcStressFn(0),
   _updateStateVarsFn(0)
 { // constructor
-  useElasticBehavior(true);
+  useElasticBehavior(false);
 } // constructor
 
 // ----------------------------------------------------------------------
@@ -1241,10 +1241,8 @@
 
     PylithScalar plasticMult =  0.0;
     if (_allowTensileYield) {
-      plasticMult = std::min(sqrt(2.0) * d,
-			     plasticFac *
-			     (meanStrainFac * meanStrainPPTpdt + dFac * d -
-			      beta));
+      plasticMult = std::min(PylithScalar(sqrt(2.0) * d),
+			     plasticFac * (meanStrainFac * meanStrainPPTpdt + dFac * d - beta));
     } else {
       plasticMult = plasticFac *
 	(meanStrainFac * meanStrainPPTpdt + dFac * d - beta);

Modified: short/3D/PyLith/trunk/libsrc/pylith/materials/DruckerPragerPlaneStrain.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/materials/DruckerPragerPlaneStrain.hh	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/materials/DruckerPragerPlaneStrain.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -465,31 +465,7 @@
 				     const PylithScalar* initialStrain,
 				     const int initialStrainSize);
 
-  /** Compute scalar product, assuming vector form of a tensor.
-   *
-   * @param tensor1 First tensor.
-   * @param tensor2 Second tensor.
-   */
-  /*
-  PylithScalar _scalarProduct(const PylithScalar* tensor1,
-			const PylithScalar* tensor2) const;
-  */
 
-  /** Compute tensor mean, assuming vector form of a tensor.
-   *
-   * @param vec Tensor represented as a vector.
-   */
-  PylithScalar _calcMean(const PylithScalar* vec) const;
-
-  /** Compute deviatoric components, assuming vector form of a tensor.
-   *
-   * @param vec Tensor represented as a vector.
-   * @param vecMean Tensor mean.
-   */
-  PylithScalar _calcDeviatoric(const PylithScalar* vec,
-			 const PylithScalar vecMean) const;
-
-
   // PRIVATE MEMBERS ////////////////////////////////////////////////////
 private :
 

Modified: short/3D/PyLith/trunk/libsrc/pylith/materials/GenMaxwellIsotropic3D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/materials/GenMaxwellIsotropic3D.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/materials/GenMaxwellIsotropic3D.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -199,7 +199,7 @@
   _calcStressFn(0),
   _updateStateVarsFn(0)  
 { // constructor
-  useElasticBehavior(true);
+  useElasticBehavior(false);
   _viscousStrain.resize(_GenMaxwellIsotropic3D::numMaxwellModels*_tensorSize);
 } // constructor
 

Modified: short/3D/PyLith/trunk/libsrc/pylith/materials/GenMaxwellPlaneStrain.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/materials/GenMaxwellPlaneStrain.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/materials/GenMaxwellPlaneStrain.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -194,7 +194,7 @@
   _calcStressFn(0),
   _updateStateVarsFn(0)  
 { // constructor
-  useElasticBehavior(true);
+  useElasticBehavior(false);
   _viscousStrain.resize(_GenMaxwellPlaneStrain::numMaxwellModels * 4);
 } // constructor
 

Modified: short/3D/PyLith/trunk/libsrc/pylith/materials/GenMaxwellQpQsIsotropic3D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/materials/GenMaxwellQpQsIsotropic3D.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/materials/GenMaxwellQpQsIsotropic3D.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -239,7 +239,7 @@
   _calcStressFn(0),
   _updateStateVarsFn(0)  
 { // constructor
-  useElasticBehavior(true);
+  useElasticBehavior(false);
   _viscousDevStrain.resize(_GenMaxwellQpQsIsotropic3D::numMaxwellModels*_tensorSize);
   _viscousMeanStrain.resize(_GenMaxwellQpQsIsotropic3D::numMaxwellModels);
 } // constructor

Modified: short/3D/PyLith/trunk/libsrc/pylith/materials/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/materials/Makefile.am	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/materials/Makefile.am	2012-06-25 17:37:03 UTC (rev 20406)
@@ -40,6 +40,8 @@
 	MaxwellPlaneStrain.icc \
 	PowerLaw3D.hh \
 	PowerLaw3D.icc \
+	PowerLawPlaneStrain.hh \
+	PowerLawPlaneStrain.icc \
 	DruckerPrager3D.hh \
 	DruckerPrager3D.icc \
 	DruckerPragerPlaneStrain.hh \

Modified: short/3D/PyLith/trunk/libsrc/pylith/materials/Material.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/materials/Material.hh	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/materials/Material.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -166,6 +166,13 @@
   /// current state.
   void resetNeedNewJacobian(void);
 
+  /** Set whether elastic or inelastic constitutive relations are used.
+   *
+   * @param flag True to use elastic, false to use inelastic.
+   */
+  virtual
+  void useElasticBehavior(const bool flag);
+
   /** Check whether material has a field as a property.
    *
    * @param name Name of field.

Modified: short/3D/PyLith/trunk/libsrc/pylith/materials/Material.icc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/materials/Material.icc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/materials/Material.icc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -113,6 +113,12 @@
   return _isJacobianSymmetric;
 } // isJacobianSymmetric
 
+// Set whether elastic or inelastic constitutive relations are used.
+inline
+void
+pylith::materials::Material::useElasticBehavior(const bool flag) {
+} // useElasticBehavior
+
 // Compute initial state variables from values in spatial database.
 inline
 void

Modified: short/3D/PyLith/trunk/libsrc/pylith/materials/MaxwellIsotropic3D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/materials/MaxwellIsotropic3D.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/materials/MaxwellIsotropic3D.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -146,7 +146,7 @@
   _calcStressFn(0),
   _updateStateVarsFn(0)
 { // constructor
-  useElasticBehavior(true);
+  useElasticBehavior(false);
   _viscousStrain.resize(_tensorSize);
 } // constructor
 

Modified: short/3D/PyLith/trunk/libsrc/pylith/materials/MaxwellPlaneStrain.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/materials/MaxwellPlaneStrain.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/materials/MaxwellPlaneStrain.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -149,7 +149,7 @@
   _calcStressFn(0),
   _updateStateVarsFn(0)
 { // constructor
-  useElasticBehavior(true);
+  useElasticBehavior(false);
   _viscousStrain.resize(4);
 } // constructor
 

Modified: short/3D/PyLith/trunk/libsrc/pylith/materials/PowerLaw3D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/materials/PowerLaw3D.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/materials/PowerLaw3D.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -168,7 +168,7 @@
   _calcStressFn(0),
   _updateStateVarsFn(0)
 { // constructor
-  useElasticBehavior(true);
+  useElasticBehavior(false);
 } // constructor
 
 // ----------------------------------------------------------------------
@@ -415,8 +415,7 @@
 			      stress[3],
 			      stress[4],
 			      stress[5] };
-  const PylithScalar devStressProd =
-    pylith::materials::ElasticMaterial::scalarProduct3D(devStress, devStress);
+  const PylithScalar devStressProd = scalarProduct3D(devStress, devStress);
   const PylithScalar effStress = sqrt(0.5 * devStressProd);
   PylithScalar dtTest = 0.0;
   if (effStress <= 0.0) {
@@ -524,7 +523,8 @@
   assert(0 != initialStrain);
   assert(_PowerLaw3D::tensorSize == initialStrainSize);
 
-  const int tensorSize = _tensorSize;
+  const int tensorSize = 6;
+  assert(_tensorSize == tensorSize);
     
   // We need to do root-finding method if state variables are from previous
   // time step.
@@ -535,23 +535,25 @@
     const PylithScalar referenceStrainRate = properties[p_referenceStrainRate];
     const PylithScalar referenceStress = properties[p_referenceStress];
     const PylithScalar powerLawExp = properties[p_powerLawExponent];
-    const PylithScalar visStrainT[] = {stateVars[s_viscousStrain],
-				 stateVars[s_viscousStrain + 1],
-				 stateVars[s_viscousStrain + 2],
-				 stateVars[s_viscousStrain + 3],
-				 stateVars[s_viscousStrain + 4],
-				 stateVars[s_viscousStrain + 5]};
-    const PylithScalar stressT[] = {stateVars[s_stress],
-			      stateVars[s_stress + 1],
-			      stateVars[s_stress + 2],
-			      stateVars[s_stress + 3],
-			      stateVars[s_stress + 4],
-			      stateVars[s_stress + 5]};
+    const PylithScalar visStrainT[tensorSize] = {
+      stateVars[s_viscousStrain],
+      stateVars[s_viscousStrain + 1],
+      stateVars[s_viscousStrain + 2],
+      stateVars[s_viscousStrain + 3],
+      stateVars[s_viscousStrain + 4],
+      stateVars[s_viscousStrain + 5]
+    };
+    const PylithScalar stressT[tensorSize] = {stateVars[s_stress],
+					      stateVars[s_stress + 1],
+					      stateVars[s_stress + 2],
+					      stateVars[s_stress + 3],
+					      stateVars[s_stress + 4],
+					      stateVars[s_stress + 5]};
 
     const PylithScalar mu2 = 2.0 * mu;
     const PylithScalar bulkModulus = lambda + mu2/3.0;
     const PylithScalar ae = 1.0/mu2;
-    const PylithScalar diag[] = { 1.0, 1.0, 1.0, 0.0, 0.0, 0.0 };
+    const PylithScalar diag[tensorSize] = { 1.0, 1.0, 1.0, 0.0, 0.0, 0.0 };
 
     // Need to figure out how time integration parameter alpha is going to be
     // specified.  It should probably be specified in the problem definition and
@@ -562,70 +564,66 @@
 
     // Initial stress values
     const PylithScalar meanStressInitial = (initialStress[0] +
-				      initialStress[1] +
-				      initialStress[2])/3.0;
-    const PylithScalar devStressInitial[] = { initialStress[0] - meanStressInitial,
-					initialStress[1] - meanStressInitial,
-					initialStress[2] - meanStressInitial,
-					initialStress[3],
-					initialStress[4],
-					initialStress[5] };
-    const PylithScalar stressInvar2Initial = 0.5 *
-      pylith::materials::ElasticMaterial::scalarProduct3D(devStressInitial,
-							  devStressInitial);
+					    initialStress[1] +
+					    initialStress[2])/3.0;
+    const PylithScalar devStressInitial[tensorSize] = {
+      initialStress[0] - meanStressInitial,
+      initialStress[1] - meanStressInitial,
+      initialStress[2] - meanStressInitial,
+      initialStress[3],
+      initialStress[4],
+      initialStress[5]
+    };
+    const PylithScalar stressInvar2Initial =
+      0.5 * scalarProduct3D(devStressInitial, devStressInitial);
 
     // Initial strain values
     const PylithScalar meanStrainInitial = (initialStrain[0] +
-				      initialStrain[1] +
-				      initialStrain[2])/3.0;
+					    initialStrain[1] +
+					    initialStrain[2])/3.0;
 
     // Values for current time step
     const PylithScalar e11 = totalStrain[0];
     const PylithScalar e22 = totalStrain[1];
     const PylithScalar e33 = totalStrain[2];
-    const PylithScalar meanStrainTpdt = (e11 + e22 + e33)/3.0 - meanStrainInitial;
+    const PylithScalar meanStrainTpdt = (e11 + e22 + e33)/3.0 -
+      meanStrainInitial;
     const PylithScalar meanStressTpdt = 3.0 * bulkModulus * meanStrainTpdt;
 
     // Note that I use the initial strain rather than the deviatoric initial
     // strain since otherwise the initial mean strain would get used twice.
-    const PylithScalar strainPPTpdt[] =
-      { totalStrain[0] - meanStrainTpdt - visStrainT[0] - initialStrain[0],
-	totalStrain[1] - meanStrainTpdt - visStrainT[1] - initialStrain[1],
-	totalStrain[2] - meanStrainTpdt - visStrainT[2] - initialStrain[2],
-	totalStrain[3] - visStrainT[3] - initialStrain[3],
-	totalStrain[4] - visStrainT[4] - initialStrain[4],
-	totalStrain[5] - visStrainT[5] - initialStrain[5] };
-    const PylithScalar strainPPInvar2Tpdt = 0.5 *
-      pylith::materials::ElasticMaterial::scalarProduct3D(strainPPTpdt,
-							  strainPPTpdt);
+    const PylithScalar strainPPTpdt[tensorSize] = {
+      totalStrain[0] - meanStrainTpdt - visStrainT[0] - initialStrain[0],
+      totalStrain[1] - meanStrainTpdt - visStrainT[1] - initialStrain[1],
+      totalStrain[2] - meanStrainTpdt - visStrainT[2] - initialStrain[2],
+      totalStrain[3] - visStrainT[3] - initialStrain[3],
+      totalStrain[4] - visStrainT[4] - initialStrain[4],
+      totalStrain[5] - visStrainT[5] - initialStrain[5]
+    };
+    const PylithScalar strainPPInvar2Tpdt =
+      0.5 * scalarProduct3D(strainPPTpdt, strainPPTpdt);
 
     // Values for previous time step
     const PylithScalar meanStressT = (stressT[0] +
-				stressT[1] +
-				stressT[2])/3.0;
-    const PylithScalar devStressT[] = { stressT[0] - meanStressT,
-				  stressT[1] - meanStressT,
-				  stressT[2] - meanStressT,
-				  stressT[3],
-				  stressT[4],
-				  stressT[5] };
-    const PylithScalar stressInvar2T = 0.5 *
-      pylith::materials::ElasticMaterial::scalarProduct3D(devStressT,
-							  devStressT);
+				      stressT[1] +
+				      stressT[2])/3.0;
+    const PylithScalar devStressT[tensorSize] = { stressT[0] - meanStressT,
+						  stressT[1] - meanStressT,
+						  stressT[2] - meanStressT,
+						  stressT[3],
+						  stressT[4],
+						  stressT[5] };
+    const PylithScalar stressInvar2T =
+      0.5 * scalarProduct3D(devStressT, devStressT);
     const PylithScalar effStressT = sqrt(stressInvar2T);
 
     // Finish defining parameters needed for root-finding algorithm.
     const PylithScalar b = strainPPInvar2Tpdt + ae *
-      pylith::materials::ElasticMaterial::scalarProduct3D(strainPPTpdt,
-							  devStressInitial) +
+      scalarProduct3D(strainPPTpdt, devStressInitial) +
       ae * ae * stressInvar2Initial;
     const PylithScalar c =
-      (pylith::materials::ElasticMaterial::scalarProduct3D(strainPPTpdt,
-							   devStressT) +
-       ae *
-       pylith::materials::ElasticMaterial::scalarProduct3D(devStressT,
-							   devStressInitial)) *
-      timeFac;
+      (scalarProduct3D(strainPPTpdt, devStressT) +
+       ae * scalarProduct3D(devStressT, devStressInitial)) * timeFac;
     const PylithScalar d = timeFac * effStressT;
 
     PetscLogFlops(92);
@@ -700,7 +698,8 @@
   const PylithScalar referenceStrainRate = _effStressParams.referenceStrainRate;
   const PylithScalar referenceStress = _effStressParams.referenceStress;
   const PylithScalar factor1 = 1.0-alpha;
-  const PylithScalar effStressTau = factor1 * effStressT + alpha * effStressTpdt;
+  const PylithScalar effStressTau = factor1 * effStressT +
+    alpha * effStressTpdt;
   const PylithScalar gammaTau = referenceStrainRate * 
     pow((effStressTau/referenceStress), (powerLawExp - 1.0))/referenceStress;
   const PylithScalar a = ae + alpha * dt * gammaTau;
@@ -728,11 +727,13 @@
   const PylithScalar referenceStrainRate = _effStressParams.referenceStrainRate;
   const PylithScalar referenceStress = _effStressParams.referenceStress;
   const PylithScalar factor1 = 1.0-alpha;
-  const PylithScalar effStressTau = factor1 * effStressT + alpha * effStressTpdt;
+  const PylithScalar effStressTau = factor1 * effStressT +
+    alpha * effStressTpdt;
   const PylithScalar gammaTau = referenceStrainRate *
     pow((effStressTau/referenceStress), (powerLawExp - 1.0))/referenceStress;
   const PylithScalar a = ae + alpha * dt * gammaTau;
-  const PylithScalar dGammaTau = referenceStrainRate * alpha * (powerLawExp - 1.0) *
+  const PylithScalar dGammaTau = referenceStrainRate * alpha *
+    (powerLawExp - 1.0) *
     pow((effStressTau/referenceStress), (powerLawExp - 2.0))/
     (referenceStress * referenceStress);
   const PylithScalar dy = 2.0 * a * a * effStressTpdt + dGammaTau *
@@ -765,10 +766,12 @@
   const PylithScalar referenceStrainRate = _effStressParams.referenceStrainRate;
   const PylithScalar referenceStress = _effStressParams.referenceStress;
   const PylithScalar factor1 = 1.0-alpha;
-  const PylithScalar effStressTau = factor1 * effStressT + alpha * effStressTpdt;
+  const PylithScalar effStressTau = factor1 * effStressT +
+    alpha * effStressTpdt;
   const PylithScalar gammaTau = referenceStrainRate *
     pow((effStressTau/referenceStress), (powerLawExp - 1.0))/referenceStress;
-  const PylithScalar dGammaTau = referenceStrainRate * alpha * (powerLawExp - 1.0) *
+  const PylithScalar dGammaTau = referenceStrainRate * alpha *
+    (powerLawExp - 1.0) *
     pow((effStressTau/referenceStress), (powerLawExp - 2.0))/
     (referenceStress * referenceStress);
   const PylithScalar a = ae + alpha * dt * gammaTau;
@@ -894,7 +897,8 @@
   assert(0 != initialStrain);
   assert(_PowerLaw3D::tensorSize == initialStrainSize);
 
-  const int tensorSize = _tensorSize;
+  const int tensorSize = 6;
+  assert(_tensorSize == tensorSize);
 
   const PylithScalar mu = properties[p_mu];
   const PylithScalar lambda = properties[p_lambda];
@@ -903,23 +907,23 @@
   const PylithScalar powerLawExp = properties[p_powerLawExponent];
     
   // State variables.
-  const PylithScalar visStrainT[] = {stateVars[s_viscousStrain],
-			       stateVars[s_viscousStrain + 1],
-			       stateVars[s_viscousStrain + 2],
-			       stateVars[s_viscousStrain + 3],
-			       stateVars[s_viscousStrain + 4],
-			       stateVars[s_viscousStrain + 5]};
-  const PylithScalar stressT[] = {stateVars[s_stress],
-			    stateVars[s_stress + 1],
-			    stateVars[s_stress + 2],
-			    stateVars[s_stress + 3],
-			    stateVars[s_stress + 4],
-			    stateVars[s_stress + 5]};
+  const PylithScalar visStrainT[tensorSize] = {stateVars[s_viscousStrain],
+					       stateVars[s_viscousStrain + 1],
+					       stateVars[s_viscousStrain + 2],
+					       stateVars[s_viscousStrain + 3],
+					       stateVars[s_viscousStrain + 4],
+					       stateVars[s_viscousStrain + 5]};
+  const PylithScalar stressT[tensorSize] = {stateVars[s_stress],
+					    stateVars[s_stress + 1],
+					    stateVars[s_stress + 2],
+					    stateVars[s_stress + 3],
+					    stateVars[s_stress + 4],
+					    stateVars[s_stress + 5]};
 
   const PylithScalar mu2 = 2.0 * mu;
   const PylithScalar bulkModulus = lambda + mu2/3.0;
   const PylithScalar ae = 1.0/mu2;
-  const PylithScalar diag[] = { 1.0, 1.0, 1.0, 0.0, 0.0, 0.0 };
+  const PylithScalar diag[tensorSize] = { 1.0, 1.0, 1.0, 0.0, 0.0, 0.0 };
     
   // Need to figure out how time integration parameter alpha is going to be
   // specified.  It should probably be specified in the problem definition and
@@ -932,22 +936,23 @@
   /// Initial state.
   // Initial stress values.
   const PylithScalar meanStressInitial = (initialStress[0] +
-				    initialStress[1] +
-				    initialStress[2])/3.0;
-  const PylithScalar devStressInitial[] = { initialStress[0] - meanStressInitial,
-				      initialStress[1] - meanStressInitial,
-				      initialStress[2] - meanStressInitial,
-				      initialStress[3],
-				      initialStress[4],
-				      initialStress[5] };
-  const PylithScalar stressInvar2Initial = 0.5 *
-    pylith::materials::ElasticMaterial::scalarProduct3D(devStressInitial,
-							devStressInitial);
+					  initialStress[1] +
+					  initialStress[2])/3.0;
+  const PylithScalar devStressInitial[tensorSize] = {
+    initialStress[0] - meanStressInitial,
+    initialStress[1] - meanStressInitial,
+    initialStress[2] - meanStressInitial,
+    initialStress[3],
+    initialStress[4],
+    initialStress[5]
+  };
+  const PylithScalar stressInvar2Initial =
+    0.5 * scalarProduct3D(devStressInitial, devStressInitial);
 
   // Initial strain values.
   const PylithScalar meanStrainInitial = (initialStrain[0] +
-				    initialStrain[1] +
-				    initialStrain[2])/3.0;
+					  initialStrain[1] +
+					  initialStrain[2])/3.0;
   
   /// Values for current time step
   const PylithScalar e11 = totalStrain[0];
@@ -959,41 +964,36 @@
   // Note that I use the initial strain rather than the deviatoric initial
   // strain since otherwise the initial mean strain would get used twice.
   
-  const PylithScalar strainPPTpdt[] =
-    { totalStrain[0] - meanStrainTpdt - visStrainT[0] - initialStrain[0],
-      totalStrain[1] - meanStrainTpdt - visStrainT[1] - initialStrain[1],
-      totalStrain[2] - meanStrainTpdt - visStrainT[2] - initialStrain[2],
-      totalStrain[3] - visStrainT[3] - initialStrain[3],
-      totalStrain[4] - visStrainT[4] - initialStrain[4],
-      totalStrain[5] - visStrainT[5] - initialStrain[5] };
-  const PylithScalar strainPPInvar2Tpdt = 0.5 *
-    pylith::materials::ElasticMaterial::scalarProduct3D(strainPPTpdt,
-							strainPPTpdt);
+  const PylithScalar strainPPTpdt[tensorSize] = {
+    totalStrain[0] - meanStrainTpdt - visStrainT[0] - initialStrain[0],
+    totalStrain[1] - meanStrainTpdt - visStrainT[1] - initialStrain[1],
+    totalStrain[2] - meanStrainTpdt - visStrainT[2] - initialStrain[2],
+    totalStrain[3] - visStrainT[3] - initialStrain[3],
+    totalStrain[4] - visStrainT[4] - initialStrain[4],
+    totalStrain[5] - visStrainT[5] - initialStrain[5]
+  };
+  const PylithScalar strainPPInvar2Tpdt =
+    0.5 * scalarProduct3D(strainPPTpdt, strainPPTpdt);
   
   // Values for previous time step
   const PylithScalar meanStressT = (stressT[0] + stressT[1] + stressT[2])/3.0;
-  const PylithScalar devStressT[] = { stressT[0] - meanStressT,
-				stressT[1] - meanStressT,
-				stressT[2] - meanStressT,
-				stressT[3],
-				stressT[4],
-				stressT[5] };
-  const PylithScalar stressInvar2T = 0.5 *
-    pylith::materials::ElasticMaterial::scalarProduct3D(devStressT, devStressT);
+  const PylithScalar devStressT[tensorSize] = { stressT[0] - meanStressT,
+						stressT[1] - meanStressT,
+						stressT[2] - meanStressT,
+						stressT[3],
+						stressT[4],
+						stressT[5] };
+  const PylithScalar stressInvar2T =
+    0.5 * scalarProduct3D(devStressT, devStressT);
   const PylithScalar effStressT = sqrt(stressInvar2T);
     
   // Finish defining parameters needed for root-finding algorithm.
   const PylithScalar b = strainPPInvar2Tpdt +
-    ae * pylith::materials::ElasticMaterial::scalarProduct3D(strainPPTpdt,
-							     devStressInitial) +
+    ae * scalarProduct3D(strainPPTpdt, devStressInitial) +
     ae * ae * stressInvar2Initial;
   const PylithScalar c =
-    (pylith::materials::ElasticMaterial::scalarProduct3D(strainPPTpdt,
-							 devStressT) +
-     ae *
-     pylith::materials::ElasticMaterial::scalarProduct3D(devStressT,
-							 devStressInitial)) *
-    timeFac;
+    (scalarProduct3D(strainPPTpdt, devStressT) +
+     ae * scalarProduct3D(devStressT, devStressInitial)) * timeFac;
   const PylithScalar d = timeFac * effStressT;
 
   PetscLogFlops(92);
@@ -1045,7 +1045,7 @@
     const PylithScalar a = ae + alpha * _dt * gammaTau;
     const PylithScalar factor1 = 1.0/a;
     const PylithScalar factor2 = timeFac * gammaTau;
-    const PylithScalar devStressTpdt[] = {
+    const PylithScalar devStressTpdt[tensorSize] = {
       factor1 *
       (strainPPTpdt[0] - factor2 * devStressT[0] + ae * devStressInitial[0]),
       factor1 *
@@ -1057,14 +1057,16 @@
       factor1 *
       (strainPPTpdt[4] - factor2 * devStressT[4] + ae * devStressInitial[4]),
       factor1 *
-      (strainPPTpdt[5] - factor2 * devStressT[5] + ae * devStressInitial[5])};
-    const PylithScalar devStressTau[] = {
+      (strainPPTpdt[5] - factor2 * devStressT[5] + ae * devStressInitial[5])
+    };
+    const PylithScalar devStressTau[tensorSize] = {
       alpha * devStressT[0] + explicitFac * devStressTpdt[0],
       alpha * devStressT[1] + explicitFac * devStressTpdt[1],
       alpha * devStressT[2] + explicitFac * devStressTpdt[2],
       alpha * devStressT[3] + explicitFac * devStressTpdt[3],
       alpha * devStressT[4] + explicitFac * devStressTpdt[4],
-      alpha * devStressT[5] + explicitFac * devStressTpdt[5]};
+      alpha * devStressT[5] + explicitFac * devStressTpdt[5]
+    };
     const PylithScalar factor3 = 0.5 * referenceStrainRate * _dt * alpha *
       (powerLawExp - 1.0) *
       pow((effStressTau/referenceStress), (powerLawExp - 2.0))/
@@ -1152,8 +1154,11 @@
   assert(0 != initialStrain);
   assert(_PowerLaw3D::tensorSize == initialStrainSize);
 
+  const int tensorSize = 6;
+  assert(_tensorSize == tensorSize);
+
   const bool computeStateVars = true;
-  PylithScalar stress[] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
+  PylithScalar stress[tensorSize] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
   const int stressSize = strainSize;
   _calcStressElastic(stress, stressSize,
 		     properties, numProperties,
@@ -1163,7 +1168,7 @@
 		     initialStrain, initialStrainSize,
 		     computeStateVars);
 
-  for (int iComp=0; iComp < _tensorSize; ++iComp) {
+  for (int iComp=0; iComp < tensorSize; ++iComp) {
     stateVars[s_viscousStrain+iComp] = 0.0;
     stateVars[s_stress+iComp] = stress[iComp];
   } // for
@@ -1199,6 +1204,9 @@
 
   const int stressSize = _tensorSize;
 
+  const int tensorSize = 6;
+  assert(_tensorSize == tensorSize);
+
   // For now, we are duplicating the functionality of _calcStressViscoelastic,
   // since otherwise we would have to redo a lot of calculations.
   const PylithScalar mu = properties[p_mu];
@@ -1207,24 +1215,24 @@
   const PylithScalar referenceStress = properties[p_referenceStress];
   const PylithScalar powerLawExp = properties[p_powerLawExponent];
 
-  const PylithScalar visStrainT[] = {stateVars[s_viscousStrain],
-			       stateVars[s_viscousStrain + 1],
-			       stateVars[s_viscousStrain + 2],
-			       stateVars[s_viscousStrain + 3],
-			       stateVars[s_viscousStrain + 4],
-			       stateVars[s_viscousStrain + 5]};
+  const PylithScalar visStrainT[tensorSize] = {stateVars[s_viscousStrain],
+					       stateVars[s_viscousStrain + 1],
+					       stateVars[s_viscousStrain + 2],
+					       stateVars[s_viscousStrain + 3],
+					       stateVars[s_viscousStrain + 4],
+					       stateVars[s_viscousStrain + 5]};
 
-  const PylithScalar stressT[] = {stateVars[s_stress],
-			    stateVars[s_stress + 1],
-			    stateVars[s_stress + 2],
-			    stateVars[s_stress + 3],
-			    stateVars[s_stress + 4],
-			    stateVars[s_stress + 5]};
+  const PylithScalar stressT[tensorSize] = {stateVars[s_stress],
+					    stateVars[s_stress + 1],
+					    stateVars[s_stress + 2],
+					    stateVars[s_stress + 3],
+					    stateVars[s_stress + 4],
+					    stateVars[s_stress + 5]};
   
   const PylithScalar mu2 = 2.0 * mu;
   const PylithScalar bulkModulus = lambda + mu2/3.0;
   const PylithScalar ae = 1.0/mu2;
-  const PylithScalar diag[] = { 1.0, 1.0, 1.0, 0.0, 0.0, 0.0 };
+  const PylithScalar diag[tensorSize] = { 1.0, 1.0, 1.0, 0.0, 0.0, 0.0 };
 
   // Need to figure out how time integration parameter alpha is going to be
   // specified.  It should probably be specified in the problem definition and
@@ -1235,20 +1243,21 @@
 
   // Initial stress values
   const PylithScalar meanStressInitial = (initialStress[0] + initialStress[1] +
-				    initialStress[2])/3.0;
-  const PylithScalar devStressInitial[] = { initialStress[0] - meanStressInitial,
-				      initialStress[1] - meanStressInitial,
-				      initialStress[2] - meanStressInitial,
-				      initialStress[3],
-				      initialStress[4],
-				      initialStress[5] };
-  const PylithScalar stressInvar2Initial = 0.5 *
-    pylith::materials::ElasticMaterial::scalarProduct3D(devStressInitial,
-							devStressInitial);
+					  initialStress[2])/3.0;
+  const PylithScalar devStressInitial[tensorSize] = {
+    initialStress[0] - meanStressInitial,
+    initialStress[1] - meanStressInitial,
+    initialStress[2] - meanStressInitial,
+    initialStress[3],
+    initialStress[4],
+    initialStress[5]
+  };
+  const PylithScalar stressInvar2Initial =
+    0.5 * scalarProduct3D(devStressInitial, devStressInitial);
 
   // Initial strain values
   const PylithScalar meanStrainInitial = (initialStrain[0] + initialStrain[1] +
-				    initialStrain[2])/3.0;
+					  initialStrain[2])/3.0;
   
   // Values for current time step
   const PylithScalar e11 = totalStrain[0];
@@ -1259,42 +1268,36 @@
 
   // Note that I use the initial strain rather than the deviatoric initial
   // strain since otherwise the initial mean strain would get used twice.
-  const PylithScalar strainPPTpdt[] =
-    { totalStrain[0] - meanStrainTpdt - visStrainT[0] - initialStrain[0],
-      totalStrain[1] - meanStrainTpdt - visStrainT[1] - initialStrain[1],
-      totalStrain[2] - meanStrainTpdt - visStrainT[2] - initialStrain[2],
-      totalStrain[3] - visStrainT[3] - initialStrain[3],
-      totalStrain[4] - visStrainT[4] - initialStrain[4],
-      totalStrain[5] - visStrainT[5] - initialStrain[5] };
-  const PylithScalar strainPPInvar2Tpdt = 0.5 *
-    pylith::materials::ElasticMaterial::scalarProduct3D(strainPPTpdt,
-							strainPPTpdt);
+  const PylithScalar strainPPTpdt[tensorSize] = {
+    totalStrain[0] - meanStrainTpdt - visStrainT[0] - initialStrain[0],
+    totalStrain[1] - meanStrainTpdt - visStrainT[1] - initialStrain[1],
+    totalStrain[2] - meanStrainTpdt - visStrainT[2] - initialStrain[2],
+    totalStrain[3] - visStrainT[3] - initialStrain[3],
+    totalStrain[4] - visStrainT[4] - initialStrain[4],
+    totalStrain[5] - visStrainT[5] - initialStrain[5]
+  };
+  const PylithScalar strainPPInvar2Tpdt =
+    0.5 * scalarProduct3D(strainPPTpdt, strainPPTpdt);
 
   // Values for previous time step
   const PylithScalar meanStressT = (stressT[0] + stressT[1] + stressT[2])/3.0;
-  const PylithScalar devStressT[] = { stressT[0] - meanStressT,
-				stressT[1] - meanStressT,
-				stressT[2] - meanStressT,
-				stressT[3],
-				stressT[4],
-				stressT[5] };
-  const PylithScalar stressInvar2T = 0.5 *
-    pylith::materials::ElasticMaterial::scalarProduct3D(devStressT,
-							devStressT);
+  const PylithScalar devStressT[tensorSize] = { stressT[0] - meanStressT,
+						stressT[1] - meanStressT,
+						stressT[2] - meanStressT,
+						stressT[3],
+						stressT[4],
+						stressT[5] };
+  const PylithScalar stressInvar2T =
+    0.5 * scalarProduct3D(devStressT, devStressT);
   const PylithScalar effStressT = sqrt(stressInvar2T);
 
   // Finish defining parameters needed for root-finding algorithm.
   const PylithScalar b = strainPPInvar2Tpdt +
-    ae * pylith::materials::ElasticMaterial::scalarProduct3D(strainPPTpdt,
-							     devStressInitial) +
+    ae * scalarProduct3D(strainPPTpdt, devStressInitial) +
     ae * ae * stressInvar2Initial;
   const PylithScalar c =
-    (pylith::materials::ElasticMaterial::scalarProduct3D(strainPPTpdt,
-							 devStressT) +
-     ae *
-     pylith::materials::ElasticMaterial::scalarProduct3D(devStressT,
-							 devStressInitial)) *
-    timeFac;
+    (scalarProduct3D(strainPPTpdt, devStressT) +
+     ae * scalarProduct3D(devStressT, devStressInitial)) * timeFac;
   const PylithScalar d = timeFac * effStressT;
   PetscLogFlops(92);
 
@@ -1337,7 +1340,7 @@
   PylithScalar devStressTau = 0.0;
   PylithScalar deltaVisStrain = 0.0;
 
-  for (int iComp=0; iComp < _tensorSize; ++iComp) {
+  for (int iComp=0; iComp < tensorSize; ++iComp) {
     devStressTpdt = factor1 *
       (strainPPTpdt[iComp] - factor2 * devStressT[iComp] +
        ae * devStressInitial[iComp]);

Modified: short/3D/PyLith/trunk/libsrc/pylith/materials/PowerLaw3D.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/materials/PowerLaw3D.hh	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/materials/PowerLaw3D.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -469,13 +469,6 @@
 				    const PylithScalar* initialStrain,
 				    const int initialStrainSize);
 
-  /** Compute scalar product, assuming vector form of a tensor.
-   *
-   * @param tensor1 First tensor.
-   * @param tensor2 Second tensor.
-   */
-  PylithScalar _scalarProduct(const PylithScalar* tensor1,
-			const PylithScalar* tensor2) const;
 
   // PRIVATE STRUCTS ////////////////////////////////////////////////////
 private :

Copied: short/3D/PyLith/trunk/libsrc/pylith/materials/PowerLawPlaneStrain.cc (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/libsrc/pylith/materials/PowerLawPlaneStrain.cc)
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/materials/PowerLawPlaneStrain.cc	                        (rev 0)
+++ short/3D/PyLith/trunk/libsrc/pylith/materials/PowerLawPlaneStrain.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -0,0 +1,1267 @@
+// -*- 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 "PowerLawPlaneStrain.hh" // implementation of object methods
+
+#include "Metadata.hh" // USES Metadata
+#include "EffectiveStress.hh" // USES EffectiveStress
+
+#include "pylith/utils/array.hh" // USES scalar_array
+#include "pylith/utils/constdefs.h" // USES PYLITH_MAXSCALAR
+
+#include "spatialdata/units/Nondimensional.hh" // USES Nondimensional
+
+#include "petsc.h" // USES PetscLogFlops
+
+#include <cmath> // USES fabs()
+#include <cassert> // USES assert()
+#include <cstring> // USES memcpy()
+#include <sstream> // USES std::ostringstream
+#include <iostream> // USES std::cout
+#include <stdexcept> // USES std::runtime_error
+
+// ----------------------------------------------------------------------
+namespace pylith {
+  namespace materials {
+    namespace _PowerLawPlaneStrain{
+
+      /// Dimension of material.
+      const int dimension = 2;
+
+      /// Number of entries in stress/strain tensors.
+      const int tensorSize = 3;
+
+      /// Number of entries in derivative of elasticity matrix.
+      const int numElasticConsts = 9;
+
+      /// Number of physical properties.
+      const int numProperties = 6;
+
+      /// Physical properties.
+      const Metadata::ParamDescription properties[6] = {
+	{ "density", 1, pylith::topology::FieldBase::SCALAR },
+	{ "mu", 1, pylith::topology::FieldBase::SCALAR },
+	{ "lambda", 1, pylith::topology::FieldBase::SCALAR },
+	{ "reference_strain_rate", 1, pylith::topology::FieldBase::SCALAR },
+	{ "reference_stress", 1, pylith::topology::FieldBase::SCALAR },
+	{ "power_law_exponent", 1, pylith::topology::FieldBase::SCALAR }
+      };
+
+      // Values expected in properties spatial database
+      const int numDBProperties = 6;
+      const char* dbProperties[6] = {"density", "vs", "vp" ,
+				     "reference-strain-rate",
+				     "reference-stress",
+				     "power-law-exponent"};
+
+      /// Number of state variables.
+      const int numStateVars = 3;
+
+      /// State variables.
+      const Metadata::ParamDescription stateVars[3] = {
+	{ "stress_zz_initial", 1, pylith::topology::FieldBase::SCALAR },
+	{ "viscous_strain", 4, pylith::topology::FieldBase::OTHER },
+	{ "stress4", 4, pylith::topology::FieldBase::OTHER }
+      };
+
+      // Values expected in state variables spatial database.
+      const int numDBStateVars = 9;
+      const char* dbStateVars[9] = { "stress-zz-initial",
+				     "viscous-strain-xx",
+				     "viscous-strain-yy",
+				     "viscous-strain-zz",
+				     "viscous-strain-xy",
+				     "stress4-xx",
+				     "stress4-yy",
+				     "stress4-zz",
+				     "stress4-xy"
+      };
+
+    } // _PowerLawPlaneStrain
+  } // materials
+} // pylith
+
+// Indices of physical properties.
+const int pylith::materials::PowerLawPlaneStrain::p_density = 0;
+
+const int pylith::materials::PowerLawPlaneStrain::p_mu = 
+  pylith::materials::PowerLawPlaneStrain::p_density + 1;
+
+const int pylith::materials::PowerLawPlaneStrain::p_lambda = 
+  pylith::materials::PowerLawPlaneStrain::p_mu + 1;
+
+const int pylith::materials::PowerLawPlaneStrain::p_referenceStrainRate = 
+  pylith::materials::PowerLawPlaneStrain::p_lambda + 1;
+
+const int pylith::materials::PowerLawPlaneStrain::p_referenceStress = 
+  pylith::materials::PowerLawPlaneStrain::p_referenceStrainRate + 1;
+
+const int pylith::materials::PowerLawPlaneStrain::p_powerLawExponent = 
+  pylith::materials::PowerLawPlaneStrain::p_referenceStress + 1;
+
+// Indices of property database values (order must match dbProperties).
+const int pylith::materials::PowerLawPlaneStrain::db_density = 0;
+
+const int pylith::materials::PowerLawPlaneStrain::db_vs = 
+  pylith::materials::PowerLawPlaneStrain::db_density + 1;
+
+const int pylith::materials::PowerLawPlaneStrain::db_vp = 
+  pylith::materials::PowerLawPlaneStrain::db_vs + 1;
+
+const int pylith::materials::PowerLawPlaneStrain::db_referenceStrainRate = 
+  pylith::materials::PowerLawPlaneStrain::db_vp + 1;
+
+const int pylith::materials::PowerLawPlaneStrain::db_referenceStress = 
+  pylith::materials::PowerLawPlaneStrain::db_referenceStrainRate + 1;
+
+const int pylith::materials::PowerLawPlaneStrain::db_powerLawExponent = 
+  pylith::materials::PowerLawPlaneStrain::db_referenceStress + 1;
+
+// Indices of state variables.
+const int pylith::materials::PowerLawPlaneStrain::s_stressZZInitial = 0;
+
+const int pylith::materials::PowerLawPlaneStrain::s_viscousStrain =
+  s_stressZZInitial + 1;
+
+const int pylith::materials::PowerLawPlaneStrain::s_stress4 = 
+  pylith::materials::PowerLawPlaneStrain::s_viscousStrain + 4;
+
+// Indices of state variable database values (order must match dbStateVars).
+const int pylith::materials::PowerLawPlaneStrain::db_stressZZInitial = 0;
+
+const int pylith::materials::PowerLawPlaneStrain::db_viscousStrain =
+  db_stressZZInitial + 1;
+
+const int pylith::materials::PowerLawPlaneStrain::db_stress4 = 
+  pylith::materials::PowerLawPlaneStrain::db_viscousStrain + 4;
+
+// ----------------------------------------------------------------------
+// Default constructor.
+pylith::materials::PowerLawPlaneStrain::PowerLawPlaneStrain(void) :
+  ElasticMaterial(_PowerLawPlaneStrain::dimension,
+		  _PowerLawPlaneStrain::tensorSize,
+		  _PowerLawPlaneStrain::numElasticConsts,
+		  Metadata(_PowerLawPlaneStrain::properties,
+			   _PowerLawPlaneStrain::numProperties,
+			   _PowerLawPlaneStrain::dbProperties,
+			   _PowerLawPlaneStrain::numDBProperties,
+			   _PowerLawPlaneStrain::stateVars,
+			   _PowerLawPlaneStrain::numStateVars,
+			   _PowerLawPlaneStrain::dbStateVars,
+			   _PowerLawPlaneStrain::numDBStateVars)),
+  _calcElasticConstsFn(0),
+  _calcStressFn(0),
+  _updateStateVarsFn(0)
+{ // constructor
+  useElasticBehavior(false);
+} // constructor
+
+// ----------------------------------------------------------------------
+// Destructor.
+pylith::materials::PowerLawPlaneStrain::~PowerLawPlaneStrain(void)
+{ // destructor
+} // destructor
+
+// ----------------------------------------------------------------------
+// Set whether elastic or inelastic constitutive relations are used.
+void
+pylith::materials::PowerLawPlaneStrain::useElasticBehavior(const bool flag)
+{ // useElasticBehavior
+  if (flag) {
+    _calcStressFn = 
+      &pylith::materials::PowerLawPlaneStrain::_calcStressElastic;
+    _calcElasticConstsFn = 
+      &pylith::materials::PowerLawPlaneStrain::_calcElasticConstsElastic;
+    _updateStateVarsFn = 
+      &pylith::materials::PowerLawPlaneStrain::_updateStateVarsElastic;
+
+  } else {
+    _calcStressFn = 
+      &pylith::materials::PowerLawPlaneStrain::_calcStressViscoelastic;
+    _calcElasticConstsFn = 
+      &pylith::materials::PowerLawPlaneStrain::_calcElasticConstsViscoelastic;
+    _updateStateVarsFn = 
+      &pylith::materials::PowerLawPlaneStrain::_updateStateVarsViscoelastic;
+  } // if/else
+} // useElasticBehavior
+
+// ----------------------------------------------------------------------
+// Compute properties from values in spatial database.
+void
+pylith::materials::PowerLawPlaneStrain::_dbToProperties(
+				PylithScalar* const propValues,
+				const scalar_array& dbValues)
+{ // _dbToProperties
+  assert(0 != propValues);
+  const int numDBValues = dbValues.size();
+  assert(_PowerLawPlaneStrain::numDBProperties == numDBValues);
+
+  const PylithScalar density = dbValues[db_density];
+  const PylithScalar vs = dbValues[db_vs];
+  const PylithScalar vp = dbValues[db_vp];
+  const PylithScalar referenceStrainRate = dbValues[db_referenceStrainRate];
+  const PylithScalar referenceStress = dbValues[db_referenceStress];
+  const PylithScalar powerLawExponent = dbValues[db_powerLawExponent];
+ 
+  if (density <= 0.0 || vs <= 0.0 || vp <= 0.0 || referenceStrainRate <= 0.0
+      || referenceStress <= 0.0 || powerLawExponent < 1.0) {
+    std::ostringstream msg;
+    msg << "Spatial database returned illegal value for physical "
+	<< "properties.\n"
+	<< "density: " << density << "\n"
+	<< "vp: " << vp << "\n"
+	<< "vs: " << vs << "\n"
+	<< "referenceStrainRate: " << referenceStrainRate << "\n"
+	<< "referenceStress: " << referenceStress << "\n"
+	<< "powerLawExponent: " << powerLawExponent << "\n";
+    throw std::runtime_error(msg.str());
+  } // if
+
+  const PylithScalar mu = density * vs * vs;
+  const PylithScalar lambda = density * vp * vp - 2.0 * mu;
+
+  if (lambda <= 0.0) {
+    std::ostringstream msg;
+    msg << "Attempted to set Lame's constant lambda to nonpositive value.\n"
+	<< "density: " << density << "\n"
+	<< "vp: " << vp << "\n"
+	<< "vs: " << vs << "\n";
+    throw std::runtime_error(msg.str());
+  } // if
+  assert(mu > 0);
+
+  propValues[p_density] = density;
+  propValues[p_mu] = mu;
+  propValues[p_lambda] = lambda;
+  propValues[p_referenceStrainRate] = referenceStrainRate;
+  propValues[p_referenceStress] = referenceStress;
+  propValues[p_powerLawExponent] = powerLawExponent;
+
+  PetscLogFlops(6);
+} // _dbToProperties
+
+// ----------------------------------------------------------------------
+// Nondimensionalize properties.
+void
+pylith::materials::PowerLawPlaneStrain::_nondimProperties(PylithScalar* const values,
+					         const int nvalues) const
+{ // _nondimProperties
+  assert(0 != _normalizer);
+  assert(0 != values);
+  assert(nvalues == _numPropsQuadPt);
+
+  const PylithScalar densityScale = _normalizer->densityScale();
+  const PylithScalar pressureScale = _normalizer->pressureScale();
+  const PylithScalar timeScale = _normalizer->timeScale();
+  const PylithScalar strainRateScale = 1.0/timeScale;
+
+  values[p_density] = 
+    _normalizer->nondimensionalize(values[p_density], densityScale);
+  values[p_mu] = 
+    _normalizer->nondimensionalize(values[p_mu], pressureScale);
+  values[p_lambda] = 
+    _normalizer->nondimensionalize(values[p_lambda], pressureScale);
+  values[p_referenceStrainRate] = 
+    _normalizer->nondimensionalize(values[p_referenceStrainRate],
+				   strainRateScale);
+  values[p_referenceStress] = 
+    _normalizer->nondimensionalize(values[p_referenceStress], pressureScale);
+
+  PetscLogFlops(6);
+} // _nondimProperties
+
+// ----------------------------------------------------------------------
+// Dimensionalize properties.
+void
+pylith::materials::PowerLawPlaneStrain::_dimProperties(PylithScalar* const values,
+						      const int nvalues) const
+{ // _dimProperties
+  assert(0 != _normalizer);
+  assert(0 != values);
+  assert(nvalues == _numPropsQuadPt);
+
+  const PylithScalar densityScale = _normalizer->densityScale();
+  const PylithScalar pressureScale = _normalizer->pressureScale();
+  const PylithScalar timeScale = _normalizer->timeScale();
+  const PylithScalar strainRateScale = 1.0/timeScale;
+
+  values[p_density] = 
+    _normalizer->dimensionalize(values[p_density], densityScale);
+  values[p_mu] = 
+    _normalizer->dimensionalize(values[p_mu], pressureScale);
+  values[p_lambda] = 
+    _normalizer->dimensionalize(values[p_lambda], pressureScale);
+  values[p_referenceStrainRate] = 
+    _normalizer->dimensionalize(values[p_referenceStrainRate], strainRateScale);
+  values[p_referenceStress] = 
+    _normalizer->dimensionalize(values[p_referenceStress], pressureScale);
+
+  PetscLogFlops(6);
+} // _dimProperties
+
+// ----------------------------------------------------------------------
+// Compute initial state variables from values in spatial database.
+void
+pylith::materials::PowerLawPlaneStrain::_dbToStateVars(
+				PylithScalar* const stateValues,
+				const scalar_array& dbValues)
+{ // _dbToStateVars
+  assert(0 != stateValues);
+  const int numDBValues = dbValues.size();
+  assert(_PowerLawPlaneStrain::numDBStateVars == numDBValues);
+
+  const int totalSize = 1  + 2 * 4;
+  assert(totalSize == _numVarsQuadPt);
+  assert(totalSize == numDBValues);
+  memcpy(stateValues, &dbValues[0], totalSize*sizeof(PylithScalar));
+
+  PetscLogFlops(0);
+} // _dbToStateVars
+
+// ----------------------------------------------------------------------
+// Nondimensionalize state variables.
+void
+pylith::materials::PowerLawPlaneStrain::_nondimStateVars(PylithScalar* const values,
+						const int nvalues) const
+{ // _nondimStateVars
+  assert(0 != _normalizer);
+  assert(0 != values);
+  assert(nvalues == _numVarsQuadPt);
+
+  const PylithScalar pressureScale = _normalizer->pressureScale();
+  _normalizer->nondimensionalize(&values[s_stress4], 4, pressureScale);
+  _normalizer->nondimensionalize(&values[s_stressZZInitial], 1, pressureScale);
+
+  PetscLogFlops(5);
+} // _nondimStateVars
+
+// ----------------------------------------------------------------------
+// Dimensionalize state variables.
+void
+pylith::materials::PowerLawPlaneStrain::_dimStateVars(PylithScalar* const values,
+					     const int nvalues) const
+{ // _dimStateVars
+  assert(0 != _normalizer);
+  assert(0 != values);
+  assert(nvalues == _numVarsQuadPt);
+
+  const PylithScalar pressureScale = _normalizer->pressureScale();
+  _normalizer->dimensionalize(&values[s_stress4], 4, pressureScale);
+  _normalizer->dimensionalize(&values[s_stressZZInitial], 1, pressureScale);
+
+  PetscLogFlops(_tensorSize);
+} // _dimStateVars
+
+// ----------------------------------------------------------------------
+// Compute density at location from properties.
+void
+pylith::materials::PowerLawPlaneStrain::_calcDensity(PylithScalar* const density,
+					    const PylithScalar* properties,
+					    const int numProperties,
+					    const PylithScalar* stateVars,
+					    const int numStateVars)
+{ // _calcDensity
+  assert(0 != density);
+  assert(0 != properties);
+  assert(_numPropsQuadPt == numProperties);
+
+  density[0] = properties[p_density];
+} // _calcDensity
+
+// ----------------------------------------------------------------------
+// Get stable time step for implicit time integration.
+PylithScalar
+pylith::materials::PowerLawPlaneStrain::_stableTimeStepImplicit(
+				  const PylithScalar* properties,
+				  const int numProperties,
+				  const PylithScalar* stateVars,
+				  const int numStateVars) const
+{ // _stableTimeStepImplicit
+  assert(0 != properties);
+  assert(_numPropsQuadPt == numProperties);
+  assert(0 != stateVars);
+  assert(_numVarsQuadPt == numStateVars);
+
+  const int tensorSizePS = 4;
+
+  const PylithScalar mu = properties[p_mu];
+  const PylithScalar referenceStrainRate = properties[p_referenceStrainRate];
+  const PylithScalar referenceStress = properties[p_referenceStress];
+  const PylithScalar powerLawExp = properties[p_powerLawExponent];
+
+  const PylithScalar stress4[tensorSizePS] = {stateVars[s_stress4],
+					      stateVars[s_stress4 + 1],
+					      stateVars[s_stress4 + 2],
+					      stateVars[s_stress4 + 3]};
+  const PylithScalar meanStress = (stress4[0] + stress4[1] + stress4[2])/3.0;
+  const PylithScalar devStress[tensorSizePS] = {stress4[0] - meanStress,
+						stress4[1] - meanStress,
+						stress4[2] - meanStress,
+						stress4[3]};
+  const PylithScalar devStressProd = scalarProduct2DPS(devStress, devStress);
+  const PylithScalar effStress = sqrt(0.5 * devStressProd);
+  PylithScalar dtTest = 0.0;
+  if (effStress <= 0.0) {
+    dtTest = pylith::PYLITH_MAXSCALAR;
+  } else {
+    dtTest = 0.05 *
+    pow((referenceStress/effStress), (powerLawExp - 1.0)) *
+    (referenceStress/mu)/referenceStrainRate;
+  } //else
+  const PylithScalar dtStable = dtTest;
+
+#if 0 // DEBUGGING
+  PylithScalar maxwellTime = 10.0 * dtStable;
+  std::cout << "Maxwell time:  " << maxwellTime << std::endl;
+#endif
+  PetscLogFlops(22);
+  return dtStable;
+} // _stableTimeStepImplicit
+
+// ----------------------------------------------------------------------
+// Compute stress tensor at location from properties as an elastic
+// material.
+void
+pylith::materials::PowerLawPlaneStrain::_calcStressElastic(
+				         PylithScalar* const stress,
+					 const int stressSize,
+					 const PylithScalar* properties,
+					 const int numProperties,
+					 const PylithScalar* stateVars,
+					 const int numStateVars,
+					 const PylithScalar* totalStrain,
+					 const int strainSize,
+					 const PylithScalar* initialStress,
+					 const int initialStressSize,
+					 const PylithScalar* initialStrain,
+					 const int initialStrainSize,
+					 const bool computeStateVars)
+{ // _calcStressElastic
+  assert(0 != stress);
+  assert(_PowerLawPlaneStrain::tensorSize == stressSize);
+  assert(0 != properties);
+  assert(_numPropsQuadPt == numProperties);
+  assert(0 != stateVars);
+  assert(_numVarsQuadPt == numStateVars);
+  assert(0 != totalStrain);
+  assert(_PowerLawPlaneStrain::tensorSize == strainSize);
+  assert(0 != initialStress);
+  assert(_PowerLawPlaneStrain::tensorSize == initialStressSize);
+  assert(0 != initialStrain);
+  assert(_PowerLawPlaneStrain::tensorSize == initialStrainSize);
+
+  const PylithScalar mu = properties[p_mu];
+  const PylithScalar lambda = properties[p_lambda];
+  const PylithScalar mu2 = 2.0 * mu;
+
+  const PylithScalar e11 = totalStrain[0] - initialStrain[0];
+  const PylithScalar e22 = totalStrain[1] - initialStrain[1];
+  const PylithScalar e12 = totalStrain[2] - initialStrain[2];
+  
+  const PylithScalar s12 = lambda * (e11 + e22);
+
+  stress[0] = s12 + mu2 * e11 + initialStress[0];
+  stress[1] = s12 + mu2 * e22 + initialStress[1];
+  stress[2] = mu2 * e12 + initialStress[2];
+
+  PetscLogFlops(14);
+} // _calcStressElastic
+
+// ----------------------------------------------------------------------
+// Compute stress tensor at location from properties as a viscoelastic
+// material.
+void
+pylith::materials::PowerLawPlaneStrain::_calcStressViscoelastic(
+					PylithScalar* const stress,
+					const int stressSize,
+					const PylithScalar* properties,
+					const int numProperties,
+					const PylithScalar* stateVars,
+					const int numStateVars,
+					const PylithScalar* totalStrain,
+					const int strainSize,
+					const PylithScalar* initialStress,
+					const int initialStressSize,
+					const PylithScalar* initialStrain,
+					const int initialStrainSize,
+					const bool computeStateVars)
+{ // _calcStressViscoelastic
+  assert(0 != stress);
+  assert(_PowerLawPlaneStrain::tensorSize == stressSize);
+  assert(0 != properties);
+  assert(_numPropsQuadPt == numProperties);
+  assert(0 != stateVars);
+  assert(_numVarsQuadPt == numStateVars);
+  assert(0 != totalStrain);
+  assert(_PowerLawPlaneStrain::tensorSize == strainSize);
+  assert(0 != initialStress);
+  assert(_PowerLawPlaneStrain::tensorSize == initialStressSize);
+  assert(0 != initialStrain);
+  assert(_PowerLawPlaneStrain::tensorSize == initialStrainSize);
+
+  const int tensorSize = 3;
+  const int tensorSizePS = 4;
+  assert(_tensorSize == tensorSize);
+    
+  // We need to do root-finding method if state variables are from previous
+  // time step.
+  if (computeStateVars) {
+
+    const PylithScalar mu = properties[p_mu];
+    const PylithScalar lambda = properties[p_lambda];
+    const PylithScalar referenceStrainRate = properties[p_referenceStrainRate];
+    const PylithScalar referenceStress = properties[p_referenceStress];
+    const PylithScalar powerLawExp = properties[p_powerLawExponent];
+
+    const PylithScalar stressZZInitial = stateVars[s_stressZZInitial];
+    const PylithScalar visStrainT[tensorSizePS] = {
+      stateVars[s_viscousStrain],
+      stateVars[s_viscousStrain + 1],
+      stateVars[s_viscousStrain + 2],
+      stateVars[s_viscousStrain + 3]};
+    const PylithScalar stressT[tensorSizePS] = {
+      stateVars[s_stress4],
+      stateVars[s_stress4 + 1],
+      stateVars[s_stress4 + 2],
+      stateVars[s_stress4 + 3]};
+
+    const PylithScalar mu2 = 2.0 * mu;
+    const PylithScalar bulkModulus = lambda + mu2/3.0;
+    const PylithScalar ae = 1.0/mu2;
+    const PylithScalar diagg[tensorSizePS] = { 1.0, 1.0, 1.0, 0.0 };
+
+    // Need to figure out how time integration parameter alpha is going to be
+    // specified.  It should probably be specified in the problem definition and
+    // then used only by the material types that use it.  For now we are setting
+    // it to 0.5, which should probably be the default value.
+    const PylithScalar alpha = 0.5;
+    const PylithScalar timeFac = _dt * (1.0 - alpha);
+
+    // Initial stress values
+    const PylithScalar meanStressInitial = (initialStress[0] +
+					    initialStress[1] +
+					    stressZZInitial)/3.0;
+    const PylithScalar devStressInitial[tensorSizePS] = {
+      initialStress[0] - meanStressInitial,
+      initialStress[1] - meanStressInitial,
+      stressZZInitial - meanStressInitial,
+      initialStress[2]
+    };
+    const PylithScalar stressInvar2Initial =
+      0.5 * scalarProduct2DPS(devStressInitial, devStressInitial);
+
+    // Initial strain values
+    const PylithScalar meanStrainInitial = (initialStrain[0] +
+					    initialStrain[1])/3.0;
+
+    // Values for current time step
+    const PylithScalar meanStrainTpdt = (totalStrain[0] + totalStrain[1])/3.0 -
+      meanStrainInitial;
+    const PylithScalar meanStressTpdt = 3.0 * bulkModulus * meanStrainTpdt;
+
+    // Note that I use the initial strain rather than the deviatoric initial
+    // strain since otherwise the initial mean strain would get used twice.
+    const PylithScalar strainPPTpdt[tensorSizePS] =
+      { totalStrain[0] - meanStrainTpdt - visStrainT[0] - initialStrain[0],
+	totalStrain[1] - meanStrainTpdt - visStrainT[1] - initialStrain[1],
+	- meanStrainTpdt - visStrainT[2],
+	totalStrain[2] - visStrainT[3] - initialStrain[2]
+      };
+    const PylithScalar strainPPInvar2Tpdt =
+      0.5 * scalarProduct2DPS(strainPPTpdt, strainPPTpdt);
+
+    // Values for previous time step
+    const PylithScalar meanStressT = (stressT[0] + stressT[1] + stressT[2])/3.0;
+    const PylithScalar devStressT[tensorSizePS] = {
+      stressT[0] - meanStressT,
+      stressT[1] - meanStressT,
+      stressT[2] - meanStressT,
+      stressT[3]
+    };
+    const PylithScalar stressInvar2T =
+      0.5 * scalarProduct2DPS(devStressT, devStressT);
+    const PylithScalar effStressT = sqrt(stressInvar2T);
+
+    // Finish defining parameters needed for root-finding algorithm.
+    const PylithScalar b = strainPPInvar2Tpdt + ae *
+      scalarProduct2DPS(strainPPTpdt, devStressInitial) +
+      ae * ae * stressInvar2Initial;
+    const PylithScalar c =
+      (scalarProduct2DPS(strainPPTpdt, devStressT) +
+       ae * scalarProduct2DPS(devStressT, devStressInitial)) * timeFac;
+    const PylithScalar d = timeFac * effStressT;
+
+    PetscLogFlops(94);
+
+    // If b, c, and d are all zero, then the effective stress is zero and we
+    // don't need a root-finding algorithm. Otherwise, use the algorithm to
+    // find the effective stress.
+    PylithScalar effStressTpdt = 0.0;
+    if (b != 0.0 || c != 0.0 || d != 0.0) {
+      const PylithScalar stressScale = mu;
+
+      // Put parameters into a struct and call root-finding algorithm.
+      _effStressParams.ae = ae;
+      _effStressParams.b = b;
+      _effStressParams.c = c;
+      _effStressParams.d = d;
+      _effStressParams.alpha = alpha;
+      _effStressParams.dt = _dt;
+      _effStressParams.effStressT = effStressT;
+      _effStressParams.powerLawExp = powerLawExp;
+      _effStressParams.referenceStrainRate = referenceStrainRate;
+      _effStressParams.referenceStress = referenceStress;
+      
+      const PylithScalar effStressInitialGuess = effStressT;
+
+      effStressTpdt =
+	EffectiveStress::calculate<PowerLawPlaneStrain>(effStressInitialGuess,
+					       stressScale, this);
+    } // if
+
+    // Compute stresses from effective stress.
+    const PylithScalar effStressTau = (1.0 - alpha) * effStressT +
+      alpha * effStressTpdt;
+    const PylithScalar gammaTau = referenceStrainRate *
+      pow((effStressTau/referenceStress),
+	  (powerLawExp - 1.0))/referenceStress;
+    const PylithScalar factor1 = 1.0/(ae + alpha * _dt * gammaTau);
+    const PylithScalar factor2 = timeFac * gammaTau;
+    PylithScalar devStressTpdt = 0.0;
+    PylithScalar totalStress[tensorSizePS];
+
+    for (int iComp=0; iComp < tensorSizePS; ++iComp) {
+      devStressTpdt = factor1 *
+	(strainPPTpdt[iComp] - factor2 * devStressT[iComp] +
+	 ae * devStressInitial[iComp]);
+      totalStress[iComp] = devStressTpdt + diagg[iComp] *
+	(meanStressTpdt + meanStressInitial);
+    } // for
+    stress[0] = totalStress[0];
+    stress[1] = totalStress[1];
+    stress[2] = totalStress[3];
+    PetscLogFlops(14 + 8 * tensorSizePS);
+
+    // If state variables have already been updated, current stress is already
+    // contained in stress.
+  } else {
+    stress[0] = stateVars[s_stress4];
+    stress[1] = stateVars[s_stress4 + 1];
+    stress[2] = stateVars[s_stress4 + 3];
+  } // else
+
+} // _calcStressViscoelastic
+
+// ----------------------------------------------------------------------
+// Effective stress function that computes effective stress function only
+// (no derivative).
+PylithScalar
+pylith::materials::PowerLawPlaneStrain::effStressFunc(const PylithScalar effStressTpdt)
+{ // effStressFunc
+  const PylithScalar ae = _effStressParams.ae;
+  const PylithScalar b = _effStressParams.b;
+  const PylithScalar c = _effStressParams.c;
+  const PylithScalar d = _effStressParams.d;
+  const PylithScalar alpha = _effStressParams.alpha;
+  const PylithScalar dt = _effStressParams.dt;
+  const PylithScalar effStressT = _effStressParams.effStressT;
+  const PylithScalar powerLawExp = _effStressParams.powerLawExp;
+  const PylithScalar referenceStrainRate = _effStressParams.referenceStrainRate;
+  const PylithScalar referenceStress = _effStressParams.referenceStress;
+  const PylithScalar factor1 = 1.0-alpha;
+  const PylithScalar effStressTau = factor1 * effStressT +
+    alpha * effStressTpdt;
+  const PylithScalar gammaTau = referenceStrainRate * 
+    pow((effStressTau/referenceStress), (powerLawExp - 1.0))/referenceStress;
+  const PylithScalar a = ae + alpha * dt * gammaTau;
+  const PylithScalar y = a * a * effStressTpdt * effStressTpdt - b +
+    c * gammaTau - d * d * gammaTau * gammaTau;
+
+  PetscLogFlops(22);
+
+  return y;
+} // effStressFunc
+
+// ----------------------------------------------------------------------
+// Effective stress function that computes effective stress function
+// derivative only (no function value).
+PylithScalar
+pylith::materials::PowerLawPlaneStrain::effStressDerivFunc(const PylithScalar effStressTpdt)
+{ // effStressDFunc
+  const PylithScalar ae = _effStressParams.ae;
+  const PylithScalar c = _effStressParams.c;
+  const PylithScalar d = _effStressParams.d;
+  const PylithScalar alpha = _effStressParams.alpha;
+  const PylithScalar dt = _effStressParams.dt;
+  const PylithScalar effStressT = _effStressParams.effStressT;
+  const PylithScalar powerLawExp = _effStressParams.powerLawExp;
+  const PylithScalar referenceStrainRate = _effStressParams.referenceStrainRate;
+  const PylithScalar referenceStress = _effStressParams.referenceStress;
+  const PylithScalar factor1 = 1.0-alpha;
+  const PylithScalar effStressTau = factor1 * effStressT +
+    alpha * effStressTpdt;
+  const PylithScalar gammaTau = referenceStrainRate *
+    pow((effStressTau/referenceStress), (powerLawExp - 1.0))/referenceStress;
+  const PylithScalar a = ae + alpha * dt * gammaTau;
+  const PylithScalar dGammaTau =
+    referenceStrainRate * alpha * (powerLawExp - 1.0) *
+    pow((effStressTau/referenceStress), (powerLawExp - 2.0))/
+    (referenceStress * referenceStress);
+  const PylithScalar dy = 2.0 * a * a * effStressTpdt + dGammaTau *
+    (2.0 * a * alpha * dt * effStressTpdt * effStressTpdt +
+     c - 2.0 * d * d * gammaTau);
+  PetscLogFlops(36);
+
+  return dy;
+} // effStressDFunc
+
+// ----------------------------------------------------------------------
+// Effective stress function that computes effective stress function
+// and derivative.
+void
+pylith::materials::PowerLawPlaneStrain::effStressFuncDerivFunc( PylithScalar* func,
+								PylithScalar* dfunc,
+								const PylithScalar effStressTpdt)
+{ // effStressFuncDFunc
+  PylithScalar y = *func;
+  PylithScalar dy = *dfunc;
+
+  const PylithScalar ae = _effStressParams.ae;
+  const PylithScalar b = _effStressParams.b;
+  const PylithScalar c = _effStressParams.c;
+  const PylithScalar d = _effStressParams.d;
+  const PylithScalar alpha = _effStressParams.alpha;
+  const PylithScalar dt = _effStressParams.dt;
+  const PylithScalar effStressT = _effStressParams.effStressT;
+  const PylithScalar powerLawExp = _effStressParams.powerLawExp;
+  const PylithScalar referenceStrainRate = _effStressParams.referenceStrainRate;
+  const PylithScalar referenceStress = _effStressParams.referenceStress;
+  const PylithScalar factor1 = 1.0-alpha;
+  const PylithScalar effStressTau = factor1 * effStressT + alpha *
+    effStressTpdt;
+  const PylithScalar gammaTau = referenceStrainRate *
+    pow((effStressTau/referenceStress), (powerLawExp - 1.0))/referenceStress;
+  const PylithScalar dGammaTau =
+    referenceStrainRate * alpha * (powerLawExp - 1.0) *
+    pow((effStressTau/referenceStress), (powerLawExp - 2.0))/
+    (referenceStress * referenceStress);
+  const PylithScalar a = ae + alpha * dt * gammaTau;
+  y = a * a * effStressTpdt * effStressTpdt -
+    b +
+    c * gammaTau -
+    d * d * gammaTau * gammaTau;
+  dy = 2.0 * a * a * effStressTpdt +
+    dGammaTau *
+    (2.0 * a * alpha * dt * effStressTpdt * effStressTpdt +
+     c - 2.0 * d * d * gammaTau);
+  
+  *func = y;
+  *dfunc = dy;
+
+  PetscLogFlops(46);
+} // effStressFuncDFunc
+
+// ----------------------------------------------------------------------
+// Compute derivative of elasticity matrix at location from properties.
+void
+pylith::materials::PowerLawPlaneStrain::_calcElasticConstsElastic(
+				         PylithScalar* const elasticConsts,
+					 const int numElasticConsts,
+					 const PylithScalar* properties,
+					 const int numProperties,
+					 const PylithScalar* stateVars,
+					 const int numStateVars,
+					 const PylithScalar* totalStrain,
+					 const int strainSize,
+					 const PylithScalar* initialStress,
+					 const int initialStressSize,
+					 const PylithScalar* initialStrain,
+					 const int initialStrainSize)
+{ // _calcElasticConstsElastic
+  assert(0 != elasticConsts);
+  assert(_PowerLawPlaneStrain::numElasticConsts == numElasticConsts);
+  assert(0 != properties);
+  assert(_numPropsQuadPt == numProperties);
+  assert(0 != stateVars);
+  assert(_numVarsQuadPt == numStateVars);
+  assert(0 != totalStrain);
+  assert(_PowerLawPlaneStrain::tensorSize == strainSize);
+  assert(0 != initialStress);
+  assert(_PowerLawPlaneStrain::tensorSize == initialStressSize);
+  assert(0 != initialStrain);
+  assert(_PowerLawPlaneStrain::tensorSize == initialStrainSize);
+ 
+  const PylithScalar mu = properties[p_mu];
+  const PylithScalar lambda = properties[p_lambda];
+
+  const PylithScalar mu2 = 2.0 * mu;
+  const PylithScalar lambda2mu = lambda + mu2;
+
+  elasticConsts[ 0] = lambda2mu; // C1111
+  elasticConsts[ 1] = lambda; // C1122
+  elasticConsts[ 2] = 0; // C1112
+  elasticConsts[ 3] = lambda; // C2211
+  elasticConsts[ 4] = lambda2mu; // C2222
+  elasticConsts[ 5] = 0; // C2212
+  elasticConsts[ 6] = 0; // C1211
+  elasticConsts[ 7] = 0; // C1222
+  elasticConsts[ 8] = mu2; // C1212
+
+  PetscLogFlops(2);
+} // _calcElasticConstsElastic
+
+// ----------------------------------------------------------------------
+// Compute derivative of elasticity matrix at location from properties
+// as a viscoelastic material.
+void
+pylith::materials::PowerLawPlaneStrain::_calcElasticConstsViscoelastic(
+				         PylithScalar* const elasticConsts,
+					 const int numElasticConsts,
+					 const PylithScalar* properties,
+					 const int numProperties,
+					 const PylithScalar* stateVars,
+					 const int numStateVars,
+					 const PylithScalar* totalStrain,
+					 const int strainSize,
+					 const PylithScalar* initialStress,
+					 const int initialStressSize,
+					 const PylithScalar* initialStrain,
+					 const int initialStrainSize)
+{ // _calcElasticConstsViscoelastic
+  assert(0 != elasticConsts);
+  assert(_PowerLawPlaneStrain::numElasticConsts == numElasticConsts);
+  assert(0 != properties);
+  assert(_numPropsQuadPt == numProperties);
+  assert(0 != stateVars);
+  assert(_numVarsQuadPt == numStateVars);
+  assert(0 != totalStrain);
+  assert(_PowerLawPlaneStrain::tensorSize == strainSize);
+  assert(0 != initialStress);
+  assert(_PowerLawPlaneStrain::tensorSize == initialStressSize);
+  assert(0 != initialStrain);
+  assert(_PowerLawPlaneStrain::tensorSize == initialStrainSize);
+
+  const int tensorSize = 3;
+  const int tensorSizePS = 4;
+
+  const PylithScalar mu = properties[p_mu];
+  const PylithScalar lambda = properties[p_lambda];
+  const PylithScalar referenceStrainRate = properties[p_referenceStrainRate];
+  const PylithScalar referenceStress = properties[p_referenceStress];
+  const PylithScalar powerLawExp = properties[p_powerLawExponent];
+    
+  // State variables.
+  const PylithScalar stressZZInitial = stateVars[s_stressZZInitial];
+  const PylithScalar visStrainT[tensorSizePS] = {
+    stateVars[s_viscousStrain],
+    stateVars[s_viscousStrain + 1],
+    stateVars[s_viscousStrain + 2],
+    stateVars[s_viscousStrain + 3]
+  };
+  const PylithScalar stressT[tensorSizePS] = {stateVars[s_stress4],
+					      stateVars[s_stress4 + 1],
+					      stateVars[s_stress4 + 2],
+					      stateVars[s_stress4 + 3]};
+
+  const PylithScalar mu2 = 2.0 * mu;
+  const PylithScalar bulkModulus = lambda + mu2/3.0;
+  const PylithScalar ae = 1.0/mu2;
+  const PylithScalar diagg[tensorSizePS] = { 1.0, 1.0, 1.0, 0.0 };
+    
+  // Need to figure out how time integration parameter alpha is going to be
+  // specified.  It should probably be specified in the problem definition and
+  // then used only by the material types that use it.  For now we are setting
+  // it to 0.5, which should probably be the default value.
+  const PylithScalar alpha = 0.5;
+  const PylithScalar explicitFac = 1.0 - alpha;
+  const PylithScalar timeFac = _dt * explicitFac;
+    
+  /// Initial state.
+  // Initial stress values.
+  const PylithScalar meanStressInitial = (initialStress[0] +
+					  initialStress[1] +
+					  stressZZInitial)/3.0;
+  const PylithScalar devStressInitial[tensorSizePS] = {
+    initialStress[0] - meanStressInitial,
+    initialStress[1] - meanStressInitial,
+    stressZZInitial - meanStressInitial,
+    initialStress[2]
+  };
+  const PylithScalar stressInvar2Initial =
+    0.5 * scalarProduct2DPS(devStressInitial, devStressInitial);
+
+  // Initial strain values.
+  const PylithScalar meanStrainInitial = (initialStrain[0] +
+					  initialStrain[1])/3.0;
+  
+  /// Values for current time step
+  const PylithScalar meanStrainTpdt = (totalStrain[0] + totalStrain[1])/3.0 -
+    meanStrainInitial;
+  const PylithScalar meanStressTpdt = 3.0 * bulkModulus * meanStrainTpdt;
+  
+  // Note that I use the initial strain rather than the deviatoric initial
+  // strain since otherwise the initial mean strain would get used twice.
+  
+  const PylithScalar strainPPTpdt[tensorSizePS] =
+    { totalStrain[0] - meanStrainTpdt - visStrainT[0] - initialStrain[0],
+      totalStrain[1] - meanStrainTpdt - visStrainT[1] - initialStrain[1],
+      - meanStrainTpdt - visStrainT[2],
+      totalStrain[2] - visStrainT[3] - initialStrain[2]
+    };
+  const PylithScalar strainPPInvar2Tpdt =
+    0.5 * scalarProduct2DPS(strainPPTpdt, strainPPTpdt);
+  
+  // Values for previous time step
+  const PylithScalar meanStressT = (stressT[0] + stressT[1] + stressT[2])/3.0;
+  const PylithScalar devStressT[tensorSizePS] = { stressT[0] - meanStressT,
+						  stressT[1] - meanStressT,
+						  stressT[2] - meanStressT,
+						  stressT[3] };
+  const PylithScalar stressInvar2T =
+    0.5 * scalarProduct2DPS(devStressT, devStressT);
+  const PylithScalar effStressT = sqrt(stressInvar2T);
+    
+  // Finish defining parameters needed for root-finding algorithm.
+  const PylithScalar b = strainPPInvar2Tpdt +
+    ae * scalarProduct2DPS(strainPPTpdt, devStressInitial) +
+    ae * ae * stressInvar2Initial;
+  const PylithScalar c =
+    (scalarProduct2DPS(strainPPTpdt, devStressT) +
+     ae * scalarProduct2DPS(devStressT, devStressInitial)) * timeFac;
+  const PylithScalar d = timeFac * effStressT;
+
+  PetscLogFlops(96);
+
+  // If b = c = d = 0, the effective stress is zero and the elastic constants
+  // will be the same as for the elastic case. Otherwise, compute the tangent
+  // matrix using the effective stress function algorithm.
+  if (b == 0.0 && c == 0.0 && d == 0.0) {
+    _calcElasticConstsElastic(elasticConsts,
+			      numElasticConsts,
+			      properties,
+			      numProperties,
+			      stateVars,
+			      numStateVars,
+			      totalStrain,
+			      strainSize,
+			      initialStress,
+			      initialStressSize,
+			      initialStrain,
+			      initialStrainSize);
+  } else {
+    const PylithScalar stressScale = mu;
+  
+    // Put parameters into a struct and call root-finding algorithm.
+    _effStressParams.ae = ae;
+    _effStressParams.b = b;
+    _effStressParams.c = c;
+    _effStressParams.d = d;
+    _effStressParams.alpha = alpha;
+    _effStressParams.dt = _dt;
+    _effStressParams.effStressT = effStressT;
+    _effStressParams.powerLawExp = powerLawExp;
+    _effStressParams.referenceStrainRate = referenceStrainRate;
+    _effStressParams.referenceStress = referenceStress;
+    
+    const PylithScalar effStressInitialGuess = effStressT;
+    
+    const PylithScalar effStressTpdt =
+      EffectiveStress::calculate<PowerLawPlaneStrain>(effStressInitialGuess,
+					     stressScale, this);
+  
+    // Compute quantities at intermediate time tau used to compute values at
+    // end of time step.
+    const PylithScalar effStressTau = (1.0 - alpha) * effStressT +
+      alpha * effStressTpdt;
+    const PylithScalar gammaTau = referenceStrainRate *
+      pow((effStressTau/referenceStress),
+	  (powerLawExp - 1.0))/referenceStress;
+    const PylithScalar a = ae + alpha * _dt * gammaTau;
+    const PylithScalar factor1 = 1.0/a;
+    const PylithScalar factor2 = timeFac * gammaTau;
+    const PylithScalar devStressTpdt[tensorSize] = {
+      factor1 *
+      (strainPPTpdt[0] - factor2 * devStressT[0] + ae * devStressInitial[0]),
+      factor1 *
+      (strainPPTpdt[1] - factor2 * devStressT[1] + ae * devStressInitial[1]),
+      factor1 *
+      (strainPPTpdt[3] - factor2 * devStressT[3] + ae * devStressInitial[3])
+    };
+    const PylithScalar devStressTau[tensorSize] = {
+      alpha * devStressT[0] + explicitFac * devStressTpdt[0],
+      alpha * devStressT[1] + explicitFac * devStressTpdt[1],
+      alpha * devStressT[2] + explicitFac * devStressTpdt[2]
+    };
+    const PylithScalar factor3 = 0.5 * referenceStrainRate * _dt * alpha *
+      (powerLawExp - 1.0) *
+      pow((effStressTau/referenceStress), (powerLawExp - 2.0))/
+      (referenceStress * referenceStress * effStressTpdt);
+
+    // Compute deviatoric derivatives
+    const PylithScalar dStress11dStrain11 = 1.0/
+      (a + devStressTau[0] * devStressTpdt[0] * factor3);
+    const PylithScalar dStress22dStrain22 = 1.0/
+      (a + devStressTau[1] * devStressTpdt[1] * factor3);
+    const PylithScalar dStress12dStrain12 = 1.0/
+      (a + 2.0 * devStressTau[2] * devStressTpdt[2] * factor3);
+    
+    /// Compute tangent matrix.
+    // Form elastic constants.
+    elasticConsts[ 0] = bulkModulus + 2.0 * dStress11dStrain11/3.0; // C1111
+    elasticConsts[ 1] = bulkModulus -       dStress11dStrain11/3.0; // C1122
+    elasticConsts[ 2] = 0.0; // C1112
+    elasticConsts[ 3] = elasticConsts[ 1]; // C2211
+    elasticConsts[ 4] = bulkModulus + 2.0 * dStress22dStrain22/3.0; // C2222
+    elasticConsts[ 5] = 0.0; // C2212
+    elasticConsts[ 6] = 0.0; // C1211
+    elasticConsts[ 7] = 0.0; // C1222
+    elasticConsts[ 8] = dStress12dStrain12; // C1212
+    PetscLogFlops(71);
+  } // else
+} // _calcElasticConstsViscoelastic
+
+// ----------------------------------------------------------------------
+// Update state variables.
+void
+pylith::materials::PowerLawPlaneStrain::_updateStateVarsElastic(
+				    PylithScalar* const stateVars,
+				    const int numStateVars,
+				    const PylithScalar* properties,
+				    const int numProperties,
+				    const PylithScalar* totalStrain,
+				    const int strainSize,
+				    const PylithScalar* initialStress,
+				    const int initialStressSize,
+				    const PylithScalar* initialStrain,
+				    const int initialStrainSize)
+{ // _updateStateVarsElastic
+  assert(0 != stateVars);
+  assert(_numVarsQuadPt == numStateVars);
+  assert(0 != properties);
+  assert(_numPropsQuadPt == numProperties);
+  assert(0 != totalStrain);
+  assert(_PowerLawPlaneStrain::tensorSize == strainSize);
+  assert(0 != initialStress);
+  assert(_PowerLawPlaneStrain::tensorSize == initialStressSize);
+  assert(0 != initialStrain);
+  assert(_PowerLawPlaneStrain::tensorSize == initialStrainSize);
+
+  const int tensorSize = 3;
+  const int tensorSizePS = 4;
+  const PylithScalar lambda = properties[p_lambda];
+  const PylithScalar stressZZInitial = stateVars[s_stressZZInitial];
+
+  const bool computeStateVars = true;
+  PylithScalar stress[tensorSize] = {0.0, 0.0, 0.0};
+  const int stressSize = strainSize;
+  _calcStressElastic(stress, stressSize,
+		     properties, numProperties,
+		     stateVars, numStateVars,
+		     totalStrain, strainSize,
+		     initialStress, initialStressSize,
+		     initialStrain, initialStrainSize,
+		     computeStateVars);
+
+  stateVars[s_viscousStrain] = 0.0;
+  stateVars[s_viscousStrain + 1] = 0.0;
+  stateVars[s_viscousStrain + 2] = 0.0;
+  stateVars[s_viscousStrain + 3] = 0.0;
+  stateVars[s_stress4] = stress[0];
+  stateVars[s_stress4 + 1] = stress[1];
+  stateVars[s_stress4 + 2] = lambda * (totalStrain[0] + totalStrain[1]) +
+    stressZZInitial;
+  stateVars[s_stress4 + 3] = stress[2];
+
+  _needNewJacobian = true;
+} // _updateStateVarsElastic
+
+// ----------------------------------------------------------------------
+// Update state variables.
+void
+pylith::materials::PowerLawPlaneStrain::_updateStateVarsViscoelastic(
+				    PylithScalar* const stateVars,
+				    const int numStateVars,
+				    const PylithScalar* properties,
+				    const int numProperties,
+				    const PylithScalar* totalStrain,
+				    const int strainSize,
+				    const PylithScalar* initialStress,
+				    const int initialStressSize,
+				    const PylithScalar* initialStrain,
+				    const int initialStrainSize)
+{ // _updateStateVarsViscoelastic
+  assert(0 != stateVars);
+  assert(_numVarsQuadPt == numStateVars);
+  assert(0 != properties);
+  assert(_numPropsQuadPt == numProperties);
+  assert(0 != totalStrain);
+  assert(_PowerLawPlaneStrain::tensorSize == strainSize);
+  assert(0 != initialStress);
+  assert(_PowerLawPlaneStrain::tensorSize == initialStressSize);
+  assert(0 != initialStrain);
+  assert(_PowerLawPlaneStrain::tensorSize == initialStrainSize);
+
+  const int stressSize = _tensorSize;
+
+  const int tensorSize = _tensorSize;
+  const int tensorSizePS = 4;
+
+  // For now, we are duplicating the functionality of _calcStressViscoelastic,
+  // since otherwise we would have to redo a lot of calculations.
+  const PylithScalar mu = properties[p_mu];
+  const PylithScalar lambda = properties[p_lambda];
+  const PylithScalar referenceStrainRate = properties[p_referenceStrainRate];
+  const PylithScalar referenceStress = properties[p_referenceStress];
+  const PylithScalar powerLawExp = properties[p_powerLawExponent];
+
+  const PylithScalar stressZZInitial = stateVars[s_stressZZInitial];
+  const PylithScalar visStrainT[tensorSizePS] = {
+    stateVars[s_viscousStrain],
+    stateVars[s_viscousStrain + 1],
+    stateVars[s_viscousStrain + 2],
+    stateVars[s_viscousStrain + 3]
+  };
+
+  const PylithScalar stressT[tensorSizePS] = {stateVars[s_stress4],
+					      stateVars[s_stress4 + 1],
+					      stateVars[s_stress4 + 2],
+					      stateVars[s_stress4 + 3] };
+  
+  const PylithScalar mu2 = 2.0 * mu;
+  const PylithScalar bulkModulus = lambda + mu2/3.0;
+  const PylithScalar ae = 1.0/mu2;
+  const PylithScalar diagg[tensorSizePS] = { 1.0, 1.0, 1.0, 0.0 };
+
+  // Need to figure out how time integration parameter alpha is going to be
+  // specified.  It should probably be specified in the problem definition and
+  // then used only by the material types that use it.  For now we are setting
+  // it to 0.5, which should probably be the default value.
+  const PylithScalar alpha = 0.5;
+  const PylithScalar timeFac = _dt * (1.0 - alpha);
+
+  // Initial stress values
+  const PylithScalar meanStressInitial = (initialStress[0] + initialStress[1] +
+					  stressZZInitial)/3.0;
+  const PylithScalar devStressInitial[tensorSizePS] = {
+    initialStress[0] - meanStressInitial,
+    initialStress[1] - meanStressInitial,
+    stressZZInitial - meanStressInitial,
+    initialStress[2]
+  };
+  const PylithScalar stressInvar2Initial =
+    0.5 * scalarProduct2DPS(devStressInitial, devStressInitial);
+
+  // Initial strain values
+  const PylithScalar meanStrainInitial = (initialStrain[0] +
+					  initialStrain[1])/3.0;
+  
+  // Values for current time step
+  const PylithScalar meanStrainTpdt = (totalStrain[0] + totalStrain[1])/3.0
+    - meanStrainInitial;
+  const PylithScalar meanStressTpdt = 3.0 * bulkModulus * meanStrainTpdt;
+
+  // Note that I use the initial strain rather than the deviatoric initial
+  // strain since otherwise the initial mean strain would get used twice.
+  const PylithScalar strainPPTpdt[] = {
+    totalStrain[0] - meanStrainTpdt - visStrainT[0] - initialStrain[0],
+    totalStrain[1] - meanStrainTpdt - visStrainT[1] - initialStrain[1],
+    - meanStrainTpdt - visStrainT[2],
+    totalStrain[2] - visStrainT[3] - initialStrain[2]
+  };
+  const PylithScalar strainPPInvar2Tpdt =
+    0.5 * scalarProduct2DPS(strainPPTpdt, strainPPTpdt);
+
+  // Values for previous time step
+  const PylithScalar meanStressT = (stressT[0] + stressT[1] + stressT[2])/3.0;
+  const PylithScalar devStressT[tensorSizePS] = {
+    stressT[0] - meanStressT,
+    stressT[1] - meanStressT,
+    stressT[2] - meanStressT,
+    stressT[3]
+  };
+  const PylithScalar stressInvar2T =
+    0.5 * scalarProduct2DPS(devStressT, devStressT);
+  const PylithScalar effStressT = sqrt(stressInvar2T);
+
+  // Finish defining parameters needed for root-finding algorithm.
+  const PylithScalar b = strainPPInvar2Tpdt +
+    ae * scalarProduct2DPS(strainPPTpdt, devStressInitial) +
+    ae * ae * stressInvar2Initial;
+  const PylithScalar c =
+    (scalarProduct2DPS(strainPPTpdt, devStressT) +
+     ae * scalarProduct2DPS(devStressT, devStressInitial)) * timeFac;
+  const PylithScalar d = timeFac * effStressT;
+  PetscLogFlops(96);
+
+  // If b, c, and d are all zero, then the effective stress is zero and we
+  // don't need a root-finding algorithm. Otherwise, use the algorithm to
+  // find the effective stress.
+  PylithScalar effStressTpdt = 0.0;
+  if (b != 0.0 || c != 0.0 || d != 0.0) {
+    const PylithScalar stressScale = mu;
+
+    // Put parameters into a struct and call root-finding algorithm.
+    _effStressParams.ae = ae;
+    _effStressParams.b = b;
+    _effStressParams.c = c;
+    _effStressParams.d = d;
+    _effStressParams.alpha = alpha;
+    _effStressParams.dt = _dt;
+    _effStressParams.effStressT = effStressT;
+    _effStressParams.powerLawExp = powerLawExp;
+    _effStressParams.referenceStrainRate = referenceStrainRate;
+    _effStressParams.referenceStress = referenceStress;
+
+    const PylithScalar effStressInitialGuess = effStressT;
+
+    effStressTpdt =
+      EffectiveStress::calculate<PowerLawPlaneStrain>(effStressInitialGuess,
+					     stressScale, this);
+
+  } // if
+
+  // Compute stress and viscous strain and update appropriate state variables.
+  const PylithScalar effStressTau = (1.0 - alpha) * effStressT +
+    alpha * effStressTpdt;
+  const PylithScalar gammaTau = referenceStrainRate *
+    pow((effStressTau/referenceStress),
+	(powerLawExp - 1.0))/referenceStress;
+  const PylithScalar factor1 = 1.0/(ae + alpha * _dt * gammaTau);
+  const PylithScalar factor2 = timeFac * gammaTau;
+  PylithScalar devStressTpdt = 0.0;
+  PylithScalar devStressTau = 0.0;
+  PylithScalar deltaVisStrain = 0.0;
+
+  for (int iComp=0; iComp < tensorSizePS; ++iComp) {
+    devStressTpdt = factor1 *
+      (strainPPTpdt[iComp] - factor2 * devStressT[iComp] +
+       ae * devStressInitial[iComp]);
+    stateVars[s_stress4 + iComp] = devStressTpdt + diagg[iComp] *
+      (meanStressTpdt + meanStressInitial);
+    devStressTau = (1.0 - alpha) * devStressT[iComp] + alpha * devStressTpdt;
+    stateVars[s_viscousStrain+iComp] += _dt * gammaTau * devStressTau;
+  } // for
+
+  _needNewJacobian = true;
+  PetscLogFlops(14 + tensorSizePS * 15);
+
+} // _updateStateVarsViscoelastic
+
+// End of file 

Copied: short/3D/PyLith/trunk/libsrc/pylith/materials/PowerLawPlaneStrain.hh (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/libsrc/pylith/materials/PowerLawPlaneStrain.hh)
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/materials/PowerLawPlaneStrain.hh	                        (rev 0)
+++ short/3D/PyLith/trunk/libsrc/pylith/materials/PowerLawPlaneStrain.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -0,0 +1,537 @@
+// -*- 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/materials/PowerLawPlaneStrain.hh
+ *
+ * @brief 2-D, plane strain, power-law viscoelastic material. 
+ */
+
+#if !defined(pylith_materials_powerlawplanestrain_hh)
+#define pylith_materials_powerlawplanestrain_hh
+
+// Include directives ---------------------------------------------------
+#include "ElasticMaterial.hh" // ISA ElasticMaterial
+
+// PowerlawPlaneStrain----------------------------------------------------------
+/** @brief 2-D, plane strain, power-law viscoelastic material. 
+ *
+ * The physical properties are specified using density, shear-wave
+ * speed, viscosity coefficient, power-law exponent, and
+ * compressional-wave speed.  The physical properties are stored
+ * internally using density, lambda, mu, which are directly related to
+ * the elasticity constants used in the finite-element
+ * integration. The viscosity information is retained as specified.
+ */
+
+class pylith::materials::PowerLawPlaneStrain : public ElasticMaterial
+{ // class PowerLawPlaneStrain
+  friend class TestPowerLawPlaneStrain; // unit testing
+
+  // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+  /// Default constructor
+  PowerLawPlaneStrain(void);
+
+  /// Destructor
+  ~PowerLawPlaneStrain(void);
+
+  /** Set current time step.
+   *
+   * @param dt Current time step.
+   */
+  void timeStep(const PylithScalar dt);
+
+  /** Set whether elastic or inelastic constitutive relations are used.
+   *
+   * @param flag True to use elastic, false to use inelastic.
+   */
+  void useElasticBehavior(const bool flag);
+
+  /** Compute effective stress function.
+   *
+   * @param effStressTpdt Effective stress value.
+   *
+   * @returns Effective stress function value.
+   */
+  PylithScalar effStressFunc(const PylithScalar effStressTpdt);
+
+  /** Compute effective stress function derivative.
+   *
+   * @param effStressTpdt Effective stress value.
+   *
+   * @returns Effective stress function derivative value.
+   */
+  PylithScalar effStressDerivFunc(const PylithScalar effStressTpdt);
+
+  /** Compute effective stress function and derivative.
+   *
+   * @param func Returned effective stress function value.
+   * @param dfunc Returned effective stress function derivative value.
+   * @param effStressTpdt Effective stress value.
+   *
+   */
+  void effStressFuncDerivFunc(PylithScalar* func,
+			      PylithScalar* dfunc,
+			      const PylithScalar effStressTpdt);
+
+  // PROTECTED METHODS //////////////////////////////////////////////////
+protected :
+
+  /** Compute properties from values in spatial database.
+   *
+   * Order of values in arrays matches order used in dbValues() and
+   * parameterNames().
+   *
+   * @param propValues Array of property values.
+   * @param dbValues Array of database values.
+   */
+  void _dbToProperties(PylithScalar* const propValues,
+		       const scalar_array& dbValues);
+
+  /** Nondimensionalize properties.
+   *
+   * @param values Array of property values.
+   * @param nvalues Number of values.
+   */
+  void _nondimProperties(PylithScalar* const values,
+			 const int nvalues) const;
+
+  /** Dimensionalize properties.
+   *
+   * @param values Array of property values.
+   * @param nvalues Number of values.
+   */
+  void _dimProperties(PylithScalar* const values,
+		      const int nvalues) const;
+
+  /** Compute initial state variables from values in spatial database.
+   *
+   * @param stateValues Array of state variable values.
+   * @param dbValues Array of database values.
+   */
+  void _dbToStateVars(PylithScalar* const stateValues,
+		      const scalar_array& dbValues);
+
+  /** Nondimensionalize state variables..
+   *
+   * @param values Array of state variables.
+   * @param nvalues Number of values.
+   */
+  void _nondimStateVars(PylithScalar* const values,
+			const int nvalues) const;
+
+  /** Dimensionalize state variables.
+   *
+   * @param values Array of state variables.
+   * @param nvalues Number of values.
+   */
+  void _dimStateVars(PylithScalar* const values,
+		     const int nvalues) const;
+
+  /** Compute density from properties.
+   *
+   * @param density Array for density.
+   * @param properties Properties at location.
+   * @param numProperties Number of properties.
+   * @param stateVars State variables at location.
+   * @param numStateVars Number of state variables.
+   */
+  void _calcDensity(PylithScalar* const density,
+		    const PylithScalar* properties,
+		    const int numProperties,
+		    const PylithScalar* stateVars,
+		    const int numStateVars);
+
+  /** Compute stress tensor from properties and state variables. If
+   * the state variables are from the previous time step, then the
+   * computeStateVars flag should be set to true so that the state
+   * variables are updated (but not stored) when computing the stresses.
+   *
+   * @param stress Array for stress tensor.
+   * @param stressSize Size of stress tensor.
+   * @param properties Properties at location.
+   * @param numProperties Number of properties.
+   * @param stateVars State variables at location.
+   * @param numStateVars Number of state variables.
+   * @param totalStrain Total strain at location.
+   * @param strainSize Size of strain tensor.
+   * @param initialStress Initial stress values.
+   * @param initialStressSize Size of initial stress array.
+   * @param initialStrain Initial strain values.
+   * @param initialStrainSize Size of initial strain array.
+   * @param computeStateVars Flag indicating to compute updated state variables.
+   */
+  void _calcStress(PylithScalar* const stress,
+		   const int stressSize,
+		   const PylithScalar* properties,
+		   const int numProperties,
+		   const PylithScalar* stateVars,
+		   const int numStateVars,
+		   const PylithScalar* totalStrain,
+		   const int strainSize,
+		   const PylithScalar* initialStress,
+		   const int initialStressSize,
+		   const PylithScalar* initialStrain,
+		   const int initialStrainSize,
+		   const bool computeStateVars);
+
+  /** Compute derivatives of elasticity matrix from properties.
+   *
+   * @param elasticConsts Array for elastic constants.
+   * @param numElasticConsts Number of elastic constants.
+   * @param properties Properties at location.
+   * @param numProperties Number of properties.
+   * @param stateVars State variables at location.
+   * @param numStateVars Number of state variables.
+   * @param totalStrain Total strain at location.
+   * @param strainSize Size of strain tensor.
+   * @param initialStress Initial stress values.
+   * @param initialStressSize Size of initial stress array.
+   * @param initialStrain Initial strain values.
+   * @param initialStrainSize Size of initial strain array.
+   */
+  void _calcElasticConsts(PylithScalar* const elasticConsts,
+			  const int numElasticConsts,
+			  const PylithScalar* properties,
+			  const int numProperties,
+			  const PylithScalar* stateVars,
+			  const int numStateVars,
+			  const PylithScalar* totalStrain,
+			  const int strainSize,
+		          const PylithScalar* initialStress,
+		          const int initialStressSize,
+		          const PylithScalar* initialStrain,
+		          const int initialStrainSize);
+
+  /** Get stable time step for implicit time integration.
+   *
+   * @param properties Properties at location.
+   * @param numProperties Number of properties.
+   * @param stateVars State variables at location.
+   * @param numStateVars Number of state variables.
+   *
+   * @returns Time step
+   */
+  PylithScalar _stableTimeStepImplicit(const PylithScalar* properties,
+				 const int numProperties,
+				 const PylithScalar* stateVars,
+				 const int numStateVars) const;
+
+  /** Update state variables (for next time step).
+   *
+   * @param stateVars State variables at location.
+   * @param numStateVars Number of state variables.
+   * @param properties Properties at location.
+   * @param numProperties Number of properties.
+   * @param totalStrain Total strain at location.
+   * @param strainSize Size of strain tensor.
+   * @param initialStress Initial stress values.
+   * @param initialStressSize Size of initial stress array.
+   * @param initialStrain Initial strain values.
+   * @param initialStrainSize Size of initial strain array.
+   */
+  void _updateStateVars(PylithScalar* const stateVars,
+			const int numStateVars,
+			const PylithScalar* properties,
+			const int numProperties,
+			const PylithScalar* totalStrain,
+			const int strainSize,
+			const PylithScalar* initialStress,
+			const int initialStressSize,
+			const PylithScalar* initialStrain,
+			const int initialStrainSize);
+
+  // PRIVATE TYPEDEFS ///////////////////////////////////////////////////
+private :
+
+  /// Member prototype for _calcStress()
+  typedef void (pylith::materials::PowerLawPlaneStrain::*calcStress_fn_type)
+    (PylithScalar* const,
+     const int,
+     const PylithScalar*,
+     const int,
+     const PylithScalar*,
+     const int,
+     const PylithScalar*,
+     const int,
+     const PylithScalar*,
+     const int,
+     const PylithScalar*,
+     const int,
+     const bool);
+
+  /// Member prototype for _calcElasticConsts()
+  typedef void (pylith::materials::PowerLawPlaneStrain::*calcElasticConsts_fn_type)
+    (PylithScalar* const,
+     const int,
+     const PylithScalar*,
+     const int,
+     const PylithScalar*,
+     const int,
+     const PylithScalar*,
+     const int,
+     const PylithScalar*,
+     const int,
+     const PylithScalar*,
+     const int);
+
+  /// Member prototype for _updateStateVars()
+  typedef void (pylith::materials::PowerLawPlaneStrain::*updateStateVars_fn_type)
+    (PylithScalar* const,
+     const int,
+     const PylithScalar*,
+     const int,
+     const PylithScalar*,
+     const int,
+     const PylithScalar*,
+     const int,
+     const PylithScalar*,
+     const int);
+
+  // PRIVATE METHODS ////////////////////////////////////////////////////
+private :
+
+  /** Compute stress tensor from properties as an elastic material.
+   *
+   * @param stress Array for stress tensor.
+   * @param stressSize Size of stress tensor.
+   * @param properties Properties at locations.
+   * @param numProperties Number of properties.
+   * @param stateVars State variables at locations.
+   * @param numStateVars Number of state variables.
+   * @param totalStrain Total strain at locations.
+   * @param strainSize Size of strain tensor.
+   * @param initialStress Initial stress values.
+   * @param initialStressSize Size of initial stress array.
+   * @param initialStrain Initial strain values.
+   * @param initialStrainSize Size of initial strain array.
+   * @param computeStateVars Flag indicating to compute updated state vars.
+   */
+  void _calcStressElastic(PylithScalar* const stress,
+			  const int stressSize,
+			  const PylithScalar* properties,
+			  const int numProperties,
+			  const PylithScalar* stateVars,
+			  const int numStateVars,
+			  const PylithScalar* totalStrain,
+			  const int strainSize,
+			  const PylithScalar* initialStress,
+			  const int initialStressSize,
+			  const PylithScalar* initialStrain,
+			  const int initialStrainSize,
+			  const bool computeStateVars);
+
+  /** Compute stress tensor from properties as an viscoelastic material.
+   *
+   * @param stress Array for stress tensor.
+   * @param stressSize Size of stress tensor.
+   * @param properties Properties at locations.
+   * @param numProperties Number of properties.
+   * @param stateVars State variables at locations.
+   * @param numStateVars Number of state variables.
+   * @param totalStrain Total strain at locations.
+   * @param strainSize Size of strain tensor.
+   * @param initialStress Initial stress values.
+   * @param initialStressSize Size of initial stress array.
+   * @param initialStrain Initial strain values.
+   * @param initialStrainSize Size of initial strain array.
+   * @param computeStateVars Flag indicating to compute updated state vars.
+   */
+  void _calcStressViscoelastic(PylithScalar* const stress,
+			       const int stressSize,
+			       const PylithScalar* properties,
+			       const int numProperties,
+			       const PylithScalar* stateVars,
+			       const int numStateVars,
+			       const PylithScalar* totalStrain,
+			       const int strainSize,
+			       const PylithScalar* initialStress,
+			       const int initialStressSize,
+			       const PylithScalar* initialStrain,
+			       const int initialStrainSize,
+			       const bool computeStateVars);
+
+  /** Compute derivatives of elasticity matrix from properties as an
+   * elastic material.
+   *
+   * @param elasticConsts Array for elastic constants.
+   * @param numElasticConsts Number of elastic constants.
+   * @param properties Properties at location.
+   * @param numProperties Number of properties.
+   * @param stateVars State variables at locations.
+   * @param numStateVars Number of state variables.
+   * @param totalStrain Total strain at location.
+   * @param strainSize Size of strain tensor.
+   * @param initialStress Initial stress values.
+   * @param initialStressSize Size of initial stress array.
+   * @param initialStrain Initial strain values.
+   * @param initialStrainSize Size of initial strain array.
+   */
+  void _calcElasticConstsElastic(PylithScalar* const elasticConsts,
+				 const int numElasticConsts,
+				 const PylithScalar* properties,
+				 const int numProperties,
+				 const PylithScalar* stateVars,
+				 const int numStateVars,
+				 const PylithScalar* totalStrain,
+				 const int strainSize,
+				 const PylithScalar* initialStress,
+				 const int initialStressSize,
+				 const PylithScalar* initialStrain,
+				 const int initialStrainSize);
+
+  /** Compute derivatives of elasticity matrix from properties as a
+   * viscoelastic material.
+   *
+   * @param elasticConsts Array for elastic constants.
+   * @param numElasticConsts Number of elastic constants.
+   * @param properties Properties at location.
+   * @param numProperties Number of properties.
+   * @param stateVars State variables at locations.
+   * @param numStateVars Number of state variables.
+   * @param totalStrain Total strain at location.
+   * @param strainSize Size of strain tensor.
+   * @param initialStress Initial stress values.
+   * @param initialStressSize Size of initial stress array.
+   * @param initialStrain Initial strain values.
+   * @param initialStrainSize Size of initial strain array.
+   */
+  void _calcElasticConstsViscoelastic(PylithScalar* const elasticConsts,
+				      const int numElasticConsts,
+				      const PylithScalar* properties,
+				      const int numProperties,
+				      const PylithScalar* stateVars,
+				      const int numStateVars,
+				      const PylithScalar* totalStrain,
+				      const int strainSize,
+				      const PylithScalar* initialStress,
+				      const int initialStressSize,
+				      const PylithScalar* initialStrain,
+				      const int initialStrainSize);
+
+  /** Update state variables after solve as an elastic material.
+   *
+   * @param stateVars State variables at locations.
+   * @param numStateVars Number of state variables.
+   * @param properties Properties at location.
+   * @param numProperties Number of properties.
+   * @param totalStrain Total strain at location.
+   * @param strainSize Size of strain tensor.
+   * @param initialStress Initial stress values.
+   * @param initialStressSize Size of initial stress array.
+   * @param initialStrain Initial strain values.
+   * @param initialStrainSize Size of initial strain array.
+   */
+  void _updateStateVarsElastic(PylithScalar* const stateVars,
+			       const int numStateVars,
+			       const PylithScalar* properties,
+			       const int numProperties,
+			       const PylithScalar* totalStrain,
+			       const int strainSize,
+			       const PylithScalar* initialStress,
+			       const int initialStressSize,
+			       const PylithScalar* initialStrain,
+			       const int initialStrainSize);
+
+  /** Update state variables after solve as a viscoelastic material.
+   *
+   * @param properties Properties at location.
+   * @param numProperties Number of properties.
+   * @param totalStrain Total strain at location.
+   * @param strainSize Size of strain tensor.
+   * @param initialState Initial state values.
+   * @param initialStateSize Size of initial state array.
+   */
+  void _updateStateVarsViscoelastic(PylithScalar* const stateVars,
+				    const int numStateVars,
+				    const PylithScalar* properties,
+				    const int numProperties,
+				    const PylithScalar* totalStrain,
+				    const int strainSize,
+				    const PylithScalar* initialStress,
+				    const int initialStressSize,
+				    const PylithScalar* initialStrain,
+				    const int initialStrainSize);
+
+
+  // PRIVATE STRUCTS ////////////////////////////////////////////////////
+private :
+
+  struct EffStressStruct {
+    PylithScalar ae;
+    PylithScalar b;
+    PylithScalar c;
+    PylithScalar d;
+    PylithScalar alpha;
+    PylithScalar dt;
+    PylithScalar effStressT;
+    PylithScalar powerLawExp;
+    PylithScalar referenceStrainRate;
+    PylithScalar referenceStress;
+  };
+
+  // PRIVATE MEMBERS ////////////////////////////////////////////////////
+private :
+
+  /// Structure to hold parameters for effective stress computation.
+  EffStressStruct _effStressParams;
+
+  /// Method to use for _calcElasticConsts().
+  calcElasticConsts_fn_type _calcElasticConstsFn;
+
+  /// Method to use for _calcStress().
+  calcStress_fn_type _calcStressFn;
+
+  /// Method to use for _updateStateVars().
+  updateStateVars_fn_type _updateStateVarsFn;
+
+  static const int p_density;
+  static const int p_mu;
+  static const int p_lambda;
+  static const int p_referenceStrainRate;
+  static const int p_referenceStress;
+  static const int p_powerLawExponent;
+  static const int db_density;
+  static const int db_vs;
+  static const int db_vp;
+  static const int db_referenceStrainRate;
+  static const int db_referenceStress;
+  static const int db_powerLawExponent;
+
+  static const int s_stressZZInitial;
+  static const int s_viscousStrain;
+  static const int s_stress4;
+  static const int db_stressZZInitial;
+  static const int db_viscousStrain;
+  static const int db_stress4;
+
+  // NOT IMPLEMENTED ////////////////////////////////////////////////////
+private :
+
+  PowerLawPlaneStrain(const PowerLawPlaneStrain&); ///< Not implemented
+  const PowerLawPlaneStrain& operator=(const PowerLawPlaneStrain&); ///< Not implemented
+
+}; // class PowerLawPlaneStrain
+
+#include "PowerLawPlaneStrain.icc" // inline methods
+
+#endif // pylith_materials_powerlawplanestrain_hh
+
+
+// End of file 

Copied: short/3D/PyLith/trunk/libsrc/pylith/materials/PowerLawPlaneStrain.icc (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/libsrc/pylith/materials/PowerLawPlaneStrain.icc)
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/materials/PowerLawPlaneStrain.icc	                        (rev 0)
+++ short/3D/PyLith/trunk/libsrc/pylith/materials/PowerLawPlaneStrain.icc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -0,0 +1,113 @@
+// -*- 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_materials_powerlawplanestrain_hh)
+#error "PowerLawPlaneStrain.icc can only be included from PowerLawPlaneStrain.hh"
+#endif
+
+#include <cassert> // USES assert()
+#include "pylith/utils/macrodefs.h" // USES CALL_MEMBER_FN
+
+// Set current time step.
+inline
+void
+pylith::materials::PowerLawPlaneStrain::timeStep(const PylithScalar dt) {
+  // Not sure what to do here.  If we are using full Newton the Jacobian will
+  // always need reforming, but SNES may opt not to reform it sometimes.
+  _needNewJacobian = true;
+  _dt = dt;
+} // timeStep
+
+// Compute stress tensor from parameters.
+inline
+void
+pylith::materials::PowerLawPlaneStrain::_calcStress(
+					PylithScalar* const stress,
+					const int stressSize,
+					const PylithScalar* properties,
+					const int numProperties,
+					const PylithScalar* stateVars,
+					const int numStateVars,
+					const PylithScalar* totalStrain,
+					const int strainSize,
+					const PylithScalar* initialStress,
+					const int initialStressSize,
+					const PylithScalar* initialStrain,
+					const int initialStrainSize,
+					const bool computeStateVars)
+{
+  assert(0 != _calcStressFn);
+  CALL_MEMBER_FN(*this, _calcStressFn)(stress, stressSize, 
+				       properties, numProperties,
+				       stateVars, numStateVars,
+				       totalStrain, strainSize,
+				       initialStress, initialStressSize,
+				       initialStrain, initialStrainSize,
+				       computeStateVars);
+} // _calcStress
+
+// Compute derivatives of elasticity matrix from parameters.
+inline
+void
+pylith::materials::PowerLawPlaneStrain::_calcElasticConsts(
+					PylithScalar* const elasticConsts,
+					const int numElasticConsts,
+					const PylithScalar* properties,
+					const int numProperties,
+					const PylithScalar* stateVars,
+					const int numStateVars,
+					const PylithScalar* totalStrain,
+					const int strainSize,
+					const PylithScalar* initialStress,
+					const int initialStressSize,
+					const PylithScalar* initialStrain,
+					const int initialStrainSize)
+{
+  assert(0 != _calcElasticConstsFn);
+  CALL_MEMBER_FN(*this, _calcElasticConstsFn)(elasticConsts, numElasticConsts,
+					      properties, numProperties,
+					      stateVars, numStateVars,
+					      totalStrain, strainSize,
+					      initialStress, initialStressSize,
+					      initialStrain, initialStrainSize);
+} // _calcElasticConsts
+
+// Update state variables after solve.
+inline
+void
+pylith::materials::PowerLawPlaneStrain::_updateStateVars(
+					PylithScalar* const stateVars,
+					const int numStateVars,
+					const PylithScalar* properties,
+					const int numProperties,
+					const PylithScalar* totalStrain,
+					const int strainSize,
+					const PylithScalar* initialStress,
+					const int initialStressSize,
+					const PylithScalar* initialStrain,
+					const int initialStrainSize)
+{
+  assert(0 != _updateStateVarsFn);
+  CALL_MEMBER_FN(*this, _updateStateVarsFn)(stateVars, numStateVars,
+					     properties, numProperties,
+					     totalStrain, strainSize,
+					     initialStress, initialStressSize,
+					     initialStrain, initialStrainSize);
+} // _updateStateVars
+
+// End of file 

Modified: short/3D/PyLith/trunk/libsrc/pylith/materials/materialsfwd.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/materials/materialsfwd.hh	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/materials/materialsfwd.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -47,6 +47,7 @@
     class GenMaxwellPlaneStrain;
     class GenMaxwellQpQsIsotropic3D;
     class PowerLaw3D;
+    class PowerLawPlaneStrain;
     class DruckerPrager3D;
     class DruckerPragerPlaneStrain;
 

Modified: short/3D/PyLith/trunk/libsrc/pylith/meshio/DataWriterHDF5.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/meshio/DataWriterHDF5.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/meshio/DataWriterHDF5.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/libsrc/pylith/meshio/DataWriterHDF5.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/meshio/DataWriterHDF5.hh	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/meshio/DataWriterHDF5.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/libsrc/pylith/meshio/DataWriterHDF5Ext.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/meshio/DataWriterHDF5Ext.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/meshio/DataWriterHDF5Ext.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/libsrc/pylith/meshio/DataWriterVTK.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/meshio/DataWriterVTK.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/meshio/DataWriterVTK.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/libsrc/pylith/meshio/MeshBuilder.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshBuilder.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshBuilder.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -54,7 +54,7 @@
   assert(coordinates);
   MPI_Comm comm = mesh->comm();
   int dim = meshDim;
-  int rank = 0;
+  const int commRank = mesh->commRank();
   PetscErrorCode err;
 
   { // Check to make sure every vertex is in at least one cell.
@@ -88,13 +88,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) {
@@ -239,7 +238,6 @@
 					    const int meshDim)
 { // buildFaultMesh
   int dim  = meshDim;
-  int rank = 0;
 
   assert(!fault.isNull());
 
@@ -247,15 +245,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/trunk/libsrc/pylith/meshio/MeshIOAscii.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshIOAscii.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshIOAscii.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/libsrc/pylith/meshio/MeshIOCubit.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshIOCubit.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshIOCubit.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/libsrc/pylith/meshio/MeshIOHDF5.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshIOHDF5.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshIOHDF5.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/libsrc/pylith/meshio/MeshIOLagrit.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshIOLagrit.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/meshio/MeshIOLagrit.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/libsrc/pylith/meshio/OutputSolnPoints.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/meshio/OutputSolnPoints.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/meshio/OutputSolnPoints.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -101,7 +101,7 @@
     pointsNondim[i] = points[i] / normalizer.lengthScale();
   } // for
 
-#if 1 // DEBUGGING
+#if 0 // DEBUGGING
   std::cout << "OUTPUT SOLN POINTS (dimensioned)" << std::endl;
   for (int i=0; i < numPoints; ++i) {
     for (int iDim=0; iDim < spaceDim; ++iDim) {
@@ -172,7 +172,7 @@
   ALE::OverlapBuilder<>::constructOverlap(emptyPoints, emptyRenumbering, sendOverlap, recvOverlap);
   _pointsMesh->sieveMesh()->setCalculatedOverlap(true);
 
-#if 1 // DEBUGGING
+#if 0 // DEBUGGING
   _pointsMesh->view("POINTS MESH");
 #endif
 

Modified: short/3D/PyLith/trunk/libsrc/pylith/meshio/Xdmf.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/meshio/Xdmf.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/meshio/Xdmf.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/libsrc/pylith/problems/Formulation.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/problems/Formulation.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/problems/Formulation.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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)
@@ -369,12 +387,21 @@
 void
 pylith::problems::Formulation::constrainSolnSpace(const PetscVec* tmpSolutionVec)
 { // constrainSolnSpace
-  assert(0 != tmpSolutionVec);
-  assert(0 != _fields);
+  assert(tmpSolutionVec);
+  assert(_fields);
 
+  topology::Field<topology::Mesh>& solution = _fields->solution();
+
+  if (!_fields->hasField("dispIncr adjust")) {
+    _fields->add("dispIncr adjust", "dispIncr_adjust");
+    topology::Field<topology::Mesh>& adjust = _fields->get("dispIncr adjust");
+    adjust.cloneSection(solution);
+  } // for
+  topology::Field<topology::Mesh>& adjust = _fields->get("dispIncr adjust");
+  adjust.zero();
+
   // Update section view of field.
-  if (0 != tmpSolutionVec) {
-    topology::Field<topology::Mesh>& solution = _fields->solution();
+  if (tmpSolutionVec) {
     solution.scatterVectorToSection(*tmpSolutionVec);
   } // if
 
@@ -390,9 +417,11 @@
     _submeshIntegrators[i]->constrainSolnSpace(_fields, _t, *_jacobian);
   } // for
 
+  adjust.complete();
+  solution += adjust;  
+
   // Update PETScVec of solution for changes to Lagrange multipliers.
-  if (0 != tmpSolutionVec) {
-    topology::Field<topology::Mesh>& solution = _fields->solution();
+  if (tmpSolutionVec) {
     solution.scatterSectionToVector(*tmpSolutionVec);
   } // if
 } // constrainSolnSpace

Modified: short/3D/PyLith/trunk/libsrc/pylith/problems/Formulation.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/problems/Formulation.hh	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/problems/Formulation.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/libsrc/pylith/problems/Solver.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/problems/Solver.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/problems/Solver.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -158,20 +158,17 @@
   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();
+  const bool separateComponents = formulation->splitFieldComponents();
 
   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);
-
-  const int spaceDim = sieveMesh->getDimension();
   if (formulation->splitFields() && 
       formulation->useCustomConstraintPC() &&
-      solutionSection->getNumSpaces() > sieveMesh->getDimension()) {
+      numSpaces > spaceDim) {
     // We have split fields with a custom constraint preconditioner
     // and constraints exist.
 
@@ -208,10 +205,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);
@@ -220,7 +217,157 @@
     } // switch
     _ctx.faultA = _jacobianPCFault;
   } // if
+
+  if (separateComponents) {
+    PetscMat* precon = new PetscMat[numSpaces];
+    for (int i=0; i < numSpaces; ++i) {
+      precon[i] = PETSC_NULL;
+    } // for
+    precon[numSpaces-1] = _jacobianPCFault;
+    constructFieldSplit(solutionSection, PETSC_DETERMINE, PETSC_NULL, PETSC_NULL, 
+			sieveMesh->getFactory()->getGlobalOrder(sieveMesh, "default", solutionSection), precon, PETSC_NULL, solution.vector(), *pc);
+    delete[] precon; precon = 0;
+  } else {
+    int numFields[2] = {spaceDim, (numSpaces > spaceDim) ? 1 : 0};
+    MatNullSpace nullsp[2] = {PETSC_NULL, PETSC_NULL};
+    PetscMat precon[2] = {PETSC_NULL, _jacobianPCFault};
+    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;
+    PetscVec mode[6];
+
+    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 (int f=0; f < numSpaces; ++f) {
+      fields[f] = f;
+    } // for
+    constructFieldSplit(solutionSection, 2, numFields, fields,
+                        sieveMesh->getFactory()->getGlobalOrder(sieveMesh, "default", solutionSection), precon, nullsp,
+                        solution.vector(), *pc);
+    err = MatNullSpaceDestroy(&nullsp[0]);CHECK_PETSC_ERROR(err);
+    delete[] fields;
+  } // if/else
 } // _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/trunk/libsrc/pylith/problems/Solver.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/problems/Solver.hh	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/problems/Solver.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/libsrc/pylith/problems/SolverLinear.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/problems/SolverLinear.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/problems/SolverLinear.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -125,25 +125,28 @@
   const ALE::Obj<SieveMesh>& sieveMesh = solution->mesh().sieveMesh();
   assert(!sieveMesh.isNull());
 
-#if 1 // :TODO: Does this get replaced by the use of the MatShell like SNES?
+#if 0 // OBSOLETE? Replaced by stuff in Solver?
   if (solutionSection->getNumSpaces() > sieveMesh->getDimension() &&
       _jacobianPCFault) {
     
     PetscPC pc = 0;
-    PetscKSP *ksps = 0;
-    PetscMat A = 0;
-    PylithInt num = 0;
+    PCCompositeType ctype;
     
     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);
+    err = PCFieldSplitGetType(pc, &ctype); CHECK_PETSC_ERROR(err);
+    if (ctype != PC_COMPOSITE_SCHUR) {
+      PetscKSP    *ksps = 0;
+      PylithInt    num  = 0;
+      PetscMat     A    = 0;
+      MatStructure flag;
 
-    MatStructure flag;
-    err = KSPGetOperators(ksps[num-1], &A, PETSC_NULL, &flag);CHECK_PETSC_ERROR(err);
-    err = PetscObjectReference((PetscObject) A);CHECK_PETSC_ERROR(err);
-    err = KSPSetOperators(ksps[num-1], A, _jacobianPCFault, flag);CHECK_PETSC_ERROR(err);
-    err = PetscFree(ksps);CHECK_PETSC_ERROR(err);
+      err = PCFieldSplitGetSubKSP(pc, &num, &ksps); CHECK_PETSC_ERROR(err);
+      err = KSPGetOperators(ksps[num-1], &A, PETSC_NULL, &flag);CHECK_PETSC_ERROR(err);
+      err = PetscObjectReference((PetscObject) A);CHECK_PETSC_ERROR(err);
+      err = KSPSetOperators(ksps[num-1], A, _jacobianPCFault, flag);CHECK_PETSC_ERROR(err);
+      err = PetscFree(ksps);CHECK_PETSC_ERROR(err);
+    }
   } // if
 #endif
 

Modified: short/3D/PyLith/trunk/libsrc/pylith/problems/SolverNonlinear.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/problems/SolverNonlinear.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/problems/SolverNonlinear.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -248,7 +248,7 @@
     SETERRQ(((PetscObject)linesearch)->comm, PETSC_ERR_USER, "SNESLineSearchBT requires a Jacobian matrix");
   }
   /* precheck */
-  ierr = SNESLineSearchPreCheck(linesearch, &changed_y);CHKERRQ(ierr);
+  ierr = SNESLineSearchPreCheck(linesearch,X,Y,&changed_y);CHKERRQ(ierr);
   ierr = SNESLineSearchSetSuccess(linesearch, PETSC_TRUE);CHKERRQ(ierr);
 
   ierr = VecNorm(Y, NORM_2, &ynorm);CHKERRQ(ierr);
@@ -276,7 +276,7 @@
 
 #if defined(PYLITH_CUSTOM_LINESEARCH)
   // Place reasonable absolute limit on minimum lambda
-  minlambda = std::max(steptol/rellength, 1.0/PYLITH_MAXSCALAR);
+  minlambda = std::max(steptol/rellength, PylithScalar(1.0)/PYLITH_MAXSCALAR);
 #else // ORIGINAL
   minlambda = steptol/rellength;
 #endif
@@ -460,7 +460,7 @@
   }
 
   /* postcheck */
-  ierr = SNESLineSearchPostCheck(linesearch, &changed_y, &changed_w);CHKERRQ(ierr);
+  ierr = SNESLineSearchPostCheck(linesearch,X,Y,W,&changed_y,&changed_w);CHKERRQ(ierr);
   if (changed_y) {
     ierr = VecWAXPY(W,-lambda,Y,X);CHKERRQ(ierr);
     if (linesearch->ops->viproject) {

Modified: short/3D/PyLith/trunk/libsrc/pylith/topology/Distributor.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/topology/Distributor.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/topology/Distributor.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/libsrc/pylith/topology/Mesh.hh
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/topology/Mesh.hh	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/topology/Mesh.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -179,6 +179,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/trunk/libsrc/pylith/topology/Mesh.icc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/topology/Mesh.icc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/topology/Mesh.icc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -108,6 +108,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/trunk/libsrc/pylith/topology/RefineEdges2.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/topology/RefineEdges2.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/topology/RefineEdges2.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/libsrc/pylith/topology/ReverseCuthillMcKee.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/topology/ReverseCuthillMcKee.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/topology/ReverseCuthillMcKee.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/libsrc/pylith/utils/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/utils/Makefile.am	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/utils/Makefile.am	2012-06-25 17:37:03 UTC (rev 20406)
@@ -32,6 +32,7 @@
 	petscerror.h \
 	sievefwd.hh \
 	sievetypes.hh \
+        types.hh \
 	utilsfwd.hh
 
 noinst_HEADERS = 

Modified: short/3D/PyLith/trunk/libsrc/pylith/utils/constdefs.h
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/utils/constdefs.h	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/libsrc/pylith/utils/constdefs.h	2012-06-25 17:37:03 UTC (rev 20406)
@@ -30,7 +30,7 @@
 namespace pylith {
   static const double PYLITH_MAXDOUBLE = 1.0e+99;
   static const float PYLITH_MAXFLOAT = 1.0e+30;
-  static const PylithScalar PYLITH_MAXSCALAR = (sizeof(PylithScalar) == sizeof(double)) ? PYLITH_MAXDOUBLE : PYLITH_MAXSCALAR;
+  static const PylithScalar PYLITH_MAXSCALAR = (sizeof(PylithScalar) == sizeof(double)) ? PYLITH_MAXDOUBLE : PYLITH_MAXFLOAT;
 }
     
 

Modified: short/3D/PyLith/trunk/modulesrc/bc/TimeDependent.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/bc/TimeDependent.i	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/modulesrc/bc/TimeDependent.i	2012-06-25 17:37:03 UTC (rev 20406)
@@ -24,7 +24,7 @@
 namespace pylith {
   namespace bc {
 
-    class pylith::bc::TimeDependent
+    class TimeDependent
     { // class TimeDependent
 
       // PUBLIC METHODS /////////////////////////////////////////////////
@@ -81,13 +81,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;
-      
     }; // class TimeDependent
 
   } // bc

Modified: short/3D/PyLith/trunk/modulesrc/faults/BruneSlipFn.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/faults/BruneSlipFn.i	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/modulesrc/faults/BruneSlipFn.i	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/modulesrc/faults/ConstRateSlipFn.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/faults/ConstRateSlipFn.i	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/modulesrc/faults/ConstRateSlipFn.i	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/modulesrc/faults/EqKinSrc.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/faults/EqKinSrc.i	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/modulesrc/faults/EqKinSrc.i	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/modulesrc/faults/FaultCohesiveDyn.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/faults/FaultCohesiveDyn.i	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/modulesrc/faults/FaultCohesiveDyn.i	2012-06-25 17:37:03 UTC (rev 20406)
@@ -41,11 +41,11 @@
       virtual
       void deallocate(void);
       
-      /** Sets the spatial database for the inital tractions.
+      /** Sets the traction perturbation for prescribed tractions.
        *
-       * @param db spatial database for initial tractions
+       * @param tract Spatial and temporal variation of tractions.
        */
-      void dbInitialTract(spatialdata::spatialdb::SpatialDB* db);
+      void tractPerturbation(TractPerturbation* tract);
   
       /** Set the friction (constitutive) model.
        *
@@ -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/trunk/modulesrc/faults/FaultCohesiveImpulses.i (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/modulesrc/faults/FaultCohesiveImpulses.i)
===================================================================
--- short/3D/PyLith/trunk/modulesrc/faults/FaultCohesiveImpulses.i	                        (rev 0)
+++ short/3D/PyLith/trunk/modulesrc/faults/FaultCohesiveImpulses.i	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/modulesrc/faults/LiuCosSlipFn.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/faults/LiuCosSlipFn.i	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/modulesrc/faults/LiuCosSlipFn.i	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/modulesrc/faults/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/modulesrc/faults/Makefile.am	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/modulesrc/faults/Makefile.am	2012-06-25 17:37:03 UTC (rev 20406)
@@ -32,11 +32,13 @@
 	LiuCosSlipFn.i \
 	TimeHistorySlipFn.i \
 	EqKinSrc.i \
+	TractPerturbation.i \
 	Fault.i \
 	FaultCohesive.i \
 	FaultCohesiveLagrange.i \
 	FaultCohesiveKin.i \
 	FaultCohesiveDyn.i \
+	FaultCohesiveImpulses.i \
 	FaultCohesiveTract.i \
 	../topology/SubMesh.i \
 	../feassemble/Quadrature.i \

Modified: short/3D/PyLith/trunk/modulesrc/faults/SlipTimeFn.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/faults/SlipTimeFn.i	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/modulesrc/faults/SlipTimeFn.i	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/modulesrc/faults/StepSlipFn.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/faults/StepSlipFn.i	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/modulesrc/faults/StepSlipFn.i	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/modulesrc/faults/TimeHistorySlipFn.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/faults/TimeHistorySlipFn.i	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/modulesrc/faults/TimeHistorySlipFn.i	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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.

Copied: short/3D/PyLith/trunk/modulesrc/faults/TractPerturbation.i (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/modulesrc/faults/TractPerturbation.i)
===================================================================
--- short/3D/PyLith/trunk/modulesrc/faults/TractPerturbation.i	                        (rev 0)
+++ short/3D/PyLith/trunk/modulesrc/faults/TractPerturbation.i	2012-06-25 17:37:03 UTC (rev 20406)
@@ -0,0 +1,105 @@
+// -*- 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/TractPerturbation.i
+ *
+ * @brief Python interface to C++ TractPerturbation object.
+ */
+
+namespace pylith {
+  namespace faults {
+
+    class TractPerturbation : public pylith::bc::TimeDependent
+    { // class TractPerturbation
+
+      // 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);
+      
+      /** Get parameter fields.
+       *
+       * @returns Parameter fields.
+       */
+      const pylith::topology::FieldsNew<pylith::topology::SubMesh>* parameterFields(void) const;
+      
+      /** Initialize slip time function.
+       *
+       * @param faultMesh Finite-element mesh of fault.
+       * @param faultOrientation Orientation of fault.
+       * @param normalizer Nondimensionalization of scales.
+       */
+      void initialize(const pylith::topology::SubMesh& faultMesh,
+		      const pylith::topology::Field<pylith::topology::SubMesh>& faultOrientation,
+		      const spatialdata::units::Nondimensional& normalizer);
+      
+      /** Calculate spatial and temporal variation of value.
+       *
+       * @param t Current time.
+       */
+      void calculate(const PylithScalar t);
+      
+      /** Determine if perturbation has a given parameter.
+       *
+       * @param name Name of parameter field.
+       * @returns True if perturbation has parameter field, false otherwise.
+       */
+      bool hasParameter(const char* name) const;
+
+      /** Get vertex field with traction perturbation information.
+       *
+       * @param name Name of field.
+       * @param fields Solution fields.
+       *
+       * @returns Traction vector field.
+       */
+      const pylith::topology::Field<pylith::topology::SubMesh>&
+      vertexField(const char* name,
+		  pylith::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;
+
+    }; // class TractPerturbation
+    
+  } // faults
+} // pylith
+
+
+// End of file 

Modified: short/3D/PyLith/trunk/modulesrc/faults/faults.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/faults/faults.i	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/modulesrc/faults/faults.i	2012-06-25 17:37:03 UTC (rev 20406)
@@ -28,11 +28,13 @@
 #include "pylith/faults/LiuCosSlipFn.hh"
 #include "pylith/faults/TimeHistorySlipFn.hh"
 #include "pylith/faults/EqKinSrc.hh"
+#include "pylith/faults/TractPerturbation.hh"
 #include "pylith/faults/Fault.hh"
 #include "pylith/faults/FaultCohesive.hh"
 #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"
@@ -69,6 +71,7 @@
 %include "../topology/SubMesh.i" // ISA Integrator<Quadrature<SubMesh> >
 %include "../feassemble/Quadrature.i" // ISA Integrator<Quadrature<SubMesh> >
 %include "../feassemble/Integrator.i" // ISA Integrator<Quadrature<SubMesh> >
+%include "../bc/TimeDependent.i" // ISA TimeDependent
 
 // Template instatiation
 %template(SubMeshIntegrator) pylith::feassemble::Integrator<pylith::feassemble::Quadrature<pylith::topology::SubMesh > >;
@@ -80,11 +83,13 @@
 %include "LiuCosSlipFn.i"
 %include "TimeHistorySlipFn.i"
 %include "EqKinSrc.i"
+%include "TractPerturbation.i"
 %include "Fault.i"
 %include "FaultCohesive.i"
 %include "FaultCohesiveLagrange.i"
 %include "FaultCohesiveKin.i"
 %include "FaultCohesiveDyn.i"
+%include "FaultCohesiveImpulses.i"
 %include "FaultCohesiveTract.i"
 
 // End of file

Modified: short/3D/PyLith/trunk/modulesrc/materials/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/modulesrc/materials/Makefile.am	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/modulesrc/materials/Makefile.am	2012-06-25 17:37:03 UTC (rev 20406)
@@ -38,6 +38,7 @@
 	GenMaxwellPlaneStrain.i \
 	GenMaxwellQpQsIsotropic3D.i \
 	PowerLaw3D.i \
+	PowerLawPlaneStrain.i \
 	DruckerPrager3D.i \
 	DruckerPragerPlaneStrain.i
 

Copied: short/3D/PyLith/trunk/modulesrc/materials/PowerLawPlaneStrain.i (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/modulesrc/materials/PowerLawPlaneStrain.i)
===================================================================
--- short/3D/PyLith/trunk/modulesrc/materials/PowerLawPlaneStrain.i	                        (rev 0)
+++ short/3D/PyLith/trunk/modulesrc/materials/PowerLawPlaneStrain.i	2012-06-25 17:37:03 UTC (rev 20406)
@@ -0,0 +1,224 @@
+// -*- 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/materials/PowerLawPlaneStrain.i
+ *
+ * @brief Python interface to C++ PowerLawPlaneStrain object.
+ */
+
+namespace pylith {
+  namespace materials {
+
+    class pylith::materials::PowerLawPlaneStrain : public ElasticMaterial
+    { // class PowerLawPlaneStrain
+
+      // PUBLIC METHODS /////////////////////////////////////////////////
+    public :
+
+      /// Default constructor
+      PowerLawPlaneStrain(void);
+      
+      /// Destructor
+      ~PowerLawPlaneStrain(void);
+      
+      /** Set current time step.
+       *
+       * @param dt Current time step.
+       */
+      void timeStep(const PylithScalar dt);
+      
+      /** Set whether elastic or inelastic constitutive relations are used.
+       *
+       * @param flag True to use elastic, false to use inelastic.
+       */
+      void useElasticBehavior(const bool flag);
+      
+      // PROTECTED METHODS //////////////////////////////////////////////
+    protected :
+
+      /** Compute properties from values in spatial database.
+       *
+       * Order of values in arrays matches order used in dbValues() and
+       * parameterNames().
+       *
+       * @param propValues Array of property values.
+       * @param dbValues Array of database values.
+       */
+      void _dbToProperties(PylithScalar* const propValues,
+			   const pylith::scalar_array& dbValues);
+      
+      /** Nondimensionalize properties.
+       *
+       * @param values Array of property values.
+       * @param nvalues Number of values.
+       */
+      void _nondimProperties(PylithScalar* const values,
+			     const int nvalues) const;
+      
+      /** Dimensionalize properties.
+       *
+       * @param values Array of property values.
+       * @param nvalues Number of values.
+       */
+      void _dimProperties(PylithScalar* const values,
+			  const int nvalues) const;
+      
+      /** Compute initial state variables from values in spatial database.
+       *
+       * @param stateValues Array of state variable values.
+       * @param dbValues Array of database values.
+       */
+      void _dbToStateVars(PylithScalar* const stateValues,
+			  const pylith::scalar_array& dbValues);
+      
+      /** Nondimensionalize state variables..
+       *
+       * @param values Array of state variables.
+       * @param nvalues Number of values.
+       */
+      void _nondimStateVars(PylithScalar* const values,
+			    const int nvalues) const;
+      
+      /** Dimensionalize state variables.
+       *
+       * @param values Array of state variables.
+       * @param nvalues Number of values.
+       */
+      void _dimStateVars(PylithScalar* const values,
+			 const int nvalues) const;
+      
+      /** Compute density from properties.
+       *
+       * @param density Array for density.
+       * @param properties Properties at location.
+       * @param numProperties Number of properties.
+       * @param stateVars State variables at location.
+       * @param numStateVars Number of state variables.
+       */
+      void _calcDensity(PylithScalar* const density,
+			const PylithScalar* properties,
+			const int numProperties,
+			const PylithScalar* stateVars,
+			const int numStateVars);
+      
+      /** Compute stress tensor from properties and state variables. If
+       * the state variables are from the previous time step, then the
+       * computeStateVars flag should be set to true so that the state
+       * variables are updated (but not stored) when computing the stresses.
+       *
+       * @param stress Array for stress tensor.
+       * @param stressSize Size of stress tensor.
+       * @param properties Properties at location.
+       * @param numProperties Number of properties.
+       * @param stateVars State variables at location.
+       * @param numStateVars Number of state variables.
+       * @param totalStrain Total strain at location.
+       * @param strainSize Size of strain tensor.
+       * @param initialStress Initial stress values.
+       * @param initialStressSize Size of initial stress array.
+       * @param initialStrain Initial strain values.
+       * @param initialStrainSize Size of initial strain array.
+       * @param computeStateVars Flag indicating to compute updated
+       * state variables.
+       */
+      void _calcStress(PylithScalar* const stress,
+		       const int stressSize,
+		       const PylithScalar* properties,
+		       const int numProperties,
+		       const PylithScalar* stateVars,
+		       const int numStateVars,
+		       const PylithScalar* totalStrain,
+		       const int strainSize,
+		       const PylithScalar* initialStress,
+		       const int initialStressSize,
+		       const PylithScalar* initialStrain,
+		       const int initialStrainSize,
+		       const bool computeStateVars);
+      
+      /** Compute derivatives of elasticity matrix from properties.
+       *
+       * @param elasticConsts Array for elastic constants.
+       * @param numElasticConsts Number of elastic constants.
+       * @param properties Properties at location.
+       * @param numProperties Number of properties.
+       * @param stateVars State variables at location.
+       * @param numStateVars Number of state variables.
+       * @param totalStrain Total strain at location.
+       * @param strainSize Size of strain tensor.
+       * @param initialStress Initial stress values.
+       * @param initialStressSize Size of initial stress array.
+       * @param initialStrain Initial strain values.
+       * @param initialStrainSize Size of initial strain array.
+       */
+      void _calcElasticConsts(PylithScalar* const elasticConsts,
+			      const int numElasticConsts,
+			      const PylithScalar* properties,
+			      const int numProperties,
+			      const PylithScalar* stateVars,
+			      const int numStateVars,
+			      const PylithScalar* totalStrain,
+			      const int strainSize,
+			      const PylithScalar* initialStress,
+			      const int initialStressSize,
+			      const PylithScalar* initialStrain,
+			      const int initialStrainSize);
+      
+      /** Get stable time step for implicit time integration.
+       *
+       * @param properties Properties at location.
+       * @param numProperties Number of properties.
+       * @param stateVars State variables at location.
+       * @param numStateVars Number of state variables.
+       *
+       * @returns Time step
+       */
+      PylithScalar _stableTimeStepImplicit(const PylithScalar* properties,
+				     const int numProperties,
+				     const PylithScalar* stateVars,
+				     const int numStateVars) const;
+      
+      /** Update state variables (for next time step).
+       *
+       * @param stateVars State variables at location.
+       * @param numStateVars Number of state variables.
+       * @param properties Properties at location.
+       * @param numProperties Number of properties.
+       * @param totalStrain Total strain at location.
+       * @param strainSize Size of strain tensor.
+       * @param initialStress Initial stress values.
+       * @param initialStressSize Size of initial stress array.
+       * @param initialStrain Initial strain values.
+       * @param initialStrainSize Size of initial strain array.
+       */
+      void _updateStateVars(PylithScalar* const stateVars,
+			    const int numStateVars,
+			    const PylithScalar* properties,
+			    const int numProperties,
+			    const PylithScalar* totalStrain,
+			    const int strainSize,
+			    const PylithScalar* initialStress,
+			    const int initialStressSize,
+			    const PylithScalar* initialStrain,
+			    const int initialStrainSize);
+
+    }; // class PowerLawPlaneStrain
+
+  } // materials
+} // pylith
+
+// End of file 

Modified: short/3D/PyLith/trunk/modulesrc/materials/materials.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/materials/materials.i	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/modulesrc/materials/materials.i	2012-06-25 17:37:03 UTC (rev 20406)
@@ -38,6 +38,7 @@
 #include "pylith/materials/GenMaxwellPlaneStrain.hh"
 #include "pylith/materials/GenMaxwellQpQsIsotropic3D.hh"
 #include "pylith/materials/PowerLaw3D.hh"
+#include "pylith/materials/PowerLawPlaneStrain.hh"
 #include "pylith/materials/DruckerPrager3D.hh"
 #include "pylith/materials/DruckerPragerPlaneStrain.hh"
 
@@ -82,6 +83,7 @@
 %include "GenMaxwellPlaneStrain.i"
 %include "GenMaxwellQpQsIsotropic3D.i"
 %include "PowerLaw3D.i"
+%include "PowerLawPlaneStrain.i"
 %include "DruckerPrager3D.i"
 %include "DruckerPragerPlaneStrain.i"
 

Modified: short/3D/PyLith/trunk/modulesrc/problems/Formulation.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/problems/Formulation.i	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/modulesrc/problems/Formulation.i	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/playpen/euler/euler.cfg
===================================================================
--- short/3D/PyLith/trunk/playpen/euler/euler.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/playpen/euler/euler.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [euler]
 
 # Top-level info

Modified: short/3D/PyLith/trunk/playpen/faultfaces/test/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/playpen/faultfaces/test/pylithapp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/playpen/faultfaces/test/pylithapp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 #nodes = 4
 
@@ -76,21 +75,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 +98,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 +111,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 +124,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 +137,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/trunk/playpen/postproc/fault/faultinfo.cfg
===================================================================
--- short/3D/PyLith/trunk/playpen/postproc/fault/faultinfo.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/playpen/postproc/fault/faultinfo.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [faultinfo]
 
 # Top-level info

Modified: short/3D/PyLith/trunk/playpen/postproc/princaxes.cfg
===================================================================
--- short/3D/PyLith/trunk/playpen/postproc/princaxes.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/playpen/postproc/princaxes.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [princaxes]
 
 # Top-level info

Modified: short/3D/PyLith/trunk/playpen/postproc/vtkcff.cfg
===================================================================
--- short/3D/PyLith/trunk/playpen/postproc/vtkcff.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/playpen/postproc/vtkcff.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [vtkcff]
 
 # Top-level info

Modified: short/3D/PyLith/trunk/playpen/postproc/vtkdiff.cfg
===================================================================
--- short/3D/PyLith/trunk/playpen/postproc/vtkdiff.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/playpen/postproc/vtkdiff.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [vtkdiff]
 
 # Top-level info

Modified: short/3D/PyLith/trunk/playpen/powerlaw/powerlaw_gendb.cfg
===================================================================
--- short/3D/PyLith/trunk/playpen/powerlaw/powerlaw_gendb.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/playpen/powerlaw/powerlaw_gendb.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [powerlaw_gendb]
 
 reference_value = strain_rate

Modified: short/3D/PyLith/trunk/playpen/quadratic/twohex27/axialdisp.cfg
===================================================================
--- short/3D/PyLith/trunk/playpen/quadratic/twohex27/axialdisp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/playpen/quadratic/twohex27/axialdisp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # The settings in this file (axialdisp.cfg) will be read if it is
 # specified on the command line:

Modified: short/3D/PyLith/trunk/playpen/quadratic/twohex27/dislocation.cfg
===================================================================
--- short/3D/PyLith/trunk/playpen/quadratic/twohex27/dislocation.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/playpen/quadratic/twohex27/dislocation.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # The settings in this file (dislocation.cfg) will be read if it is
 # specified on the command line:

Modified: short/3D/PyLith/trunk/playpen/quadratic/twohex27/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/playpen/quadratic/twohex27/pylithapp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/playpen/quadratic/twohex27/pylithapp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # The settings in this file (pylithapp.cfg) will be read automatically
 # by pylith, as long as the file is placed in the run directory.

Modified: short/3D/PyLith/trunk/playpen/quadratic/twoquad9/axialdisp.cfg
===================================================================
--- short/3D/PyLith/trunk/playpen/quadratic/twoquad9/axialdisp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/playpen/quadratic/twoquad9/axialdisp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # To run this problem, type "pylith axialdisp.cfg". The settings in
 # pylithapp.cfg will be read by default. See the README for how to run

Modified: short/3D/PyLith/trunk/playpen/quadratic/twoquad9/dislocation.cfg
===================================================================
--- short/3D/PyLith/trunk/playpen/quadratic/twoquad9/dislocation.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/playpen/quadratic/twoquad9/dislocation.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # The settings in this file (dislocation.cfg) will be read if it is
 # specified on the command line:

Modified: short/3D/PyLith/trunk/playpen/quadratic/twoquad9/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/playpen/quadratic/twoquad9/pylithapp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/playpen/quadratic/twoquad9/pylithapp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # The settings in this file (pylithapp.cfg) will be read automatically
 # by pylith, as long as the file is placed in the run directory.

Modified: short/3D/PyLith/trunk/playpen/quadratic/twotet10/dislocation.cfg
===================================================================
--- short/3D/PyLith/trunk/playpen/quadratic/twotet10/dislocation.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/playpen/quadratic/twotet10/dislocation.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # The settings in this file (dislocation.cfg) will be read if it is
 # specified on the command line:
@@ -79,7 +78,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/trunk/playpen/quadratic/twotet10/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/playpen/quadratic/twotet10/pylithapp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/playpen/quadratic/twotet10/pylithapp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # The settings in this file (pylithapp.cfg) will be read automatically
 # by pylith, as long as the file is placed in the run directory.
@@ -84,7 +83,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/trunk/playpen/reordering/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/playpen/reordering/pylithapp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/playpen/reordering/pylithapp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 [pylithapp]
 
@@ -45,7 +44,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/trunk/playpen/savpres_ss/savpres_ss.cfg
===================================================================
--- short/3D/PyLith/trunk/playpen/savpres_ss/savpres_ss.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/playpen/savpres_ss/savpres_ss.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [savpres_ss]
 
 # Top-level info

Modified: short/3D/PyLith/trunk/pylith/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/pylith/Makefile.am	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/pylith/Makefile.am	2012-06-25 17:37:03 UTC (rev 20406)
@@ -36,16 +36,18 @@
 	faults/BruneSlipFn.py \
 	faults/ConstRateSlipFn.py \
 	faults/EqKinSrc.py \
+	faults/LiuCosSlipFn.py \
+	faults/SingleRupture.py \
+	faults/SlipTimeFn.py \
+	faults/StepSlipFn.py \
+	faults/TimeHistorySlipFn.py \
+	faults/TractPerturbation.py \
 	faults/Fault.py \
 	faults/FaultCohesive.py \
 	faults/FaultCohesiveKin.py \
 	faults/FaultCohesiveDyn.py \
+	faults/FaultCohesiveImpulses.py \
 	faults/FaultCohesiveTract.py \
-	faults/LiuCosSlipFn.py \
-	faults/SingleRupture.py \
-	faults/SlipTimeFn.py \
-	faults/StepSlipFn.py \
-	faults/TimeHistorySlipFn.py \
 	feassemble/__init__.py \
 	feassemble/Constraint.py \
 	feassemble/ElasticityExplicit.py \
@@ -85,6 +87,7 @@
 	materials/MaxwellIsotropic3D.py \
 	materials/MaxwellPlaneStrain.py \
 	materials/PowerLaw3D.py \
+	materials/PowerLawPlaneStrain.py \
 	materials/DruckerPrager3D.py \
 	materials/DruckerPragerPlaneStrain.py \
 	meshio/__init__.py \
@@ -108,6 +111,7 @@
 	meshio/OutputSoln.py \
 	meshio/OutputFaultKin.py \
 	meshio/OutputFaultDyn.py \
+	meshio/OutputFaultImpulses.py \
 	meshio/OutputMatElastic.py \
 	meshio/OutputNeumann.py \
 	meshio/OutputSolnSubset.py \
@@ -145,6 +149,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/trunk/pylith/bc/DirichletBoundary.py
===================================================================
--- short/3D/PyLith/trunk/pylith/bc/DirichletBoundary.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/pylith/bc/DirichletBoundary.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -26,6 +26,8 @@
 from DirichletBC import DirichletBC
 from bc import DirichletBoundary as ModuleDirichletBoundary
 
+from pylith.utils.NullComponent import NullComponent
+
 # DirichletBoundary class
 class DirichletBoundary(DirichletBC, ModuleDirichletBoundary):
   """
@@ -69,12 +71,7 @@
     self._loggingPrefix = "DiBC "
     self.availableFields = \
         {'vertex': \
-           {'info': ["initial-value", 
-                     "rate-of-change", 
-                     "change-in-value", 
-                     "rate-start-time", 
-                     "change-start-time",
-                     ],
+           {'info': [],
             'data': []},
          'cell': \
            {'info': [],
@@ -88,6 +85,15 @@
     """
     DirichletBC.preinitialize(self, mesh)
     self.output.preinitialize(self)
+
+    fields = []
+    if not isinstance(self.inventory.dbInitial, NullComponent):
+      fields += ["initial_value"]
+    if not isinstance(self.inventory.dbRate, NullComponent):
+      fields += ["rate_of_change", "rate_start_time"]
+    if not isinstance(self.inventory.dbChange, NullComponent):
+      fields += ["change_in_value", "change_start_time"]
+    self.availableFields['vertex']['info'] += fields
     return
 
 

Modified: short/3D/PyLith/trunk/pylith/bc/Neumann.py
===================================================================
--- short/3D/PyLith/trunk/pylith/bc/Neumann.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/pylith/bc/Neumann.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -27,6 +27,8 @@
 from pylith.feassemble.Integrator import Integrator
 from bc import Neumann as ModuleNeumann
 
+from pylith.utils.NullComponent import NullComponent
+
 # Neumann class
 class Neumann(BoundaryCondition, 
               TimeDependent,
@@ -68,12 +70,7 @@
            {'info': [],
             'data': []},
          'cell': \
-           {'info': ["initial-value",
-                     "rate-of-change",
-                     "rate-start-time",
-                     "change-in-value",
-                     "change-start-time",
-                     ],
+           {'info': [],
             'data': []}}
     return
 
@@ -88,6 +85,15 @@
     self.quadrature(self.bcQuadrature)
     self.createSubMesh(mesh)
     self.output.preinitialize(self)
+
+    fields = []
+    if not isinstance(self.inventory.dbInitial, NullComponent):
+      fields += ["initial_value"]
+    if not isinstance(self.inventory.dbRate, NullComponent):
+      fields += ["rate_of_change", "rate_start_time"]
+    if not isinstance(self.inventory.dbChange, NullComponent):
+      fields += ["change_in_value", "change_start_time"]
+    self.availableFields['cell']['info'] += fields
     return
 
 

Modified: short/3D/PyLith/trunk/pylith/faults/Fault.py
===================================================================
--- short/3D/PyLith/trunk/pylith/faults/Fault.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/pylith/faults/Fault.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/pylith/faults/FaultCohesiveDyn.py
===================================================================
--- short/3D/PyLith/trunk/pylith/faults/FaultCohesiveDyn.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/pylith/faults/FaultCohesiveDyn.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -43,9 +43,12 @@
   
   \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.
+  @li \b tract_perturbation Prescribed perturbation in fault tractions.
   @li \b friction Fault constitutive model.
   @li \b output Output manager associated with fault data.
 
@@ -60,9 +63,14 @@
                                        validator=pyre.inventory.greaterEqual(0.0))
   zeroTolerance.meta['tip'] = "Tolerance for detecting zero values."
 
-  db = pyre.inventory.facility("db_initial_tractions", family="spatial_database",
+  openFreeSurf = pyre.inventory.bool("open_free_surface", default=True)
+  openFreeSurf.meta['tip'] = "If True, enforce traction free surface when " \
+    "the fault opens, otherwise use initial tractions even when the " \
+    "fault opens."
+
+  tract = pyre.inventory.facility("traction_perturbation", family="traction_perturbation",
                                factory=NullComponent)
-  db.meta['tip'] = "Spatial database for initial tractions."
+  tract.meta['tip'] = "Prescribed perturbation in fault tractions."
 
   from pylith.friction.StaticFriction import StaticFriction
   friction = pyre.inventory.facility("friction", family="friction_model",
@@ -116,8 +124,9 @@
       self.availableFields['vertex']['info'] += ["strike_dir",
                                                  "dip_dir"]
 
-    if not isinstance(self.inventory.db, NullComponent):
-      self.availableFields['vertex']['info'] += ["initial_traction"]
+    if not isinstance(self.tract, NullComponent):
+      self.tract.preinitialize(mesh)
+      self.availableFields['vertex']['info'] += self.tract.availableFields['vertex']['info']
 
     self.availableFields['vertex']['info'] += \
         self.friction.availableFields['vertex']['info']
@@ -201,10 +210,11 @@
     Setup members using inventory.
     """
     FaultCohesive._configure(self)
-    if not isinstance(self.inventory.db, NullComponent):
-      ModuleFaultCohesiveDyn.dbInitialTract(self, self.inventory.db)
+    if not isinstance(self.inventory.tract, NullComponent):
+      ModuleFaultCohesiveDyn.tractPerturbation(self, self.inventory.tract)
     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/trunk/pylith/faults/FaultCohesiveImpulses.py (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/pylith/faults/FaultCohesiveImpulses.py)
===================================================================
--- short/3D/PyLith/trunk/pylith/faults/FaultCohesiveImpulses.py	                        (rev 0)
+++ short/3D/PyLith/trunk/pylith/faults/FaultCohesiveImpulses.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -0,0 +1,247 @@
+#!/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)
+  threshold.meta['tip'] = "Threshold for non-zero amplitude."
+
+  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",
+                     "area",],
+            '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 

Copied: short/3D/PyLith/trunk/pylith/faults/TractPerturbation.py (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/pylith/faults/TractPerturbation.py)
===================================================================
--- short/3D/PyLith/trunk/pylith/faults/TractPerturbation.py	                        (rev 0)
+++ short/3D/PyLith/trunk/pylith/faults/TractPerturbation.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -0,0 +1,94 @@
+#!/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/TractPerturbation.py
+##
+
+## @brief Python object for managing parameters for a kinematic
+## earthquake sources.
+##
+## TractPerturbation is responsible for providing the value of
+## specified traction at time t over a fault surface.
+##
+## Factory: eq_kinematic_src
+
+from pylith.bc.TimeDependent import TimeDependent
+from faults import TractPerturbation as ModuleTractPerturbation
+
+from pylith.utils.NullComponent import NullComponent
+
+# TractPerturbation class
+class TractPerturbation(TimeDependent, ModuleTractPerturbation):
+  """
+  Python object for managing specified tractions on a fault surface.
+
+  Factory: traction_perturbation
+  """
+
+  # PUBLIC METHODS /////////////////////////////////////////////////////
+
+  def __init__(self, name="tractperturbation"):
+    """
+    Constructor.
+    """
+    TimeDependent.__init__(self, name)
+    self._createModuleObj()
+    self._loggingPrefix = "TrPt "
+    return
+
+
+  def preinitialize(self, mesh):
+    """
+    Do pre-initialization setup.
+    """
+    fields = []
+    if not isinstance(self.inventory.dbInitial, NullComponent):
+      fields += ["traction_initial_value"]
+    if not isinstance(self.inventory.dbRate, NullComponent):
+      fields += ["traction_rate_of_change", "traction_rate_start_time"]
+    if not isinstance(self.inventory.dbChange, NullComponent):
+      fields += ["traction_change_in_value", "traction_change_start_time"]
+
+    self.availableFields = \
+        {'vertex': {'info': fields,
+                    'data': []},
+         'cell': {'info': [],
+                  'data': []}}
+    return
+  
+
+  # PRIVATE METHODS ////////////////////////////////////////////////////
+
+  def _createModuleObj(self):
+    """
+    Create handle to corresponding C++ object.
+    """
+    ModuleTractPerturbation.__init__(self)
+    return
+  
+
+# FACTORIES ////////////////////////////////////////////////////////////
+
+def traction_perturbation():
+  """
+  Factory associated with TractPerturbation.
+  """
+  return TractPerturbation()
+
+
+# End of file 

Modified: short/3D/PyLith/trunk/pylith/feassemble/FIATLagrange.py
===================================================================
--- short/3D/PyLith/trunk/pylith/feassemble/FIATLagrange.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/pylith/feassemble/FIATLagrange.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -31,8 +31,8 @@
 import numpy
 
 def validateDimension(dim):
-  if dim < 1 or dim > 3:
-    raise ValueError("Dimension of Lagrange element must be 1, 2, or 3.")
+  if dim < 0 or dim > 3:
+    raise ValueError("Dimension of Lagrange cell must be 0, 1, 2, or 3.")
   return dim
 
 

Modified: short/3D/PyLith/trunk/pylith/feassemble/FIATSimplex.py
===================================================================
--- short/3D/PyLith/trunk/pylith/feassemble/FIATSimplex.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/pylith/feassemble/FIATSimplex.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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 < 0 or dim > 3:
+    raise ValueError("Dimension of simplex cell must be 0, 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
 
 

Modified: short/3D/PyLith/trunk/pylith/materials/GenMaxwellIsotropic3D.py
===================================================================
--- short/3D/PyLith/trunk/pylith/materials/GenMaxwellIsotropic3D.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/pylith/materials/GenMaxwellIsotropic3D.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -54,7 +54,7 @@
                      "viscous_strain_2", 
                      "viscous_strain_3",
                      ]}}
-    self._loggingPrefix = "MaMx3D "
+    self._loggingPrefix = "MaGM3D "
     return
 
 

Modified: short/3D/PyLith/trunk/pylith/materials/GenMaxwellPlaneStrain.py
===================================================================
--- short/3D/PyLith/trunk/pylith/materials/GenMaxwellPlaneStrain.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/pylith/materials/GenMaxwellPlaneStrain.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -55,7 +55,7 @@
                      "viscous_strain_2", 
                      "viscous_strain_3",
                      ]}}
-    self._loggingPrefix = "MaMx2D "
+    self._loggingPrefix = "MaGM2D "
     return
 
 

Modified: short/3D/PyLith/trunk/pylith/materials/GenMaxwellQpQsIsotropic3D.py
===================================================================
--- short/3D/PyLith/trunk/pylith/materials/GenMaxwellQpQsIsotropic3D.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/pylith/materials/GenMaxwellQpQsIsotropic3D.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -56,7 +56,7 @@
                      "viscous_deviatoric_strain", 
                      "viscous_mean_strain", 
                      ]}}
-    self._loggingPrefix = "MaMx3D "
+    self._loggingPrefix = "MaGQ3D "
     return
 
 

Modified: short/3D/PyLith/trunk/pylith/materials/MaxwellPlaneStrain.py
===================================================================
--- short/3D/PyLith/trunk/pylith/materials/MaxwellPlaneStrain.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/pylith/materials/MaxwellPlaneStrain.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -48,7 +48,8 @@
             'data': []},
          'cell': \
            {'info': ["mu", "lambda", "density", "maxwell_time"],
-            'data': ["total_strain", "viscous_strain", "stress"]}}
+            'data': ["total_strain", "stress",
+                     "stress_zz_initial", "viscous_strain"]}}
     self._loggingPrefix = "MaMx2D "
     return
 

Copied: short/3D/PyLith/trunk/pylith/materials/PowerLawPlaneStrain.py (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/pylith/materials/PowerLawPlaneStrain.py)
===================================================================
--- short/3D/PyLith/trunk/pylith/materials/PowerLawPlaneStrain.py	                        (rev 0)
+++ short/3D/PyLith/trunk/pylith/materials/PowerLawPlaneStrain.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -0,0 +1,77 @@
+#!/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/materials/PowerLawPlaneStrain.py
+##
+## @brief Python object implementing 2-D plane strain power-law
+## viscoelastic material.
+##
+## Factory: material.
+
+from ElasticMaterial import ElasticMaterial
+from materials import PowerLawPlaneStrain as ModulePowerLawPlaneStrain
+
+# PowerLawPlaneStrain class
+class PowerLawPlaneStrain(ElasticMaterial, ModulePowerLawPlaneStrain):
+  """
+  Python object implementing 2-D plane strain power-law viscoelastic material.
+
+  Factory: material.
+  """
+
+  # PUBLIC METHODS /////////////////////////////////////////////////////
+
+  def __init__(self, name="powerlawplanestrain"):
+    """
+    Constructor.
+    """
+    ElasticMaterial.__init__(self, name)
+    self.availableFields = \
+        {'vertex': \
+           {'info': [],
+            'data': []},
+         'cell': \
+           {'info': ["mu", "lambda", "density", 
+                     "reference_strain_rate", "reference_stress",
+                     "power_law_exponent"],
+            'data': ["total_strain", "stress",
+                     "stress_zz_initial", "stress4", "viscous_strain"]}}
+    self._loggingPrefix = "MaPL2D "
+    return
+
+
+  # PRIVATE METHODS ////////////////////////////////////////////////////
+
+  def _createModuleObj(self):
+    """
+    Call constructor for module object for access to C++ object.
+    """
+    ModulePowerLawPlaneStrain.__init__(self)
+    return
+  
+
+# FACTORIES ////////////////////////////////////////////////////////////
+
+def material():
+  """
+  Factory associated with PowerLawPlaneStrain.
+  """
+  return PowerLawPlaneStrain()
+
+
+# End of file 

Modified: short/3D/PyLith/trunk/pylith/materials/__init__.py
===================================================================
--- short/3D/PyLith/trunk/pylith/materials/__init__.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/pylith/materials/__init__.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -32,6 +32,7 @@
            'Material',
            'MaxwellIsotropic3D',
            'PowerLaw3D',
+           'PowerLawPlaneStrain',
            'DruckerPrager3D',
            ]
 

Copied: short/3D/PyLith/trunk/pylith/meshio/OutputFaultImpulses.py (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/pylith/meshio/OutputFaultImpulses.py)
===================================================================
--- short/3D/PyLith/trunk/pylith/meshio/OutputFaultImpulses.py	                        (rev 0)
+++ short/3D/PyLith/trunk/pylith/meshio/OutputFaultImpulses.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/pylith/problems/Explicit.py
===================================================================
--- short/3D/PyLith/trunk/pylith/problems/Explicit.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/pylith/problems/Explicit.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -248,6 +248,31 @@
     return
 
 
+  def prestepElastic(self, t, dt):
+    """
+    Hook for doing stuff before advancing time step.
+    """
+    from pylith.mpi.Communicator import mpi_comm_world
+    comm = mpi_comm_world()
+    
+    if 0 == comm.rank:
+      self._info.log("Setting constraints.")
+    disp = self.fields.get("dispIncr(t->t+dt)")
+    disp.zero()
+    for constraint in self.constraints:
+      constraint.setField(t+dt, disp)
+
+    needNewJacobian = False
+    for integrator in self.integratorsMesh + self.integratorsSubMesh:
+      integrator.timeStep(dt)
+      if integrator.needNewJacobian():
+        needNewJacobian = True
+    if needNewJacobian:
+      self._reformJacobian(t, dt)
+
+    return
+
+
   # PRIVATE METHODS ////////////////////////////////////////////////////
 
   def _configure(self):

Modified: short/3D/PyLith/trunk/pylith/problems/Formulation.py
===================================================================
--- short/3D/PyLith/trunk/pylith/problems/Formulation.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/pylith/problems/Formulation.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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
@@ -88,9 +90,11 @@
 
     import pyre.inventory
 
+    # WARNING: This setting is not yet functional!!!!!!!!!
     useCUDA = pyre.inventory.bool("use_cuda", default=False,
                                   validator=validateUseCUDA)
     useCUDA.meta['tip'] = "Enable use of CUDA for finite-element integrations."
+    
 
     matrixType = pyre.inventory.str("matrix_type", default="unknown")
     matrixType.meta['tip'] = "Type of PETSc sparse matrix."
@@ -99,6 +103,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 +340,7 @@
       self.inventory.useSplitFields = True
 
     ModuleFormulation.splitFields(self, self.inventory.useSplitFields)
+    ModuleFormulation.splitFieldComponents(self, self.inventory.useSplitFieldComponents)
     ModuleFormulation.useCustomConstraintPC(self,
                                             self.inventory.useCustomConstraintPC)
 
@@ -360,7 +368,7 @@
         self.matrixType = matrixMap[self.matrixType]
     self.blockMatrixOkay = True
     if self.matrixType == "unknown" and self.solver.useCUDA:
-      self.matrixType = "mpiaijcusp"
+      self.matrixType = "aijcusp"
     for constraint in self.constraints:
       numDimConstrained = constraint.numDimConstrained()
       if numDimConstrained > 0 and self.mesh.dimension() != numDimConstrained:

Modified: short/3D/PyLith/trunk/pylith/problems/GreensFns.py
===================================================================
--- short/3D/PyLith/trunk/pylith/problems/GreensFns.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/pylith/problems/GreensFns.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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.useElasticBehavior(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/trunk/pylith/problems/Implicit.py
===================================================================
--- short/3D/PyLith/trunk/pylith/problems/Implicit.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/pylith/problems/Implicit.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -289,6 +289,31 @@
     return
 
 
+  def prestepElastic(self, t, dt):
+    """
+    Hook for doing stuff before advancing time step.
+    """
+    from pylith.mpi.Communicator import mpi_comm_world
+    comm = mpi_comm_world()
+    
+    if 0 == comm.rank:
+      self._info.log("Setting constraints.")
+    disp = self.fields.get("dispIncr(t->t+dt)")
+    disp.zero()
+    for constraint in self.constraints:
+      constraint.setField(t+dt, disp)
+
+    needNewJacobian = False
+    for integrator in self.integratorsMesh + self.integratorsSubMesh:
+      integrator.timeStep(dt)
+      if integrator.needNewJacobian():
+        needNewJacobian = True
+    if needNewJacobian:
+      self._reformJacobian(t, dt)
+
+    return
+
+
   def finalize(self):
     """
     Cleanup after time stepping.

Modified: short/3D/PyLith/trunk/pylith/problems/Solver.py
===================================================================
--- short/3D/PyLith/trunk/pylith/problems/Solver.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/pylith/problems/Solver.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -80,7 +80,7 @@
       # Set vec_type for CUDA, if it has not already been set.
       from pylith.utils.petsc import optionsSetValue, optionsHasName
       if not optionsHasName("-vec_type"):
-        optionsSetValue("-vec_type", "mpicusp")
+        optionsSetValue("-vec_type", "cusp")
     return
 
 

Modified: short/3D/PyLith/trunk/pylith/problems/TimeDependent.py
===================================================================
--- short/3D/PyLith/trunk/pylith/problems/TimeDependent.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/pylith/problems/TimeDependent.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -44,7 +44,7 @@
     ## Python object for managing TimeDependent facilities and properties.
     ##
     ## \b Properties
-    ## None
+    ## @li \b elastic_prestep Include a static calculation with elastic behavior before time stepping.
     ##
     ## \b Facilities
     ## @li \b formulation Formulation for solving PDE.
@@ -52,6 +52,9 @@
 
     import pyre.inventory
 
+    elasticPrestep = pyre.inventory.bool("elastic_prestep", default=True)
+    elasticPrestep.meta['tip'] = "Include a static calculation with elastic behavior before time stepping."
+
     from Implicit import Implicit
     formulation = pyre.inventory.facility("formulation",
                                           family="pde_formulation",
@@ -128,6 +131,42 @@
       self._info.log("Solving problem.")
     self.checkpointTimer.toplevel = app # Set handle for saving state
     
+    # Elastic prestep
+    if self.elasticPrestep:
+      if 0 == comm.rank:
+        self._info.log("Preparing for prestep with elastic behavior.")
+      self._eventLogger.stagePush("Prestep")
+
+      t = self.formulation.getStartTime()
+      dt = self.formulation.getTimeStep()
+      t -= dt
+
+      # Limit material behavior to elastic regime
+      for material in self.materials.components():
+        material.useElasticBehavior(True)
+
+      self.formulation.prestepElastic(t, dt)
+      self._eventLogger.stagePop()
+
+      if 0 == comm.rank:
+        self._info.log("Computing prestep with elastic behavior.")
+      self._eventLogger.stagePush("Step")
+      self.formulation.step(t, dt)
+      self._eventLogger.stagePop()
+
+      if 0 == comm.rank:
+        self._info.log("Finishing prestep with elastic behavior.")
+      self._eventLogger.stagePush("Poststep")
+      self.formulation.poststep(t, dt)
+      self._eventLogger.stagePop()
+
+
+    # Allow inelastic behavior
+    for material in self.materials.components():
+      material.useElasticBehavior(False)
+
+
+    # Normal time loop
     t = self.formulation.getStartTime()
     timeScale = self.normalizer.timeScale()
     while t < self.formulation.getTotalTime():
@@ -197,6 +236,7 @@
     Set members based using inventory.
     """
     Problem._configure(self)
+    self.elasticPrestep = self.inventory.elasticPrestep
     self.formulation = self.inventory.formulation
     self.checkpointTimer = self.inventory.checkpointTimer
     return

Modified: short/3D/PyLith/trunk/pylith/tests/Fault.py
===================================================================
--- short/3D/PyLith/trunk/pylith/tests/Fault.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/pylith/tests/Fault.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -21,39 +21,41 @@
 ## @brief Check fault output from PyLith.
 
 import numpy
+import h5py
+from spatialdata.units.NondimElasticQuasistatic import NondimElasticQuasistatic
 
 def check_vertex_fields(testcase, filename, mesh, fieldNames):
   """
   Check properties.
   """
-  data = testcase.reader.read(filename)
+  h5 = h5py.File(filename, "r", driver="sec2")
   
   # Check cells
-  (ncells, ncorners) = data['cells'].shape
+  cells = h5['topology/cells'][:]
+  (ncells, ncorners) = cells.shape
   testcase.assertEqual(mesh['ncells'], ncells)
   testcase.assertEqual(mesh['ncorners'], ncorners)
 
   # Check vertices
-  (nvertices, spaceDim) = data['vertices'].shape
+  vertices = h5['geometry/vertices'][:]
+  (nvertices, spaceDim) = vertices.shape
   testcase.assertEqual(mesh['nvertices'], nvertices)
   testcase.assertEqual(mesh['spaceDim'], spaceDim)
 
   # Check fault information
   tolerance = 1.0e-5
 
-  from spatialdata.units.NondimElasticQuasistatic import NondimElasticQuasistatic
   normalizer = NondimElasticQuasistatic()
   normalizer._configure()
 
   for name in fieldNames:
-    valuesE = testcase.calcFaultField(name, data['vertices'])
-    values = data['vertex_fields'][name]
+    valuesE = testcase.calcFaultField(name, vertices)
+    values = h5['vertex_fields/%s' % name][:]
 
-    (nverticesE, dimE) = valuesE.shape
-    if 1 == dimE:
-      values = values.reshape( (nvertices, dimE) )
-    (nvertices, dim) = values.shape
+    (nstepsE, nverticesE, dimE) = valuesE.shape
+    (nsteps, nvertices, dim) = values.shape
 
+    testcase.assertEqual(nstepsE, nsteps)
     testcase.assertEqual(nverticesE, nvertices)
     testcase.assertEqual(dimE, dim)
 
@@ -61,17 +63,19 @@
     if name == "traction_change" or name == "traction":
       scale *= normalizer.pressureScale().value
 
-    for i in xrange(dim):
-      ratio = numpy.abs(1.0 - values[:,i]/valuesE[:,i])
-      diff = numpy.abs(values[:,i] - valuesE[:,i]) / scale
-      mask = valuesE[:,i] != 0.0
-      okay = mask*(ratio < tolerance) + ~mask*(diff < tolerance)
-      if numpy.sum(okay) != nvertices:
-        print "Error in component %d of field '%s'." % (i, name)
-        print "Expected values:",valuesE
-        print "Output values:",values
-      testcase.assertEqual(numpy.sum(okay), nvertices)
+    for istep in xrange(nsteps):
+      for idim in xrange(dim):
+        ratio = numpy.abs(1.0 - values[istep,:,idim]/valuesE[istep,:,idim])
+        diff = numpy.abs(values[istep,:,idim] - valuesE[istep,:,idim]) / scale
+        mask = valuesE[istep,:,idim] != 0.0
+        okay = mask*(ratio < tolerance) + ~mask*(diff < tolerance)
+        if numpy.sum(okay) != nvertices:
+          print "Error in component %d of field '%s' for timestep %d." % (idim, name, istep)
+          print "Expected values:",valuesE
+          print "Output values:",values
+        testcase.assertEqual(numpy.sum(okay), nvertices)
 
+  h5.close()
   return
 
 
@@ -79,15 +83,17 @@
   """
   Check properties.
   """
-  data = testcase.reader.read(filename)
+  h5 = h5py.File(filename, "r", driver="sec2")
   
   # Check cells
-  (ncells, ncorners) = data['cells'].shape
+  cells = h5['topology/cells'][:]
+  (ncells, ncorners) = cells.shape
   testcase.assertEqual(mesh['ncells'], ncells)
   testcase.assertEqual(mesh['ncorners'], ncorners)
 
   # Check vertices
-  (nvertices, spaceDim) = data['vertices'].shape
+  vertices = h5['geometry/vertices'][:]
+  (nvertices, spaceDim) = vertices.shape
   testcase.assertEqual(mesh['nvertices'], nvertices)
   testcase.assertEqual(mesh['spaceDim'], spaceDim)
 
@@ -96,7 +102,7 @@
 
   for name in fieldNames:
     valuesE = testcase.calcFaultInfo(name, data['vertices'])
-    values = data['vertex_fields'][name]
+    values = h5['vertex_fields/%s' % name][:]
 
     (nverticesE, dim) = valuesE.shape
     values = values.reshape( (nvertices, dim) )
@@ -112,7 +118,7 @@
         print "Expected values:",valuesE
         print "Output values:",values
       testcase.assertEqual(numpy.sum(okay), nvertices)
-
+  h5.close()
   return
 
 

Modified: short/3D/PyLith/trunk/pylith/tests/PhysicalProperties.py
===================================================================
--- short/3D/PyLith/trunk/pylith/tests/PhysicalProperties.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/pylith/tests/PhysicalProperties.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -21,20 +21,23 @@
 ## @brief Check physical properties output from PyLith.
 
 import numpy
+import h5py
 
 def check_properties(testcase, filename, mesh, properties):
   """
   Check properties.
   """
-  data = testcase.reader.read(filename)
+  h5 = h5py.File(filename, "r", driver="sec2")
   
   # Check cells
-  (ncells, ncorners) = data['cells'].shape
+  cells = h5['topology/cells'][:]
+  (ncells, ncorners) = cells.shape
   testcase.assertEqual(mesh['ncells'], ncells)
   testcase.assertEqual(mesh['ncorners'], ncorners)
 
   # Check vertices
-  (nvertices, spaceDim) = data['vertices'].shape
+  vertices = h5['geometry/vertices'][:]
+  (nvertices, spaceDim) = vertices.shape
   testcase.assertEqual(mesh['nvertices'], nvertices)
   testcase.assertEqual(mesh['spaceDim'], spaceDim)
 
@@ -43,7 +46,7 @@
 
   for name in properties.keys():
     propertyE = properties[name]
-    property = data['cell_fields'][name]
+    property = h5['cell_fields/%s' % name][:]
     ratio = numpy.abs(1.0 - property[:]/propertyE[:,0])
     diff = numpy.abs(property[:] - propertyE[:,0])
     mask = propertyE[:,0] != 0.0
@@ -52,8 +55,9 @@
       print "Error in values for physical property '%s'." % name
       print "Expected values:",propertyE
       print "Output values:",property
-    testcase.assertEqual(numpy.sum(okay), ncells)
+    testcase.assertEqual(ncells, numpy.sum(okay))
 
+  h5.close()
   return
 
 

Modified: short/3D/PyLith/trunk/pylith/tests/Solution.py
===================================================================
--- short/3D/PyLith/trunk/pylith/tests/Solution.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/pylith/tests/Solution.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -21,15 +21,17 @@
 ## @brief Check displacement solution output from PyLith.
 
 import numpy
+import h5py
 
 def check_displacements(testcase, filename, mesh):
   """
   Check displacements.
   """
-  data = testcase.reader.read(filename)
+  h5 = h5py.File(filename, "r", driver="sec2")
   
   # Check vertices
-  (nvertices, spaceDim) = data['vertices'].shape
+  vertices = h5['geometry/vertices'][:]
+  (nvertices, spaceDim) = vertices.shape
   testcase.assertEqual(mesh['nvertices'], nvertices)
   testcase.assertEqual(mesh['spaceDim'], spaceDim)
 
@@ -37,48 +39,32 @@
   toleranceMask = 1.0e-3
   tolerance = 1.0e-5
 
-  dispE = testcase.calcDisplacements(data['vertices'])
-  disp = data['vertex_fields']['displacement']
+  dispE = testcase.calcDisplacements(vertices)
+  disp = h5['vertex_fields/displacement'][:]
 
-  # Check x displacements
-  mask = numpy.abs(dispE[:,0]) > toleranceMask
-  diff = numpy.abs(disp[:,0] - dispE[:,0])
-  diffR = numpy.abs(1.0 - disp[:,0] / dispE[:,0])  
-  okay = ~mask * (diff < tolerance) + mask * (diffR < tolerance)
-  if numpy.sum(okay) != nvertices:
-    print "Error in x-component of displacement field."
-    print "Expected values: ",dispE
-    print "Output values: ",disp
-    print dispE[~okay]
-    print disp[~okay]
-    print diffR[~okay]
-  testcase.assertEqual(nvertices, numpy.sum(okay))    
-    
-  # Check y displacements
-  mask = numpy.abs(dispE[:,1]) > toleranceMask
-  diff = numpy.abs(disp[:,1] - dispE[:,1])
-  diffR = numpy.abs(1.0 - disp[:,1] / dispE[:,1])  
-  okay = ~mask * (diff < tolerance) + mask * (diffR < tolerance)
-  if numpy.sum(okay) != nvertices:
-    print "Error in y-component of displacement field."
-    print "Expected values: ",dispE
-    print "Output values: ",disp
-    print dispE[~okay]
-    print disp[~okay]
-    print diffR[~okay]
-  testcase.assertEqual(nvertices, numpy.sum(okay))    
+  (nstepsE, nverticesE, ncompsE) = dispE.shape
+  (nsteps, nvertices, ncomps) = disp.shape
+  testcase.assertEqual(nstepsE, nsteps)
+  testcase.assertEqual(nverticesE, nvertices)
+  testcase.assertEqual(ncompsE, ncomps)
 
-  # Check z displacements
-  mask = numpy.abs(dispE[:,2]) > toleranceMask
-  diff = numpy.abs(disp[:,2] - dispE[:,2])
-  diffR = numpy.abs(1.0 - disp[:,2] / dispE[:,2])  
-  okay = ~mask * (diff < tolerance) + mask * (diffR < tolerance)
-  if numpy.sum(okay) != nvertices:
-    print "Error in z-component of displacement field."
-    print "Expected values: ",dispE
-    print "Output values: ",disp
-  testcase.assertEqual(nvertices, numpy.sum(okay))    
+  for istep in xrange(nsteps):
+    for icomp in xrange(ncomps):
 
+      mask = numpy.abs(dispE[istep,:,icomp]) > toleranceMask
+      diff = numpy.abs(disp[istep,:,icomp] - dispE[istep,:,icomp])
+      diffR = numpy.abs(1.0 - disp[istep,:,icomp] / dispE[istep,:,icomp])  
+      okay = ~mask * (diff < tolerance) + mask * (diffR < tolerance)
+      if numpy.sum(okay) != nvertices:
+        print "Error in component %d of displacement field at time step %d." % (icomp, istep)
+        print "Expected values: ",dispE[istep,:,:]
+        print "Output values: ",disp[istep,:,:]
+        print dispE[istep,~okay,icomp]
+        print disp[istep,~okay,icomp]
+        print diffR[~okay]
+      testcase.assertEqual(nvertices, numpy.sum(okay))    
+    
+  h5.close()
   return
 
 

Modified: short/3D/PyLith/trunk/pylith/tests/StateVariables.py
===================================================================
--- short/3D/PyLith/trunk/pylith/tests/StateVariables.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/pylith/tests/StateVariables.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -21,20 +21,23 @@
 ## @brief Check state variables output from PyLith.
 
 import numpy
+import h5py
 
 def check_state_variables(testcase, filename, mesh, stateVarNames):
   """
   Check state variables.
   """
-  data = testcase.reader.read(filename)
+  h5 = h5py.File(filename, "r", driver="sec2")
   
   # Check cells
-  (ncells, ncorners) = data['cells'].shape
+  cells = h5['topology/cells'][:]
+  (ncells, ncorners) = cells.shape
   testcase.assertEqual(mesh['ncells'], ncells)
   testcase.assertEqual(mesh['ncorners'], ncorners)
 
   # Check vertices
-  (nvertices, spaceDim) = data['vertices'].shape
+  vertices = h5['geometry/vertices'][:]
+  (nvertices, spaceDim) = vertices.shape
   testcase.assertEqual(mesh['nvertices'], nvertices)
   testcase.assertEqual(mesh['spaceDim'], spaceDim)
 
@@ -46,32 +49,33 @@
   tolerance = 1.0e-6
 
   for name in stateVarNames:
-    valuesE = testcase.calcStateVar(name, data['vertices'], data['cells'])
-    values = data['cell_fields'][name]
+    valuesE = testcase.calcStateVar(name, vertices, cells)
+    values = h5['cell_fields/%s' % name][:]
 
-    (ncellsE, dimE) = valuesE.shape
-    if 1 == dimE:
-      values = values.reshape( (ncells, dimE) )
-    (ncells, dim) = values.shape
+    (nstepsE, ncellsE, ncompsE) = valuesE.shape
+    (nsteps, ncells, ncomps) = values.shape
 
+    testcase.assertEqual(nstepsE, nsteps)
     testcase.assertEqual(ncellsE, ncells)
-    testcase.assertEqual(dimE, dim)
+    testcase.assertEqual(ncompsE, ncomps)
 
     scale = 1.0
     if name == "stress":
       scale *= normalizer.pressureScale().value
 
-    for i in xrange(dim):
-      ratio = numpy.abs(1.0 - values[:,i]/valuesE[:,i])
-      diff = numpy.abs(values[:,i] - valuesE[:,i]) / scale
-      mask = valuesE[:,i] != 0.0
-      okay = mask*(ratio < tolerance) + ~mask*(diff < tolerance)
-      if numpy.sum(okay) != ncells:
-        print "Error in component %d of state variable '%s'." % (i, name)
-        print "Expected values:",valuesE
-        print "Output values:",values
-      testcase.assertEqual(numpy.sum(okay), ncells)
-    
+    for istep in xrange(nsteps):
+      for icomp in xrange(ncomps):
+        ratio = numpy.abs(1.0 - values[istep,:,icomp]/valuesE[istep,:,icomp])
+        diff = numpy.abs(values[istep,:,icomp] - valuesE[istep,:,icomp]) / scale
+        mask = valuesE[istep,:,icomp] != 0.0
+        okay = mask*(ratio < tolerance) + ~mask*(diff < tolerance)
+        if numpy.sum(okay) != ncells:
+          print "Error in component %d of state variable '%s' at time step %d." % (icomp, name, istep)
+          print "Expected values:",valuesE
+          print "Output values:",values
+        testcase.assertEqual(ncells, numpy.sum(okay))
+
+  h5.close()
   return
 
 

Modified: short/3D/PyLith/trunk/pylith/tests/__init__.py
===================================================================
--- short/3D/PyLith/trunk/pylith/tests/__init__.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/pylith/tests/__init__.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -23,4 +23,18 @@
            ]
 
 
+def has_h5py():
+  if not "flag" in dir(has_h5py):
+    try:
+      import h5py
+      has_h5py.flag = True
+    except ImportError:
+      print "WARNING: Cannot find h5py Python modele."
+      print "         Tests limited to running PyLith without errors."
+      print "         Install h5py (available via the installer utility) "
+      print "         in order to enable verification of output."
+      has_h5py.flag = False
+  return has_h5py.flag
+
+
 # End of file

Modified: short/3D/PyLith/trunk/setup.py
===================================================================
--- short/3D/PyLith/trunk/setup.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/setup.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -22,7 +22,7 @@
 setup(
     
     name = 'PyLith', 
-    version = '1.7.0',
+    version = '1.7.1',
 
     zip_safe = False,
     packages = find_packages(),

Modified: short/3D/PyLith/trunk/templates/friction/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/templates/friction/Makefile.am	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/templates/friction/Makefile.am	2012-06-25 17:37:03 UTC (rev 20406)
@@ -45,6 +45,7 @@
 AM_CPPFLAGS = $(PYTHON_EGG_CPPFLAGS) -I$(PYTHON_INCDIR) 
 
 INCLUDES = 
+INCLUDES += $(PETSC_CC_INCLUDES)
 
 # MODULE ---------------------------------------------------------------
 

Modified: short/3D/PyLith/trunk/templates/friction/ViscousFriction.cc
===================================================================
--- short/3D/PyLith/trunk/templates/friction/ViscousFriction.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/templates/friction/ViscousFriction.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -25,8 +25,8 @@
 
 #include "pylith/materials/Metadata.hh" // USES Metadata
 
-#include "pylith/utils/array.hh" // USES double_array
-#include "pylith/utils/constdefs.h" // USES MAXDOUBLE
+#include "pylith/utils/array.hh" // USES scaary_array
+#include "pylith/utils/constdefs.h" // USES PYLITH_MAXSCALAR
 
 #include "spatialdata/units/Nondimensional.hh" // USES Nondimensional
 
@@ -131,8 +131,8 @@
 // Compute properties from values in spatial database.
 void
 contrib::friction::ViscousFriction::_dbToProperties(
-				   double* const propValues,
-				   const pylith::double_array& dbValues) const
+				   PylithScalar* const propValues,
+				   const pylith::scalar_array& dbValues) const
 { // _dbToProperties
   // Check consistency of arguments
   assert(0 != propValues);
@@ -140,9 +140,9 @@
   assert(_ViscousFriction::numDBProperties == numDBValues);
 
   // Extract values from array using our defined indices.
-  const double coefS = dbValues[db_coefS];
-  const double v0 = dbValues[db_v0];
-  const double cohesion = dbValues[db_cohesion];
+  const PylithScalar coefS = dbValues[db_coefS];
+  const PylithScalar v0 = dbValues[db_v0];
+  const PylithScalar cohesion = dbValues[db_cohesion];
 
   // Check for reasonable values. If user supplied unreasonable values
   // throw an exception.
@@ -171,7 +171,7 @@
 // ----------------------------------------------------------------------
 // Nondimensionalize properties.
 void
-contrib::friction::ViscousFriction::_nondimProperties(double* const values,
+contrib::friction::ViscousFriction::_nondimProperties(PylithScalar* const values,
 						    const int nvalues) const
 { // _nondimProperties
   // Check consistency of arguments.
@@ -181,10 +181,10 @@
 
   // Get scales needed to nondimensional parameters from the
   // Nondimensional object.
-  const double lengthScale = _normalizer->lengthScale();
-  const double timeScale = _normalizer->timeScale();
-  const double pressureScale = _normalizer->pressureScale();
-  const double velocityScale = lengthScale / timeScale;
+  const PylithScalar lengthScale = _normalizer->lengthScale();
+  const PylithScalar timeScale = _normalizer->timeScale();
+  const PylithScalar pressureScale = _normalizer->pressureScale();
+  const PylithScalar velocityScale = lengthScale / timeScale;
 
   // Use the Nondimensional::nondimensionalize() function to
   // nondimensionalize the quantities using the appropriate scale.
@@ -196,7 +196,7 @@
 // ----------------------------------------------------------------------
 // Dimensionalize properties.
 void
-contrib::friction::ViscousFriction::_dimProperties(double* const values,
+contrib::friction::ViscousFriction::_dimProperties(PylithScalar* const values,
 						      const int nvalues) const
 { // _dimProperties
   // Check consistency of arguments.
@@ -206,10 +206,10 @@
 
   // Get scales needed to dimensional parameters from the
   // Nondimensional object.
-  const double lengthScale = _normalizer->lengthScale();
-  const double timeScale = _normalizer->timeScale();
-  const double pressureScale = _normalizer->pressureScale();
-  const double velocityScale = lengthScale / timeScale;
+  const PylithScalar lengthScale = _normalizer->lengthScale();
+  const PylithScalar timeScale = _normalizer->timeScale();
+  const PylithScalar pressureScale = _normalizer->pressureScale();
+  const PylithScalar velocityScale = lengthScale / timeScale;
 
   // Use the Nondimensional::dimensionalize() function to
   // dimensionalize the quantities using the appropriate scale.
@@ -222,8 +222,8 @@
 // Compute state variables from values in spatial database.
 void
 contrib::friction::ViscousFriction::_dbToStateVars(
-				  double* const stateValues,
-				  const pylith::double_array& dbValues) const
+				  PylithScalar* const stateValues,
+				  const pylith::scalar_array& dbValues) const
 { // _dbToStateVars
   // Check consistency of arguments.
   assert(0 != stateValues);
@@ -232,7 +232,7 @@
 
   // Compute friction parameters that we store from the user-supplied
   // friction parameters.
-  const double slipRate = dbValues[db_slipRate];
+  const PylithScalar slipRate = dbValues[db_slipRate];
  
   // Store computed friction parameters in the properties array.
   stateValues[s_slipRate] = slipRate;
@@ -241,7 +241,7 @@
 // ----------------------------------------------------------------------
 // Nondimensionalize state variables.
 void
-contrib::friction::ViscousFriction::_nondimStateVars(double* const values,
+contrib::friction::ViscousFriction::_nondimStateVars(PylithScalar* const values,
 						  const int nvalues) const
 { // _nondimStateVars
   // Check consistency of arguments.
@@ -251,9 +251,9 @@
 
   // Get scales needed to nondimensional parameters from the
   // Nondimensional object.
-  const double lengthScale = _normalizer->lengthScale();
-  const double timeScale = _normalizer->timeScale();
-  const double velocityScale = lengthScale / timeScale;
+  const PylithScalar lengthScale = _normalizer->lengthScale();
+  const PylithScalar timeScale = _normalizer->timeScale();
+  const PylithScalar velocityScale = lengthScale / timeScale;
 
   // Use the Nondimensional::dimensionalize() function to
   // dimensionalize the quantities using the appropriate scale.
@@ -264,19 +264,19 @@
 // ----------------------------------------------------------------------
 // Dimensionalize state variables.
 void
-contrib::friction::ViscousFriction::_dimStateVars(double* const values,
+contrib::friction::ViscousFriction::_dimStateVars(PylithScalar* const values,
 					       const int nvalues) const
 { // _dimStateVars
   // Check consistency of arguments.
-  assert(0 != _normalizer);
-  assert(0 != values);
+  assert(_normalizer);
+  assert(values);
   assert(nvalues == _ViscousFriction::numStateVars);
 
   // Get scales needed to dimensional parameters from the
   // Nondimensional object.
-  const double lengthScale = _normalizer->lengthScale();
-  const double timeScale = _normalizer->timeScale();
-  const double velocityScale = lengthScale / timeScale;
+  const PylithScalar lengthScale = _normalizer->lengthScale();
+  const PylithScalar timeScale = _normalizer->timeScale();
+  const PylithScalar velocityScale = lengthScale / timeScale;
 
   // Use the Nondimensional::dimensionalize() function to
   // dimensionalize the quantities using the appropriate scale.
@@ -286,24 +286,25 @@
 
 // ----------------------------------------------------------------------
 // Compute friction from properties and state variables.
-double
-contrib::friction::ViscousFriction::_calcFriction(const double slip,
-						const double slipRate,
-						const double normalTraction,
-						const double* properties,
-						const int numProperties,
-						const double* stateVars,
-						const int numStateVars)
+PylithScalar
+contrib::friction::ViscousFriction::_calcFriction(const PylithScalar t,
+						  const PylithScalar slip,
+						  const PylithScalar slipRate,
+						  const PylithScalar normalTraction,
+						  const PylithScalar* properties,
+						  const int numProperties,
+						  const PylithScalar* stateVars,
+						  const int numStateVars)
 { // _calcFriction
   // Check consistency of arguments.
-  assert(0 != properties);
-  assert(_numPropsVertex == numProperties);
-  assert(0 != numStateVars);
-  assert(_numVarsVertex == numStateVars);
+  assert(properties);
+  assert(_ViscousFriction::numProperties == numProperties);
+  assert(numStateVars);
+  assert(_ViscousFriction::numStateVars == numStateVars);
 
   // Compute friction traction.
-  double friction = 0.0;
-  double mu_f = 0.0;
+  PylithScalar friction = 0.0;
+  PylithScalar mu_f = 0.0;
   if (normalTraction <= 0.0) {
     // if fault is in compression
     mu_f = properties[p_coefS] * (1.0 + fabs(slipRate) / properties[p_v0]);
@@ -316,17 +317,20 @@
 // ----------------------------------------------------------------------
 // Update state variables (for next time step).
 void
-contrib::friction::ViscousFriction::_updateStateVars(const double slip,
-						  const double slipRate,
-						  const double normalTraction,
-						  double* const stateVars,
-						  const int numStateVars,
-						  const double* properties,
-						  const int numProperties)
+contrib::friction::ViscousFriction::_updateStateVars(const PylithScalar t,
+						     const PylithScalar slip,
+						     const PylithScalar slipRate,
+						     const PylithScalar normalTraction,
+						     PylithScalar* const stateVars,
+						     const int numStateVars,
+						     const PylithScalar* properties,
+						     const int numProperties)
 { // _updateStateVars
   // Check consistency of arguments.
-  assert(0 != numStateVars);
-  assert(0 != numProperties);
+  assert(properties);
+  assert(_ViscousFriction::numProperties == numProperties);
+  assert(numStateVars);
+  assert(_ViscousFriction::numStateVars == numStateVars);
 
   // Store state variables.
   stateVars[s_slipRate] = stateVars[s_slipRate]; 

Modified: short/3D/PyLith/trunk/templates/friction/ViscousFriction.hh
===================================================================
--- short/3D/PyLith/trunk/templates/friction/ViscousFriction.hh	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/templates/friction/ViscousFriction.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -73,15 +73,15 @@
    * @param propValues Array of property values.
    * @param dbValues Array of database values.
    */
-  void _dbToProperties(double* const propValues,
-		       const pylith::double_array& dbValues) const;
+  void _dbToProperties(PylithScalar* const propValues,
+		       const pylith::scalar_array& dbValues) const;
 
   /** Nondimensionalize properties.
    *
    * @param values Array of property values.
    * @param nvalues Number of values.
    */
-  void _nondimProperties(double* const values,
+  void _nondimProperties(PylithScalar* const values,
 			 const int nvalues) const;
 
   /** Dimensionalize properties.
@@ -89,7 +89,7 @@
    * @param values Array of property values.
    * @param nvalues Number of values.
    */
-  void _dimProperties(double* const values,
+  void _dimProperties(PylithScalar* const values,
 		      const int nvalues) const;
 
   /** Compute friction from properties and state variables.
@@ -102,15 +102,15 @@
    * @param stateVars State variables at location.
    * @param numStateVars Number of state variables.
    */
-  void _dbToStateVars(double* const stateValues,
-		      const pylith::double_array& dbValues) const;
+  void _dbToStateVars(PylithScalar* const stateValues,
+		      const pylith::scalar_array& dbValues) const;
 
   /** Nondimensionalize state variables.
    *
    * @param values Array of initial state values.
    * @param nvalues Number of values.
    */
-  void _nondimStateVars(double* const values,
+  void _nondimStateVars(PylithScalar* const values,
 			const int nvalues) const;
   
   /** Dimensionalize state variables.
@@ -118,11 +118,12 @@
    * @param values Array of initial state values.
    * @param nvalues Number of values.
    */
-  void _dimStateVars(double* const values,
+  void _dimStateVars(PylithScalar* const values,
 		     const int nvalues) const;
 
   /** Compute friction from properties and state variables.
    *
+   * @param t Time in simulation.
    * @param slip Current slip at location.
    * @param slipRate Current slip rate at location.
    * @param normalTraction Normal traction at location.
@@ -131,13 +132,14 @@
    * @param stateVars State variables at location.
    * @param numStateVars Number of state variables.
    */
-  double _calcFriction(const double slip,
-		       const double slipRate,
-		       const double normalTraction,
-		       const double* properties,
-		       const int numProperties,
-		       const double* stateVars,
-		       const int numStateVars);
+  PylithScalar _calcFriction(const PylithScalar t,
+			     const PylithScalar slip,
+			     const PylithScalar slipRate,
+			     const PylithScalar normalTraction,
+			     const PylithScalar* properties,
+			     const int numProperties,
+			     const PylithScalar* stateVars,
+			     const int numStateVars);
 
   // --------------------------------------------------------------------
   // Optional function in the PyLith interface for a fault
@@ -148,6 +150,7 @@
 
   /** Update state variables (for next time step).
    *
+   * @param t Time in simulation.
    * @param slip Current slip at location.
    * @param slipRate Current slip rate at location.
    * @param normalTraction Normal traction at location.
@@ -156,13 +159,14 @@
    * @param properties Properties at location.
    * @param numProperties Number of properties.
    */
-  void _updateStateVars(const double slip,
-      const double slipRate,
-      const double normalTraction,
-      double* const stateVars,
-      const int numStateVars,
-      const double* properties,
-      const int numProperties);
+  void _updateStateVars(const PylithScalar t,
+			const PylithScalar slip,
+			const PylithScalar slipRate,
+			const PylithScalar normalTraction,
+			PylithScalar* const stateVars,
+			const int numStateVars,
+			const PylithScalar* properties,
+			const int numProperties);
 
   // PRIVATE MEMBERS ////////////////////////////////////////////////////
 private :

Modified: short/3D/PyLith/trunk/templates/friction/ViscousFriction.i
===================================================================
--- short/3D/PyLith/trunk/templates/friction/ViscousFriction.i	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/templates/friction/ViscousFriction.i	2012-06-25 17:37:03 UTC (rev 20406)
@@ -51,15 +51,15 @@
        * @param propValues Array of property values.
        * @param dbValues Array of database values.
        */
-      void _dbToProperties(double* const propValues,
-			   const double_array& dbValues) const;
+      void _dbToProperties(PylithScalar* const propValues,
+			   const scalar_array& dbValues) const;
 
       /** Nondimensionalize properties.
        *
        * @param values Array of property values.
        * @param nvalues Number of values.
        */
-      void _nondimProperties(double* const values,
+      void _nondimProperties(PylithScalar* const values,
 			     const int nvalues) const;
 
       /** Dimensionalize properties.
@@ -67,11 +67,12 @@
        * @param values Array of property values.
        * @param nvalues Number of values.
        */
-      void _dimProperties(double* const values,
+      void _dimProperties(PylithScalar* const values,
 			  const int nvalues) const;
 
       /** Compute friction from properties and state variables.
        *
+       * @param t Time in simulation.
        * @param slip Current slip at location.
        * @param slipRate Current slip rate at location.
        * @param normalTraction Normal traction at location.
@@ -80,13 +81,14 @@
        * @param stateVars State variables at location.
        * @param numStateVars Number of state variables.
        */
-      double _calcFriction(const double slip,
-			   const double slipRate,
-			   const double normalTraction,
-			   const double* properties,
-			   const int numProperties,
-			   const double* stateVars,
-			   const int numStateVars);
+      PylithScalar _calcFriction(const PylithScalar t,
+				 const PylithScalar slip,
+				 const PylithScalar slipRate,
+				 const PylithScalar normalTraction,
+				 const PylithScalar* properties,
+				 const int numProperties,
+				 const PylithScalar* stateVars,
+				 const int numStateVars);
 
     }; // class ViscousFriction
 

Modified: short/3D/PyLith/trunk/templates/friction/configure.ac
===================================================================
--- short/3D/PyLith/trunk/templates/friction/configure.ac	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/templates/friction/configure.ac	2012-06-25 17:37:03 UTC (rev 20406)
@@ -48,7 +48,14 @@
 CIT_NUMPY_INCDIR
 AC_PROG_SWIG(1.3.33)
 
+# PETSC (dictates precision)
+AC_LANG(C++)
+CIT_PATH_PETSC([3.3.0])
+CIT_HEADER_PETSC
+
 # PYLITH
+pylith_save_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$PETSC_CC_INCLUDES $CPPFLAGS"
 AC_LANG(C++)
 AC_CHECK_HEADER([pylith/friction/FrictionModel.hh], [], [
   AC_MSG_ERROR([PyLith FrictionModel header not found; try CPPFLAGS="-I<PyLith include dir>"])
@@ -70,8 +77,8 @@
   AC_CHECK_FILE([friction/FrictionModel.i], [], [
     AC_MSG_ERROR([PyLith FrictionModel.i SWIG interface file not found; Try setting PYLITH_SWIG_DIR=<directory containing friction/FrictionModel.i>])])
 fi
+CPPFLAGS=$pylith_save_CPPFLAGS
 
-
 # ENDIANNESS
 AC_C_BIGENDIAN
 

Modified: short/3D/PyLith/trunk/templates/friction/frictioncontrib.i
===================================================================
--- short/3D/PyLith/trunk/templates/friction/frictioncontrib.i	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/templates/friction/frictioncontrib.i	2012-06-25 17:37:03 UTC (rev 20406)
@@ -27,7 +27,9 @@
 
 #include "ViscousFriction.hh"
 
-#include "pylith/utils/arrayfwd.hh"
+#include "pylith/utils/types.hh"
+#include "pylith/utils/array.hh"
+#include "pylith/utils/sievetypes.hh"
 %}
 
 // Convert standard C++ exceptions to Python exceptions.
@@ -41,7 +43,7 @@
 } // exception
 
 %include "typemaps.i"
-%include "include/doublearray.i"
+%include "include/scalartypemaps.i"
 
 // Numpy interface stuff
 %{

Modified: short/3D/PyLith/trunk/templates/friction/tests/TestViscousFriction.py
===================================================================
--- short/3D/PyLith/trunk/templates/friction/tests/TestViscousFriction.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/templates/friction/tests/TestViscousFriction.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -54,22 +54,10 @@
     """
     dt = 2.4
     self.model.timeStep(dt)
-    self.assertEqual(dt, self.model.timeStep())
+    self.assertAlmostEqual(dt, self.model.timeStep(), 5)
     return
 
 
-  def testHasProperty(self):
-    self.failUnless(self.model.hasProperty("static_coefficient"))
-    self.failUnless(self.model.hasProperty("reference_slip_rate"))
-    self.failUnless(self.model.hasProperty("cohesion"))
-    return
-
-
-  def testHasStateVar(self):
-    self.failUnless(self.model.hasStateVar("slip_rate"))
-    return
-
-
   def test_factory(self):
     """
     Test factory method.

Modified: short/3D/PyLith/trunk/templates/materials/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/templates/materials/Makefile.am	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/templates/materials/Makefile.am	2012-06-25 17:37:03 UTC (rev 20406)
@@ -45,6 +45,7 @@
 AM_CPPFLAGS = $(PYTHON_EGG_CPPFLAGS) -I$(PYTHON_INCDIR) 
 
 INCLUDES = 
+INCLUDES += $(PETSC_CC_INCLUDES)
 
 # MODULE ---------------------------------------------------------------
 

Modified: short/3D/PyLith/trunk/templates/materials/PlaneStrainState.cc
===================================================================
--- short/3D/PyLith/trunk/templates/materials/PlaneStrainState.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/templates/materials/PlaneStrainState.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -25,7 +25,7 @@
 
 #include "pylith/materials/Metadata.hh" // USES Metadata
 
-#include "pylith/utils/array.hh" // USES double_array
+#include "pylith/utils/array.hh" // USES scalar_array
 #include "pylith/utils/constdefs.h" // USES MAXDOUBLE
 
 #include "spatialdata/units/Nondimensional.hh" // USES Nondimensional
@@ -147,8 +147,8 @@
 // Compute parameters from values in spatial database.
 void
 contrib::materials::PlaneStrainState::_dbToProperties(
-				double* const propValues,
-                                const pylith::double_array& dbValues)
+				PylithScalar* const propValues,
+                                const pylith::scalar_array& dbValues)
 { // _dbToProperties
   // Check consistency of arguments
   assert(0 != propValues);
@@ -156,9 +156,9 @@
   assert(_PlaneStrainState::numDBProperties == numDBValues);
 
   // Extract values from array using our defined indices.
-  const double density = dbValues[db_density];
-  const double vs = dbValues[db_vs];
-  const double vp = dbValues[db_vp];
+  const PylithScalar density = dbValues[db_density];
+  const PylithScalar vs = dbValues[db_vs];
+  const PylithScalar vp = dbValues[db_vp];
  
   // Check for reasonable values. If user supplied unreasonable values
   // throw an exception.
@@ -174,8 +174,8 @@
 
   // Compute physical properties that we store from the user-supplied
   // physical properties.
-  const double mu = density * vs*vs;
-  const double lambda = density * vp*vp - 2.0*mu;
+  const PylithScalar mu = density * vs*vs;
+  const PylithScalar lambda = density * vp*vp - 2.0*mu;
 
   // Check for reasonable values. If values are unreasonable throw an
   // exception.
@@ -197,7 +197,7 @@
 // ----------------------------------------------------------------------
 // Nondimensionalize properties.
 void
-contrib::materials::PlaneStrainState::_nondimProperties(double* const values,
+contrib::materials::PlaneStrainState::_nondimProperties(PylithScalar* const values,
 							 const int nvalues) const
 { // _nondimProperties
   // Check consistency of arguments.
@@ -207,8 +207,8 @@
 
   // Get scales needed to nondimensional parameters from the
   // Nondimensional object.
-  const double densityScale = _normalizer->densityScale();
-  const double pressureScale = _normalizer->pressureScale();
+  const PylithScalar densityScale = _normalizer->densityScale();
+  const PylithScalar pressureScale = _normalizer->pressureScale();
 
   // Use the Nondimensional::nondimensionalize() function to
   // nondimensionalize the quantities using the appropriate scale.
@@ -223,7 +223,7 @@
 // ----------------------------------------------------------------------
 // Dimensionalize properties.
 void
-contrib::materials::PlaneStrainState::_dimProperties(double* const values,
+contrib::materials::PlaneStrainState::_dimProperties(PylithScalar* const values,
 						      const int nvalues) const
 { // _dimProperties
   // Check consistency of arguments
@@ -233,8 +233,8 @@
 
   // Get scales needed to dimensional parameters from the
   // Nondimensional object.
-  const double densityScale = _normalizer->densityScale();
-  const double pressureScale = _normalizer->pressureScale();
+  const PylithScalar densityScale = _normalizer->densityScale();
+  const PylithScalar pressureScale = _normalizer->pressureScale();
 
   // Use the Nondimensional::dimensionalize() function to
   // dimensionalize the quantities using the appropriate scale.
@@ -249,10 +249,10 @@
 // ----------------------------------------------------------------------
 // Compute density at location from properties.
 void
-contrib::materials::PlaneStrainState::_calcDensity(double* const density,
-						    const double* properties,
+contrib::materials::PlaneStrainState::_calcDensity(PylithScalar* const density,
+						    const PylithScalar* properties,
 						    const int numProperties,
-						    const double* stateVars,
+						    const PylithScalar* stateVars,
 						    const int numStateVars)
 { // calcDensity
   // Check consistency of arguments.
@@ -270,17 +270,17 @@
 // ----------------------------------------------------------------------
 // Compute stress tensor at location from properties.
 void
-contrib::materials::PlaneStrainState::_calcStress(double* const stress,
+contrib::materials::PlaneStrainState::_calcStress(PylithScalar* const stress,
 						   const int stressSize,
-						   const double* properties,
+						   const PylithScalar* properties,
 						   const int numProperties,
-						   const double* stateVars,
+						   const PylithScalar* stateVars,
 						   const int numStateVars,
-						   const double* totalStrain,
+						   const PylithScalar* totalStrain,
 						   const int strainSize,
-						   const double* initialStress,
+						   const PylithScalar* initialStress,
 						   const int initialStressSize,
-						   const double* initialStrain,
+						   const PylithScalar* initialStrain,
 						   const int initialStrainSize,
 						   const bool computeStateVars)
 { // _calcStress
@@ -299,20 +299,20 @@
   assert(_PlaneStrainState::tensorSize == initialStrainSize);
 
   // Extract the material properties from the properties array.
-  const double density = properties[p_density];
-  const double mu = properties[p_mu];
-  const double lambda = properties[p_lambda];
+  const PylithScalar density = properties[p_density];
+  const PylithScalar mu = properties[p_mu];
+  const PylithScalar lambda = properties[p_lambda];
 
   // Compute a convenient constant.
-  const double mu2 = 2.0*mu;
+  const PylithScalar mu2 = 2.0*mu;
 
   // Compute the current strains accounting for the initial strain.
-  const double e11 = totalStrain[0] - initialStrain[0];
-  const double e22 = totalStrain[1] - initialStrain[1];
-  const double e12 = totalStrain[2] - initialStrain[2];
+  const PylithScalar e11 = totalStrain[0] - initialStrain[0];
+  const PylithScalar e22 = totalStrain[1] - initialStrain[1];
+  const PylithScalar e12 = totalStrain[2] - initialStrain[2];
 
   // Compute another convenient constant.
-  const double s12 = lambda * (e11 + e22);
+  const PylithScalar s12 = lambda * (e11 + e22);
 
   // Compute the stresses and store them in the stress array.
   stress[0] = s12 + mu2*e11 + initialStress[0];
@@ -324,17 +324,17 @@
 // Compute elastic constants at location from properties.
 void
 contrib::materials::PlaneStrainState::_calcElasticConsts(
-					     double* const elasticConsts,
+					     PylithScalar* const elasticConsts,
 					     const int numElasticConsts,
-					     const double* properties,
+					     const PylithScalar* properties,
 					     const int numProperties,
-					     const double* stateVars,
+					     const PylithScalar* stateVars,
 					     const int numStateVars,
-					     const double* totalStrain,
+					     const PylithScalar* totalStrain,
 					     const int strainSize,
-					     const double* initialStress,
+					     const PylithScalar* initialStress,
 					     const int initialStressSize,
-					     const double* initialStrain,
+					     const PylithScalar* initialStrain,
 					     const int initialStrainSize)
 { // calcElasticConsts
   // Check consistency of arguments.
@@ -352,13 +352,13 @@
   assert(_PlaneStrainState::tensorSize == initialStrainSize);
  
   // Extract the material properties from the properties array.
-  const double density = properties[p_density];
-  const double mu = properties[p_mu];
-  const double lambda = properties[p_lambda];
+  const PylithScalar density = properties[p_density];
+  const PylithScalar mu = properties[p_mu];
+  const PylithScalar lambda = properties[p_lambda];
 
   // Compute a couple convenient constants.
-  const double mu2 = 2.0 * mu;
-  const double lambda2mu = lambda + mu2;
+  const PylithScalar mu2 = 2.0 * mu;
+  const PylithScalar lambda2mu = lambda + mu2;
    
   // Compute the elastic constants and store them in the elastic
   // constants array.
@@ -372,7 +372,7 @@
 
 // ----------------------------------------------------------------------
 // Get stable time step for implicit time integration.
-double
+PylithScalar
 contrib::materials::PlaneStrainState::stableTimeStepImplicit(
 				    const pylith::topology::Mesh& mesh) {
   // Override the ElasticMaterial::stableTimeStepImplicit() function
@@ -380,39 +380,40 @@
   // ) with an optimized calculation of the stable time step. This is
   // possible because the stable time step for an elastic material is
   // infinite, so we can simply return a very large number.
-  return pylith::PYLITH_MAXDOUBLE;
+  return pylith::PYLITH_MAXSCALAR;
 }
 
 // ----------------------------------------------------------------------
 // Get stable time step for implicit time integration.
-double
+PylithScalar
 contrib::materials::PlaneStrainState::_stableTimeStepImplicit(
-				     const double* properties,
+				     const PylithScalar* properties,
 				     const int numProperties,
-				     const double* stateVars,
+				     const PylithScalar* stateVars,
 				     const int numStateVars) const
-{ // _stableTimeStepImplicit Return the stable time step for this
-  // material given its current state. This function will never be
-  // called because we provide the stableTimeStepImplicit() function,
-  // but we implement this function to satisfy the requirements of an
-  // interface for an elastic material (which is defined by the
-  // Material and ElasticMaterial objects).
-  return pylith::PYLITH_MAXDOUBLE;
+{ // _stableTimeStepImplicit
+  //  Return the stable time step for this material given its current
+  // state. This function will never be called because we provide the
+  // stableTimeStepImplicit() function, but we implement this function
+  // to satisfy the requirements of an interface for an elastic
+  // material (which is defined by the Material and ElasticMaterial
+  // objects).
+  return pylith::PYLITH_MAXSCALAR;
 } // _stableTimeStepImplicit
 
 // ----------------------------------------------------------------------
 // Update state variables.
 void
 contrib::materials::PlaneStrainState::_updateStateVars(
-					    double* const stateVars,
+					    PylithScalar* const stateVars,
 					    const int numStateVars,
-					    const double* properties,
+					    const PylithScalar* properties,
 					    const int numProperties,
-					    const double* totalStrain,
+					    const PylithScalar* totalStrain,
 					    const int strainSize,
-					    const double* initialStress,
+					    const PylithScalar* initialStress,
 					    const int initialStressSize,
-					    const double* initialStrain,
+					    const PylithScalar* initialStrain,
 					    const int initialStrainSize)
 { // _updateStateVars
   // Check consistency of arguments.

Modified: short/3D/PyLith/trunk/templates/materials/PlaneStrainState.hh
===================================================================
--- short/3D/PyLith/trunk/templates/materials/PlaneStrainState.hh	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/templates/materials/PlaneStrainState.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -79,7 +79,7 @@
    * @param mesh Finite-element mesh.
    * @returns Time step
    */
-  double stableTimeStepImplicit(const pylith::topology::Mesh& mesh);
+  PylithScalar stableTimeStepImplicit(const pylith::topology::Mesh& mesh);
 
   // PROTECTED METHODS //////////////////////////////////////////////////
 protected :
@@ -92,15 +92,15 @@
    * @param propValues Array of property values.
    * @param dbValues Array of database values.
    */
-  void _dbToProperties(double* const propValues,
-		       const pylith::double_array& dbValues);
+  void _dbToProperties(PylithScalar* const propValues,
+		       const pylith::scalar_array& dbValues);
 
   /** Nondimensionalize properties.
    *
    * @param values Array of property values.
    * @param nvalues Number of values.
    */
-  void _nondimProperties(double* const values,
+  void _nondimProperties(PylithScalar* const values,
 			 const int nvalues) const;
 
   /** Dimensionalize properties.
@@ -108,7 +108,7 @@
    * @param values Array of property values.
    * @param nvalues Number of values.
    */
-  void _dimProperties(double* const values,
+  void _dimProperties(PylithScalar* const values,
 		      const int nvalues) const;
 
   /** Compute density from properties.
@@ -117,10 +117,10 @@
    * @param properties Properties at location.
    * @param numProperties Number of properties.
    */
-  void _calcDensity(double* const density,
-		    const double* properties,
+  void _calcDensity(PylithScalar* const density,
+		    const PylithScalar* properties,
 		    const int numProperties,
-		    const double* stateVars,
+		    const PylithScalar* stateVars,
 		    const int numStateVars);
 
   /** Compute stress tensor from properties and state variables. If
@@ -143,17 +143,17 @@
    * @param initialStrainSize Size of initial strain array.
    * @param computeStateVars Flag indicating to compute updated state variables.
    */
-  void _calcStress(double* const stress,
+  void _calcStress(PylithScalar* const stress,
 		   const int stressSize,
-		   const double* properties,
+		   const PylithScalar* properties,
 		   const int numProperties,
-		   const double* stateVars,
+		   const PylithScalar* stateVars,
 		   const int numStateVars,
-		   const double* totalStrain,
+		   const PylithScalar* totalStrain,
 		   const int strainSize,
-		   const double* initialStress,
+		   const PylithScalar* initialStress,
 		   const int initialStressSize,
-		   const double* initialStrain,
+		   const PylithScalar* initialStrain,
 		   const int initialStrainSize,
 		   const bool computeStateVars);
 
@@ -172,17 +172,17 @@
    * @param initialStrain Initial strain tensor at location.
    * @param initialStrainSize Size of initial strain array.
    */
-  void _calcElasticConsts(double* const elasticConsts,
+  void _calcElasticConsts(PylithScalar* const elasticConsts,
 			  const int numElasticConsts,
-			  const double* properties,
+			  const PylithScalar* properties,
 			  const int numProperties,
-			  const double* stateVars,
+			  const PylithScalar* stateVars,
 			  const int numStateVars,
-			  const double* totalStrain,
+			  const PylithScalar* totalStrain,
 			  const int strainSize,
-			  const double* initialStress,
+			  const PylithScalar* initialStress,
 			  const int initialStressSize,
-			  const double* initialStrain,
+			  const PylithScalar* initialStrain,
 			  const int initialStrainSize);
 
   /** Get stable time step for implicit time integration.
@@ -194,10 +194,10 @@
    *
    * @returns Time step
    */
-  double _stableTimeStepImplicit(const double* properties,
-				 const int numProperties,
-				 const double* stateVars,
-				 const int numStateVars) const;
+  PylithScalar _stableTimeStepImplicit(const PylithScalar* properties,
+				       const int numProperties,
+				       const PylithScalar* stateVars,
+				       const int numStateVars) const;
 
   // --------------------------------------------------------------------
   // Optional function in the PyLith interface for a bulk constitutive
@@ -222,15 +222,15 @@
    * @param initialStrain Initial strain tensor at location.
    * @param initialStrainSize Size of initial strain array.
    */
-  void _updateStateVars(double* const stateVars,
+  void _updateStateVars(PylithScalar* const stateVars,
 			const int numStateVars,
-			const double* properties,
+			const PylithScalar* properties,
 			const int numProperties,
-			const double* totalStrain,
+			const PylithScalar* totalStrain,
 			const int strainSize,
-			const double* initialStress,
+			const PylithScalar* initialStress,
 			const int initialStressSize,
-			const double* initialStrain,
+			const PylithScalar* initialStrain,
 			const int initialStrainSize);
 
   // PRIVATE MEMBERS ////////////////////////////////////////////////////

Modified: short/3D/PyLith/trunk/templates/materials/PlaneStrainState.i
===================================================================
--- short/3D/PyLith/trunk/templates/materials/PlaneStrainState.i	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/templates/materials/PlaneStrainState.i	2012-06-25 17:37:03 UTC (rev 20406)
@@ -55,7 +55,7 @@
        * @param mesh Finite-element mesh.
        * @returns Time step
        */
-      double stableTimeStepImplicit(const pylith::topology::Mesh& mesh);
+      PylithScalar stableTimeStepImplicit(const pylith::topology::Mesh& mesh);
       
       // PROTECTED METHODS //////////////////////////////////////////////
     protected :
@@ -68,15 +68,15 @@
        * @param propValues Array of property values.
        * @param dbValues Array of database values.
        */
-      void _dbToProperties(double* const propValues,
-			   const pylith::double_array& dbValues);
+      void _dbToProperties(PylithScalar* const propValues,
+			   const pylith::scalar_array& dbValues);
       
       /** Nondimensionalize properties.
        *
        * @param values Array of property values.
        * @param nvalues Number of values.
        */
-      void _nondimProperties(double* const values,
+      void _nondimProperties(PylithScalar* const values,
 			     const int nvalues) const;
       
       /** Dimensionalize properties.
@@ -84,7 +84,7 @@
        * @param values Array of property values.
        * @param nvalues Number of values.
        */
-      void _dimProperties(double* const values,
+      void _dimProperties(PylithScalar* const values,
 			  const int nvalues) const;
       
       /** Compute density from properties.
@@ -93,10 +93,10 @@
        * @param properties Properties at location.
        * @param numProperties Number of properties.
        */
-      void _calcDensity(double* const density,
-			const double* properties,
+      void _calcDensity(PylithScalar* const density,
+			const PylithScalar* properties,
 			const int numProperties,
-			const double* stateVars,
+			const PylithScalar* stateVars,
 			const int numStateVars);
       
       /** Compute stress tensor from properties and state variables. If
@@ -120,17 +120,17 @@
        * @param computeStateVars Flag indicating to compute updated
        * state variables.
        */
-      void _calcStress(double* const stress,
+      void _calcStress(PylithScalar* const stress,
 		       const int stressSize,
-		       const double* properties,
+		       const PylithScalar* properties,
 		       const int numProperties,
-		       const double* stateVars,
+		       const PylithScalar* stateVars,
 		       const int numStateVars,
-		       const double* totalStrain,
+		       const PylithScalar* totalStrain,
 		       const int strainSize,
-		       const double* initialStress,
+		       const PylithScalar* initialStress,
 		       const int initialStressSize,
-		       const double* initialStrain,
+		       const PylithScalar* initialStrain,
 		       const int initialStrainSize,
 		       const bool computeStateVars);
       
@@ -149,17 +149,17 @@
        * @param initialStrain Initial strain tensor at location.
        * @param initialStrainSize Size of initial strain array.
        */
-      void _calcElasticConsts(double* const elasticConsts,
+      void _calcElasticConsts(PylithScalar* const elasticConsts,
 			      const int numElasticConsts,
-			      const double* properties,
+			      const PylithScalar* properties,
 			      const int numProperties,
-			      const double* stateVars,
+			      const PylithScalar* stateVars,
 			      const int numStateVars,
-			      const double* totalStrain,
+			      const PylithScalar* totalStrain,
 			      const int strainSize,
-			      const double* initialStress,
+			      const PylithScalar* initialStress,
 			      const int initialStressSize,
-			      const double* initialStrain,
+			      const PylithScalar* initialStrain,
 			      const int initialStrainSize);
       
       /** Get stable time step for implicit time integration.
@@ -171,10 +171,10 @@
        *
        * @returns Time step
        */
-      double _stableTimeStepImplicit(const double* properties,
-				     const int numProperties,
-				     const double* stateVars,
-				     const int numStateVars) const;
+      PylithScalar _stableTimeStepImplicit(const PylithScalar* properties,
+					   const int numProperties,
+					   const PylithScalar* stateVars,
+					   const int numStateVars) const;
       
       // PROTECTED METHODS //////////////////////////////////////////////
     protected :
@@ -192,15 +192,15 @@
        * @param initialStrain Initial strain tensor at location.
        * @param initialStrainSize Size of initial strain array.
        */
-      void _updateStateVars(double* const stateVars,
+      void _updateStateVars(PylithScalar* const stateVars,
 			    const int numStateVars,
-			    const double* properties,
+			    const PylithScalar* properties,
 			    const int numProperties,
-			    const double* totalStrain,
+			    const PylithScalar* totalStrain,
 			    const int strainSize,
-			    const double* initialStress,
+			    const PylithScalar* initialStress,
 			    const int initialStressSize,
-			    const double* initialStrain,
+			    const PylithScalar* initialStrain,
 			    const int initialStrainSize);
 
     }; // class PlaneStrainState

Modified: short/3D/PyLith/trunk/templates/materials/configure.ac
===================================================================
--- short/3D/PyLith/trunk/templates/materials/configure.ac	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/templates/materials/configure.ac	2012-06-25 17:37:03 UTC (rev 20406)
@@ -48,7 +48,14 @@
 CIT_NUMPY_INCDIR
 AC_PROG_SWIG(1.3.33)
 
+# PETSC (dictates precision)
+AC_LANG(C++)
+CIT_PATH_PETSC([3.3.0])
+CIT_HEADER_PETSC
+
 # PYLITH
+pylith_save_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="$PETSC_CC_INCLUDES $CPPFLAGS"
 AC_LANG(C++)
 AC_CHECK_HEADER([pylith/materials/ElasticMaterial.hh], [], [
   AC_MSG_ERROR([PyLith ElasticMaterial header not found; try CPPFLAGS="-I<PyLith include dir>"])
@@ -70,6 +77,7 @@
   AC_CHECK_FILE([materials/ElasticMaterial.i], [], [
     AC_MSG_ERROR([PyLith ElasticMaterial.i SWIG interface file not found; Try setting PYLITH_SWIG_DIR=<directory containing materials/ElasticMaterial.i>])])
 fi
+CPPFLAGS=$pylith_save_CPPFLAGS
 
 
 # ENDIANNESS

Modified: short/3D/PyLith/trunk/templates/materials/materialscontrib.i
===================================================================
--- short/3D/PyLith/trunk/templates/materials/materialscontrib.i	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/templates/materials/materialscontrib.i	2012-06-25 17:37:03 UTC (rev 20406)
@@ -27,7 +27,9 @@
 
 #include "PlaneStrainState.hh"
 
-#include "pylith/utils/arrayfwd.hh"
+#include "pylith/utils/types.hh"
+#include "pylith/utils/array.hh"
+#include "pylith/utils/sievetypes.hh"
 %}
 
 // Convert standard C++ exceptions to Python exceptions.
@@ -41,7 +43,7 @@
 } // exception
 
 %include "typemaps.i"
-%include "include/doublearray.i"
+%include "include/scalartypemaps.i"
 
 // Numpy interface stuff
 %{

Modified: short/3D/PyLith/trunk/tests/2d/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/tests/2d/Makefile.am	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/2d/Makefile.am	2012-06-25 17:37:03 UTC (rev 20406)
@@ -18,6 +18,7 @@
 
 SUBDIRS = \
 	maxwell \
+	powerlaw \
 	slipdir \
 	frictionslide
 

Modified: short/3D/PyLith/trunk/tests/2d/faultstrip/dynamic_slipweakening.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/faultstrip/dynamic_slipweakening.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/2d/faultstrip/dynamic_slipweakening.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------
@@ -24,7 +23,7 @@
 [pylithapp.timedependent.interfaces.fault.output]
 writer.filename = output/slipweakening-fault.vtk
 
-vertex_info_fields = [strike_dir,normal_dir,initial_traction,static_coefficient,dynamic_coefficient,slip_weakening_parameter,cohesion]
+vertex_info_fields = [strike_dir,normal_dir,traction_initial_value,static_coefficient,dynamic_coefficient,slip_weakening_parameter,cohesion]
 
 vertex_data_fields = [slip,traction,cumulative_slip,previous_slip]
 

Modified: short/3D/PyLith/trunk/tests/2d/faultstrip/dynamic_timeweakening.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/faultstrip/dynamic_timeweakening.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/2d/faultstrip/dynamic_timeweakening.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------
@@ -24,7 +23,7 @@
 [pylithapp.timedependent.interfaces.fault.output]
 writer.filename = output/timeweakening-fault.vtk
 
-vertex_info_fields = [strike_dir,normal_dir,initial_traction,static_coefficient,dynamic_coefficient,time_weakening_parameter,cohesion]
+vertex_info_fields = [strike_dir,normal_dir,traction_initial_value,static_coefficient,dynamic_coefficient,time_weakening_parameter,cohesion]
 
 vertex_data_fields = [slip,traction,elapsed_time]
 

Modified: short/3D/PyLith/trunk/tests/2d/faultstrip/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/faultstrip/pylithapp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/2d/faultstrip/pylithapp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # This is not a self-contained simulation configuration file. This
@@ -102,12 +101,15 @@
 quadrature.cell.dimension = 1
 quadrature.cell.quad_order = 2
 
-db_initial_tractions = spatialdata.spatialdb.SimpleDB
-db_initial_tractions.label = Initial fault tractions
-db_initial_tractions.iohandler.filename = tractions.spatialdb
-db_initial_tractions.query_type = linear
+traction_perturbation = pylith.faults.TractPerturbation
 
+[pylithapp.timedependent.interfaces.fault.traction_perturbation]
+db_initial = spatialdata.spatialdb.SimpleDB
+db_initial.label = Initial fault tractions
+db_initial.iohandler.filename = tractions.spatialdb
+db_initial.query_type = linear
 
+
 # ----------------------------------------------------------------------
 # PETSc
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/2d/frictionslide/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/frictionslide/pylithapp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/2d/frictionslide/pylithapp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/2d/frictionslide/ratestate.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/frictionslide/ratestate.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/2d/frictionslide/ratestate.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------
@@ -41,11 +40,14 @@
 # faults
 # ----------------------------------------------------------------------
 [pylithapp.timedependent.interfaces.fault]
-db_initial_tractions = spatialdata.spatialdb.UniformDB
-db_initial_tractions.label = Initial fault tractions
-db_initial_tractions.values = [traction-shear,traction-normal]
-db_initial_tractions.data = [0.0*MPa, -10.0*MPa]
+traction_perturbation = pylith.faults.TractPerturbation
 
+[pylithapp.timedependent.interfaces.fault.traction_perturbation]
+db_initial = spatialdata.spatialdb.UniformDB
+db_initial.label = Initial fault tractions
+db_initial.values = [traction-shear,traction-normal]
+db_initial.data = [0.0*MPa, -10.0*MPa]
+
 # ----------------------------------------------------------------------
 # PETSc
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/2d/frictionslide/ratestate_stable.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/frictionslide/ratestate_stable.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/2d/frictionslide/ratestate_stable.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/2d/frictionslide/ratestate_weak.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/frictionslide/ratestate_weak.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/2d/frictionslide/ratestate_weak.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/2d/frictionslide/tension.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/frictionslide/tension.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/2d/frictionslide/tension.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -97,11 +97,14 @@
 friction.db_properties.values = [static-coefficient,dynamic-coefficient,slip-weakening-parameter,cohesion]
 friction.db_properties.data = [0.6,0.2,1.0*mm,0.0*Pa]
 
-db_initial_tractions = spatialdata.spatialdb.UniformDB
-db_initial_tractions.label = Initial fault tractions
-db_initial_tractions.values = [traction-shear,traction-normal]
-db_initial_tractions.data = [0.0*MPa, -0.0*MPa]
+traction_perturbation = pylith.faults.TractPerturbation
 
+[pylithapp.timedependent.interfaces.fault.traction_perturbation]
+db_initial = spatialdata.spatialdb.UniformDB
+db_initial.label = Initial fault tractions
+db_initial.values = [traction-shear,traction-normal]
+db_initial.data = [0.0*MPa, -0.0*MPa]
+
 [pylithapp.timedependent.interfaces.fault.output]
 vertex_data_fields=[slip,slip_rate,traction]
 

Modified: short/3D/PyLith/trunk/tests/2d/maxwell/axialdisp2d.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/maxwell/axialdisp2d.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/2d/maxwell/axialdisp2d.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # To run this problem, type "pylith planestrain2d.cfg axialdisp2d.cfg".
 # The settings in pylithapp.cfg will be read by default. See the README for

Modified: short/3D/PyLith/trunk/tests/2d/maxwell/axialdisp3d.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/maxwell/axialdisp3d.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/2d/maxwell/axialdisp3d.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # To run this problem, type "pylith planestrain.cfg axialdisp3d.cfg".
 # The settings in pylithapp.cfg will be read by default. See the README for

Modified: short/3D/PyLith/trunk/tests/2d/maxwell/planestrain2d.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/maxwell/planestrain2d.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/2d/maxwell/planestrain2d.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # The settings in this file define the setting specific to a 2D
 # (plane strain) problem.

Modified: short/3D/PyLith/trunk/tests/2d/maxwell/planestrain3d.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/maxwell/planestrain3d.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/2d/maxwell/planestrain3d.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # The settings in this file define the setting specific to a 3D
 # problem simulating plane strain.

Modified: short/3D/PyLith/trunk/tests/2d/maxwell/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/maxwell/pylithapp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/2d/maxwell/pylithapp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # The settings in this file (pylithapp.cfg) will be read automatically
 # by pylith, as long as the file is placed in the run directory.

Modified: short/3D/PyLith/trunk/tests/2d/maxwell/sheardisp2d.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/maxwell/sheardisp2d.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/2d/maxwell/sheardisp2d.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # To run this problem, type "pylith planestrain2d.cfg sheardisp2d.cfg".
 # The settings in pylithapp.cfg will be read by default. See the README for

Modified: short/3D/PyLith/trunk/tests/2d/maxwell/sheardisp3d.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/maxwell/sheardisp3d.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/2d/maxwell/sheardisp3d.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # To run this problem, type "pylith planestrain3d.cfg sheardisp3d.cfg".
 # The settings in pylithapp.cfg will be read by default. See the README for

Modified: short/3D/PyLith/trunk/tests/2d/plasticity/static/axialdisp_fine_2d.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/plasticity/static/axialdisp_fine_2d.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/2d/plasticity/static/axialdisp_fine_2d.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # To run this problem, type
 # "pylith planestrain_fine_2d.cfg axialdisp_fine_2d.cfg".

Modified: short/3D/PyLith/trunk/tests/2d/plasticity/static/axialdisp_fine_3d.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/plasticity/static/axialdisp_fine_3d.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/2d/plasticity/static/axialdisp_fine_3d.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # To run this problem, type
 # "pylith planestrain_fine_3d.cfg axialdisp_fine_3d.cfg".

Modified: short/3D/PyLith/trunk/tests/2d/plasticity/static/axialdisp_twocells_2d.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/plasticity/static/axialdisp_twocells_2d.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/2d/plasticity/static/axialdisp_twocells_2d.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # To run this problem, type
 # "pylith planestrain_twocells_2d.cfg axialdisp_twocells_2d.cfg".

Modified: short/3D/PyLith/trunk/tests/2d/plasticity/static/axialdisp_twocells_3d.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/plasticity/static/axialdisp_twocells_3d.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/2d/plasticity/static/axialdisp_twocells_3d.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # To run this problem, type
 # "pylith planestrain_twocells_3d.cfg axialdisp_twocells_3d.cfg".

Modified: short/3D/PyLith/trunk/tests/2d/plasticity/static/planestrain_fine_2d.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/plasticity/static/planestrain_fine_2d.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/2d/plasticity/static/planestrain_fine_2d.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # The settings in this file define the setting specific to a 2D
 # (plane strain) problem.

Modified: short/3D/PyLith/trunk/tests/2d/plasticity/static/planestrain_fine_3d.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/plasticity/static/planestrain_fine_3d.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/2d/plasticity/static/planestrain_fine_3d.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # The settings in this file define the setting specific to a 3D
 # problem simulating plane strain.

Modified: short/3D/PyLith/trunk/tests/2d/plasticity/static/planestrain_twocells_2d.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/plasticity/static/planestrain_twocells_2d.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/2d/plasticity/static/planestrain_twocells_2d.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # The settings in this file define the setting specific to a 2D
 # (plane strain) problem.

Modified: short/3D/PyLith/trunk/tests/2d/plasticity/static/planestrain_twocells_3d.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/plasticity/static/planestrain_twocells_3d.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/2d/plasticity/static/planestrain_twocells_3d.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # The settings in this file define the setting specific to a 3D
 # problem simulating plane strain.

Modified: short/3D/PyLith/trunk/tests/2d/plasticity/static/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/plasticity/static/pylithapp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/2d/plasticity/static/pylithapp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # The settings in this file (pylithapp.cfg) will be read automatically
 # by pylith, as long as the file is placed in the run directory.

Modified: short/3D/PyLith/trunk/tests/2d/plasticity/static/sheardisp_fine_2d.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/plasticity/static/sheardisp_fine_2d.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/2d/plasticity/static/sheardisp_fine_2d.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # To run this problem, type
 # "pylith planestrain_fine_2d.cfg sheardisp_fine_2d.cfg".

Modified: short/3D/PyLith/trunk/tests/2d/plasticity/static/sheardisp_fine_3d.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/plasticity/static/sheardisp_fine_3d.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/2d/plasticity/static/sheardisp_fine_3d.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # To run this problem, type
 # "pylith planestrain_fine_3d.cfg sheardisp_fine_3d.cfg".

Modified: short/3D/PyLith/trunk/tests/2d/plasticity/static/sheardisp_twocells_2d.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/plasticity/static/sheardisp_twocells_2d.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/2d/plasticity/static/sheardisp_twocells_2d.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # To run this problem, type
 # "pylith planestrain_twocells_2d.cfg sheardisp_twocells_2d.cfg".

Modified: short/3D/PyLith/trunk/tests/2d/plasticity/static/sheardisp_twocells_3d.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/plasticity/static/sheardisp_twocells_3d.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/2d/plasticity/static/sheardisp_twocells_3d.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # To run this problem, type
 # "pylith planestrain_twocells_3d.cfg sheardisp_twocells_3d.cfg".

Copied: short/3D/PyLith/trunk/tests/2d/powerlaw (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/tests/2d/powerlaw)

Modified: short/3D/PyLith/trunk/tests/2d/slipdir/fault_x.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/slipdir/fault_x.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/2d/slipdir/fault_x.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/2d/slipdir/fault_xy1.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/slipdir/fault_xy1.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/2d/slipdir/fault_xy1.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/2d/slipdir/fault_xy2.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/slipdir/fault_xy2.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/2d/slipdir/fault_xy2.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/2d/slipdir/fault_y.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/slipdir/fault_y.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/2d/slipdir/fault_y.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/2d/slipdir/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/slipdir/pylithapp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/2d/slipdir/pylithapp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/3d/cyclicfriction/fieldsplit.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/3d/cyclicfriction/fieldsplit.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/3d/cyclicfriction/fieldsplit.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -4,15 +4,11 @@
 use_custom_constraint_pc = True
 
 [pylithapp.petsc]
-ksp_gmres_restart = 500
+ksp_gmres_restart = 100
 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/trunk/tests/3d/cyclicfriction/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/3d/cyclicfriction/pylithapp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/3d/cyclicfriction/pylithapp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------
@@ -128,11 +127,14 @@
 friction.db_properties.values = [static-coefficient,dynamic-coefficient,slip-weakening-parameter,cohesion]
 friction.db_properties.data = [0.6,0.1,1.0*mm,0.0*Pa]
 
-db_initial_tractions = spatialdata.spatialdb.SimpleDB
-db_initial_tractions.iohandler.filename = initial_tractions.spatialdb
-db_initial_tractions.label = Initial fault tractions
-db_initial_tractions.query_type = linear
+traction_perturbation = pylith.faults.TractPerturbation
 
+[pylithapp.timedependent.interfaces.fault.traction_perturbation]
+db_initial = spatialdata.spatialdb.SimpleDB
+db_initial.iohandler.filename = initial_tractions.spatialdb
+db_initial.label = Initial fault tractions
+db_initial.query_type = linear
+
 # ----------------------------------------------------------------------
 # output
 # ----------------------------------------------------------------------
@@ -150,7 +152,7 @@
 writer.filename = output/cyclic-groundsurf.h5
 
 [pylithapp.problem.interfaces.fault.output]
-vertex_info_fields = [initial_traction]
+vertex_info_fields = [traction_initial_value]
 writer = pylith.meshio.DataWriterHDF5SubSubMesh
 writer.filename = output/cyclic-fault.h5
 
@@ -171,9 +173,9 @@
 sub_pc_factor_shift_type = nonzero
 
 # Convergence parameters.
-ksp_rtol = 1.0e-12
-ksp_atol = 1.0e-12
-ksp_max_it = 100
+ksp_rtol = 1.0e-15
+ksp_atol = 1.0e-13
+ksp_max_it = 400
 ksp_gmres_restart = 50
 
 # Linear solver monitoring options.

Modified: short/3D/PyLith/trunk/tests/3d/matprops/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/3d/matprops/pylithapp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/3d/matprops/pylithapp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/3d/plasticity/dynamic/hex8.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/3d/plasticity/dynamic/hex8.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/3d/plasticity/dynamic/hex8.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/3d/plasticity/dynamic/hex8_pwave.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/3d/plasticity/dynamic/hex8_pwave.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/3d/plasticity/dynamic/hex8_pwave.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/3d/plasticity/dynamic/hex8_swave.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/3d/plasticity/dynamic/hex8_swave.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/3d/plasticity/dynamic/hex8_swave.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/3d/plasticity/dynamic/pwave.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/3d/plasticity/dynamic/pwave.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/3d/plasticity/dynamic/pwave.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/3d/plasticity/dynamic/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/3d/plasticity/dynamic/pylithapp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/3d/plasticity/dynamic/pylithapp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/3d/plasticity/dynamic/swave.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/3d/plasticity/dynamic/swave.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/3d/plasticity/dynamic/swave.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/3d/plasticity/dynamic/tet4.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/3d/plasticity/dynamic/tet4.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/3d/plasticity/dynamic/tet4.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------
@@ -19,7 +18,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/trunk/tests/3d/plasticity/dynamic/tet4_pwave.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/3d/plasticity/dynamic/tet4_pwave.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/3d/plasticity/dynamic/tet4_pwave.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/3d/plasticity/dynamic/tet4_swave.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/3d/plasticity/dynamic/tet4_swave.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/3d/plasticity/dynamic/tet4_swave.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/3d/plasticity/threehex8/config/elas_ng_ni_v03.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/3d/plasticity/threehex8/config/elas_ng_ni_v03.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/3d/plasticity/threehex8/config/elas_ng_ni_v03.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/3d/plasticity/threehex8/config/plas_dp1_ng_ni_v03.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/3d/plasticity/threehex8/config/plas_dp1_ng_ni_v03.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/3d/plasticity/threehex8/config/plas_dp1_ng_ni_v03.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/3d/plasticity/threehex8/config/plas_dp2_ng_ni_v03.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/3d/plasticity/threehex8/config/plas_dp2_ng_ni_v03.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/3d/plasticity/threehex8/config/plas_dp2_ng_ni_v03.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/3d/plasticity/threehex8/config/plas_dp3_ng_ni_v03.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/3d/plasticity/threehex8/config/plas_dp3_ng_ni_v03.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/3d/plasticity/threehex8/config/plas_dp3_ng_ni_v03.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/3d/plasticity/threehex8/config/plas_vm1_ng_ni_v03.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/3d/plasticity/threehex8/config/plas_vm1_ng_ni_v03.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/3d/plasticity/threehex8/config/plas_vm1_ng_ni_v03.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/3d/plasticity/threehex8/config/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/3d/plasticity/threehex8/config/pylithapp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/3d/plasticity/threehex8/config/pylithapp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # This is not a self-contained simulation configuration file. This

Modified: short/3D/PyLith/trunk/tests/3d/plasticity/threehex8/config/visc_e10_ng_ni_v03.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/3d/plasticity/threehex8/config/visc_e10_ng_ni_v03.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/3d/plasticity/threehex8/config/visc_e10_ng_ni_v03.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/3d/refine/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/3d/refine/pylithapp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/3d/refine/pylithapp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/3d/refine/tet4.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/3d/refine/tet4.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/3d/refine/tet4.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/tests/3d/relaxation/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/3d/relaxation/pylithapp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/3d/relaxation/pylithapp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/3d/relaxation/shear_elastic.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/3d/relaxation/shear_elastic.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/3d/relaxation/shear_elastic.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/3d/relaxation/shear_genmaxwell.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/3d/relaxation/shear_genmaxwell.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/3d/relaxation/shear_genmaxwell.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/3d/relaxation/shear_genmaxwell_QpQs.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/3d/relaxation/shear_genmaxwell_QpQs.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/3d/relaxation/shear_genmaxwell_QpQs.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/3d/slipdir/fault_x.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/3d/slipdir/fault_x.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/3d/slipdir/fault_x.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/3d/slipdir/fault_xy.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/3d/slipdir/fault_xy.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/3d/slipdir/fault_xy.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/3d/slipdir/fault_xz1.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/3d/slipdir/fault_xz1.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/3d/slipdir/fault_xz1.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/3d/slipdir/fault_xz2.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/3d/slipdir/fault_xz2.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/3d/slipdir/fault_xz2.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/3d/slipdir/fault_y.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/3d/slipdir/fault_y.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/3d/slipdir/fault_y.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/3d/slipdir/fault_z.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/3d/slipdir/fault_z.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/3d/slipdir/fault_z.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/3d/slipdir/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/3d/slipdir/pylithapp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/3d/slipdir/pylithapp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------
@@ -48,7 +47,7 @@
 db_properties.iohandler.filename = matprops.spatialdb
 
 quadrature.cell = pylith.feassemble.FIATSimplex
-quadrature.cell.shape = tetrahedron
+quadrature.cell.dimension = 3
 
 # ----------------------------------------------------------------------
 # boundary conditions
@@ -73,7 +72,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/trunk/tests/refinefaulttip/hex8.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/refinefaulttip/hex8.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/refinefaulttip/hex8.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/refinefaulttip/quad4.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/refinefaulttip/quad4.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/refinefaulttip/quad4.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests/refinefaulttip/tet4.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/refinefaulttip/tet4.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/refinefaulttip/tet4.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------
@@ -69,7 +68,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 +94,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/trunk/tests/refinefaulttip/tri3.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/refinefaulttip/tri3.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests/refinefaulttip/tri3.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------
@@ -72,7 +71,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 +97,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]

Copied: short/3D/PyLith/trunk/tests/runtests.sh (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/tests/runtests.sh)
===================================================================
--- short/3D/PyLith/trunk/tests/runtests.sh	                        (rev 0)
+++ short/3D/PyLith/trunk/tests/runtests.sh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -0,0 +1,53 @@
+#!/bin/bash
+
+# Run several full-scale tests. Execute this script from the tests
+# directory.
+
+tests_dir=`pwd`
+
+# Clean output directory
+clean_output() {
+  cd ${tests_dir}/${dir}
+  if [ -d output ]; then rm output/*.vtk output/*.h5 output/*.xmf; fi
+}
+
+# ----------------------------------------------------------------------
+# 2d/frictionslide
+dir="2d/frictionslide"
+clean_output
+
+echo "RUNNING $dir tension"
+pylith tension.cfg --nodes=1 >& tension_np1.log
+pylith tension.cfg --nodes=2 >& tension_np2.log
+pylith tension.cfg --nodes=3 >& tension_np3.log
+
+echo "RUNNING $dir ratestate_weak"
+pylith ratestate.cfg ratestate_weak.cfg --nodes=1 >& weak_np1.log
+pylith ratestate.cfg ratestate_weak.cfg --nodes=2 >& weak_np2.log
+pylith ratestate.cfg ratestate_weak.cfg --nodes=3 >& weak_np3.log
+
+echo "RUNNING $dir ratestate_stable"
+pylith ratestate.cfg ratestate_stable.cfg --nodes=1 >& stable_np1.log
+pylith ratestate.cfg ratestate_stable.cfg --nodes=2 >& stable_np2.log
+pylith ratestate.cfg ratestate_stable.cfg --nodes=3 >& stable_np3.log
+
+# ----------------------------------------------------------------------
+# 3d/cyclicfriction
+dir="3d/cyclicfriction"
+clean_output
+
+echo "RUNNING $dir ASM"
+pylith --nodes=1 >& asm_np1.log
+pylith --nodes=2 >& asm_np2.log
+pylith --nodes=5 >& asm_np5.log
+
+echo "RUNNING $dir fieldsplit"
+pylith fieldsplit.cfg --nodes=1 >& fieldsplit_np1.log
+pylith fieldsplit.cfg --nodes=2 >& fieldsplit_np2.log
+pylith fieldsplit.cfg --nodes=5 >& fielssplit_np5.log
+
+# ----------------------------------------------------------------------
+# Return to examples dir
+cd ${tests_dir}
+  
+exit 0

Modified: short/3D/PyLith/trunk/tests_auto/1d/line2/TestDislocation.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/1d/line2/TestDislocation.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/1d/line2/TestDislocation.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -22,10 +22,10 @@
 
 import numpy
 from TestLine2 import TestLine2
-from pylith.utils.VTKDataReader import has_vtk
-from pylith.utils.VTKDataReader import VTKDataReader
+
 from pylith.tests.Fault import check_vertex_fields
 
+
 # Local version of PyLithApp
 from pylith.apps.PyLithApp import PyLithApp
 class DislocationApp(PyLithApp):
@@ -60,16 +60,12 @@
     self.nverticesO = 5
 
     self.faultMesh = {'nvertices': 1,
-                      'spaceDim': 3,
+                      'spaceDim': 1,
                       'ncells': 1,
                       'ncorners': 1}
 
     run_pylith()
     self.outputRoot = "dislocation"
-    if has_vtk():
-      self.reader = VTKDataReader()
-    else:
-      self.reader = None
     return
 
 
@@ -77,10 +73,10 @@
     """
     Check fault information.
     """
-    if self.reader is None:
+    if not self.checkResults:
       return
 
-    filename = "%s-fault_info.vtk" % self.outputRoot
+    filename = "%s-fault_info.h5" % self.outputRoot
     fields = ["normal_dir", "final_slip", "slip_time"]
     check_vertex_fields(self, filename, self.faultMesh, fields)
 
@@ -91,10 +87,10 @@
     """
     Check fault information.
     """
-    if self.reader is None:
+    if not self.checkResults:
       return
 
-    filename = "%s-fault_t0000000.vtk" % self.outputRoot
+    filename = "%s-fault.h5" % self.outputRoot
     fields = ["slip", "traction_change"]
     check_vertex_fields(self, filename, self.faultMesh, fields)
 
@@ -109,11 +105,11 @@
     spaceDim = self.mesh['spaceDim']    
     nverticesO = self.nverticesO
 
-    disp = numpy.zeros( (nvertices, spaceDim), dtype=numpy.float64)
+    disp = numpy.zeros( (1, nvertices, spaceDim), dtype=numpy.float64)
     maskP = vertices[:,0] >= 2.0
     maskP[nverticesO:nvertices] = False
     maskN = numpy.bitwise_and(vertices[:,0] <= 2.0, ~maskP)
-    disp[:,0] = \
+    disp[0,:,0] = \
         maskN*(-0.20 - 0.025*vertices[:,0]) + \
         maskP*(+0.30 - 0.025*vertices[:,0])
 
@@ -130,12 +126,11 @@
     tensorSize = self.mesh['tensorSize']
 
     if name == "total_strain":
-      stateVar = exx*numpy.ones( (ncells, tensorSize), dtype=numpy.float64)
+      stateVar = exx*numpy.ones( (1, ncells, tensorSize), dtype=numpy.float64)
     
     elif name == "stress":
       lp2m = self.density*self.vp**2
-      stateVar = lp2m*exx * numpy.ones( (ncells, tensorSize), 
-                                       dtype=numpy.float64)
+      stateVar = lp2m*exx * numpy.ones( (1, ncells, tensorSize), dtype=numpy.float64)
     else:
       raise ValueError("Unknown state variable '%s'." % name)
 
@@ -159,22 +154,22 @@
     nvertices = self.faultMesh['nvertices']
 
     if name == "normal_dir":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
       field[:,0] = normalDir
 
     elif name == "final_slip":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
       field[:,0] = finalSlip
       
     elif name == "slip_time":
-      field = slipTime*numpy.ones( (nvertices, 1), dtype=numpy.float64)
+      field = slipTime*numpy.ones( (1, nvertices, 1), dtype=numpy.float64)
       
     elif name == "slip":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
       field[:,0] = finalSlip
 
     elif name == "traction_change":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
       field[:,0] = traction
       
     else:

Modified: short/3D/PyLith/trunk/tests_auto/1d/line2/TestExtensionDisp.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/1d/line2/TestExtensionDisp.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/1d/line2/TestExtensionDisp.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -21,9 +21,8 @@
 ## @brief Test suite for testing pylith with 1-D axial extension.
 
 import numpy
+
 from TestLine2 import TestLine2
-from pylith.utils.VTKDataReader import has_vtk
-from pylith.utils.VTKDataReader import VTKDataReader
 
 
 # Local version of PyLithApp
@@ -58,10 +57,6 @@
     TestLine2.setUp(self)
     run_pylith()
     self.outputRoot = "extensiondisp"
-    if has_vtk():
-      self.reader = VTKDataReader()
-    else:
-      self.reader = None
     return
 
 
@@ -71,8 +66,8 @@
     """
     nvertices = self.mesh['nvertices']
     spaceDim = self.mesh['spaceDim']    
-    disp = numpy.zeros( (nvertices, spaceDim), dtype=numpy.float64)
-    disp[:,0] = -0.2 + 0.1 * vertices[:,0]
+    disp = numpy.zeros( (1,nvertices,spaceDim), dtype=numpy.float64)
+    disp[0,:,0] = -0.2 + 0.1 * vertices[:,0]
 
     return disp
 
@@ -87,12 +82,11 @@
     tensorSize = self.mesh['tensorSize']
 
     if name == "total_strain":
-      stateVar = exx*numpy.ones( (ncells, tensorSize), dtype=numpy.float64)
+      stateVar = exx*numpy.ones( (1, ncells, tensorSize), dtype=numpy.float64)
     
     elif name == "stress":
       lp2m = self.density*self.vp**2
-      stateVar = lp2m*exx * numpy.ones( (ncells, tensorSize), 
-                                       dtype=numpy.float64)
+      stateVar = lp2m*exx * numpy.ones( (1, ncells, tensorSize), dtype=numpy.float64)
     else:
       raise ValueError("Unknown state variable '%s'." % name)
 

Modified: short/3D/PyLith/trunk/tests_auto/1d/line2/TestExtensionForce.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/1d/line2/TestExtensionForce.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/1d/line2/TestExtensionForce.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -23,8 +23,6 @@
 
 import numpy
 from TestLine2 import TestLine2
-from pylith.utils.VTKDataReader import has_vtk
-from pylith.utils.VTKDataReader import VTKDataReader
 
 
 # Local version of PyLithApp
@@ -59,10 +57,6 @@
     TestLine2.setUp(self)
     run_pylith()
     self.outputRoot = "extensionforce"
-    if has_vtk():
-      self.reader = VTKDataReader()
-    else:
-      self.reader = None
     return
 
 
@@ -72,8 +66,8 @@
     """
     nvertices = self.mesh['nvertices']
     spaceDim = self.mesh['spaceDim']    
-    disp = numpy.zeros( (nvertices, spaceDim), dtype=numpy.float64)
-    disp[:,0] = 3.0/7.0 * (-2.0 + vertices[:,0])
+    disp = numpy.zeros( (1, nvertices, spaceDim), dtype=numpy.float64)
+    disp[0,:,0] = 3.0/7.0 * (-2.0 + vertices[:,0])
 
     return disp
 
@@ -88,12 +82,11 @@
     tensorSize = self.mesh['tensorSize']
 
     if name == "total_strain":
-      stateVar = exx*numpy.ones( (ncells, tensorSize), dtype=numpy.float64)
+      stateVar = exx*numpy.ones( (1, ncells, tensorSize), dtype=numpy.float64)
     
     elif name == "stress":
       lp2m = self.density*self.vp**2
-      stateVar = lp2m*exx * numpy.ones( (ncells, tensorSize), 
-                                       dtype=numpy.float64)
+      stateVar = lp2m*exx * numpy.ones( (1, ncells, tensorSize), dtype=numpy.float64)
     else:
       raise ValueError("Unknown state variable '%s'." % name)
 

Modified: short/3D/PyLith/trunk/tests_auto/1d/line2/TestLine2.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/1d/line2/TestLine2.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/1d/line2/TestLine2.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -23,6 +23,8 @@
 import unittest
 import numpy
 
+from pylith.tests import has_h5py
+
 class TestLine2(unittest.TestCase):
   """
   Generic tests for problems using 1-D bar mesh.
@@ -35,11 +37,16 @@
     self.mesh = {'ncells': 4,
                  'ncorners': 2,
                  'nvertices': 5,
-                 'spaceDim': 3,
+                 'spaceDim': 1,
                  'tensorSize': 1}
     self.vs = 3000.0
     self.vp = 5291.502622129181
     self.density = 2500.0
+
+    if has_h5py():
+      self.checkResults = True
+    else:
+      self.checkResults = False
     return
 
 
@@ -47,18 +54,18 @@
     """
     Check elastic info.
     """
-    if self.reader is None:
+    if not self.checkResults:
       return
 
     ncells= self.mesh['ncells']
 
-    filename = "%s-elastic_info.vtk" % self.outputRoot
+    filename = "%s-elastic_info.h5" % self.outputRoot
     m = self.density*self.vs**2
     l = self.density*self.vp**2 - 2*m
 
-    propMu =  m*numpy.ones( (ncells, 1), dtype=numpy.float64)
-    propLambda = l*numpy.ones( (ncells, 1), dtype=numpy.float64)
-    propDensity = self.density*numpy.ones( (ncells, 2), dtype=numpy.float64)
+    propMu =  m*numpy.ones( (1,ncells, 1), dtype=numpy.float64)
+    propLambda = l*numpy.ones( (1,ncells, 1), dtype=numpy.float64)
+    propDensity = self.density*numpy.ones( (1,ncells, 1), dtype=numpy.float64)
 
     properties = {'mu': propMu,
                   'lambda': propLambda,
@@ -74,10 +81,10 @@
     """
     Check solution (displacement) field.
     """
-    if self.reader is None:
+    if not self.checkResults:
       return
 
-    filename = "%s_t0000000.vtk" % self.outputRoot
+    filename = "%s.h5" % self.outputRoot
     from pylith.tests.Solution import check_displacements
     check_displacements(self, filename, self.mesh)
 
@@ -88,10 +95,10 @@
     """
     Check elastic state variables.
     """
-    if self.reader is None:
+    if not self.checkResults:
       return
 
-    filename = "%s-elastic_t0000000.vtk" % self.outputRoot
+    filename = "%s-elastic.h5" % self.outputRoot
 
     from pylith.tests.StateVariables import check_state_variables
     stateVars = ["total_strain", "stress"]

Modified: short/3D/PyLith/trunk/tests_auto/1d/line2/dislocation.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/1d/line2/dislocation.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/1d/line2/dislocation.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [dislocation]
 
 [dislocation.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -53,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
@@ -73,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
@@ -101,15 +100,15 @@
 # ----------------------------------------------------------------------
 # output
 # ----------------------------------------------------------------------
-[dislocation.problem.formulation.output.output.writer]
-filename = dislocation.vtk
-float_precision = 8
+[dislocation.problem.formulation.output.output]
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = dislocation.h5
 
 [dislocation.timedependent.materials.elastic.output]
 cell_filter = pylith.meshio.CellFilterAvgMesh
-writer.filename = dislocation-elastic.vtk
-writer.float_precision = 8
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = dislocation-elastic.h5
 
-[dislocation.timedependent.interfaces.fault.output.writer]
-filename = dislocation-fault.vtk
-float_precision = 8
+[dislocation.timedependent.interfaces.fault.output]
+writer = pylith.meshio.DataWriterHDF5SubSubMesh
+writer.filename = dislocation-fault.h5

Modified: short/3D/PyLith/trunk/tests_auto/1d/line2/extensiondisp.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/1d/line2/extensiondisp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/1d/line2/extensiondisp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [extensiondisp]
 
 [extensiondisp.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -51,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
@@ -86,9 +85,11 @@
 # ----------------------------------------------------------------------
 # output
 # ----------------------------------------------------------------------
-[extensiondisp.problem.formulation.output.output.writer]
-filename = extensiondisp.vtk
+[extensiondisp.problem.formulation.output.output]
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = extensiondisp.h5
 
 [extensiondisp.timedependent.materials.elastic.output]
 cell_filter = pylith.meshio.CellFilterAvgMesh
-writer.filename = extensiondisp-elastic.vtk
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = extensiondisp-elastic.h5

Modified: short/3D/PyLith/trunk/tests_auto/1d/line2/extensionforce.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/1d/line2/extensionforce.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/1d/line2/extensionforce.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [extensionforce]
 
 [extensionforce.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -50,7 +49,7 @@
 id = 1
 db_properties.label = Elastic properties
 db_properties.iohandler.filename = matprops.spatialdb
-quadrature.cell.shape = line
+quadrature.cell.dimension = 1
 
 # ----------------------------------------------------------------------
 # boundary conditions
@@ -91,9 +90,11 @@
 # ----------------------------------------------------------------------
 # output
 # ----------------------------------------------------------------------
-[extensionforce.problem.formulation.output.output.writer]
-filename = extensionforce.vtk
+[extensionforce.problem.formulation.output.output]
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = extensionforce.h5
 
 [extensionforce.timedependent.materials.elastic.output]
 cell_filter = pylith.meshio.CellFilterAvgMesh
-writer.filename = extensionforce-elastic.vtk
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = extensionforce-elastic.h5

Modified: short/3D/PyLith/trunk/tests_auto/1d/line2/lgdeformtranslation.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/1d/line2/lgdeformtranslation.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/1d/line2/lgdeformtranslation.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 [pylithapp.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -52,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/trunk/tests_auto/1d/line3/TestAxial.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/1d/line3/TestAxial.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/1d/line3/TestAxial.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -22,8 +22,6 @@
 
 import numpy
 from TestLine3 import TestLine3
-from pylith.utils.VTKDataReader import has_vtk
-from pylith.utils.VTKDataReader import VTKDataReader
 
 
 # Local version of PyLithApp
@@ -58,10 +56,6 @@
     TestLine3.setUp(self)
     run_pylith()
     self.outputRoot = "axialextension"
-    if has_vtk():
-      self.reader = VTKDataReader()
-    else:
-      self.reader = None
     return
 
 
@@ -71,8 +65,8 @@
     """
     nvertices = self.mesh['nvertices']
     spaceDim = self.mesh['spaceDim']    
-    disp = numpy.zeros( (nvertices, spaceDim), dtype=numpy.float64)
-    disp[:,0] = -0.2 + 0.1 * vertices[:,0]
+    disp = numpy.zeros( (1, nvertices, spaceDim), dtype=numpy.float64)
+    disp[0,:,0] = -0.2 + 0.1 * vertices[:,0]
 
     return disp
 
@@ -87,12 +81,11 @@
     tensorSize = self.mesh['tensorSize']
 
     if name == "total_strain":
-      stateVar = exx*numpy.ones( (ncells, tensorSize), dtype=numpy.float64)
+      stateVar = exx*numpy.ones( (1, ncells, tensorSize), dtype=numpy.float64)
     
     elif name == "stress":
       lp2m = self.density*self.vp**2
-      stateVar = lp2m*exx * numpy.ones( (ncells, tensorSize), 
-                                       dtype=numpy.float64)
+      stateVar = lp2m*exx * numpy.ones( (1, ncells, tensorSize), dtype=numpy.float64)
     else:
       raise ValueError("Unknown state variable '%s'." % name)
 

Modified: short/3D/PyLith/trunk/tests_auto/1d/line3/TestDislocation.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/1d/line3/TestDislocation.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/1d/line3/TestDislocation.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -22,8 +22,7 @@
 
 import numpy
 from TestLine3 import TestLine3
-from pylith.utils.VTKDataReader import has_vtk
-from pylith.utils.VTKDataReader import VTKDataReader
+
 from pylith.tests.Fault import check_vertex_fields
 
 # Local version of PyLithApp
@@ -60,16 +59,12 @@
     self.nverticesO = 5
 
     self.faultMesh = {'nvertices': 1,
-                      'spaceDim': 3,
+                      'spaceDim': 1,
                       'ncells': 1,
                       'ncorners': 1}
 
     run_pylith()
     self.outputRoot = "dislocation"
-    if has_vtk():
-      self.reader = VTKDataReader()
-    else:
-      self.reader = None
     return
 
 
@@ -77,10 +72,10 @@
     """
     Check fault information.
     """
-    if self.reader is None:
+    if not self.checkResults:
       return
 
-    filename = "%s-fault_info.vtk" % self.outputRoot
+    filename = "%s-fault_info.h5" % self.outputRoot
     fields = ["normal_dir", "final_slip", "slip_time"]
     check_vertex_fields(self, filename, self.faultMesh, fields)
 
@@ -91,10 +86,10 @@
     """
     Check fault information.
     """
-    if self.reader is None:
+    if not self.checkResults:
       return
 
-    filename = "%s-fault_t0000000.vtk" % self.outputRoot
+    filename = "%s-fault.h5" % self.outputRoot
     fields = ["slip", "traction_change"]
     check_vertex_fields(self, filename, self.faultMesh, fields)
 
@@ -109,11 +104,11 @@
     spaceDim = self.mesh['spaceDim']    
     nverticesO = self.nverticesO
 
-    disp = numpy.zeros( (nvertices, spaceDim), dtype=numpy.float64)
+    disp = numpy.zeros( (1, nvertices, spaceDim), dtype=numpy.float64)
     maskP = vertices[:,0] >= 2.0
     maskP[nverticesO:nvertices] = False
     maskN = numpy.bitwise_and(vertices[:,0] <= 2.0, ~maskP)
-    disp[:,0] = \
+    disp[0,:,0] = \
         maskN*(-0.20 - 0.025*vertices[:,0]) + \
         maskP*(+0.30 - 0.025*vertices[:,0])
 
@@ -130,12 +125,11 @@
     tensorSize = self.mesh['tensorSize']
 
     if name == "total_strain":
-      stateVar = exx*numpy.ones( (ncells, tensorSize), dtype=numpy.float64)
+      stateVar = exx*numpy.ones( (1, ncells, tensorSize), dtype=numpy.float64)
     
     elif name == "stress":
       lp2m = self.density*self.vp**2
-      stateVar = lp2m*exx * numpy.ones( (ncells, tensorSize), 
-                                       dtype=numpy.float64)
+      stateVar = lp2m*exx * numpy.ones( (1, ncells, tensorSize), dtype=numpy.float64)
     else:
       raise ValueError("Unknown state variable '%s'." % name)
 
@@ -159,22 +153,22 @@
     nvertices = self.faultMesh['nvertices']
 
     if name == "normal_dir":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
       field[:,0] = normalDir
 
     elif name == "final_slip":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
       field[:,0] = finalSlip
       
     elif name == "slip_time":
-      field = slipTime*numpy.ones( (nvertices, 1), dtype=numpy.float64)
+      field = slipTime*numpy.ones( (1, nvertices, 1), dtype=numpy.float64)
       
     elif name == "slip":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
       field[:,0] = finalSlip
 
     elif name == "traction_change":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
       field[:,0] = traction
       
     else:

Modified: short/3D/PyLith/trunk/tests_auto/1d/line3/TestLine3.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/1d/line3/TestLine3.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/1d/line3/TestLine3.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -23,6 +23,8 @@
 import unittest
 import numpy
 
+from pylith.tests import has_h5py
+
 class TestLine3(unittest.TestCase):
   """
   Generic tests for problems using 1-D bar mesh.
@@ -35,11 +37,16 @@
     self.mesh = {'ncells': 2,
                  'ncorners': 3,
                  'nvertices': 5,
-                 'spaceDim': 3,
+                 'spaceDim': 1,
                  'tensorSize': 1}
     self.vs = 3000.0
     self.vp = 5291.502622129181
     self.density = 2500.0
+
+    if has_h5py():
+      self.checkResults = True
+    else:
+      self.checkResults = False
     return
 
 
@@ -47,18 +54,18 @@
     """
     Check elastic info.
     """
-    if self.reader is None:
+    if not self.checkResults:
       return
 
     ncells= self.mesh['ncells']
 
-    filename = "%s-elastic_info.vtk" % self.outputRoot
+    filename = "%s-elastic_info.h5" % self.outputRoot
     m = self.density*self.vs**2
     l = self.density*self.vp**2 - 2*m
 
-    propMu =  m*numpy.ones( (ncells, 1), dtype=numpy.float64)
-    propLambda = l*numpy.ones( (ncells, 1), dtype=numpy.float64)
-    propDensity = self.density*numpy.ones( (ncells, 2), dtype=numpy.float64)
+    propMu =  m*numpy.ones( (1, ncells, 1), dtype=numpy.float64)
+    propLambda = l*numpy.ones( (1, ncells, 1), dtype=numpy.float64)
+    propDensity = self.density*numpy.ones( (1, ncells, 1), dtype=numpy.float64)
 
     properties = {'mu': propMu,
                   'lambda': propLambda,
@@ -74,10 +81,10 @@
     """
     Check solution (displacement) field.
     """
-    if self.reader is None:
+    if not self.checkResults:
       return
 
-    filename = "%s_t0000000.vtk" % self.outputRoot
+    filename = "%s.h5" % self.outputRoot
     from pylith.tests.Solution import check_displacements
     check_displacements(self, filename, self.mesh)
 
@@ -88,10 +95,10 @@
     """
     Check elastic state variables.
     """
-    if self.reader is None:
+    if not self.checkResults:
       return
 
-    filename = "%s-elastic_t0000000.vtk" % self.outputRoot
+    filename = "%s-elastic.h5" % self.outputRoot
 
     from pylith.tests.StateVariables import check_state_variables
     stateVars = ["total_strain", "stress"]

Modified: short/3D/PyLith/trunk/tests_auto/1d/line3/axialextension.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/1d/line3/axialextension.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/1d/line3/axialextension.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [axialextension]
 
 [axialextension.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -51,7 +50,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
 
 # ----------------------------------------------------------------------
@@ -88,9 +87,11 @@
 # ----------------------------------------------------------------------
 # output
 # ----------------------------------------------------------------------
-[axialextension.problem.formulation.output.output.writer]
-filename = axialextension.vtk
+[axialextension.problem.formulation.output.output]
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = axialextension.h5
 
 [axialextension.timedependent.materials.elastic.output]
 cell_filter = pylith.meshio.CellFilterAvgMesh
-writer.filename = axialextension-elastic.vtk
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = axialextension-elastic.h5

Modified: short/3D/PyLith/trunk/tests_auto/1d/line3/dislocation.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/1d/line3/dislocation.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/1d/line3/dislocation.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [dislocation]
 
 [dislocation.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -51,7 +50,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 +71,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
@@ -99,12 +98,15 @@
 # ----------------------------------------------------------------------
 # output
 # ----------------------------------------------------------------------
-[dislocation.problem.formulation.output.output.writer]
-filename = dislocation.vtk
+[dislocation.problem.formulation.output.output]
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = dislocation.h5
 
 [dislocation.timedependent.materials.elastic.output]
 cell_filter = pylith.meshio.CellFilterAvgMesh
-writer.filename = dislocation-elastic.vtk
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = dislocation-elastic.h5
 
-[dislocation.timedependent.interfaces.fault.output.writer]
-filename = dislocation-fault.vtk
+[dislocation.timedependent.interfaces.fault.output]
+writer = pylith.meshio.DataWriterHDF5SubSubMesh
+writer.filename = dislocation-fault.h5

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/TestAxialDisp.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/TestAxialDisp.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/TestAxialDisp.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -22,9 +22,8 @@
 
 import numpy
 from TestQuad4 import TestQuad4
+
 from axialdisp_soln import AnalyticalSoln
-from pylith.utils.VTKDataReader import has_vtk
-from pylith.utils.VTKDataReader import VTKDataReader
 
 # Local version of PyLithApp
 from pylith.apps.PyLithApp import PyLithApp
@@ -64,11 +63,7 @@
     TestQuad4.setUp(self)
     run_pylith()
     self.outputRoot = "axialdisp"
-    if has_vtk():
-      self.reader = VTKDataReader()
-      self.soln = AnalyticalSoln()
-    else:
-      self.reader = None
+    self.soln = AnalyticalSoln()
     return
 
 
@@ -84,7 +79,7 @@
     Calculate state variable.
     """
     ncells = self.mesh['ncells']
-    pts = numpy.zeros( (ncells, 3), dtype=numpy.float64)
+    pts = numpy.zeros( (ncells, 2), dtype=numpy.float64)
     if name == "total_strain":
       stateVar = self.soln.strain(pts)
     elif name == "stress":

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/TestDislocation.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/TestDislocation.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/TestDislocation.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -23,8 +23,7 @@
 import numpy
 from TestQuad4 import TestQuad4
 from dislocation_soln import AnalyticalSoln
-from pylith.utils.VTKDataReader import has_vtk
-from pylith.utils.VTKDataReader import VTKDataReader
+
 from pylith.tests.Fault import check_vertex_fields
 
 # Local version of PyLithApp
@@ -61,17 +60,13 @@
     self.mesh['nvertices'] = 81+9
     self.nverticesO = 81
     self.faultMesh = {'nvertices': 9,
-                      'spaceDim': 3,
+                      'spaceDim': 2,
                       'ncells': 8,
                       'ncorners': 2}
 
     run_pylith()
     self.outputRoot = "dislocation"
-    if has_vtk():
-      self.reader = VTKDataReader()
-      self.soln = AnalyticalSoln()
-    else:
-      self.reader = None
+    self.soln = AnalyticalSoln()
 
     return
 
@@ -80,10 +75,10 @@
     """
     Check fault information.
     """
-    if self.reader is None:
+    if not self.checkResults:
       return
 
-    filename = "%s-fault_info.vtk" % self.outputRoot
+    filename = "%s-fault_info.h5" % self.outputRoot
     fields = ["normal_dir", "final_slip", "slip_time"]
     check_vertex_fields(self, filename, self.faultMesh, fields)
 
@@ -94,10 +89,10 @@
     """
     Check fault information.
     """
-    if self.reader is None:
+    if not self.checkResults:
       return
 
-    filename = "%s-fault_t0000000.vtk" % self.outputRoot
+    filename = "%s-fault.h5" % self.outputRoot
     fields = ["slip", "traction_change"]
     check_vertex_fields(self, filename, self.faultMesh, fields)
 
@@ -139,24 +134,24 @@
     nvertices = self.faultMesh['nvertices']
 
     if name == "normal_dir":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = normalDir[0]
-      field[:,1] = normalDir[1]
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
+      field[0,:,0] = normalDir[0]
+      field[0,:,1] = normalDir[1]
 
     elif name == "final_slip":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = finalSlip
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
+      field[0,:,0] = finalSlip
       
     elif name == "slip_time":
-      field = slipTime*numpy.zeros( (nvertices, 1), dtype=numpy.float64)
+      field = slipTime*numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
       
     elif name == "slip":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = finalSlip
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
+      field[0,:,0] = finalSlip
 
     elif name == "traction_change":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = 0.0
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
+      field[0,:,0] = 0.0
       
     else:
       raise ValueError("Unknown fault field '%s'." % name)

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/TestFrictionCompression.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/TestFrictionCompression.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/TestFrictionCompression.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -23,8 +23,7 @@
 import numpy
 from TestQuad4 import TestQuad4
 from friction_compression_soln import AnalyticalSoln
-from pylith.utils.VTKDataReader import has_vtk
-from pylith.utils.VTKDataReader import VTKDataReader
+
 from pylith.tests.Fault import check_vertex_fields
 
 # Local version of PyLithApp
@@ -61,17 +60,13 @@
     self.mesh['nvertices'] = 81+9
     self.nverticesO = 81
     self.faultMesh = {'nvertices': 9,
-                      'spaceDim': 3,
+                      'spaceDim': 2,
                       'ncells': 8,
                       'ncorners': 2}
 
     run_pylith()
     self.outputRoot = "friction_compression"
-    if has_vtk():
-      self.reader = VTKDataReader()
-      self.soln = AnalyticalSoln()
-    else:
-      self.reader = None
+    self.soln = AnalyticalSoln()
     return
 
 
@@ -79,11 +74,11 @@
     """
     Check fault information.
     """
-    if self.reader is None:
+    if not self.checkResults:
       return
 
-    filename = "%s-fault_info.vtk" % self.outputRoot
-    fields = ["strike_dir", "normal_dir", "initial_traction","friction_coefficient","cohesion"]
+    filename = "%s-fault_info.h5" % self.outputRoot
+    fields = ["strike_dir", "normal_dir", "traction_initial","friction_coefficient","cohesion"]
     check_vertex_fields(self, filename, self.faultMesh, fields)
 
     return
@@ -93,10 +88,10 @@
     """
     Check fault information.
     """
-    if self.reader is None:
+    if not self.checkResults:
       return
 
-    filename = "%s-fault_t0000000.vtk" % self.outputRoot
+    filename = "%s-fault.h5" % self.outputRoot
     fields = ["slip", "traction"]
     check_vertex_fields(self, filename, self.faultMesh, fields)
 
@@ -139,34 +134,34 @@
     nvertices = self.faultMesh['nvertices']
 
     if name == "strike_dir":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = strikeDir[0]
-      field[:,1] = strikeDir[1]
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
+      field[0,:,0] = strikeDir[0]
+      field[0,:,1] = strikeDir[1]
 
     elif name == "normal_dir":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = normalDir[0]
-      field[:,1] = normalDir[1]
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
+      field[0,:,0] = normalDir[0]
+      field[0,:,1] = normalDir[1]
 
-    elif name == "initial_traction":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = initialTraction[0]
-      field[:,1] = initialTraction[1]
+    elif name == "traction_initial":
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
+      field[0,:,0] = initialTraction[0]
+      field[0,:,1] = initialTraction[1]
 
     elif name == "friction_coefficient":
-      field = numpy.zeros( (nvertices, 1), dtype=numpy.float64)
-      field[:] = frictionCoefficient
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
+      field[0,:] = frictionCoefficient
 
     elif name == "cohesion":
-      field = numpy.zeros( (nvertices, 1), dtype=numpy.float64)
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
 
     elif name == "slip":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
 
     elif name == "traction":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = 0.0
-      field[:,1] = -2.2e+6
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
+      field[0,:,0] = 0.0
+      field[0,:,1] = -2.2e+6
       
     else:
       raise ValueError("Unknown fault field '%s'." % name)

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/TestFrictionOpening.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/TestFrictionOpening.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/TestFrictionOpening.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -23,8 +23,7 @@
 import numpy
 from TestQuad4 import TestQuad4
 from friction_opening_soln import AnalyticalSoln
-from pylith.utils.VTKDataReader import has_vtk
-from pylith.utils.VTKDataReader import VTKDataReader
+
 from pylith.tests.Fault import check_vertex_fields
 
 # Local version of PyLithApp
@@ -61,17 +60,13 @@
     self.mesh['nvertices'] = 81+9
     self.nverticesO = 81
     self.faultMesh = {'nvertices': 9,
-                      'spaceDim': 3,
+                      'spaceDim': 2,
                       'ncells': 8,
                       'ncorners': 2}
 
     run_pylith()
     self.outputRoot = "friction_opening"
-    if has_vtk():
-      self.reader = VTKDataReader()
-      self.soln = AnalyticalSoln()
-    else:
-      self.reader = None
+    self.soln = AnalyticalSoln()
     return
 
 
@@ -79,11 +74,11 @@
     """
     Check fault information.
     """
-    if self.reader is None:
+    if not self.checkResults:
       return
 
-    filename = "%s-fault_info.vtk" % self.outputRoot
-    fields = ["strike_dir", "normal_dir", "initial_traction","friction_coefficient","cohesion"]
+    filename = "%s-fault_info.h5" % self.outputRoot
+    fields = ["strike_dir", "normal_dir", "traction_initial","friction_coefficient","cohesion"]
     check_vertex_fields(self, filename, self.faultMesh, fields)
 
     return
@@ -93,10 +88,10 @@
     """
     Check fault information.
     """
-    if self.reader is None:
+    if not self.checkResults:
       return
 
-    filename = "%s-fault_t0000000.vtk" % self.outputRoot
+    filename = "%s-fault.h5" % self.outputRoot
     fields = ["slip", "traction"]
     check_vertex_fields(self, filename, self.faultMesh, fields)
 
@@ -140,34 +135,34 @@
     nvertices = self.faultMesh['nvertices']
 
     if name == "strike_dir":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = strikeDir[0]
-      field[:,1] = strikeDir[1]
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
+      field[0,:,0] = strikeDir[0]
+      field[0,:,1] = strikeDir[1]
 
     elif name == "normal_dir":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = normalDir[0]
-      field[:,1] = normalDir[1]
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
+      field[0,:,0] = normalDir[0]
+      field[0,:,1] = normalDir[1]
 
-    elif name == "initial_traction":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = initialTraction[0]
-      field[:,1] = initialTraction[1]
+    elif name == "traction_initial":
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
+      field[0,:,0] = initialTraction[0]
+      field[0,:,1] = initialTraction[1]
 
     elif name == "friction_coefficient":
-      field = numpy.zeros( (nvertices, 1), dtype=numpy.float64)
-      field[:] = frictionCoefficient
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
+      field[0,:,0] = frictionCoefficient
 
     elif name == "cohesion":
-      field = numpy.zeros( (nvertices, 1), dtype=numpy.float64)
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
 
     elif name == "slip":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = slip[0]
-      field[:,1] = slip[1]
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
+      field[0,:,0] = slip[0]
+      field[0,:,1] = slip[1]
 
     elif name == "traction":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
       
     else:
       raise ValueError("Unknown fault field '%s'." % name)

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/TestFrictionShearSliding.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/TestFrictionShearSliding.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/TestFrictionShearSliding.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -23,8 +23,7 @@
 import numpy
 from TestQuad4 import TestQuad4
 from friction_shear_sliding_soln import AnalyticalSoln
-from pylith.utils.VTKDataReader import has_vtk
-from pylith.utils.VTKDataReader import VTKDataReader
+
 from pylith.tests.Fault import check_vertex_fields
 
 # Local version of PyLithApp
@@ -61,17 +60,13 @@
     self.mesh['nvertices'] = 81+9
     self.nverticesO = 81
     self.faultMesh = {'nvertices': 9,
-                      'spaceDim': 3,
+                      'spaceDim': 2,
                       'ncells': 8,
                       'ncorners': 2}
 
     run_pylith()
     self.outputRoot = "friction_shear_sliding"
-    if has_vtk():
-      self.reader = VTKDataReader()
-      self.soln = AnalyticalSoln()
-    else:
-      self.reader = None
+    self.soln = AnalyticalSoln()
     return
 
 
@@ -79,11 +74,11 @@
     """
     Check fault information.
     """
-    if self.reader is None:
+    if not self.checkResults:
       return
 
-    filename = "%s-fault_info.vtk" % self.outputRoot
-    fields = ["strike_dir", "normal_dir", "initial_traction","friction_coefficient","cohesion"]
+    filename = "%s-fault_info.h5" % self.outputRoot
+    fields = ["strike_dir", "normal_dir", "traction_initial","friction_coefficient","cohesion"]
     check_vertex_fields(self, filename, self.faultMesh, fields)
 
     return
@@ -93,10 +88,10 @@
     """
     Check fault information.
     """
-    if self.reader is None:
+    if not self.checkResults:
       return
 
-    filename = "%s-fault_t0000000.vtk" % self.outputRoot
+    filename = "%s-fault.h5" % self.outputRoot
     fields = ["slip", "traction"]
     check_vertex_fields(self, filename, self.faultMesh, fields)
 
@@ -115,7 +110,7 @@
     Calculate state variable.
     """
     ncells = self.mesh['ncells']
-    pts = numpy.zeros( (ncells, 3), dtype=numpy.float64)
+    pts = numpy.zeros( (ncells, 2), dtype=numpy.float64)
     if name == "total_strain":
       stateVar = self.soln.strain(pts)
     elif name == "stress":
@@ -148,36 +143,36 @@
     nvertices = self.faultMesh['nvertices']
 
     if name == "strike_dir":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = strikeDir[0]
-      field[:,1] = strikeDir[1]
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
+      field[0,:,0] = strikeDir[0]
+      field[0,:,1] = strikeDir[1]
 
     elif name == "normal_dir":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = normalDir[0]
-      field[:,1] = normalDir[1]
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
+      field[0,:,0] = normalDir[0]
+      field[0,:,1] = normalDir[1]
 
-    elif name == "initial_traction":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = initialTraction[0]
-      field[:,1] = initialTraction[1]
+    elif name == "traction_initial":
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
+      field[0,:,0] = initialTraction[0]
+      field[0,:,1] = initialTraction[1]
 
     elif name == "friction_coefficient":
-      field = numpy.zeros( (nvertices, 1), dtype=numpy.float64)
-      field[:] = frictionCoefficient
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
+      field[0,:,0] = frictionCoefficient
 
     elif name == "cohesion":
-      field = numpy.zeros( (nvertices, 1), dtype=numpy.float64)
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
 
     elif name == "slip":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = slip[0]
-      field[:,1] = slip[1]
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
+      field[0,:,0] = slip[0]
+      field[0,:,1] = slip[1]
 
     elif name == "traction":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = 0.6e+6
-      field[:,1] = -1.0e+6
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
+      field[0,:,0] = 0.6e+6
+      field[0,:,1] = -1.0e+6
       
     else:
       raise ValueError("Unknown fault field '%s'." % name)

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/TestFrictionShearStick.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/TestFrictionShearStick.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/TestFrictionShearStick.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -23,8 +23,7 @@
 import numpy
 from TestQuad4 import TestQuad4
 from friction_shear_stick_soln import AnalyticalSoln
-from pylith.utils.VTKDataReader import has_vtk
-from pylith.utils.VTKDataReader import VTKDataReader
+
 from pylith.tests.Fault import check_vertex_fields
 
 # Local version of PyLithApp
@@ -61,17 +60,13 @@
     self.mesh['nvertices'] = 81+9
     self.nverticesO = 81
     self.faultMesh = {'nvertices': 9,
-                      'spaceDim': 3,
+                      'spaceDim': 2,
                       'ncells': 8,
                       'ncorners': 2}
 
     run_pylith()
     self.outputRoot = "friction_shear_stick"
-    if has_vtk():
-      self.reader = VTKDataReader()
-      self.soln = AnalyticalSoln()
-    else:
-      self.reader = None
+    self.soln = AnalyticalSoln()
     return
 
 
@@ -79,11 +74,11 @@
     """
     Check fault information.
     """
-    if self.reader is None:
+    if not self.checkResults:
       return
 
-    filename = "%s-fault_info.vtk" % self.outputRoot
-    fields = ["strike_dir", "normal_dir", "initial_traction","friction_coefficient","cohesion"]
+    filename = "%s-fault_info.h5" % self.outputRoot
+    fields = ["strike_dir", "normal_dir", "traction_initial","friction_coefficient","cohesion"]
     check_vertex_fields(self, filename, self.faultMesh, fields)
 
     return
@@ -93,10 +88,10 @@
     """
     Check fault information.
     """
-    if self.reader is None:
+    if not self.checkResults:
       return
 
-    filename = "%s-fault_t0000000.vtk" % self.outputRoot
+    filename = "%s-fault.h5" % self.outputRoot
     fields = ["slip", "traction"]
     check_vertex_fields(self, filename, self.faultMesh, fields)
 
@@ -139,34 +134,34 @@
     nvertices = self.faultMesh['nvertices']
 
     if name == "strike_dir":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = strikeDir[0]
-      field[:,1] = strikeDir[1]
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
+      field[0,:,0] = strikeDir[0]
+      field[0,:,1] = strikeDir[1]
 
     elif name == "normal_dir":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = normalDir[0]
-      field[:,1] = normalDir[1]
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
+      field[0,:,0] = normalDir[0]
+      field[0,:,1] = normalDir[1]
 
-    elif name == "initial_traction":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = initialTraction[0]
-      field[:,1] = initialTraction[1]
+    elif name == "traction_initial":
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
+      field[0,:,0] = initialTraction[0]
+      field[0,:,1] = initialTraction[1]
 
     elif name == "friction_coefficient":
-      field = numpy.zeros( (nvertices, 1), dtype=numpy.float64)
-      field[:] = frictionCoefficient
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
+      field[0,:,0] = frictionCoefficient
 
     elif name == "cohesion":
-      field = numpy.zeros( (nvertices, 1), dtype=numpy.float64)
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
 
     elif name == "slip":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
 
     elif name == "traction":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = 1.0e+6
-      field[:,1] = -1.0e+7
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
+      field[0,:,0] = 1.0e+6
+      field[0,:,1] = -1.0e+7
       
     else:
       raise ValueError("Unknown fault field '%s'." % name)

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/TestLgDeformRigidBody.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/TestLgDeformRigidBody.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/TestLgDeformRigidBody.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -23,9 +23,8 @@
 
 import numpy
 from TestQuad4 import TestQuad4
+
 from rigidbody_soln import AnalyticalSoln
-from pylith.utils.VTKDataReader import has_vtk
-from pylith.utils.VTKDataReader import VTKDataReader
 
 # Local version of PyLithApp
 from pylith.apps.PyLithApp import PyLithApp
@@ -65,11 +64,7 @@
     TestQuad4.setUp(self)
     run_pylith()
     self.outputRoot = "lgdeformrigidbody"
-    if has_vtk():
-      self.reader = VTKDataReader()
-      self.soln = AnalyticalSoln()
-    else:
-      self.reader = None
+    self.soln = AnalyticalSoln()
     return
 
 
@@ -85,7 +80,7 @@
     Calculate state variable.
     """
     ncells = self.mesh['ncells']
-    pts = numpy.zeros( (ncells, 3), dtype=numpy.float64)
+    pts = numpy.zeros( (ncells, 2), dtype=numpy.float64)
     if name == "total_strain":
       stateVar = self.soln.strain(pts)
     elif name == "stress":

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/TestLgDeformTraction.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/TestLgDeformTraction.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/TestLgDeformTraction.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -23,9 +23,8 @@
 
 import numpy
 from TestQuad4 import TestQuad4
+
 from lgdeformtraction_soln import AnalyticalSoln
-from pylith.utils.VTKDataReader import has_vtk
-from pylith.utils.VTKDataReader import VTKDataReader
 
 # Local version of PyLithApp
 from pylith.apps.PyLithApp import PyLithApp
@@ -60,11 +59,7 @@
     TestQuad4.setUp(self)
     run_pylith()
     self.outputRoot = "lgdeformtraction"
-    if has_vtk():
-      self.reader = VTKDataReader()
-      self.soln = AnalyticalSoln()
-    else:
-      self.reader = None
+    self.soln = AnalyticalSoln()
     return
 
 
@@ -80,7 +75,7 @@
     Calculate state variable.
     """
     ncells = self.mesh['ncells']
-    pts = numpy.zeros( (ncells, 3), dtype=numpy.float64)
+    pts = numpy.zeros( (ncells, 2), dtype=numpy.float64)
     if name == "total_strain":
       stateVar = self.soln.strain(pts)
     elif name == "stress":

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/TestQuad4.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/TestQuad4.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/TestQuad4.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -23,6 +23,8 @@
 import unittest
 import numpy
 
+from pylith.tests import has_h5py
+
 class TestQuad4(unittest.TestCase):
   """
   Generic tests for problems using 2-D mesh.
@@ -35,8 +37,13 @@
     self.mesh = {'ncells': 64,
                  'ncorners': 4,
                  'nvertices': 81,
-                 'spaceDim': 3,
+                 'spaceDim': 2,
                  'tensorSize': 3}
+
+    if has_h5py():
+      self.checkResults = True
+    else:
+      self.checkResults = False
     return
 
 
@@ -44,17 +51,17 @@
     """
     Check elastic info.
     """
-    if self.reader is None:
+    if not self.checkResults:
       return
 
     ncells= self.mesh['ncells']
 
-    filename = "%s-elastic_info.vtk" % self.outputRoot
+    filename = "%s-elastic_info.h5" % self.outputRoot
     from axialdisp_soln import p_mu,p_lambda,p_density
 
-    propMu =  p_mu*numpy.ones( (ncells, 1), dtype=numpy.float64)
-    propLambda = p_lambda*numpy.ones( (ncells, 1), dtype=numpy.float64)
-    propDensity = p_density*numpy.ones( (ncells, 2), dtype=numpy.float64)
+    propMu =  p_mu*numpy.ones( (1, ncells, 1), dtype=numpy.float64)
+    propLambda = p_lambda*numpy.ones( (1, ncells, 1), dtype=numpy.float64)
+    propDensity = p_density*numpy.ones( (1, ncells, 1), dtype=numpy.float64)
 
     properties = {'mu': propMu,
                   'lambda': propLambda,
@@ -70,10 +77,10 @@
     """
     Check solution (displacement) field.
     """
-    if self.reader is None:
+    if not self.checkResults:
       return
 
-    filename = "%s_t0000000.vtk" % self.outputRoot
+    filename = "%s.h5" % self.outputRoot
     from pylith.tests.Solution import check_displacements
     check_displacements(self, filename, self.mesh)
 
@@ -84,10 +91,10 @@
     """
     Check elastic state variables.
     """
-    if self.reader is None:
+    if not self.checkResults:
       return
 
-    filename = "%s-elastic_t0000000.vtk" % self.outputRoot
+    filename = "%s-elastic.h5" % self.outputRoot
 
     from pylith.tests.StateVariables import check_state_variables
     stateVars = ["total_strain", "stress"]

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/TestShearDisp.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/TestShearDisp.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/TestShearDisp.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -22,9 +22,8 @@
 
 import numpy
 from TestQuad4 import TestQuad4
+
 from sheardisp_soln import AnalyticalSoln
-from pylith.utils.VTKDataReader import has_vtk
-from pylith.utils.VTKDataReader import VTKDataReader
 
 # Local version of PyLithApp
 from pylith.apps.PyLithApp import PyLithApp
@@ -64,11 +63,7 @@
     TestQuad4.setUp(self)
     run_pylith()
     self.outputRoot = "sheardisp"
-    if has_vtk():
-      self.reader = VTKDataReader()
-      self.soln = AnalyticalSoln()
-    else:
-      self.reader = None
+    self.soln = AnalyticalSoln()
     return
 
 
@@ -84,7 +79,7 @@
     Calculate state variable.
     """
     ncells = self.mesh['ncells']
-    pts = numpy.zeros( (ncells, 3), dtype=numpy.float64)
+    pts = numpy.zeros( (ncells, 2), dtype=numpy.float64)
     if name == "total_strain":
       stateVar = self.soln.strain(pts)
     elif name == "stress":

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/TestSlipWeakeningCompression.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/TestSlipWeakeningCompression.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/TestSlipWeakeningCompression.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -23,8 +23,7 @@
 import numpy
 from TestQuad4 import TestQuad4
 from slipweakening_compression_soln import AnalyticalSoln
-from pylith.utils.VTKDataReader import has_vtk
-from pylith.utils.VTKDataReader import VTKDataReader
+
 from pylith.tests.Fault import check_vertex_fields
 
 # Local version of PyLithApp
@@ -61,17 +60,13 @@
     self.mesh['nvertices'] = 81+9
     self.nverticesO = 81
     self.faultMesh = {'nvertices': 9,
-                      'spaceDim': 3,
+                      'spaceDim': 2,
                       'ncells': 8,
                       'ncorners': 2}
 
     run_pylith()
     self.outputRoot = "slipweakening_compression"
-    if has_vtk():
-      self.reader = VTKDataReader()
-      self.soln = AnalyticalSoln()
-    else:
-      self.reader = None
+    self.soln = AnalyticalSoln()
     return
 
 
@@ -79,11 +74,11 @@
     """
     Check fault information.
     """
-    if self.reader is None:
+    if not self.checkResults:
       return
 
-    filename = "%s-fault_info.vtk" % self.outputRoot
-    fields = ["strike_dir", "normal_dir", "initial_traction","static_coefficient","dynamic_coefficient","slip_weakening_parameter","cohesion"]
+    filename = "%s-fault_info.h5" % self.outputRoot
+    fields = ["strike_dir", "normal_dir", "traction_initial","static_coefficient","dynamic_coefficient","slip_weakening_parameter","cohesion"]
     check_vertex_fields(self, filename, self.faultMesh, fields)
 
     return
@@ -93,10 +88,10 @@
     """
     Check fault information.
     """
-    if self.reader is None:
+    if not self.checkResults:
       return
 
-    filename = "%s-fault_t0000000.vtk" % self.outputRoot
+    filename = "%s-fault.h5" % self.outputRoot
     fields = ["slip", "traction","cumulative_slip","previous_slip"]
     check_vertex_fields(self, filename, self.faultMesh, fields)
 
@@ -115,7 +110,7 @@
     Calculate state variable.
     """
     ncells = self.mesh['ncells']
-    pts = numpy.zeros( (ncells, 3), dtype=numpy.float64)
+    pts = numpy.zeros( (ncells, 2), dtype=numpy.float64)
     if name == "total_strain":
       stateVar = self.soln.strain(pts)
     elif name == "stress":
@@ -141,48 +136,48 @@
     nvertices = self.faultMesh['nvertices']
 
     if name == "strike_dir":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = strikeDir[0]
-      field[:,1] = strikeDir[1]
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
+      field[0,:,0] = strikeDir[0]
+      field[0,:,1] = strikeDir[1]
 
     elif name == "normal_dir":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = normalDir[0]
-      field[:,1] = normalDir[1]
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
+      field[0,:,0] = normalDir[0]
+      field[0,:,1] = normalDir[1]
 
-    elif name == "initial_traction":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = initialTraction[0]
-      field[:,1] = initialTraction[1]
+    elif name == "traction_initial":
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
+      field[0,:,0] = initialTraction[0]
+      field[0,:,1] = initialTraction[1]
 
     elif name == "static_coefficient":
-      field = numpy.zeros( (nvertices, 1), dtype=numpy.float64)
-      field[:] = staticCoefficient
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
+      field[0,:,0] = staticCoefficient
 
     elif name == "dynamic_coefficient":
-      field = numpy.zeros( (nvertices, 1), dtype=numpy.float64)
-      field[:] = dynamicCoefficient
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
+      field[0,:,0] = dynamicCoefficient
 
     elif name == "slip_weakening_parameter":
-      field = numpy.zeros( (nvertices, 1), dtype=numpy.float64)
-      field[:] = slipWeakeningParameter
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
+      field[0,:,0] = slipWeakeningParameter
 
     elif name == "cohesion":
-      field = numpy.zeros( (nvertices, 1), dtype=numpy.float64)
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
 
     elif name == "slip":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
 
     elif name == "traction":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = 0.0
-      field[:,1] = -2.2e+6
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
+      field[0,:,0] = 0.0
+      field[0,:,1] = -2.2e+6
       
     elif name == "cumulative_slip":
-      field = numpy.zeros( (nvertices, 1), dtype=numpy.float64)
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
 
     elif name == "previous_slip":
-      field = numpy.zeros( (nvertices, 1), dtype=numpy.float64)
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
 
     else:
       raise ValueError("Unknown fault field '%s'." % name)

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/TestSlipWeakeningOpening.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/TestSlipWeakeningOpening.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/TestSlipWeakeningOpening.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -23,8 +23,7 @@
 import numpy
 from TestQuad4 import TestQuad4
 from slipweakening_opening_soln import AnalyticalSoln
-from pylith.utils.VTKDataReader import has_vtk
-from pylith.utils.VTKDataReader import VTKDataReader
+
 from pylith.tests.Fault import check_vertex_fields
 
 # Local version of PyLithApp
@@ -61,17 +60,13 @@
     self.mesh['nvertices'] = 81+9
     self.nverticesO = 81
     self.faultMesh = {'nvertices': 9,
-                      'spaceDim': 3,
+                      'spaceDim': 2,
                       'ncells': 8,
                       'ncorners': 2}
 
     run_pylith()
     self.outputRoot = "slipweakening_opening"
-    if has_vtk():
-      self.reader = VTKDataReader()
-      self.soln = AnalyticalSoln()
-    else:
-      self.reader = None
+    self.soln = AnalyticalSoln()
     return
 
 
@@ -79,11 +74,11 @@
     """
     Check fault information.
     """
-    if self.reader is None:
+    if not self.checkResults:
       return
 
-    filename = "%s-fault_info.vtk" % self.outputRoot
-    fields = ["strike_dir", "normal_dir", "initial_traction","static_coefficient","dynamic_coefficient","slip_weakening_parameter","cohesion"]
+    filename = "%s-fault_info.h5" % self.outputRoot
+    fields = ["strike_dir", "normal_dir", "traction_initial","static_coefficient","dynamic_coefficient","slip_weakening_parameter","cohesion"]
     check_vertex_fields(self, filename, self.faultMesh, fields)
 
     return
@@ -93,10 +88,10 @@
     """
     Check fault information.
     """
-    if self.reader is None:
+    if not self.checkResults:
       return
 
-    filename = "%s-fault_t0000000.vtk" % self.outputRoot
+    filename = "%s-fault.h5" % self.outputRoot
     fields = ["slip", "traction","cumulative_slip","previous_slip"]
     check_vertex_fields(self, filename, self.faultMesh, fields)
 
@@ -115,7 +110,7 @@
     Calculate state variable.
     """
     ncells = self.mesh['ncells']
-    pts = numpy.zeros( (ncells, 3), dtype=numpy.float64)
+    pts = numpy.zeros( (ncells, 2), dtype=numpy.float64)
     if name == "total_strain":
       stateVar = self.soln.strain(pts)
     elif name == "stress":
@@ -142,48 +137,48 @@
     nvertices = self.faultMesh['nvertices']
 
     if name == "strike_dir":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = strikeDir[0]
-      field[:,1] = strikeDir[1]
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
+      field[0,:,0] = strikeDir[0]
+      field[0,:,1] = strikeDir[1]
 
     elif name == "normal_dir":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = normalDir[0]
-      field[:,1] = normalDir[1]
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
+      field[0,:,0] = normalDir[0]
+      field[0,:,1] = normalDir[1]
 
-    elif name == "initial_traction":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = initialTraction[0]
-      field[:,1] = initialTraction[1]
+    elif name == "traction_initial":
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
+      field[0,:,0] = initialTraction[0]
+      field[0,:,1] = initialTraction[1]
 
     elif name == "static_coefficient":
-      field = numpy.zeros( (nvertices, 1), dtype=numpy.float64)
-      field[:] = staticCoefficient
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
+      field[0,:,0] = staticCoefficient
 
     elif name == "dynamic_coefficient":
-      field = numpy.zeros( (nvertices, 1), dtype=numpy.float64)
-      field[:] = dynamicCoefficient
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
+      field[0,:,0] = dynamicCoefficient
 
     elif name == "slip_weakening_parameter":
-      field = numpy.zeros( (nvertices, 1), dtype=numpy.float64)
-      field[:] = slipWeakeningParameter
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
+      field[0,:,0] = slipWeakeningParameter
 
     elif name == "cohesion":
-      field = numpy.zeros( (nvertices, 1), dtype=numpy.float64)
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
 
     elif name == "slip":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = slip[0]
-      field[:,1] = slip[1]
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
+      field[0,:,0] = slip[0]
+      field[0,:,1] = slip[1]
 
     elif name == "traction":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
       
     elif name == "cumulative_slip":
-      field = numpy.zeros( (nvertices, 1), dtype=numpy.float64)
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
 
     elif name == "previous_slip":
-      field = numpy.zeros( (nvertices, 1), dtype=numpy.float64)
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
 
     else:
       raise ValueError("Unknown fault field '%s'." % name)

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/TestSlipWeakeningShearSliding.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/TestSlipWeakeningShearSliding.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/TestSlipWeakeningShearSliding.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -23,8 +23,7 @@
 import numpy
 from TestQuad4 import TestQuad4
 from slipweakening_shear_sliding_soln import AnalyticalSoln
-from pylith.utils.VTKDataReader import has_vtk
-from pylith.utils.VTKDataReader import VTKDataReader
+
 from pylith.tests.Fault import check_vertex_fields
 
 # Local version of PyLithApp
@@ -61,17 +60,13 @@
     self.mesh['nvertices'] = 81+9
     self.nverticesO = 81
     self.faultMesh = {'nvertices': 9,
-                      'spaceDim': 3,
+                      'spaceDim': 2,
                       'ncells': 8,
                       'ncorners': 2}
 
     run_pylith()
     self.outputRoot = "slipweakening_shear_sliding"
-    if has_vtk():
-      self.reader = VTKDataReader()
-      self.soln = AnalyticalSoln()
-    else:
-      self.reader = None
+    self.soln = AnalyticalSoln()
     return
 
 
@@ -79,11 +74,11 @@
     """
     Check fault information.
     """
-    if self.reader is None:
+    if not self.checkResults:
       return
 
-    filename = "%s-fault_info.vtk" % self.outputRoot
-    fields = ["strike_dir", "normal_dir", "initial_traction","static_coefficient","dynamic_coefficient","slip_weakening_parameter","cohesion"]
+    filename = "%s-fault_info.h5" % self.outputRoot
+    fields = ["strike_dir", "normal_dir", "traction_initial","static_coefficient","dynamic_coefficient","slip_weakening_parameter","cohesion"]
     check_vertex_fields(self, filename, self.faultMesh, fields)
 
     return
@@ -93,10 +88,10 @@
     """
     Check fault information.
     """
-    if self.reader is None:
+    if not self.checkResults:
       return
 
-    filename = "%s-fault_t0000000.vtk" % self.outputRoot
+    filename = "%s-fault.h5" % self.outputRoot
     fields = ["slip", "traction","cumulative_slip","previous_slip"]
     check_vertex_fields(self, filename, self.faultMesh, fields)
 
@@ -151,52 +146,52 @@
     nvertices = self.faultMesh['nvertices']
 
     if name == "strike_dir":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = strikeDir[0]
-      field[:,1] = strikeDir[1]
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
+      field[0,:,0] = strikeDir[0]
+      field[0,:,1] = strikeDir[1]
 
     elif name == "normal_dir":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = normalDir[0]
-      field[:,1] = normalDir[1]
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
+      field[0,:,0] = normalDir[0]
+      field[0,:,1] = normalDir[1]
 
-    elif name == "initial_traction":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = initialTraction[0]
-      field[:,1] = initialTraction[1]
+    elif name == "traction_initial":
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
+      field[0,:,0] = initialTraction[0]
+      field[0,:,1] = initialTraction[1]
 
     elif name == "static_coefficient":
-      field = numpy.zeros( (nvertices, 1), dtype=numpy.float64)
-      field[:] = staticCoefficient
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
+      field[0,:,0] = staticCoefficient
 
     elif name == "dynamic_coefficient":
-      field = numpy.zeros( (nvertices, 1), dtype=numpy.float64)
-      field[:] = dynamicCoefficient
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
+      field[0,:,0] = dynamicCoefficient
 
     elif name == "slip_weakening_parameter":
-      field = numpy.zeros( (nvertices, 1), dtype=numpy.float64)
-      field[:] = slipWeakeningParameter
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
+      field[0,:,0] = slipWeakeningParameter
 
     elif name == "cohesion":
-      field = numpy.zeros( (nvertices, 1), dtype=numpy.float64)
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
 
     elif name == "slip":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = slip[0]
-      field[:,1] = slip[1]
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
+      field[0,:,0] = slip[0]
+      field[0,:,1] = slip[1]
 
     elif name == "traction":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = 0.6e+6
-      field[:,1] = -1.0e+6
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
+      field[0,:,0] = 0.6e+6
+      field[0,:,1] = -1.0e+6
       
     elif name == "cumulative_slip":
-      field = numpy.zeros( (nvertices, 1), dtype=numpy.float64)
-      field[:] = cumulativeSlip
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
+      field[0,:,0] = cumulativeSlip
 
     elif name == "previous_slip":
-      field = numpy.zeros( (nvertices, 1), dtype=numpy.float64)
-      field[:] = cumulativeSlip
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
+      field[0,:,0] = cumulativeSlip
 
     else:
       raise ValueError("Unknown fault field '%s'." % name)

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/TestSlipWeakeningShearStick.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/TestSlipWeakeningShearStick.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/TestSlipWeakeningShearStick.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -23,8 +23,7 @@
 import numpy
 from TestQuad4 import TestQuad4
 from slipweakening_shear_stick_soln import AnalyticalSoln
-from pylith.utils.VTKDataReader import has_vtk
-from pylith.utils.VTKDataReader import VTKDataReader
+
 from pylith.tests.Fault import check_vertex_fields
 
 # Local version of PyLithApp
@@ -61,17 +60,13 @@
     self.mesh['nvertices'] = 81+9
     self.nverticesO = 81
     self.faultMesh = {'nvertices': 9,
-                      'spaceDim': 3,
+                      'spaceDim': 2,
                       'ncells': 8,
                       'ncorners': 2}
 
     run_pylith()
     self.outputRoot = "slipweakening_shear_stick"
-    if has_vtk():
-      self.reader = VTKDataReader()
-      self.soln = AnalyticalSoln()
-    else:
-      self.reader = None
+    self.soln = AnalyticalSoln()
     return
 
 
@@ -79,11 +74,11 @@
     """
     Check fault information.
     """
-    if self.reader is None:
+    if not self.checkResults:
       return
 
-    filename = "%s-fault_info.vtk" % self.outputRoot
-    fields = ["strike_dir", "normal_dir", "initial_traction","static_coefficient","dynamic_coefficient","slip_weakening_parameter","cohesion"]
+    filename = "%s-fault_info.h5" % self.outputRoot
+    fields = ["strike_dir", "normal_dir", "traction_initial","static_coefficient","dynamic_coefficient","slip_weakening_parameter","cohesion"]
     check_vertex_fields(self, filename, self.faultMesh, fields)
 
     return
@@ -93,10 +88,10 @@
     """
     Check fault information.
     """
-    if self.reader is None:
+    if not self.checkResults:
       return
 
-    filename = "%s-fault_t0000000.vtk" % self.outputRoot
+    filename = "%s-fault.h5" % self.outputRoot
     fields = ["slip", "traction","cumulative_slip","previous_slip"]
     check_vertex_fields(self, filename, self.faultMesh, fields)
 
@@ -141,48 +136,48 @@
     nvertices = self.faultMesh['nvertices']
 
     if name == "strike_dir":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = strikeDir[0]
-      field[:,1] = strikeDir[1]
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
+      field[0,:,0] = strikeDir[0]
+      field[0,:,1] = strikeDir[1]
 
     elif name == "normal_dir":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = normalDir[0]
-      field[:,1] = normalDir[1]
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
+      field[0,:,0] = normalDir[0]
+      field[0,:,1] = normalDir[1]
 
-    elif name == "initial_traction":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = initialTraction[0]
-      field[:,1] = initialTraction[1]
+    elif name == "traction_initial":
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
+      field[0,:,0] = initialTraction[0]
+      field[0,:,1] = initialTraction[1]
 
     elif name == "static_coefficient":
-      field = numpy.zeros( (nvertices, 1), dtype=numpy.float64)
-      field[:] = staticCoefficient
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
+      field[0,:,0] = staticCoefficient
 
     elif name == "dynamic_coefficient":
-      field = numpy.zeros( (nvertices, 1), dtype=numpy.float64)
-      field[:] = dynamicCoefficient
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
+      field[0,:,0] = dynamicCoefficient
 
     elif name == "slip_weakening_parameter":
-      field = numpy.zeros( (nvertices, 1), dtype=numpy.float64)
-      field[:] = slipWeakeningParameter
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
+      field[0,:,0] = slipWeakeningParameter
 
     elif name == "cohesion":
-      field = numpy.zeros( (nvertices, 1), dtype=numpy.float64)
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
 
     elif name == "slip":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
 
     elif name == "traction":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = 1.0e+6
-      field[:,1] = -1.0e+7
+      field = numpy.zeros( (1, nvertices, 2), dtype=numpy.float64)
+      field[0,:,0] = 1.0e+6
+      field[0,:,1] = -1.0e+7
       
     elif name == "cumulative_slip":
-      field = numpy.zeros( (nvertices, 1), dtype=numpy.float64)
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
 
     elif name == "previous_slip":
-      field = numpy.zeros( (nvertices, 1), dtype=numpy.float64)
+      field = numpy.zeros( (1, nvertices, 1), dtype=numpy.float64)
 
     else:
       raise ValueError("Unknown fault field '%s'." % name)

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/axialdisp.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/axialdisp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/axialdisp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [axialdisp]
 
 [axialdisp.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -99,9 +98,11 @@
 # ----------------------------------------------------------------------
 # output
 # ----------------------------------------------------------------------
-[axialdisp.problem.formulation.output.output.writer]
-filename = axialdisp.vtk
+[axialdisp.problem.formulation.output.output]
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = axialdisp.h5
 
 [axialdisp.timedependent.materials.elastic.output]
 cell_filter = pylith.meshio.CellFilterAvgMesh
-writer.filename = axialdisp-elastic.vtk
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = axialdisp-elastic.h5

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/axialdisp_gendb.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/axialdisp_gendb.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/axialdisp_gendb.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -64,10 +64,10 @@
             'data_dim': 2,
             'values': [{'name': "displacement-x",
                         'units': "m",
-                        'data': numpy.ravel(disp[:,0])},
+                        'data': numpy.ravel(disp[0,:,0])},
                        {'name': "displacement-y",
                         'units': "m",
-                        'data': numpy.ravel(disp[:,1])}]}
+                        'data': numpy.ravel(disp[0,:,1])}]}
 
     from spatialdata.spatialdb.SimpleIOAscii import SimpleIOAscii
     io = SimpleIOAscii()

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/axialdisp_soln.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/axialdisp_soln.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/axialdisp_soln.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -77,9 +77,9 @@
     Compute displacement field at locations.
     """
     (npts, dim) = locs.shape
-    disp = numpy.zeros( (npts, 3), dtype=numpy.float64)
-    disp[:,0] = exx*locs[:,0] + exy*locs[:,1]
-    disp[:,1] = eyy*locs[:,1] + exy*locs[:,0]
+    disp = numpy.zeros( (1, npts, 2), dtype=numpy.float64)
+    disp[0,:,0] = exx*locs[:,0] + exy*locs[:,1]
+    disp[0,:,1] = eyy*locs[:,1] + exy*locs[:,0]
     return disp
 
 
@@ -88,10 +88,10 @@
     Compute strain field at locations.
     """
     (npts, dim) = locs.shape
-    strain = numpy.zeros( (npts, 3), dtype=numpy.float64)
-    strain[:,0] = exx
-    strain[:,1] = eyy
-    strain[:,2] = exy
+    strain = numpy.zeros( (1, npts, 3), dtype=numpy.float64)
+    strain[0,:,0] = exx
+    strain[0,:,1] = eyy
+    strain[0,:,2] = exy
     return strain
   
 
@@ -100,10 +100,10 @@
     Compute stress field at locations.
     """
     (npts, dim) = locs.shape
-    stress = numpy.zeros( (npts, 3), dtype=numpy.float64)
-    stress[:,0] = sxx
-    stress[:,1] = syy
-    stress[:,2] = sxy
+    stress = numpy.zeros( (1, npts, 3), dtype=numpy.float64)
+    stress[0,:,0] = sxx
+    stress[0,:,1] = syy
+    stress[0,:,2] = sxy
     return stress
 
 

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/dislocation.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/dislocation.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/dislocation.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [dislocation]
 
 [dislocation.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -120,12 +119,15 @@
 # ----------------------------------------------------------------------
 # output
 # ----------------------------------------------------------------------
-[dislocation.problem.formulation.output.output.writer]
-filename = dislocation.vtk
+[dislocation.problem.formulation.output.output]
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = dislocation.h5
 
 [dislocation.timedependent.materials.elastic.output]
 cell_filter = pylith.meshio.CellFilterAvgMesh
-writer.filename = dislocation-elastic.vtk
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = dislocation-elastic.h5
 
-[dislocation.timedependent.interfaces.fault.output.writer]
-filename = dislocation-fault.vtk
+[dislocation.timedependent.interfaces.fault.output]
+writer = pylith.meshio.DataWriterHDF5SubSubMesh
+writer.filename = dislocation-fault.h5

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/dislocation2.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/dislocation2.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/dislocation2.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 [pylithapp.launcher] # WARNING: THIS IS NOT PORTABLE

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/dislocation_soln.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/dislocation_soln.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/dislocation_soln.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -62,13 +62,11 @@
     """
     (nlocs, dim) = locs.shape
 
-    disp = numpy.zeros( (nlocs, 3), dtype=numpy.float64)
+    disp = numpy.zeros( (1, nlocs, 2), dtype=numpy.float64)
     maskP = locs[:,0] >= 0.0
     maskP[nlocsO:nlocs] = False
     maskN = numpy.bitwise_and(locs[:,0] <= 0.0, ~maskP)
-    disp[:,1] = \
-        maskN*(+1.0) + \
-        maskP*(-1.0)
+    disp[0,:,1] = maskN*(+1.0) + maskP*(-1.0)
     return disp
 
 
@@ -77,10 +75,10 @@
     Compute strain field at locations.
     """
     (nlocs, dim) = locs.shape
-    strain = numpy.zeros( (nlocs, 3), dtype=numpy.float64)
-    strain[:,0] = exx
-    strain[:,1] = eyy
-    strain[:,2] = exy
+    strain = numpy.zeros( (1, nlocs, 3), dtype=numpy.float64)
+    strain[0,:,0] = exx
+    strain[0,:,1] = eyy
+    strain[0,:,2] = exy
     return strain
   
 
@@ -89,10 +87,10 @@
     Compute stress field at locations.
     """
     (nlocs, dim) = locs.shape
-    stress = numpy.zeros( (nlocs, 3), dtype=numpy.float64)
-    stress[:,0] = sxx
-    stress[:,1] = syy
-    stress[:,2] = sxy
+    stress = numpy.zeros( (1, nlocs, 3), dtype=numpy.float64)
+    stress[0,:,0] = sxx
+    stress[0,:,1] = syy
+    stress[0,:,2] = sxy
     return stress
 
 

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/fourcells_twofaults.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/fourcells_twofaults.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/fourcells_twofaults.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 [pylithapp.launcher] # WARNING: THIS IS NOT PORTABLE

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/friction_compression.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/friction_compression.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/friction_compression.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [friction_compression]
 
 [friction_compression.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -103,18 +102,20 @@
 quadrature.cell = pylith.feassemble.FIATLagrange
 quadrature.cell.dimension = 1
 
-db_initial_tractions = spatialdata.spatialdb.UniformDB
-db_initial_tractions.label = Initial fault tractions
-db_initial_tractions.values = [traction-shear,traction-normal]
-db_initial_tractions.data = [0.0*Pa, -1.0*MPa]
-
 friction.label = Static friction
 friction.db_properties = spatialdata.spatialdb.UniformDB
 friction.db_properties.label = Static friction
 friction.db_properties.values = [friction-coefficient,cohesion]
 friction.db_properties.data = [0.6*m,0.0*Pa]
 
+traction_perturbation = pylith.faults.TractPerturbation
 
+[friction_compression.timedependent.interfaces.fault.traction_perturbation]
+db_initial = spatialdata.spatialdb.UniformDB
+db_initial.label = Initial fault tractions
+db_initial.values = [traction-shear,traction-normal]
+db_initial.data = [0.0*Pa, -1.0*MPa]
+
 # ----------------------------------------------------------------------
 # PETSc
 # ----------------------------------------------------------------------
@@ -154,16 +155,16 @@
 # ----------------------------------------------------------------------
 # output
 # ----------------------------------------------------------------------
-# Give basename for VTK domain output of solution over domain.
-[friction_compression.problem.formulation.output.output.writer]
-filename = friction_compression.vtk
+[friction_compression.problem.formulation.output.output]
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = friction_compression.h5
 
-# Give basename for VTK fault output.
 [friction_compression.timedependent.interfaces.fault.output]
-writer.filename = friction_compression-fault.vtk
-vertex_info_fields = [strike_dir,normal_dir,initial_traction,friction_coefficient,cohesion]
+writer = pylith.meshio.DataWriterHDF5SubSubMesh
+writer.filename = friction_compression-fault.h5
+vertex_info_fields = [strike_dir,normal_dir,traction_initial_value,friction_coefficient,cohesion]
 
-# Give basename for VTK output of state variables.
 [friction_compression.timedependent.materials.material.output]
 cell_filter = pylith.meshio.CellFilterAvgMesh
-writer.filename = friction_compression-elastic.vtk
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = friction_compression-elastic.h5

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/friction_compression_soln.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/friction_compression_soln.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/friction_compression_soln.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -62,9 +62,9 @@
     """
     (nlocs, dim) = locs.shape
 
-    disp = numpy.zeros( (nlocs, 3), dtype=numpy.float64)
-    disp[:,0] = exx*(locs[:,0]+max(abs(locs[:,0])))
-    disp[:,1] = eyy*(locs[:,1]+max(abs(locs[:,1])))
+    disp = numpy.zeros( (1, nlocs, 2), dtype=numpy.float64)
+    disp[0,:,0] = exx*(locs[:,0]+max(abs(locs[:,0])))
+    disp[0,:,1] = eyy*(locs[:,1]+max(abs(locs[:,1])))
     return disp
 
 
@@ -73,10 +73,10 @@
     Compute strain field at locations.
     """
     (npts, dim) = locs.shape
-    strain = numpy.zeros( (npts, 3), dtype=numpy.float64)
-    strain[:,0] = exx
-    strain[:,1] = eyy
-    strain[:,2] = exy
+    strain = numpy.zeros( (1, npts, 3), dtype=numpy.float64)
+    strain[0,:,0] = exx
+    strain[0,:,1] = eyy
+    strain[0,:,2] = exy
     return strain
   
 
@@ -85,10 +85,10 @@
     Compute stress field at locations.
     """
     (npts, dim) = locs.shape
-    stress = numpy.zeros( (npts, 3), dtype=numpy.float64)
-    stress[:,0] = sxx
-    stress[:,1] = syy
-    stress[:,2] = sxy
+    stress = numpy.zeros( (1, npts, 3), dtype=numpy.float64)
+    stress[0,:,0] = sxx
+    stress[0,:,1] = syy
+    stress[0,:,2] = sxy
     return stress
 
 

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/friction_opening.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/friction_opening.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/friction_opening.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [friction_opening]
 
 [friction_opening.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -103,17 +102,20 @@
 quadrature.cell = pylith.feassemble.FIATLagrange
 quadrature.cell.dimension = 1
 
-db_initial_tractions = spatialdata.spatialdb.UniformDB
-db_initial_tractions.label = Initial fault tractions
-db_initial_tractions.values = [traction-shear,traction-normal]
-db_initial_tractions.data = [0.0*Pa, -1.0*MPa]
-
 friction.label = Static friction
 friction.db_properties = spatialdata.spatialdb.UniformDB
 friction.db_properties.label = Static friction
 friction.db_properties.values = [friction-coefficient,cohesion]
 friction.db_properties.data = [0.6,0.0*Pa]
 
+traction_perturbation = pylith.faults.TractPerturbation
+
+[friction_opening.timedependent.interfaces.fault.traction_perturbation]
+db_initial = spatialdata.spatialdb.UniformDB
+db_initial.label = Initial fault tractions
+db_initial.values = [traction-shear,traction-normal]
+db_initial.data = [0.0*Pa, -1.0*MPa]
+
 # ----------------------------------------------------------------------
 # PETSc
 # ----------------------------------------------------------------------
@@ -156,16 +158,16 @@
 # ----------------------------------------------------------------------
 # output
 # ----------------------------------------------------------------------
-# Give basename for VTK domain output of solution over domain.
-[friction_opening.problem.formulation.output.output.writer]
-filename = friction_opening.vtk
+[friction_opening.problem.formulation.output.output]
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = friction_opening.h5
 
-# Give basename for VTK fault output.
 [friction_opening.timedependent.interfaces.fault.output]
-writer.filename = friction_opening-fault.vtk
-vertex_info_fields = [strike_dir,normal_dir,initial_traction,friction_coefficient,cohesion]
+writer = pylith.meshio.DataWriterHDF5SubSubMesh
+writer.filename = friction_opening-fault.h5
+vertex_info_fields = [strike_dir,normal_dir,traction_initial_value,friction_coefficient,cohesion]
 
-# Give basename for VTK output of state variables.
 [friction_opening.timedependent.materials.material.output]
 cell_filter = pylith.meshio.CellFilterAvgMesh
-writer.filename = friction_opening-elastic.vtk
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = friction_opening-elastic.h5

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/friction_opening_soln.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/friction_opening_soln.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/friction_opening_soln.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -62,8 +62,8 @@
     """
     (nlocs, dim) = locs.shape
 
-    disp = numpy.zeros( (nlocs, 3), dtype=numpy.float64)
-    disp[0:nlocs/2,0] = 1.0
+    disp = numpy.zeros( (1, nlocs, 2), dtype=numpy.float64)
+    disp[0,0:nlocs/2,0] = 1.0
     return disp
 
 
@@ -72,10 +72,10 @@
     Compute strain field at locations.
     """
     (npts, dim) = locs.shape
-    strain = numpy.zeros( (npts, 3), dtype=numpy.float64)
-    strain[:,0] = exx
-    strain[:,1] = eyy
-    strain[:,2] = exy
+    strain = numpy.zeros( (1, npts, 3), dtype=numpy.float64)
+    strain[0,:,0] = exx
+    strain[0,:,1] = eyy
+    strain[0,:,2] = exy
     return strain
   
 
@@ -84,10 +84,10 @@
     Compute stress field at locations.
     """
     (npts, dim) = locs.shape
-    stress = numpy.zeros( (npts, 3), dtype=numpy.float64)
-    stress[:,0] = sxx
-    stress[:,1] = syy
-    stress[:,2] = sxy
+    stress = numpy.zeros( (1, npts, 3), dtype=numpy.float64)
+    stress[0,:,0] = sxx
+    stress[0,:,1] = syy
+    stress[0,:,2] = sxy
     return stress
 
 

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/friction_shear_sliding.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/friction_shear_sliding.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/friction_shear_sliding.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [friction_shear_sliding]
 
 [friction_shear_sliding.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -123,17 +122,20 @@
 quadrature.cell = pylith.feassemble.FIATLagrange
 quadrature.cell.dimension = 1
 
-db_initial_tractions = spatialdata.spatialdb.UniformDB
-db_initial_tractions.label = Initial fault tractions
-db_initial_tractions.values = [traction-shear,traction-normal]
-db_initial_tractions.data = [0.0*Pa, -1.0*MPa]
-
 friction.label = Static friction
 friction.db_properties = spatialdata.spatialdb.UniformDB
 friction.db_properties.label = Static friction
 friction.db_properties.values = [friction-coefficient,cohesion]
 friction.db_properties.data = [0.6,0.0*Pa]
 
+traction_perturbation = pylith.faults.TractPerturbation
+
+[friction_shear_sliding.timedependent.interfaces.fault.traction_perturbation]
+db_initial = spatialdata.spatialdb.UniformDB
+db_initial.label = Initial fault tractions
+db_initial.values = [traction-shear,traction-normal]
+db_initial.data = [0.0*Pa, -1.0*MPa]
+
 # ----------------------------------------------------------------------
 # PETSc
 # ----------------------------------------------------------------------
@@ -173,16 +175,16 @@
 # ----------------------------------------------------------------------
 # output
 # ----------------------------------------------------------------------
-# Give basename for VTK domain output of solution over domain.
-[friction_shear_sliding.problem.formulation.output.output.writer]
-filename = friction_shear_sliding.vtk
+[friction_shear_sliding.problem.formulation.output.output]
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = friction_shear_sliding.h5
 
-# Give basename for VTK fault output.
 [friction_shear_sliding.timedependent.interfaces.fault.output]
-writer.filename = friction_shear_sliding-fault.vtk
-vertex_info_fields = [strike_dir,normal_dir,initial_traction,friction_coefficient,cohesion]
+writer = pylith.meshio.DataWriterHDF5SubSubMesh
+writer.filename = friction_shear_sliding-fault.h5
+vertex_info_fields = [strike_dir,normal_dir,traction_initial_value,friction_coefficient,cohesion]
 
-# Give basename for VTK output of state variables.
 [friction_shear_sliding.timedependent.materials.material.output]
 cell_filter = pylith.meshio.CellFilterAvgMesh
-writer.filename = friction_shear_sliding-elastic.vtk
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = friction_shear_sliding-elastic.h5

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/friction_shear_sliding_soln.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/friction_shear_sliding_soln.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/friction_shear_sliding_soln.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -68,9 +68,9 @@
     """
     (nlocs, dim) = locs.shape
 
-    disp = numpy.zeros( (nlocs, 3), dtype=numpy.float64)
-    disp[0:nlocs/2,1] = 2 * exy * (locs[0:nlocs/2,0] + len/2) + D
-    disp[nlocs/2:nlocs,1] = 2 * exy * (locs[nlocs/2:nlocs,0] + len/2)
+    disp = numpy.zeros( (1, nlocs, 2), dtype=numpy.float64)
+    disp[0,0:nlocs/2,1] = 2 * exy * (locs[0:nlocs/2,0] + len/2) + D
+    disp[0,nlocs/2:nlocs,1] = 2 * exy * (locs[nlocs/2:nlocs,0] + len/2)
     return disp
 
 
@@ -79,10 +79,10 @@
     Compute strain field at locations.
     """
     (npts, dim) = locs.shape
-    strain = numpy.zeros( (npts, 3), dtype=numpy.float64)
-    strain[:,0] = exx
-    strain[:,1] = eyy
-    strain[:,2] = exy
+    strain = numpy.zeros( (1, npts, 3), dtype=numpy.float64)
+    strain[0,:,0] = exx
+    strain[0,:,1] = eyy
+    strain[0,:,2] = exy
     return strain
   
 
@@ -91,10 +91,10 @@
     Compute stress field at locations.
     """
     (npts, dim) = locs.shape
-    stress = numpy.zeros( (npts, 3), dtype=numpy.float64)
-    stress[:,0] = sxx
-    stress[:,1] = syy
-    stress[:,2] = sxy
+    stress = numpy.zeros( (1, npts, 3), dtype=numpy.float64)
+    stress[0,:,0] = sxx
+    stress[0,:,1] = syy
+    stress[0,:,2] = sxy
     return stress
 
 

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/friction_shear_stick.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/friction_shear_stick.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/friction_shear_stick.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [friction_shear_stick]
 
 [friction_shear_stick.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -130,17 +129,20 @@
 quadrature.cell = pylith.feassemble.FIATLagrange
 quadrature.cell.dimension = 1
 
-db_initial_tractions = spatialdata.spatialdb.UniformDB
-db_initial_tractions.label = Initial fault tractions
-db_initial_tractions.values = [traction-shear,traction-normal]
-db_initial_tractions.data = [0.0*Pa, -10.0*MPa]
-
 friction.label = Static friction
 friction.db_properties = spatialdata.spatialdb.UniformDB
 friction.db_properties.label = Static friction
 friction.db_properties.values = [friction-coefficient,cohesion]
 friction.db_properties.data = [0.6,0.0*Pa]
 
+traction_perturbation = pylith.faults.TractPerturbation
+
+[friction_shear_stick.timedependent.interfaces.fault.traction_perturbation]
+db_initial = spatialdata.spatialdb.UniformDB
+db_initial.label = Initial fault tractions
+db_initial.values = [traction-shear,traction-normal]
+db_initial.data = [0.0*Pa, -10.0*MPa]
+
 # ----------------------------------------------------------------------
 # PETSc
 # ----------------------------------------------------------------------
@@ -179,16 +181,16 @@
 # ----------------------------------------------------------------------
 # output
 # ----------------------------------------------------------------------
-# Give basename for VTK domain output of solution over domain.
-[friction_shear_stick.problem.formulation.output.output.writer]
-filename = friction_shear_stick.vtk
+[friction_shear_stick.problem.formulation.output.output]
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = friction_shear_stick.h5
 
-# Give basename for VTK fault output.
 [friction_shear_stick.timedependent.interfaces.fault.output]
-writer.filename = friction_shear_stick-fault.vtk
-vertex_info_fields = [strike_dir,normal_dir,initial_traction,friction_coefficient,cohesion]
+writer = pylith.meshio.DataWriterHDF5SubSubMesh
+writer.filename = friction_shear_stick-fault.h5
+vertex_info_fields = [strike_dir,normal_dir,traction_initial_value,friction_coefficient,cohesion]
 
-# Give basename for VTK output of state variables.
 [friction_shear_stick.timedependent.materials.material.output]
 cell_filter = pylith.meshio.CellFilterAvgMesh
-writer.filename = friction_shear_stick-elastic.vtk
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = friction_shear_stick-elastic.h5

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/friction_shear_stick_soln.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/friction_shear_stick_soln.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/friction_shear_stick_soln.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -62,8 +62,8 @@
     """
     (nlocs, dim) = locs.shape
 
-    disp = numpy.zeros( (nlocs, 3), dtype=numpy.float64)
-    disp[:,1] = 2*exy*(locs[:,0]+max(abs(locs[:,0])))
+    disp = numpy.zeros( (1, nlocs, 2), dtype=numpy.float64)
+    disp[0,:,1] = 2*exy*(locs[:,0]+max(abs(locs[:,0])))
     return disp
 
 
@@ -72,10 +72,10 @@
     Compute strain field at locations.
     """
     (npts, dim) = locs.shape
-    strain = numpy.zeros( (npts, 3), dtype=numpy.float64)
-    strain[:,0] = exx
-    strain[:,1] = eyy
-    strain[:,2] = exy
+    strain = numpy.zeros( (1, npts, 3), dtype=numpy.float64)
+    strain[0,:,0] = exx
+    strain[0,:,1] = eyy
+    strain[0,:,2] = exy
     return strain
   
 
@@ -84,10 +84,10 @@
     Compute stress field at locations.
     """
     (npts, dim) = locs.shape
-    stress = numpy.zeros( (npts, 3), dtype=numpy.float64)
-    stress[:,0] = sxx
-    stress[:,1] = syy
-    stress[:,2] = sxy
+    stress = numpy.zeros( (1, npts, 3), dtype=numpy.float64)
+    stress[0,:,0] = sxx
+    stress[0,:,1] = syy
+    stress[0,:,2] = sxy
     return stress
 
 

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/lgdeformrigidbody.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/lgdeformrigidbody.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/lgdeformrigidbody.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [lgdeformrigidbody]
 
 [lgdeformrigidbody.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -108,11 +107,11 @@
 # ----------------------------------------------------------------------
 # output
 # ----------------------------------------------------------------------
-[lgdeformrigidbody.problem.formulation.output.output.writer]
-filename = lgdeformrigidbody.vtk
-float_precision = 8
+[lgdeformrigidbody.problem.formulation.output.output]
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = lgdeformrigidbody.h5
 
 [lgdeformrigidbody.timedependent.materials.elastic.output]
 cell_filter = pylith.meshio.CellFilterAvgMesh
-writer.filename = lgdeformrigidbody-elastic.vtk
-writer.float_precision = 8
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = lgdeformrigidbody-elastic.h5

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/lgdeformtraction.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/lgdeformtraction.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/lgdeformtraction.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [lgdeformtraction]
 
 [lgdeformtraction.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -118,11 +117,11 @@
 # ----------------------------------------------------------------------
 # output
 # ----------------------------------------------------------------------
-[lgdeformtraction.problem.formulation.output.output.writer]
-filename = lgdeformtraction.vtk
-float_precision = 8
+[lgdeformtraction.problem.formulation.output.output]
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = lgdeformtraction.h5
 
 [lgdeformtraction.timedependent.materials.elastic.output]
 cell_filter = pylith.meshio.CellFilterAvgMesh
-writer.filename = lgdeformtraction-elastic.vtk
-writer.float_precision = 8
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = lgdeformtraction-elastic.h5

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/lgdeformtraction_soln.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/lgdeformtraction_soln.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/lgdeformtraction_soln.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -68,9 +68,9 @@
     Compute displacement field at locations.
     """
     (npts, dim) = locs.shape
-    disp = numpy.zeros( (npts, 3), dtype=numpy.float64)
-    disp[:,0] = ux*(4000.0 + locs[:,0]) / 8000.0
-    disp[:,1] = uy*(4000.0 + locs[:,1]) / 8000.0
+    disp = numpy.zeros( (1, npts, 2), dtype=numpy.float64)
+    disp[0,:,0] = ux*(4000.0 + locs[:,0]) / 8000.0
+    disp[0,:,1] = uy*(4000.0 + locs[:,1]) / 8000.0
     return disp
 
 
@@ -79,10 +79,10 @@
     Compute strain field at locations.
     """
     (npts, dim) = locs.shape
-    strain = numpy.zeros( (npts, 3), dtype=numpy.float64)
-    strain[:,0] = exx
-    strain[:,1] = eyy
-    strain[:,2] = exy
+    strain = numpy.zeros( (1, npts, 3), dtype=numpy.float64)
+    strain[0,:,0] = exx
+    strain[0,:,1] = eyy
+    strain[0,:,2] = exy
     return strain
   
 
@@ -91,10 +91,10 @@
     Compute stress field at locations.
     """
     (npts, dim) = locs.shape
-    stress = numpy.zeros( (npts, 3), dtype=numpy.float64)
-    stress[:,0] = sxx
-    stress[:,1] = syy
-    stress[:,2] = sxy
+    stress = numpy.zeros( (1, npts, 3), dtype=numpy.float64)
+    stress[0,:,0] = sxx
+    stress[0,:,1] = syy
+    stress[0,:,2] = sxy
     return stress
 
 

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/rigidbody_gendb.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/rigidbody_gendb.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/rigidbody_gendb.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -64,10 +64,10 @@
             'data_dim': 2,
             'values': [{'name': "displacement-x",
                         'units': "m",
-                        'data': numpy.ravel(disp[:,0])},
+                        'data': numpy.ravel(disp[0,:,0])},
                        {'name': "displacement-y",
                         'units': "m",
-                        'data': numpy.ravel(disp[:,1])}]}
+                        'data': numpy.ravel(disp[0,:,1])}]}
 
     from spatialdata.spatialdb.SimpleIOAscii import SimpleIOAscii
     io = SimpleIOAscii()

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/rigidbody_soln.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/rigidbody_soln.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/rigidbody_soln.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -66,10 +66,10 @@
     theta = -25.0/180.0*pi
 
     (npts, dim) = locs.shape
-    disp = numpy.zeros( (npts, 3), dtype=numpy.float64)
-    disp[:,0] = -locs[:,0] + \
+    disp = numpy.zeros( (1, npts, 2), dtype=numpy.float64)
+    disp[0,:,0] = -locs[:,0] + \
         u0 + numpy.cos(theta)*locs[:,0] + numpy.sin(theta)*locs[:,1]
-    disp[:,1] = -locs[:,1] + \
+    disp[0,:,1] = -locs[:,1] + \
         v0 - numpy.sin(theta)*locs[:,0] + numpy.cos(theta)*locs[:,1]
     return disp
 
@@ -79,10 +79,10 @@
     Compute strain field at locations.
     """
     (npts, dim) = locs.shape
-    strain = numpy.zeros( (npts, 3), dtype=numpy.float64)
-    strain[:,0] = exx
-    strain[:,1] = eyy
-    strain[:,2] = exy
+    strain = numpy.zeros( (1, npts, 3), dtype=numpy.float64)
+    strain[0,:,0] = exx
+    strain[0,:,1] = eyy
+    strain[0,:,2] = exy
     return strain
   
 
@@ -91,10 +91,10 @@
     Compute stress field at locations.
     """
     (npts, dim) = locs.shape
-    stress = numpy.zeros( (npts, 3), dtype=numpy.float64)
-    stress[:,0] = sxx
-    stress[:,1] = syy
-    stress[:,2] = sxy
+    stress = numpy.zeros( (1, npts, 3), dtype=numpy.float64)
+    stress[0,:,0] = sxx
+    stress[0,:,1] = syy
+    stress[0,:,2] = sxy
     return stress
 
 

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/sheardisp.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/sheardisp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/sheardisp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [sheardisp]
 
 [sheardisp.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -108,9 +107,11 @@
 # ----------------------------------------------------------------------
 # output
 # ----------------------------------------------------------------------
-[sheardisp.problem.formulation.output.output.writer]
-filename = sheardisp.vtk
+[sheardisp.problem.formulation.output.output]
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = sheardisp.h5
 
 [sheardisp.timedependent.materials.elastic.output]
 cell_filter = pylith.meshio.CellFilterAvgMesh
-writer.filename = sheardisp-elastic.vtk
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = sheardisp-elastic.h5

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/sheardisp_gendb.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/sheardisp_gendb.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/sheardisp_gendb.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -64,10 +64,10 @@
             'data_dim': 2,
             'values': [{'name': "displacement-x",
                         'units': "m",
-                        'data': numpy.ravel(disp[:,0])},
+                        'data': numpy.ravel(disp[0,:,0])},
                        {'name': "displacement-y",
                         'units': "m",
-                        'data': numpy.ravel(disp[:,1])}]}
+                        'data': numpy.ravel(disp[0,:,1])}]}
 
     from spatialdata.spatialdb.SimpleIOAscii import SimpleIOAscii
     io = SimpleIOAscii()

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/sheardisp_soln.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/sheardisp_soln.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/sheardisp_soln.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -61,9 +61,9 @@
     Compute displacement field at locations.
     """
     (npts, dim) = locs.shape
-    disp = numpy.zeros( (npts, 3), dtype=numpy.float64)
-    disp[:,0] = exx*locs[:,0] + exy*locs[:,1]
-    disp[:,1] = eyy*locs[:,1] + exy*locs[:,0]
+    disp = numpy.zeros( (1, npts, 2), dtype=numpy.float64)
+    disp[0,:,0] = exx*locs[:,0] + exy*locs[:,1]
+    disp[0,:,1] = eyy*locs[:,1] + exy*locs[:,0]
     return disp
 
 
@@ -72,10 +72,10 @@
     Compute strain field at locations.
     """
     (npts, dim) = locs.shape
-    strain = numpy.zeros( (npts, 3), dtype=numpy.float64)
-    strain[:,0] = exx
-    strain[:,1] = eyy
-    strain[:,2] = exy
+    strain = numpy.zeros( (1, npts, 3), dtype=numpy.float64)
+    strain[0,:,0] = exx
+    strain[0,:,1] = eyy
+    strain[0,:,2] = exy
     return strain
   
 
@@ -84,10 +84,10 @@
     Compute stress field at locations.
     """
     (npts, dim) = locs.shape
-    stress = numpy.zeros( (npts, 3), dtype=numpy.float64)
-    stress[:,0] = sxx
-    stress[:,1] = syy
-    stress[:,2] = sxy
+    stress = numpy.zeros( (1, npts, 3), dtype=numpy.float64)
+    stress[0,:,0] = sxx
+    stress[0,:,1] = syy
+    stress[0,:,2] = sxy
     return stress
 
 

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/slipweakening_compression.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/slipweakening_compression.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/slipweakening_compression.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [slipweakening_compression]
 
 [slipweakening_compression.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -101,11 +100,6 @@
 quadrature.cell = pylith.feassemble.FIATLagrange
 quadrature.cell.dimension = 1
 
-db_initial_tractions = spatialdata.spatialdb.UniformDB
-db_initial_tractions.label = Initial fault tractions
-db_initial_tractions.values = [traction-shear,traction-normal]
-db_initial_tractions.data = [0.0*Pa, -1.0*MPa]
-
 friction = pylith.friction.SlipWeakening
 friction.label = Slip-weakening friction
 
@@ -114,6 +108,14 @@
 friction.db_properties.values = [static-coefficient,dynamic-coefficient,slip-weakening-parameter,cohesion]
 friction.db_properties.data = [0.6,0.59,0.2*m,0.0*Pa]
 
+traction_perturbation = pylith.faults.TractPerturbation
+
+[slipweakening_compression.timedependent.interfaces.fault.traction_perturbation]
+db_initial = spatialdata.spatialdb.UniformDB
+db_initial.label = Initial fault tractions
+db_initial.values = [traction-shear,traction-normal]
+db_initial.data = [0.0*Pa, -1.0*MPa]
+
 # ----------------------------------------------------------------------
 # PETSc
 # ----------------------------------------------------------------------
@@ -153,18 +155,18 @@
 # ----------------------------------------------------------------------
 # output
 # ----------------------------------------------------------------------
-# Give basename for VTK domain output of solution over domain.
-[slipweakening_compression.problem.formulation.output.output.writer]
-filename = slipweakening_compression.vtk
+[slipweakening_compression.problem.formulation.output.output]
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = slipweakening_compression.h5
 
-# Give basename for VTK fault output.
 [slipweakening_compression.timedependent.interfaces.fault.output]
-writer.filename = slipweakening_compression-fault.vtk
-vertex_info_fields = [strike_dir,normal_dir,initial_traction,static_coefficient,dynamic_coefficient,slip_weakening_parameter,cohesion]
+writer = pylith.meshio.DataWriterHDF5SubSubMesh
+writer.filename = slipweakening_compression-fault.h5
+vertex_info_fields = [strike_dir,normal_dir,traction_initial_value,static_coefficient,dynamic_coefficient,slip_weakening_parameter,cohesion]
 vertex_data_fields = [slip,traction,cumulative_slip,previous_slip]
 
-# Give basename for VTK output of state variables.
 [slipweakening_compression.timedependent.materials.material.output]
 cell_filter = pylith.meshio.CellFilterAvgMesh
-writer.filename = slipweakening_compression-elastic.vtk
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = slipweakening_compression-elastic.h5
 

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/slipweakening_compression_soln.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/slipweakening_compression_soln.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/slipweakening_compression_soln.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -62,9 +62,9 @@
     """
     (nlocs, dim) = locs.shape
 
-    disp = numpy.zeros( (nlocs, 3), dtype=numpy.float64)
-    disp[:,0] = exx*(locs[:,0]+max(abs(locs[:,0])))
-    disp[:,1] = eyy*(locs[:,1]+max(abs(locs[:,1])))
+    disp = numpy.zeros( (1, nlocs, 2), dtype=numpy.float64)
+    disp[0,:,0] = exx*(locs[:,0]+max(abs(locs[:,0])))
+    disp[0,:,1] = eyy*(locs[:,1]+max(abs(locs[:,1])))
     return disp
 
 
@@ -73,10 +73,10 @@
     Compute strain field at locations.
     """
     (npts, dim) = locs.shape
-    strain = numpy.zeros( (npts, 3), dtype=numpy.float64)
-    strain[:,0] = exx
-    strain[:,1] = eyy
-    strain[:,2] = exy
+    strain = numpy.zeros( (1, npts, 3), dtype=numpy.float64)
+    strain[0,:,0] = exx
+    strain[0,:,1] = eyy
+    strain[0,:,2] = exy
     return strain
   
 
@@ -85,10 +85,10 @@
     Compute stress field at locations.
     """
     (npts, dim) = locs.shape
-    stress = numpy.zeros( (npts, 3), dtype=numpy.float64)
-    stress[:,0] = sxx
-    stress[:,1] = syy
-    stress[:,2] = sxy
+    stress = numpy.zeros( (1, npts, 3), dtype=numpy.float64)
+    stress[0,:,0] = sxx
+    stress[0,:,1] = syy
+    stress[0,:,2] = sxy
     return stress
 
 

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/slipweakening_opening.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/slipweakening_opening.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/slipweakening_opening.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [slipweakening_opening]
 
 [slipweakening_opening.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -100,11 +99,6 @@
 quadrature.cell = pylith.feassemble.FIATLagrange
 quadrature.cell.dimension = 1
 
-db_initial_tractions = spatialdata.spatialdb.UniformDB
-db_initial_tractions.label = "Initial fault tractions"
-db_initial_tractions.values = [traction-shear,traction-normal]
-db_initial_tractions.data = [0.0*Pa, -1.0*MPa]
-
 friction = pylith.friction.SlipWeakening
 friction.label = Slip-weakening friction
 
@@ -113,6 +107,14 @@
 friction.db_properties.values = [static-coefficient,dynamic-coefficient,slip-weakening-parameter,cohesion]
 friction.db_properties.data = [0.6,0.59,0.2*m,0.0*Pa]
 
+traction_perturbation = pylith.faults.TractPerturbation
+
+[slipweakening_opening.timedependent.interfaces.fault.traction_perturbation]
+db_initial = spatialdata.spatialdb.UniformDB
+db_initial.label = Initial fault tractions
+db_initial.values = [traction-shear,traction-normal]
+db_initial.data = [0.0*Pa, -1.0*MPa]
+
 # ----------------------------------------------------------------------
 # PETSc
 # ----------------------------------------------------------------------
@@ -145,17 +147,17 @@
 # ----------------------------------------------------------------------
 # output
 # ----------------------------------------------------------------------
-# Give basename for VTK domain output of solution over domain.
-[slipweakening_opening.problem.formulation.output.output.writer]
-filename = slipweakening_opening.vtk
+[slipweakening_opening.problem.formulation.output.output]
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = slipweakening_opening.h5
 
-# Give basename for VTK fault output.
 [slipweakening_opening.timedependent.interfaces.fault.output]
-writer.filename = slipweakening_opening-fault.vtk
-vertex_info_fields = [strike_dir,normal_dir,initial_traction,static_coefficient,dynamic_coefficient,slip_weakening_parameter,cohesion]
+writer = pylith.meshio.DataWriterHDF5SubSubMesh
+writer.filename = slipweakening_opening-fault.h5
+vertex_info_fields = [strike_dir,normal_dir,traction_initial_value,static_coefficient,dynamic_coefficient,slip_weakening_parameter,cohesion]
 vertex_data_fields = [slip,traction,cumulative_slip,previous_slip]
 
-# Give basename for VTK output of state variables.
 [slipweakening_opening.timedependent.materials.material.output]
 cell_filter = pylith.meshio.CellFilterAvgMesh
-writer.filename = slipweakening_opening-elastic.vtk
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = slipweakening_opening-elastic.h5

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/slipweakening_opening_soln.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/slipweakening_opening_soln.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/slipweakening_opening_soln.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -62,8 +62,8 @@
     """
     (nlocs, dim) = locs.shape
 
-    disp = numpy.zeros( (nlocs, 3), dtype=numpy.float64)
-    disp[0:nlocs/2,0] = 1.0
+    disp = numpy.zeros( (1, nlocs, 2), dtype=numpy.float64)
+    disp[0,0:nlocs/2,0] = 1.0
     return disp
 
 
@@ -72,10 +72,10 @@
     Compute strain field at locations.
     """
     (npts, dim) = locs.shape
-    strain = numpy.zeros( (npts, 3), dtype=numpy.float64)
-    strain[:,0] = exx
-    strain[:,1] = eyy
-    strain[:,2] = exy
+    strain = numpy.zeros( (1, npts, 3), dtype=numpy.float64)
+    strain[0,:,0] = exx
+    strain[0,:,1] = eyy
+    strain[0,:,2] = exy
     return strain
   
 
@@ -84,10 +84,10 @@
     Compute stress field at locations.
     """
     (npts, dim) = locs.shape
-    stress = numpy.zeros( (npts, 3), dtype=numpy.float64)
-    stress[:,0] = sxx
-    stress[:,1] = syy
-    stress[:,2] = sxy
+    stress = numpy.zeros( (1, npts, 3), dtype=numpy.float64)
+    stress[0,:,0] = sxx
+    stress[0,:,1] = syy
+    stress[0,:,2] = sxy
     return stress
 
 

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/slipweakening_shear_sliding.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/slipweakening_shear_sliding.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/slipweakening_shear_sliding.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [slipweakening_shear_sliding]
 
 [slipweakening_shear_sliding.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -125,11 +124,6 @@
 quadrature.cell = pylith.feassemble.FIATLagrange
 quadrature.cell.dimension = 1
 
-db_initial_tractions = spatialdata.spatialdb.UniformDB
-db_initial_tractions.label = "Initial fault tractions"
-db_initial_tractions.values = [traction-shear,traction-normal]
-db_initial_tractions.data = [0.0*Pa, -1.0*MPa]
-
 friction = pylith.friction.SlipWeakening
 friction.label = Slip-weakening friction
 
@@ -138,6 +132,14 @@
 friction.db_properties.values = [static-coefficient,dynamic-coefficient,slip-weakening-parameter,cohesion]
 friction.db_properties.data = [0.61,0.6,0.2*m,0.0*Pa]
 
+traction_perturbation = pylith.faults.TractPerturbation
+
+[slipweakening_shear_sliding.timedependent.interfaces.fault.traction_perturbation]
+db_initial = spatialdata.spatialdb.UniformDB
+db_initial.label = "Initial fault tractions"
+db_initial.values = [traction-shear,traction-normal]
+db_initial.data = [0.0*Pa, -1.0*MPa]
+
 # ----------------------------------------------------------------------
 # PETSc
 # ----------------------------------------------------------------------
@@ -166,17 +168,17 @@
 # ----------------------------------------------------------------------
 # output
 # ----------------------------------------------------------------------
-# Give basename for VTK domain output of solution over domain.
-[slipweakening_shear_sliding.problem.formulation.output.output.writer]
-filename = slipweakening_shear_sliding.vtk
+[slipweakening_shear_sliding.problem.formulation.output.output]
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = slipweakening_shear_sliding.h5
 
-# Give basename for VTK fault output.
 [slipweakening_shear_sliding.timedependent.interfaces.fault.output]
-writer.filename = slipweakening_shear_sliding-fault.vtk
-vertex_info_fields = [strike_dir,normal_dir,initial_traction,static_coefficient,dynamic_coefficient,slip_weakening_parameter,cohesion]
+writer = pylith.meshio.DataWriterHDF5SubSubMesh
+writer.filename = slipweakening_shear_sliding-fault.h5
+vertex_info_fields = [strike_dir,normal_dir,traction_initial_value,static_coefficient,dynamic_coefficient,slip_weakening_parameter,cohesion]
 vertex_data_fields = [slip,traction,cumulative_slip,previous_slip]
 
-# Give basename for VTK output of state variables.
 [slipweakening_shear_sliding.timedependent.materials.material.output]
 cell_filter = pylith.meshio.CellFilterAvgMesh
-writer.filename = slipweakening_shear_sliding-elastic.vtk
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = slipweakening_shear_sliding-elastic.h5

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/slipweakening_shear_sliding_soln.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/slipweakening_shear_sliding_soln.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/slipweakening_shear_sliding_soln.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -68,9 +68,9 @@
     """
     (nlocs, dim) = locs.shape
 
-    disp = numpy.zeros( (nlocs, 3), dtype=numpy.float64)
-    disp[0:nlocs/2,1] = 2 * exy * (locs[0:nlocs/2,0] + len/2) + D
-    disp[nlocs/2:nlocs,1] = 2 * exy * (locs[nlocs/2:nlocs,0] + len/2)
+    disp = numpy.zeros( (1, nlocs, 2), dtype=numpy.float64)
+    disp[0,0:nlocs/2,1] = 2 * exy * (locs[0:nlocs/2,0] + len/2) + D
+    disp[0,nlocs/2:nlocs,1] = 2 * exy * (locs[nlocs/2:nlocs,0] + len/2)
     return disp
 
 
@@ -79,10 +79,10 @@
     Compute strain field at locations.
     """
     (npts, dim) = locs.shape
-    strain = numpy.zeros( (npts, 3), dtype=numpy.float64)
-    strain[:,0] = exx
-    strain[:,1] = eyy
-    strain[:,2] = exy
+    strain = numpy.zeros( (1, npts, 3), dtype=numpy.float64)
+    strain[0,:,0] = exx
+    strain[0,:,1] = eyy
+    strain[0,:,2] = exy
     return strain
   
 
@@ -91,10 +91,10 @@
     Compute stress field at locations.
     """
     (npts, dim) = locs.shape
-    stress = numpy.zeros( (npts, 3), dtype=numpy.float64)
-    stress[:,0] = sxx
-    stress[:,1] = syy
-    stress[:,2] = sxy
+    stress = numpy.zeros( (1, npts, 3), dtype=numpy.float64)
+    stress[0,:,0] = sxx
+    stress[0,:,1] = syy
+    stress[0,:,2] = sxy
     return stress
 
 

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/slipweakening_shear_stick.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/slipweakening_shear_stick.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/slipweakening_shear_stick.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [slipweakening_shear_stick]
 
 [slipweakening_shear_stick.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -129,11 +128,6 @@
 quadrature.cell = pylith.feassemble.FIATLagrange
 quadrature.cell.dimension = 1
 
-db_initial_tractions = spatialdata.spatialdb.UniformDB
-db_initial_tractions.label = "Initial fault tractions"
-db_initial_tractions.values = [traction-shear,traction-normal]
-db_initial_tractions.data = [0.0*Pa, -10.0*MPa]
-
 friction = pylith.friction.SlipWeakening
 friction.label = Slip weakening friction
 
@@ -142,6 +136,14 @@
 friction.db_properties.values = [static-coefficient,dynamic-coefficient,slip-weakening-parameter,cohesion]
 friction.db_properties.data = [0.6,0.59,0.2*m,0.0*Pa]
 
+traction_perturbation = pylith.faults.TractPerturbation
+
+[slipweakening_shear_stick.timedependent.interfaces.fault.traction_perturbation]
+db_initial = spatialdata.spatialdb.UniformDB
+db_initial.label = Initial fault tractions
+db_initial.values = [traction-shear,traction-normal]
+db_initial.data = [0.0*Pa, -10.0*MPa]
+
 # ----------------------------------------------------------------------
 # PETSc
 # ----------------------------------------------------------------------
@@ -181,17 +183,17 @@
 # ----------------------------------------------------------------------
 # output
 # ----------------------------------------------------------------------
-# Give basename for VTK domain output of solution over domain.
-[slipweakening_shear_stick.problem.formulation.output.output.writer]
-filename = slipweakening_shear_stick.vtk
+[slipweakening_shear_stick.problem.formulation.output.output]
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = slipweakening_shear_stick.h5
 
-# Give basename for VTK fault output.
 [slipweakening_shear_stick.timedependent.interfaces.fault.output]
-writer.filename = slipweakening_shear_stick-fault.vtk
-vertex_info_fields = [strike_dir,normal_dir,initial_traction,static_coefficient,dynamic_coefficient,slip_weakening_parameter,cohesion]
+writer = pylith.meshio.DataWriterHDF5SubSubMesh
+writer.filename = slipweakening_shear_stick-fault.h5
+vertex_info_fields = [strike_dir,normal_dir,traction_initial_value,static_coefficient,dynamic_coefficient,slip_weakening_parameter,cohesion]
 vertex_data_fields = [slip,traction,cumulative_slip,previous_slip]
 
-# Give basename for VTK output of state variables.
 [slipweakening_shear_stick.timedependent.materials.material.output]
 cell_filter = pylith.meshio.CellFilterAvgMesh
-writer.filename = slipweakening_shear_stick-elastic.vtk
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = slipweakening_shear_stick-elastic.h5

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/slipweakening_shear_stick_soln.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/slipweakening_shear_stick_soln.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/slipweakening_shear_stick_soln.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -62,8 +62,8 @@
     """
     (nlocs, dim) = locs.shape
 
-    disp = numpy.zeros( (nlocs, 3), dtype=numpy.float64)
-    disp[:,1] = 2*exy*(locs[:,0]+max(abs(locs[:,0])))
+    disp = numpy.zeros( (1, nlocs, 2), dtype=numpy.float64)
+    disp[0,:,1] = 2*exy*(locs[:,0]+max(abs(locs[:,0])))
     return disp
 
 
@@ -72,10 +72,10 @@
     Compute strain field at locations.
     """
     (npts, dim) = locs.shape
-    strain = numpy.zeros( (npts, 3), dtype=numpy.float64)
-    strain[:,0] = exx
-    strain[:,1] = eyy
-    strain[:,2] = exy
+    strain = numpy.zeros( (1, npts, 3), dtype=numpy.float64)
+    strain[0,:,0] = exx
+    strain[0,:,1] = eyy
+    strain[0,:,2] = exy
     return strain
   
 
@@ -84,10 +84,10 @@
     Compute stress field at locations.
     """
     (npts, dim) = locs.shape
-    stress = numpy.zeros( (npts, 3), dtype=numpy.float64)
-    stress[:,0] = sxx
-    stress[:,1] = syy
-    stress[:,2] = sxy
+    stress = numpy.zeros( (1, npts, 3), dtype=numpy.float64)
+    stress[0,:,0] = sxx
+    stress[0,:,1] = syy
+    stress[0,:,2] = sxy
     return stress
 
 

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad4/testpylith.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad4/testpylith.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad4/testpylith.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -35,6 +35,7 @@
   from TestDislocation import TestDislocation
   suite.addTest(unittest.makeSuite(TestDislocation))
 
+  # Not complete
   ##from TestDislocation2 import TestDislocation2
   ##suite.addTest(unittest.makeSuite(TestDislocation2))
 

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad9/axialdisp.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad9/axialdisp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad9/axialdisp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 [pylithapp.launcher] # WARNING: THIS IS NOT PORTABLE

Modified: short/3D/PyLith/trunk/tests_auto/2d/quad9/dislocation.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/quad9/dislocation.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/quad9/dislocation.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 [pylithapp.launcher] # WARNING: THIS IS NOT PORTABLE

Modified: short/3D/PyLith/trunk/tests_auto/2d/tri3/TestAxialDisp.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/tri3/TestAxialDisp.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/tri3/TestAxialDisp.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -23,8 +23,6 @@
 import numpy
 from TestTri3 import TestTri3
 from axialdisp_soln import AnalyticalSoln
-from pylith.utils.VTKDataReader import has_vtk
-from pylith.utils.VTKDataReader import VTKDataReader
 
 # Local version of PyLithApp
 from pylith.apps.PyLithApp import PyLithApp
@@ -64,11 +62,8 @@
     TestTri3.setUp(self)
     run_pylith()
     self.outputRoot = "axialdisp"
-    if has_vtk():
-      self.reader = VTKDataReader()
-      self.soln = AnalyticalSoln()
-    else:
-      self.reader = None
+
+    self.soln = AnalyticalSoln()
     return
 
 

Modified: short/3D/PyLith/trunk/tests_auto/2d/tri3/TestShearDisp.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/tri3/TestShearDisp.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/tri3/TestShearDisp.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -22,9 +22,8 @@
 
 import numpy
 from TestTri3 import TestTri3
+
 from sheardisp_soln import AnalyticalSoln
-from pylith.utils.VTKDataReader import has_vtk
-from pylith.utils.VTKDataReader import VTKDataReader
 
 # Local version of PyLithApp
 from pylith.apps.PyLithApp import PyLithApp
@@ -64,11 +63,7 @@
     TestTri3.setUp(self)
     run_pylith()
     self.outputRoot = "sheardisp"
-    if has_vtk():
-      self.reader = VTKDataReader()
-      self.soln = AnalyticalSoln()
-    else:
-      self.reader = None
+    self.soln = AnalyticalSoln()
     return
 
 

Modified: short/3D/PyLith/trunk/tests_auto/2d/tri3/TestTri3.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/tri3/TestTri3.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/tri3/TestTri3.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -23,6 +23,8 @@
 import unittest
 import numpy
 
+from pylith.tests import has_h5py
+
 class TestTri3(unittest.TestCase):
   """
   Generic tests for problems using 2-D mesh.
@@ -35,8 +37,13 @@
     self.mesh = {'ncells': 124,
                  'ncorners': 3,
                  'nvertices': 79,
-                 'spaceDim': 3,
+                 'spaceDim': 2,
                  'tensorSize': 3}
+
+    if has_h5py():
+      self.checkResults = True
+    else:
+      self.checkResults = False
     return
 
 
@@ -44,17 +51,17 @@
     """
     Check elastic info.
     """
-    if self.reader is None:
+    if not self.checkResults:
       return
 
     ncells= self.mesh['ncells']
 
-    filename = "%s-elastic_info.vtk" % self.outputRoot
+    filename = "%s-elastic_info.h5" % self.outputRoot
     from axialdisp_soln import p_mu,p_lambda,p_density
 
-    propMu =  p_mu*numpy.ones( (ncells, 1), dtype=numpy.float64)
-    propLambda = p_lambda*numpy.ones( (ncells, 1), dtype=numpy.float64)
-    propDensity = p_density*numpy.ones( (ncells, 2), dtype=numpy.float64)
+    propMu =  p_mu*numpy.ones( (1, ncells, 1), dtype=numpy.float64)
+    propLambda = p_lambda*numpy.ones( (1, ncells, 1), dtype=numpy.float64)
+    propDensity = p_density*numpy.ones( (1, ncells, 1), dtype=numpy.float64)
 
     properties = {'mu': propMu,
                   'lambda': propLambda,
@@ -70,10 +77,10 @@
     """
     Check solution (displacement) field.
     """
-    if self.reader is None:
+    if not self.checkResults:
       return
 
-    filename = "%s_t0000000.vtk" % self.outputRoot
+    filename = "%s.h5" % self.outputRoot
     from pylith.tests.Solution import check_displacements
     check_displacements(self, filename, self.mesh)
 
@@ -84,10 +91,10 @@
     """
     Check elastic state variables.
     """
-    if self.reader is None:
+    if not self.checkResults:
       return
 
-    filename = "%s-elastic_t0000000.vtk" % self.outputRoot
+    filename = "%s-elastic.h5" % self.outputRoot
 
     from pylith.tests.StateVariables import check_state_variables
     stateVars = ["total_strain", "stress"]

Modified: short/3D/PyLith/trunk/tests_auto/2d/tri3/axialdisp.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/tri3/axialdisp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/tri3/axialdisp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [axialdisp]
 
 [axialdisp.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -52,7 +51,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
@@ -102,9 +101,11 @@
 # ----------------------------------------------------------------------
 # output
 # ----------------------------------------------------------------------
-[axialdisp.problem.formulation.output.output.writer]
-filename = axialdisp.vtk
+[axialdisp.problem.formulation.output.output]
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = axialdisp.h5
 
 [axialdisp.timedependent.materials.elastic.output]
 cell_filter = pylith.meshio.CellFilterAvgMesh
-writer.filename = axialdisp-elastic.vtk
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = axialdisp-elastic.h5

Modified: short/3D/PyLith/trunk/tests_auto/2d/tri3/axialdisp_gendb.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/tri3/axialdisp_gendb.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/tri3/axialdisp_gendb.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -64,10 +64,10 @@
             'data_dim': 2,
             'values': [{'name': "displacement-x",
                         'units': "m",
-                        'data': numpy.ravel(disp[:,0])},
+                        'data': numpy.ravel(disp[0,:,0])},
                        {'name': "displacement-y",
                         'units': "m",
-                        'data': numpy.ravel(disp[:,1])}]}
+                        'data': numpy.ravel(disp[0,:,1])}]}
 
     from spatialdata.spatialdb.SimpleIOAscii import SimpleIOAscii
     io = SimpleIOAscii()

Modified: short/3D/PyLith/trunk/tests_auto/2d/tri3/axialdisp_soln.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/tri3/axialdisp_soln.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/tri3/axialdisp_soln.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -61,9 +61,9 @@
     Compute displacement field at locations.
     """
     (npts, dim) = locs.shape
-    disp = numpy.zeros( (npts, 3), dtype=numpy.float64)
-    disp[:,0] = exx*locs[:,0] + exy*locs[:,1]
-    disp[:,1] = eyy*locs[:,1] + exy*locs[:,0]
+    disp = numpy.zeros( (1, npts, 2), dtype=numpy.float64)
+    disp[0,:,0] = exx*locs[:,0] + exy*locs[:,1]
+    disp[0,:,1] = eyy*locs[:,1] + exy*locs[:,0]
     return disp
 
 
@@ -72,10 +72,10 @@
     Compute strain field at locations.
     """
     (npts, dim) = locs.shape
-    strain = numpy.zeros( (npts, 3), dtype=numpy.float64)
-    strain[:,0] = exx
-    strain[:,1] = eyy
-    strain[:,2] = exy
+    strain = numpy.zeros( (1, npts, 3), dtype=numpy.float64)
+    strain[0,:,0] = exx
+    strain[0,:,1] = eyy
+    strain[0,:,2] = exy
     return strain
   
 
@@ -84,10 +84,10 @@
     Compute stress field at locations.
     """
     (npts, dim) = locs.shape
-    stress = numpy.zeros( (npts, 3), dtype=numpy.float64)
-    stress[:,0] = sxx
-    stress[:,1] = syy
-    stress[:,2] = sxy
+    stress = numpy.zeros( (1, npts, 3), dtype=numpy.float64)
+    stress[0,:,0] = sxx
+    stress[0,:,1] = syy
+    stress[0,:,2] = sxy
     return stress
 
 

Modified: short/3D/PyLith/trunk/tests_auto/2d/tri3/dislocation.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/tri3/dislocation.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/tri3/dislocation.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [dislocation]
 
 # ----------------------------------------------------------------------
@@ -49,7 +48,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 +78,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/trunk/tests_auto/2d/tri3/dislocation2.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/tri3/dislocation2.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/tri3/dislocation2.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [dislocation2]
 
 # ----------------------------------------------------------------------
@@ -49,7 +48,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 +71,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 +82,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/trunk/tests_auto/2d/tri3/sheardisp.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/tri3/sheardisp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/tri3/sheardisp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [sheardisp]
 
 [sheardisp.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -52,7 +51,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
@@ -109,9 +108,11 @@
 # ----------------------------------------------------------------------
 # output
 # ----------------------------------------------------------------------
-[sheardisp.problem.formulation.output.output.writer]
-filename = sheardisp.vtk
+[sheardisp.problem.formulation.output.output]
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = sheardisp.h5
 
 [sheardisp.timedependent.materials.elastic.output]
 cell_filter = pylith.meshio.CellFilterAvgMesh
-writer.filename = sheardisp-elastic.vtk
+writer = pylith.meshio.DataWriterHDF5Mesh
+writer.filename = sheardisp-elastic.h5

Modified: short/3D/PyLith/trunk/tests_auto/2d/tri3/sheardisp_gendb.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/tri3/sheardisp_gendb.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/tri3/sheardisp_gendb.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -64,10 +64,10 @@
             'data_dim': 2,
             'values': [{'name': "displacement-x",
                         'units': "m",
-                        'data': numpy.ravel(disp[:,0])},
+                        'data': numpy.ravel(disp[0,:,0])},
                        {'name': "displacement-y",
                         'units': "m",
-                        'data': numpy.ravel(disp[:,1])}]}
+                        'data': numpy.ravel(disp[0,:,1])}]}
 
     from spatialdata.spatialdb.SimpleIOAscii import SimpleIOAscii
     io = SimpleIOAscii()

Modified: short/3D/PyLith/trunk/tests_auto/2d/tri3/sheardisp_refine.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/tri3/sheardisp_refine.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/tri3/sheardisp_refine.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 [pylithapp.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -56,7 +55,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/trunk/tests_auto/2d/tri3/sheardisp_soln.py
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/tri3/sheardisp_soln.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/tri3/sheardisp_soln.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -61,9 +61,9 @@
     Compute displacement field at locations.
     """
     (npts, dim) = locs.shape
-    disp = numpy.zeros( (npts, 3), dtype=numpy.float64)
-    disp[:,0] = exx*locs[:,0] + exy*locs[:,1]
-    disp[:,1] = eyy*locs[:,1] + exy*locs[:,0]
+    disp = numpy.zeros( (1, npts, 2), dtype=numpy.float64)
+    disp[0,:,0] = exx*locs[:,0] + exy*locs[:,1]
+    disp[0,:,1] = eyy*locs[:,1] + exy*locs[:,0]
     return disp
 
 
@@ -72,10 +72,10 @@
     Compute strain field at locations.
     """
     (npts, dim) = locs.shape
-    strain = numpy.zeros( (npts, 3), dtype=numpy.float64)
-    strain[:,0] = exx
-    strain[:,1] = eyy
-    strain[:,2] = exy
+    strain = numpy.zeros( (1, npts, 3), dtype=numpy.float64)
+    strain[0,:,0] = exx
+    strain[0,:,1] = eyy
+    strain[0,:,2] = exy
     return strain
   
 
@@ -84,10 +84,10 @@
     Compute stress field at locations.
     """
     (npts, dim) = locs.shape
-    stress = numpy.zeros( (npts, 3), dtype=numpy.float64)
-    stress[:,0] = sxx
-    stress[:,1] = syy
-    stress[:,2] = sxy
+    stress = numpy.zeros( (1, npts, 3), dtype=numpy.float64)
+    stress[0,:,0] = sxx
+    stress[0,:,1] = syy
+    stress[0,:,2] = sxy
     return stress
 
 

Modified: short/3D/PyLith/trunk/tests_auto/2d/tri6/axialdisp.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/tri6/axialdisp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/tri6/axialdisp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 [pylithapp.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -55,7 +54,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/trunk/tests_auto/2d/tri6/dislocation.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/2d/tri6/dislocation.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/2d/tri6/dislocation.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 [pylithapp.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -55,7 +54,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 +85,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/trunk/tests_auto/3d/hex8/axial-small-tractions.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/3d/hex8/axial-small-tractions.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/3d/hex8/axial-small-tractions.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests_auto/3d/hex8/axialelasticisotropic.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/3d/hex8/axialelasticisotropic.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/3d/hex8/axialelasticisotropic.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests_auto/3d/hex8/axialgenmax1-tract-8cells.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/3d/hex8/axialgenmax1-tract-8cells.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/3d/hex8/axialgenmax1-tract-8cells.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests_auto/3d/hex8/axialgenmax2-tract-8cells.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/3d/hex8/axialgenmax2-tract-8cells.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/3d/hex8/axialgenmax2-tract-8cells.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests_auto/3d/hex8/axialgenmax3-tract-8cells.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/3d/hex8/axialgenmax3-tract-8cells.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/3d/hex8/axialgenmax3-tract-8cells.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests_auto/3d/hex8/axialgenmax4-tract-8cells.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/3d/hex8/axialgenmax4-tract-8cells.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/3d/hex8/axialgenmax4-tract-8cells.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests_auto/3d/hex8/axialmaxwellisotropic.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/3d/hex8/axialmaxwellisotropic.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/3d/hex8/axialmaxwellisotropic.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests_auto/3d/hex8/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/3d/hex8/pylithapp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/3d/hex8/pylithapp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests_auto/3d/hex8/shearelastic-eightcells.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/3d/hex8/shearelastic-eightcells.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/3d/hex8/shearelastic-eightcells.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests_auto/3d/hex8/shearelastic-fourcells.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/3d/hex8/shearelastic-fourcells.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/3d/hex8/shearelastic-fourcells.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests_auto/3d/hex8/shearelastic-small.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/3d/hex8/shearelastic-small.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/3d/hex8/shearelastic-small.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests_auto/3d/hex8/shearelastic-threecells.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/3d/hex8/shearelastic-threecells.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/3d/hex8/shearelastic-threecells.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests_auto/3d/hex8/shearelastic-twocells.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/3d/hex8/shearelastic-twocells.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/3d/hex8/shearelastic-twocells.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests_auto/3d/hex8/shearelastic-twocellsb.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/3d/hex8/shearelastic-twocellsb.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/3d/hex8/shearelastic-twocellsb.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests_auto/3d/hex8/shearelasticisotropic.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/3d/hex8/shearelasticisotropic.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/3d/hex8/shearelasticisotropic.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests_auto/3d/hex8/shearmaxwellisotropic.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/3d/hex8/shearmaxwellisotropic.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/3d/hex8/shearmaxwellisotropic.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests_auto/3d/hex8/shearplanestrain.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/3d/hex8/shearplanestrain.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/3d/hex8/shearplanestrain.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/tests_auto/3d/tet4/axialelasticisotropic.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/3d/tet4/axialelasticisotropic.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/3d/tet4/axialelasticisotropic.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------
@@ -48,7 +47,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/trunk/tests_auto/3d/tet4/dislocation.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/3d/tet4/dislocation.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/3d/tet4/dislocation.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------
@@ -49,7 +48,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 +75,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/trunk/tests_auto/3d/tet4/shearelasticisotropic.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/3d/tet4/shearelasticisotropic.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/3d/tet4/shearelasticisotropic.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------
@@ -48,7 +47,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/trunk/tests_auto/3dnew/hex27/axialdisp.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/3dnew/hex27/axialdisp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/3dnew/hex27/axialdisp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 [pylithapp.launcher] # WARNING: THIS IS NOT PORTABLE

Modified: short/3D/PyLith/trunk/tests_auto/3dnew/hex27/dislocation.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/3dnew/hex27/dislocation.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/3dnew/hex27/dislocation.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 [pylithapp.launcher] # WARNING: THIS IS NOT PORTABLE

Modified: short/3D/PyLith/trunk/tests_auto/3dnew/hex8/axialdisp.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/3dnew/hex8/axialdisp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/3dnew/hex8/axialdisp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 [pylithapp.launcher] # WARNING: THIS IS NOT PORTABLE

Modified: short/3D/PyLith/trunk/tests_auto/3dnew/hex8/lgdeformrigidbody.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/3dnew/hex8/lgdeformrigidbody.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/3dnew/hex8/lgdeformrigidbody.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [lgdeformrigidbody]
 
 [lgdeformrigidbody.launcher] # WARNING: THIS IS NOT PORTABLE

Modified: short/3D/PyLith/trunk/tests_auto/3dnew/hex8/lgdeformtraction.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/3dnew/hex8/lgdeformtraction.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/3dnew/hex8/lgdeformtraction.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [lgdeformtraction]
 
 [lgdeformtraction.launcher] # WARNING: THIS IS NOT PORTABLE

Modified: short/3D/PyLith/trunk/tests_auto/3dnew/tet10/axialdisp.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/3dnew/tet10/axialdisp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/3dnew/tet10/axialdisp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 [pylithapp.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -56,7 +55,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 +63,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/trunk/tests_auto/3dnew/tet10/dislocation.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/3dnew/tet10/dislocation.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/3dnew/tet10/dislocation.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 [pylithapp.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -57,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]
@@ -65,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
 
 # ----------------------------------------------------------------------
@@ -97,7 +96,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/trunk/tests_auto/3dnew/tet4/axialdisp.cfg
===================================================================
--- short/3D/PyLith/trunk/tests_auto/3dnew/tet4/axialdisp.cfg	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/tests_auto/3dnew/tet4/axialdisp.cfg	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 [pylithapp.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -56,14 +55,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/trunk/unittests/libtests/faults/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/Makefile.am	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/Makefile.am	2012-06-25 17:37:03 UTC (rev 20406)
@@ -57,6 +57,9 @@
 	TestFaultCohesiveDynQuad4.cc \
 	TestFaultCohesiveDynTet4.cc \
 	TestFaultCohesiveDynHex8.cc \
+	TestTractPerturbation.cc \
+	TestFaultCohesiveImpulses.cc \
+	TestFaultCohesiveImpulsesCases.cc \
 	test_faults.cc
 
 
@@ -90,7 +93,10 @@
 	TestFaultCohesiveDynTri3d.hh \
 	TestFaultCohesiveDynQuad4.hh \
 	TestFaultCohesiveDynTet4.hh \
-	TestFaultCohesiveDynHex8.hh 
+	TestFaultCohesiveDynHex8.hh \
+	TestTractPerturbation.hh \
+	TestFaultCohesiveImpulses.hh \
+	TestFaultCohesiveImpulsesCases.hh
 
 # Source files associated with testing data
 testfaults_SOURCES += \
@@ -153,7 +159,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 +226,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/trunk/unittests/libtests/faults/TestBruneSlipFn.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestBruneSlipFn.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestBruneSlipFn.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/libtests/faults/TestBruneSlipFn.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestBruneSlipFn.hh	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestBruneSlipFn.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/libtests/faults/TestConstRateSlipFn.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestConstRateSlipFn.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestConstRateSlipFn.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/libtests/faults/TestConstRateSlipFn.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestConstRateSlipFn.hh	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestConstRateSlipFn.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/libtests/faults/TestEqKinSrc.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestEqKinSrc.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestEqKinSrc.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/libtests/faults/TestEqKinSrc.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestEqKinSrc.hh	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestEqKinSrc.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/libtests/faults/TestFaultCohesiveDyn.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveDyn.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveDyn.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -21,11 +21,10 @@
 #include "TestFaultCohesiveDyn.hh" // Implementation of class methods
 
 #include "pylith/faults/FaultCohesiveDyn.hh" // USES FaultCohesiveDyn
+#include "pylith/faults/TractPerturbation.hh" // USES TractPerturbation
 
 #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
@@ -56,6 +55,7 @@
   _data = 0;
   _quadrature = new feassemble::Quadrature<topology::SubMesh>();
   CPPUNIT_ASSERT(0 != _quadrature);
+  _tractPerturbation = 0;
   _dbInitialTract = 0;
   _friction = 0;
   _dbFriction = 0;
@@ -69,6 +69,7 @@
 { // tearDown
   delete _data; _data = 0;
   delete _quadrature; _quadrature = 0;
+  delete _tractPerturbation; _tractPerturbation = 0;
   delete _dbInitialTract; _dbInitialTract = 0;
   delete _friction; _friction = 0;
   delete _dbFriction; _dbFriction = 0;
@@ -83,19 +84,18 @@
 } // testConstructor
 
 // ----------------------------------------------------------------------
-// Test dbInitialTract().
+// Test tractPerturbation().
 void
-pylith::faults::TestFaultCohesiveDyn::testDBInitialTract(void)
-{ // testDBInitialTract
+pylith::faults::TestFaultCohesiveDyn::testTractPerturbation(void)
+{ // testTractPerturbation
   FaultCohesiveDyn fault;
 
   const std::string& label = "test database";
-  spatialdata::spatialdb::SimpleDB db;
-  db.label(label.c_str());
-  fault.dbInitialTract(&db);
-  CPPUNIT_ASSERT(0 != fault._dbInitialTract);
-  CPPUNIT_ASSERT_EQUAL(label, std::string(fault._dbInitialTract->label()));
- } // testDBInitialTract
+  TractPerturbation tract;
+  tract.label(label.c_str());
+  fault.tractPerturbation(&tract);
+  CPPUNIT_ASSERT(fault._tractPerturbation);
+ } // testTractPerturbation
 
 // ----------------------------------------------------------------------
 // Test zeroTolerance().
@@ -112,11 +112,25 @@
  } // 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)
 { // testInitialize
-  CPPUNIT_ASSERT(0 != _data);
+  CPPUNIT_ASSERT(_data);
 
   topology::Mesh mesh;
   FaultCohesiveDyn fault;
@@ -169,12 +183,15 @@
     } // for
   } // for
 
-  // Initial tractions
-  if (0 != fault._dbInitialTract) {
-    //fault._fields->get("initial traction").view("INITIAL TRACTIONS"); // DEBUGGING
+  // Prescribed traction perturbation
+  if (fault._tractPerturbation) {
+    // :KLUDGE: Only check initial value
     const ALE::Obj<RealSection>& initialTractionsSection = 
-      fault._fields->get("initial traction").section();
+      fault.vertexField("traction_initial_value").section();
     CPPUNIT_ASSERT(!initialTractionsSection.isNull());
+
+    //initialTractionsSection->view("INITIAL TRACTIONS"); // DEBUGGING
+
     const int spaceDim = _data->spaceDim;
     iVertex = 0;
     for (SieveSubMesh::label_sequence::iterator v_iter = verticesBegin;
@@ -216,6 +233,11 @@
   const PylithScalar dt = 0.01;
   fault.timeStep(dt);
   fault.constrainSolnSpace(&fields, t, jacobian);
+  
+  topology::Field<topology::Mesh>& solution = fields.solution();
+  const topology::Field<topology::Mesh>& dispIncrAdj = fields.get("dispIncr adjust");
+  solution += dispIncrAdj;
+
   fault.updateStateVars(t, &fields);
 
   { // Check solution values
@@ -335,6 +357,11 @@
   const PylithScalar dt = 0.01;
   fault.timeStep(dt);
   fault.constrainSolnSpace(&fields, t, jacobian);
+
+  topology::Field<topology::Mesh>& solution = fields.solution();
+  const topology::Field<topology::Mesh>& dispIncrAdj = fields.get("dispIncr adjust");
+  solution += dispIncrAdj;
+
   fault.updateStateVars(t, &fields);
 
   { // Check solution values
@@ -460,6 +487,11 @@
   const PylithScalar dt = 0.01;
   fault.timeStep(dt);
   fault.constrainSolnSpace(&fields, t, jacobian);
+
+  topology::Field<topology::Mesh>& solution = fields.solution();
+  const topology::Field<topology::Mesh>& dispIncrAdj = fields.get("dispIncr adjust");
+  solution += dispIncrAdj;
+
   fault.updateStateVars(t, &fields);
 
   //residual.view("RESIDUAL"); // DEBUGGING
@@ -683,16 +715,15 @@
 // ----------------------------------------------------------------------
 // Initialize FaultCohesiveDyn interface condition.
 void
-pylith::faults::TestFaultCohesiveDyn::_initialize(
-					topology::Mesh* const mesh,
-					FaultCohesiveDyn* const fault,
-					topology::SolutionFields* const fields)
+pylith::faults::TestFaultCohesiveDyn::_initialize(topology::Mesh* const mesh,
+						  FaultCohesiveDyn* const fault,
+						  topology::SolutionFields* const fields)
 { // _initialize
-  CPPUNIT_ASSERT(0 != mesh);
-  CPPUNIT_ASSERT(0 != fault);
-  CPPUNIT_ASSERT(0 != fields);
-  CPPUNIT_ASSERT(0 != _data);
-  CPPUNIT_ASSERT(0 != _quadrature);
+  CPPUNIT_ASSERT(mesh);
+  CPPUNIT_ASSERT(fault);
+  CPPUNIT_ASSERT(fields);
+  CPPUNIT_ASSERT(_data);
+  CPPUNIT_ASSERT(_quadrature);
 
   meshio::MeshIOAscii iohandler;
   iohandler.filename(_data->meshFilename);
@@ -707,15 +738,17 @@
 			  _data->quadWts, _data->numQuadPts,
 			  _data->spaceDim);
   
-  // Setup initial tractions
-  spatialdata::spatialdb::SimpleDB* db =
-      new spatialdata::spatialdb::SimpleDB("initial tractions");
-  CPPUNIT_ASSERT(0 != db);
+  // Setup prescribed traction perturbation
+  delete _tractPerturbation; _tractPerturbation = new TractPerturbation();
+  _tractPerturbation->label("traction perturbation");
+  spatialdata::spatialdb::SimpleDB* db = new spatialdata::spatialdb::SimpleDB("initial tractions");
+  CPPUNIT_ASSERT(db);
   spatialdata::spatialdb::SimpleIOAscii ioInitialTract;
   ioInitialTract.filename(_data->initialTractFilename);
   db->ioHandler(&ioInitialTract);
   delete _dbInitialTract; _dbInitialTract = db;
-  fault->dbInitialTract(db);
+  _tractPerturbation->dbInitial(db);
+  fault->tractPerturbation(_tractPerturbation);
 
   // Setup friction
   spatialdata::spatialdb::SimpleDB* dbFriction =
@@ -762,6 +795,7 @@
   fields->add("disp(t)", "displacement");
   fields->add("dispIncr(t->t+dt)", "displacement_increment");
   fields->add("velocity(t)", "velocity");
+  fields->add("dispIncr adjust", "dispIncr_adjust");
   fields->solutionName("dispIncr(t->t+dt)");
   
   const int spaceDim = _data->spaceDim;

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveDyn.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveDyn.hh	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveDyn.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -52,8 +52,9 @@
   CPPUNIT_TEST_SUITE( TestFaultCohesiveDyn );
 
   CPPUNIT_TEST( testConstructor );
-  CPPUNIT_TEST( testDBInitialTract );
+  CPPUNIT_TEST( testTractPerturbation );
   CPPUNIT_TEST( testZeroTolerance );
+  CPPUNIT_TEST( testOpenFreeSurf );
 
   // Tests in derived classes:
   // testInitialize()
@@ -70,6 +71,7 @@
 
   CohesiveDynData* _data; ///< Data for testing
   feassemble::Quadrature<topology::SubMesh>* _quadrature; ///< Fault quad.
+  TractPerturbation* _tractPerturbation; ///< Initial tractions.
   spatialdata::spatialdb::SpatialDB* _dbInitialTract; ///< Initial tractions.
   friction::FrictionModel* _friction; ///< Friction model
   spatialdata::spatialdb::SpatialDB* _dbFriction; ///< Friction parameters.
@@ -87,12 +89,15 @@
   /// Test constructor.
   void testConstructor(void);
 
-  /// Test dbInitialTract().
-  void testDBInitialTract(void);
+  /// Test tractPerturbation().
+  void testTractPerturbation(void);
 
   /// Test zeroTolerance().
   void testZeroTolerance(void);
 
+  /// Test openFreeSurf().
+  void testOpenFreeSurf(void);
+
   /// Test initialize().
   void testInitialize(void);
 

Copied: short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveImpulses.cc (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/TestFaultCohesiveImpulses.cc)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveImpulses.cc	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveImpulses.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/libtests/faults/TestFaultCohesiveImpulses.hh (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/TestFaultCohesiveImpulses.hh)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveImpulses.hh	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveImpulses.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/libtests/faults/TestFaultCohesiveImpulsesCases.cc (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/TestFaultCohesiveImpulsesCases.cc)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveImpulsesCases.cc	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveImpulsesCases.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/libtests/faults/TestFaultCohesiveImpulsesCases.hh (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/TestFaultCohesiveImpulsesCases.hh)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveImpulsesCases.hh	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveImpulsesCases.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/libtests/faults/TestFaultCohesiveKin.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveKin.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveKin.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/libtests/faults/TestFaultCohesiveKin.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveKin.hh	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestFaultCohesiveKin.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/libtests/faults/TestLiuCosSlipFn.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestLiuCosSlipFn.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestLiuCosSlipFn.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/libtests/faults/TestLiuCosSlipFn.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestLiuCosSlipFn.hh	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestLiuCosSlipFn.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/libtests/faults/TestStepSlipFn.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestStepSlipFn.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestStepSlipFn.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/libtests/faults/TestStepSlipFn.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestStepSlipFn.hh	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestStepSlipFn.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/libtests/faults/TestTimeHistorySlipFn.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestTimeHistorySlipFn.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestTimeHistorySlipFn.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/libtests/faults/TestTimeHistorySlipFn.hh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestTimeHistorySlipFn.hh	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestTimeHistorySlipFn.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/libtests/faults/TestTractPerturbation.cc (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/TestTractPerturbation.cc)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestTractPerturbation.cc	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestTractPerturbation.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -0,0 +1,348 @@
+// -*- 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 "TestTractPerturbation.hh" // Implementation of class methods
+
+#include "pylith/faults/TractPerturbation.hh" // USES TractPerturbation
+
+#include "pylith/faults/CohesiveTopology.hh" // USES CohesiveTopology
+#include "pylith/topology/Mesh.hh" // USES Mesh
+#include "pylith/topology/SubMesh.hh" // USES SubMesh
+#include "pylith/topology/Field.hh" // USES Field
+#include "pylith/topology/FieldsNew.hh" // USES FieldsNew
+#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 "spatialdata/units/Nondimensional.hh" // USES Nondimensional
+
+// ----------------------------------------------------------------------
+CPPUNIT_TEST_SUITE_REGISTRATION( pylith::faults::TestTractPerturbation );
+
+// ----------------------------------------------------------------------
+typedef pylith::topology::Mesh::SieveMesh SieveMesh;
+typedef pylith::topology::Mesh::SieveSubMesh SieveSubMesh;
+typedef pylith::topology::Mesh::RealSection RealSection;
+typedef pylith::topology::Mesh::RealUniformSection RealUniformSection;
+
+// ----------------------------------------------------------------------
+// Test constructor.
+void
+pylith::faults::TestTractPerturbation::testConstructor(void)
+{ // testConstructor
+  TractPerturbation eqsrc;
+} // testConstructor
+
+// ----------------------------------------------------------------------
+// Test label().
+void
+pylith::faults::TestTractPerturbation::testLabel(void)
+{ // testLabel
+  const std::string& label = "nucleation";
+
+  TractPerturbation tract;
+  tract.label(label.c_str());
+  CPPUNIT_ASSERT_EQUAL(label, tract._label);
+} // testLabel
+
+// ----------------------------------------------------------------------
+// Test hasParameter().
+void
+pylith::faults::TestTractPerturbation::testHasParameter(void)
+{ // testHasParameter
+  spatialdata::spatialdb::SimpleDB db;
+  
+  TractPerturbation tract;
+
+  // no values
+  CPPUNIT_ASSERT_EQUAL(false, tract.hasParameter("traction_initial_value"));
+  CPPUNIT_ASSERT_EQUAL(false, tract.hasParameter("traction_rate_of_change"));
+  CPPUNIT_ASSERT_EQUAL(false, tract.hasParameter("traction_change_in_value"));
+  CPPUNIT_ASSERT_EQUAL(false, tract.hasParameter("traction_rate_start_time"));
+  CPPUNIT_ASSERT_EQUAL(false, tract.hasParameter("traction_change_start_time"));
+
+  // initial value
+  tract.dbInitial(&db);
+  CPPUNIT_ASSERT_EQUAL(true, tract.hasParameter("traction_initial_value"));
+  CPPUNIT_ASSERT_EQUAL(false, tract.hasParameter("traction_rate_of_change"));
+  CPPUNIT_ASSERT_EQUAL(false, tract.hasParameter("traction_change_in_value"));
+  CPPUNIT_ASSERT_EQUAL(false, tract.hasParameter("traction_rate_start_time"));
+  CPPUNIT_ASSERT_EQUAL(false, tract.hasParameter("traction_change_start_time"));
+
+  // change value
+  tract.dbChange(&db);
+  CPPUNIT_ASSERT_EQUAL(true, tract.hasParameter("traction_initial_value"));
+  CPPUNIT_ASSERT_EQUAL(false, tract.hasParameter("traction_rate_of_change"));
+  CPPUNIT_ASSERT_EQUAL(true, tract.hasParameter("traction_change_in_value"));
+  CPPUNIT_ASSERT_EQUAL(false, tract.hasParameter("traction_rate_start_time"));
+  CPPUNIT_ASSERT_EQUAL(true, tract.hasParameter("traction_change_start_time"));
+
+  // rate value, remove change
+  tract.dbRate(&db);
+  tract.dbChange(0);
+  CPPUNIT_ASSERT_EQUAL(true, tract.hasParameter("traction_initial_value"));
+  CPPUNIT_ASSERT_EQUAL(true, tract.hasParameter("traction_rate_of_change"));
+  CPPUNIT_ASSERT_EQUAL(false, tract.hasParameter("traction_change_in_value"));
+  CPPUNIT_ASSERT_EQUAL(true, tract.hasParameter("traction_rate_start_time"));
+  CPPUNIT_ASSERT_EQUAL(false, tract.hasParameter("traction_change_start_time"));
+} // testHasParameter
+
+// ----------------------------------------------------------------------
+// Test initialize() using 2-D mesh.
+void
+pylith::faults::TestTractPerturbation::testInitialize(void)
+{ // testInitialize
+  topology::Mesh mesh;
+  topology::SubMesh faultMesh;
+  TractPerturbation tract;
+  _initialize(&mesh, &faultMesh, &tract);
+  
+  // Rely on testTraction() for verification of results.
+} // testInitialize
+
+// ----------------------------------------------------------------------
+// Test calculate() using 2-D mesh().
+void
+pylith::faults::TestTractPerturbation::testCalculate(void)
+{ // testCalculate
+  const PylithScalar tractionE[4] = { 
+    -1.0*(-2.0+1.0), -1.0*(1.0-0.5), // initial + change
+    -1.0*(-2.1), -1.0*(1.1), // initial
+  };
+
+  topology::Mesh mesh;
+  topology::SubMesh faultMesh;
+  TractPerturbation tract;
+  _initialize(&mesh, &faultMesh, &tract);
+  
+  const PylithScalar t = 2.134;
+  tract.calculate(t);
+
+
+  const spatialdata::geocoords::CoordSys* cs = faultMesh.coordsys();
+  CPPUNIT_ASSERT(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();
+
+  //traction.view("TRACTION"); // DEBUGGING
+
+  const PylithScalar tolerance = 1.0e-06;
+  int iPoint = 0;
+
+  CPPUNIT_ASSERT(tract._parameters);
+  const ALE::Obj<RealUniformSection>& paramsSection = tract._parameters->section();
+  CPPUNIT_ASSERT(!paramsSection.isNull());
+  const int fiberDim = tract._parameters->fiberDim();
+  const int valueIndex = tract._parameters->sectionIndex("value");
+  const int valueFiberDim = tract._parameters->sectionFiberDim("value");
+  CPPUNIT_ASSERT_EQUAL(spaceDim, valueFiberDim);
+  CPPUNIT_ASSERT(valueIndex + valueFiberDim < fiberDim);
+  
+  for (SieveMesh::label_sequence::iterator v_iter=vertices->begin(); v_iter != verticesEnd; ++v_iter, ++iPoint) {
+    CPPUNIT_ASSERT_EQUAL(fiberDim, paramsSection->getFiberDimension(*v_iter));
+    const PylithScalar* vals = paramsSection->restrictPoint(*v_iter);
+    CPPUNIT_ASSERT(vals);
+    
+    for (int iDim=0; iDim < spaceDim; ++iDim) {
+      const PylithScalar valueE = tractionE[iPoint*spaceDim+iDim];
+      CPPUNIT_ASSERT_DOUBLES_EQUAL(valueE, vals[valueIndex+iDim], tolerance);
+    } // for
+  } // for
+} // testCalculate
+
+// ----------------------------------------------------------------------
+// Test parameterFields() using 2-D mesh.
+void
+pylith::faults::TestTractPerturbation::testParameterFields(void)
+{ // testParameterFields
+  const int fiberDimE = 7;
+  const PylithScalar parametersE[2*fiberDimE] = {
+    0.0, 0.0,   2.0, -1.0,   -1.0, 0.5, 1.5,
+    0.0, 0.0,   2.1, -1.1,   -0.8, 0.7, 2.5,
+  };
+
+  topology::Mesh mesh;
+  topology::SubMesh faultMesh;
+  TractPerturbation tract;
+  _initialize(&mesh, &faultMesh, &tract);
+  
+  const topology::FieldsNew<topology::SubMesh>* parameters = tract.parameterFields();
+  const ALE::Obj<RealUniformSection>& parametersSection = parameters->section();
+  CPPUNIT_ASSERT(!parametersSection.isNull());
+
+  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();
+
+  const PylithScalar tolerance = 1.0e-06;
+  int iPoint = 0;
+  for (SieveMesh::label_sequence::iterator v_iter=vertices->begin(); v_iter != verticesEnd; ++v_iter, ++iPoint) {
+    const int fiberDim = parametersSection->getFiberDimension(*v_iter);
+    CPPUNIT_ASSERT_EQUAL(fiberDimE, fiberDim);
+    const PylithScalar* vals = parametersSection->restrictPoint(*v_iter);
+    CPPUNIT_ASSERT(vals);
+
+    for (int iDim=0; iDim < fiberDim; ++iDim) {
+      const PylithScalar valueE = parametersE[iPoint*fiberDim+iDim];
+      CPPUNIT_ASSERT_DOUBLES_EQUAL(valueE, vals[iDim], tolerance);
+    } // for
+  } // for
+} // testParameterFields
+
+// ----------------------------------------------------------------------
+// Test vertexField() using 2-D mesh.
+void
+pylith::faults::TestTractPerturbation::testVertexField(void)
+{ // testVertexField
+  const int fiberDimE = 1;
+  const PylithScalar fieldE[2*fiberDimE] = {
+    1.5,
+    2.5,
+  };
+  const char* label = "traction_change_start_time";
+
+  topology::Mesh mesh;
+  topology::SubMesh faultMesh;
+  TractPerturbation tract;
+  _initialize(&mesh, &faultMesh, &tract);
+
+  const topology::Field<topology::SubMesh>& field = tract.vertexField(label);
+  const ALE::Obj<RealSection>& section = field.section();
+  CPPUNIT_ASSERT(!section.isNull());
+
+  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();
+
+  const PylithScalar tolerance = 1.0e-06;
+  int iPoint = 0;
+  for (SieveMesh::label_sequence::iterator v_iter=vertices->begin(); v_iter != verticesEnd; ++v_iter, ++iPoint) {
+    const int fiberDim = section->getFiberDimension(*v_iter);
+    CPPUNIT_ASSERT_EQUAL(fiberDimE, fiberDim);
+    const PylithScalar* vals = section->restrictPoint(*v_iter);
+    CPPUNIT_ASSERT(vals);
+
+    for (int iDim=0; iDim < fiberDim; ++iDim) {
+      const PylithScalar valueE = fieldE[iPoint*fiberDim+iDim];
+      CPPUNIT_ASSERT_DOUBLES_EQUAL(valueE, vals[iDim], tolerance);
+    } // for
+  } // for
+} // testVertexField
+
+// ----------------------------------------------------------------------
+// Initialize TractPerturbation.
+void
+pylith::faults::TestTractPerturbation::_initialize(topology::Mesh* mesh,
+						   topology::SubMesh* faultMesh,
+						   TractPerturbation* tract)
+{ // _initialize
+  CPPUNIT_ASSERT(mesh);
+  CPPUNIT_ASSERT(faultMesh);
+  CPPUNIT_ASSERT(tract);
+
+  const char* meshFilename = "data/tri3.mesh";
+  const char* faultLabel = "fault";
+  const int faultId = 2;
+  const char* initialFilename = "data/tri3_initialtract.spatialdb";
+  const char* changeFilename = "data/tri3_changetract.spatialdb";
+  const PylithScalar orientationVertex[4] = {
+      0.0, -1.0,  -1.0, 0.0,
+  };
+
+  meshio::MeshIOAscii meshIO;
+  meshIO.filename(meshFilename);
+  meshIO.debug(false);
+  meshIO.interpolate(false);
+  meshIO.read(mesh);
+
+  // Set up coordinates
+  spatialdata::geocoords::CSCart cs;
+  cs.setSpaceDim(mesh->dimension());
+  cs.initialize();
+  mesh->coordsys(&cs);
+  const int spaceDim = cs.spaceDim();
+
+  // Create fault mesh
+  int firstFaultVertex = 0;
+  int firstLagrangeVertex = mesh->sieveMesh()->getIntSection(faultLabel)->size();
+  int firstFaultCell = mesh->sieveMesh()->getIntSection(faultLabel)->size();
+  const bool useLagrangeConstraints = true;
+  if (useLagrangeConstraints) {
+    firstFaultCell += mesh->sieveMesh()->getIntSection(faultLabel)->size();
+  } // if
+  ALE::Obj<SieveFlexMesh> faultBoundary = 0;
+  const ALE::Obj<SieveMesh>& sieveMesh = mesh->sieveMesh();
+  CPPUNIT_ASSERT(!sieveMesh.isNull());
+  CohesiveTopology::createFault(faultMesh, faultBoundary,
+                                *mesh, sieveMesh->getIntSection(faultLabel));
+  CohesiveTopology::create(mesh, *faultMesh, faultBoundary, 
+                           sieveMesh->getIntSection(faultLabel),
+                           faultId,
+                           firstFaultVertex, firstLagrangeVertex, firstFaultCell,
+                           useLagrangeConstraints);
+  // Need to copy coordinates from mesh to fault mesh since we are
+  // using create() instead of createParallel().
+  const ALE::Obj<SieveSubMesh>& faultSieveMesh = faultMesh->sieveMesh();
+  CPPUNIT_ASSERT(!faultSieveMesh.isNull());
+  faultSieveMesh->setRealSection("coordinates", 
+				 sieveMesh->getRealSection("coordinates"));
+
+  // Setup databases
+  spatialdata::spatialdb::SimpleDB dbInitial("initial traction");
+  spatialdata::spatialdb::SimpleIOAscii ioInitial;
+  ioInitial.filename(initialFilename);
+  dbInitial.ioHandler(&ioInitial);
+  
+  spatialdata::spatialdb::SimpleDB dbChange("traction change");
+  spatialdata::spatialdb::SimpleIOAscii ioChange;
+  ioChange.filename(changeFilename);
+  dbChange.ioHandler(&ioChange);
+
+  // Setup fault orientation
+  const ALE::Obj<SieveMesh::label_sequence>& vertices = faultSieveMesh->depthStratum(0);
+  const SieveMesh::label_sequence::iterator verticesEnd = vertices->end();
+  topology::Field<topology::SubMesh> faultOrientation(*faultMesh);
+  faultOrientation.newSection(vertices, spaceDim*spaceDim);
+  faultOrientation.allocate();
+  const ALE::Obj<RealSection>& orientationSection = faultOrientation.section();
+  CPPUNIT_ASSERT(!orientationSection.isNull());
+  for (SieveMesh::label_sequence::iterator v_iter=vertices->begin(); v_iter != verticesEnd; ++v_iter) {
+    CPPUNIT_ASSERT_EQUAL(spaceDim*spaceDim, orientationSection->getFiberDimension(*v_iter));
+    orientationSection->updatePoint(*v_iter, orientationVertex);
+  } // for
+  
+  spatialdata::units::Nondimensional normalizer;
+
+  // setup TractPerturbation
+  tract->dbInitial(&dbInitial);
+  tract->dbChange(&dbChange);
+  
+  tract->initialize(*faultMesh, faultOrientation, normalizer);
+} // _initialize
+
+
+// End of file 

Copied: short/3D/PyLith/trunk/unittests/libtests/faults/TestTractPerturbation.hh (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/TestTractPerturbation.hh)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/TestTractPerturbation.hh	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/TestTractPerturbation.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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 unittests/libtests/faults/TestTractPerturbation.hh
+ *
+ * @brief C++ TestTractPerturbation object
+ *
+ * C++ unit testing for TractPerturbation.
+ */
+
+#if !defined(pylith_faults_testtractperturbation_hh)
+#define pylith_faults_testtractperturbation_hh
+
+#include "pylith/faults/faultsfwd.hh" // USES TractPerturbation
+#include "pylith/topology/topologyfwd.hh" // USES Mesh
+
+#include <cppunit/extensions/HelperMacros.h>
+
+/// Namespace for pylith package
+namespace pylith {
+  namespace faults {
+    class TestTractPerturbation;
+  } // faults
+} // pylith
+
+/// C++ unit testing for TractPerturbation
+class pylith::faults::TestTractPerturbation : public CppUnit::TestFixture
+{ // class TestTractPerturbation
+
+  // CPPUNIT TEST SUITE /////////////////////////////////////////////////
+  CPPUNIT_TEST_SUITE( TestTractPerturbation );
+
+  CPPUNIT_TEST( testConstructor );
+  CPPUNIT_TEST( testLabel );
+  CPPUNIT_TEST( testHasParameter );
+  CPPUNIT_TEST( testInitialize );
+  CPPUNIT_TEST( testCalculate );
+  CPPUNIT_TEST( testParameterFields );
+  CPPUNIT_TEST( testVertexField );
+
+  CPPUNIT_TEST_SUITE_END();
+
+  // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+  /// Test constructor.
+  void testConstructor(void);
+
+  /// Test label().
+  void testLabel(void);
+
+  /// Test hasParameter().
+  void testHasParameter(void);
+
+  /// Test initialize() with 2-D mesh.
+  void testInitialize(void);
+
+  /// Test calculate() with 2-D mesh.
+  void testCalculate(void);
+
+  /// Test parameterFields() with 2-D mesh.
+  void testParameterFields(void);
+
+  /// Test VertexField() with 2-D mesh.
+  void testVertexField(void);
+
+  // PRIVATE METHODS ////////////////////////////////////////////////////
+private :
+
+  /** Initialize TractPerturbation.
+   *
+   * @param mesh Finite-element mesh of domain.
+   * @param faultMesh Finite-element mesh of fault.
+   * @param tract Traction perturbation.
+   */
+  static
+  void _initialize(topology::Mesh* mesh,
+		   topology::SubMesh* faultMesh,
+		   TractPerturbation* tract);
+
+}; // class TestTractPerturbation
+
+#endif // pylith_faults_testtractperturbation_hh
+
+
+// End of file 

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDynDataHex8.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDynDataHex8.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDynDataHex8.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -1340,10 +1340,11 @@
 };
 
 const PylithScalar pylith::faults::CohesiveDynDataHex8::_initialTractions[] = {
-  +3.0, -1.0, +2.0,
-  +3.1, -1.1, +2.1,
-  +3.2, -1.2, +2.2,
-  +3.3, -1.3, +2.3,
+  // Fault coordinate frame
+  +1.0, +2.0, -3.0,
+  +1.1, +2.1, -3.1,
+  +1.2, +2.2, -3.2,
+  +1.3, +2.3, -3.3,
 };
 
 
@@ -1355,7 +1356,7 @@
 // Stick case
 // ----------------------------------------------------------------------
 // Input
-const PylithScalar pylith::faults::CohesiveDynDataHex8::_fieldIncrStick[] = {
+const PylithScalar pylith::faults::CohesiveDynDataHex8::_fieldIncrStick[20*3] = {
   0.1, 2.1, 1.1,
   0.2, 2.2, 1.2,
   0.3, 2.3, 1.3,
@@ -1390,7 +1391,7 @@
 // Slip case
 // ----------------------------------------------------------------------
 // Input
-const PylithScalar pylith::faults::CohesiveDynDataHex8::_fieldIncrSlip[] = {
+const PylithScalar pylith::faults::CohesiveDynDataHex8::_fieldIncrSlip[20*3] = {
   1.1, 2.1, 0.1,
   1.2, 2.2, 0.2,
   1.3, 2.3, 0.3,
@@ -1414,7 +1415,7 @@
 };
 
 // Output
-const PylithScalar pylith::faults::CohesiveDynDataHex8::_fieldIncrSlipE[] = {
+const PylithScalar pylith::faults::CohesiveDynDataHex8::_fieldIncrSlipE[20*3] = {
    1.100000000000,   2.100000000000,   0.100000000000,
    1.200000000000,   2.200000000000,   0.200000000000,
    1.300000000000,   2.300000000000,   0.300000000000,

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDynDataQuad4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDynDataQuad4.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDynDataQuad4.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -281,8 +281,9 @@
 };
 
 const PylithScalar pylith::faults::CohesiveDynDataQuad4::_initialTractions[] = {
-  2.0, -1.0,
-  2.1, -1.1,
+  // Fault coordinate frame
+  1.0, -2.0,
+  1.1, -2.1,
 };
 
 

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDynDataTet4.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDynDataTet4.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDynDataTet4.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -485,9 +485,10 @@
 };
 
 const PylithScalar pylith::faults::CohesiveDynDataTet4::_initialTractions[] = {
-  +3.0, -1.0, +2.0, 
-  +3.1, -1.1, +2.1, 
-  +3.2, -1.2, +2.2, 
+  // Fault coordinate frame
+  +1.0, +2.0, -3.0,
+  +1.1, +2.1, -3.1,
+  +1.2, +2.2, -3.2,
 };
 
 

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDynDataTri3.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDynDataTri3.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDynDataTri3.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -251,8 +251,9 @@
 };
 
 const PylithScalar pylith::faults::CohesiveDynDataTri3::_initialTractions[] = {
-  2.0, -1.0,
-  2.1, -1.1,
+  // Fault coordinate frame
+  1.0, -2.0,
+  1.1, -2.1,
 };
 
 

Modified: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDynDataTri3d.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDynDataTri3d.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveDynDataTri3d.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -437,9 +437,10 @@
 };
 
 const PylithScalar pylith::faults::CohesiveDynDataTri3d::_initialTractions[] = {
-  3.0*0.70710678118654757, 0.70710678118654757,
-  2.1, -1.1,
-  1.2,  2.2,
+  // Fault coordinate frame
+  1.0, -2.0,
+  1.1, -2.1,
+  1.2, -2.2,
 };
 
 

Copied: short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveImpulsesData.cc (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/data/CohesiveImpulsesData.cc)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveImpulsesData.cc	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveImpulsesData.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/libtests/faults/data/CohesiveImpulsesData.hh (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/data/CohesiveImpulsesData.hh)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveImpulsesData.hh	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveImpulsesData.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/libtests/faults/data/CohesiveImpulsesDataHex8.cc (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/data/CohesiveImpulsesDataHex8.cc)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveImpulsesDataHex8.cc	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveImpulsesDataHex8.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/libtests/faults/data/CohesiveImpulsesDataHex8.hh (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/data/CohesiveImpulsesDataHex8.hh)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveImpulsesDataHex8.hh	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveImpulsesDataHex8.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/libtests/faults/data/CohesiveImpulsesDataQuad4.cc (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/data/CohesiveImpulsesDataQuad4.cc)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveImpulsesDataQuad4.cc	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveImpulsesDataQuad4.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/libtests/faults/data/CohesiveImpulsesDataQuad4.hh (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/data/CohesiveImpulsesDataQuad4.hh)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveImpulsesDataQuad4.hh	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveImpulsesDataQuad4.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/libtests/faults/data/CohesiveImpulsesDataTet4.cc (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/data/CohesiveImpulsesDataTet4.cc)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveImpulsesDataTet4.cc	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveImpulsesDataTet4.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/libtests/faults/data/CohesiveImpulsesDataTet4.hh (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/data/CohesiveImpulsesDataTet4.hh)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveImpulsesDataTet4.hh	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveImpulsesDataTet4.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/libtests/faults/data/CohesiveImpulsesDataTri3.cc (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/data/CohesiveImpulsesDataTri3.cc)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveImpulsesDataTri3.cc	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveImpulsesDataTri3.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/libtests/faults/data/CohesiveImpulsesDataTri3.hh (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/data/CohesiveImpulsesDataTri3.hh)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveImpulsesDataTri3.hh	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/CohesiveImpulsesDataTri3.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/libtests/faults/data/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/Makefile.am	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/Makefile.am	2012-06-25 17:37:03 UTC (rev 20406)
@@ -40,7 +40,9 @@
 	tri3d_sliptime.spatialdb \
 	tri3d_risetime.spatialdb \
 	tri3_initialtract.spatialdb \
+	tri3_changetract.spatialdb \
 	tri3d_initialtract.spatialdb \
+	tri3_impulses.spatialdb \
 	quad4.mesh \
 	quad4b.mesh \
 	quad4c.mesh \
@@ -56,6 +58,7 @@
 	quad4e_sliptime.spatialdb \
 	quad4e_risetime.spatialdb \
 	quad4_initialtract.spatialdb \
+	quad4_impulses.spatialdb \
 	tet4.mesh \
 	tet4b.mesh \
 	tet4c.mesh \
@@ -74,6 +77,7 @@
 	tet4e_sliptime.spatialdb \
 	tet4e_risetime.spatialdb \
 	tet4_initialtract.spatialdb \
+	tet4_impulses.spatialdb \
 	hex8.mesh \
 	hex8b.mesh \
 	hex8c.mesh \
@@ -87,10 +91,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/trunk/unittests/libtests/faults/data/hex8_impulses.spatialdb (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/data/hex8_impulses.spatialdb)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/hex8_impulses.spatialdb	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/hex8_impulses.spatialdb	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/libtests/faults/data/hex8traction.mesh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/hex8traction.mesh	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/hex8traction.mesh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/libtests/faults/data/quad4_impulses.spatialdb (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/data/quad4_impulses.spatialdb)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/quad4_impulses.spatialdb	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/quad4_impulses.spatialdb	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/libtests/faults/data/quad4traction.mesh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/quad4traction.mesh	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/quad4traction.mesh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/libtests/faults/data/tet4_impulses.spatialdb (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/data/tet4_impulses.spatialdb)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/tet4_impulses.spatialdb	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/tet4_impulses.spatialdb	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/libtests/faults/data/tet4traction.mesh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/tet4traction.mesh	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/tet4traction.mesh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/libtests/faults/data/tri3_changetract.spatialdb (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/data/tri3_changetract.spatialdb)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/tri3_changetract.spatialdb	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/tri3_changetract.spatialdb	2012-06-25 17:37:03 UTC (rev 20406)
@@ -0,0 +1,15 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 3
+  value-names =  traction-shear traction-normal  change-start-time
+  value-units =  Pa   Pa   s
+  num-locs = 2
+  data-dim = 1
+  space-dim = 2
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 2
+  }
+}
+0.0  +1.0   -0.5   +1.0   1.5
+0.0  -1.0   -0.7   +0.8   2.5

Copied: short/3D/PyLith/trunk/unittests/libtests/faults/data/tri3_impulses.spatialdb (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/faults/data/tri3_impulses.spatialdb)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/tri3_impulses.spatialdb	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/tri3_impulses.spatialdb	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/libtests/faults/data/tri3traction.mesh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/faults/data/tri3traction.mesh	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/libtests/faults/data/tri3traction.mesh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/libtests/materials/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/materials/Makefile.am	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/libtests/materials/Makefile.am	2012-06-25 17:37:03 UTC (rev 20406)
@@ -41,6 +41,7 @@
 	TestGenMaxwellPlaneStrain.cc \
 	TestGenMaxwellQpQsIsotropic3D.cc \
 	TestPowerLaw3D.cc \
+	TestPowerLawPlaneStrain.cc \
 	TestDruckerPrager3D.cc \
 	TestDruckerPragerPlaneStrain.cc \
 	TestEffectiveStress.cc \
@@ -62,6 +63,7 @@
 	TestMaxwellIsotropic3D.hh \
 	TestMaxwellPlaneStrain.hh \
 	TestPowerLaw3D.hh \
+	TestPowerLawPlaneStrain.hh \
 	TestDruckerPrager3D.hh \
 	TestDruckerPragerPlaneStrain.hh \
 	TestEffectiveStress.hh
@@ -87,6 +89,8 @@
 	data/GenMaxwellQpQsIsotropic3DTimeDepData.cc \
 	data/PowerLaw3DElasticData.cc \
 	data/PowerLaw3DTimeDepData.cc \
+	data/PowerLawPlaneStrainElasticData.cc \
+	data/PowerLawPlaneStrainTimeDepData.cc \
 	data/DruckerPrager3DElasticData.cc \
 	data/DruckerPrager3DTimeDepData.cc \
 	data/DruckerPragerPlaneStrainElasticData.cc \
@@ -113,6 +117,8 @@
 	data/MaxwellPlaneStrainTimeDepData.hh \
 	data/PowerLaw3DElasticData.hh \
 	data/PowerLaw3DTimeDepData.hh \
+	data/PowerLawPlaneStrainElasticData.hh \
+	data/PowerLawPlaneStrainTimeDepData.hh \
 	data/DruckerPrager3DElasticData.hh \
 	data/DruckerPrager3DTimeDepData.hh \
 	data/DruckerPragerPlaneStrainElasticData.hh \

Copied: short/3D/PyLith/trunk/unittests/libtests/materials/TestPowerLawPlaneStrain.cc (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/materials/TestPowerLawPlaneStrain.cc)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/materials/TestPowerLawPlaneStrain.cc	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/materials/TestPowerLawPlaneStrain.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -0,0 +1,224 @@
+// -*- 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 "TestPowerLawPlaneStrain.hh" // Implementation of class methods
+
+#include "data/PowerLawPlaneStrainElasticData.hh" // USES PowerLawPlaneStrainElasticData
+#include "data/PowerLawPlaneStrainTimeDepData.hh" // USES PowerLawPlaneStrainTimeDepData
+
+#include "pylith/materials/PowerLawPlaneStrain.hh" // USES PowerLawPlaneStrain
+
+#include <cstring> // USES memcpy()
+
+// ----------------------------------------------------------------------
+CPPUNIT_TEST_SUITE_REGISTRATION( pylith::materials::TestPowerLawPlaneStrain );
+
+// ----------------------------------------------------------------------
+// Setup testing data.
+void
+pylith::materials::TestPowerLawPlaneStrain::setUp(void)
+{ // setUp
+  _material = new PowerLawPlaneStrain();
+  _matElastic = new PowerLawPlaneStrain();
+  _data = new PowerLawPlaneStrainElasticData();
+  _dataElastic = new PowerLawPlaneStrainElasticData();
+  setupNormalizer();
+} // setUp
+
+// ----------------------------------------------------------------------
+// Test timeStep()
+void
+pylith::materials::TestPowerLawPlaneStrain::testTimeStep(void)
+{ // testTimeStep
+  PowerLawPlaneStrain material;
+
+  CPPUNIT_ASSERT_EQUAL(false, material._needNewJacobian);
+
+  const PylithScalar dt1 = 1.0;
+  material.timeStep(dt1);
+  CPPUNIT_ASSERT_EQUAL(dt1, material.Material::timeStep());
+  CPPUNIT_ASSERT_EQUAL(true, material.needNewJacobian());
+
+  const PylithScalar dt2 = 2.0;
+  material.timeStep(dt2);
+  CPPUNIT_ASSERT_EQUAL(dt2, material.Material::timeStep());
+  CPPUNIT_ASSERT_EQUAL(true, material.needNewJacobian());
+} // testTimeStep
+
+// ----------------------------------------------------------------------
+// Test useElasticBehavior()
+void
+pylith::materials::TestPowerLawPlaneStrain::testUseElasticBehavior(void)
+{ // testUseElasticBehavior
+  PowerLawPlaneStrain material;
+
+  material.useElasticBehavior(true);
+  // Some compilers/operating systems (cygwin) don't allow comparing
+  // pointers. Use first test to determine if we can compare pointers.
+  if (&pylith::materials::PowerLawPlaneStrain::_calcStressElastic == 
+      material._calcStressFn) {
+    CPPUNIT_ASSERT(&pylith::materials::PowerLawPlaneStrain::_calcStressElastic ==
+		   material._calcStressFn);
+    CPPUNIT_ASSERT(&pylith::materials::PowerLawPlaneStrain::_calcElasticConstsElastic ==
+		   material._calcElasticConstsFn);
+    CPPUNIT_ASSERT(&pylith::materials::PowerLawPlaneStrain::_updateStateVarsElastic ==
+		   material._updateStateVarsFn);
+
+    material.useElasticBehavior(false);
+    CPPUNIT_ASSERT(&pylith::materials::PowerLawPlaneStrain::_calcStressViscoelastic ==
+		   material._calcStressFn);
+    CPPUNIT_ASSERT(&pylith::materials::PowerLawPlaneStrain::_calcElasticConstsViscoelastic ==
+		   material._calcElasticConstsFn);
+    CPPUNIT_ASSERT(&pylith::materials::PowerLawPlaneStrain::_updateStateVarsViscoelastic ==
+		   material._updateStateVarsFn);
+  } // if
+} // testUseElasticBehavior
+
+// ----------------------------------------------------------------------
+// Test usesHasStateVars()
+void
+pylith::materials::TestPowerLawPlaneStrain::testHasStateVars(void)
+{ // testHasStateVars
+  PowerLawPlaneStrain material;
+  CPPUNIT_ASSERT_EQUAL(true, material.hasStateVars());
+} // testHasStateVars
+
+// ----------------------------------------------------------------------
+// Test _calcStressElastic()
+void
+pylith::materials::TestPowerLawPlaneStrain::test_calcStressElastic(void)
+{ // test_calcStressElastic
+  CPPUNIT_ASSERT(0 != _matElastic);
+  _matElastic->useElasticBehavior(true);
+
+  test_calcStress();
+} // test_calcStressElastic
+
+// ----------------------------------------------------------------------
+// Test calcElasticConstsElastic()
+void
+pylith::materials::TestPowerLawPlaneStrain::test_calcElasticConstsElastic(void)
+{ // test_calcElasticConstsElastic
+  CPPUNIT_ASSERT(0 != _matElastic);
+  _matElastic->useElasticBehavior(true);
+
+  test_calcElasticConsts();
+} // test_calcElasticConstsElastic
+
+// ----------------------------------------------------------------------
+// Test _updateStateVarsElastic()
+void
+pylith::materials::TestPowerLawPlaneStrain::test_updateStateVarsElastic(void)
+{ // test_updateStateVarsElastic
+  CPPUNIT_ASSERT(0 != _matElastic);
+  _matElastic->useElasticBehavior(true);
+
+  test_updateStateVars();
+} // test_updateStateVarsElastic
+
+// ----------------------------------------------------------------------
+// Test _calcStressTimeDep()
+void
+pylith::materials::TestPowerLawPlaneStrain::test_calcStressTimeDep(void)
+{ // test_calcStressTimeDep
+  CPPUNIT_ASSERT(0 != _matElastic);
+  _matElastic->useElasticBehavior(false);
+
+  delete _dataElastic; _dataElastic = new PowerLawPlaneStrainTimeDepData();
+
+  PylithScalar dt = 2.0e+5;
+  _matElastic->timeStep(dt);
+  test_calcStress();
+} // test_calcStressTimeDep
+
+// ----------------------------------------------------------------------
+// Test _calcElasticConstsTimeDep()
+void
+pylith::materials::TestPowerLawPlaneStrain::test_calcElasticConstsTimeDep(void)
+{ // test_calcElasticConstsTimeDep
+  CPPUNIT_ASSERT(0 != _matElastic);
+  _matElastic->useElasticBehavior(false);
+
+  delete _dataElastic; _dataElastic = new PowerLawPlaneStrainTimeDepData();
+
+  PylithScalar dt = 2.0e+5;
+  _matElastic->timeStep(dt);
+  test_calcElasticConsts();
+} // test_calcElasticConstsTimeDep
+
+// ----------------------------------------------------------------------
+// Test _updateStateVarsTimeDep()
+void
+pylith::materials::TestPowerLawPlaneStrain::test_updateStateVarsTimeDep(void)
+{ // test_updateStateVarsTimeDep
+  CPPUNIT_ASSERT(0 != _matElastic);
+  _matElastic->useElasticBehavior(false);
+
+  delete _dataElastic; _dataElastic = new PowerLawPlaneStrainTimeDepData();
+
+  PylithScalar dt = 2.0e+5;
+  _matElastic->timeStep(dt);
+  test_updateStateVars();
+
+} // test_updateStateVarsTimeDep
+
+// ----------------------------------------------------------------------
+// Test _stableTimeStepImplicit()
+void
+pylith::materials::TestPowerLawPlaneStrain::test_stableTimeStepImplicit(void)
+{ // test_stableTimeStepImplicit
+  CPPUNIT_ASSERT(0 != _matElastic);
+
+  delete _dataElastic; _dataElastic = new PowerLawPlaneStrainTimeDepData();
+
+  TestElasticMaterial::test_stableTimeStepImplicit();
+} // test_stableTimeStepImplicit
+
+// ----------------------------------------------------------------------
+// Test hasProperty().
+void
+pylith::materials::TestPowerLawPlaneStrain::testHasProperty(void)
+{ // testHasProperty
+  PowerLawPlaneStrain material;
+
+  CPPUNIT_ASSERT(material.hasProperty("mu"));
+  CPPUNIT_ASSERT(material.hasProperty("lambda"));
+  CPPUNIT_ASSERT(material.hasProperty("density"));
+  CPPUNIT_ASSERT(material.hasProperty("reference_strain_rate"));
+  CPPUNIT_ASSERT(material.hasProperty("reference_stress"));
+  CPPUNIT_ASSERT(material.hasProperty("power_law_exponent"));
+  CPPUNIT_ASSERT(!material.hasProperty("aaa"));
+} // testHasProperty
+
+// ----------------------------------------------------------------------
+// Test hasStateVar().
+void
+pylith::materials::TestPowerLawPlaneStrain::testHasStateVar(void)
+{ // testHasStateVar
+  PowerLawPlaneStrain material;
+
+  CPPUNIT_ASSERT(material.hasStateVar("stress_zz_initial"));
+  CPPUNIT_ASSERT(material.hasStateVar("viscous_strain"));
+  CPPUNIT_ASSERT(material.hasStateVar("stress4"));
+  CPPUNIT_ASSERT(!material.hasStateVar("total_strain"));
+} // testHasStateVar
+
+
+// End of file 

Copied: short/3D/PyLith/trunk/unittests/libtests/materials/TestPowerLawPlaneStrain.hh (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/materials/TestPowerLawPlaneStrain.hh)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/materials/TestPowerLawPlaneStrain.hh	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/materials/TestPowerLawPlaneStrain.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -0,0 +1,123 @@
+// -*- 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/materials/TestPowerLawPlaneStrain.hh
+ *
+ * @brief C++ TestPowerLawPlaneStrain object
+ *
+ * C++ unit testing for PowerLawPlaneStrain.
+ */
+
+#if !defined(pylith_materials_testpowerlawplanestrain_hh)
+#define pylith_materials_testpowerlawplanestrain_hh
+
+#include "TestElasticMaterial.hh"
+
+/// Namespace for pylith package
+namespace pylith {
+  namespace materials {
+    class TestPowerLawPlaneStrain;
+    class PowerLawPlaneStrainElasticData;
+    class PowerLawPlaneStrainTimeDepData;
+  } // materials
+} // pylith
+
+/// C++ unit testing for PowerLawPlaneStrain
+class pylith::materials::TestPowerLawPlaneStrain : public TestElasticMaterial
+{ // class TestPowerLawPlaneStrain
+
+  // CPPUNIT TEST SUITE /////////////////////////////////////////////////
+  CPPUNIT_TEST_SUITE( TestPowerLawPlaneStrain );
+
+  CPPUNIT_TEST( testDimension );
+  CPPUNIT_TEST( testTensorSize );
+  CPPUNIT_TEST( testDBToProperties );
+  CPPUNIT_TEST( testNonDimProperties );
+  CPPUNIT_TEST( testDimProperties );
+  CPPUNIT_TEST( testDBToStateVars );
+  CPPUNIT_TEST( testNonDimStateVars );
+  CPPUNIT_TEST( testDimStateVars );
+  CPPUNIT_TEST( test_calcDensity );
+  CPPUNIT_TEST( test_stableTimeStepImplicit );
+
+  // Need to test Power Law viscoelastic specific behavior.
+  CPPUNIT_TEST( testTimeStep );
+  CPPUNIT_TEST( testUseElasticBehavior );
+  CPPUNIT_TEST( testHasStateVars );
+
+  CPPUNIT_TEST( test_calcStressElastic );
+  CPPUNIT_TEST( test_calcStressTimeDep );
+  CPPUNIT_TEST( test_calcElasticConstsElastic );
+  CPPUNIT_TEST( test_calcElasticConstsTimeDep );
+  CPPUNIT_TEST( test_updateStateVarsElastic );
+  CPPUNIT_TEST( test_updateStateVarsTimeDep );
+
+  CPPUNIT_TEST( testHasProperty );
+  CPPUNIT_TEST( testHasStateVar );
+
+  CPPUNIT_TEST_SUITE_END();
+
+  // PUBLIC METHODS /////////////////////////////////////////////////////
+public :
+
+  /// Setup testing data.
+  void setUp(void);
+
+  /// Test timeStep()
+  void testTimeStep(void);
+
+  /// Test useElasticBehavior()
+  void testUseElasticBehavior(void);
+
+  /// Test hasStateVars()
+  void testHasStateVars(void);
+
+  /// Test _calcStressElastic()
+  void test_calcStressElastic(void);
+
+  /// Test _calcElasticConstsElastic()
+  void test_calcElasticConstsElastic(void);
+
+  /// Test _updateStateVarsElastic()
+  void test_updateStateVarsElastic(void);
+
+  /// Test _calcStressTimeDep()
+  void test_calcStressTimeDep(void);
+
+  /// Test _calcElasticConstsTimeDep()
+  void test_calcElasticConstsTimeDep(void);
+
+  /// Test _updateStatevarsTimeDep()
+  void test_updateStateVarsTimeDep(void);
+
+  /// Test _stableTimeStepImplicit()
+  void test_stableTimeStepImplicit(void);
+
+  /// Test hasProperty()
+  void testHasProperty(void);
+
+  /// Test hasStateVar()
+  void testHasStateVar(void);
+
+}; // class TestPowerLawPlaneStrain
+
+#endif // pylith_materials_testpowerlawplanestrain_hh
+
+
+// End of file 

Copied: short/3D/PyLith/trunk/unittests/libtests/materials/data/PowerLawPlaneStrainElastic.py (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/materials/data/PowerLawPlaneStrainElastic.py)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/materials/data/PowerLawPlaneStrainElastic.py	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/materials/data/PowerLawPlaneStrainElastic.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -0,0 +1,287 @@
+#!/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/libtests/materials/data/PowerLawPlaneStrainElastic.py
+
+## @brief Python application for generating C++ data files for testing
+## C++ PowerLawPlaneStrain object with elastic behavior.
+
+from ElasticMaterialApp import ElasticMaterialApp
+
+import numpy
+
+# ----------------------------------------------------------------------
+dimension = 2
+numElasticConsts = 9
+tensorSize = 3
+
+# PowerLawPlaneStrainElastic class
+class PowerLawPlaneStrainElastic(ElasticMaterialApp):
+  """
+  Python application for generating C++ data files for testing C++
+  PowerLawPlaneStrain object with elastic behavior.
+  """
+  
+  # PUBLIC METHODS /////////////////////////////////////////////////////
+  
+  def __init__(self, name="powerlawplanestrainelastic"):
+    """
+    Constructor.
+    """
+    ElasticMaterialApp.__init__(self, name)
+
+    # import pdb
+    # pdb.set_trace()
+    numLocs = 2
+
+    self.dimension = dimension
+    self.numLocs = numLocs
+
+    self.dbPropertyValues = ["density", "vs", "vp",
+                             "reference-strain-rate", "reference-stress",
+                             "power-law-exponent"]
+    self.numPropertyValues = numpy.array([1, 1, 1, 1, 1, 1], dtype=numpy.int32)
+
+    self.dbStateVarValues = ["stress-zz-initial",
+                             "viscous-strain-xx",
+                             "viscous-strain-yy",
+                             "viscous-strain-zz",
+                             "viscous-strain-xy",
+                             "stress4-xx",
+                             "stress4-yy",
+                             "stress4-zz",
+                             "stress4-xy"
+                             ]
+    self.numStateVarValues = numpy.array([1, 4, 4], dtype=numpy.int32)
+
+    densityA = 2500.0
+    vsA = 3000.0
+    vpA = vsA*3**0.5
+    # Derive new values in based on previous value for power-law coefficient
+    # and viscosity coefficient.
+    powerLawCoeffA = 1.0/3.0e18
+    refStrainRateA = 1.0e-6
+    powerLawExponentA = 1.0
+    strainA = [1.1e-4, 1.2e-4, 1.4e-4]
+    initialStressA = [2.1e4, 2.2e4, 2.4e4]
+    initialStrainA = [3.1e-4, 3.2e-4, 3.4e-4]
+    muA = vsA*vsA*densityA
+    lambdaA = vpA*vpA*densityA - 2.0*muA
+    stressZZInitialA = numpy.array([1.0754e4], dtype=numpy.float64)
+
+    viscosityCoeffA = (1.0/((3.0**0.5)**(powerLawExponentA + 1.0) \
+                            * powerLawCoeffA))**(1.0/powerLawExponentA)
+    refStressA = viscosityCoeffA * \
+                 (2.0 * refStrainRateA) ** (1.0/powerLawExponentA)
+    # refStressA = (refStrainRateA/powerLawCoeffA)**(1.0/powerLawExponentA)
+    
+    densityB = 2000.0
+    vsB = 1200.0
+    vpB = vsB*3**0.5
+    powerLawCoeffB = 1.0/9.0e30
+    refStrainRateB = 1.0e-6
+    powerLawExponentB = 3.0
+    strainB = [4.1e-4, 4.2e-4, 4.4e-4]
+    initialStressB = [5.1e4, 5.2e4, 5.4e4]
+    initialStrainB = [6.1e-4, 6.2e-4, 6.4e-4]
+    muB = vsB*vsB*densityB
+    lambdaB = vpB*vpB*densityB - 2.0*muB
+    viscosityCoeffB = (1.0/((3.0**0.5)**(powerLawExponentB + 1.0) \
+                            * powerLawCoeffB))**(1.0/powerLawExponentB)
+    refStressB = viscosityCoeffB * \
+                 (2.0 * refStrainRateB) ** (1.0/powerLawExponentB)
+    # refStressB = (refStrainRateB/powerLawCoeffB)**(1.0/powerLawExponentB)
+    stressZZInitialB = numpy.array([2.575e4], dtype=numpy.float64)
+
+    self.lengthScale = 1.0e+3
+    self.pressureScale = muA
+    self.timeScale = 1.0
+    self.densityScale = 1.0e+3
+    self.strainRateScale = 1.0/self.timeScale
+
+    self.dbProperties = numpy.array([ [densityA, vsA, vpA, \
+                                       refStrainRateA, refStressA, \
+                                       powerLawExponentA],
+                                      [densityB, vsB, vpB, \
+                                       refStrainRateB, refStressB, \
+                                       powerLawExponentB] ], 
+                                    dtype=numpy.float64)
+    self.properties = numpy.array([ [densityA, muA, lambdaA, \
+                                     refStrainRateA, refStressA, \
+                                     powerLawExponentA],
+                                    [densityB, muB, lambdaB, \
+                                     refStrainRateB, refStressB, \
+                                     powerLawExponentB] ],
+                                     dtype=numpy.float64)
+
+    # TEMPORARY, need to determine how to use initial state variables
+    self.dbStateVars = numpy.zeros( (numLocs, 1 + 4 + 4),
+                                    dtype=numpy.float64)
+    self.dbStateVars[0,0] = stressZZInitialA
+    self.dbStateVars[1,0] = stressZZInitialB
+
+    self.stateVars = numpy.zeros( (numLocs, 1 + 4 + 4), dtype=numpy.float64)
+    self.stateVars[0,0] = stressZZInitialA
+    self.stateVars[1,0] = stressZZInitialB
+
+    mu0 = self.pressureScale
+    density0 = self.densityScale
+    time0 = self.timeScale
+    strainRate0 = self.strainRateScale
+    self.propertiesNondim = \
+        numpy.array([ [densityA/density0, muA/mu0, lambdaA/mu0, \
+                       refStrainRateA/strainRate0, refStressA/mu0, \
+                       powerLawExponentA],
+                      [densityB/density0, muB/mu0, lambdaB/mu0, \
+                       refStrainRateB/strainRate0, refStressB/mu0, \
+                       powerLawExponentB] ],
+                    dtype=numpy.float64)
+
+    stressZZInitialANondim = stressZZInitialA/mu0
+    stressZZInitialBNondim = stressZZInitialB/mu0
+    
+    self.stateVarsNondim = numpy.zeros( (numLocs, 1 + 4 + 4),
+                                        dtype=numpy.float64)
+    self.stateVarsNondim[0, 0] = stressZZInitialANondim
+    self.stateVarsNondim[1, 0] = stressZZInitialBNondim
+
+    self.initialStress = numpy.array([initialStressA,
+                                      initialStressB],
+                                    dtype=numpy.float64)
+    self.initialStrain = numpy.array([initialStrainA,
+                                      initialStrainB],
+                                    dtype=numpy.float64)
+    
+    self.density = numpy.array([densityA,
+                                densityB],
+                               dtype=numpy.float64)
+
+    self.strain = numpy.array([strainA,
+                               strainB],
+                               dtype=numpy.float64)
+    
+    self.stress = numpy.zeros( (numLocs, tensorSize), dtype=numpy.float64)
+    self.elasticConsts = numpy.zeros( (self.numLocs, numElasticConsts), \
+                                        dtype=numpy.float64)
+
+    (self.elasticConsts[0,:], self.stress[0,:]) = \
+        self._calcStress(strainA, muA, lambdaA, \
+                           initialStressA, initialStrainA)
+    (self.elasticConsts[1,:], self.stress[1,:]) = \
+        self._calcStress(strainB, muB, lambdaB, \
+                           initialStressB, initialStrainB)
+
+    viscousStrainUpdated = numpy.zeros((numLocs, 4), dtype=numpy.float64)
+
+    stressUpdated = numpy.zeros((numLocs, 4), dtype=numpy.float64)
+    stressUpdated[0,0] = self.stress[0,0]
+    stressUpdated[1,0] = self.stress[1,0]
+    stressUpdated[0,1] = self.stress[0,1]
+    stressUpdated[1,1] = self.stress[1,1]
+    stressUpdated[0,3] = self.stress[0,2]
+    stressUpdated[1,3] = self.stress[1,2]
+    stressUpdated[0,2] = lambdaA * (strainA[0] + strainA[1]) + stressZZInitialA
+    stressUpdated[1,2] = lambdaB * (strainB[0] + strainB[1]) + stressZZInitialB
+    
+    self.stateVarsUpdated = numpy.zeros( (numLocs, 1 + 4 + 4),
+                                         dtype=numpy.float64)
+    self.stateVarsUpdated[0,0] = stressZZInitialA
+    self.stateVarsUpdated[1,0] = stressZZInitialB
+    self.stateVarsUpdated[0,5:9] = stressUpdated[0,:]
+    self.stateVarsUpdated[1,5:9] = stressUpdated[1,:]
+
+    maxwellTimeA = self._getMaxwellTime(muA, refStrainRateA, refStressA,
+                                        powerLawExponentA,
+                                        stressUpdated[0,:])
+    maxwellTimeB = self._getMaxwellTime(muB, refStrainRateB, refStressB,
+                                        powerLawExponentB,
+                                        stressUpdated[1,:])
+
+
+    self.dtStableImplicit = 0.1*min(maxwellTimeA, maxwellTimeB)
+    return
+
+
+  def _scalarProduct(self, tensor1, tensor2):
+    """
+    Compute the scalar product of two tensors stored in vector form.
+    """
+    scalarProduct = tensor1[0] * tensor2[0] + \
+                    tensor1[1] * tensor2[1] + \
+                    tensor1[2] * tensor2[2] + \
+                    2.0 * tensor1[3] * tensor2[3]
+    return scalarProduct
+
+    
+  def _getMaxwellTime(self, mu, refStrainRate, refStress, powerLawExponent,
+                      stress4):
+    """
+    Compute Maxwell time from stress4, viscosity coefficient, shear modulus, and
+    power-law exponent.
+    """
+    meanStress = (stress4[0] + stress4[1] + stress4[2])/3.0
+    devStress = numpy.array(stress4, dtype=numpy.float64)
+    
+    devStress[0] = stress4[0] - meanStress
+    devStress[1] = stress4[1] - meanStress
+    devStress[2] = stress4[2] - meanStress
+
+    devStressProd = self._scalarProduct(devStress, devStress)
+    effStress = (0.5 * devStressProd)**0.5
+    maxwellTime = 1.0
+    if (effStress != 0.0):
+      maxwellTime = 0.5 * (refStress/effStress)**(powerLawExponent - 1.0) * \
+                    (refStress/mu)/refStrainRate
+
+    return maxwellTime
+
+  def _calcStress(self, strainV, muV, lambdaV, initialStressV, initialStrainV):
+    """
+    Compute stress and derivative of elasticity matrix.
+    """
+    C1111 = lambdaV + 2.0*muV
+    C1122 = lambdaV
+    C1112 = 0.0
+    C2211 = lambdaV
+    C2222 = lambdaV + 2.0*muV
+    C2212 = 0.0
+    C1211 = 0.0
+    C1222 = 0.0
+    C1212 = 2.0*muV
+    elasticConsts = numpy.array([C1111, C1122, C1112,
+                                 C2211, C2222, C2212,
+                                 C1211, C1222, C1212], dtype=numpy.float64)
+
+    strain = numpy.reshape(strainV, (tensorSize,1))
+    initialStress = numpy.reshape(initialStressV, (tensorSize,1))
+    initialStrain = numpy.reshape(initialStrainV, (tensorSize,1))
+    elastic = numpy.array([ [C1111, C1122, C1112],
+                            [C2211, C2222, C2212],
+                            [C1211, C1222, C1212] ], dtype=numpy.float64)
+    stress = numpy.dot(elastic, strain-initialStrain) + initialStress
+    return (elasticConsts, numpy.ravel(stress))
+  
+
+# MAIN /////////////////////////////////////////////////////////////////
+if __name__ == "__main__":
+
+  app = PowerLawPlaneStrainElastic()
+  app.run()
+
+
+# End of file 

Copied: short/3D/PyLith/trunk/unittests/libtests/materials/data/PowerLawPlaneStrainElasticData.cc (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/materials/data/PowerLawPlaneStrainElasticData.cc)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/materials/data/PowerLawPlaneStrainElasticData.cc	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/materials/data/PowerLawPlaneStrainElasticData.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -0,0 +1,315 @@
+// -*- 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.
+//
+// ======================================================================
+//
+
+// DO NOT EDIT THIS FILE
+// This file was generated from python application powerlawplanestrainelastic.
+
+#include "PowerLawPlaneStrainElasticData.hh"
+
+const int pylith::materials::PowerLawPlaneStrainElasticData::_dimension = 2;
+
+const int pylith::materials::PowerLawPlaneStrainElasticData::_numLocs = 2;
+
+const int pylith::materials::PowerLawPlaneStrainElasticData::_numProperties = 6;
+
+const int pylith::materials::PowerLawPlaneStrainElasticData::_numStateVars = 3;
+
+const int pylith::materials::PowerLawPlaneStrainElasticData::_numDBProperties = 6;
+
+const int pylith::materials::PowerLawPlaneStrainElasticData::_numDBStateVars = 9;
+
+const int pylith::materials::PowerLawPlaneStrainElasticData::_numPropsQuadPt = 6;
+
+const int pylith::materials::PowerLawPlaneStrainElasticData::_numVarsQuadPt = 9;
+
+const PylithScalar pylith::materials::PowerLawPlaneStrainElasticData::_lengthScale =   1.00000000e+03;
+
+const PylithScalar pylith::materials::PowerLawPlaneStrainElasticData::_timeScale =   1.00000000e+00;
+
+const PylithScalar pylith::materials::PowerLawPlaneStrainElasticData::_pressureScale =   2.25000000e+10;
+
+const PylithScalar pylith::materials::PowerLawPlaneStrainElasticData::_densityScale =   1.00000000e+03;
+
+const PylithScalar pylith::materials::PowerLawPlaneStrainElasticData::_dtStableImplicit =   4.09893495e+06;
+
+const int pylith::materials::PowerLawPlaneStrainElasticData::_numPropertyValues[] = {
+1,
+1,
+1,
+1,
+1,
+1,
+};
+
+const int pylith::materials::PowerLawPlaneStrainElasticData::_numStateVarValues[] = {
+1,
+4,
+4,
+};
+
+const char* pylith::materials::PowerLawPlaneStrainElasticData::_dbPropertyValues[] = {
+"density",
+"vs",
+"vp",
+"reference-strain-rate",
+"reference-stress",
+"power-law-exponent",
+};
+
+const char* pylith::materials::PowerLawPlaneStrainElasticData::_dbStateVarValues[] = {
+"stress-zz-initial",
+"viscous-strain-xx",
+"viscous-strain-yy",
+"viscous-strain-zz",
+"viscous-strain-xy",
+"stress4-xx",
+"stress4-yy",
+"stress4-zz",
+"stress4-xy",
+};
+
+const PylithScalar pylith::materials::PowerLawPlaneStrainElasticData::_dbProperties[] = {
+  2.50000000e+03,
+  3.00000000e+03,
+  5.19615242e+03,
+  1.00000000e-06,
+  2.00000000e+12,
+  1.00000000e+00,
+  2.00000000e+03,
+  1.20000000e+03,
+  2.07846097e+03,
+  1.00000000e-06,
+  1.25992105e+08,
+  3.00000000e+00,
+};
+
+const PylithScalar pylith::materials::PowerLawPlaneStrainElasticData::_dbStateVars[] = {
+  1.07540000e+04,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  2.57500000e+04,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+};
+
+const PylithScalar pylith::materials::PowerLawPlaneStrainElasticData::_properties[] = {
+  2.50000000e+03,
+  2.25000000e+10,
+  2.25000000e+10,
+  1.00000000e-06,
+  2.00000000e+12,
+  1.00000000e+00,
+  2.00000000e+03,
+  2.88000000e+09,
+  2.88000000e+09,
+  1.00000000e-06,
+  1.25992105e+08,
+  3.00000000e+00,
+};
+
+const PylithScalar pylith::materials::PowerLawPlaneStrainElasticData::_stateVars[] = {
+  1.07540000e+04,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  2.57500000e+04,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+};
+
+const PylithScalar pylith::materials::PowerLawPlaneStrainElasticData::_propertiesNondim[] = {
+  2.50000000e+00,
+  1.00000000e+00,
+  1.00000000e+00,
+  1.00000000e-06,
+  8.88888889e+01,
+  1.00000000e+00,
+  2.00000000e+00,
+  1.28000000e-01,
+  1.28000000e-01,
+  1.00000000e-06,
+  5.59964911e-03,
+  3.00000000e+00,
+};
+
+const PylithScalar pylith::materials::PowerLawPlaneStrainElasticData::_stateVarsNondim[] = {
+  4.77955556e-07,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  1.14444444e-06,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+};
+
+const PylithScalar pylith::materials::PowerLawPlaneStrainElasticData::_density[] = {
+  2.50000000e+03,
+  2.00000000e+03,
+};
+
+const PylithScalar pylith::materials::PowerLawPlaneStrainElasticData::_strain[] = {
+  1.10000000e-04,
+  1.20000000e-04,
+  1.40000000e-04,
+  4.10000000e-04,
+  4.20000000e-04,
+  4.40000000e-04,
+};
+
+const PylithScalar pylith::materials::PowerLawPlaneStrainElasticData::_stress[] = {
+ -1.79790000e+07,
+ -1.79780000e+07,
+ -8.97600000e+06,
+ -2.25300000e+06,
+ -2.25200000e+06,
+ -1.09800000e+06,
+};
+
+const PylithScalar pylith::materials::PowerLawPlaneStrainElasticData::_elasticConsts[] = {
+  6.75000000e+10,
+  2.25000000e+10,
+  0.00000000e+00,
+  2.25000000e+10,
+  6.75000000e+10,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  4.50000000e+10,
+  8.64000000e+09,
+  2.88000000e+09,
+  0.00000000e+00,
+  2.88000000e+09,
+  8.64000000e+09,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  5.76000000e+09,
+};
+
+const PylithScalar pylith::materials::PowerLawPlaneStrainElasticData::_initialStress[] = {
+  2.10000000e+04,
+  2.20000000e+04,
+  2.40000000e+04,
+  5.10000000e+04,
+  5.20000000e+04,
+  5.40000000e+04,
+};
+
+const PylithScalar pylith::materials::PowerLawPlaneStrainElasticData::_initialStrain[] = {
+  3.10000000e-04,
+  3.20000000e-04,
+  3.40000000e-04,
+  6.10000000e-04,
+  6.20000000e-04,
+  6.40000000e-04,
+};
+
+const PylithScalar pylith::materials::PowerLawPlaneStrainElasticData::_stateVarsUpdated[] = {
+  1.07540000e+04,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+ -1.79790000e+07,
+ -1.79780000e+07,
+  5.18575400e+06,
+ -8.97600000e+06,
+  2.57500000e+04,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+ -2.25300000e+06,
+ -2.25200000e+06,
+  2.41615000e+06,
+ -1.09800000e+06,
+};
+
+pylith::materials::PowerLawPlaneStrainElasticData::PowerLawPlaneStrainElasticData(void)
+{ // constructor
+  dimension = _dimension;
+  numLocs = _numLocs;
+  numProperties = _numProperties;
+  numStateVars = _numStateVars;
+  numDBProperties = _numDBProperties;
+  numDBStateVars = _numDBStateVars;
+  numPropsQuadPt = _numPropsQuadPt;
+  numVarsQuadPt = _numVarsQuadPt;
+  lengthScale = _lengthScale;
+  timeScale = _timeScale;
+  pressureScale = _pressureScale;
+  densityScale = _densityScale;
+  dtStableImplicit = _dtStableImplicit;
+  numPropertyValues = const_cast<int*>(_numPropertyValues);
+  numStateVarValues = const_cast<int*>(_numStateVarValues);
+  dbPropertyValues = const_cast<char**>(_dbPropertyValues);
+  dbStateVarValues = const_cast<char**>(_dbStateVarValues);
+  dbProperties = const_cast<PylithScalar*>(_dbProperties);
+  dbStateVars = const_cast<PylithScalar*>(_dbStateVars);
+  properties = const_cast<PylithScalar*>(_properties);
+  stateVars = const_cast<PylithScalar*>(_stateVars);
+  propertiesNondim = const_cast<PylithScalar*>(_propertiesNondim);
+  stateVarsNondim = const_cast<PylithScalar*>(_stateVarsNondim);
+  density = const_cast<PylithScalar*>(_density);
+  strain = const_cast<PylithScalar*>(_strain);
+  stress = const_cast<PylithScalar*>(_stress);
+  elasticConsts = const_cast<PylithScalar*>(_elasticConsts);
+  initialStress = const_cast<PylithScalar*>(_initialStress);
+  initialStrain = const_cast<PylithScalar*>(_initialStrain);
+  stateVarsUpdated = const_cast<PylithScalar*>(_stateVarsUpdated);
+} // constructor
+
+pylith::materials::PowerLawPlaneStrainElasticData::~PowerLawPlaneStrainElasticData(void)
+{}
+
+
+// End of file

Copied: short/3D/PyLith/trunk/unittests/libtests/materials/data/PowerLawPlaneStrainElasticData.hh (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/materials/data/PowerLawPlaneStrainElasticData.hh)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/materials/data/PowerLawPlaneStrainElasticData.hh	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/materials/data/PowerLawPlaneStrainElasticData.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -0,0 +1,110 @@
+// -*- 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.
+//
+// ======================================================================
+//
+
+// DO NOT EDIT THIS FILE
+// This file was generated from python application powerlawplanestrainelastic.
+
+#if !defined(pylith_materials_powerlawplanestrainelasticdata_hh)
+#define pylith_materials_powerlawplanestrainelasticdata_hh
+
+#include "ElasticMaterialData.hh"
+
+namespace pylith {
+  namespace materials {
+     class PowerLawPlaneStrainElasticData;
+  } // pylith
+} // materials
+
+class pylith::materials::PowerLawPlaneStrainElasticData : public ElasticMaterialData
+{
+
+public: 
+
+  /// Constructor
+  PowerLawPlaneStrainElasticData(void);
+
+  /// Destructor
+  ~PowerLawPlaneStrainElasticData(void);
+
+private:
+
+  static const int _dimension;
+
+  static const int _numLocs;
+
+  static const int _numProperties;
+
+  static const int _numStateVars;
+
+  static const int _numDBProperties;
+
+  static const int _numDBStateVars;
+
+  static const int _numPropsQuadPt;
+
+  static const int _numVarsQuadPt;
+
+  static const PylithScalar _lengthScale;
+
+  static const PylithScalar _timeScale;
+
+  static const PylithScalar _pressureScale;
+
+  static const PylithScalar _densityScale;
+
+  static const PylithScalar _dtStableImplicit;
+
+  static const int _numPropertyValues[];
+
+  static const int _numStateVarValues[];
+
+  static const char* _dbPropertyValues[];
+
+  static const char* _dbStateVarValues[];
+
+  static const PylithScalar _dbProperties[];
+
+  static const PylithScalar _dbStateVars[];
+
+  static const PylithScalar _properties[];
+
+  static const PylithScalar _stateVars[];
+
+  static const PylithScalar _propertiesNondim[];
+
+  static const PylithScalar _stateVarsNondim[];
+
+  static const PylithScalar _density[];
+
+  static const PylithScalar _strain[];
+
+  static const PylithScalar _stress[];
+
+  static const PylithScalar _elasticConsts[];
+
+  static const PylithScalar _initialStress[];
+
+  static const PylithScalar _initialStrain[];
+
+  static const PylithScalar _stateVarsUpdated[];
+
+};
+
+#endif // pylith_materials_powerlawplanestrainelasticdata_hh
+
+// End of file

Copied: short/3D/PyLith/trunk/unittests/libtests/materials/data/PowerLawPlaneStrainTimeDep.py (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/materials/data/PowerLawPlaneStrainTimeDep.py)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/materials/data/PowerLawPlaneStrainTimeDep.py	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/materials/data/PowerLawPlaneStrainTimeDep.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -0,0 +1,517 @@
+#!/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/libtests/materials/data/PowerLawPlaneStrainTimeDep.py
+
+## @brief Python application for generating C++ data files for testing
+## C++ PowerLawPlaneStrain object with viscoelastic behavior.
+
+from ElasticMaterialApp import ElasticMaterialApp
+
+import numpy
+
+# ----------------------------------------------------------------------
+dimension = 2
+numElasticConsts = 9
+tensorSize = 3
+
+# PowerLawPlaneStrainTimeDep class
+class PowerLawPlaneStrainTimeDep(ElasticMaterialApp):
+  """
+  Python application for generating C++ data files for testing C++
+  PowerLawPlaneStrain object using viscoelastic behavior.
+  """
+  
+  # PUBLIC METHODS /////////////////////////////////////////////////////
+  
+  def __init__(self, name="powerlawplanestraintimedep"):
+    """
+    Constructor.
+    """
+    ElasticMaterialApp.__init__(self, name)
+
+    # import pdb
+    # pdb.set_trace()
+
+    numLocs = 2
+
+    self.dimension = dimension
+    self.numLocs = numLocs
+
+    self.dbPropertyValues = ["density", "vs", "vp",
+                             "reference-strain-rate", "reference-stress",
+                             "power-law-exponent"]
+    self.propertyValues = ["density", "mu", "lambda",
+                           "reference-strain-rate", "reference-stress",
+                           "power-law-exponent"]
+    self.numPropertyValues = numpy.array([1, 1, 1, 1, 1, 1], dtype=numpy.int32)
+
+    self.dbStateVarValues = ["stress-zz-initial",
+                             "viscous-strain-xx",
+                             "viscous-strain-yy",
+                             "viscous-strain-zz",
+                             "viscous-strain-xy",
+                             "stress4-xx",
+                             "stress4-yy",
+                             "stress4-zz",
+                             "stress4-xy"
+                             ]
+    self.numStateVarValues = numpy.array([1, 4, 4], dtype=numpy.int32)
+
+    self.alpha = 0.5
+    self.dt = 2.0e5
+
+    densityA = 2500.0
+    vsA = 3000.0
+    vpA = vsA*3**0.5
+    powerLawCoeffA = 1.0/3.0e18
+    refStrainRateA = 1.0e-6
+    powerLawExponentA = 1.0
+    strainA = [1.1e-4, 1.2e-4, 1.4e-4]
+    initialStressA = [2.1e4, 2.2e4, 2.4e4]
+    initialStrainA = [3.6e-5, 3.5e-5, 3.3e-5]
+    muA = vsA*vsA*densityA
+    lambdaA = vpA*vpA*densityA - 2.0*muA
+    viscosityCoeffA = (1.0/((3.0**0.5)**(powerLawExponentA + 1.0) \
+                            * powerLawCoeffA))**(1.0/powerLawExponentA)
+    refStressA = viscosityCoeffA * \
+                 (2.0 * refStrainRateA) ** (1.0/powerLawExponentA)
+    stressZZInitialA = 2.3e4
+
+    densityB = 2000.0
+    vsB = 1200.0
+    vpB = vsB*3**0.5
+    powerLawCoeffB = 1.0/9.0e36
+    refStrainRateB = 1.0e-6
+    powerLawExponentB = 3.0
+    strainB = [4.1e-4, 4.2e-4, 4.4e-4]
+    initialStressB = [5.1e4, 5.2e4, 5.4e4]
+    initialStrainB = [6.1e-5, 6.2e-5, 6.6e-5]
+    muB = vsB*vsB*densityB
+    lambdaB = vpB*vpB*densityB - 2.0*muB
+    viscosityCoeffB = (1.0/((3.0**0.5)**(powerLawExponentB + 1.0) \
+                            * powerLawCoeffB))**(1.0/powerLawExponentB)
+    refStressB = viscosityCoeffB * \
+                 (2.0 * refStrainRateB) ** (1.0/powerLawExponentB)
+    stressZZInitialB = 5.3e4
+
+    self.lengthScale = 1.0e+3
+    self.pressureScale = muA
+    self.timeScale = 1.0
+    self.densityScale = 1.0e+3
+    self.strainRateScale = 1.0/self.timeScale
+
+    self.dbProperties = numpy.array([ [densityA, vsA, vpA, \
+                                       refStrainRateA, refStressA, \
+                                       powerLawExponentA],
+                                      [densityB, vsB, vpB, \
+                                       refStrainRateB, refStressB, \
+                                       powerLawExponentB] ], 
+                                    dtype=numpy.float64)
+    self.properties = numpy.array([ [densityA, muA, lambdaA, \
+                                     refStrainRateA, refStressA, \
+                                     powerLawExponentA],
+                                    [densityB, muB, lambdaB, \
+                                     refStrainRateB, refStressB, \
+                                     powerLawExponentB] ],
+                                  dtype=numpy.float64)
+
+    # TEMPORARY, need to determine how to use initial state variables
+    self.dbStateVars = numpy.zeros( (numLocs, tensorSize),
+                                    dtype=numpy.float64)
+    self.dbStateVars[0, 0] = stressZZInitialA
+    self.dbStateVars[1, 0] = stressZZInitialB
+
+    mu0 = self.pressureScale
+    density0 = self.densityScale
+    time0 = self.timeScale
+    strainRate0 = self.strainRateScale
+    self.propertiesNondim = \
+                          numpy.array([ [densityA/density0, muA/mu0, \
+                                         lambdaA/mu0, \
+                                         refStrainRateA/strainRate0, \
+                                         refStressA/mu0, \
+                                         powerLawExponentA], \
+                                        [densityB/density0, muB/mu0, \
+                                         lambdaB/mu0, \
+                                         refStrainRateB/strainRate0, \
+                                         refStressB/mu0, \
+                                         powerLawExponentB] ], \
+                                      dtype=numpy.float64)
+
+    self.initialStress = numpy.array([initialStressA,
+                                      initialStressB],
+                                    dtype=numpy.float64)
+    self.initialStrain = numpy.array([initialStrainA,
+                                      initialStrainB],
+                                    dtype=numpy.float64)
+    
+    self.density = numpy.array([densityA,
+                                densityB],
+                               dtype=numpy.float64)
+
+    # Define state variables
+    visStrainA = numpy.array([4.1e-5, 4.2e-5, 4.3e-5, 4.4e-5],
+                             dtype=numpy.float64)
+    visStrainB = numpy.array([1.1e-5, 1.2e-5, 1.3e-5, 1.4e-5],
+                             dtype=numpy.float64)
+    stress4A = numpy.array([3.1e4, 3.2e4, 3.3e4, 3.4e4], dtype=numpy.float64)
+    stress4B = numpy.array([5.1e4, 5.2e4, 5.3e4, 5.4e4], dtype=numpy.float64)
+    stressNondimA = stress4A/mu0
+    stressNondimB = stress4B/mu0
+    stressZZInitialANondim = stressZZInitialA/mu0
+    stressZZInitialBNondim = stressZZInitialB/mu0
+
+    stateVarsA = numpy.concatenate(([stressZZInitialA], visStrainA, stress4A))
+    stateVarsB = numpy.concatenate(([stressZZInitialB], visStrainB, stress4B))
+    self.stateVars = numpy.array((stateVarsA, stateVarsB), dtype=numpy.float64)
+
+    stateVarsNondimA = numpy.concatenate(([stressZZInitialANondim], visStrainA,
+                                          stressNondimA))
+    stateVarsNondimB = numpy.concatenate(([stressZZInitialBNondim], visStrainB,
+                                          stressNondimB))
+    self.stateVarsNondim = numpy.array((stateVarsNondimA, stateVarsNondimB),
+                                       dtype=numpy.float64)
+    
+    self.strain = numpy.array([strainA, strainB],
+                               dtype=numpy.float64)
+    self.stress = numpy.zeros( (numLocs, tensorSize), dtype=numpy.float64)
+    self.stateVarsUpdated = numpy.zeros( (numLocs, 1 + 4 + 4),
+                                         dtype=numpy.float64)
+    self.elasticConsts = numpy.zeros( (self.numLocs, numElasticConsts),
+                                      dtype=numpy.float64)
+
+    (self.elasticConsts[0,:], self.stress[0,:], self.stateVarsUpdated[0,:]) = \
+                              self._calcStress(strainA, 
+                                               muA, lambdaA, refStrainRateA,
+                                               refStressA,
+                                               powerLawExponentA,
+                                               visStrainA, stress4A,
+                                               initialStressA, initialStrainA,
+                                               stateVarsA)
+    (self.elasticConsts[1,:], self.stress[1,:], self.stateVarsUpdated[1,:]) = \
+                              self._calcStress(strainB, 
+                                               muB, lambdaB, refStrainRateB, 
+                                               refStressB,
+                                               powerLawExponentB,
+                                               visStrainB, stress4B,
+                                               initialStressB, initialStrainB,
+                                               stateVarsB)
+
+    # Use state variables to compute Maxwell times (and stable time step size).
+    maxwellTimeA = self._getMaxwellTime(muA, refStrainRateA, refStressA, \
+                                        powerLawExponentA,
+                                        self.stateVarsUpdated[0,5:])
+
+    maxwellTimeB = self._getMaxwellTime(muB, refStrainRateB, refStressB, \
+                                        powerLawExponentB,
+                                        self.stateVarsUpdated[1,5:])
+
+    self.dtStableImplicit = 0.1*min(maxwellTimeA, maxwellTimeB)
+    return
+
+
+  def _bracket(self, effStressInitialGuess, ae, b, c, d, alpha, dt, effStressT,
+               powerLawExponentV, refStrainRateV, refStressV):
+    """
+    Function to bracket the effective stress.
+    """
+    maxIterations = 50
+    bracketFactor = 1.6
+
+    x1 = 0.0
+    x2 = 0.0
+
+    if effStressInitialGuess > 0.0:
+      x1 = effStressInitialGuess - 0.5 * effStressInitialGuess
+      x2 = effStressInitialGuess + 0.5 * effStressInitialGuess
+    else:
+      x1 = 500.0
+      x2 = 1500.0
+
+    funcValue1 = self._effStressFunc(x1, ae, b, c, d, alpha, dt,
+                                     effStressT, powerLawExponentV,
+                                     refStrainRateV, refStressV)
+    funcValue2 = self._effStressFunc(x2, ae, b, c, d, alpha, dt,
+                                     effStressT, powerLawExponentV,
+                                     refStrainRateV, refStressV)
+
+    iteration = 0
+    bracketed = False
+
+    while iteration < maxIterations:
+      if (funcValue1 * funcValue2) < 0.0:
+        bracketed = True
+        break
+      if abs(funcValue1) < abs(funcValue2):
+        x1 += bracketFactor * (x1 - x2)
+        x1 = max(x1, 0.0)
+
+        funcValue1 = self._effStressFunc(x1, ae, b, c, d, alpha, dt,
+                                         effStressT, powerLawExponentV,
+                                         refStrainRateV, refStressV)
+      else:
+        x2 += bracketFactor * (x1 - x2)
+        x2 = max(x2, 0.0)
+
+        funcValue2 = self._effStressFunc(x2, ae, b, c, d, alpha, dt,
+                                         effStressT, powerLawExponentV,
+                                         refStrainRateV, refStressV)
+      iteration += 1
+
+    if bracketed == False:
+      raise RuntimeError("Unable to bracket root.")
+
+    return x1, x2
+    
+    
+  def _getMaxwellTime(self, mu, refStrainRate, refStress, powerLawExponent,
+                      stress4):
+    """
+    Compute Maxwell time from stress, reference stress and strain rate, shear
+    modulus, and power-law exponent.
+    """
+    meanStress = (stress4[0] + stress4[1] + stress4[2])/3.0
+    devStress = numpy.array(stress4, dtype=numpy.float64)
+    
+    devStress[0] = stress4[0] - meanStress
+    devStress[1] = stress4[1] - meanStress
+    devStress[2] = stress4[2] - meanStress
+    devStress[3] = stress4[3]
+
+    devStressProd = self._scalarProduct(devStress, devStress)
+    effStress = (0.5 * devStressProd)**0.5
+    maxwellTime = 1.0
+    if (effStress != 0.0):
+      maxwellTime = 0.5 * (refStress/effStress)**(powerLawExponent - 1.0) * \
+                    (refStress/mu)/refStrainRate
+
+    return maxwellTime
+
+
+  def _scalarProduct(self, tensor1, tensor2):
+    """
+    Compute the scalar product of two tensors stored in vector form.
+    """
+    scalarProduct = tensor1[0] * tensor2[0] + \
+                    tensor1[1] * tensor2[1] + \
+                    tensor1[2] * tensor2[2] + \
+                    2.0 * tensor1[3] * tensor2[3]
+    return scalarProduct
+
+    
+  def _calcStressComponent(self, strainVal, strainComp, stressComp, strainTpdt,
+                           muV, lambdaV, refStrainRateV, refStressV,
+                           powerLawExponentV, visStrainT, stressT,
+                           initialStress, initialStrain, stateVars):
+    """
+    Function to compute a particular stress component as a function of a
+    strain component.
+    """
+    strainTest = numpy.array(strainTpdt, dtype=numpy.float64)
+    strainTest[strainComp] = strainVal
+    stressTpdt, visStrainTpdt = self._computeStress(strainTest, muV, lambdaV,
+                                                    refStrainRateV,
+                                                    refStressV,
+                                                    powerLawExponentV,
+                                                    visStrainT,
+                                                    stressT,
+                                                    initialStress,
+                                                    initialStrain,
+                                                    stateVars)
+    return stressTpdt[stressComp]
+
+
+  def _effStressFunc(self, effStressTpdt, ae, b, c, d, alpha, dt, effStressT,
+                     powerLawExponentV, refStrainRateV, refStressV):
+    """
+    Function to compute effective stress function for a given effective stress.
+    """
+
+    factor1 = 1.0 - alpha
+    effStressTau = factor1 * effStressT + alpha * effStressTpdt
+    gammaTau = refStrainRateV * (effStressTau/refStressV)** \
+               (powerLawExponentV - 1.0) / refStressV
+    a = ae + alpha * dt * gammaTau
+    effStressFunc = a * a * effStressTpdt * effStressTpdt - b + \
+                    c * gammaTau - d * d * gammaTau * gammaTau
+
+    return effStressFunc
+
+    
+  def _computeStress(self, strainTpdt, muV, lambdaV, refStrainRateV, refStressV,
+                     powerLawExponentV, visStrainT, stressT,
+                     initialStress, initialStrain, stateVars):
+    """
+    Function to compute stresses and viscous strains using the
+    effective stress function algorithm.
+    """
+    import scipy.optimize
+    
+    # Constants
+    mu2 = 2.0 * muV
+    lamPlusMu = lambdaV + muV
+    bulkModulus = lambdaV + 2.0 * muV/3.0
+    ae = 1.0/mu2
+    timeFac = self.dt * (1.0 - self.alpha)
+    diag = numpy.array([1.0, 1.0, 1.0, 0.0], dtype=numpy.float64)
+
+    # Initial stress values
+    initialStress4 = numpy.array([initialStress[0], initialStress[1],
+                                  stateVars[0], initialStress[2]],
+                                 dtype=numpy.float64)
+    meanStressInitial = (initialStress4[0] + initialStress4[1] +
+                         initialStress4[3])/3.0
+    devStressInitial = initialStress4 - meanStressInitial * diag
+    stressInvar2Initial = 0.5 * self._scalarProduct(devStressInitial,
+                                                    devStressInitial)
+    
+    # Initial strain values
+    initialStrain4 = numpy.array([initialStrain[0], initialStrain[1],
+                                 0.0, initialStrain[2]], dtype=numpy.float64)
+    meanStrainInitial = (initialStrain[0] + initialStrain[1])/3.0
+
+    # Values for current time step
+    strainTpdt4 = numpy.array([strainTpdt[0], strainTpdt[1],
+                                 0.0, strainTpdt[2]], dtype=numpy.float64)
+    meanStrainTpdt = (strainTpdt[0] + strainTpdt[1])/3.0 - meanStrainInitial
+    meanStressTpdt = 3.0 * bulkModulus * meanStrainTpdt
+    strainPPTpdt = strainTpdt4 - meanStrainTpdt * diag - \
+                   visStrainT - initialStrain4
+    strainPPInvar2Tpdt = 0.5 * self._scalarProduct(strainPPTpdt, strainPPTpdt)
+
+    # Values for previous time step
+    meanStressT = (stressT[0] + stressT[1] + stressT[2])/3.0
+    devStressT = stressT - diag * meanStressT
+    stressInvar2T = 0.5 * self._scalarProduct(devStressT, devStressT)
+    effStressT = stressInvar2T**0.5
+
+    # Finish defining parameters needed for root-finding algorithm.
+    b = strainPPInvar2Tpdt + \
+        ae * self._scalarProduct(strainPPTpdt, devStressInitial) + \
+        ae * ae * stressInvar2Initial
+    c = (self._scalarProduct(strainPPTpdt, devStressT) + \
+         ae * self._scalarProduct(devStressT, devStressInitial))  * timeFac
+    d = timeFac * effStressT
+
+    # Bracket the root
+    effStressInitialGuess = effStressT
+
+    x1, x2 = self._bracket(effStressInitialGuess, ae, b, c, d, self.alpha,
+                           self.dt, effStressT, powerLawExponentV,
+                           refStrainRateV, refStressV)
+
+    # Find the root using Brent's method (from scipy)
+    rootTolerance = 1.0e-14
+    effStressTpdt = scipy.optimize.brentq(self._effStressFunc, x1, x2,
+                                          args=(ae, b, c, d, self.alpha,
+                                                self.dt, effStressT,
+                                                powerLawExponentV,
+                                                refStrainRateV, refStressV),
+                                          xtol=rootTolerance)
+    
+    # Compute stresses from the effective stress.
+    effStressTau = (1.0 - self.alpha) * effStressT + self.alpha * effStressTpdt
+    gammaTau = refStrainRateV * ((effStressTau/refStressV)** \
+                      (powerLawExponentV - 1.0)) / refStressV
+    factor1 = 1.0/(ae + self.alpha * self.dt * gammaTau)
+    factor2 = timeFac * gammaTau
+    devStressTpdt = 0.0
+    stressTpdt = numpy.zeros( (4), dtype=numpy.float64)
+    visStrainTpdt = numpy.zeros( (4), dtype=numpy.float64)
+
+    for iComp in range(4):
+      devStressTpdt = factor1 * (strainPPTpdt[iComp] - \
+                                 factor2 * devStressT[iComp] + \
+                                 ae * devStressInitial[iComp])
+      stressTpdt[iComp] = devStressTpdt + diag[iComp] * \
+                          (meanStressTpdt + meanStressInitial)
+      devStressTau = (1.0 - self.alpha) * devStressT[iComp] + \
+                     self.alpha * devStressTpdt
+      deltaVisStrain = self.dt * gammaTau * devStressTau
+      visStrainTpdt[iComp] = visStrainT[iComp] + deltaVisStrain
+
+    return stressTpdt, visStrainTpdt
+
+  
+  def _calcStress(self, strainV, muV, lambdaV, refStrainRateV, refStressV,
+                  powerLawExponentV,visStrainV, stressV,
+                  initialStressV, initialStrainV, stateVars):
+    """
+    Compute stress, updated state variables and derivative of elasticity matrix.
+    This assumes behavior is always viscoelastic.
+    """
+    import scipy.misc
+
+    # Define some numpy arrays
+    strainTpdt = numpy.array(strainV, dtype=numpy.float64)
+    visStrainT = numpy.array(visStrainV, dtype=numpy.float64)
+    stressT = numpy.array(stressV, dtype=numpy.float64)
+    initialStress = numpy.array(initialStressV, dtype=numpy.float64)
+    initialStrain = numpy.array(initialStrainV, dtype=numpy.float64)
+
+    stressTpdt, visStrainTpdt = self._computeStress(strainTpdt, muV, lambdaV,
+                                                    refStrainRateV, refStressV,
+                                                    powerLawExponentV,
+                                                    visStrainT, stressT,
+                                                    initialStress,
+                                                    initialStrain,
+                                                    stateVars)
+
+    stateVarsUpdated = numpy.concatenate(([stateVars[0]], visStrainTpdt,
+                                          stressTpdt))
+
+    # Compute components of tangent constitutive matrix using numerical
+    # derivatives.
+    derivDx = 1.0e-12
+    derivOrder = 3
+    elasticConstsList = []
+    components = [0, 1, 3]
+    stress3 = stressTpdt[components]
+
+    for stressComp in components:
+      for strainComp in range(tensorSize):
+        dStressDStrain = scipy.misc.derivative(self._calcStressComponent,
+                                               strainTpdt[strainComp],
+                                               dx=derivDx,
+                                               args=(strainComp,
+                                                     stressComp,
+                                                     strainTpdt, muV, lambdaV,
+                                                     refStrainRateV, refStressV,
+                                                     powerLawExponentV,
+                                                     visStrainT,
+                                                     stressT, initialStress,
+                                                     initialStrain,
+                                                     stateVars),
+                                               order=derivOrder)
+        elasticConstsList.append(dStressDStrain)
+
+    elasticConsts = numpy.array(elasticConstsList, dtype=numpy.float64)
+
+    return (elasticConsts, numpy.ravel(stress3),
+            numpy.ravel(stateVarsUpdated))
+  
+
+# MAIN /////////////////////////////////////////////////////////////////
+if __name__ == "__main__":
+
+  app = PowerLawPlaneStrainTimeDep()
+  app.run()
+
+
+# End of file 

Copied: short/3D/PyLith/trunk/unittests/libtests/materials/data/PowerLawPlaneStrainTimeDepData.cc (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/materials/data/PowerLawPlaneStrainTimeDepData.cc)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/materials/data/PowerLawPlaneStrainTimeDepData.cc	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/materials/data/PowerLawPlaneStrainTimeDepData.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -0,0 +1,303 @@
+// -*- 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.
+//
+// ======================================================================
+//
+
+// DO NOT EDIT THIS FILE
+// This file was generated from python application powerlawplanestraintimedep.
+
+#include "PowerLawPlaneStrainTimeDepData.hh"
+
+const int pylith::materials::PowerLawPlaneStrainTimeDepData::_dimension = 2;
+
+const int pylith::materials::PowerLawPlaneStrainTimeDepData::_numLocs = 2;
+
+const int pylith::materials::PowerLawPlaneStrainTimeDepData::_numProperties = 6;
+
+const int pylith::materials::PowerLawPlaneStrainTimeDepData::_numStateVars = 3;
+
+const int pylith::materials::PowerLawPlaneStrainTimeDepData::_numDBProperties = 6;
+
+const int pylith::materials::PowerLawPlaneStrainTimeDepData::_numDBStateVars = 9;
+
+const int pylith::materials::PowerLawPlaneStrainTimeDepData::_numPropsQuadPt = 6;
+
+const int pylith::materials::PowerLawPlaneStrainTimeDepData::_numVarsQuadPt = 9;
+
+const PylithScalar pylith::materials::PowerLawPlaneStrainTimeDepData::_lengthScale =   1.00000000e+03;
+
+const PylithScalar pylith::materials::PowerLawPlaneStrainTimeDepData::_timeScale =   1.00000000e+00;
+
+const PylithScalar pylith::materials::PowerLawPlaneStrainTimeDepData::_pressureScale =   2.25000000e+10;
+
+const PylithScalar pylith::materials::PowerLawPlaneStrainTimeDepData::_densityScale =   1.00000000e+03;
+
+const PylithScalar pylith::materials::PowerLawPlaneStrainTimeDepData::_dtStableImplicit =   4.44444444e+06;
+
+const int pylith::materials::PowerLawPlaneStrainTimeDepData::_numPropertyValues[] = {
+1,
+1,
+1,
+1,
+1,
+1,
+};
+
+const int pylith::materials::PowerLawPlaneStrainTimeDepData::_numStateVarValues[] = {
+1,
+4,
+4,
+};
+
+const char* pylith::materials::PowerLawPlaneStrainTimeDepData::_dbPropertyValues[] = {
+"density",
+"vs",
+"vp",
+"reference-strain-rate",
+"reference-stress",
+"power-law-exponent",
+};
+
+const char* pylith::materials::PowerLawPlaneStrainTimeDepData::_dbStateVarValues[] = {
+"stress-zz-initial",
+"viscous-strain-xx",
+"viscous-strain-yy",
+"viscous-strain-zz",
+"viscous-strain-xy",
+"stress4-xx",
+"stress4-yy",
+"stress4-zz",
+"stress4-xy",
+};
+
+const PylithScalar pylith::materials::PowerLawPlaneStrainTimeDepData::_dbProperties[] = {
+  2.50000000e+03,
+  3.00000000e+03,
+  5.19615242e+03,
+  1.00000000e-06,
+  2.00000000e+12,
+  1.00000000e+00,
+  2.00000000e+03,
+  1.20000000e+03,
+  2.07846097e+03,
+  1.00000000e-06,
+  1.25992105e+10,
+  3.00000000e+00,
+};
+
+const PylithScalar pylith::materials::PowerLawPlaneStrainTimeDepData::_dbStateVars[] = {
+  2.30000000e+04,
+  0.00000000e+00,
+  0.00000000e+00,
+  5.30000000e+04,
+  0.00000000e+00,
+  0.00000000e+00,
+};
+
+const PylithScalar pylith::materials::PowerLawPlaneStrainTimeDepData::_properties[] = {
+  2.50000000e+03,
+  2.25000000e+10,
+  2.25000000e+10,
+  1.00000000e-06,
+  2.00000000e+12,
+  1.00000000e+00,
+  2.00000000e+03,
+  2.88000000e+09,
+  2.88000000e+09,
+  1.00000000e-06,
+  1.25992105e+10,
+  3.00000000e+00,
+};
+
+const PylithScalar pylith::materials::PowerLawPlaneStrainTimeDepData::_stateVars[] = {
+  2.30000000e+04,
+  4.10000000e-05,
+  4.20000000e-05,
+  4.30000000e-05,
+  4.40000000e-05,
+  3.10000000e+04,
+  3.20000000e+04,
+  3.30000000e+04,
+  3.40000000e+04,
+  5.30000000e+04,
+  1.10000000e-05,
+  1.20000000e-05,
+  1.30000000e-05,
+  1.40000000e-05,
+  5.10000000e+04,
+  5.20000000e+04,
+  5.30000000e+04,
+  5.40000000e+04,
+};
+
+const PylithScalar pylith::materials::PowerLawPlaneStrainTimeDepData::_propertiesNondim[] = {
+  2.50000000e+00,
+  1.00000000e+00,
+  1.00000000e+00,
+  1.00000000e-06,
+  8.88888889e+01,
+  1.00000000e+00,
+  2.00000000e+00,
+  1.28000000e-01,
+  1.28000000e-01,
+  1.00000000e-06,
+  5.59964911e-01,
+  3.00000000e+00,
+};
+
+const PylithScalar pylith::materials::PowerLawPlaneStrainTimeDepData::_stateVarsNondim[] = {
+  1.02222222e-06,
+  4.10000000e-05,
+  4.20000000e-05,
+  4.30000000e-05,
+  4.40000000e-05,
+  1.37777778e-06,
+  1.42222222e-06,
+  1.46666667e-06,
+  1.51111111e-06,
+  2.35555556e-06,
+  1.10000000e-05,
+  1.20000000e-05,
+  1.30000000e-05,
+  1.40000000e-05,
+  2.26666667e-06,
+  2.31111111e-06,
+  2.35555556e-06,
+  2.40000000e-06,
+};
+
+const PylithScalar pylith::materials::PowerLawPlaneStrainTimeDepData::_density[] = {
+  2.50000000e+03,
+  2.00000000e+03,
+};
+
+const PylithScalar pylith::materials::PowerLawPlaneStrainTimeDepData::_strain[] = {
+  1.10000000e-04,
+  1.20000000e-04,
+  1.40000000e-04,
+  4.10000000e-04,
+  4.20000000e-04,
+  4.40000000e-04,
+};
+
+const PylithScalar pylith::materials::PowerLawPlaneStrainTimeDepData::_stress[] = {
+  5.08552569e+06,
+  5.53551098e+06,
+  2.85250536e+06,
+  4.03404000e+06,
+  4.08112000e+06,
+  2.12760000e+06,
+};
+
+const PylithScalar pylith::materials::PowerLawPlaneStrainTimeDepData::_elasticConsts[] = {
+  6.74326522e+10,
+  2.25336747e+10,
+  0.00000000e+00,
+  2.25336747e+10,
+  6.74326518e+10,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  4.48989770e+10,
+  8.64000013e+09,
+  2.88000004e+09,
+  0.00000000e+00,
+  2.88000004e+09,
+  8.63999990e+09,
+  0.00000000e+00,
+  0.00000000e+00,
+  0.00000000e+00,
+  5.75999985e+09,
+};
+
+const PylithScalar pylith::materials::PowerLawPlaneStrainTimeDepData::_initialStress[] = {
+  2.10000000e+04,
+  2.20000000e+04,
+  2.40000000e+04,
+  5.10000000e+04,
+  5.20000000e+04,
+  5.40000000e+04,
+};
+
+const PylithScalar pylith::materials::PowerLawPlaneStrainTimeDepData::_initialStrain[] = {
+  3.60000000e-05,
+  3.50000000e-05,
+  3.30000000e-05,
+  6.10000000e-05,
+  6.20000000e-05,
+  6.60000000e-05,
+};
+
+const PylithScalar pylith::materials::PowerLawPlaneStrainTimeDepData::_stateVarsUpdated[] = {
+  2.30000000e+04,
+  4.09549846e-05,
+  4.19775339e-05,
+  4.27845681e-05,
+  4.41443253e-05,
+  5.08552569e+06,
+  5.53551098e+06,
+  1.67519444e+06,
+  2.85250536e+06,
+  5.30000000e+04,
+  1.10000000e-05,
+  1.20000000e-05,
+  1.29999999e-05,
+  1.40000002e-05,
+  4.03404000e+06,
+  4.08112000e+06,
+  2.01428000e+06,
+  2.12760000e+06,
+};
+
+pylith::materials::PowerLawPlaneStrainTimeDepData::PowerLawPlaneStrainTimeDepData(void)
+{ // constructor
+  dimension = _dimension;
+  numLocs = _numLocs;
+  numProperties = _numProperties;
+  numStateVars = _numStateVars;
+  numDBProperties = _numDBProperties;
+  numDBStateVars = _numDBStateVars;
+  numPropsQuadPt = _numPropsQuadPt;
+  numVarsQuadPt = _numVarsQuadPt;
+  lengthScale = _lengthScale;
+  timeScale = _timeScale;
+  pressureScale = _pressureScale;
+  densityScale = _densityScale;
+  dtStableImplicit = _dtStableImplicit;
+  numPropertyValues = const_cast<int*>(_numPropertyValues);
+  numStateVarValues = const_cast<int*>(_numStateVarValues);
+  dbPropertyValues = const_cast<char**>(_dbPropertyValues);
+  dbStateVarValues = const_cast<char**>(_dbStateVarValues);
+  dbProperties = const_cast<PylithScalar*>(_dbProperties);
+  dbStateVars = const_cast<PylithScalar*>(_dbStateVars);
+  properties = const_cast<PylithScalar*>(_properties);
+  stateVars = const_cast<PylithScalar*>(_stateVars);
+  propertiesNondim = const_cast<PylithScalar*>(_propertiesNondim);
+  stateVarsNondim = const_cast<PylithScalar*>(_stateVarsNondim);
+  density = const_cast<PylithScalar*>(_density);
+  strain = const_cast<PylithScalar*>(_strain);
+  stress = const_cast<PylithScalar*>(_stress);
+  elasticConsts = const_cast<PylithScalar*>(_elasticConsts);
+  initialStress = const_cast<PylithScalar*>(_initialStress);
+  initialStrain = const_cast<PylithScalar*>(_initialStrain);
+  stateVarsUpdated = const_cast<PylithScalar*>(_stateVarsUpdated);
+} // constructor
+
+pylith::materials::PowerLawPlaneStrainTimeDepData::~PowerLawPlaneStrainTimeDepData(void)
+{}
+
+
+// End of file

Copied: short/3D/PyLith/trunk/unittests/libtests/materials/data/PowerLawPlaneStrainTimeDepData.hh (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/materials/data/PowerLawPlaneStrainTimeDepData.hh)
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/materials/data/PowerLawPlaneStrainTimeDepData.hh	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/libtests/materials/data/PowerLawPlaneStrainTimeDepData.hh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -0,0 +1,110 @@
+// -*- 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.
+//
+// ======================================================================
+//
+
+// DO NOT EDIT THIS FILE
+// This file was generated from python application powerlawplanestraintimedep.
+
+#if !defined(pylith_materials_powerlawplanestraintimedepdata_hh)
+#define pylith_materials_powerlawplanestraintimedepdata_hh
+
+#include "ElasticMaterialData.hh"
+
+namespace pylith {
+  namespace materials {
+     class PowerLawPlaneStrainTimeDepData;
+  } // pylith
+} // materials
+
+class pylith::materials::PowerLawPlaneStrainTimeDepData : public ElasticMaterialData
+{
+
+public: 
+
+  /// Constructor
+  PowerLawPlaneStrainTimeDepData(void);
+
+  /// Destructor
+  ~PowerLawPlaneStrainTimeDepData(void);
+
+private:
+
+  static const int _dimension;
+
+  static const int _numLocs;
+
+  static const int _numProperties;
+
+  static const int _numStateVars;
+
+  static const int _numDBProperties;
+
+  static const int _numDBStateVars;
+
+  static const int _numPropsQuadPt;
+
+  static const int _numVarsQuadPt;
+
+  static const PylithScalar _lengthScale;
+
+  static const PylithScalar _timeScale;
+
+  static const PylithScalar _pressureScale;
+
+  static const PylithScalar _densityScale;
+
+  static const PylithScalar _dtStableImplicit;
+
+  static const int _numPropertyValues[];
+
+  static const int _numStateVarValues[];
+
+  static const char* _dbPropertyValues[];
+
+  static const char* _dbStateVarValues[];
+
+  static const PylithScalar _dbProperties[];
+
+  static const PylithScalar _dbStateVars[];
+
+  static const PylithScalar _properties[];
+
+  static const PylithScalar _stateVars[];
+
+  static const PylithScalar _propertiesNondim[];
+
+  static const PylithScalar _stateVarsNondim[];
+
+  static const PylithScalar _density[];
+
+  static const PylithScalar _strain[];
+
+  static const PylithScalar _stress[];
+
+  static const PylithScalar _elasticConsts[];
+
+  static const PylithScalar _initialStress[];
+
+  static const PylithScalar _initialStrain[];
+
+  static const PylithScalar _stateVarsUpdated[];
+
+};
+
+#endif // pylith_materials_powerlawplanestraintimedepdata_hh
+
+// End of file

Modified: short/3D/PyLith/trunk/unittests/libtests/materials/data/generate.sh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/materials/data/generate.sh	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/libtests/materials/data/generate.sh	2012-06-25 17:37:03 UTC (rev 20406)
@@ -83,6 +83,11 @@
     --data.object=DruckerPragerPlaneStrainElasticData \
     --data.parent=ElasticMaterialData
 
+  python PowerLawPlaneStrainElastic.py \
+    --data.namespace=pylith,materials \
+    --data.object=PowerLawPlaneStrainElasticData \
+    --data.parent=ElasticMaterialData
+
   # 1-D ----------------------------------------------------------------
 
   python ElasticStrain1D.py \
@@ -130,6 +135,11 @@
     --data.object=PowerLaw3DTimeDepData \
     --data.parent=ElasticMaterialData
 
+  python PowerLawPlaneStrainTimeDep.py \
+    --data.namespace=pylith,materials \
+    --data.object=PowerLawPlaneStrainTimeDepData \
+    --data.parent=ElasticMaterialData
+
   python DruckerPrager3DTimeDep.py \
     --data.namespace=pylith,materials \
     --data.object=DruckerPrager3DTimeDepData \

Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterPoints.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterPoints.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterPoints.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -112,7 +112,7 @@
       const int fiberDim = _data->vertexFieldsInfo[i].fiber_dim;
       fields->add(name, name);
       MeshField& field = fields->get(name);
-      field.newSection(topology::FieldBase::VERTICES_FIELD, fiberDim);
+      field.newSection(vertices, fiberDim);
       field.allocate();
       field.vectorFieldType(_data->vertexFieldsInfo[i].field_type);
 

Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKPoints.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKPoints.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/TestDataWriterVTKPoints.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -136,7 +136,7 @@
   } // else
   for (int i=0; i < nfields; ++i) {
     MeshField& field = vertexFields.get(_data->vertexFieldsInfo[i].name);
-    field.view("FIELD");
+    // field.view("FIELD"); // DEBUGGING
     output.appendVertexField(t, field, *_mesh);
     CPPUNIT_ASSERT(writer._wroteVertexHeader);
     CPPUNIT_ASSERT(false == writer._wroteCellHeader);
@@ -145,7 +145,7 @@
   output.close();
   CPPUNIT_ASSERT(false == writer._wroteVertexHeader);
   CPPUNIT_ASSERT(false == writer._wroteCellHeader);
-  
+
   checkFile(_data->vertexFilename, t, _data->timeFormat);
 } // testWriteVertexField
 

Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterHDF5DataMeshLine2.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterHDF5DataMeshLine2.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/DataWriterHDF5DataMeshLine2.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -50,18 +50,18 @@
   { "pressure", topology::FieldBase::SCALAR, 1 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMeshLine2::_vertexField0[] = {
-  1.1, 2.2, 3.3, 4.4, 5.5
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshLine2::_vertexField0[5] = {
+  1.1, 2.2, 3.3, 4.4, 5.5,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMeshLine2::_vertexField1[] = {
-  2.1, 3.2, 4.3, 5.4, 6.5
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshLine2::_vertexField1[5] = {
+  2.1, 3.2, 4.3, 5.4, 6.5,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMeshLine2::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshLine2::_vertexField2[10] = {
   1.2, 2.3,
   3.4, 4.5,
   5.6, 6.7,
   7.8, 8.9,
-  9.0, 10.1
+  9.0, 10.1,
 };
 
 const int pylith::meshio::DataWriterHDF5DataMeshLine2::_numCellFields = 3;
@@ -73,14 +73,14 @@
   { "pressure", topology::FieldBase::SCALAR, 1 },
   { "other", topology::FieldBase::TENSOR, 1 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMeshLine2::_cellField0[] = {
-  1.1, 2.2, 3.3
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshLine2::_cellField0[3] = {
+  1.1, 2.2, 3.3,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMeshLine2::_cellField1[] = {
-  2.1, 2.2, 2.3
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshLine2::_cellField1[3] = {
+  2.1, 2.2, 2.3,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMeshLine2::_cellField2[] = {
-  1.2, 2.3, 3.4
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshLine2::_cellField2[3] = {
+  1.2, 2.3, 3.4,
 };
 
 pylith::meshio::DataWriterHDF5DataMeshLine2::DataWriterHDF5DataMeshLine2(void)

Modified: short/3D/PyLith/trunk/unittests/libtests/meshio/data/OutputSolnPointsDataHex8.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/meshio/data/OutputSolnPointsDataHex8.cc	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/libtests/meshio/data/OutputSolnPointsDataHex8.cc	2012-06-25 17:37:03 UTC (rev 20406)
@@ -21,9 +21,9 @@
 const char* pylith::meshio::OutputSolnPointsDataHex8::_meshFilename =
   "data/hex8.mesh";
 
-const int pylith::meshio::OutputSolnPointsDataHex8::_spaceDim = 2;
+const int pylith::meshio::OutputSolnPointsDataHex8::_spaceDim = 3;
 const int pylith::meshio::OutputSolnPointsDataHex8::_numPoints = 4;
-const PylithScalar pylith::meshio::OutputSolnPointsDataHex8::_points[] = {
+const PylithScalar pylith::meshio::OutputSolnPointsDataHex8::_points[12] = {
   0.1, 0.4, 0.2,// interior points
   0.3, 0.1, 0.8,
   0.001, 0.75, -0.0,// edge

Modified: short/3D/PyLith/trunk/unittests/pytests/bc/TestAbsorbingDampers.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/bc/TestAbsorbingDampers.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/pytests/bc/TestAbsorbingDampers.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/pytests/bc/TestNeumann.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/bc/TestNeumann.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/pytests/bc/TestNeumann.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/pytests/faults/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/faults/Makefile.am	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/pytests/faults/Makefile.am	2012-06-25 17:37:03 UTC (rev 20406)
@@ -32,6 +32,8 @@
 	TestEqKinSrc.py \
 	TestFaultCohesiveKin.py \
 	TestFaultCohesiveDyn.py \
+	TestTractPerturbation.py \
+	TestFaultCohesiveImpulses.py \
 	TestLiuCosSlipFn.py \
 	TestSingleRupture.py \
 	TestStepSlipFn.py \

Modified: short/3D/PyLith/trunk/unittests/pytests/faults/TestFaultCohesiveDyn.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/faults/TestFaultCohesiveDyn.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/pytests/faults/TestFaultCohesiveDyn.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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()
@@ -280,7 +280,7 @@
     quadrature.inventory.cell = cell
     quadrature._configure()
 
-    # Setup earthquake source
+    # Setup rupture info
     from spatialdata.spatialdb.SimpleDB import SimpleDB
     from spatialdata.spatialdb.SimpleIOAscii import SimpleIOAscii
     ioTractions = SimpleIOAscii()
@@ -290,7 +290,11 @@
     dbTractions.inventory.iohandler = ioTractions
     dbTractions.inventory.label = "initial tractions"
     dbTractions._configure()
-    
+    from pylith.faults.TractPerturbation import TractPerturbation
+    tract = TractPerturbation()
+    tract.inventory.dbInitial = dbTractions
+    tract._configure()
+
     ioFriction = SimpleIOAscii()
     ioFriction.inventory.filename = "data/tri3_staticfriction.spatialdb"
     ioFriction._configure()
@@ -313,6 +317,7 @@
     fault.inventory.faultLabel = "fault"
     fault.inventory.upDir = [0, 0, 1]
     fault.inventory.faultQuadrature = quadrature
+    fault.inventory.tract = tract
     fault.inventory.friction = friction
     fault._configure()
 

Copied: short/3D/PyLith/trunk/unittests/pytests/faults/TestFaultCohesiveImpulses.py (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/unittests/pytests/faults/TestFaultCohesiveImpulses.py)
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/faults/TestFaultCohesiveImpulses.py	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/pytests/faults/TestFaultCohesiveImpulses.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/pytests/faults/TestFaultCohesiveKin.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/faults/TestFaultCohesiveKin.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/pytests/faults/TestFaultCohesiveKin.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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()

Copied: short/3D/PyLith/trunk/unittests/pytests/faults/TestTractPerturbation.py (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/unittests/pytests/faults/TestTractPerturbation.py)
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/faults/TestTractPerturbation.py	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/pytests/faults/TestTractPerturbation.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -0,0 +1,81 @@
+#!/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/TestTractPerturbation.py
+
+## @brief Unit testing of TractPerturbation object.
+
+import unittest
+
+from pylith.faults.TractPerturbation import TractPerturbation
+
+# ----------------------------------------------------------------------
+class TestTractPerturbation(unittest.TestCase):
+  """
+  Unit testing of TractPerturbation object.
+  """
+
+  def test_constructor(self):
+    """
+    Test constructor.
+    """
+    tract = TractPerturbation()
+    return
+
+
+  def test_configure(self):
+    """
+    Test initialize().
+    """
+    from spatialdata.spatialdb.SimpleDB import SimpleDB
+    from spatialdata.spatialdb.SimpleIOAscii import SimpleIOAscii
+    from pyre.units.time import second
+
+    ioInitial = SimpleIOAscii()
+    ioInitial.inventory.filename = "tri3_initialtractions.spatialdb"
+    ioInitial._configure()
+    dbInitial = SimpleDB()
+    dbInitial.inventory.iohandler = ioInitial
+    dbInitial.inventory.label = "initial tractions"
+    dbInitial._configure()
+    
+    ioChange = SimpleIOAscii()
+    ioChange.inventory.filename = "tri3_changetractions.spatialdb"
+    ioChange._configure()
+    dbChange = SimpleDB()
+    dbChange.inventory.iohandler = ioChange
+    dbChange.inventory.label = "traction change"
+    dbChange._configure()
+    
+    tract = TractPerturbation()
+    tract.inventory.dbInitial = dbInitial
+    tract.inventory.dbChange = dbChange
+    tract._configure()
+    return
+
+
+  def test_factory(self):
+    """
+    Test factory method.
+    """
+    from pylith.faults.TractPerturbation import traction_perturbation
+    fn = traction_perturbation()
+    return
+
+
+# End of file 

Modified: short/3D/PyLith/trunk/unittests/pytests/faults/data/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/faults/data/Makefile.am	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/pytests/faults/data/Makefile.am	2012-06-25 17:37:03 UTC (rev 20406)
@@ -23,7 +23,9 @@
 	tri3_sliptime.spatialdb \
 	tri3_peakrate.spatialdb \
 	tri3_initialtractions.spatialdb \
+	tri3_changetractions.spatialdb \
 	tri3_staticfriction.spatialdb \
+	tri3_impulses.spatialdb \
 	slipfn.timedb
 
 noinst_TMP =

Copied: short/3D/PyLith/trunk/unittests/pytests/faults/data/tri3_changetractions.spatialdb (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/unittests/pytests/faults/data/tri3_changetractions.spatialdb)
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/faults/data/tri3_changetractions.spatialdb	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/pytests/faults/data/tri3_changetractions.spatialdb	2012-06-25 17:37:03 UTC (rev 20406)
@@ -0,0 +1,15 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 3
+  value-names =  traction-shear traction-normal  change-start-time
+  value-units =  Pa   Pa   s
+  num-locs = 2
+  data-dim = 1
+  space-dim = 2
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 2
+  }
+}
+0.0  +1.0   -0.5   +1.0   1.5
+0.0  -1.0   -0.7   +0.8   2.5

Copied: short/3D/PyLith/trunk/unittests/pytests/faults/data/tri3_impulses.spatialdb (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/unittests/pytests/faults/data/tri3_impulses.spatialdb)
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/faults/data/tri3_impulses.spatialdb	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/pytests/faults/data/tri3_impulses.spatialdb	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/pytests/faults/testfaults.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/faults/testfaults.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/pytests/faults/testfaults.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -80,12 +80,18 @@
     from TestEqKinSrc import TestEqKinSrc
     suite.addTest(unittest.makeSuite(TestEqKinSrc))
 
+    from TestTractPerturbation import TestTractPerturbation
+    suite.addTest(unittest.makeSuite(TestTractPerturbation))
+
     from TestFaultCohesiveKin import TestFaultCohesiveKin
     suite.addTest(unittest.makeSuite(TestFaultCohesiveKin))
 
     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/trunk/unittests/pytests/feassemble/TestElasticityExplicit.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/feassemble/TestElasticityExplicit.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/pytests/feassemble/TestElasticityExplicit.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/pytests/feassemble/TestElasticityExplicitLgDeform.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/feassemble/TestElasticityExplicitLgDeform.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/pytests/feassemble/TestElasticityExplicitLgDeform.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/pytests/feassemble/TestElasticityImplicit.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/feassemble/TestElasticityImplicit.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/pytests/feassemble/TestElasticityImplicit.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/pytests/feassemble/TestElasticityImplicitLgDeform.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/feassemble/TestElasticityImplicitLgDeform.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/pytests/feassemble/TestElasticityImplicitLgDeform.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/pytests/feassemble/TestFIATSimplex.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/feassemble/TestFIATSimplex.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/pytests/feassemble/TestFIATSimplex.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/pytests/feassemble/TestMeshQuadrature.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/feassemble/TestMeshQuadrature.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/pytests/feassemble/TestMeshQuadrature.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/pytests/feassemble/TestSubMeshQuadrature.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/feassemble/TestSubMeshQuadrature.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/pytests/feassemble/TestSubMeshQuadrature.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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/trunk/unittests/pytests/friction/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/friction/Makefile.am	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/pytests/friction/Makefile.am	2012-06-25 17:37:03 UTC (rev 20406)
@@ -30,6 +30,7 @@
 	TestFrictionModel.py \
 	TestStaticFriction.py \
 	TestSlipWeakening.py \
+	TestSlipWeakeningTime.py \
 	TestRateStateAgeing.py \
 	TestTimeWeakening.py
 

Modified: short/3D/PyLith/trunk/unittests/pytests/materials/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/materials/Makefile.am	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/pytests/materials/Makefile.am	2012-06-25 17:37:03 UTC (rev 20406)
@@ -41,6 +41,7 @@
 	TestGenMaxwellPlaneStrain.py \
 	TestGenMaxwellQpQsIsotropic3D.py \
 	TestPowerLaw3D.py \
+	TestPowerLawPlaneStrain.py \
 	TestDruckerPrager3D.py \
 	TestDruckerPragerPlaneStrain.py
 

Modified: short/3D/PyLith/trunk/unittests/pytests/materials/TestMaterial.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/materials/TestMaterial.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/pytests/materials/TestMaterial.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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()

Copied: short/3D/PyLith/trunk/unittests/pytests/materials/TestPowerLawPlaneStrain.py (from rev 20404, short/3D/PyLith/branches/v1.7-trunk/unittests/pytests/materials/TestPowerLawPlaneStrain.py)
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/materials/TestPowerLawPlaneStrain.py	                        (rev 0)
+++ short/3D/PyLith/trunk/unittests/pytests/materials/TestPowerLawPlaneStrain.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -0,0 +1,94 @@
+#!/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/materials/TestPowerLawPlaneStrain.py
+
+## @brief Unit testing of PowerLawPlaneStrain object.
+
+import unittest
+
+from pylith.materials.PowerLawPlaneStrain import PowerLawPlaneStrain
+
+# ----------------------------------------------------------------------
+class TestPowerLawPlaneStrain(unittest.TestCase):
+  """
+  Unit testing of PowerLawPlaneStrain object.
+  """
+
+  def setUp(self):
+    """
+    Setup test subject.
+    """
+    self.material = PowerLawPlaneStrain()
+    return
+  
+
+  def test_constructor(self):
+    """
+    Test constructor.
+    """
+    self.assertEqual(2, self.material.dimension())
+    return
+
+
+  def test_useElasticBehavior(self):
+    """
+    Test useElasticBehavior().
+    """
+    self.material.useElasticBehavior(False)
+    return
+
+
+  def testHasStateVars(self):
+    self.failUnless(self.material.hasStateVars())
+    return
+
+
+  def testTensorSize(self):
+    self.assertEqual(3, self.material.tensorSize())
+    return
+
+
+  def testNeedNewJacobian(self):
+    """
+    Test needNewJacobian().
+    """
+    # Default should be False.
+    self.failIf(self.material.needNewJacobian())
+
+    # Should require a new Jacobian even if time step is the same.
+    self.material.timeStep(1.0)
+    self.failUnless(self.material.needNewJacobian())
+    self.material.timeStep(2.0)
+    self.failUnless(self.material.needNewJacobian())
+
+    self.material.timeStep(2.0)
+    self.failUnless(self.material.needNewJacobian())
+    return
+  
+
+  def test_factory(self):
+    """
+    Test factory method.
+    """
+    from pylith.materials.PowerLawPlaneStrain import material
+    m = material()
+    return
+
+
+# End of file 

Modified: short/3D/PyLith/trunk/unittests/pytests/materials/testmaterials.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/materials/testmaterials.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/pytests/materials/testmaterials.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -95,6 +95,9 @@
     from TestPowerLaw3D import TestPowerLaw3D
     suite.addTest(unittest.makeSuite(TestPowerLaw3D))
 
+    from TestPowerLawPlaneStrain import TestPowerLawPlaneStrain
+    suite.addTest(unittest.makeSuite(TestPowerLawPlaneStrain))
+
     from TestDruckerPrager3D import TestDruckerPrager3D
     suite.addTest(unittest.makeSuite(TestDruckerPrager3D))
 

Modified: short/3D/PyLith/trunk/unittests/pytests/meshio/TestCellFilterAvg.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/meshio/TestCellFilterAvg.py	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/pytests/meshio/TestCellFilterAvg.py	2012-06-25 17:37:03 UTC (rev 20406)
@@ -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()

Modified: short/3D/PyLith/trunk/unittests/pytests/utils/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/utils/Makefile.am	2012-06-25 16:43:00 UTC (rev 20405)
+++ short/3D/PyLith/trunk/unittests/pytests/utils/Makefile.am	2012-06-25 17:37:03 UTC (rev 20406)
@@ -29,7 +29,8 @@
 noinst_PYTHON = \
 	TestEventLogger.py \
 	TestPetscManager.py \
-	TestConstants.py
+	TestConstants.py \
+	TestPylith.py
 
 
 # End of file 



More information about the CIG-COMMITS mailing list