[cig-commits] r20976 - in short/3D/PyLith/branches/pylith-scecdynrup: . applications/utilities doc/developer doc/presentations doc/presentations/logos doc/releasenotes doc/userguide doc/userguide/benchmarks doc/userguide/benchmarks/savageprescott doc/userguide/benchmarks/strikeslip doc/userguide/boundaryconditions doc/userguide/cover doc/userguide/extending doc/userguide/fileformats doc/userguide/governingeqns 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/gravity doc/userguide/tutorials/3dhex8/quasistatic doc/userguide/tutorials/3dhex8/static 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/greensfns examples/2d/greensfns/reverse examples/2d/greensfns/strikeslip examples/2d/subduction examples/3d/hex8 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 examples/meshing/surface_nurbs 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/friction libsrc/pylith/materials libsrc/pylith/meshio libsrc/pylith/problems libsrc/pylith/topology libsrc/pylith/utils modulesrc/feassemble modulesrc/friction modulesrc/materials modulesrc/mpi 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/apps pylith/faults pylith/feassemble pylith/friction pylith/materials 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/cyclic 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 tests_auto/1d 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/feassemble unittests/libtests/feassemble/data unittests/libtests/friction unittests/libtests/materials unittests/libtests/materials/data unittests/libtests/meshio unittests/libtests/meshio/data unittests/pytests/faults unittests/pytests/feassemble unittests/pytests/friction unittests/pytests/materials unittests/pytests/mpi unittests/pytests/problems unittests/pytests/utils

brad at geodynamics.org brad at geodynamics.org
Thu Nov 1 10:04:16 PDT 2012


Author: brad
Date: 2012-11-01 10:04:11 -0700 (Thu, 01 Nov 2012)
New Revision: 20976

Added:
   short/3D/PyLith/branches/pylith-scecdynrup/applications/utilities/pylith_eqinfo.in
   short/3D/PyLith/branches/pylith-scecdynrup/doc/presentations/logos/cig_blackfg.png
   short/3D/PyLith/branches/pylith-scecdynrup/doc/presentations/pylith1.6/
   short/3D/PyLith/branches/pylith-scecdynrup/doc/presentations/pylith1.7/
   short/3D/PyLith/branches/pylith-scecdynrup/doc/releasenotes/announce_v1.7.0.txt
   short/3D/PyLith/branches/pylith-scecdynrup/doc/releasenotes/announce_v1.7.1.txt
   short/3D/PyLith/branches/pylith-scecdynrup/doc/releasenotes/announce_v1.8.0.txt
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/3dhex8/dike/
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/greensfns2d/
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/subduction/figs/step04_soln.png
   short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/README
   short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/invert_slip.py
   short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/reverse/penalty_params.txt
   short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/reverse/plot_invresults.py
   short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/strikeslip/penalty_params.txt
   short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/strikeslip/plot_invresults.py
   short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/afterslip_tractions.py
   short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/afterslip_tractions.spatialdb
   short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/plot_faultinfo.py
   short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/step04.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/prescribedrup.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/prescribedrup_risetime.spatialdb
   short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/prescribedrup_slip.spatialdb
   short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/prescribedrup_sliptime.spatialdb
   short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/spontaneousrup.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/spontaneousrup_ratestateageing.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/spontaneousrup_slipweakening.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/spontaneousrup_staticfriction.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/meshing/cubit_cellsize/
   short/3D/PyLith/branches/pylith-scecdynrup/examples/meshing/surface_nurbs/merge_surfs/
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/PowerLawPlaneStrain.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/PowerLawPlaneStrain.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/PowerLawPlaneStrain.icc
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/PowerLawPlaneStrain.i
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/mpi/mpi_reduce.i
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/apps/EqInfoApp.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/PowerLawPlaneStrain.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/ExplicitTet4.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/ExplicitTri3.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/powerlaw/
   short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/stressoutput/
   short/3D/PyLith/branches/pylith-scecdynrup/tests/runtests.sh
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/eqinfo/
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestPowerLawPlaneStrain.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestPowerLawPlaneStrain.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLawPlaneStrainElastic.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLawPlaneStrainElasticData.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLawPlaneStrainElasticData.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLawPlaneStrainTimeDep.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLawPlaneStrainTimeDepData.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLawPlaneStrainTimeDepData.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_cell.xmf
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_vertex.xmf
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_cell.xmf
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_vertex.xmf
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/materials/TestPowerLawPlaneStrain.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/mpi/TestReduce.py
Removed:
   short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/dynamic.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/dynamic_ratestateageing.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/dynamic_slipweakening.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/dynamic_staticfriction.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/kinematic.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/kinematic_risetime.spatialdb
   short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/kinematic_slip.spatialdb
   short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/kinematic_sliptime.spatialdb
   short/3D/PyLith/branches/pylith-scecdynrup/examples/greensfns/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/examples/greensfns/hex8/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/examples/greensfns/hex8/gfimpulses/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/examples/greensfns/hex8/gfresponses/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/examples/greensfns/hex8/gfspatialdb/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/examples/meshing/surface_nurbs/shiftrot.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/ExplicitLumped.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/ExplicitLumpedTet4.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/ExplicitLumpedTri3.py
Modified:
   short/3D/PyLith/branches/pylith-scecdynrup/README
   short/3D/PyLith/branches/pylith-scecdynrup/TODO
   short/3D/PyLith/branches/pylith-scecdynrup/applications/utilities/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/configure.ac
   short/3D/PyLith/branches/pylith-scecdynrup/doc/developer/howto_mergefromstable.txt
   short/3D/PyLith/branches/pylith-scecdynrup/doc/presentations/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/doc/releasenotes/checklist.txt
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/benchmarks/benchmarks.lyx
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/benchmarks/savageprescott/savageprescott.lyx
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/benchmarks/strikeslip/strikeslip.lyx
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/boundaryconditions/boundaryconditions.lyx
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/components.lyx
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/cover/cover.pdf
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/cover/cover.svg.gz
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/cover/cover_small.jpg
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/extending/extending.lyx
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/fileformats/fileformats.lyx
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/governingeqns/governingeqns.lyx
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/install/install.lyx
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/intro/intro.lyx
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/materials/altformulations.lyx
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/materials/materials.lyx
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/preface.lyx
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/runpylith/runpylith.lyx
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/3dhex8/3dhex8.lyx
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/3dhex8/friction/friction.lyx
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/3dhex8/gravity/gravity.lyx
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/3dhex8/quasistatic/quasistatic.lyx
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/3dhex8/static/static.lyx
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/3dhex8/surfload/surfload.lyx
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/3dtet4/3dtet4.lyx
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/shearwave/hex8.lyx
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/shearwave/quad4.lyx
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/shearwave/shearwave.lyx
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/shearwave/tet4.lyx
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/shearwave/tri3.lyx
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/subduction/subduction.lyx
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/tutorials.lyx
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/twohex8/twohex8.lyx
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/twoquad4/twoquad4.lyx
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/twotet4-geoproj/twotet4-geoproj.lyx
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/twotet4/twotet4.lyx
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/twotri3/twotri3.lyx
   short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/userguide.lyx
   short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/reverse/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/reverse/README
   short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/reverse/impulse_amplitude.spatialdb
   short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/strikeslip/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/strikeslip/README
   short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/strikeslip/eqslip.spatialdb
   short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/strikeslip/greensfns.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/strikeslip/impulse_amplitude.spatialdb
   short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/README
   short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/step01.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/step02.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/step03.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/spatialdb/powerlaw/powerlaw_gendb.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/step02.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/step05.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/step14.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/step18.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/step19.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/step20.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/tet4/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/tet4/step02.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/tet4/step04.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/hex8/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/README
   short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/tet4/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/tri3/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/greensfns/hex8/README
   short/3D/PyLith/branches/pylith-scecdynrup/examples/greensfns/hex8/gfgen.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/greensfns/hex8/gfoutput.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/greensfns/hex8/initial-run.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/greensfns/hex8/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/meshing/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/examples/meshing/surface_nurbs/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/examples/meshing/surface_nurbs/contours/cont2lines.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/meshing/surface_nurbs/contours/fill_contours.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/meshing/surface_nurbs/dem/dem2lines.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/meshing/surface_nurbs/triangles/mkfacets.py
   short/3D/PyLith/branches/pylith-scecdynrup/examples/run_examples.sh
   short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twohex27-cubit/axialdisp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twohex27-cubit/dislocation.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twohex27-cubit/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twohex27-cubit/sheardisp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twohex8/axialdisp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twohex8/dislocation.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twohex8/dislocation_sliptime.spatialdb
   short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twohex8/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twohex8/sheardisp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twoquad4/axialdisp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twoquad4/axialtract.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twoquad4/dislocation.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twoquad4/dislocation_sliptime.spatialdb
   short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twoquad4/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twoquad4/sheardisp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotet4-geoproj/dislocation.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotet4-geoproj/dislocation_sliptime.spatialdb
   short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotet4-geoproj/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotet4/axialdisp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotet4/dislocation.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotet4/dislocation_sliptime.spatialdb
   short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotet4/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotri3/axialdisp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotri3/dislocation.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotri3/dislocation_sliptime.spatialdb
   short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotri3/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotri3/sheardisp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/bc/AbsorbingDampers.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/bc/Neumann.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesive.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveDyn.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveImpulses.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveLagrange.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveLagrange.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/TopologyOps.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/CellGeometry.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/ElasticityExplicit.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/ElasticityExplicit.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/ElasticityExplicitLgDeform.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/ElasticityExplicitLgDeform.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/ElasticityExplicitTet4.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/ElasticityExplicitTet4.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/ElasticityExplicitTri3.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/ElasticityExplicitTri3.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryHex3D.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryHex3D.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryLine1D.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryLine1D.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryLine2D.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryLine2D.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryLine3D.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryLine3D.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryPoint1D.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryPoint1D.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryPoint2D.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryPoint2D.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryPoint3D.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryPoint3D.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryQuad2D.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryQuad2D.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryQuad3D.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryQuad3D.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryTet3D.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryTet3D.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryTri2D.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryTri2D.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryTri3D.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryTri3D.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/IntegratorElasticity.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/IntegratorElasticity.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/IntegratorElasticityLgDeform.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/Quadrature.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/QuadratureRefCell.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/QuadratureRefCell.icc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/friction/FrictionModel.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/friction/RateStateAgeing.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/friction/RateStateAgeing.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/DruckerPrager3D.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/DruckerPrager3D.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/DruckerPragerPlaneStrain.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/DruckerPragerPlaneStrain.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticIsotropic3D.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticIsotropic3D.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticMaterial.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticMaterial.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticPlaneStrain.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticPlaneStrain.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticPlaneStress.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticPlaneStress.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticStrain1D.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticStrain1D.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticStress1D.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticStress1D.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/GenMaxwellIsotropic3D.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/GenMaxwellIsotropic3D.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/GenMaxwellPlaneStrain.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/GenMaxwellPlaneStrain.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/GenMaxwellQpQsIsotropic3D.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/GenMaxwellQpQsIsotropic3D.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/Material.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/Material.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/Material.icc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/MaxwellIsotropic3D.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/MaxwellIsotropic3D.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/MaxwellPlaneStrain.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/MaxwellPlaneStrain.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/PowerLaw3D.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/PowerLaw3D.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/materialsfwd.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/DataWriterHDF5.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/DataWriterHDF5Ext.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/DataWriterVTK.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/ExodusII.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/ExodusII.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/OutputSolnPoints.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/OutputSolnPoints.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/Xdmf.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/Xdmf.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/Explicit.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/Formulation.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/Formulation.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/Implicit.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/SolverLinear.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/SolverNonlinear.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/topology/RefineUniform.cc
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/topology/RefineUniform.hh
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/utils/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/utils/constdefs.h
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/feassemble/ElasticityExplicit.i
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/feassemble/ElasticityExplicitLgDeform.i
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/feassemble/ElasticityExplicitTet4.i
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/feassemble/ElasticityExplicitTri3.i
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/feassemble/IntegratorElasticity.i
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/friction/RateStateAgeing.i
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/DruckerPrager3D.i
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/DruckerPragerPlaneStrain.i
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/ElasticIsotropic3D.i
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/ElasticMaterial.i
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/ElasticPlaneStrain.i
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/ElasticPlaneStress.i
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/ElasticStrain1D.i
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/ElasticStress1D.i
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/GenMaxwellIsotropic3D.i
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/GenMaxwellPlaneStrain.i
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/GenMaxwellQpQsIsotropic3D.i
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/MaxwellIsotropic3D.i
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/MaxwellPlaneStrain.i
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/PowerLaw3D.i
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/materials.i
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/mpi/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/mpi/mpi.i
   short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/problems/Formulation.i
   short/3D/PyLith/branches/pylith-scecdynrup/playpen/euler/euler.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/playpen/faultfaces/test/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/playpen/postproc/fault/faultinfo.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/playpen/postproc/princaxes.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/playpen/postproc/vtkcff.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/playpen/postproc/vtkdiff.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/playpen/powerlaw/powerlaw_gendb.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/playpen/quadratic/twohex27/axialdisp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/playpen/quadratic/twohex27/dislocation.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/playpen/quadratic/twohex27/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/playpen/quadratic/twoquad9/axialdisp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/playpen/quadratic/twoquad9/dislocation.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/playpen/quadratic/twoquad9/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/playpen/quadratic/twotet10/dislocation.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/playpen/quadratic/twotet10/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/playpen/reordering/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/playpen/savpres_ss/savpres_ss.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/apps/PyLithApp.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/faults/FaultCohesiveImpulses.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/feassemble/ElasticityExplicit.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/feassemble/ElasticityExplicitLgDeform.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/feassemble/ElasticityExplicitTet4.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/feassemble/ElasticityExplicitTri3.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/feassemble/ElasticityImplicit.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/feassemble/ElasticityImplicitLgDeform.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/feassemble/IntegratorElasticity.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/friction/RateStateAgeing.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/DruckerPrager3D.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/DruckerPragerPlaneStrain.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/ElasticIsotropic3D.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/ElasticPlaneStrain.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/ElasticPlaneStress.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/ElasticStrain1D.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/ElasticStress1D.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/GenMaxwellIsotropic3D.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/GenMaxwellPlaneStrain.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/GenMaxwellQpQsIsotropic3D.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/MaxwellIsotropic3D.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/MaxwellPlaneStrain.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/PowerLaw3D.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/__init__.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/ExplicitLgDeform.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/Formulation.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/GreensFns.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/Implicit.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/Solver.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/TimeDependent.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/TimeStep.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/tests/Fault.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/tests/PhysicalProperties.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/tests/Solution.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/tests/StateVariables.py
   short/3D/PyLith/branches/pylith-scecdynrup/pylith/tests/__init__.py
   short/3D/PyLith/branches/pylith-scecdynrup/setup.py
   short/3D/PyLith/branches/pylith-scecdynrup/templates/friction/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/templates/friction/ViscousFriction.cc
   short/3D/PyLith/branches/pylith-scecdynrup/templates/friction/ViscousFriction.hh
   short/3D/PyLith/branches/pylith-scecdynrup/templates/friction/ViscousFriction.i
   short/3D/PyLith/branches/pylith-scecdynrup/templates/friction/configure.ac
   short/3D/PyLith/branches/pylith-scecdynrup/templates/friction/frictioncontrib.i
   short/3D/PyLith/branches/pylith-scecdynrup/templates/friction/tests/TestViscousFriction.py
   short/3D/PyLith/branches/pylith-scecdynrup/templates/materials/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/templates/materials/PlaneStrainState.cc
   short/3D/PyLith/branches/pylith-scecdynrup/templates/materials/PlaneStrainState.hh
   short/3D/PyLith/branches/pylith-scecdynrup/templates/materials/PlaneStrainState.i
   short/3D/PyLith/branches/pylith-scecdynrup/templates/materials/configure.ac
   short/3D/PyLith/branches/pylith-scecdynrup/templates/materials/materialscontrib.i
   short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/faultstrip/dynamic_slipweakening.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/faultstrip/dynamic_timeweakening.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/faultstrip/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/frictionslide/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/frictionslide/ratestate.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/frictionslide/ratestate_stable.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/frictionslide/ratestate_weak.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/maxwell/axialdisp2d.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/maxwell/axialdisp3d.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/maxwell/planestrain2d.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/maxwell/planestrain3d.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/maxwell/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/maxwell/sheardisp2d.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/maxwell/sheardisp3d.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/cyclic/dynamic.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/axialdisp_fine_2d.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/axialdisp_fine_3d.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/axialdisp_twocells_2d.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/axialdisp_twocells_3d.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/planestrain_fine_2d.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/planestrain_fine_3d.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/planestrain_twocells_2d.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/planestrain_twocells_3d.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/sheardisp_fine_2d.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/sheardisp_fine_3d.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/sheardisp_twocells_2d.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/sheardisp_twocells_3d.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/slipdir/fault_x.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/slipdir/fault_xy1.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/slipdir/fault_xy2.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/slipdir/fault_y.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/slipdir/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/cyclicfriction/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/matprops/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/hex8.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/hex8_pwave.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/hex8_swave.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/pwave.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/swave.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/tet4.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/tet4_pwave.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/tet4_swave.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/threehex8/config/elas_ng_ni_v03.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/threehex8/config/plas_dp1_ng_ni_v03.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/threehex8/config/plas_dp2_ng_ni_v03.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/threehex8/config/plas_dp3_ng_ni_v03.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/threehex8/config/plas_vm1_ng_ni_v03.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/threehex8/config/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/threehex8/config/visc_e10_ng_ni_v03.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/refine/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/relaxation/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/relaxation/shear_elastic.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/relaxation/shear_genmaxwell.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/relaxation/shear_genmaxwell_QpQs.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/slipdir/fault_x.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/slipdir/fault_xy.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/slipdir/fault_xz1.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/slipdir/fault_xz2.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/slipdir/fault_y.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/slipdir/fault_z.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/slipdir/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/refinefaulttip/hex8.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/refinefaulttip/quad4.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/refinefaulttip/tet4.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests/refinefaulttip/tri3.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/TestDislocation.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/TestExtensionDisp.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/TestExtensionForce.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/TestLine2.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/dislocation.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/extensiondisp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/extensionforce.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/lgdeformtranslation.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line3/TestAxial.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line3/TestDislocation.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line3/TestLine3.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line3/axialextension.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line3/dislocation.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestAxialDisp.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestDislocation.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestFrictionCompression.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestFrictionOpening.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestFrictionShearSliding.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestFrictionShearStick.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestLgDeformRigidBody.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestLgDeformTraction.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestQuad4.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestShearDisp.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestSlipWeakeningCompression.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestSlipWeakeningOpening.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestSlipWeakeningShearSliding.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestSlipWeakeningShearStick.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/axialdisp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/axialdisp_gendb.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/axialdisp_soln.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/dislocation.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/dislocation2.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/dislocation_soln.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/fourcells_twofaults.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/friction_compression.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/friction_compression_soln.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/friction_opening.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/friction_opening_soln.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/friction_shear_sliding.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/friction_shear_sliding_soln.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/friction_shear_stick.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/friction_shear_stick_soln.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/lgdeformrigidbody.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/lgdeformtraction.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/lgdeformtraction_soln.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/rigidbody_gendb.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/rigidbody_soln.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/sheardisp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/sheardisp_gendb.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/sheardisp_soln.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/slipweakening_compression.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/slipweakening_compression_soln.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/slipweakening_opening.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/slipweakening_opening_soln.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/slipweakening_shear_sliding.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/slipweakening_shear_sliding_soln.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/slipweakening_shear_stick.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/slipweakening_shear_stick_soln.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/testpylith.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad9/axialdisp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad9/dislocation.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/TestAxialDisp.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/TestShearDisp.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/TestTri3.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/axialdisp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/axialdisp_gendb.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/axialdisp_soln.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/dislocation.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/dislocation2.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/sheardisp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/sheardisp_gendb.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/sheardisp_refine.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/sheardisp_soln.py
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri6/axialdisp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri6/dislocation.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/axial-small-tractions.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/axialelasticisotropic.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/axialgenmax1-tract-8cells.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/axialgenmax2-tract-8cells.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/axialgenmax3-tract-8cells.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/axialgenmax4-tract-8cells.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/axialmaxwellisotropic.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/pylithapp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/shearelastic-eightcells.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/shearelastic-fourcells.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/shearelastic-small.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/shearelastic-threecells.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/shearelastic-twocells.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/shearelastic-twocellsb.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/shearelasticisotropic.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/shearmaxwellisotropic.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/shearplanestrain.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/tet4/axialelasticisotropic.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/tet4/dislocation.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/tet4/shearelasticisotropic.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/hex27/axialdisp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/hex27/dislocation.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/hex8/axialdisp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/hex8/lgdeformrigidbody.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/hex8/lgdeformtraction.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/tet10/axialdisp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/tet10/dislocation.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/tet4/axialdisp.cfg
   short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveDyn.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicit.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicit.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicit1DLinear.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicit1DQuadratic.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicit2DLinear.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicit2DQuadratic.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicit3DLinear.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicit3DQuadratic.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitGrav1DLinear.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitGrav1DQuadratic.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitGrav2DLinear.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitGrav2DQuadratic.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitGrav3DLinear.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitGrav3DQuadratic.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeform.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeform.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeform1DLinear.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeform1DQuadratic.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeform2DLinear.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeform2DQuadratic.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeform3DLinear.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeform3DQuadratic.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeformGrav1DLinear.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeformGrav1DQuadratic.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeformGrav2DLinear.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeformGrav2DQuadratic.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeformGrav3DLinear.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeformGrav3DQuadratic.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitTet4.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitTet4.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitTri3.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitTri3.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestIntegrator.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicit.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitApp.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData1DLinear.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData1DLinear.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData1DQuadratic.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData1DQuadratic.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData2DLinear.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData2DLinear.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData2DQuadratic.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData2DQuadratic.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData3DLinear.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData3DLinear.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData3DQuadratic.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData3DQuadratic.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData1DLinear.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData1DLinear.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData1DQuadratic.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData1DQuadratic.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData2DLinear.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData2DLinear.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData2DQuadratic.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData2DQuadratic.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData3DLinear.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData3DLinear.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData3DQuadratic.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData3DQuadratic.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeform.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData1DLinear.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData1DLinear.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData1DQuadratic.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData1DQuadratic.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData2DLinear.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData2DLinear.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData2DQuadratic.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData2DQuadratic.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData3DLinear.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData3DLinear.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData3DQuadratic.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData3DQuadratic.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData1DLinear.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData1DLinear.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData1DQuadratic.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData1DQuadratic.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData2DLinear.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData2DLinear.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData2DQuadratic.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData2DQuadratic.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData3DLinear.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData3DLinear.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData3DQuadratic.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData3DQuadratic.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityLgDeformExplicitApp.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh1DLinear.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh1DQuadratic.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh1Din2DLinear.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh1Din2DQuadratic.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh1Din3DLinear.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh1Din3DQuadratic.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh2DLinear.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh2DQuadratic.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh2Din3DLinearXY.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh2Din3DLinearXYZ.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh2Din3DLinearYZ.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh3DLinear.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh3DQuadratic.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/friction/TestRateStateAgeing.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/friction/TestRateStateAgeing.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestDruckerPrager3D.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestDruckerPragerPlaneStrain.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestElasticIsotropic3D.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestElasticMaterial.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestElasticMaterial.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestElasticPlaneStrain.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestElasticPlaneStress.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestElasticStrain1D.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestElasticStress1D.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestGenMaxwellIsotropic3D.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestGenMaxwellPlaneStrain.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestGenMaxwellQpQsIsotropic3D.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestMaxwellIsotropic3D.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestMaxwellPlaneStrain.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestPowerLaw3D.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DElastic.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DElasticData.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DElasticData.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DTimeDep.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DTimeDepData.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DTimeDepData.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainElastic.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainElasticData.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainElasticData.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainTimeDep.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainTimeDepData.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainTimeDepData.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticIsotropic3D.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticIsotropic3DData.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticIsotropic3DData.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticMaterialApp.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticMaterialData.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticMaterialData.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticPlaneStrain.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticPlaneStrainData.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticPlaneStrainData.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticPlaneStress.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticPlaneStressData.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticPlaneStressData.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticStrain1D.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticStrain1DData.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticStrain1DData.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticStress1D.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticStress1DData.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticStress1DData.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellIsotropic3DElastic.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellIsotropic3DElasticData.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellIsotropic3DElasticData.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellIsotropic3DTimeDep.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellIsotropic3DTimeDepData.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellIsotropic3DTimeDepData.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellPlaneStrainElastic.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellPlaneStrainElasticData.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellPlaneStrainElasticData.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellPlaneStrainTimeDep.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellPlaneStrainTimeDepData.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellPlaneStrainTimeDepData.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellQpQsIsotropic3DElastic.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellQpQsIsotropic3DElasticData.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellQpQsIsotropic3DElasticData.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellQpQsIsotropic3DTimeDep.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellQpQsIsotropic3DTimeDepData.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellQpQsIsotropic3DTimeDepData.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellIsotropic3DElastic.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellIsotropic3DElasticData.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellIsotropic3DElasticData.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellIsotropic3DTimeDep.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellIsotropic3DTimeDepData.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellIsotropic3DTimeDepData.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellPlaneStrainElastic.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellPlaneStrainElasticData.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellPlaneStrainElasticData.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellPlaneStrainTimeDep.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellPlaneStrainTimeDepData.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellPlaneStrainTimeDepData.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLaw3DElastic.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLaw3DElasticData.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLaw3DElasticData.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLaw3DTimeDep.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLaw3DTimeDepData.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLaw3DTimeDepData.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/generate.sh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/TestDataWriterPoints.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/TestDataWriterVTKPoints.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/TestXdmf.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/TestXdmf.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterData.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterData.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataBCMeshHex8.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataBCMeshHex8.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataBCMeshQuad4.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataBCMeshQuad4.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataBCMeshTet4.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataBCMeshTet4.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataBCMeshTri3.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataBCMeshTri3.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataFaultMeshHex8.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataFaultMeshHex8.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataFaultMeshQuad4.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataFaultMeshQuad4.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataFaultMeshTet4.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataFaultMeshTet4.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataFaultMeshTri3.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataFaultMeshTri3.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshHex8.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshHex8.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshLine2.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshLine2.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshQuad4.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshQuad4.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshTet4.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshTet4.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshTri3.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshTri3.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshHex8.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshHex8.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshLine2.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshLine2.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshQuad4.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshQuad4.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshTet4.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshTet4.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshTri3.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshTri3.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshHex8.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshHex8.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshLine2.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshLine2.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshQuad4.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshQuad4.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshTet4.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshTet4.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshTri3.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshTri3.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshHex8.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshHex8.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshQuad4.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshQuad4.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshTet4.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshTet4.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshTri3.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshTri3.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshHex8.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshHex8.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshQuad4.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshQuad4.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshTet4.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshTet4.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshTri3.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshTri3.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshHex8.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshHex8.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshLine2.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshLine2.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshQuad4.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshQuad4.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshTet4.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshTet4.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshTri3.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshTri3.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshHex8.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshHex8.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshLine2.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshLine2.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshQuad4.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshQuad4.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshTet4.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshTet4.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshTri3.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshTri3.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataPointsHex8.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataPointsHex8.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataPointsQuad4.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataPointsQuad4.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataPointsTet4.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataPointsTet4.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataPointsTri3.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataPointsTri3.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshHex8.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshHex8.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshLine2.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshLine2.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshQuad4.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshQuad4.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshTet4.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshTet4.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshTri3.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshTri3.hh
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/OutputSolnPointsDataHex8.cc
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_bc_cell.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_bc_cell_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_bc_vertex.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_bc_vertex_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_cell.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_cell_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_fault_cell.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_fault_cell_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_fault_vertex.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_fault_vertex_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_mat_cell.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_mat_cell_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_mat_vertex.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_mat_vertex_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_points_vertex_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_surf_cell.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_surf_cell_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_surf_vertex.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_surf_vertex_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_vertex.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_vertex_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/line2_cell.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/line2_cell_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/line2_mat_cell.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/line2_mat_cell_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/line2_mat_vertex.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/line2_mat_vertex_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/line2_surf_cell.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/line2_surf_cell_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/line2_surf_vertex.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/line2_surf_vertex_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/line2_vertex.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/line2_vertex_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_bc_cell.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_bc_cell_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_bc_vertex.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_bc_vertex_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_cell.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_cell_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_fault_cell.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_fault_cell_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_fault_vertex.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_fault_vertex_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_mat_cell.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_mat_cell_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_mat_vertex.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_mat_vertex_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_points_vertex_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_surf_cell.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_surf_cell_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_surf_vertex.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_surf_vertex_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_vertex.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_vertex_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_bc_cell.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_bc_cell_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_bc_vertex.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_bc_vertex_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_cell.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_cell.xmf
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_cell_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_fault_cell.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_fault_cell_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_fault_vertex.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_fault_vertex_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_mat_cell.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_mat_cell_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_mat_vertex.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_mat_vertex_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_points_vertex_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_surf_cell.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_surf_cell_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_surf_vertex.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_surf_vertex_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_vertex.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_vertex.xmf
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_vertex_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_bc_cell.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_bc_cell_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_bc_vertex.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_bc_vertex_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_cell.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_cell.xmf
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_cell_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_fault_cell.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_fault_cell_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_fault_vertex.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_fault_vertex_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_mat_cell.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_mat_cell_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_mat_vertex.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_mat_vertex_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_points_vertex_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_surf_cell.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_surf_cell_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_surf_vertex.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_surf_vertex_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_vertex.h5
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_vertex.xmf
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_vertex_t10.vtk
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/faults/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/feassemble/TestElasticityExplicit.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/feassemble/TestElasticityExplicitLgDeform.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/friction/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/materials/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/materials/testmaterials.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/mpi/Makefile.am
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/mpi/testmpi.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/problems/TestTimeStepAdapt.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/problems/TestTimeStepUniform.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/problems/TestTimeStepUser.py
   short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/utils/Makefile.am
Log:
Merge from v1.7-trunk.

Modified: short/3D/PyLith/branches/pylith-scecdynrup/README
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/README	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/README	2012-11-01 17:04:11 UTC (rev 20976)
@@ -3,7 +3,7 @@
 not permitted.
 
 
-We are pleased to announce release of PyLith version 1.6.3
+We are pleased to announce release of PyLith version 1.8.0
 
 Please submit bug reports via the World Wide Web at:
     http://geodynamics.org/roundup    
@@ -39,34 +39,230 @@
 TIPS
 ======================================================================
 
-  * For most crustal deformation problems, we recommend using the
-    Additive Schwartz preconditioner via the following PETSc
-    settings:
+  * If the linear solve takes more than a few hundred iterations for a
+    large problem (use the --petsc.ksp_monitor=1 and
+    --petsc.ksp_view=1 to see diagnostic information for the solver),
+    this is usually an indication that something is wrong. Either the
+    preconditioner is inappropriate for the type of problem you are
+    solving or there is an error in the problem setup.
 
-      - Command line arguments
 
-        --petsc.pc_type=asm
-        --petsc.ksp_max_it=400
-        --petsc.ksp_gmres_restart=100
-        --petsc.ksp_rtol=1.0e-08
+======================================================================
+MIGRATING FROM VERSION 1.7 TO 1.8
+======================================================================
 
-      - pylithapp.cfg (or your other favorite .cfg file)
+Explicit time stepping with a non-lumped Jacobian has been eliminated
+and ExplicitLumped is now Explicit.
 
-        [pylithapp.petsc]
-        pc_type = asm
-        ksp_max_it = 400
-        ksp_gmres_restart = 100
-        ksp_rtol = 1.0e-08
+  Old setting
+  ------------------------------------------------
+  formulation = pylith.problems.ExplicitLumped
+  formulation = pylith.problems.ExplicitLumpedTri3
+  formulation = pylith.problems.ExplicitLumpedTet4
 
-  * If the solve takes more than a few hundred iterations for a large
-    problem (use the --petsc.ksp_monitor=1 and --petsc.ksp_view=1 to
-    see diagnostic information for the solver), this is usually an
-    indication that something is wrong. Either the preconditioner is
-    inappropriate for the type of problem you are solving or there is
-    an error in the problem setup.
+  New setting
+  ------------------------------------------------
+  formulation = pylith.problems.Explicit
+  formulation = pylith.problems.ExplicitTri3
+  formulation = pylith.problems.ExplicitTet4
 
+----------------------------------------------------------------------
+Version 1.8.0
+----------------------------------------------------------------------
 
+* New features
+
+  * Additional flexibility in PETSc nonlinear solver parameters
+
+    The default line search type for the PETSc nonlinear (SNES) solver
+    is a customized backtrace method included in PyLith. The user may
+    now select alternative line search types (basic, bt, l2, cp)
+    available in PETSc.
+
+  * Post-processing utility pylith_eqinfo to compute slip information.
+
+    This post-processing utility computes the moment magnitude,
+    seismic moment, seismic potency, and average slip at
+    user-specified snapshots in time from PyLith HDF5 output.
+    Information is given for each fault and across all faults. See
+    the Post-processing section in the Running PyLith
+    chapter of the manual for more information.
+
+  * Computation of the stable time step for explicit time-stepping.
+
+    The stable time step for explicit time-stepping is computed based
+    on the CFL condition and minimum edge lengths. For triangular and
+    tetrahedral cells we also account for a reduction in the stable
+    time step due to distorted cells (e.g., slivers and needles). See
+    the Stable time step section in the Materials chapter of the
+    manual for more information.
+
+  * Output the stable time step for each cell in a material.
+ 
+    Output cell_info_fields "stable_dt_implicit" and
+    "stable_dt_explicit" can be included in material output.
+
+  * Added netCDF Python module to binary distribution to provide
+    Python interface to NetCDF files, including Exodus-II files. This
+    is used in a new meshing example for setting the discretization
+    size using an Exodus-II vertex field. Note that this required
+    updating the NetCDF library.
+
+* Bug fixes
+
+  - Fixed omission of synchronization of stable time step computation
+    among processors. Minimum time step among all processors rather
+    than local value should be used.
+
+  - Fixed density scale not being set in NondimElasticQuasistatic.
+    Density scale should be set based on shear modulus, length scale,
+    and relaxation time.
+
+  - Added warning when initial state for a fault constitutive model is
+    not set. If an initial state value is not given, for rate-state
+    friction using a default value of L / reference slip rate. Other
+    fault constitutive models use a default value of 0.0 for initial
+    state variables.
+
+  - Separated tensor components in Xdmf files to avoid confusion. The
+    corresponding HDF5 files remain unchanged.
+
+  - Removed explicit time-stepping formulation with non-lumped
+    Jacobian. This formulation was not setup properly for spontaneous
+    rupture models and is too computationally expensive for practical
+    problems. The ExplicitLumped* formulations are now simply Explicit*.
+
+  - Fixed parallel bug that resulting in inconsistent orientation of
+    fault slip directions. Flipping the fault orientation was not
+    synchronized across processors. This bug would only appear when
+    running in parallel with faults that change from dipping in one
+    direction to dipping in the opposite direction.
+
+  - Fixed bug in setting name of field in OutputSolnPoints when output
+    multiple fields. This bug caused the name of the first output
+    field to be used and output data to overwrite each other.
+
 ======================================================================
+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. Consequently, the
+    output info fields are also different and follow the naming scheme
+    used in the other time-dependent 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/branches/pylith-scecdynrup/TODO
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/TODO	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/TODO	2012-11-01 17:04:11 UTC (rev 20976)
@@ -11,54 +11,10 @@
     pylith step02.cfg ../../../share/debug_malloc.cfg
     pylith step04.cfg ../../../share/debug_malloc.cfg
 
-* Poor trap of detecting point outside the domain in OutputSolnPoints.
-
 ======================================================================
 CURRENT ISSUES/PRIORITIES
 ======================================================================
 
-* Add h5py to PyLith binary
-
-* Use HDF5/h5py in automated full-scale tests.
-
-* Setup fieldsplit for SolverNonlinear [Matt]
-
-* 2-D materials
-
-  + PowerLawPlaneStrain (power law plane strain ) [Charles]
-
-* Manual
-
-  - Order of tensor components for Xdmf files
-  - Drucker Prager fit to yield surface
-  - Drucker Prager allow tensile yield
-  - Output soln points [DONE]
-    + Interpolation [DONE]
-    + PointsList [DONE]
-  - Linear prestep
-    + Turned on by default
-    + Static solution is linear prestep
-    + Inelastic solution requires increment in driving forces
-  - User specified start time (default is 0.0) [DONE]
-  - FaultCohesiveDyn
-    + Add switch for turning on/off zero tractions for fault opening [DONE]
-    + Switched to time-dependent formulation for prescribed tractions [DONE]
-    + Slip-weakening healing parameter [DONE]
-    + Changed regularization of rate and state friction [DONE]
-  - Green's functions
-    + GreensFns problem [DONE]
-    + FaultCohesiveImpulses [DONE]
-  - URL for PyLith FAQ for Troubleshooting (Section 5.7)
-  - Update field split settings (Section 5.1)
-  - PETSc w/CUDA (Add to Section 5.1)
-  - Update Components appendix [DONE?, need to check]
-  - FIATSimplex, FIATLagrange
-     cell.shape -> cell.dimension
-  - Examples/Tutorials
-    + Table with concepts/features
-    + examples/3d/hex8/step20 (dike opening)
-    + examples/2d/greensfns
-
 * configure
   
   + Check compatibility of PyLith options with PETSc
@@ -76,6 +32,10 @@
     Add elasticPrestep() to Formulation (called from Problem)
     Remove solnIncr, keep setField()
 
+* Prescribed fault with opening has zero tractions (step20) Appears to
+  be a feature/artifact associated with how we implement slip with
+  Lagrange multipliers.
+
 ======================================================================
 1.8.0
 ======================================================================

Modified: short/3D/PyLith/branches/pylith-scecdynrup/applications/utilities/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/applications/utilities/Makefile.am	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/applications/utilities/Makefile.am	2012-11-01 17:04:11 UTC (rev 20976)
@@ -19,6 +19,7 @@
 bin_SCRIPTS = \
 	pylithinfo \
 	pylith_genxdmf \
+	pylith_eqinfo \
 	powerlaw_gendb.py
 
 
@@ -36,6 +37,10 @@
 	$(do_build) <  $(srcdir)/pylith_genxdmf.in > $@ || (rm -f $@ && exit 1)
 	chmod +x $@
 
+pylith_eqinfo:  $(srcdir)/pylith_eqinfo.in Makefile
+	$(do_build) <  $(srcdir)/pylith_eqinfo.in > $@ || (rm -f $@ && exit 1)
+	chmod +x $@
+
 install-binSCRIPTS: $(bin_SCRIPTS)
 	@$(NORMAL_INSTALL)
 	test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)"
@@ -47,14 +52,24 @@
 	    $(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 \
+	pylith_eqinfo.in \
+	powerlaw_gendb.py
 
-CLEANFILES = $(bin_SCRIPTS)
+CLEANFILES = \
+	pylithinfo \
+	pylith_genxdmf \
+	pylith_eqinfo
 
 
 # End of file 

Copied: short/3D/PyLith/branches/pylith-scecdynrup/applications/utilities/pylith_eqinfo.in (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/applications/utilities/pylith_eqinfo.in)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/applications/utilities/pylith_eqinfo.in	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/applications/utilities/pylith_eqinfo.in	2012-11-01 17:04:11 UTC (rev 20976)
@@ -0,0 +1,54 @@
+#!@INTERPRETER@
+# -*- 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.
+#
+# ======================================================================
+#
+
+# This script creates a Python file with earthquake rupture
+# information computed from PyLith output. The rupture information
+# includes:
+#
+#   Rupture area
+#   Average slip
+#   Seismic potency
+#   Seismic moment
+#   Moment magnitude
+#
+# Usage: pylith_eqinfo [command line arguments]
+#
+# NOTE: Works with HDF5 files, not VTK files.
+
+__requires__ = "PyLith"
+
+
+# ----------------------------------------------------------------------
+if __name__ == "__main__":
+
+    # re-create the PYTHONPATH at 'configure' time
+    import os.path, sys, site
+    path = '@PYTHONPATH@'.split(':')
+    path.reverse()
+    for directory in path:
+        if directory:
+            directory = os.path.abspath(directory)
+            sys.path.insert(1, directory)
+            site.addsitedir(directory)
+
+    from pylith.apps.EqInfoApp import EqInfoApp
+    from pyre.applications import start
+    start(applicationClass=EqInfoApp)
+
+# End of file 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/configure.ac
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/configure.ac	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/configure.ac	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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.8.0], [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
@@ -312,14 +312,15 @@
 		tests_auto/Makefile
 		tests_auto/1d/Makefile
 		tests_auto/1d/line2/Makefile
-		tests_auto/1d/line3/Makefile
 		tests_auto/2d/Makefile
 		tests_auto/2d/tri3/Makefile
 		tests_auto/2d/quad4/Makefile
 		tests_auto/petsc/Makefile
+		tests_auto/eqinfo/Makefile
 		tests/Makefile
 		tests/2d/Makefile
 		tests/2d/maxwell/Makefile
+		tests/2d/powerlaw/Makefile
 		tests/2d/slipdir/Makefile
 		tests/2d/frictionslide/Makefile
 		tests/3d/Makefile
@@ -367,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
@@ -385,6 +381,8 @@
 		examples/meshing/surface_nurbs/dem/ulines/Makefile
 		examples/meshing/surface_nurbs/dem/vlines/Makefile
 		examples/meshing/surface_nurbs/triangles/Makefile
+		examples/meshing/surface_nurbs/merge_surfs/Makefile
+		examples/meshing/cubit_cellsize/Makefile
 		templates/Makefile
 		share/Makefile
 		])

Modified: short/3D/PyLith/branches/pylith-scecdynrup/doc/developer/howto_mergefromstable.txt
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/developer/howto_mergefromstable.txt	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/developer/howto_mergefromstable.txt	2012-11-01 17:04:11 UTC (rev 20976)
@@ -7,7 +7,7 @@
 svn log | less
 
 # Merge from stable branch.
-svn merge -r REV_FROM_LAST_MERGE:HEAD svn+ssh://svn@geodynamics.org/cig/short/3D/PyLith/branches/v1.6-stable .
+svn merge -r REV_FROM_LAST_MERGE:HEAD svn+ssh://svn@geodynamics.org/cig/short/3D/PyLith/branches/v1.7-stable .
 
 
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/doc/presentations/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/presentations/Makefile.am	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/presentations/Makefile.am	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/doc/presentations/logos/cig_blackfg.png (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/doc/presentations/logos/cig_blackfg.png)
===================================================================
(Binary files differ)

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

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

Copied: short/3D/PyLith/branches/pylith-scecdynrup/doc/releasenotes/announce_v1.7.0.txt (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/doc/releasenotes/announce_v1.7.0.txt)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/releasenotes/announce_v1.7.0.txt	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/releasenotes/announce_v1.7.0.txt	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/doc/releasenotes/announce_v1.7.1.txt (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/doc/releasenotes/announce_v1.7.1.txt)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/releasenotes/announce_v1.7.1.txt	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/releasenotes/announce_v1.7.1.txt	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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.
+

Copied: short/3D/PyLith/branches/pylith-scecdynrup/doc/releasenotes/announce_v1.8.0.txt (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/doc/releasenotes/announce_v1.8.0.txt)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/releasenotes/announce_v1.8.0.txt	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/releasenotes/announce_v1.8.0.txt	2012-11-01 17:04:11 UTC (rev 20976)
@@ -0,0 +1,100 @@
+Greetings,
+
+I am pleased to announce the release of PyLith 1.8.0, a finite-element
+code designed to solve dynamic elastic problems and quasi-static
+viscoelastic problems in tectonic deformation.
+
+This release adds estimating the stable time step for explicit time
+stepping, adds a post-processing utility for computing the moment
+magnitude and average slip for any fault output snapshot, includes a
+couple of additional examples of CUBIT meshing techniques, fixes
+several bugs in PyLith v1.7.1 and corrects some typos in the
+manual. We strongly recommend all users of previous PyLith releases
+switch to this latest release.
+
+See the README file for changes required to switch to the v1.8.0
+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.8.0
+
+* New features
+
+  * Additional flexibility in PETSc nonlinear solver parameters
+
+    The default line search type for the PETSc nonlinear (SNES) solver
+    is a customized backtrace method included in PyLith. The user may
+    now select alternative line search types (basic, bt, l2, cp)
+    available in PETSc.
+
+  * Post-processing utility pylith_eqinfo to compute slip information.
+
+    This post-processing utility computes the moment magnitude,
+    seismic moment, seismic potency, and average slip at
+    user-specified snapshots in time from PyLith HDF5 output.
+    Information is given for each fault and across all faults. See
+    the Post-processing section of the manual in the Running PyLith
+    chapter for more information.
+
+  * Computation of the stable time step for explicit time-stepping.
+
+    The stable time step for explicit time-stepping is computed based
+    on the CFL condition and minimum edge lengths. For triangular and
+    tetrahedral cells we also account for a reduction in the stable
+    time step due to distorted cells (e.g., slivers and needles). See
+    the Stable time step section in the Materials chapter of the
+    manual for more information.
+
+  * Output the stable time step for each cell in a material.
+ 
+    Output cell_info_fields "stable_dt_implicit" and
+    "stable_dt_explicit" can be included in material output.
+
+  * Added netCDF Python module to binary distribution to provide
+    Python interface to NetCDF files, including Exodus-II files. This
+    is used in a new meshing example for setting the discretization
+    size using an Exodus-II vertex field. Note that this required
+    updating the NetCDF library.
+
+* Bug fixes
+
+  - Fixed omission of synchronization of stable time step computation
+    among processors. Minimum time step among all processors rather
+    than local value should be used.
+
+  - Fixed density scale not being set in NondimElasticQuasistatic.
+    Density scale should be set based on shear modulus, length scale,
+    and relaxation time.
+
+  - Added warning when initial state for a fault constitutive model is
+    not set. If an initial state value is not given, for rate-state
+    friction using a default value of L / reference slip rate. Other
+    fault constitutive models use a default value of 0.0 for initial
+    state variables.
+
+  - Separated tensor components in Xdmf files to avoid confusion. The
+    corresponding HDF5 files remain unchanged.
+
+  - Removed explicit time-stepping formulation with non-lumped
+    Jacobian. This formulation was not setup properly for spontaneous
+    rupture models and is too computationally expensive for practical
+    problems. The ExplicitLumped* formulations are now simply Explicit*.
+
+  - Fixed parallel bug that resulting in inconsistent orientation of
+    fault slip directions. Flipping the fault orientation was not
+    synchronized across processors. This bug would only appear when
+    running in parallel with faults that change from dipping in one
+    direction to dipping in the opposite direction.
+
+  - Fixed bug in setting name of field in OutputSolnPoints when output
+    multiple fields. This bug caused the name of the first output
+    field to be used and output data to overwrite each other.
+

Modified: short/3D/PyLith/branches/pylith-scecdynrup/doc/releasenotes/checklist.txt
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/releasenotes/checklist.txt	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/releasenotes/checklist.txt	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/doc/userguide/benchmarks/benchmarks.lyx
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/benchmarks/benchmarks.lyx	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/benchmarks/benchmarks.lyx	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,197 +1,197 @@
-#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:Benchmarks"
-
-\end_inset
-
-Benchmarks
-\end_layout
-
-\begin_layout Section
-Overview
-\end_layout
-
-\begin_layout Standard
-The Crustal Deformation Modeling and Earthquake Source Physics Focus Groups
- within the Southern California Earthquake Center and the Short-Term Tectonics
- Working Group within CIG have developed a suite of benchmarks to test the
- accuracy and performance of 3D numerical codes for quasi-static crustal
- deformation and earthquake rupture dynamics.
- The benchmark definitions for the quasi-static crustal deformation benchmarks
- are posted on the CIG website at Short-Term Tectonics Benchmarks 
-\begin_inset Flex URL
-status open
-
-\begin_layout Plain Layout
-
-geodynamics.org/cig/workinggroups/short/workarea/benchmarks/
-\end_layout
-
-\end_inset
-
- and the definitions for the earthquake rupture benchmarks are posted on
- the SCEC website 
-\begin_inset Flex URL
-status open
-
-\begin_layout Plain Layout
-
-scecdata.usc.edu/cvws/cgi-bin/cvws.cgi
-\end_layout
-
-\end_inset
-
-.
- This suite of benchmarks permits evaluating the relative performance of
- different types of basis functions, quadrature schemes, and discretizations
- for geophysical applications.
- The files needed to run the 3D benchmarks are in the CIG SVN Repository
- 
-\begin_inset Flex URL
-status open
-
-\begin_layout Plain Layout
-
-geodynamics.org/svn/cig/short/3D/PyLith/benchmarks
-\end_layout
-
-\end_inset
-
-.
- In addition to evaluating the efficiency and accuracy of numerical codes,
- the benchmarks also make good test problems, where users can perform simulation
-s based on actual geophysical problems.
- The benchmarks are performed at various resolutions and using different
- element types.
- By comparing the runtime and accuracy for different resolutions and element
- types, users can evaluate which combination will be best for their problems
- of interest.
-\end_layout
-
-\begin_layout Standard
-\begin_inset CommandInset include
-LatexCommand input
-filename "strikeslip/strikeslip.lyx"
-
-\end_inset
-
-
-\begin_inset CommandInset include
-LatexCommand input
-filename "savageprescott/savageprescott.lyx"
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Section
-SCEC Dynamic Rupture Benchmarks
-\end_layout
-
-\begin_layout Standard
-The SCEC website 
-\begin_inset Flex URL
-status open
-
-\begin_layout Plain Layout
-
-scecdata.usc.edu/cvws/cgi-bin/cvws.cgi
-\end_layout
-
-\end_inset
-
- includes a graphical user interface for examining the benchmark results.
- Benchmark results for PyLith are available for TPV205-2D (horizontal slice
- 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),
- 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.
- 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 comapred 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
-\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:Benchmarks"
+
+\end_inset
+
+Benchmarks
+\end_layout
+
+\begin_layout Section
+Overview
+\end_layout
+
+\begin_layout Standard
+The Crustal Deformation Modeling and Earthquake Source Physics Focus Groups
+ within the Southern California Earthquake Center and the Short-Term Tectonics
+ Working Group within CIG have developed a suite of benchmarks to test the
+ accuracy and performance of 3D numerical codes for quasi-static crustal
+ deformation and earthquake rupture dynamics.
+ The benchmark definitions for the quasi-static crustal deformation benchmarks
+ are posted on the CIG website at Short-Term Tectonics Benchmarks 
+\begin_inset Flex URL
+status open
+
+\begin_layout Plain Layout
+
+geodynamics.org/cig/workinggroups/short/workarea/benchmarks/
+\end_layout
+
+\end_inset
+
+ and the definitions for the earthquake rupture benchmarks are posted on
+ the SCEC website 
+\begin_inset Flex URL
+status open
+
+\begin_layout Plain Layout
+
+scecdata.usc.edu/cvws/cgi-bin/cvws.cgi
+\end_layout
+
+\end_inset
+
+.
+ This suite of benchmarks permits evaluating the relative performance of
+ different types of basis functions, quadrature schemes, and discretizations
+ for geophysical applications.
+ The files needed to run the 3D benchmarks are in the CIG SVN Repository
+ 
+\begin_inset Flex URL
+status open
+
+\begin_layout Plain Layout
+
+geodynamics.org/svn/cig/short/3D/PyLith/benchmarks
+\end_layout
+
+\end_inset
+
+.
+ In addition to evaluating the efficiency and accuracy of numerical codes,
+ the benchmarks also make good test problems, where users can perform simulation
+s based on actual geophysical problems.
+ The benchmarks are performed at various resolutions and using different
+ element types.
+ By comparing the runtime and accuracy for different resolutions and element
+ types, users can evaluate which combination will be best for their problems
+ of interest.
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "strikeslip/strikeslip.lyx"
+
+\end_inset
+
+
+\begin_inset CommandInset include
+LatexCommand input
+filename "savageprescott/savageprescott.lyx"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+SCEC Dynamic Rupture Benchmarks
+\end_layout
+
+\begin_layout Standard
+The SCEC website 
+\begin_inset Flex URL
+status open
+
+\begin_layout Plain Layout
+
+scecdata.usc.edu/cvws/cgi-bin/cvws.cgi
+\end_layout
+
+\end_inset
+
+ includes a graphical user interface for examining the benchmark results.
+ Benchmark results for PyLith are available for TPV205-2D (horizontal slice
+ 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),
+ 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.
+ 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
+\end_document

Modified: short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/benchmarks/savageprescott/savageprescott.lyx
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/benchmarks/savageprescott/savageprescott.lyx	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/benchmarks/savageprescott/savageprescott.lyx	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,562 +1,530 @@
-#LyX 1.6.3 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 0
-\use_esint 0
-\cite_engine basic
-\use_bibtopic false
-\paperorientation portrait
-\leftmargin 1in
-\topmargin 1in
-\rightmargin 1in
-\bottommargin 1in
-\secnumdepth 3
-\tocdepth 3
-\paragraph_separation indent
-\defskip medskip
-\quotes_language english
-\papercolumns 1
-\papersides 1
-\paperpagestyle default
-\tracking_changes false
-\output_changes false
-\author "" 
-\author "" 
-\end_header
-
-\begin_body
-
-\begin_layout Section
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:benchmarks:savageprescott"
-
-\end_inset
-
-Savage and Prescott Benchmark
-\end_layout
-
-\begin_layout Standard
-This benchmark problem computes the viscoelastic (Maxwell) relaxation of
- stresses from repeated infinite, strike-slip earthquakes in 3D without
- gravity.
- The files needed to run the benchmark may be found at 
-\begin_inset Flex URL
-status collapsed
-
-\begin_layout Plain Layout
-
-geodynamics.org/svn/cig/short/2.5D/benchmarks/savageprescott
-\end_layout
-
-\end_inset
-
-.
- An analytical solution to this problem is described by Savage and Prescott
- 
-\begin_inset CommandInset citation
-LatexCommand cite
-key "Savage:Prescott:1978"
-
-\end_inset
-
-, which provides a simple way to check our numerical solution.
- A python utility code is provided in the utils directory to compute the
- analytical solution.
- Although this problem is actually 2.5D (infinite along-strike), we solve
- it using a 3D finite element model.
-\end_layout
-
-\begin_layout Subsection
-Problem Description
-\end_layout
-
-\begin_layout Standard
-Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:benchmark:savageprescott:geometry"
-
-\end_inset
-
- shows the geometry of the problem, as described by 
-\begin_inset CommandInset citation
-LatexCommand cite
-key "Savage:Prescott:1978"
-
-\end_inset
-
-.
- The analytical solution describes the surface deformation due to repeated
- earthquakes on an infinite strike-slip fault embedded in an elastic layer
- overlying a Maxwell viscoelastic half-space.
- The upper portion of the fault (red in the figure) is locked between earthquake
-s, while the lower portion (blue in the figure) creeps at plate velocity.
- At regular recurrence intervals, the upper portion of the fault abruptly
- slips by an amount equal to the plate velocity multiplied by the recurrence
- interval, thus 'catching up' with the lower part of the fault.
-\end_layout
-
-\begin_layout Standard
-There are some differences between the analytical solution and our numerical
- representation.
- First, the analytical solution represents the earthquake cycle as the superposi
-tion of uniform fault creep and an elementary earthquake cycle.
- Uniform fault creep is simply the uniform movement of the two plates past
- each other at plate velocity.
- For the elementary earthquake cycle, no slip occurs below the locked portion
- of the fault (blue portion in the figure).
- On the locked (red) portion of the fault, backslip equal to plate velocity
- occurs until the earthquake recurrence interval, at which point abrupt
- forward slip occurs.
- In the finite element solution, we perform the simulation as described
- in the figure.
- Velocity boundary conditions are applied at the extreme edges of the model
- to simulate block motion, steady creep is applied along the blue portion
- of the fault, and regular earthquakes are applied along the upper portion
- of the fault.
- It takes several earthquake cycles for the velocity boundary conditions
- to approximate the steady flow due to steady block motion, so we would
- not expect the analytical and numerical solutions to match until several
- earthquakes have occurred.
- Another difference lies in the dimensions of the domain.
- The analytical solution assumes an infinite strike-slip fault in an elastic
- layer overlying a Maxwell viscoelastic half-space.
- In our finite element model we are restricted to finite dimensions.
- We therefore extend the outer boundaries far enough from the region of
- interest to approximate boundaries at infinity.
-\end_layout
-
-\begin_layout Standard
-Due to the difficulties in representing solutions in an infinite domain,
- there are several meshes that have been tested for this problem.
- 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
- PyLith.
-\end_layout
-
-\begin_layout Description
-Domain The domain for this mesh spans the region
-\begin_inset Formula \begin{gather*}
--1000\leq x\leq1000\ km,\\
--500\leq y\leq500\ km,\\
--400\ km\leq z\leq0.\end{gather*}
-
-\end_inset
-
-The top (elastic) layer occupies the region 
-\begin_inset Formula $-40\ km\ \leq z\leq0$
-\end_inset
-
- and the bottom (viscoelastic) layer occupies the region 
-\begin_inset Formula $-400\ km\ \leq z\leq-40\ km$
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Description
-Material
-\begin_inset space ~
-\end_inset
-
-properties The material is a Poisson solid with a shear modulus (
-\begin_inset Formula $\mu$
-\end_inset
-
-) of 30 GPa.
- The domain is modeled using an elastic isotropic material for the top layer
- and a Maxwell viscoelastic material for the bottom layer.
- The bottom layer has a viscosity (
-\begin_inset Formula $\eta$
-\end_inset
-
-) of 4.73364e19 Pa-s, yielding a relaxation time (
-\begin_inset Formula $2\eta/\mu$
-\end_inset
-
-) of 100 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*}
-x=0\ km,\\
--500\leq y\leq500\ km,\\
--40\ km\leq z\leq0.\end{gather*}
-
-\end_inset
-
-The locked portion of the fault (red section in Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:benchmark:savageprescott:geometry"
-
-\end_inset
-
-) extends from 
-\begin_inset Formula $-20\: km\leq z\leq0$
-\end_inset
-
-, while the creeping section (blue) extends from 
-\begin_inset Formula $-40\: km\leq z\leq0$
-\end_inset
-
-.
- Along the line where the two sections coincide (
-\begin_inset Formula $z=-20\: km$
-\end_inset
-
-), half of the coseismic displacement and half of the steady creep is applied
- (see 
-\family typewriter
-parameters/finalslip_rupture.spatialdb
-\family default
- and 
-\family typewriter
-parameters/sliprate_creep.spatialdb
-\family default
-).
-\end_layout
-
-\begin_layout Description
-Boundary
-\begin_inset space ~
-\end_inset
-
-conditions On the bottom boundary, vertical displacements are set to zero,
- while on the y-boundaries the x-displacements are set to zero.
- On the x-boundaries, the x-displacements are set to zero, while constant
- velocities of +/- 1 cm/yr are applied in the y-direction, giving a relative
- plate motion of 2 cm/year.
-\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.
- An inner region is then put through one level of refinement, so that near
- the center of the mesh the resolution is 10 km.
- All meshes were generated with CUBIT.
-\end_layout
-
-\begin_layout Description
-Basis
-\begin_inset space ~
-\end_inset
-
-functions We use trilinear hexahedral cells.
-\end_layout
-
-\begin_layout Description
-Solution We compute the surface displacements and compare these to the analytica
-l solution 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:benchmark:savageprescott:solution"
-
-\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/model_descript.eps
-	scale 33
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Problem description for the Savage and Prescott strike-slip benchmark problem.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:benchmark:savageprescott:geometry"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Running the Benchmark
-\end_layout
-
-\begin_layout Standard
-After checking out the benchmark files from the CIG SVN repository, change
- to the 
-\family typewriter
-meshes
-\family default
- directory.
- Decompress the gzipped files in the 
-\family typewriter
-mesh
-\family default
- directory,
-\end_layout
-
-\begin_layout LyX-Code
-gunzip *.gz
-\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.
- There are a number of 
-\family typewriter
-.cfg
-\family default
- files corresponding to the different meshes, as well as a 
-\family typewriter
-pylithapp.cfg
-\family default
- file defining parameters common to all problems, and a 
-\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
-\family default
-), and 
-\family typewriter
-timedep.cfg
-\family default
-.
- There are also scripts for each mesh.
- You can then run the problem either as
-\end_layout
-
-\begin_layout LyX-Code
-pylith spbm_hex8_graded3_20km.cfg timedep.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
-\family default
- directory in the mesh-specific subdirectory.
- 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 
-\family typewriter
-utils
-\family default
- directory and running the 
-\family typewriter
-savpres_ss.py
-\family default
- script.
- This will produce comma-delimited files for displacements and velocities
- (
-\family typewriter
-savpres_displ.csv
-\family default
-, 
-\family typewriter
-savpres_vel.csv
-\family default
-) that are easy to use with a plotting package.
- There is an additional script in the 
-\family typewriter
-utils
-\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,
-\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
-
-\begin_layout Standard
-Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:benchmark:savageprescott:solution"
-
-\end_inset
-
- shows the computed surface displacements for the 10th earthquake cycle
- compared with the analytical solution.
- The profile results were obtained as described above, and then all results
- (analytical and numerical) were referenced to the displacements immediately
- 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.
- 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
- is poor for early earthquake cycles, due to the differences in simulating
- the problem, as noted above.
-\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/soln_profiles.eps
-	scale 66
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Displacement profiles perpendicular to the fault for a PyLith simulation
- with hex8 cells and the analytical solution for earthquake cycle 10.
- 
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:benchmark:savageprescott:solution"
-
-\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:benchmarks:savageprescott"
+
+\end_inset
+
+Savage and Prescott Benchmark
+\end_layout
+
+\begin_layout Standard
+This benchmark problem computes the viscoelastic (Maxwell) relaxation of
+ stresses from repeated infinite, strike-slip earthquakes in 3D without
+ gravity.
+ The files needed to run the benchmark may be found at 
+\begin_inset Flex URL
+status collapsed
+
+\begin_layout Plain Layout
+
+geodynamics.org/svn/cig/short/2.5D/benchmarks/savageprescott
+\end_layout
+
+\end_inset
+
+.
+ An analytical solution to this problem is described by Savage and Prescott
+ 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "Savage:Prescott:1978"
+
+\end_inset
+
+, which provides a simple way to check our numerical solution.
+ A python utility code is provided in the utils directory to compute the
+ analytical solution.
+ Although this problem is actually 2.5D (infinite along-strike), we solve
+ it using a 3D finite element model.
+\end_layout
+
+\begin_layout Subsection
+Problem Description
+\end_layout
+
+\begin_layout Standard
+Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:benchmark:savageprescott:geometry"
+
+\end_inset
+
+ shows the geometry of the problem, as described by 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "Savage:Prescott:1978"
+
+\end_inset
+
+.
+ The analytical solution describes the surface deformation due to repeated
+ earthquakes on an infinite strike-slip fault embedded in an elastic layer
+ overlying a Maxwell viscoelastic half-space.
+ The upper portion of the fault (red in the figure) is locked between earthquake
+s, while the lower portion (blue in the figure) creeps at plate velocity.
+ At regular recurrence intervals, the upper portion of the fault abruptly
+ slips by an amount equal to the plate velocity multiplied by the recurrence
+ interval, thus 'catching up' with the lower part of the fault.
+\end_layout
+
+\begin_layout Standard
+There are some differences between the analytical solution and our numerical
+ representation.
+ First, the analytical solution represents the earthquake cycle as the superposi
+tion of uniform fault creep and an elementary earthquake cycle.
+ Uniform fault creep is simply the uniform movement of the two plates past
+ each other at plate velocity.
+ For the elementary earthquake cycle, no slip occurs below the locked portion
+ of the fault (blue portion in the figure).
+ On the locked (red) portion of the fault, backslip equal to plate velocity
+ occurs until the earthquake recurrence interval, at which point abrupt
+ forward slip occurs.
+ In the finite element solution, we perform the simulation as described
+ in the figure.
+ Velocity boundary conditions are applied at the extreme edges of the model
+ to simulate block motion, steady creep is applied along the blue portion
+ of the fault, and regular earthquakes are applied along the upper portion
+ of the fault.
+ It takes several earthquake cycles for the velocity boundary conditions
+ to approximate the steady flow due to steady block motion, so we would
+ not expect the analytical and numerical solutions to match until several
+ earthquakes have occurred.
+ Another difference lies in the dimensions of the domain.
+ The analytical solution assumes an infinite strike-slip fault in an elastic
+ layer overlying a Maxwell viscoelastic half-space.
+ In our finite element model we are restricted to finite dimensions.
+ We therefore extend the outer boundaries far enough from the region of
+ interest to approximate boundaries at infinity.
+\end_layout
+
+\begin_layout Standard
+Due to the difficulties in representing solutions in an infinite domain,
+ there are several meshes that have been tested for this problem.
+ 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 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 near the fault 
+\begin_inset Newline linebreak
+\end_inset
+
+(
+\family typewriter
+meshes/hex8_6.7km.exo.gz
+\family default
+), 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*}
+-1000\leq x\leq1000\ km,\\
+-500\leq y\leq500\ km,\\
+-400\ km\leq z\leq0.
+\end{gather*}
+
+\end_inset
+
+The top (elastic) layer occupies the region 
+\begin_inset Formula $-40\ km\ \leq z\leq0$
+\end_inset
+
+ and the bottom (viscoelastic) layer occupies the region 
+\begin_inset Formula $-400\ km\ \leq z\leq-40\ km$
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Description
+Material
+\begin_inset space ~
+\end_inset
+
+properties The material is a Poisson solid with a shear modulus (
+\begin_inset Formula $\mu$
+\end_inset
+
+) of 30 GPa.
+ The domain is modeled using an elastic isotropic material for the top layer
+ and a Maxwell viscoelastic material for the bottom layer.
+ The bottom layer has a viscosity (
+\begin_inset Formula $\eta$
+\end_inset
+
+) of 2.36682e+19 Pa-s, yielding a relaxation time (
+\begin_inset Formula $2\eta/\mu$
+\end_inset
+
+) 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*}
+x=0\ km,\\
+-500\leq y\leq500\ km,\\
+-40\ km\leq z\leq0.
+\end{gather*}
+
+\end_inset
+
+The locked portion of the fault (red section in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:benchmark:savageprescott:geometry"
+
+\end_inset
+
+) extends from 
+\begin_inset Formula $-20\: km\leq z\leq0$
+\end_inset
+
+, while the creeping section (blue) extends from 
+\begin_inset Formula $-40\: km\leq z\leq0$
+\end_inset
+
+.
+ Along the line where the two sections coincide (
+\begin_inset Formula $z=-20\: km$
+\end_inset
+
+), half of the coseismic displacement and half of the steady creep is applied
+ (see 
+\family typewriter
+finalslip.spatialdb
+\family default
+ and 
+\family typewriter
+creeprate.spatialdb
+\family default
+).
+\end_layout
+
+\begin_layout Description
+Boundary
+\begin_inset space ~
+\end_inset
+
+conditions On the bottom boundary, vertical displacements are set to zero,
+ while on the y-boundaries the x-displacements are set to zero.
+ On the x-boundaries, the x-displacements are set to zero, while constant
+ velocities of +/- 1 cm/yr are applied in the y-direction, giving a relative
+ plate motion of 2 cm/year.
+\end_layout
+
+\begin_layout Description
+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 6.7 km.
+ All meshes were generated with CUBIT.
+\end_layout
+
+\begin_layout Description
+Basis
+\begin_inset space ~
+\end_inset
+
+functions We use trilinear hexahedral cells.
+\end_layout
+
+\begin_layout Description
+Solution We compute the surface displacements and compare these to the analytica
+l solution in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:benchmark:savageprescott:solution"
+
+\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/model_descript.eps
+	scale 33
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Problem description for the Savage and Prescott strike-slip benchmark problem.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:benchmark:savageprescott:geometry"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Running the Benchmark
+\end_layout
+
+\begin_layout Standard
+After checking out the benchmark files from the CIG SVN repository, change
+ to the 
+\family typewriter
+meshes
+\family default
+ directory.
+ Decompress the gzipped files in the 
+\family typewriter
+mesh
+\family default
+ directory,
+\end_layout
+
+\begin_layout LyX-Code
+gunzip *.gz
+\end_layout
+
+\begin_layout Standard
+Alternatively, simply gunzip the mesh you want to use.
+ There are a number of 
+\family typewriter
+.cfg
+\family default
+ files corresponding to the different meshes, as well as a 
+\family typewriter
+pylithapp.cfg
+\family default
+ file defining parameters common to all problems.
+ Each problem uses four 
+\family typewriter
+.cfg
+\family default
+ files: 
+\family typewriter
+pylithapp.cfg
+\family default
+, 
+\family typewriter
+fieldsplit.cfg
+\family default
+ (algrebraic multigrid preconditioner), a cell-specific file (e.g., 
+\family typewriter
+hex8.cfg
+\family default
+), 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 hex8.cfg hex8_6.7km.cfg fieldsplit.cfg
+\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.
+\end_layout
+
+\begin_layout Standard
+Once the problem has run, results will be placed in the 
+\family typewriter
+output
+\family default
+ 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 running the 
+\family typewriter
+calc_analytic.py
+\family default
+ script.
+ This will produce files with displacements and velocities (
+\family typewriter
+analytic_disp.txt
+\family default
+ and 
+\family typewriter
+analytic_vel.txt
+\family default
+) in the 
+\family typewriter
+output
+\family default
+ directory that are easy to use with a plotting package, such as matplotlib
+ or Matlab.
+\end_layout
+
+\begin_layout Subsection
+Benchmark Results
+\end_layout
+
+\begin_layout Standard
+Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:benchmark:savageprescott:solution"
+
+\end_inset
+
+ shows the computed surface displacements for the 10th earthquake cycle
+ compared with the analytical solution.
+ The profile results were obtained as described above, and then all results
+ (analytical and numerical) were referenced to the displacements immediately
+ following the last earthquake.
+ We find very good agreement between the analytical and numerical solutions,
+ even for meshes with uniform refinement.
+ 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
+ is poor for early earthquake cycles, due to the differences in simulating
+ the problem, as noted above.
+\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/soln_profiles.eps
+	scale 66
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Displacement profiles perpendicular to the fault for a PyLith simulation
+ with hex8 cells and the analytical solution for earthquake cycle 10.
+ 
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:benchmark:savageprescott:solution"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document

Modified: short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/benchmarks/strikeslip/strikeslip.lyx
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/benchmarks/strikeslip/strikeslip.lyx	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/benchmarks/strikeslip/strikeslip.lyx	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,918 +1,982 @@
-#LyX 1.5.6 created this file. For more info see http://www.lyx.org/
-\lyxformat 276
-\begin_document
-\begin_header
-\textclass book
-\begin_preamble
-
-\end_preamble
-\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
-\papersize default
-\use_geometry true
-\use_amsmath 0
-\use_esint 0
-\cite_engine basic
-\use_bibtopic false
-\paperorientation portrait
-\leftmargin 1in
-\topmargin 1in
-\rightmargin 1in
-\bottommargin 1in
-\secnumdepth 3
-\tocdepth 3
-\paragraph_separation indent
-\defskip medskip
-\quotes_language english
-\papercolumns 1
-\papersides 1
-\paperpagestyle default
-\tracking_changes false
-\output_changes false
-\author "" 
-\author "" 
-\end_header
-
-\begin_body
-
-\begin_layout Section
-\begin_inset LatexCommand label
-name "sec:benchmarks:strikeslip"
-
-\end_inset
-
-Strike-Slip Benchmark
-\end_layout
-
-\begin_layout Standard
-This benchmark problem computes the viscoelastic (Maxwell) relaxation of
- stresses from a single, finite, strike-slip earthquake in 3D without gravity.
-  Dirichlet boundary conditions equal to the analytical elastic solution
- are imposed on the sides of a cube with sides of length 24 km.
- Anti-plane strain boundary conditions are imposed at y = 0, so the solution
- is equivalent to that for a domain with a 48 km length in the y direction.
- We can use the analytical solution of 
-\begin_inset LatexCommand cite
-key "Okada:1992"
-
-\end_inset
-
- both to apply the boundary conditions and to compare against the numerically-co
-mputed elastic solution.
-\end_layout
-
-\begin_layout Standard
-
-\end_layout
-
-\begin_layout Subsection
-Problem Description
-\end_layout
-
-\begin_layout Standard
-Figure 
-\begin_inset LatexCommand ref
-reference "fig:benchmark:strikeslip:geometry"
-
-\end_inset
-
- shows the geometry of the strike-slip fault (red surface) embedded in the
- cube consisting of an elastic material (yellow block) over a Maxwell viscoelast
-ic material (blue block).
- 
-\end_layout
-
-\begin_layout Description
-Domain The domain spans the region
-\begin_inset Formula \begin{gather*}
-0\leq x\leq24\ km,\\
-0\leq y\leq24\ km,\\
--24\ km\leq z\leq0.\end{gather*}
-
-\end_inset
-
-The top (elastic) layer occupies the region 
-\begin_inset Formula $-12\ km\ \leq z\leq0$
-\end_inset
-
- and the bottom (viscoelastic) layer occupies the region 
-\begin_inset Formula $-24\ km\ \leq z\leq-12\ km$
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Description
-Material\InsetSpace ~
-properties The material is a Poisson solid with a shear modulus
- of 30 GPa.
- The domain is modeled using an elastic isotropic material for the top layer
- and a Maxwell viscoelastic material for the bottom layer.
- The bottom layer has a viscosity of 1.0e+18 Pa-s.
-\end_layout
-
-\begin_layout Description
-Fault The fault is a vertical, right-lateral strike-slip fault.
- The strike is parallel to the y-direction at the center of the model:
-\begin_inset Formula \begin{gather*}
-x=12\ km,\\
-0\leq y\leq16\ km,\\
--16\ km\leq z\leq0.\end{gather*}
-
-\end_inset
-
-Uniform slip of 1 m is applied over the region 
-\begin_inset Formula $0\leq y\leq12\ km$
-\end_inset
-
- and 
-\begin_inset Formula $-12\ km\leq z\leq0$
-\end_inset
-
- with a linear taper to 0 at y = 16 km and z = -16 km.
- The tapered region is the light red portion of the fault surface in Figure
- 
-\begin_inset LatexCommand ref
-reference "fig:benchmark:strikeslip:geometry"
-
-\end_inset
-
-.
- In the region where the two tapers overlap, each slip value is the minimum
- of the two tapers (so that the taper remains linear).
-\end_layout
-
-\begin_layout Description
-Boundary\InsetSpace ~
-conditions Bottom and side displacements are set to the elastic
- analytical solution, and the top of the model is a free surface.
- There are two exceptions to these applied boundary conditions.
- The first is on the y=0 plane, where y-displacements are left free to preserve
- symmetry, and the x- and z-displacements are set to zero.
- The second is along the line segment between (12, 0, -24) and (12, 24,
- -24), where the analytical solution blows up in some cases.
- Along this line segment, all three displacement components are left free.
-\end_layout
-
-\begin_layout Description
-Discretization The model is discretized with nominal spatial resolutions
- of 1000 m, 500 m, and 250 m.
-\end_layout
-
-\begin_layout Description
-Basis\InsetSpace ~
-functions We use trilinear hexahedral cells and linear tetrahedral
- cells.
-\end_layout
-
-\begin_layout Description
-Solution We compute the error in the elastic solution and compare the solution
- over the domain after 0, 1, 5, and 10 years.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Standard
-\align center
-\begin_inset Graphics
-	filename figs/geometry.png
-	scale 33
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset Caption
-
-\begin_layout Standard
-Geometry of strike-slip benchmark problem.
-\begin_inset LatexCommand label
-name "fig:benchmark:strikeslip:geometry"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Running the Benchmark
-\end_layout
-
-\begin_layout Standard
-After checking out the benchmark files from the CIG SVN repository, change
- to the 
-\family typewriter
-quasistatic/strikeslip
-\family default
- directory.
- Decompress the gzipped files in the meshes and parameters directories,
-\end_layout
-
-\begin_layout LyX-Code
-gunzip meshes/*.gz parameters/*.gz
-\end_layout
-
-\begin_layout Standard
-Change to the parameters directory.
- Each benchmark uses three 
-\family typewriter
-.cfg
-\family default
- files: 
-\family typewriter
-pylithapp.cfg
-\family default
-, a mesher related file (
-\family typewriter
-strikeslip_cubit.cfg
-\family default
- or 
-\family typewriter
-strikeslip_lagrit.cfg
-\family default
-), and a resolution and cell related file (e.g., 
-\family typewriter
-strikeslip_hex8_1000m.cfg
-\family default
-).
- A few examples of running the benchmarks (elastic solution only) are
-\end_layout
-
-\begin_layout LyX-Code
-pylith strikeslip_cubit.cfg strikeslip_hex8_1000m.cfg
-\end_layout
-
-\begin_layout LyX-Code
-pylith strikeslip_cubit.cfg strikeslip_hex8_0500m.cfg
-\end_layout
-
-\begin_layout LyX-Code
-pylith strikeslip_lagrit.cfg strikeslip_tet4_1000m.cfg
-\end_layout
-
-\begin_layout Standard
-To run the time-dependent (viscoelastic) problem, it is necessary to append
- 
-\family typewriter
-timedep.cfg
-\family default
- to the above commands, for example
-\end_layout
-
-\begin_layout LyX-Code
-pylith strikeslip_cubit.cfg strikeslip_hex8_1000m.cfg timedep.cfg
-\end_layout
-
-\begin_layout Standard
-This will run the problem for 10 years, using a time-step size of 0.1 years,
- and results will be output for each year.
- The benchmarks at resolutions of 1000 m, 500 m, and 250 m require  approximatel
-y 150 MB, 960 MB, and 8 GB, respectively.
-\end_layout
-
-\begin_layout Subsection
-Benchmark Results
-\end_layout
-
-\begin_layout Standard
-Figure 
-\begin_inset LatexCommand ref
-reference "fig:benchmark:strikeslip:solution"
-
-\end_inset
-
- shows the displacement field from the simulation with hexahedral cells
- using trilinear basis functions at a resolution of 1000 m.
- For each resolution and set of basis functions, we measure the accuracy
- by comparing the numerical solution against the semi-analytical Okada solution
-\begin_inset LatexCommand cite
-key "Okada:1992"
-
-\end_inset
-
-.
- We also compare the accuracy and runtime across resolutions and different
- cell types.
- This provides practical information about what cell types and resolutions
- are required to achieve a given level of accuracy with the shortest runtime.
-\end_layout
-
-\begin_layout Standard
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Standard
-\align center
-\begin_inset Graphics
-	filename figs/soln.png
-	scale 33
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset Caption
-
-\begin_layout Standard
-Displacement field for strike-slip benchmark problem.
-\begin_inset LatexCommand label
-name "fig:benchmark:strikeslip:solution"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection
-Solution Accuracy
-\end_layout
-
-\begin_layout Standard
-We quantify the error in the finite-element solution by integrating the
- L2 norm of the difference between the finite-element solution  and the
- semi-analytical solution evaluated at the quadrature points.
- We define the local error (error for each finite-element cell) to be
-\begin_inset Formula \begin{equation}
-\epsilon_{local}=\frac{1}{V_{cell}}\sqrt{\intop_{cell}\left(u_{i}^{t}-u_{i}^{fem}\right)^{2}\: dV},\end{equation}
-
-\end_inset
-
-where 
-\begin_inset Formula $u_{i}^{t}$
-\end_inset
-
- is the ith component of the displacement field for the semi-analytical
-  solution, and 
-\begin_inset Formula $u_{i}^{fem}$
-\end_inset
-
- is the ith component of the displacement field for the finite-element 
- solution.
-  Taking the square root of the L2 norm and normalizing by  the volume of
- the cell results in an error metric with dimensions of length.
-  This roughly corresponds to the error in the magnitude of the displacement
- field in the finite element solution.
- We define the global error in a similar fashion,
-\begin_inset Formula \begin{equation}
-\epsilon_{global}=\frac{1}{V_{domain}}\sqrt{\intop_{domain}\left(u_{i}^{t}-u_{i}^{fem}\right)^{2}\: dV},\end{equation}
-
-\end_inset
-
- where we sum the L2 norm computed for the local error over all of the 
- cells before taking the square root and dividing by the volume of the domain.
- CIG has developed a package called 
-\begin_inset LatexCommand htmlurl
-name "Cigma"
-target "geodynamics.org/cig/software/packages/cs/cigma"
-
-\end_inset
-
- that computes these local and global error metrics.
-\end_layout
-
-\begin_layout Standard
-Figures 
-\begin_inset LatexCommand ref
-reference "fig:benchmark:strikeslip:tet4:1000m"
-
-\end_inset
-
- through 
-\begin_inset LatexCommand ref
-reference "fig:benchmark:strikeslip:hex8:250m"
-
-\end_inset
-
- show the local error for each of the three resolutions and two cell types.
- The error decreases with decreasing cell size as expected for a converging
- solution.
- The largest errors, which approach 1 mm for 1 m of slip for a discretization
- size of 250 m, occur where the gradient in slip is discontinuous at the
- boundary between the region of uniform slip and linear taper in slip.
- The linear basis functions cannot match this higher order variation.
- The trilinear basis functions in the hexahedral element provide more terms
- in the polynomial defining the variation in the displacement field within
- each cell compared to the linear basis functions for the tetrahedral cell.
- Consequently, for this problem the error for the hexahedral cells at a
- given resolution is smaller than that for the tetrahedral cells.
- Both sets of cell types and basis functions provide the same rate of convergenc
-e as shown in Figure 
-\begin_inset LatexCommand vref
-reference "fig:benchmark:strikeslip:convergence"
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Standard
-\align center
-\begin_inset Graphics
-	filename figs/error_tet4_1000m.png
-	scale 33
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset Caption
-
-\begin_layout Standard
-Local error for strike-slip benchmark problem with tetrahedral cells and
- linear basis functions with a uniform discretization size of 1000 m.
-\begin_inset LatexCommand label
-name "fig:benchmark:strikeslip:tet4:1000m"
-
-\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 Standard
-\align center
-\begin_inset Graphics
-	filename figs/error_hex8_1000m.png
-	scale 33
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset Caption
-
-\begin_layout Standard
-Local error for strike-slip benchmark problem with hexahedral cells and
- trilinear basis functions with a uniform discretization size of 1000 m.
-\begin_inset LatexCommand label
-name "fig:benchmark:strikeslip:hex8:1000m"
-
-\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 Standard
-\align center
-\begin_inset Graphics
-	filename figs/error_tet4_0500m.png
-	scale 33
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset Caption
-
-\begin_layout Standard
-Local error for strike-slip benchmark problem with tetrahedral cells and
- linear basis functions with a uniform discretization size of 500 m.
-\begin_inset LatexCommand label
-name "fig:benchmark:strikeslip:tet4:500m"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Standard
-\align center
-\begin_inset Graphics
-	filename figs/error_hex8_0500m.png
-	scale 33
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset Caption
-
-\begin_layout Standard
-Local error for strike-slip benchmark problem with hexahedral cells and
- trilinear basis functions with a uniform discretization size of 500 m.
-\begin_inset LatexCommand label
-name "fig:benchmark:strikeslip:hex8:500m"
-
-\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 Standard
-\align center
-\begin_inset Graphics
-	filename figs/error_tet4_0250m.png
-	scale 33
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset Caption
-
-\begin_layout Standard
-Local error for strike-slip benchmark problem with tetrahedral cells and
- linear basis functions with a uniform discretization size of 250 m.
-\begin_inset LatexCommand label
-name "fig:benchmark:strikeslip:tet4:250m"
-
-\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 Standard
-\align center
-\begin_inset Graphics
-	filename figs/error_hex8_0250m.png
-	scale 33
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset Caption
-
-\begin_layout Standard
-Local error for strike-slip benchmark problem with hexahedral cells and
- trilinear basis functions with a uniform discretization size of 250 m.
-\begin_inset LatexCommand label
-name "fig:benchmark:strikeslip:hex8:250m"
-
-\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 Standard
-\align center
-\begin_inset Graphics
-	filename figs/convergence.png
-	scale 33
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset Caption
-
-\begin_layout Standard
-Convergence rate for the strike-slip benchmark problem with tetrahedral
- cells and linear basis functions and with hexahedral cells with trilinear
- basis functions.
-\begin_inset LatexCommand label
-name "fig:benchmark:strikeslip:convergence"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection
-Performance
-\end_layout
-
-\begin_layout Standard
-Figure 
-\begin_inset LatexCommand ref
-reference "fig:benchmark:strikeslip:summary"
-
-\end_inset
-
- summarizes the overall performance of each of the six simulations.
- Although at a given resolution, the number of degrees of freedom in the
- hexahedral and tetrahedral meshes are the the same, the number of cells
- in the tetrahedral mesh is about six times greater.
- However, we use only one integration point per tetrahedral cell compared
- to eight for the hexahedral cell.
- This leads to approximately the same number of integration points for the
- two meshes, but the time required to unpack/pack information for each cell
- from the Sieve data structure is greater than the time required to do the
- calculation for each quadrature point (which can take advantage of the
- very fast, small memory cache in the processor).
- As a result, the runtime for the simulations with hexahedral cells is significa
-ntly less than that for the tetrahedral cells at the same resolution.
- 
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Standard
-\align center
-\begin_inset Graphics
-	filename figs/summary.pdf
-	scale 50
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset Caption
-
-\begin_layout Standard
-Summary of performance of PyLith for the six simulations of the strike-slip
- benchmark.
- For a given discretization size, hexahedral cells with trilinear basis
- functions provide greater accuracy with a shorter runtime compared with
- tetrahedral cells and linear basis functions.
-\begin_inset LatexCommand label
-name "fig:benchmark:strikeslip:summary"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-Figure 
-\begin_inset LatexCommand vref
-reference "fig:benchmark:strikeslip:scaling"
-
-\end_inset
-
- compares the runtime for the benchmark (elastic solution only) at 500 m
- resolution for 1 to 16 processors.
- The total runtime is the time required for the entire simulation, including
- initialization, distributing the mesh over the processors, solving the
- problem in parallel, and writing the output to VTK files.
- Some initialization steps, writing the output to VTK files, and distributing
- the mesh are essentially serial processes.
- For simulations with many time steps these steps will generally occupy
- only a fraction of the runtime, and the runtime will be dominated by the
- solution of the equations.
- Figure 
-\begin_inset LatexCommand ref
-reference "fig:benchmark:strikeslip:scaling"
-
-\end_inset
-
- also shows the total time required to form the Jacobian of the system,
- form the residual, and solve the system.
- These steps provide a more accurate representation of the parallel-performance
- of the computational portion of the code and show excellent performance
- as evident in the approximately linear slope of 0.7.
- S linear decrease with a slope of 1 would indicate strong scaling, which
- is rarely achieved in real applications.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Standard
-\align center
-\begin_inset Graphics
-	filename figs/scaling.pdf
-	scale 75
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-\begin_inset Caption
-
-\begin_layout Standard
-Parallel performance of PyLith for the strike-slip benchmark problem with
- tetrahedral cells and linear basis functions with a uniform discretization
- size of 500 m.
- The total runtime (total) and the runtime to compute the Jacobian and residual
- and solve the system (compute) are shown.
- The compute runtime decreases with a slope of about 0.7; a linear decrease
- with a slope of 1 would indicate strong scaling,  which is rarely achieved
- in any real application.
- 
-\begin_inset LatexCommand label
-name "fig:benchmark:strikeslip:scaling"
-
-\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 0
+\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:benchmarks:strikeslip"
+
+\end_inset
+
+Strike-Slip Benchmark
+\end_layout
+
+\begin_layout Standard
+This benchmark problem computes the viscoelastic (Maxwell) relaxation of
+ stresses from a single, finite, strike-slip earthquake in 3D without gravity.
+  Dirichlet boundary conditions equal to the analytical elastic solution
+ are imposed on the sides of a cube with sides of length 24 km.
+ Anti-plane strain boundary conditions are imposed at y = 0, so the solution
+ is equivalent to that for a domain with a 48 km length in the y direction.
+ We can use the analytical solution of 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "Okada:1992"
+
+\end_inset
+
+ both to apply the boundary conditions and to compare against the numerically-co
+mputed elastic solution.
+\end_layout
+
+\begin_layout Standard
+
+\end_layout
+
+\begin_layout Subsection
+Problem Description
+\end_layout
+
+\begin_layout Standard
+Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:benchmark:strikeslip:geometry"
+
+\end_inset
+
+ shows the geometry of the strike-slip fault (red surface) embedded in the
+ cube consisting of an elastic material (yellow block) over a Maxwell viscoelast
+ic material (blue block).
+ 
+\end_layout
+
+\begin_layout Description
+Domain The domain spans the region
+\begin_inset Formula 
+\begin{gather*}
+0\leq x\leq24\ km,\\
+0\leq y\leq24\ km,\\
+-24\ km\leq z\leq0.
+\end{gather*}
+
+\end_inset
+
+The top (elastic) layer occupies the region 
+\begin_inset Formula $-12\ km\ \leq z\leq0$
+\end_inset
+
+ and the bottom (viscoelastic) layer occupies the region 
+\begin_inset Formula $-24\ km\ \leq z\leq-12\ km$
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Description
+Material
+\begin_inset space ~
+\end_inset
+
+properties The material is a Poisson solid with a shear modulus of 30 GPa.
+ The domain is modeled using an elastic isotropic material for the top layer
+ and a Maxwell viscoelastic material for the bottom layer.
+ The bottom layer has a viscosity of 1.0e+18 Pa-s.
+\end_layout
+
+\begin_layout Description
+Fault The fault is a vertical, right-lateral strike-slip fault.
+ The strike is parallel to the y-direction at the center of the model:
+\begin_inset Formula 
+\begin{gather*}
+x=12\ km,\\
+0\leq y\leq16\ km,\\
+-16\ km\leq z\leq0.
+\end{gather*}
+
+\end_inset
+
+Uniform slip of 1 m is applied over the region 
+\begin_inset Formula $0\leq y\leq12\ km$
+\end_inset
+
+ and 
+\begin_inset Formula $-12\ km\leq z\leq0$
+\end_inset
+
+ with a linear taper to 0 at y = 16 km and z = -16 km.
+ The tapered region is the light red portion of the fault surface in Figure
+ 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:benchmark:strikeslip:geometry"
+
+\end_inset
+
+.
+ In the region where the two tapers overlap, each slip value is the minimum
+ of the two tapers (so that the taper remains linear).
+\end_layout
+
+\begin_layout Description
+Boundary
+\begin_inset space ~
+\end_inset
+
+conditions Bottom and side displacements are set to the elastic analytical
+ solution, and the top of the model is a free surface.
+ There are two exceptions to these applied boundary conditions.
+ The first is on the y=0 plane, where y-displacements are left free to preserve
+ symmetry, and the x- and z-displacements are set to zero.
+ The second is along the line segment between (12, 0, -24) and (12, 24,
+ -24), where the analytical solution blows up in some cases.
+ Along this line segment, all three displacement components are left free.
+\end_layout
+
+\begin_layout Description
+Discretization The model is discretized with nominal spatial resolutions
+ of 1000 m, 500 m, and 250 m.
+\end_layout
+
+\begin_layout Description
+Basis
+\begin_inset space ~
+\end_inset
+
+functions We use trilinear hexahedral cells and linear tetrahedral cells.
+\end_layout
+
+\begin_layout Description
+Solution We compute the error in the elastic solution and compare the solution
+ over the domain after 0, 1, 5, and 10 years.
+\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/geometry.png
+	scale 33
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Geometry of strike-slip benchmark problem.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:benchmark:strikeslip:geometry"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Running the Benchmark
+\end_layout
+
+\begin_layout Standard
+After checking out the benchmark files from the CIG SVN repository, change
+ to the 
+\family typewriter
+quasistatic/strikeslip
+\family default
+ directory.
+ Decompress the gzipped files in the meshes and parameters directories,
+\end_layout
+
+\begin_layout LyX-Code
+gunzip meshes/*.gz parameters/*.gz
+\end_layout
+
+\begin_layout Standard
+Change to the parameters directory.
+ Each benchmark uses three 
+\family typewriter
+.cfg
+\family default
+ files: 
+\family typewriter
+pylithapp.cfg
+\family default
+, a mesher related file (
+\family typewriter
+strikeslip_cubit.cfg
+\family default
+ or 
+\family typewriter
+strikeslip_lagrit.cfg
+\family default
+), and a resolution and cell related file (e.g., 
+\family typewriter
+strikeslip_hex8_1000m.cfg
+\family default
+).
+ A few examples of running the benchmarks (elastic solution only) are
+\end_layout
+
+\begin_layout LyX-Code
+pylith strikeslip_cubit.cfg strikeslip_hex8_1000m.cfg
+\end_layout
+
+\begin_layout LyX-Code
+pylith strikeslip_cubit.cfg strikeslip_hex8_0500m.cfg
+\end_layout
+
+\begin_layout LyX-Code
+pylith strikeslip_lagrit.cfg strikeslip_tet4_1000m.cfg
+\end_layout
+
+\begin_layout Standard
+To run the time-dependent (viscoelastic) problem, it is necessary to append
+ 
+\family typewriter
+timedep.cfg
+\family default
+ to the above commands, for example
+\end_layout
+
+\begin_layout LyX-Code
+pylith strikeslip_cubit.cfg strikeslip_hex8_1000m.cfg timedep.cfg
+\end_layout
+
+\begin_layout Standard
+This will run the problem for 10 years, using a time-step size of 0.1 years,
+ and results will be output for each year.
+ The benchmarks at resolutions of 1000 m, 500 m, and 250 m require  approximatel
+y 150 MB, 960 MB, and 8 GB, respectively.
+\end_layout
+
+\begin_layout Subsection
+Benchmark Results
+\end_layout
+
+\begin_layout Standard
+Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:benchmark:strikeslip:solution"
+
+\end_inset
+
+ shows the displacement field from the simulation with hexahedral cells
+ using trilinear basis functions at a resolution of 1000 m.
+ For each resolution and set of basis functions, we measure the accuracy
+ by comparing the numerical solution against the semi-analytical Okada solution
+ 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "Okada:1992"
+
+\end_inset
+
+.
+ We also compare the accuracy and runtime across resolutions and different
+ cell types.
+ This provides practical information about what cell types and resolutions
+ are required to achieve a given level of accuracy with the shortest runtime.
+\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/soln.png
+	scale 33
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Displacement field for strike-slip benchmark problem.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:benchmark:strikeslip:solution"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Solution Accuracy
+\end_layout
+
+\begin_layout Standard
+We quantify the error in the finite-element solution by integrating the
+ L2 norm of the difference between the finite-element solution  and the
+ semi-analytical solution evaluated at the quadrature points.
+ We define the local error (error for each finite-element cell) to be
+\begin_inset Formula 
+\begin{equation}
+\epsilon_{local}=\frac{1}{V_{cell}}\sqrt{\intop_{cell}\left(u_{i}^{t}-u_{i}^{fem}\right)^{2}\: dV},
+\end{equation}
+
+\end_inset
+
+where 
+\begin_inset Formula $u_{i}^{t}$
+\end_inset
+
+ is the ith component of the displacement field for the semi-analytical
+  solution, and 
+\begin_inset Formula $u_{i}^{fem}$
+\end_inset
+
+ is the ith component of the displacement field for the finite-element 
+ solution.
+  Taking the square root of the L2 norm and normalizing by  the volume of
+ the cell results in an error metric with dimensions of length.
+  This roughly corresponds to the error in the magnitude of the displacement
+ field in the finite element solution.
+ We define the global error in a similar fashion,
+\begin_inset Formula 
+\begin{equation}
+\epsilon_{global}=\frac{1}{V_{domain}}\sqrt{\intop_{domain}\left(u_{i}^{t}-u_{i}^{fem}\right)^{2}\: dV},
+\end{equation}
+
+\end_inset
+
+ where we sum the L2 norm computed for the local error over all of the 
+ cells before taking the square root and dividing by the volume of the domain.
+ CIG has developed a package called Cigma 
+\begin_inset Flex URL
+status collapsed
+
+\begin_layout Plain Layout
+
+geodynamics.org/cig/software/packages/cs/cigma
+\end_layout
+
+\end_inset
+
+ that computes these local and global error metrics.
+\end_layout
+
+\begin_layout Standard
+Figures 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:benchmark:strikeslip:tet4:1000m"
+
+\end_inset
+
+ through 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:benchmark:strikeslip:hex8:250m"
+
+\end_inset
+
+ show the local error for each of the three resolutions and two cell types.
+ The error decreases with decreasing cell size as expected for a converging
+ solution.
+ The largest errors, which approach 1 mm for 1 m of slip for a discretization
+ size of 250 m, occur where the gradient in slip is discontinuous at the
+ boundary between the region of uniform slip and linear taper in slip.
+ The linear basis functions cannot match this higher order variation.
+ The trilinear basis functions in the hexahedral element provide more terms
+ in the polynomial defining the variation in the displacement field within
+ each cell compared to the linear basis functions for the tetrahedral cell.
+ Consequently, for this problem the error for the hexahedral cells at a
+ given resolution is smaller than that for the tetrahedral cells.
+ Both sets of cell types and basis functions provide the same rate of convergenc
+e as shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand vref
+reference "fig:benchmark:strikeslip:convergence"
+
+\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/error_tet4_1000m.png
+	scale 33
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Local error for strike-slip benchmark problem with tetrahedral cells and
+ linear basis functions with a uniform discretization size of 1000 m.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:benchmark:strikeslip:tet4:1000m"
+
+\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/error_hex8_1000m.png
+	scale 33
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Local error for strike-slip benchmark problem with hexahedral cells and
+ trilinear basis functions with a uniform discretization size of 1000 m.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:benchmark:strikeslip:hex8:1000m"
+
+\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/error_tet4_0500m.png
+	scale 33
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Local error for strike-slip benchmark problem with tetrahedral cells and
+ linear basis functions with a uniform discretization size of 500 m.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:benchmark:strikeslip:tet4:500m"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\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/error_hex8_0500m.png
+	scale 33
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Local error for strike-slip benchmark problem with hexahedral cells and
+ trilinear basis functions with a uniform discretization size of 500 m.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:benchmark:strikeslip:hex8:500m"
+
+\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/error_tet4_0250m.png
+	scale 33
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Local error for strike-slip benchmark problem with tetrahedral cells and
+ linear basis functions with a uniform discretization size of 250 m.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:benchmark:strikeslip:tet4:250m"
+
+\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/error_hex8_0250m.png
+	scale 33
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Local error for strike-slip benchmark problem with hexahedral cells and
+ trilinear basis functions with a uniform discretization size of 250 m.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:benchmark:strikeslip:hex8:250m"
+
+\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/convergence.png
+	scale 33
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Convergence rate for the strike-slip benchmark problem with tetrahedral
+ cells and linear basis functions and with hexahedral cells with trilinear
+ basis functions.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:benchmark:strikeslip:convergence"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Performance
+\end_layout
+
+\begin_layout Standard
+Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:benchmark:strikeslip:summary"
+
+\end_inset
+
+ summarizes the overall performance of each of the six simulations.
+ Although at a given resolution, the number of degrees of freedom in the
+ hexahedral and tetrahedral meshes are the same, the number of cells in
+ the tetrahedral mesh is about six times greater.
+ However, we use only one integration point per tetrahedral cell compared
+ to eight for the hexahedral cell.
+ This leads to approximately the same number of integration points for the
+ two meshes, but the time required to unpack/pack information for each cell
+ from the Sieve data structure is greater than the time required to do the
+ calculation for each quadrature point (which can take advantage of the
+ very fast, small memory cache in the processor).
+ As a result, the runtime for the simulations with hexahedral cells is significa
+ntly less than that for the tetrahedral cells at the same resolution.
+ 
+\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/summary.pdf
+	scale 50
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Summary of performance of PyLith for the six simulations of the strike-slip
+ benchmark.
+ For a given discretization size, hexahedral cells with trilinear basis
+ functions provide greater accuracy with a shorter runtime compared with
+ tetrahedral cells and linear basis functions.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:benchmark:strikeslip:summary"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Figure 
+\begin_inset CommandInset ref
+LatexCommand vref
+reference "fig:benchmark:strikeslip:scaling"
+
+\end_inset
+
+ compares the runtime for the benchmark (elastic solution only) at 500 m
+ resolution for 1 to 16 processors.
+ The total runtime is the time required for the entire simulation, including
+ initialization, distributing the mesh over the processors, solving the
+ problem in parallel, and writing the output to VTK files.
+ Some initialization steps, writing the output to VTK files, and distributing
+ the mesh are essentially serial processes.
+ For simulations with many time steps these steps will generally occupy
+ only a fraction of the runtime, and the runtime will be dominated by the
+ solution of the equations.
+ Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:benchmark:strikeslip:scaling"
+
+\end_inset
+
+ also shows the total time required to form the Jacobian of the system,
+ form the residual, and solve the system.
+ These steps provide a more accurate representation of the parallel-performance
+ of the computational portion of the code and show excellent performance
+ as evident in the approximately linear slope of 0.7.
+ S linear decrease with a slope of 1 would indicate strong scaling, which
+ is rarely achieved in real applications.
+\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/scaling.pdf
+	scale 75
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Parallel performance of PyLith for the strike-slip benchmark problem with
+ tetrahedral cells and linear basis functions with a uniform discretization
+ size of 500 m.
+ The total runtime (total) and the runtime to compute the Jacobian and residual
+ and solve the system (compute) are shown.
+ The compute runtime decreases with a slope of about 0.7; a linear decrease
+ with a slope of 1 would indicate strong scaling,  which is rarely achieved
+ in any real application.
+ 
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:benchmark:strikeslip:scaling"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document

Modified: short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/boundaryconditions/boundaryconditions.lyx
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/boundaryconditions/boundaryconditions.lyx	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/boundaryconditions/boundaryconditions.lyx	2012-11-01 17:04:11 UTC (rev 20976)
@@ -127,7 +127,7 @@
 ).
  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
+ Note that we chose to associate 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
@@ -349,13 +349,13 @@
 
 \begin_layout LyX-Code
 bc = [mybc]
-\end_layout
+\begin_inset Newline newline
+\end_inset
 
-\begin_layout LyX-Code
 
-\end_layout
+\begin_inset Newline newline
+\end_inset
 
-\begin_layout LyX-Code
 [pylithapp.problem.bc.mybc]
 \end_layout
 
@@ -954,9 +954,9 @@
 \family default
 , since the default value is 
 \family typewriter
-Dirichlet
+DirichletBC
 \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
@@ -1773,7 +1773,7 @@
 
  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.
+ to the traction associated with the 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
@@ -1985,7 +1985,7 @@
 \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
+ Using the central difference method, the velocity is written in terms of
  the displacements,
 \end_layout
 
@@ -2029,7 +2029,11 @@
 \end_inset
 
 The terms contributing to the system Jacobian are associated with the increment
- in the displacement at time time.
+ in the displacement at time 
+\begin_inset Formula $t$
+\end_inset
+
+.
  Substituting into the governing equations and isolating the term associated
  with the increment in the displacement at time t yields
 \end_layout
@@ -2046,7 +2050,7 @@
 \begin_inset Formula $A_{ij}^{mn}$
 \end_inset
 
- is a 
+ is an 
 \begin_inset Formula $nd$
 \end_inset
 
@@ -2386,25 +2390,25 @@
 
 \begin_layout LyX-Code
 interfaces = [fault]
-\end_layout
+\begin_inset Newline newline
+\end_inset
 
-\begin_layout LyX-Code
 
-\end_layout
+\begin_inset Newline newline
+\end_inset
 
-\begin_layout LyX-Code
 [pylithapp.problem.interfaces]
 \end_layout
 
 \begin_layout LyX-Code
 fault = pylith.faults.FaultCohesiveKin ; default
-\end_layout
+\begin_inset Newline newline
+\end_inset
 
-\begin_layout LyX-Code
 
-\end_layout
+\begin_inset Newline newline
+\end_inset
 
-\begin_layout LyX-Code
 label = fault A ; Group of vertices defining the fault surface
 \end_layout
 
@@ -2463,7 +2467,7 @@
 
 \begin_layout Standard
 In conventional implementations the additional degrees of freedom associated
- with the Lagrange multipliers results in a complex implementation.
+ with the Lagrange multipliers result 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
@@ -2480,7 +2484,8 @@
  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
+ If we write the algebraic system of equations associated with elasticity
+ in the form
 \begin_inset Formula 
 \begin{equation}
 \underline{A}\overrightarrow{u}=\overrightarrow{b}\,,
@@ -2488,7 +2493,8 @@
 
 \end_inset
 
-then including the Lagrange multiplier constraints results in
+then adding in the Lagrange multiplier constraints associated with fault
+ slip leads to a new system of equations of the form 
 \begin_inset Formula 
 \begin{equation}
 \left[\begin{array}{cc}
@@ -3125,34 +3131,54 @@
 \end_layout
 
 \begin_layout LyX-Code
+
+\size footnotesize
 [pylithapp.problem.interfaces.fault]
 \end_layout
 
 \begin_layout LyX-Code
+
+\size footnotesize
 eq_srcs = [earthquake,creep]
-\end_layout
+\begin_inset Newline newline
+\end_inset
 
-\begin_layout LyX-Code
+
+\begin_inset Newline newline
+\end_inset
+
 [pylithapp.problem.interfaces.fault.eq_srcs.earthquake]
 \end_layout
 
 \begin_layout LyX-Code
+
+\size footnotesize
 origin_time = 0.0*s ; default origin time
 \end_layout
 
 \begin_layout LyX-Code
+
+\size footnotesize
 slip_function = pylith.faults.StepSlipFn ; default slip time function
-\end_layout
+\begin_inset Newline newline
+\end_inset
 
-\begin_layout LyX-Code
+
+\begin_inset Newline newline
+\end_inset
+
 [pylithapp.problem.interfaces.fault.eq_srcs.creep]
 \end_layout
 
 \begin_layout LyX-Code
+
+\size footnotesize
 origin_time = 10.0*year ; start creep at 10.0 years
 \end_layout
 
 \begin_layout LyX-Code
+
+\size footnotesize
 slip_function = pylith.faults.ConstRateSlipFn ; switch to constant slip rate
  slip function
 \end_layout
@@ -3252,9 +3278,13 @@
 
 \begin_layout LyX-Code
 slip_function = pylith.faults.StepSlipFn
-\end_layout
+\begin_inset Newline newline
+\end_inset
 
-\begin_layout LyX-Code
+
+\begin_inset Newline newline
+\end_inset
+
 [pylithapp.problem.interfaces.fault.eq_srcs.rupture.slip_function]
 \end_layout
 
@@ -3573,9 +3603,13 @@
 
 \begin_layout LyX-Code
 slip_function = pylith.faults.ConstRateSlipFn
-\end_layout
+\begin_inset Newline newline
+\end_inset
 
-\begin_layout LyX-Code
+
+\begin_inset Newline newline
+\end_inset
+
 [pylithapp.problem.interfaces.fault.eq_srcs.ruptures.slip_function]
 \end_layout
 
@@ -3911,9 +3945,13 @@
 
 \begin_layout LyX-Code
 slip_function = pylith.faults.BruneSlipFn
-\end_layout
+\begin_inset Newline newline
+\end_inset
 
-\begin_layout LyX-Code
+
+\begin_inset Newline newline
+\end_inset
+
 [pylithapp.problem.interfaces.fault.eq_srcs.rupture.slip_function]
 \end_layout
 
@@ -4341,9 +4379,13 @@
 
 \begin_layout LyX-Code
 slip_function = pylith.faults.TimeHistorySlipFn
-\end_layout
+\begin_inset Newline newline
+\end_inset
 
-\begin_layout LyX-Code
+
+\begin_inset Newline newline
+\end_inset
+
 [pylithapp.problem.interfaces.fault.eq_srcs.rupture.slip_function]
 \end_layout
 
@@ -4393,7 +4435,8 @@
 
 \end_inset
 
-Values in spatial database used as parameters in the Brune slip time function.
+Values in spatial database used as parameters in the time history slip time
+ function.
 \end_layout
 
 \end_inset
@@ -4704,7 +4747,7 @@
 \end_layout
 
 \begin_layout Paragraph
-Non-diagonal A
+Non-Diagonal A
 \end_layout
 
 \begin_layout Standard
@@ -4778,10 +4821,17 @@
 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.
+ main solver, except we use the prefix 
+\family typewriter
+friction_
+\family default
+ 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:
+ the friction sensitivity solves, the settings in a 
+\family typewriter
+.cfg
+\family default
+ file are:
 \end_layout
 
 \begin_layout LyX-Code
@@ -4851,7 +4901,7 @@
 \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.
+ is true); to mimic a dike opening, use false.
 \end_layout
 
 \begin_layout Description
@@ -4861,7 +4911,7 @@
 
 \begin_layout Description
 traction_perturbation Prescribed tractions on fault surface (generally used
- for nucleating earthquake ruptures, default is none).
+ for nucleating earthquake ruptures; default is none).
 \end_layout
 
 \begin_layout Description
@@ -5033,7 +5083,7 @@
 \begin_inset Text
 
 \begin_layout Plain Layout
-1-D
+1D
 \end_layout
 
 \end_inset
@@ -5073,7 +5123,7 @@
 \begin_inset Text
 
 \begin_layout Plain Layout
-2-D
+2D
 \end_layout
 
 \end_inset
@@ -5153,7 +5203,7 @@
 \begin_inset Text
 
 \begin_layout Plain Layout
-3-D
+3D
 \end_layout
 
 \end_inset
@@ -5275,7 +5325,7 @@
 \begin_inset Text
 
 \begin_layout Plain Layout
-1-D
+1D
 \end_layout
 
 \end_inset
@@ -5315,7 +5365,7 @@
 \begin_inset Text
 
 \begin_layout Plain Layout
-2-D
+2D
 \end_layout
 
 \end_inset
@@ -5396,7 +5446,7 @@
 \begin_inset Text
 
 \begin_layout Plain Layout
-3-D
+3D
 \end_layout
 
 \end_inset
@@ -5416,7 +5466,7 @@
 \begin_inset Text
 
 \begin_layout Plain Layout
-Rate of change of eft-lateral shear traction
+Rate of change of left-lateral shear traction
 \end_layout
 
 \end_inset
@@ -5558,7 +5608,7 @@
 \begin_inset Text
 
 \begin_layout Plain Layout
-1-D
+1D
 \end_layout
 
 \end_inset
@@ -5598,7 +5648,7 @@
 \begin_inset Text
 
 \begin_layout Plain Layout
-2-D
+2D
 \end_layout
 
 \end_inset
@@ -5678,7 +5728,7 @@
 \begin_inset Text
 
 \begin_layout Plain Layout
-3-D
+3D
 \end_layout
 
 \end_inset
@@ -5970,6 +6020,7 @@
 \begin_inset Text
 
 \begin_layout Plain Layout
+\align left
 Direction of fault normal in global coordinate system
 \end_layout
 
@@ -6001,6 +6052,7 @@
 \begin_inset Text
 
 \begin_layout Plain Layout
+\align left
 Direction of fault strike in global coordinate system
 \end_layout
 
@@ -6032,6 +6084,7 @@
 \begin_inset Text
 
 \begin_layout Plain Layout
+\align left
 Up-dip direction on hanging wall in global coordinate system
 \end_layout
 
@@ -6063,6 +6116,7 @@
 \begin_inset Text
 
 \begin_layout Plain Layout
+\align left
 Initial tractions (if specified) in fault coordinate system
 \end_layout
 
@@ -6094,6 +6148,7 @@
 \begin_inset Text
 
 \begin_layout Plain Layout
+\align left
 Rate of change in tractions (if specified) in fault coordinate system
 \end_layout
 
@@ -6125,6 +6180,7 @@
 \begin_inset Text
 
 \begin_layout Plain Layout
+\align left
 Time at which rate of change begins (if specified)
 \end_layout
 
@@ -6156,6 +6212,7 @@
 \begin_inset Text
 
 \begin_layout Plain Layout
+\align left
 Change in tractions (if specified) in fault coordinate system
 \end_layout
 
@@ -6187,6 +6244,7 @@
 \begin_inset Text
 
 \begin_layout Plain Layout
+\align left
 Time at which change occurs (if specified)
 \end_layout
 
@@ -6220,6 +6278,7 @@
 \begin_inset Text
 
 \begin_layout Plain Layout
+\align left
 Slip vector at time step (in fault coordinate system) in meters
 \end_layout
 
@@ -6251,6 +6310,7 @@
 \begin_inset Text
 
 \begin_layout Plain Layout
+\align left
 Fault tractions (in fault coordinate system) in Pa
 \end_layout
 
@@ -6282,7 +6342,7 @@
 
 \begin_layout Standard
 PyLith provides four fault constitutive models.
- Future releases may contain additional models and a template is provided
+ 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
@@ -6292,10 +6352,10 @@
 
 ).
  The fault constitutive model implementations are independent of dimension
- and work in both 2-D and 3-D.
+ and work in both 2D and 3D.
  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.
+ of the shear traction in 2D and a vector representation of the shear traction
+ in 3D, 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
@@ -6310,8 +6370,12 @@
 \end_layout
 
 \begin_layout Description
-db_initial_state Spatial database for initial state variables (default is
- none).
+db_initial_state Spatial database for initial state variables.
+ A warning will be given when a spatial database for the initial state is
+ not specified.
+ The default is none which results in initial state values of 0.0.
+ For some friction models, we provide more meaningful values for default
+ values.
 \end_layout
 
 \begin_layout Paragraph
@@ -6376,7 +6440,7 @@
 \begin_inset Tabular
 <lyxtabular version="3" rows="3" columns="2">
 <features tabularvalignment="middle">
-<column alignment="left" valignment="top" width="0">
+<column alignment="center" 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">
@@ -6394,6 +6458,7 @@
 \begin_inset Text
 
 \begin_layout Plain Layout
+\align center
 
 \series bold
 Description
@@ -6418,6 +6483,7 @@
 \begin_inset Text
 
 \begin_layout Plain Layout
+\align center
 Coefficient of friction, 
 \begin_inset Formula $\mu_{f}$
 \end_inset
@@ -6444,6 +6510,7 @@
 \begin_inset Text
 
 \begin_layout Plain Layout
+\align center
 Cohesive stress, 
 \begin_inset Formula $T_{c}$
 \end_inset
@@ -6960,6 +7027,8 @@
 \begin_inset Text
 
 \begin_layout Plain Layout
+
+\family typewriter
 db_properties
 \end_layout
 
@@ -7100,6 +7169,8 @@
 \begin_inset Text
 
 \begin_layout Plain Layout
+
+\family typewriter
 db_initial_state
 \end_layout
 
@@ -7153,7 +7224,7 @@
 \end_layout
 
 \begin_layout Standard
-The Dietrich-Ruina rate and state friction model produces shear tractions
+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 
@@ -7163,8 +7234,8 @@
 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}
+\mu_{0}+a\ln\left(\frac{V}{V_{0}}\right)+b\ln\left(\frac{V_{0}\theta}{L}\right) & V\ge V_{\mathit{linear}}\\
+\mu_{0}+a\ln\left(\frac{V_{linear}}{V_{0}}\right)+b\ln\left(\frac{V_{0}\theta}{L}\right)-a\left(1-\frac{V}{V_{linear}}\right) & V<V_{linear}
 \end{cases}\\
 \frac{d\theta}{dt}=1-\frac{V\theta}{L}
 \end{gather}
@@ -7176,10 +7247,10 @@
 \end_inset
 
  is slip rate, 
-\begin_inset Formula $V_{min}$
+\begin_inset Formula $V_{linear}$
 \end_inset
 
- is a minimum slip rate, 
+ is a cutoff for a linear slip rate dependence, 
 \begin_inset Formula $a$
 \end_inset
 
@@ -7196,24 +7267,24 @@
 \end_inset
 
  is a state variable.
- With an interative solver in quasi-static simulations with a small, but
+ With an interative solver in quasi-static simulations with its 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
+ We regularize the rate and state friction model by imposing 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}$
+ slip rate drops below a cutoff slip rate, 
+\begin_inset Formula $V_{linear}$
 \end_inset
 
  (
 \family typewriter
-min_slip_rate
+linear_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 
+ Note that this is different than the popular inverse hyperbolic sine regulariza
+tion proposed by Ben-Zion and Rice 
 \begin_inset CommandInset citation
 LatexCommand cite
 key "BenZion:Rice:1997"
@@ -7233,8 +7304,8 @@
 
 \end_inset
 
-, we integrate the evolution equation for the state variable keeping slip
- rate constant to get
+, 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).
@@ -7260,21 +7331,33 @@
 \end_layout
 
 \begin_layout Standard
+A zero value for the initial state results in infinite values for the coefficien
+t of friction.
+ To avoid such behavior when the user fails to provide nonzero values for
+ the initial state, we set the state variable to 
+\begin_inset Formula $L/V_{0}$
+\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}$
+linear_slip_rate Nondimensional slip rate at which linearization occurs,
+ 
+\begin_inset Formula $V_{linear}$
 \end_inset
 
 .
- Should be about one order of magnitude larger than absolute tolerance in
- solve.
+ In quasi-static simulations it 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
+An example of setting the properties for the rate- and state-friction component
  in a 
 \family typewriter
 .cfg
@@ -7283,20 +7366,26 @@
 \end_layout
 
 \begin_layout LyX-Code
+
+\size footnotesize
 [pylithapp.problem.interfaces.fault]
 \end_layout
 
 \begin_layout LyX-Code
+
+\size footnotesize
 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
+
+\size footnotesize
+friction.linear_slip_rate = 1.0e-12 ; default value
 \end_layout
 
 \begin_layout Standard
-The spatial database files for the rate and state friction model properties
+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
@@ -7329,7 +7418,7 @@
 
 \end_inset
 
-Values in spatial databases for slip-weakening friction.
+Values in spatial databases for Dieterich-Ruina rate-state friction.
 \end_layout
 
 \end_inset
@@ -7385,6 +7474,8 @@
 \begin_inset Text
 
 \begin_layout Plain Layout
+
+\family typewriter
 db_properties
 \end_layout
 
@@ -7607,6 +7698,8 @@
 \begin_inset Text
 
 \begin_layout Plain Layout
+
+\family typewriter
 db_initial_state
 \end_layout
 
@@ -7661,7 +7754,7 @@
 
 \begin_layout Standard
 Computing static Green's functions using the GreensFns problem requires
- a specialized fault implementation, FaultCohesiveImpulses, to setup the
+ a specialized fault implementation, FaultCohesiveImpulses, to set up 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
@@ -7671,7 +7764,7 @@
 
 \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.
+ at locations on the fault where the amplitude exceeds this threshold.
 \end_layout
 
 \begin_layout Description
@@ -7700,13 +7793,13 @@
 
 \begin_layout LyX-Code
 fault = pylith.faults.FaultCohesiveImpulses ; Change from the default
-\end_layout
+\begin_inset Newline newline
+\end_inset
 
-\begin_layout LyX-Code
 
-\end_layout
+\begin_inset Newline newline
+\end_inset
 
-\begin_layout LyX-Code
 [pylithapp.problem.interfaces.fault]
 \end_layout
 
@@ -7753,7 +7846,7 @@
 
 \end_inset
 
-For gravitational body forces the body force per unit volume, 
+For gravitational body forces, the body force per unit volume, 
 \begin_inset Formula $f_{i}$
 \end_inset
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/components.lyx
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/components.lyx	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/components.lyx	2012-11-01 17:04:11 UTC (rev 20976)
@@ -104,7 +104,7 @@
 \end_layout
 
 \begin_layout Subsection
-Problem components
+Problem Components
 \end_layout
 
 \begin_layout Description
@@ -166,7 +166,8 @@
 \begin_inset Newline newline
 \end_inset
 
-Explicit time stepping for dynamic simulations with infinitesimal strains.
+Explicit time stepping for dynamic simulations with a lumped system Jacobian
+ matrix.
 \end_layout
 
 \begin_layout Description
@@ -179,31 +180,18 @@
 \end_inset
 
 Explicit time stepping for dynamic simulations including the effects of
- rigid body motion and small strains.
+ rigid body motion and small strains with a lumped system Jacobian matrix.
 \end_layout
 
 \begin_layout Description
 
 \family typewriter
-ExplicitLumped pylith.problems.ExplicitLumped
+ExplicitTri3 pylith.problems.ExplicitTri3
 \family default
 
 \begin_inset Newline newline
 \end_inset
 
-Explicit time stepping for dynamic simulations with a lumped system Jacobian
- matrix.
-\end_layout
-
-\begin_layout Description
-
-\family typewriter
-ExplicitLumpedTri3 pylith.problems.ExplicitLumpedTri3
-\family default
-
-\begin_inset Newline newline
-\end_inset
-
 Optimized elasticity formulation for linear triangular cells and one quadrature
  point for explicit time stepping in dynamic simulations.
 \end_layout
@@ -211,7 +199,7 @@
 \begin_layout Description
 
 \family typewriter
-ExplicitLumpedTet4 pylith.problems.ExplicitLumpedTet4
+ExplicitTet4 pylith.problems.ExplicitTet4
 \family default
 
 \begin_inset Newline newline
@@ -295,7 +283,7 @@
 \end_layout
 
 \begin_layout Subsection
-Utility components
+Utility Components
 \end_layout
 
 \begin_layout Description
@@ -337,20 +325,24 @@
 \begin_layout Description
 
 \family typewriter
-VTKDataReader pylith.utils.
+VTKDataReader pylith.utils.VTKDataReader
 \family default
-VTKDataReader
+
 \begin_inset Newline newline
 \end_inset
 
 Data reader for VTK files, requires TVTK Enthought package available from
  
 \family typewriter
+
+\begin_inset Newline newline
+\end_inset
+
 https://github.com/enthought/mayavi.
 \end_layout
 
 \begin_layout Subsection
-Topology components
+Topology Components
 \end_layout
 
 \begin_layout Description
@@ -404,9 +396,9 @@
 \begin_layout Description
 
 \family typewriter
-MeshRefiner pylith.topology.Mesh
+MeshRefiner pylith.topology.MeshRefiner
 \family default
-Refiner
+
 \begin_inset Newline newline
 \end_inset
 
@@ -416,9 +408,9 @@
 \begin_layout Description
 
 \family typewriter
-RefineUniform pylith.topology.
+RefineUniform pylith.topology.RefineUniform
 \family default
-RefineUniform
+
 \begin_inset Newline newline
 \end_inset
 
@@ -428,9 +420,9 @@
 \begin_layout Description
 
 \family typewriter
-ReverseCuthillMcKee pylith.topology.
+ReverseCuthillMcKee pylith.topology.ReverseCuthillMcKee
 \family default
-ReverseCuthillMcKee
+
 \begin_inset Newline newline
 \end_inset
 
@@ -439,7 +431,7 @@
 \end_layout
 
 \begin_layout Subsection
-Material components
+Material Components
 \end_layout
 
 \begin_layout Description
@@ -451,7 +443,7 @@
 \begin_inset Newline newline
 \end_inset
 
-Linearly elastic 1-D bulk constitutive model with 1-D strain (
+Linearly elastic 1D bulk constitutive model with 1D strain (
 \begin_inset Formula $\epsilon_{yy}=\epsilon_{zz}=0$
 \end_inset
 
@@ -467,7 +459,7 @@
 \begin_inset Newline newline
 \end_inset
 
-Linearly elastic 1-D bulk constitutive model with 1-D stress (
+Linearly elastic 1D bulk constitutive model with 1D stress (
 \begin_inset Formula $\sigma_{yy}=\sigma_{zz}=0$
 \end_inset
 
@@ -483,7 +475,7 @@
 \begin_inset Newline newline
 \end_inset
 
-Linearly elastic 2-D bulk constitutive model with plane strain (
+Linearly elastic 2D bulk constitutive model with plane strain (
 \begin_inset Formula $\epsilon_{zz}=0$
 \end_inset
 
@@ -499,7 +491,7 @@
 \begin_inset Newline newline
 \end_inset
 
-Linearly elastic 2-D bulk constitutive model with plane stress (
+Linearly elastic 2D bulk constitutive model with plane stress (
 \begin_inset Formula $\sigma_{zz}=0$
 \end_inset
 
@@ -515,7 +507,7 @@
 \begin_inset Newline newline
 \end_inset
 
-Linearly elastic 3-D bulk constitutive model.
+Linearly elastic 3D bulk constitutive model.
 \end_layout
 
 \begin_layout Description
@@ -628,7 +620,7 @@
 \end_layout
 
 \begin_layout Subsection
-Boundary condition components
+Boundary Condition Components
 \end_layout
 
 \begin_layout Description
@@ -706,7 +698,7 @@
 \end_layout
 
 \begin_layout Subsection
-Fault components
+Fault Components
 \end_layout
 
 \begin_layout Description
@@ -725,9 +717,9 @@
 \begin_layout Description
 
 \family typewriter
-FaultCohesiveDyn pylith.faults.FaultCohesive
+FaultCohesiveDyn pylith.faults.FaultCohesiveDyn
 \family default
-Dyn
+
 \begin_inset Newline newline
 \end_inset
 
@@ -737,9 +729,9 @@
 \begin_layout Description
 
 \family typewriter
-FaultCohesiveImpulses pylith.faults.FaultCohesive
+FaultCohesiveImpulses pylith.faults.FaultCohesiveImpulses
 \family default
-Impulses
+
 \begin_inset Newline newline
 \end_inset
 
@@ -848,7 +840,7 @@
 \end_layout
 
 \begin_layout Subsection
-Friction components
+Friction Components
 \end_layout
 
 \begin_layout Description
@@ -900,7 +892,7 @@
 \end_layout
 
 \begin_layout Subsection
-Discretization components
+Discretization Components
 \end_layout
 
 \begin_layout Description
@@ -914,7 +906,7 @@
 
 Finite-element basis functions and quadrature rules for a Lagrange reference
  finite-element cell (point, line, quadrilateral, or hexahedron) using FIAT.
- The basis functions are constructed from the tensor produce of 1-D Lagrange
+ The basis functions are constructed from the tensor produce of 1D Lagrange
  reference cells.
 \end_layout
 
@@ -932,7 +924,7 @@
 \end_layout
 
 \begin_layout Subsection
-Output components
+Output Components
 \end_layout
 
 \begin_layout Description
@@ -1022,9 +1014,9 @@
 \begin_layout Description
 
 \family typewriter
-OutputSolnPoints pylith.meshio.OutputSoln
+OutputSolnPoints pylith.meshio.OutputSolnPoints
 \family default
-Points
+
 \begin_inset Newline newline
 \end_inset
 
@@ -1291,11 +1283,11 @@
 \end_layout
 
 \begin_layout Section
-Spatialdata components
+Spatialdata Components
 \end_layout
 
 \begin_layout Subsection
-Coordinate system components
+Coordinate System Components
 \end_layout
 
 \begin_layout Description
@@ -1307,7 +1299,7 @@
 \begin_inset Newline newline
 \end_inset
 
-Cartesian coordinate system (0-D, 1-D, 2-D, or 3-D).
+Cartesian coordinate system (0D, 1D, 2D, or 3D).
 \end_layout
 
 \begin_layout Description
@@ -1372,7 +1364,7 @@
 \end_layout
 
 \begin_layout Subsection
-Spatial database components
+Spatial database Components
 \end_layout
 
 \begin_layout Description
@@ -1398,7 +1390,7 @@
 
 Simple spatial database that defines fields using a point cloud.
  Values are determined using a nearest neighbor search or linear interpolation
- in 0-D, 1-D, 2-D, or 3-D.
+ in 0D, 1D, 2D, or 3D.
 \end_layout
 
 \begin_layout Description

Modified: short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/cover/cover.pdf
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/cover/cover.svg.gz
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/cover/cover_small.jpg
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/extending/extending.lyx
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/extending/extending.lyx	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/extending/extending.lyx	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,1035 +1,1061 @@
-#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-geoproj
+\family default
+ 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 source 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 set up 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 
+\family typewriter
+configure
+\family default
+, 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 source 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 set up 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 
+\family typewriter
+configure
+\family default
+, 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,
+\family default
+ in 
+\family typewriter
+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/branches/pylith-scecdynrup/doc/userguide/fileformats/fileformats.lyx
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/fileformats/fileformats.lyx	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/fileformats/fileformats.lyx	2012-11-01 17:04:11 UTC (rev 20976)
@@ -686,7 +686,7 @@
 \begin_inset Caption
 
 \begin_layout Plain Layout
-Format of spatial database files.
+Format of simple spatial database files.
 \end_layout
 
 \end_inset
@@ -941,6 +941,8 @@
  As in the geographic coordinate system, the vertical coordinate (if used)
  can be specified with respect to either the reference ellipsoid or mean
  sea level.
+ The coordinate system can use a local origin and be rotated about the vertical
+ direction.
 \end_layout
 
 \begin_layout LyX-Code
@@ -1040,6 +1042,42 @@
 \end_layout
 
 \begin_layout LyX-Code
+  // Longitude of local origin in WGS84.
+\end_layout
+
+\begin_layout LyX-Code
+  origin_lon = -120.0
+\end_layout
+
+\begin_layout LyX-Code
+  
+\end_layout
+
+\begin_layout LyX-Code
+  // Latitude of local origin in WGS84.
+\end_layout
+
+\begin_layout LyX-Code
+  origin_lat = 37.0
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+  // Rotation angle in degrees (CCW) or local x-axis from east.
+\end_layout
+
+\begin_layout LyX-Code
+  rotation_angle = 23.0
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
   // Run 
 \begin_inset Quotes eld
 \end_inset
@@ -1351,6 +1389,281 @@
 \begin_layout Section
 \begin_inset CommandInset label
 LatexCommand label
+name "sec:Spatialdata:SimpleGrid"
+
+\end_inset
+
+SimpleGridDB Spatial Database Files
+\end_layout
+
+\begin_layout Standard
+SimpleGridDB spatial database files contain a header describing the grid
+ of points and then the data with each line listing the coordinates of a
+ point followed by the values of the fields for that point.
+ The coordinates for each dimension of the grid do not need to be uniformly
+ spaced.
+ The coordinate systems are specified the same way as they are in SimpleDB
+ spatial database files as described in Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Spatialdata:SimpleIOAscii"
+
+\end_inset
+
+.
+ 
+\end_layout
+
+\begin_layout LyX-Code
+// This spatial database specifies the elastic properties on a
+\end_layout
+
+\begin_layout LyX-Code
+// 2-D grid in 3-D space.
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+// Comments can appear almost anywhere in these files and are
+\end_layout
+
+\begin_layout LyX-Code
+// delimited with two slashes (//) just like in C++.
+ All text and 
+\end_layout
+
+\begin_layout LyX-Code
+// whitespace after the delimiter on a given line is ignored.
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+// The next line is the magic header for spatial database files 
+\end_layout
+
+\begin_layout LyX-Code
+// in ASCII format.
+\end_layout
+
+\begin_layout LyX-Code
+#SPATIAL_GRID.ascii 1
+\end_layout
+
+\begin_layout LyX-Code
+SimpleGridDB { // start specifying the database parameters
+\end_layout
+
+\begin_layout LyX-Code
+  num-values = 3 // number of values in the database
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+  // Specify the names and the order of the values as they appear 
+\end_layout
+
+\begin_layout LyX-Code
+  // in the data.
+ The names of the values must correspond to the
+\end_layout
+
+\begin_layout LyX-Code
+  // names PyLith requests in querying the database.
+\end_layout
+
+\begin_layout LyX-Code
+  value-names =  Vp  Vs  Density
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+  // Specify the units of the values in Python syntax.
+\end_layout
+
+\begin_layout LyX-Code
+  value-units =  km/s  km/s  kg/m**3
+\end_layout
+
+\begin_layout LyX-Code
+  
+\end_layout
+
+\begin_layout LyX-Code
+  num-x = 3 // Number of locations along x coordinate direction
+\end_layout
+
+\begin_layout LyX-Code
+  num-y = 1 // Number of locations along y coordinate direction
+\end_layout
+
+\begin_layout LyX-Code
+  num-z = 2 // Number of locations along z coordinate direction
+\end_layout
+
+\begin_layout LyX-Code
+  space-dim = 3 // Spatial dimension in which data resides
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+  // Specify the coordinate system associated with the 
+\end_layout
+
+\begin_layout LyX-Code
+  // coordinates of the locations where data is given
+\end_layout
+
+\begin_layout LyX-Code
+  cs-data = cartesian { // Use a Cartesian coordinate system
+\end_layout
+
+\begin_layout LyX-Code
+    to-meters = 1.0e+3 // Coordinates are in km
+\end_layout
+
+\begin_layout LyX-Code
+ 
+\end_layout
+
+\begin_layout LyX-Code
+    // Specify the spatial dimension of the coordinate system
+\end_layout
+
+\begin_layout LyX-Code
+    // This value must match the one associated with the database
+\end_layout
+
+\begin_layout LyX-Code
+    space-dim = 3
+\end_layout
+
+\begin_layout LyX-Code
+  } // cs-data // end of coordinate system specification
+\end_layout
+
+\begin_layout LyX-Code
+} // end of SimpleGridDB specification
+\end_layout
+
+\begin_layout LyX-Code
+// x coordinates
+\end_layout
+
+\begin_layout LyX-Code
+-3.0  1.0  2.0
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+// y coordinates
+\end_layout
+
+\begin_layout LyX-Code
+8.0
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+// z coordinates
+\end_layout
+
+\begin_layout LyX-Code
+2.0  4.0
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout LyX-Code
+// The locations and values are listed after the parameters.
+\end_layout
+
+\begin_layout LyX-Code
+// Columns are coordinates of the points (1 column for each 
+\end_layout
+
+\begin_layout LyX-Code
+// spatial dimension) followed by the data values in the order 
+\end_layout
+
+\begin_layout LyX-Code
+// specified by the value-names field.
+ The points can be in any order.
+\end_layout
+
+\begin_layout LyX-Code
+-3.0  8.0  2.0    6.0  4.0  2500.0
+\end_layout
+
+\begin_layout LyX-Code
+ 1.0  8.0  2.0    6.2  4.1  2600.0
+\end_layout
+
+\begin_layout LyX-Code
+ 2.0  8.0  2.0    5.8  3.9  2400.0
+\end_layout
+
+\begin_layout LyX-Code
+-3.0  8.0  4.0    6.1  4.1  2500.0
+\end_layout
+
+\begin_layout LyX-Code
+ 1.0  8.0  4.0    5.9  3.8  2450.0
+\end_layout
+
+\begin_layout LyX-Code
+ 2.0  8.0  4.0    5.7  3.7  2400.0
+\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 grid-based spatial database files.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+\begin_inset CommandInset label
+LatexCommand label
 name "sec:Spatialdata:TimeHistoryIO"
 
 \end_inset
@@ -1359,10 +1672,10 @@
 \end_layout
 
 \begin_layout Standard
-Time history database files contain a header describing the numer of points
+Time history database files contain a header describing the number of points
  in the time history and the units for the time stamps followed by a list
  with pairs of time stamps and amplitude values.
- The amplitude at an arbitraty point in time is computed via interpolation
+ The amplitude at an arbitrary point in time is computed via interpolation
  of the values in the database.
  This means that the time history database must span the range of time values
  of interest.
@@ -1507,14 +1820,14 @@
 
 \end_inset
 
-User-Specified Time Step File
+User-Specified Time-Step File
 \end_layout
 
 \begin_layout Standard
-This file lists the time step sizes for nonuniform, user-specified time
+This file lists the time-step sizes for nonuniform, user-specified time
  steps.
- The file's format is an ASCII file that includes the units for the time
- step sizes and then a list of the time steps.
+ The file's format is an ASCII file that includes the units for the time-step
+ sizes and then a list of the time steps.
  
 \end_layout
 
@@ -1586,7 +1899,7 @@
 \begin_inset Caption
 
 \begin_layout Plain Layout
-Format of user-specified time step files.
+Format of user-specified time-step files.
 \end_layout
 
 \end_inset

Modified: short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/governingeqns/governingeqns.lyx
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/governingeqns/governingeqns.lyx	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/governingeqns/governingeqns.lyx	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,1859 +1,1859 @@
-#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:Governing-Equations"
-
-\end_inset
-
-Governing Equations
-\end_layout
-
-\begin_layout Standard
-We present here a brief derivation of the equations for both quasi-static
- and dynamic computations.
- Since the general equations are the same (except for the absence of inertial
- terms in the quasi-static case), we first derive these equations.
- We then present solution methods for each specific case.
- In all of our derivations, we use the notation described in Table 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "tab:Mathematical-notation"
-
-\end_inset
-
- for both index and vector notation.
- When using index notation, we use the common convention that repeated indices
- indicate summation over the range of the index.
-\end_layout
-
-\begin_layout Standard
-\noindent
-\align center
-\begin_inset Float table
-placement H
-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:Mathematical-notation"
-
-\end_inset
-
-Mathematical notation
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\noindent
-\align center
-\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="0">
-<row>
-<cell multicolumn="1" alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Symbol
-\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
-Description
-\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
-Index notation
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Vector Notation
-\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
-
-\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
-\begin_inset Formula $a_{i}$
-\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 $\overrightarrow{a}$
-\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
-Vector field a
-\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
-\begin_inset Formula $a_{ij}$
-\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 $\underline{a}$
-\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
-Second order tensor field a
-\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
-\begin_inset Formula $u_{i}$
-\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 $\overrightarrow{u}$
-\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
-Displacement vector field
-\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
-\begin_inset Formula $d_{i}$
-\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 $\vec{{d}}$
-\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
-Fault slip vector field
-\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
-\begin_inset Formula $f_{i}$
-\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 $\overrightarrow{f}$
-\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
-Body force vector field
-\end_layout
-
-\end_inset
-</cell>
-</row>
-<row>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-\begin_inset Formula $T_{i}$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-\begin_inset Formula $\overrightarrow{T}$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-Traction vector field
-\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
-\begin_inset Formula $\sigma_{ij}$
-\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 $\underline{\sigma}$
-\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
-Stress tensor field
-\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
-\begin_inset Formula $n_{i}$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-\begin_inset Formula $\overrightarrow{n}$
-\end_inset
-
-
-\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
-Normal vector field
-\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
-\begin_inset Formula $\rho$
-\end_inset
-
-
-\end_layout
-
-\end_inset
-</cell>
-<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
-\begin_inset Text
-
-\begin_layout Plain Layout
-\begin_inset Formula $\rho$
-\end_inset
-
-
-\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
-Mass density scalar field
-\end_layout
-
-\end_inset
-</cell>
-</row>
-</lyxtabular>
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Section
-Derivation of Elasticity Equation
-\end_layout
-
-\begin_layout Subsection
-Index Notation
-\end_layout
-
-\begin_layout Standard
-Consider volume 
-\begin_inset Formula $V$
-\end_inset
-
- bounded by surface 
-\begin_inset Formula $S$
-\end_inset
-
-.
- Applying a Lagrangian description of the conservation of momentum gives
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula 
-\begin{equation}
-\frac{\partial}{\partial t}\int_{V}\rho\frac{\partial u_{i}}{\partial t}\, dV=\int_{V}f_{i}\, dV+\int_{S}T_{i}\, dS.\label{eqn:momentum:index}
-\end{equation}
-
-\end_inset
-
-The traction vector field is related to the stress tensor through
-\begin_inset Formula 
-\begin{equation}
-T_{i}=\sigma_{ij}n_{j},
-\end{equation}
-
-\end_inset
-
-where 
-\begin_inset Formula $n_{j}$
-\end_inset
-
- is the vector normal to 
-\begin_inset Formula $S$
-\end_inset
-
-.
- Substituting into equation 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "eqn:momentum:index"
-
-\end_inset
-
- yields
-\begin_inset Formula 
-\begin{equation}
-\frac{\partial}{\partial t}\int_{V}\rho\frac{\partial u_{i}}{\partial t}\, dV=\int_{V}f_{i}\, dV+\int_{S}\sigma_{ij}n_{j}\, dS.
-\end{equation}
-
-\end_inset
-
-Applying the divergence theorem,
-\begin_inset Formula 
-\begin{equation}
-\int_{V}a_{i,j}\: dV=\int_{S}a_{j}n_{j}\: dS,
-\end{equation}
-
-\end_inset
-
-to the surface integral results in
-\begin_inset Formula 
-\begin{equation}
-\frac{\partial}{\partial t}\int_{V}\rho\frac{\partial u_{i}}{\partial t}\, dV=\int_{V}f_{i}\, dV+\int_{V}\sigma_{ij,j}\, dV,
-\end{equation}
-
-\end_inset
-
-which we can rewrite as
-\begin_inset Formula 
-\begin{equation}
-\int_{V}\left(\rho\frac{\partial^{2}u_{i}}{\partial t^{2}}-f_{i}-\sigma_{ij,j}\right)\, dV=0.
-\end{equation}
-
-\end_inset
-
-Because the volume 
-\begin_inset Formula $V$
-\end_inset
-
- is arbitrary, the integrand must be zero at every location in the volume,
- so that we end up with
-\begin_inset Formula 
-\begin{gather}
-\rho\frac{\partial^{2}u_{i}}{\partial t^{2}}-f_{i}-\sigma_{ij,j}=0\text{ in }V,\\
-\sigma_{ij}n_{j}=T_{i}\text{ on }S_{T}\text{,}\\
-u_{i}=u_{i}^{o}\text{ on }S_{u}\text{, and}\\
-R_{ki}(u_{i}^{+}-u_{i}^{-})=d_{k}\text{ on }S_{f}.
-\end{gather}
-
-\end_inset
-
-We specify tractions, 
-\begin_inset Formula $T_{i}$
-\end_inset
-
-, on surface 
-\begin_inset Formula $S_{f}$
-\end_inset
-
-, displacements, 
-\begin_inset Formula $u_{i}^{o}$
-\end_inset
-
-, on surface 
-\begin_inset Formula $S_{u}$
-\end_inset
-
-, and slip, 
-\begin_inset Formula $d_{k}$
-\end_inset
-
-, on fault surface 
-\begin_inset Formula $S_{f}$
-\end_inset
-
- (we will consider the case of fault constitutive models in Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:fault"
-
-\end_inset
-
-).
- The rotation matrix 
-\begin_inset Formula $R_{ki}$
-\end_inset
-
- transforms vectors from the global coordinate system to the fault coordinate
- system.
- Note that since both 
-\begin_inset Formula $T_{i}$
-\end_inset
-
- and 
-\begin_inset Formula $u_{i}$
-\end_inset
-
- are vector quantities, there can be some spatial overlap of the surfaces
- 
-\begin_inset Formula $S_{T}$
-\end_inset
-
- and 
-\begin_inset Formula $S_{u}$
-\end_inset
-
-; however, the same degree of freedom cannot simultaneously have both types
- of boundary conditions.
-\end_layout
-
-\begin_layout Subsection
-Vector Notation
-\end_layout
-
-\begin_layout Standard
-Consider volume 
-\begin_inset Formula $V$
-\end_inset
-
- bounded by surface 
-\begin_inset Formula $S$
-\end_inset
-
-.
- Applying a Lagrangian description of the conservation of momentum gives
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula 
-\begin{equation}
-\frac{\partial}{\partial t}\int_{V}\rho\frac{\partial\vec{u}}{\partial t}\, dV=\int_{V}\overrightarrow{f}\, dV+\int_{S}\overrightarrow{T}\, dS.\label{eqn:momentum:vec}
-\end{equation}
-
-\end_inset
-
-The traction vector field is related to the stress tensor through
-\begin_inset Formula 
-\begin{equation}
-\overrightarrow{T}=\underline{\sigma}\cdot\overrightarrow{n},
-\end{equation}
-
-\end_inset
-
-where 
-\begin_inset Formula $\overrightarrow{n}$
-\end_inset
-
- is the vector normal to 
-\begin_inset Formula $S$
-\end_inset
-
-.
- Substituting into equation 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "eqn:momentum:vec"
-
-\end_inset
-
- yields
-\begin_inset Formula 
-\begin{equation}
-\frac{\partial}{\partial t}\int_{V}\rho\frac{\partial\overrightarrow{u}}{\partial t}\, dV=\int_{V}\overrightarrow{f}\, dV+\int_{S}\underline{\sigma}\cdot\overrightarrow{n}\, dS.
-\end{equation}
-
-\end_inset
-
-Applying the divergence theorem,
-\begin_inset Formula 
-\begin{equation}
-\int_{V}\nabla\cdot\overrightarrow{a}\: dV=\int_{S}\overrightarrow{a}\cdot\overrightarrow{n}\: dS,
-\end{equation}
-
-\end_inset
-
-to the surface integral results in
-\begin_inset Formula 
-\begin{equation}
-\frac{\partial}{\partial t}\int_{V}\rho\frac{\partial\overrightarrow{u}}{\partial t}\, dV=\int_{V}\overrightarrow{f}\, dV+\int_{V}\nabla\cdot\underline{\sigma}\, dV,
-\end{equation}
-
-\end_inset
-
-which we can rewrite as
-\begin_inset Formula 
-\begin{equation}
-\int_{V}\left(\rho\frac{\partial^{2}\overrightarrow{u}}{\partial t^{2}}-\overrightarrow{f}-\nabla\cdot\overrightarrow{\sigma}\right)\, dV=\vec{0}.
-\end{equation}
-
-\end_inset
-
-Because the volume 
-\begin_inset Formula $V$
-\end_inset
-
- is arbitrary, the integrand must be the zero vector at every location in
- the volume, so that we end up with
-\begin_inset Formula 
-\begin{gather}
-\rho\frac{\partial^{2}\overrightarrow{u}}{\partial t^{2}}-\overrightarrow{f}-\nabla\cdot\overrightarrow{\sigma}=\vec{0}\text{ in }V,\\
-\underline{\sigma}\cdot\overrightarrow{n}=\overrightarrow{T}\text{ on }S_{T}\text{,}\\
-\overrightarrow{u}=\overrightarrow{u^{o}}\text{ on }S_{u},\text{ and}\\
-\underbar{R}\cdot(\vec{u^{+}}-\vec{u^{-}})=\vec{d}\text{ on }S_{f}.
-\end{gather}
-
-\end_inset
-
-We specify tractions, 
-\begin_inset Formula $\vec{T}$
-\end_inset
-
-, on surface 
-\begin_inset Formula $S_{f}$
-\end_inset
-
-, displacements, 
-\begin_inset Formula $\overrightarrow{u^{o}}$
-\end_inset
-
-, on surface 
-\begin_inset Formula $S_{u}$
-\end_inset
-
-, and slip, 
-\begin_inset Formula $\vec{d}$
-\end_inset
-
-, on fault surface 
-\begin_inset Formula $S_{f}$
-\end_inset
-
- (we will consider the case of fault constitutive models in Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:fault"
-
-\end_inset
-
-).
- The rotation matrix 
-\begin_inset Formula $\underline{R}$
-\end_inset
-
- transforms vectors from the global coordinate system to the fault coordinate
- system.
- Note that since both 
-\begin_inset Formula $\overrightarrow{T}$
-\end_inset
-
- and 
-\begin_inset Formula $\overrightarrow{u}$
-\end_inset
-
- are vector quantities, there can be some spatial overlap of the surfaces
- 
-\begin_inset Formula $S_{T}$
-\end_inset
-
- and 
-\begin_inset Formula $S_{u}$
-\end_inset
-
-; however, the same degree of freedom cannot simultaneously have both types
- of boundary conditions.
-\end_layout
-
-\begin_layout Section
-Finite-Element Formulation of Elasticity Equation
-\end_layout
-
-\begin_layout Standard
-We formulate a set of algebraic equations using Galerkin's method.
- We consider (1) a trial solution, 
-\begin_inset Formula $\vec{u}$
-\end_inset
-
-, that is a piecewise differentiable vector field and satisfies the Dirichlet
- boundary conditions on 
-\begin_inset Formula $S_{u}$
-\end_inset
-
-, and (2) a weighting function, 
-\begin_inset Formula $\vec{\phi}$
-\end_inset
-
-, that is a piecewise differentiable vector field and is zero on 
-\begin_inset Formula $S_{u}$
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Subsection
-Index Notation
-\end_layout
-
-\begin_layout Standard
-We start with the wave equation (strong form),
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula 
-\begin{gather}
-\sigma_{ij,j}+f_{i}=\rho\ddot{u_{i}}\text{ in }V,\\
-\sigma_{ij}n_{j}=T_{i}\text{ on }S_{T},\\
-u_{i}=u_{i}^{o}\text{ on }S_{u},\\
-R_{ki}(u_{i}^{+}-u_{i}^{-})=d_{k}\text{ on }S_{f},\text{ and}\\
-\sigma_{ij}=\sigma_{ji}\text{ (symmetric).}
-\end{gather}
-
-\end_inset
-
-We construct the weak form by computing the dot product of the wave equation
- and weighting function and setting the integral over the domain to zero:
-\begin_inset Formula 
-\begin{gather}
-\int_{V}\left(\sigma_{ij,j}+f_{i}-\rho\ddot{u}_{i}\right)\phi_{i}\, dV=0\text{, or }\\
-\int_{V}\sigma_{ij,j}\phi_{i}\: dV+\int_{V}f_{i}\phi_{i}\: dV-\int_{V}\rho\ddot{u}_{i}\phi_{i}\: dV=0.
-\end{gather}
-
-\end_inset
-
- Consider the divergence theorem applied to the dot product of the stress
- tensor and the weighting function, 
-\begin_inset Formula $\sigma_{ij}\phi_{i}$
-\end_inset
-
-,
-\begin_inset Formula 
-\begin{equation}
-\int_{V}(\sigma_{ij}\phi_{i})_{,j}\, dV=\int_{S}(\sigma_{ij}\phi_{i})n_{i}\, dS.
-\end{equation}
-
-\end_inset
-
-Expanding the left-hand side yields
-\begin_inset Formula 
-\begin{gather}
-\int_{V}\sigma_{ij,j}\phi_{i}\: dV+\int_{V}\sigma_{ij}\phi_{i,j}\: dV=\int_{S}\sigma_{ij}\phi_{i}n_{i}\: dS,\text{ or}\\
-\int_{V}\sigma_{ij,j}\phi_{i}\: dV=-\int_{V}\sigma_{ij}\phi_{i,j}\, dV+\int_{S}\sigma_{ij}\phi_{i}n_{i}\, dS.
-\end{gather}
-
-\end_inset
-
-Substituting into the weak form gives
-\begin_inset Formula 
-\begin{equation}
--\int_{V}\sigma_{ij}\phi_{i,j}\, dV+\int_{S}\sigma_{ij}\phi_{i}n_{i}\, dS+\int_{V}f_{i}\phi_{i}\, dV-\int_{V}\rho\ddot{u}_{i}\phi_{i}\, dV=0.
-\end{equation}
-
-\end_inset
-
-Turning our attention to the second term, we separate the integration over
- 
-\begin_inset Formula $S$
-\end_inset
-
- into integration over 
-\begin_inset Formula $S_{T}$
-\end_inset
-
- and 
-\begin_inset Formula $S_{u}$
-\end_inset
-
- (we will consider tractions over the fault surface, 
-\begin_inset Formula $S_{f}$
-\end_inset
-
-, associated with the fault constitutive model in Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:fault"
-
-\end_inset
-
-),
-\begin_inset Formula 
-\begin{equation}
--\int_{V}\sigma_{ij}\phi_{i,j}\, dV+\int_{S_{T}}\sigma_{ij}\phi_{i}n_{i}\, dS+\int_{S_{u}}\sigma_{ij}\phi_{i}n_{i}\, dS+\int_{V}f_{i}\phi_{i}\, dV-\int_{V}\rho\ddot{u}_{i}\phi_{i}\, dV=0,
-\end{equation}
-
-\end_inset
-
-and recognize that
-\begin_inset Formula 
-\begin{gather}
-\sigma_{ij}n_{i}=T_{i}\text{ on }S_{T}\text{ and}\\
-\phi_{i}=0\text{ on }S_{u},
-\end{gather}
-
-\end_inset
-
-so that the equation reduces to
-\begin_inset Formula 
-\begin{equation}
--\int_{V}\sigma_{ij}\phi_{i,j}\: dV+\int_{S_{T}}T_{i}\phi_{i}\, dS+\int_{V}f_{i}\phi_{i}\, dV-\int_{V}\rho\ddot{u}_{i}\phi_{i}\, dV=0.\label{eq:elasticity:integral}
-\end{equation}
-
-\end_inset
-
-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
-
-Note that because the trial solution satisfies the Dirichlet boundary condition,
- the number of basis functions for 
-\begin_inset Formula $u$
-\end_inset
-
- is generally greater than the number of basis functions for 
-\begin_inset Formula $\phi$
-\end_inset
-
-, i.e., 
-\begin_inset Formula $m>n$
-\end_inset
-
-.
- Substituting in the expressions for the trial solution and weighting function
- yields
-\begin_inset Formula 
-\begin{gather}
--\int_{V}\sigma_{ij}\sum_{n}c_{i}^{n}N_{,j}^{n}\: dV+\int_{S_{T}}T_{i}\sum_{n}c_{i}^{n}N^{n}\, dS+\int_{V}f_{i}\sum_{n}c_{i}^{n}N^{n}\, dV-\int_{V}\rho\sum_{m}\ddot{a}_{i}^{m}N^{m}\sum_{n}c_{i}^{n}N^{n}\ dV=0,\text{ or}\\
-\sum_{n}c_{i}^{n}(-\int_{V}\sigma_{ij}N_{,j}^{n}\: dV+\int_{S_{T}}T_{i}N^{n}\, dS+\int_{V}f_{i}N^{n}\, dV-\int_{V}\rho\sum_{m}\ddot{a}_{i}^{m}N^{m}N^{n}\ dV)=0.
-\end{gather}
-
-\end_inset
-
- Because the weighting function is arbitrary, this equation must hold for
- all 
-\begin_inset Formula $c_{i}^{n}$
-\end_inset
-
-, so that the quantity in parenthesis is zero for each 
-\begin_inset Formula $c_{i}^{n}$
-\end_inset
-
-
-\begin_inset Formula 
-\begin{equation}
--\int_{V}\sigma_{ij}N_{,j}^{n}\: dV+\int_{S_{T}}T_{i}N^{n}\, dS+\int_{V}f_{i}N^{n}\, dV-\int_{V}\rho\sum_{m}\ddot{a}_{i}^{m}N^{m}N^{n}\ dV=\vec{0}.\label{eq:elasticity:integral:discretized}
-\end{equation}
-
-\end_inset
-
-We want to solve this equation for the unknown coefficients 
-\begin_inset Formula $a_{i}^{m}$
-\end_inset
-
- subject to
-\end_layout
-
-\begin_layout Standard
-
-\family roman
-\series medium
-\shape up
-\size normal
-\emph off
-\bar no
-\noun off
-\color none
-\begin_inset Formula 
-\begin{gather}
-u_{i}=u_{i}^{o}\text{ on }S_{u},\text{ and}\\
-R_{ki}(u_{i}^{+}-u_{i}^{-})=d_{k}\text{ on }S_{f},
-\end{gather}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsection
-Vector Notation
-\end_layout
-
-\begin_layout Standard
-We start with the wave equation (strong form),
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula 
-\begin{gather}
-\nabla\cdot\underline{\sigma}+\overrightarrow{f}=\rho\frac{\partial^{2}\overrightarrow{u}}{\partial t^{2}}\text{ in }V,\\
-\underline{\sigma}\cdot\overrightarrow{n}=\overrightarrow{T}\text{ on }S_{T},\\
-\overrightarrow{u}=\overrightarrow{u^{o}}\text{ on }S_{u},\\
-\underbar{R}\cdot(\overrightarrow{u^{+}}-\overrightarrow{u^{-}})=\vec{d}\text{ on }S_{f}\\
-\underline{\sigma}=\underline{\sigma}^{T}\text{ (symmetric).}
-\end{gather}
-
-\end_inset
-
-We construct the weak form by multiplying the wave equation by a weighting
- function and setting the integral over the domain to zero.
- The weighting function is a piecewise differential vector field, 
-\begin_inset Formula $\overrightarrow{\phi}$
-\end_inset
-
-, where 
-\begin_inset Formula $\overrightarrow{\phi}=0$
-\end_inset
-
- on 
-\begin_inset Formula $S_{u}.$
-\end_inset
-
- Hence our weak form is
-\begin_inset Formula 
-\begin{gather}
-\int_{V}\left(\nabla\cdot\underline{\sigma}+\overrightarrow{f}-\rho\frac{\partial^{2}\overrightarrow{u}}{\partial t^{2}}\right)\cdot\overrightarrow{\phi}\, dV=0\text{, or }\\
-\int_{V}(\nabla\cdot\underline{\sigma})\cdot\overrightarrow{\phi}\: dV+\int_{V}\overrightarrow{f}\cdot\overrightarrow{\phi}\: dV-\int_{V}\rho\frac{\partial^{2}\overrightarrow{u}}{\partial t^{2}}\cdot\overrightarrow{\phi}\: dV=0.
-\end{gather}
-
-\end_inset
-
- Consider the divergence theorem applied to the dot product of the stress
- tensor and the trial function, 
-\begin_inset Formula $\underline{\sigma}\cdot\overrightarrow{\phi}$
-\end_inset
-
-,
-\begin_inset Formula 
-\begin{equation}
-\int_{V}\nabla\cdot(\underline{\sigma}\cdot\overrightarrow{\phi})\, dV=\int_{S}(\underline{\sigma}\cdot\overrightarrow{\phi})\cdot\overrightarrow{n}\, dS.
-\end{equation}
-
-\end_inset
-
-Expanding the left-hand side yields
-\begin_inset Formula 
-\begin{equation}
-\int_{V}(\nabla\cdot\underline{\sigma})\cdot\overrightarrow{\phi}\: dV+\int_{V}\underline{\sigma}:\nabla\overrightarrow{\phi}\: dV=\int_{S}(\underline{\sigma}\cdot\overrightarrow{\phi})\cdot\overrightarrow{n}\: dS,\text{ or}
-\end{equation}
-
-\end_inset
-
-
-\begin_inset Formula 
-\begin{equation}
-\int_{V}(\nabla\cdot\underline{\sigma})\cdot\overrightarrow{\phi}\: dV=-\int_{V}\underline{\sigma}:\nabla\overrightarrow{\phi}\, dV+\int_{S}\underline{\sigma}\cdot\overrightarrow{n}\cdot\overrightarrow{\phi}\, dS.
-\end{equation}
-
-\end_inset
-
-Substituting into the weak form gives
-\begin_inset Formula 
-\begin{equation}
--\int_{V}\underline{\sigma}:\nabla\overrightarrow{\phi}\, dV+\int_{S}\underline{\sigma}\cdot\overrightarrow{n}\cdot\overrightarrow{\phi}\, dS+\int_{V}\overrightarrow{f}\cdot\overrightarrow{\phi}\, dV-\int_{V}\rho\frac{\partial^{2}\overrightarrow{u}}{\partial t^{2}}\cdot\overrightarrow{\phi}\, dV=0.
-\end{equation}
-
-\end_inset
-
-We separate the integration over 
-\begin_inset Formula $S$
-\end_inset
-
- into integration over 
-\begin_inset Formula $S_{T}$
-\end_inset
-
- and 
-\begin_inset Formula $S_{u}$
-\end_inset
-
-,
-\begin_inset Formula 
-\begin{multline}
--\int_{V}\underline{\sigma}:\nabla\overrightarrow{\phi}\, dV+\int_{S_{T}}\underline{\sigma}\cdot\overrightarrow{n}\cdot\overrightarrow{\phi}\, dS+\int_{S_{u}}\underline{\sigma}\cdot\overrightarrow{n}\cdot\overrightarrow{\phi}\, dS+\int_{V}\overrightarrow{f}\cdot\overrightarrow{\phi}\, dV-\int_{V}\rho\frac{\partial^{2}\overrightarrow{u}}{\partial t^{2}}\cdot\overrightarrow{\phi}\, dV=0,
-\end{multline}
-
-\end_inset
-
-and recognize that
-\begin_inset Formula 
-\begin{gather}
-\underline{\sigma}\cdot\overrightarrow{n}=\overrightarrow{T}\text{ on }S_{T}\text{ and}\\
-\overrightarrow{\phi}=0\text{ on }S_{u},
-\end{gather}
-
-\end_inset
-
-so that the equation reduces to
-\begin_inset Formula 
-\begin{equation}
--\int_{V}\underline{\sigma}:\nabla\overrightarrow{\phi}\: dV+\int_{S_{T}}\overrightarrow{T}\cdot\overrightarrow{\phi}\, dS+\int_{V}\overrightarrow{f}\cdot\overrightarrow{\phi}\, dV-\int_{V}\rho\frac{\partial^{2}\overrightarrow{u}}{\partial t^{2}}\cdot\overrightarrow{\phi}\, dV=0.
-\end{equation}
-
-\end_inset
-
-We express the trial solution and weighting function as linear combinations
- of basis functions,
-\begin_inset Formula 
-\begin{gather}
-\vec{u}=\sum_{m}\overrightarrow{a^{m}}N^{m},\\
-\vec{\phi}=\sum_{n}\overrightarrow{c^{n}}N^{n}.
-\end{gather}
-
-\end_inset
-
-Note that because the weighting function is zero on 
-\begin_inset Formula $S_{u}$
-\end_inset
-
-, the number of basis functions for 
-\begin_inset Formula $\vec{u}$
-\end_inset
-
- is generally greater than the number of basis functions for 
-\begin_inset Formula $\vec{\phi}$
-\end_inset
-
-, i.e., 
-\begin_inset Formula $m>n$
-\end_inset
-
-.
- Substituting in the expressions for the trial solution and weighting function
- yields
-\begin_inset Formula 
-\begin{multline}
--\int_{V}\underline{\sigma}:\sum_{n}\overrightarrow{c^{n}}\nabla N_{,}^{n}\, dV+\int_{S_{T}}\vec{T}\cdot\sum_{n}\overrightarrow{c^{n}}N^{n}\, dS+\int_{V}\vec{f}\cdot\sum_{n}\overrightarrow{c^{n}}N^{n}\, dV\\
--\int_{V}\rho\sum_{m}\frac{\partial^{2}\overrightarrow{a^{m}}}{\partial t^{2}}N^{m}\cdot\sum_{n}\overrightarrow{c^{n}}N^{n}\ dV=0.
-\end{multline}
-
-\end_inset
-
- Because the weighting function is arbitrary, this equation must hold for
- all 
-\begin_inset Formula $\overrightarrow{c^{n}}$
-\end_inset
-
-, so that
-\begin_inset Formula 
-\begin{equation}
--\int_{V}\underline{\sigma}:\nabla N^{n}\, dV+\int_{S_{T}}\vec{T}N^{n}\, dS+\int_{V}\vec{f}N^{n}\, dV-\int_{V}\rho\sum_{m}\frac{\partial^{2}\overrightarrow{a^{m}}}{\partial t^{2}}N^{m}N^{n}\, dV=\vec{0}.
-\end{equation}
-
-\end_inset
-
-We want to solve this equation for the unknown coefficients 
-\begin_inset Formula $\overrightarrow{a^{m}}$
-\end_inset
-
- subject to
-\end_layout
-
-\begin_layout Standard
-
-\family roman
-\series medium
-\shape up
-\size normal
-\emph off
-\bar no
-\noun off
-\color none
-\begin_inset Formula 
-\begin{gather}
-\vec{u}=u^{o}\overrightarrow{}\text{ on }S_{u},\text{ and}\\
-\underline{R}(\overrightarrow{u^{+}}-\overrightarrow{u^{-}})=\vec{d}\text{ on }S_{f},
-\end{gather}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Section
-Solution Method for Quasi-Static Problems
-\end_layout
-
-\begin_layout Standard
-For brevity we outline the solution method for quasi-static problems using
- only index notation.
- In quasi-static problems we neglect the inertial terms, so equation 
-\begin_inset CommandInset ref
-LatexCommand eqref
-reference "eq:elasticity:integral:discretized"
-
-\end_inset
-
- reduces to
-\begin_inset Formula 
-\begin{equation}
--\int_{V}\sigma_{ij}N_{,j}^{n}\: dV+\int_{S_{T}}T_{i}N^{n}\, dS+\int_{V}f_{i}N^{n}\, dV=\vec{0}.
-\end{equation}
-
-\end_inset
-
-As a result, time-dependence only enters through the constitutive relationships
- and the loading conditions.
- We consider the deformation at time 
-\begin_inset Formula $t+\Delta t$
-\end_inset
-
-,
-\begin_inset Formula 
-\begin{equation}
--\int_{V}\sigma_{ij}(t+\Delta t)N_{,j}^{n}\: dV+\int_{S_{T}}T_{i}(t+\Delta t)N^{n}\, dS+\int_{V}f_{i}(t+\Delta t)N^{n}\, dV=\vec{0}.\label{eq:elasticity:integral:quasistatic}
-\end{equation}
-
-\end_inset
-
-We solve this equation through formulation of a linear algebraic system
- of equations (
-\begin_inset Formula $Au=b$
-\end_inset
-
-), involving the residual (
-\begin_inset Formula $r=b-Au$
-\end_inset
-
-) and Jacobian (
-\begin_inset Formula $A$
-\end_inset
-
-).
- The residual is simply
-\begin_inset Formula 
-\begin{equation}
-r_{i}^{n}=-\int_{V}\sigma_{ij}(t+\Delta t)N_{,j}^{n}\: dV+\int_{S_{T}}T_{i}(t+\Delta t)N^{n}\, dS+\int_{V}f_{i}(t+\Delta t)N^{n}\, dV.
-\end{equation}
-
-\end_inset
-
-We employ numerical quadrature in the finite-element discretization and
- replace the integrals with sums over the cells and quadrature points,
-\begin_inset Formula 
-\begin{multline}
-r_{i}^{n}=-\sum_{\text{vol cells}}\sum_{\text{quad pts}}\sigma_{ij}(x_{q},t+\Delta t)N_{,j}^{n}(x_{q})\: w_{q}|J_{cell}(x_{q})|+\sum_{\text{vol cells}}\sum_{\text{quad pt}s}f_{i}(x_{q},t+\Delta t)N^{n}(x_{q})\, w_{q}|J_{cell}(x_{q})|\\
-+\sum_{\text{tract cells}}\sum_{\text{quad pts}}T_{i}(x_{q},t+\Delta t)N^{n}(x_{q})\, w_{q}|J_{cell}(x_{q})|,
-\end{multline}
-
-\end_inset
-
-where 
-\begin_inset Formula $r_{i}^{n}$
-\end_inset
-
- is an 
-\begin_inset Formula $nd$
-\end_inset
-
- vector (
-\begin_inset Formula $d$
-\end_inset
-
- is the dimension of the vector space) and 
-\begin_inset Formula $i$
-\end_inset
-
- is a vector space component, 
-\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.
- The quadrature scheme for the integral over the tractions is one dimension
- lower than the one used in integrating the terms for the volume cells.
-\end_layout
-
-\begin_layout Standard
-In order to find the Jacobian of the system, we let
-\begin_inset Formula 
-\begin{equation}
-\sigma_{ij}(t+\Delta t)=\sigma_{ij}(t)+d\sigma_{ij}(t).
-\end{equation}
-
-\end_inset
-
-Isolating the term associated with the increment in stresses yields
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula 
-\begin{equation}
-\int_{V}d\sigma_{ij}(t)N_{j}^{n}\ dV=-\int_{V}\sigma_{ij}(t)N_{,j}^{n}\: dV+\int_{S_{T}}T_{i}(t+\Delta t)N^{n}\, dS+\int_{V}f_{i}(t+\Delta t)N^{n}\, dV
-\end{equation}
-
-\end_inset
-
-We associate the term on the left-hand-side with the action of the system
- Jacobian on the increment of the displacement field.
- We approximate the increment in stresses using linear elasticity and infinitesi
-mal strains,
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula 
-\begin{gather}
-d\sigma_{ij}(t)=C_{ijkl}(t)d\varepsilon_{kl}(t)\\
-d\sigma_{ij}(t)=\frac{1}{2}C_{ijkl}(t)(du_{k.l}(t)+du_{l,k}(t))\\
-d\sigma_{ij}(t)=\frac{1}{2}C_{ijkl}(t)(\sum_{m}da_{k,l}^{m}(t)N^{m}+\sum_{m}da_{l,k}^{m}(t)N^{m})
-\end{gather}
-
-\end_inset
-
-Now, 
-\begin_inset Formula $d\sigma_{ij}\phi_{i,j}$
-\end_inset
-
- is a scalar, so it is symmetric,
-\begin_inset Formula 
-\begin{equation}
-d\sigma_{ij}\phi_{i,j}=d\sigma_{ji}\phi_{j,i},
-\end{equation}
-
-\end_inset
-
-and we know that 
-\begin_inset Formula $d\sigma_{ij}$
-\end_inset
-
- is symmetric, so
-\begin_inset Formula 
-\begin{equation}
-d\sigma_{ij}\phi_{i,j}=d\sigma_{ij}\phi_{j,i},
-\end{equation}
-
-\end_inset
-
-which means
-\begin_inset Formula 
-\begin{equation}
-\phi_{i,j}=\phi_{j,i},
-\end{equation}
-
-\end_inset
-
-which we can write as
-\begin_inset Formula 
-\begin{equation}
-\phi_{i,j}=\frac{1}{2}(\phi_{i,j}+\phi_{j,i}).
-\end{equation}
-
-\end_inset
-
-In terms of the basis functions, we have
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula 
-\begin{equation}
-\sum_{n}c_{i}^{n}N_{,j}^{n}=\frac{1}{2}(\sum_{n}c_{i}^{n}N_{,j}^{n}+\sum_{n}c_{j}^{n}N_{,i}^{n}).
-\end{equation}
-
-\end_inset
-
-Combining these expressions for the increment in stresses and making use
- of the symmetry of the weighting functions, we find the system Jacobian
- is
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula 
-\begin{equation}
-A_{ij}^{nm}=\int_{V}\frac{1}{4}C_{ijkl}(N_{,l}^{m}+N_{,k}^{m})(N_{,j}^{n}+N_{,i}^{n})\ dV.
-\end{equation}
-
-\end_inset
-
-We employ numerical quadrature in the finite-element discretization and
- replace the integral with a sum over the cells and quadrature points,
-\begin_inset Formula 
-\begin{equation}
-A_{ij}^{nm}=\sum_{\text{vol cells}}\sum_{\text{quad pts}}\frac{1}{4}C_{ijkl}(N_{,l}^{m}(x_{q})+N_{,k}^{m}(x_{q}))(N_{,j}^{n}(x_{q})+N_{,i}^{n}(x_{q}))w_{q}|J_{cell}(x_{q}).
-\end{equation}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Section
-Solution Method for Dynamic Problems
-\end_layout
-
-\begin_layout Standard
-For brevity we outline the solution method for dynamic problems using only
- index notation.
- Time-dependence enters through the constitutive relationships, loading
- conditions, and the inertial terms.
- We consider the deformation at time 
-\begin_inset Formula $t$
-\end_inset
-
-,
-\begin_inset Formula 
-\begin{equation}
--\int_{V}\sigma_{ij}(t)N_{,j}^{n}\: dV+\int_{S_{T}}T_{i}(t)N^{n}\, dS+\int_{V}f_{i}(t)N^{n}\, dV-\int_{V}\rho\sum_{m}\ddot{a}_{i}^{m}(t)N^{m}N^{n}\ dV=\vec{0}.\label{eq:elasticity:integral:dynamic:t}
-\end{equation}
-
-\end_inset
-
-We solve this equation through formulation of a linear algebraic system
- of equations (
-\begin_inset Formula $Au=b$
-\end_inset
-
-), involving the residual (
-\begin_inset Formula $r=b-Au$
-\end_inset
-
-) and Jacobian (
-\begin_inset Formula $A$
-\end_inset
-
-).
- The residual is simply
-\begin_inset Formula 
-\begin{equation}
-r_{i}^{n}=-\int_{V}\sigma_{ij}(t)N_{,j}^{n}\: dV+\int_{S_{T}}T_{i}(t)N^{n}\, dS+\int_{V}f_{i}(t)N^{n}\, dV-\int_{V}\rho\sum_{m}\ddot{a}_{i}^{m}(t)N^{m}N^{n}\ dV.
-\end{equation}
-
-\end_inset
-
-We employ numerical quadrature in the finite-element discretization and
- replace the integrals with sums over the cells and quadrature points,
-\begin_inset Formula 
-\begin{multline}
-r_{i}^{n}=-\sum_{\text{vol cells}}\sum_{\text{quad pts}}\sigma_{ij}(x_{q},t)N^{n}(x_{q})\: w_{q}|J_{cell}(x_{q})|+\sum_{\text{vol cells}}\sum_{\text{quad pt}s}f_{i}(x_{q},t)N^{n}(x_{q})\, w_{q}|J_{cell}(x_{q})|\\
-+\sum_{\text{tract cells}}\sum_{\text{quad pts}}T_{i}(x_{q},t)N^{n}(x_{q})\, w_{q}|J_{cell}(x_{q})|-\sum_{\text{vol cells}}\sum_{\text{quad pts}}\rho\sum_{m}\ddot{a}_{i}^{m}(t)N^{m}N^{n}\ w_{q|J_{cell}(x_{q})},
-\end{multline}
-
-\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.
- The quadrature scheme for the integral over the tractions is one dimension
- lower than the one used in integrating the terms for the volume cells.
- 
-\end_layout
-
-\begin_layout Standard
-We find the system Jacobian matrix by making use of the temporal discretization
- and isolating the term for the increment in the displacement field at time
- 
-\begin_inset Formula $t$
-\end_inset
-
-.
- Using the central difference method to approximate the acceleration (and
- velocity),
-\begin_inset Formula 
-\begin{gather}
-\ddot{u}_{i}(t)=\frac{1}{\Delta t^{2}}\left(u_{i}(t+\Delta t)-2u_{i}(t)+u_{i}(t-\Delta t)\right)\\
-\dot{u}_{i}(t)=\frac{1}{2\Delta t}\left(u_{i}(t+\Delta t)-u_{i}(t-\Delta t)\right)
-\end{gather}
-
-\end_inset
-
-and writing the displacement at time 
-\begin_inset Formula $t+\Delta t$
-\end_inset
-
- in terms of the displacement at 
-\begin_inset Formula $t$
-\end_inset
-
- (for consistency with the displacement increment quasi-static formulation),
-\begin_inset Formula 
-\begin{gather}
-u_{i}(t+\Delta t)=u_{i}(t)+du_{i}(t),\\
-\ddot{u}_{i}(t)=\frac{1}{\Delta t^{2}}\left(du_{i}(t)-u_{i}(t)+u_{i}(t-\Delta t)\right),\\
-\dot{u}_{i}(t)=\frac{1}{2\Delta t}\left(du_{i}(t)+u_{i}(t)-u_{i}(t-\Delta t)\right).
-\end{gather}
-
-\end_inset
-
-Substituting into equation 
-\begin_inset CommandInset ref
-LatexCommand eqref
-reference "eq:elasticity:integral:dynamic:t"
-
-\end_inset
-
- yields
-\begin_inset Formula 
-\begin{multline}
-\frac{1}{\Delta t^{2}}\int_{V}\rho\sum_{m}da_{i}^{m}(t)N^{m}N^{n}\ dV=-\int_{V}\sigma_{ij}N_{,j}^{n}\: dV+\int_{S_{T}}T_{i}N^{n}\, dS+\int_{V}f_{i}N^{n}\, dV\\
--\frac{1}{\Delta t^{2}}\int_{V}\rho\sum_{m}(a_{i}^{m}(t)-a_{i}^{m}(t-\Delta t))N^{m}N^{n}\ dV.
-\end{multline}
-
-\end_inset
-
-Thus, the Jacobian for the system is
-\begin_inset Formula 
-\begin{equation}
-A_{ij}^{nm}=\delta_{ij}\frac{1}{\Delta t^{2}}\int_{V}\rho N^{m}N^{n}\ dV,
-\end{equation}
-
-\end_inset
-
-and using numerical quadrature in the finite-element discretization to replace
- the integrals with sums over the cells and quadrature points,
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula 
-\begin{equation}
-A_{ij}^{nm}=\delta_{ij}\frac{1}{\Delta t^{2}}\sum_{\text{vol cells}}\sum_{\text{quad pts}}\rho(x_{q})N^{m}(x_{q})N^{n}(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.
- We consider the contributions associated with the fault in section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:fault"
-
-\end_inset
-
- and with absorbing boundaries is section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:absorbing:boundaries"
-
-\end_inset
-
-.
-\end_layout
-
-\begin_layout Section
-Small Strain Formulation
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:Small-Strain-Formulation"
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-In some crustal deformation problems sufficient deformation may occur that
- the assumptions associated with infinitesimal strains no longer hold.
- This is often the case for problems when one wants to include the effects
- of gravitational body forces and deformation on the overburden pressure.
- In such cases we want to account for both rigid body motion and small strains.
- The elasticity formulation in PyLith for small strains uses the Green-Lagrange
- strain tensor and the Second Piola-Kirchhoff stress tensor as is based
- on the one presented by Bathe 
-\begin_inset CommandInset citation
-LatexCommand cite
-key "Bathe:1995"
-
-\end_inset
-
-.
- The Green-Lagrange strain provides a measure of the strain relative to
- the original, undeformed configuration.
-\begin_inset Formula 
-\begin{gather}
-\varepsilon_{ij}=\frac{1}{2}(u_{i,j}+u_{j,i}+u_{k,i}u_{k,j}),\text{ or}\\
-\varepsilon_{ij}=X_{ji}X_{ij}-\delta_{ij},\text{ where}\\
-X_{ij}=x_{i,j}(t)=\frac{\partial}{\partial x_{j}}(x_{i}(0)+u_{i}(t)),
-\end{gather}
-
-\end_inset
-
-and 
-\begin_inset Formula $X_{ij}$
-\end_inset
-
- is the deformation tensor.
- The Second Piola-Kirchhoff stress tensor, 
-\begin_inset Formula $S_{ij}$
-\end_inset
-
-, is related to the Green-Lagrange strain tensor through the elasticity
- constants,
-\end_layout
-
-\begin_layout Standard
-\begin_inset Formula 
-\begin{equation}
-S_{ij}=C_{ijkl}\varepsilon_{kl},
-\end{equation}
-
-\end_inset
-
-in the same manner as in the infinitesimal strain formulation.
-\end_layout
-
-\begin_layout Standard
-The elasticity integral in the finite-element formulation includes additional
- terms when we account for small strains.
- Recognizing the similarity between the weighting function and an increment
- in strain in the infinitesimal formulation (many finite-element texts derive
- the finite-element formulation for elasticity using the Principle of Virtual
- Work), we replace 
-\begin_inset Formula $\int_{V}\sigma_{ij}\phi_{i,j}\: dV$
-\end_inset
-
- with 
-\begin_inset Formula $\int_{V}S_{ij}\delta\varepsilon_{ij}\: dV$
-\end_inset
-
- in equation 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "eq:elasticity:integral"
-
-\end_inset
-
-, where 
-\begin_inset Formula $\delta\varepsilon_{ij}$
-\end_inset
-
- is the 
-\begin_inset Quotes eld
-\end_inset
-
-virtual
-\begin_inset Quotes erd
-\end_inset
-
- strain.
- Using the definition of the Green-Lagrangian strain, we have
-\begin_inset Formula 
-\begin{equation}
-\int_{V}S_{ij}\delta\varepsilon_{ij}\: dV=\int_{V}\frac{1}{2}S_{ij}(\delta u_{i,j}+\delta u_{j,i}+u_{k,i}\delta u_{k,j}+u_{k,j}\delta u_{k,i})\: dV.
-\end{equation}
-
-\end_inset
-
-Writing the displacements in terms of the basis functions and forcing the
- terms associated with the arbitrary weighting function (
-\begin_inset Quotes eld
-\end_inset
-
-virtual
-\begin_inset Quotes erd
-\end_inset
-
- strain) to zero yields the elastic term in the residual,
-\begin_inset Formula 
-\begin{equation}
-r_{i}^{n}=\int_{V}S_{ij}(N_{,i}^{n}+(\sum_{m}a_{k}^{m}N_{,j}^{m})N_{,i}^{n})\: dV.
-\end{equation}
-
-\end_inset
-
-Thus, we have one additional term (the second term) compared with the residual
- for infinitesimal strains.
- Just as in the infinitesimal formulation, we evaluate the integral over
- the volume using numerical quadrature with sums over the quadrature points
- of each cell.
-\end_layout
-
-\begin_layout Subsection
-Quasi-static Problems
-\end_layout
-
-\begin_layout Standard
-The system Jacobian for quasi-static problems includes terms associated
- with elasticity.
- For the small strain formulation, we write the elasticity term at time
- 
-\begin_inset Formula $t+\Delta t$
-\end_inset
-
- and consider the first terms of the Taylor series expansion,
-\begin_inset Formula 
-\begin{equation}
-\int_{v}S_{ij}(t+\Delta t)\delta\varepsilon_{ij}(t+\Delta t)\: dV=\int_{V}(S_{ij}(t)\delta\varepsilon_{ij}(t)+dS_{ij}(t)\delta\varepsilon_{ij}(t)+S_{ij}(t)d\delta\varepsilon_{ij}(t))\: dV.
-\end{equation}
-
-\end_inset
-
-We approximate the increment in the stress tensor using the elastic constants,
-\begin_inset Formula 
-\begin{equation}
-dS_{ij}=C_{ijkl}d\varepsilon_{kl},
-\end{equation}
-
-\end_inset
-
-and the increment in the 
-\begin_inset Quotes eld
-\end_inset
-
-virtual
-\begin_inset Quotes erd
-\end_inset
-
- strain via
-\begin_inset Formula 
-\begin{equation}
-d\delta\varepsilon_{ij}=\frac{1}{2}(du_{k,i}\delta u_{k,j}+du_{k,j}\delta u_{k,i}).
-\end{equation}
-
-\end_inset
-
-We associate the system Jacobian with the terms involving the increment
- in displacements.
- After substituting in the expressions for the increment in the stresses
- and the increment in the 
-\begin_inset Quotes eld
-\end_inset
-
-virtual
-\begin_inset Quotes erd
-\end_inset
-
- strains, we have
-\begin_inset Formula 
-\begin{equation}
-A_{ij}^{nm}=\int_{V}\frac{1}{4}C_{ijkl}(N_{,k}^{m}+(\sum_{r}a_{p}^{r}N_{,l}^{r})N_{,k}^{m})(N_{,i}^{n}+(\sum_{r}a_{p}^{r}N_{,j}^{r})N_{,i}^{n})+\frac{1}{2}S_{kl}N_{,l}^{m}N_{,l}^{n}\delta_{ij}\: dV.
-\end{equation}
-
-\end_inset
-
-The small strain formulation produces additional terms associated with the
- elastic constants and new a new term associated with the stress tensor.
-\end_layout
-
-\begin_layout Subsection
-Dynamic Problems
-\end_layout
-
-\begin_layout Standard
-The system Jacobian matrix in dynamic problems does not include any terms
- associated with elasticity, so the system Jacobian matrix in the small
- strain formulation matches the one used in the infinitesimal strain formulation.
-\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:Governing-Equations"
+
+\end_inset
+
+Governing Equations
+\end_layout
+
+\begin_layout Standard
+We present here a brief derivation of the equations for both quasi-static
+ and dynamic computations.
+ Since the general equations are the same (except for the absence of inertial
+ terms in the quasi-static case), we first derive these equations.
+ We then present solution methods for each specific case.
+ In all of our derivations, we use the notation described in Table 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "tab:Mathematical-notation"
+
+\end_inset
+
+ for both index and vector notation.
+ When using index notation, we use the common convention that repeated indices
+ indicate summation over the range of the index.
+\end_layout
+
+\begin_layout Standard
+\noindent
+\align center
+\begin_inset Float table
+placement H
+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:Mathematical-notation"
+
+\end_inset
+
+Mathematical notation
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\noindent
+\align center
+\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="0">
+<row>
+<cell multicolumn="1" alignment="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Symbol
+\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
+Description
+\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
+Index notation
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Vector Notation
+\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
+
+\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
+\begin_inset Formula $a_{i}$
+\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 $\overrightarrow{a}$
+\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
+Vector field a
+\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
+\begin_inset Formula $a_{ij}$
+\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 $\underline{a}$
+\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
+Second order tensor field a
+\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
+\begin_inset Formula $u_{i}$
+\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 $\overrightarrow{u}$
+\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
+Displacement vector field
+\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
+\begin_inset Formula $d_{i}$
+\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 $\vec{{d}}$
+\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
+Fault slip vector field
+\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
+\begin_inset Formula $f_{i}$
+\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 $\overrightarrow{f}$
+\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
+Body force vector field
+\end_layout
+
+\end_inset
+</cell>
+</row>
+<row>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset Formula $T_{i}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset Formula $\overrightarrow{T}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" leftline="true" rightline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+Traction vector field
+\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
+\begin_inset Formula $\sigma_{ij}$
+\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 $\underline{\sigma}$
+\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
+Stress tensor field
+\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
+\begin_inset Formula $n_{i}$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset Formula $\overrightarrow{n}$
+\end_inset
+
+
+\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
+Normal vector field
+\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
+\begin_inset Formula $\rho$
+\end_inset
+
+
+\end_layout
+
+\end_inset
+</cell>
+<cell alignment="center" valignment="top" bottomline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+\begin_inset Formula $\rho$
+\end_inset
+
+
+\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
+Mass density scalar field
+\end_layout
+
+\end_inset
+</cell>
+</row>
+</lyxtabular>
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Derivation of Elasticity Equation
+\end_layout
+
+\begin_layout Subsection
+Index Notation
+\end_layout
+
+\begin_layout Standard
+Consider volume 
+\begin_inset Formula $V$
+\end_inset
+
+ bounded by surface 
+\begin_inset Formula $S$
+\end_inset
+
+.
+ Applying a Lagrangian description of the conservation of momentum gives
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula 
+\begin{equation}
+\frac{\partial}{\partial t}\int_{V}\rho\frac{\partial u_{i}}{\partial t}\, dV=\int_{V}f_{i}\, dV+\int_{S}T_{i}\, dS.\label{eqn:momentum:index}
+\end{equation}
+
+\end_inset
+
+The traction vector field is related to the stress tensor through
+\begin_inset Formula 
+\begin{equation}
+T_{i}=\sigma_{ij}n_{j},
+\end{equation}
+
+\end_inset
+
+where 
+\begin_inset Formula $n_{j}$
+\end_inset
+
+ is the vector normal to 
+\begin_inset Formula $S$
+\end_inset
+
+.
+ Substituting into equation 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "eqn:momentum:index"
+
+\end_inset
+
+ yields
+\begin_inset Formula 
+\begin{equation}
+\frac{\partial}{\partial t}\int_{V}\rho\frac{\partial u_{i}}{\partial t}\, dV=\int_{V}f_{i}\, dV+\int_{S}\sigma_{ij}n_{j}\, dS.
+\end{equation}
+
+\end_inset
+
+Applying the divergence theorem,
+\begin_inset Formula 
+\begin{equation}
+\int_{V}a_{i,j}\: dV=\int_{S}a_{j}n_{j}\: dS,
+\end{equation}
+
+\end_inset
+
+to the surface integral results in
+\begin_inset Formula 
+\begin{equation}
+\frac{\partial}{\partial t}\int_{V}\rho\frac{\partial u_{i}}{\partial t}\, dV=\int_{V}f_{i}\, dV+\int_{V}\sigma_{ij,j}\, dV,
+\end{equation}
+
+\end_inset
+
+which we can rewrite as
+\begin_inset Formula 
+\begin{equation}
+\int_{V}\left(\rho\frac{\partial^{2}u_{i}}{\partial t^{2}}-f_{i}-\sigma_{ij,j}\right)\, dV=0.
+\end{equation}
+
+\end_inset
+
+Because the volume 
+\begin_inset Formula $V$
+\end_inset
+
+ is arbitrary, the integrand must be zero at every location in the volume,
+ so that we end up with
+\begin_inset Formula 
+\begin{gather}
+\rho\frac{\partial^{2}u_{i}}{\partial t^{2}}-f_{i}-\sigma_{ij,j}=0\text{ in }V,\\
+\sigma_{ij}n_{j}=T_{i}\text{ on }S_{T}\text{,}\\
+u_{i}=u_{i}^{o}\text{ on }S_{u}\text{, and}\\
+R_{ki}(u_{i}^{+}-u_{i}^{-})=d_{k}\text{ on }S_{f}.
+\end{gather}
+
+\end_inset
+
+We specify tractions, 
+\begin_inset Formula $T_{i}$
+\end_inset
+
+, on surface 
+\begin_inset Formula $S_{f}$
+\end_inset
+
+, displacements, 
+\begin_inset Formula $u_{i}^{o}$
+\end_inset
+
+, on surface 
+\begin_inset Formula $S_{u}$
+\end_inset
+
+, and slip, 
+\begin_inset Formula $d_{k}$
+\end_inset
+
+, on fault surface 
+\begin_inset Formula $S_{f}$
+\end_inset
+
+ (we will consider the case of fault constitutive models in Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:fault"
+
+\end_inset
+
+).
+ The rotation matrix 
+\begin_inset Formula $R_{ki}$
+\end_inset
+
+ transforms vectors from the global coordinate system to the fault coordinate
+ system.
+ Note that since both 
+\begin_inset Formula $T_{i}$
+\end_inset
+
+ and 
+\begin_inset Formula $u_{i}$
+\end_inset
+
+ are vector quantities, there can be some spatial overlap of the surfaces
+ 
+\begin_inset Formula $S_{T}$
+\end_inset
+
+ and 
+\begin_inset Formula $S_{u}$
+\end_inset
+
+; however, the same degree of freedom cannot simultaneously have both types
+ of boundary conditions.
+\end_layout
+
+\begin_layout Subsection
+Vector Notation
+\end_layout
+
+\begin_layout Standard
+Consider volume 
+\begin_inset Formula $V$
+\end_inset
+
+ bounded by surface 
+\begin_inset Formula $S$
+\end_inset
+
+.
+ Applying a Lagrangian description of the conservation of momentum gives
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula 
+\begin{equation}
+\frac{\partial}{\partial t}\int_{V}\rho\frac{\partial\vec{u}}{\partial t}\, dV=\int_{V}\overrightarrow{f}\, dV+\int_{S}\overrightarrow{T}\, dS.\label{eqn:momentum:vec}
+\end{equation}
+
+\end_inset
+
+The traction vector field is related to the stress tensor through
+\begin_inset Formula 
+\begin{equation}
+\overrightarrow{T}=\underline{\sigma}\cdot\overrightarrow{n},
+\end{equation}
+
+\end_inset
+
+where 
+\begin_inset Formula $\overrightarrow{n}$
+\end_inset
+
+ is the vector normal to 
+\begin_inset Formula $S$
+\end_inset
+
+.
+ Substituting into equation 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "eqn:momentum:vec"
+
+\end_inset
+
+ yields
+\begin_inset Formula 
+\begin{equation}
+\frac{\partial}{\partial t}\int_{V}\rho\frac{\partial\overrightarrow{u}}{\partial t}\, dV=\int_{V}\overrightarrow{f}\, dV+\int_{S}\underline{\sigma}\cdot\overrightarrow{n}\, dS.
+\end{equation}
+
+\end_inset
+
+Applying the divergence theorem,
+\begin_inset Formula 
+\begin{equation}
+\int_{V}\nabla\cdot\overrightarrow{a}\: dV=\int_{S}\overrightarrow{a}\cdot\overrightarrow{n}\: dS,
+\end{equation}
+
+\end_inset
+
+to the surface integral results in
+\begin_inset Formula 
+\begin{equation}
+\frac{\partial}{\partial t}\int_{V}\rho\frac{\partial\overrightarrow{u}}{\partial t}\, dV=\int_{V}\overrightarrow{f}\, dV+\int_{V}\nabla\cdot\underline{\sigma}\, dV,
+\end{equation}
+
+\end_inset
+
+which we can rewrite as
+\begin_inset Formula 
+\begin{equation}
+\int_{V}\left(\rho\frac{\partial^{2}\overrightarrow{u}}{\partial t^{2}}-\overrightarrow{f}-\nabla\cdot\overrightarrow{\sigma}\right)\, dV=\vec{0}.
+\end{equation}
+
+\end_inset
+
+Because the volume 
+\begin_inset Formula $V$
+\end_inset
+
+ is arbitrary, the integrand must be the zero vector at every location in
+ the volume, so that we end up with
+\begin_inset Formula 
+\begin{gather}
+\rho\frac{\partial^{2}\overrightarrow{u}}{\partial t^{2}}-\overrightarrow{f}-\nabla\cdot\overrightarrow{\sigma}=\vec{0}\text{ in }V,\\
+\underline{\sigma}\cdot\overrightarrow{n}=\overrightarrow{T}\text{ on }S_{T}\text{,}\\
+\overrightarrow{u}=\overrightarrow{u^{o}}\text{ on }S_{u},\text{ and}\\
+\underbar{R}\cdot(\vec{u^{+}}-\vec{u^{-}})=\vec{d}\text{ on }S_{f}.
+\end{gather}
+
+\end_inset
+
+We specify tractions, 
+\begin_inset Formula $\vec{T}$
+\end_inset
+
+, on surface 
+\begin_inset Formula $S_{f}$
+\end_inset
+
+, displacements, 
+\begin_inset Formula $\overrightarrow{u^{o}}$
+\end_inset
+
+, on surface 
+\begin_inset Formula $S_{u}$
+\end_inset
+
+, and slip, 
+\begin_inset Formula $\vec{d}$
+\end_inset
+
+, on fault surface 
+\begin_inset Formula $S_{f}$
+\end_inset
+
+ (we will consider the case of fault constitutive models in Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:fault"
+
+\end_inset
+
+).
+ The rotation matrix 
+\begin_inset Formula $\underline{R}$
+\end_inset
+
+ transforms vectors from the global coordinate system to the fault coordinate
+ system.
+ Note that since both 
+\begin_inset Formula $\overrightarrow{T}$
+\end_inset
+
+ and 
+\begin_inset Formula $\overrightarrow{u}$
+\end_inset
+
+ are vector quantities, there can be some spatial overlap of the surfaces
+ 
+\begin_inset Formula $S_{T}$
+\end_inset
+
+ and 
+\begin_inset Formula $S_{u}$
+\end_inset
+
+; however, the same degree of freedom cannot simultaneously have both types
+ of boundary conditions.
+\end_layout
+
+\begin_layout Section
+Finite-Element Formulation of Elasticity Equation
+\end_layout
+
+\begin_layout Standard
+We formulate a set of algebraic equations using Galerkin's method.
+ We consider (1) a trial solution, 
+\begin_inset Formula $\vec{u}$
+\end_inset
+
+, that is a piecewise differentiable vector field and satisfies the Dirichlet
+ boundary conditions on 
+\begin_inset Formula $S_{u}$
+\end_inset
+
+, and (2) a weighting function, 
+\begin_inset Formula $\vec{\phi}$
+\end_inset
+
+, that is a piecewise differentiable vector field and is zero on 
+\begin_inset Formula $S_{u}$
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Subsection
+Index Notation
+\end_layout
+
+\begin_layout Standard
+We start with the wave equation (strong form),
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula 
+\begin{gather}
+\sigma_{ij,j}+f_{i}=\rho\ddot{u_{i}}\text{ in }V,\\
+\sigma_{ij}n_{j}=T_{i}\text{ on }S_{T},\\
+u_{i}=u_{i}^{o}\text{ on }S_{u},\\
+R_{ki}(u_{i}^{+}-u_{i}^{-})=d_{k}\text{ on }S_{f},\text{ and}\\
+\sigma_{ij}=\sigma_{ji}\text{ (symmetric).}
+\end{gather}
+
+\end_inset
+
+We construct the weak form by computing the dot product of the wave equation
+ and weighting function and setting the integral over the domain to zero:
+\begin_inset Formula 
+\begin{gather}
+\int_{V}\left(\sigma_{ij,j}+f_{i}-\rho\ddot{u}_{i}\right)\phi_{i}\, dV=0\text{, or }\\
+\int_{V}\sigma_{ij,j}\phi_{i}\: dV+\int_{V}f_{i}\phi_{i}\: dV-\int_{V}\rho\ddot{u}_{i}\phi_{i}\: dV=0.
+\end{gather}
+
+\end_inset
+
+ Consider the divergence theorem applied to the dot product of the stress
+ tensor and the weighting function, 
+\begin_inset Formula $\sigma_{ij}\phi_{i}$
+\end_inset
+
+,
+\begin_inset Formula 
+\begin{equation}
+\int_{V}(\sigma_{ij}\phi_{i})_{,j}\, dV=\int_{S}(\sigma_{ij}\phi_{i})n_{i}\, dS.
+\end{equation}
+
+\end_inset
+
+Expanding the left-hand side yields
+\begin_inset Formula 
+\begin{gather}
+\int_{V}\sigma_{ij,j}\phi_{i}\: dV+\int_{V}\sigma_{ij}\phi_{i,j}\: dV=\int_{S}\sigma_{ij}\phi_{i}n_{i}\: dS,\text{ or}\\
+\int_{V}\sigma_{ij,j}\phi_{i}\: dV=-\int_{V}\sigma_{ij}\phi_{i,j}\, dV+\int_{S}\sigma_{ij}\phi_{i}n_{i}\, dS.
+\end{gather}
+
+\end_inset
+
+Substituting into the weak form gives
+\begin_inset Formula 
+\begin{equation}
+-\int_{V}\sigma_{ij}\phi_{i,j}\, dV+\int_{S}\sigma_{ij}\phi_{i}n_{i}\, dS+\int_{V}f_{i}\phi_{i}\, dV-\int_{V}\rho\ddot{u}_{i}\phi_{i}\, dV=0.
+\end{equation}
+
+\end_inset
+
+Turning our attention to the second term, we separate the integration over
+ 
+\begin_inset Formula $S$
+\end_inset
+
+ into integration over 
+\begin_inset Formula $S_{T}$
+\end_inset
+
+ and 
+\begin_inset Formula $S_{u}$
+\end_inset
+
+ (we will consider tractions over the fault surface, 
+\begin_inset Formula $S_{f}$
+\end_inset
+
+, associated with the fault constitutive model in Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:fault"
+
+\end_inset
+
+),
+\begin_inset Formula 
+\begin{equation}
+-\int_{V}\sigma_{ij}\phi_{i,j}\, dV+\int_{S_{T}}\sigma_{ij}\phi_{i}n_{i}\, dS+\int_{S_{u}}\sigma_{ij}\phi_{i}n_{i}\, dS+\int_{V}f_{i}\phi_{i}\, dV-\int_{V}\rho\ddot{u}_{i}\phi_{i}\, dV=0,
+\end{equation}
+
+\end_inset
+
+and recognize that
+\begin_inset Formula 
+\begin{gather}
+\sigma_{ij}n_{i}=T_{i}\text{ on }S_{T}\text{ and}\\
+\phi_{i}=0\text{ on }S_{u},
+\end{gather}
+
+\end_inset
+
+so that the equation reduces to
+\begin_inset Formula 
+\begin{equation}
+-\int_{V}\sigma_{ij}\phi_{i,j}\: dV+\int_{S_{T}}T_{i}\phi_{i}\, dS+\int_{V}f_{i}\phi_{i}\, dV-\int_{V}\rho\ddot{u}_{i}\phi_{i}\, dV=0.\label{eq:elasticity:integral}
+\end{equation}
+
+\end_inset
+
+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
+
+Note that because the trial solution satisfies the Dirichlet boundary condition,
+ the number of basis functions for 
+\begin_inset Formula $u$
+\end_inset
+
+ is generally greater than the number of basis functions for 
+\begin_inset Formula $\phi$
+\end_inset
+
+, i.e., 
+\begin_inset Formula $m>n$
+\end_inset
+
+.
+ Substituting in the expressions for the trial solution and weighting function
+ yields
+\begin_inset Formula 
+\begin{gather}
+-\int_{V}\sigma_{ij}\sum_{n}c_{i}^{n}N_{,j}^{n}\: dV+\int_{S_{T}}T_{i}\sum_{n}c_{i}^{n}N^{n}\, dS+\int_{V}f_{i}\sum_{n}c_{i}^{n}N^{n}\, dV-\int_{V}\rho\sum_{m}\ddot{a}_{i}^{m}N^{m}\sum_{n}c_{i}^{n}N^{n}\ dV=0,\text{ or}\\
+\sum_{n}c_{i}^{n}(-\int_{V}\sigma_{ij}N_{,j}^{n}\: dV+\int_{S_{T}}T_{i}N^{n}\, dS+\int_{V}f_{i}N^{n}\, dV-\int_{V}\rho\sum_{m}\ddot{a}_{i}^{m}N^{m}N^{n}\ dV)=0.
+\end{gather}
+
+\end_inset
+
+ Because the weighting function is arbitrary, this equation must hold for
+ all 
+\begin_inset Formula $c_{i}^{n}$
+\end_inset
+
+, so that the quantity in parenthesis is zero for each 
+\begin_inset Formula $c_{i}^{n}$
+\end_inset
+
+
+\begin_inset Formula 
+\begin{equation}
+-\int_{V}\sigma_{ij}N_{,j}^{n}\: dV+\int_{S_{T}}T_{i}N^{n}\, dS+\int_{V}f_{i}N^{n}\, dV-\int_{V}\rho\sum_{m}\ddot{a}_{i}^{m}N^{m}N^{n}\ dV=\vec{0}.\label{eq:elasticity:integral:discretized}
+\end{equation}
+
+\end_inset
+
+We want to solve this equation for the unknown coefficients 
+\begin_inset Formula $a_{i}^{m}$
+\end_inset
+
+ subject to
+\end_layout
+
+\begin_layout Standard
+
+\family roman
+\series medium
+\shape up
+\size normal
+\emph off
+\bar no
+\noun off
+\color none
+\begin_inset Formula 
+\begin{gather}
+u_{i}=u_{i}^{o}\text{ on }S_{u},\text{ and}\\
+R_{ki}(u_{i}^{+}-u_{i}^{-})=d_{k}\text{ on }S_{f},
+\end{gather}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsection
+Vector Notation
+\end_layout
+
+\begin_layout Standard
+We start with the wave equation (strong form),
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula 
+\begin{gather}
+\nabla\cdot\underline{\sigma}+\overrightarrow{f}=\rho\frac{\partial^{2}\overrightarrow{u}}{\partial t^{2}}\text{ in }V,\\
+\underline{\sigma}\cdot\overrightarrow{n}=\overrightarrow{T}\text{ on }S_{T},\\
+\overrightarrow{u}=\overrightarrow{u^{o}}\text{ on }S_{u},\\
+\underbar{R}\cdot(\overrightarrow{u^{+}}-\overrightarrow{u^{-}})=\vec{d}\text{ on }S_{f}\\
+\underline{\sigma}=\underline{\sigma}^{T}\text{ (symmetric).}
+\end{gather}
+
+\end_inset
+
+We construct the weak form by multiplying the wave equation by a weighting
+ function and setting the integral over the domain to zero.
+ The weighting function is a piecewise differential vector field, 
+\begin_inset Formula $\overrightarrow{\phi}$
+\end_inset
+
+, where 
+\begin_inset Formula $\overrightarrow{\phi}=0$
+\end_inset
+
+ on 
+\begin_inset Formula $S_{u}.$
+\end_inset
+
+ Hence our weak form is
+\begin_inset Formula 
+\begin{gather}
+\int_{V}\left(\nabla\cdot\underline{\sigma}+\overrightarrow{f}-\rho\frac{\partial^{2}\overrightarrow{u}}{\partial t^{2}}\right)\cdot\overrightarrow{\phi}\, dV=0\text{, or }\\
+\int_{V}(\nabla\cdot\underline{\sigma})\cdot\overrightarrow{\phi}\: dV+\int_{V}\overrightarrow{f}\cdot\overrightarrow{\phi}\: dV-\int_{V}\rho\frac{\partial^{2}\overrightarrow{u}}{\partial t^{2}}\cdot\overrightarrow{\phi}\: dV=0.
+\end{gather}
+
+\end_inset
+
+ Consider the divergence theorem applied to the dot product of the stress
+ tensor and the trial function, 
+\begin_inset Formula $\underline{\sigma}\cdot\overrightarrow{\phi}$
+\end_inset
+
+,
+\begin_inset Formula 
+\begin{equation}
+\int_{V}\nabla\cdot(\underline{\sigma}\cdot\overrightarrow{\phi})\, dV=\int_{S}(\underline{\sigma}\cdot\overrightarrow{\phi})\cdot\overrightarrow{n}\, dS.
+\end{equation}
+
+\end_inset
+
+Expanding the left-hand side yields
+\begin_inset Formula 
+\begin{equation}
+\int_{V}(\nabla\cdot\underline{\sigma})\cdot\overrightarrow{\phi}\: dV+\int_{V}\underline{\sigma}:\nabla\overrightarrow{\phi}\: dV=\int_{S}(\underline{\sigma}\cdot\overrightarrow{\phi})\cdot\overrightarrow{n}\: dS,\text{ or}
+\end{equation}
+
+\end_inset
+
+
+\begin_inset Formula 
+\begin{equation}
+\int_{V}(\nabla\cdot\underline{\sigma})\cdot\overrightarrow{\phi}\: dV=-\int_{V}\underline{\sigma}:\nabla\overrightarrow{\phi}\, dV+\int_{S}\underline{\sigma}\cdot\overrightarrow{n}\cdot\overrightarrow{\phi}\, dS.
+\end{equation}
+
+\end_inset
+
+Substituting into the weak form gives
+\begin_inset Formula 
+\begin{equation}
+-\int_{V}\underline{\sigma}:\nabla\overrightarrow{\phi}\, dV+\int_{S}\underline{\sigma}\cdot\overrightarrow{n}\cdot\overrightarrow{\phi}\, dS+\int_{V}\overrightarrow{f}\cdot\overrightarrow{\phi}\, dV-\int_{V}\rho\frac{\partial^{2}\overrightarrow{u}}{\partial t^{2}}\cdot\overrightarrow{\phi}\, dV=0.
+\end{equation}
+
+\end_inset
+
+We separate the integration over 
+\begin_inset Formula $S$
+\end_inset
+
+ into integration over 
+\begin_inset Formula $S_{T}$
+\end_inset
+
+ and 
+\begin_inset Formula $S_{u}$
+\end_inset
+
+,
+\begin_inset Formula 
+\begin{multline}
+-\int_{V}\underline{\sigma}:\nabla\overrightarrow{\phi}\, dV+\int_{S_{T}}\underline{\sigma}\cdot\overrightarrow{n}\cdot\overrightarrow{\phi}\, dS+\int_{S_{u}}\underline{\sigma}\cdot\overrightarrow{n}\cdot\overrightarrow{\phi}\, dS+\int_{V}\overrightarrow{f}\cdot\overrightarrow{\phi}\, dV-\int_{V}\rho\frac{\partial^{2}\overrightarrow{u}}{\partial t^{2}}\cdot\overrightarrow{\phi}\, dV=0,
+\end{multline}
+
+\end_inset
+
+and recognize that
+\begin_inset Formula 
+\begin{gather}
+\underline{\sigma}\cdot\overrightarrow{n}=\overrightarrow{T}\text{ on }S_{T}\text{ and}\\
+\overrightarrow{\phi}=0\text{ on }S_{u},
+\end{gather}
+
+\end_inset
+
+so that the equation reduces to
+\begin_inset Formula 
+\begin{equation}
+-\int_{V}\underline{\sigma}:\nabla\overrightarrow{\phi}\: dV+\int_{S_{T}}\overrightarrow{T}\cdot\overrightarrow{\phi}\, dS+\int_{V}\overrightarrow{f}\cdot\overrightarrow{\phi}\, dV-\int_{V}\rho\frac{\partial^{2}\overrightarrow{u}}{\partial t^{2}}\cdot\overrightarrow{\phi}\, dV=0.
+\end{equation}
+
+\end_inset
+
+We express the trial solution and weighting function as linear combinations
+ of basis functions,
+\begin_inset Formula 
+\begin{gather}
+\vec{u}=\sum_{m}\overrightarrow{a^{m}}N^{m},\\
+\vec{\phi}=\sum_{n}\overrightarrow{c^{n}}N^{n}.
+\end{gather}
+
+\end_inset
+
+Note that because the weighting function is zero on 
+\begin_inset Formula $S_{u}$
+\end_inset
+
+, the number of basis functions for 
+\begin_inset Formula $\vec{u}$
+\end_inset
+
+ is generally greater than the number of basis functions for 
+\begin_inset Formula $\vec{\phi}$
+\end_inset
+
+, i.e., 
+\begin_inset Formula $m>n$
+\end_inset
+
+.
+ Substituting in the expressions for the trial solution and weighting function
+ yields
+\begin_inset Formula 
+\begin{multline}
+-\int_{V}\underline{\sigma}:\sum_{n}\overrightarrow{c^{n}}\nabla N_{,}^{n}\, dV+\int_{S_{T}}\vec{T}\cdot\sum_{n}\overrightarrow{c^{n}}N^{n}\, dS+\int_{V}\vec{f}\cdot\sum_{n}\overrightarrow{c^{n}}N^{n}\, dV\\
+-\int_{V}\rho\sum_{m}\frac{\partial^{2}\overrightarrow{a^{m}}}{\partial t^{2}}N^{m}\cdot\sum_{n}\overrightarrow{c^{n}}N^{n}\ dV=0.
+\end{multline}
+
+\end_inset
+
+ Because the weighting function is arbitrary, this equation must hold for
+ all 
+\begin_inset Formula $\overrightarrow{c^{n}}$
+\end_inset
+
+, so that
+\begin_inset Formula 
+\begin{equation}
+-\int_{V}\underline{\sigma}:\nabla N^{n}\, dV+\int_{S_{T}}\vec{T}N^{n}\, dS+\int_{V}\vec{f}N^{n}\, dV-\int_{V}\rho\sum_{m}\frac{\partial^{2}\overrightarrow{a^{m}}}{\partial t^{2}}N^{m}N^{n}\, dV=\vec{0}.
+\end{equation}
+
+\end_inset
+
+We want to solve this equation for the unknown coefficients 
+\begin_inset Formula $\overrightarrow{a^{m}}$
+\end_inset
+
+ subject to
+\end_layout
+
+\begin_layout Standard
+
+\family roman
+\series medium
+\shape up
+\size normal
+\emph off
+\bar no
+\noun off
+\color none
+\begin_inset Formula 
+\begin{gather}
+\vec{u}=u^{o}\overrightarrow{}\text{ on }S_{u},\text{ and}\\
+\underline{R}(\overrightarrow{u^{+}}-\overrightarrow{u^{-}})=\vec{d}\text{ on }S_{f},
+\end{gather}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Solution Method for Quasi-Static Problems
+\end_layout
+
+\begin_layout Standard
+For brevity we outline the solution method for quasi-static problems using
+ only index notation.
+ In quasi-static problems we neglect the inertial terms, so equation 
+\begin_inset CommandInset ref
+LatexCommand eqref
+reference "eq:elasticity:integral:discretized"
+
+\end_inset
+
+ reduces to
+\begin_inset Formula 
+\begin{equation}
+-\int_{V}\sigma_{ij}N_{,j}^{n}\: dV+\int_{S_{T}}T_{i}N^{n}\, dS+\int_{V}f_{i}N^{n}\, dV=\vec{0}.
+\end{equation}
+
+\end_inset
+
+As a result, time-dependence only enters through the constitutive relationships
+ and the loading conditions.
+ We consider the deformation at time 
+\begin_inset Formula $t+\Delta t$
+\end_inset
+
+,
+\begin_inset Formula 
+\begin{equation}
+-\int_{V}\sigma_{ij}(t+\Delta t)N_{,j}^{n}\: dV+\int_{S_{T}}T_{i}(t+\Delta t)N^{n}\, dS+\int_{V}f_{i}(t+\Delta t)N^{n}\, dV=\vec{0}.\label{eq:elasticity:integral:quasistatic}
+\end{equation}
+
+\end_inset
+
+We solve this equation through formulation of a linear algebraic system
+ of equations (
+\begin_inset Formula $Au=b$
+\end_inset
+
+), involving the residual (
+\begin_inset Formula $r=b-Au$
+\end_inset
+
+) and Jacobian (
+\begin_inset Formula $A$
+\end_inset
+
+).
+ The residual is simply
+\begin_inset Formula 
+\begin{equation}
+r_{i}^{n}=-\int_{V}\sigma_{ij}(t+\Delta t)N_{,j}^{n}\: dV+\int_{S_{T}}T_{i}(t+\Delta t)N^{n}\, dS+\int_{V}f_{i}(t+\Delta t)N^{n}\, dV.
+\end{equation}
+
+\end_inset
+
+We employ numerical quadrature in the finite-element discretization and
+ replace the integrals with sums over the cells and quadrature points,
+\begin_inset Formula 
+\begin{multline}
+r_{i}^{n}=-\sum_{\text{vol cells}}\sum_{\text{quad pts}}\sigma_{ij}(x_{q},t+\Delta t)N_{,j}^{n}(x_{q})\: w_{q}|J_{cell}(x_{q})|+\sum_{\text{vol cells}}\sum_{\text{quad pt}s}f_{i}(x_{q},t+\Delta t)N^{n}(x_{q})\, w_{q}|J_{cell}(x_{q})|\\
++\sum_{\text{tract cells}}\sum_{\text{quad pts}}T_{i}(x_{q},t+\Delta t)N^{n}(x_{q})\, w_{q}|J_{cell}(x_{q})|,
+\end{multline}
+
+\end_inset
+
+where 
+\begin_inset Formula $r_{i}^{n}$
+\end_inset
+
+ is an 
+\begin_inset Formula $nd$
+\end_inset
+
+ vector (
+\begin_inset Formula $d$
+\end_inset
+
+ is the dimension of the vector space) and 
+\begin_inset Formula $i$
+\end_inset
+
+ is a vector space component, 
+\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.
+ The quadrature scheme for the integral over the tractions is one dimension
+ lower than the one used in integrating the terms for the volume cells.
+\end_layout
+
+\begin_layout Standard
+In order to find the Jacobian of the system, we let
+\begin_inset Formula 
+\begin{equation}
+\sigma_{ij}(t+\Delta t)=\sigma_{ij}(t)+d\sigma_{ij}(t).
+\end{equation}
+
+\end_inset
+
+Isolating the term associated with the increment in stresses yields
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula 
+\begin{equation}
+\int_{V}d\sigma_{ij}(t)N_{j}^{n}\ dV=-\int_{V}\sigma_{ij}(t)N_{,j}^{n}\: dV+\int_{S_{T}}T_{i}(t+\Delta t)N^{n}\, dS+\int_{V}f_{i}(t+\Delta t)N^{n}\, dV
+\end{equation}
+
+\end_inset
+
+We associate the term on the left-hand-side with the action of the system
+ Jacobian on the increment of the displacement field.
+ We approximate the increment in stresses using linear elasticity and infinitesi
+mal strains,
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula 
+\begin{gather}
+d\sigma_{ij}(t)=C_{ijkl}(t)d\varepsilon_{kl}(t)\\
+d\sigma_{ij}(t)=\frac{1}{2}C_{ijkl}(t)(du_{k.l}(t)+du_{l,k}(t))\\
+d\sigma_{ij}(t)=\frac{1}{2}C_{ijkl}(t)(\sum_{m}da_{k,l}^{m}(t)N^{m}+\sum_{m}da_{l,k}^{m}(t)N^{m})
+\end{gather}
+
+\end_inset
+
+Now, 
+\begin_inset Formula $d\sigma_{ij}\phi_{i,j}$
+\end_inset
+
+ is a scalar, so it is symmetric,
+\begin_inset Formula 
+\begin{equation}
+d\sigma_{ij}\phi_{i,j}=d\sigma_{ji}\phi_{j,i},
+\end{equation}
+
+\end_inset
+
+and we know that 
+\begin_inset Formula $d\sigma_{ij}$
+\end_inset
+
+ is symmetric, so
+\begin_inset Formula 
+\begin{equation}
+d\sigma_{ij}\phi_{i,j}=d\sigma_{ij}\phi_{j,i},
+\end{equation}
+
+\end_inset
+
+which means
+\begin_inset Formula 
+\begin{equation}
+\phi_{i,j}=\phi_{j,i},
+\end{equation}
+
+\end_inset
+
+which we can write as
+\begin_inset Formula 
+\begin{equation}
+\phi_{i,j}=\frac{1}{2}(\phi_{i,j}+\phi_{j,i}).
+\end{equation}
+
+\end_inset
+
+In terms of the basis functions, we have
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula 
+\begin{equation}
+\sum_{n}c_{i}^{n}N_{,j}^{n}=\frac{1}{2}(\sum_{n}c_{i}^{n}N_{,j}^{n}+\sum_{n}c_{j}^{n}N_{,i}^{n}).
+\end{equation}
+
+\end_inset
+
+Combining these expressions for the increment in stresses and making use
+ of the symmetry of the weighting functions, we find the system Jacobian
+ is
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula 
+\begin{equation}
+A_{ij}^{nm}=\int_{V}\frac{1}{4}C_{ijkl}(N_{,l}^{m}+N_{,k}^{m})(N_{,j}^{n}+N_{,i}^{n})\ dV.
+\end{equation}
+
+\end_inset
+
+We employ numerical quadrature in the finite-element discretization and
+ replace the integral with a sum over the cells and quadrature points,
+\begin_inset Formula 
+\begin{equation}
+A_{ij}^{nm}=\sum_{\text{vol cells}}\sum_{\text{quad pts}}\frac{1}{4}C_{ijkl}(N_{,l}^{m}(x_{q})+N_{,k}^{m}(x_{q}))(N_{,j}^{n}(x_{q})+N_{,i}^{n}(x_{q}))w_{q}|J_{cell}(x_{q}).
+\end{equation}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+Solution Method for Dynamic Problems
+\end_layout
+
+\begin_layout Standard
+For brevity we outline the solution method for dynamic problems using only
+ index notation.
+ Time-dependence enters through the constitutive relationships, loading
+ conditions, and the inertial terms.
+ We consider the deformation at time 
+\begin_inset Formula $t$
+\end_inset
+
+,
+\begin_inset Formula 
+\begin{equation}
+-\int_{V}\sigma_{ij}(t)N_{,j}^{n}\: dV+\int_{S_{T}}T_{i}(t)N^{n}\, dS+\int_{V}f_{i}(t)N^{n}\, dV-\int_{V}\rho\sum_{m}\ddot{a}_{i}^{m}(t)N^{m}N^{n}\ dV=\vec{0}.\label{eq:elasticity:integral:dynamic:t}
+\end{equation}
+
+\end_inset
+
+We solve this equation through formulation of a linear algebraic system
+ of equations (
+\begin_inset Formula $Au=b$
+\end_inset
+
+), involving the residual (
+\begin_inset Formula $r=b-Au$
+\end_inset
+
+) and Jacobian (
+\begin_inset Formula $A$
+\end_inset
+
+).
+ The residual is simply
+\begin_inset Formula 
+\begin{equation}
+r_{i}^{n}=-\int_{V}\sigma_{ij}(t)N_{,j}^{n}\: dV+\int_{S_{T}}T_{i}(t)N^{n}\, dS+\int_{V}f_{i}(t)N^{n}\, dV-\int_{V}\rho\sum_{m}\ddot{a}_{i}^{m}(t)N^{m}N^{n}\ dV.
+\end{equation}
+
+\end_inset
+
+We employ numerical quadrature in the finite-element discretization and
+ replace the integrals with sums over the cells and quadrature points,
+\begin_inset Formula 
+\begin{multline}
+r_{i}^{n}=-\sum_{\text{vol cells}}\sum_{\text{quad pts}}\sigma_{ij}(x_{q},t)N^{n}(x_{q})\: w_{q}|J_{cell}(x_{q})|+\sum_{\text{vol cells}}\sum_{\text{quad pt}s}f_{i}(x_{q},t)N^{n}(x_{q})\, w_{q}|J_{cell}(x_{q})|\\
++\sum_{\text{tract cells}}\sum_{\text{quad pts}}T_{i}(x_{q},t)N^{n}(x_{q})\, w_{q}|J_{cell}(x_{q})|-\sum_{\text{vol cells}}\sum_{\text{quad pts}}\rho\sum_{m}\ddot{a}_{i}^{m}(t)N^{m}N^{n}\ w_{q|J_{cell}(x_{q})},
+\end{multline}
+
+\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.
+ The quadrature scheme for the integral over the tractions is one dimension
+ lower than the one used in integrating the terms for the volume cells.
+ 
+\end_layout
+
+\begin_layout Standard
+We find the system Jacobian matrix by making use of the temporal discretization
+ and isolating the term for the increment in the displacement field at time
+ 
+\begin_inset Formula $t$
+\end_inset
+
+.
+ Using the central difference method to approximate the acceleration (and
+ velocity),
+\begin_inset Formula 
+\begin{gather}
+\ddot{u}_{i}(t)=\frac{1}{\Delta t^{2}}\left(u_{i}(t+\Delta t)-2u_{i}(t)+u_{i}(t-\Delta t)\right)\\
+\dot{u}_{i}(t)=\frac{1}{2\Delta t}\left(u_{i}(t+\Delta t)-u_{i}(t-\Delta t)\right)
+\end{gather}
+
+\end_inset
+
+and writing the displacement at time 
+\begin_inset Formula $t+\Delta t$
+\end_inset
+
+ in terms of the displacement at 
+\begin_inset Formula $t$
+\end_inset
+
+ (for consistency with the displacement increment quasi-static formulation),
+\begin_inset Formula 
+\begin{gather}
+u_{i}(t+\Delta t)=u_{i}(t)+du_{i}(t),\\
+\ddot{u}_{i}(t)=\frac{1}{\Delta t^{2}}\left(du_{i}(t)-u_{i}(t)+u_{i}(t-\Delta t)\right),\\
+\dot{u}_{i}(t)=\frac{1}{2\Delta t}\left(du_{i}(t)+u_{i}(t)-u_{i}(t-\Delta t)\right).
+\end{gather}
+
+\end_inset
+
+Substituting into equation 
+\begin_inset CommandInset ref
+LatexCommand eqref
+reference "eq:elasticity:integral:dynamic:t"
+
+\end_inset
+
+ yields
+\begin_inset Formula 
+\begin{multline}
+\frac{1}{\Delta t^{2}}\int_{V}\rho\sum_{m}da_{i}^{m}(t)N^{m}N^{n}\ dV=-\int_{V}\sigma_{ij}N_{,j}^{n}\: dV+\int_{S_{T}}T_{i}N^{n}\, dS+\int_{V}f_{i}N^{n}\, dV\\
+-\frac{1}{\Delta t^{2}}\int_{V}\rho\sum_{m}(a_{i}^{m}(t)-a_{i}^{m}(t-\Delta t))N^{m}N^{n}\ dV.
+\end{multline}
+
+\end_inset
+
+Thus, the Jacobian for the system is
+\begin_inset Formula 
+\begin{equation}
+A_{ij}^{nm}=\delta_{ij}\frac{1}{\Delta t^{2}}\int_{V}\rho N^{m}N^{n}\ dV,
+\end{equation}
+
+\end_inset
+
+and using numerical quadrature in the finite-element discretization to replace
+ the integrals with sums over the cells and quadrature points,
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula 
+\begin{equation}
+A_{ij}^{nm}=\delta_{ij}\frac{1}{\Delta t^{2}}\sum_{\text{vol cells}}\sum_{\text{quad pts}}\rho(x_{q})N^{m}(x_{q})N^{n}(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.
+ We consider the contributions associated with the fault in section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:fault"
+
+\end_inset
+
+ and with absorbing boundaries is section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:absorbing:boundaries"
+
+\end_inset
+
+.
+\end_layout
+
+\begin_layout Section
+Small Strain Formulation
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:Small-Strain-Formulation"
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+In some crustal deformation problems sufficient deformation may occur that
+ the assumptions associated with infinitesimal strains no longer hold.
+ This is often the case for problems when one wants to include the effects
+ of gravitational body forces and deformation on the overburden pressure.
+ In such cases we want to account for both rigid body motion and small strains.
+ The elasticity formulation in PyLith for small strains uses the Green-Lagrange
+ strain tensor and the Second Piola-Kirchhoff stress tensor as is based
+ on the one presented by Bathe 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "Bathe:1995"
+
+\end_inset
+
+.
+ The Green-Lagrange strain provides a measure of the strain relative to
+ the original, undeformed configuration.
+\begin_inset Formula 
+\begin{gather}
+\varepsilon_{ij}=\frac{1}{2}(u_{i,j}+u_{j,i}+u_{k,i}u_{k,j}),\text{ or}\\
+\varepsilon_{ij}=X_{ji}X_{ij}-\delta_{ij},\text{ where}\\
+X_{ij}=x_{i,j}(t)=\frac{\partial}{\partial x_{j}}(x_{i}(0)+u_{i}(t)),
+\end{gather}
+
+\end_inset
+
+and 
+\begin_inset Formula $X_{ij}$
+\end_inset
+
+ is the deformation tensor.
+ The Second Piola-Kirchhoff stress tensor, 
+\begin_inset Formula $S_{ij}$
+\end_inset
+
+, is related to the Green-Lagrange strain tensor through the elasticity
+ constants,
+\end_layout
+
+\begin_layout Standard
+\begin_inset Formula 
+\begin{equation}
+S_{ij}=C_{ijkl}\varepsilon_{kl},
+\end{equation}
+
+\end_inset
+
+in the same manner as in the infinitesimal strain formulation.
+\end_layout
+
+\begin_layout Standard
+The elasticity integral in the finite-element formulation includes additional
+ terms when we account for small strains.
+ Recognizing the similarity between the weighting function and an increment
+ in strain in the infinitesimal formulation (many finite-element texts derive
+ the finite-element formulation for elasticity using the Principle of Virtual
+ Work), we replace 
+\begin_inset Formula $\int_{V}\sigma_{ij}\phi_{i,j}\: dV$
+\end_inset
+
+ with 
+\begin_inset Formula $\int_{V}S_{ij}\delta\varepsilon_{ij}\: dV$
+\end_inset
+
+ in equation 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "eq:elasticity:integral"
+
+\end_inset
+
+, where 
+\begin_inset Formula $\delta\varepsilon_{ij}$
+\end_inset
+
+ is the 
+\begin_inset Quotes eld
+\end_inset
+
+virtual
+\begin_inset Quotes erd
+\end_inset
+
+ strain.
+ Using the definition of the Green-Lagrangian strain, we have
+\begin_inset Formula 
+\begin{equation}
+\int_{V}S_{ij}\delta\varepsilon_{ij}\: dV=\int_{V}\frac{1}{2}S_{ij}(\delta u_{i,j}+\delta u_{j,i}+u_{k,i}\delta u_{k,j}+u_{k,j}\delta u_{k,i})\: dV.
+\end{equation}
+
+\end_inset
+
+Writing the displacements in terms of the basis functions and forcing the
+ terms associated with the arbitrary weighting function (
+\begin_inset Quotes eld
+\end_inset
+
+virtual
+\begin_inset Quotes erd
+\end_inset
+
+ strain) to zero yields the elastic term in the residual,
+\begin_inset Formula 
+\begin{equation}
+r_{i}^{n}=\int_{V}S_{ij}(N_{,i}^{n}+(\sum_{m}a_{k}^{m}N_{,j}^{m})N_{,i}^{n})\: dV.
+\end{equation}
+
+\end_inset
+
+Thus, we have one additional term (the second term) compared with the residual
+ for infinitesimal strains.
+ Just as in the infinitesimal formulation, we evaluate the integral over
+ the volume using numerical quadrature with sums over the quadrature points
+ of each cell.
+\end_layout
+
+\begin_layout Subsection
+Quasi-static Problems
+\end_layout
+
+\begin_layout Standard
+The system Jacobian for quasi-static problems includes terms associated
+ with elasticity.
+ For the small strain formulation, we write the elasticity term at time
+ 
+\begin_inset Formula $t+\Delta t$
+\end_inset
+
+ and consider the first terms of the Taylor series expansion,
+\begin_inset Formula 
+\begin{equation}
+\int_{v}S_{ij}(t+\Delta t)\delta\varepsilon_{ij}(t+\Delta t)\: dV=\int_{V}(S_{ij}(t)\delta\varepsilon_{ij}(t)+dS_{ij}(t)\delta\varepsilon_{ij}(t)+S_{ij}(t)d\delta\varepsilon_{ij}(t))\: dV.
+\end{equation}
+
+\end_inset
+
+We approximate the increment in the stress tensor using the elastic constants,
+\begin_inset Formula 
+\begin{equation}
+dS_{ij}=C_{ijkl}d\varepsilon_{kl},
+\end{equation}
+
+\end_inset
+
+and the increment in the 
+\begin_inset Quotes eld
+\end_inset
+
+virtual
+\begin_inset Quotes erd
+\end_inset
+
+ strain via
+\begin_inset Formula 
+\begin{equation}
+d\delta\varepsilon_{ij}=\frac{1}{2}(du_{k,i}\delta u_{k,j}+du_{k,j}\delta u_{k,i}).
+\end{equation}
+
+\end_inset
+
+We associate the system Jacobian with the terms involving the increment
+ in displacements.
+ After substituting in the expressions for the increment in the stresses
+ and the increment in the 
+\begin_inset Quotes eld
+\end_inset
+
+virtual
+\begin_inset Quotes erd
+\end_inset
+
+ strains, we have
+\begin_inset Formula 
+\begin{equation}
+A_{ij}^{nm}=\int_{V}\frac{1}{4}C_{ijkl}(N_{,k}^{m}+(\sum_{r}a_{p}^{r}N_{,l}^{r})N_{,k}^{m})(N_{,i}^{n}+(\sum_{r}a_{p}^{r}N_{,j}^{r})N_{,i}^{n})+\frac{1}{2}S_{kl}N_{,l}^{m}N_{,l}^{n}\delta_{ij}\: dV.
+\end{equation}
+
+\end_inset
+
+The small strain formulation produces additional terms associated with the
+ elastic constants and a new term associated with the stress tensor.
+\end_layout
+
+\begin_layout Subsection
+Dynamic Problems
+\end_layout
+
+\begin_layout Standard
+The system Jacobian matrix in dynamic problems does not include any terms
+ associated with elasticity, so the system Jacobian matrix in the small
+ strain formulation matches the one used in the infinitesimal strain formulation.
+\end_layout
+
+\end_body
+\end_document

Modified: short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/install/install.lyx
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/install/install.lyx	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/install/install.lyx	2012-11-01 17:04:11 UTC (rev 20976)
@@ -253,7 +253,7 @@
 
 \begin_deeper
 \begin_layout LyX-Code
-$ tar -xzf pylith-1.7.0-linux-i686.tgz
+$ tar -xzf pylith-1.8.0-linux-i686.tgz
 \end_layout
 
 \end_deeper
@@ -328,7 +328,7 @@
 
 \begin_deeper
 \begin_layout LyX-Code
-$ tar -xzf pylith-1.7.0-darwin-10.5.tgz
+$ tar -xzf pylith-1.8.0-darwin-10.5.tgz
 \end_layout
 
 \end_deeper

Modified: short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/intro/intro.lyx
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/intro/intro.lyx	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/intro/intro.lyx	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,542 +1,542 @@
-#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
-Introduction
-\end_layout
-
-\begin_layout Section
-Overview
-\end_layout
-
-\begin_layout Standard
-PyLith is a multi-scale simulation software package for earthquake physics.
- It is portable, scalable software for simulation of crustal deformation
- across spatial scales ranging from meters to hundreds of kilometers and
- temporal scales ranging from milliseconds to thousands of years.
-\end_layout
-
-\begin_layout Section
-History
-\end_layout
-
-\begin_layout Standard
-PyLith 1.0 was the first version to allow the solution of both implicit (quasi-st
-atic) and explicit (dynamic) problems and was a complete rewrite of the
- original PyLith (version 0.8).
- PyLith 1.0 combines the functionality of EqSim 
-\begin_inset CommandInset citation
-LatexCommand cite
-key "Aagaard:etal:2001a,Aagaard:etal:2001b"
-
-\end_inset
-
- and PyLith 0.8.
- PyLith 0.8 was a direct descendant of LithoMop and was the first version
- that ran in parallel, as well as providing several other improvements over
- LithoMop.
- LithoMop was the product of major reengineering of Tecton, a finite-element
- code for simulating static and quasi-static crustal deformation.
- The major new features present in LithoMop included dynamic memory allocation
- and the use of the Pyre simulation framework and PETSc solvers.
- EqSim was written by Brad Aagaard to solve problems in earthquake dynamics,
- including rupture propagation and seismic wave propagation.
-\end_layout
-
-\begin_layout Standard
-The release of PyLith 1.0 has been followed by additional releases that expand
- the number of features as well as improve performance.
- The PyLith 1.x series of releases allows the solution of both quasi-static
- and dynamic problems in one, two, or three dimensions.
- The code runs in either serial or parallel, and the design allows for relativel
-y easy scripting using the Python programming language.
- Material properties and values for boundary and fault conditions are specified
- using spatial databases, which permit easy prescription of complex spatial
- variations of properties and parameters.
- Simulation parameters are generally specified through the use of simple
- ASCII files or the command line.
- At present, mesh information may be provided using a simple ASCII file
- (PyLith mesh ASCII format) or imported from CUBIT or LaGriT, two widely-used
- meshing packages.
- 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, 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, 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
-PyLith Workflow
-\end_layout
-
-\begin_layout Standard
-PyLith is one component in the process of investigating problems in tectonics
- (Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:Workflow-summary"
-
-\end_inset
-
-).
- Given a geological problem of interest, a scientist must first provide
- a geometrical representation of the desired structure.
- Once the structure has been defined, a computational mesh must be created.
- PyLith presently provides three mesh importing options: CUBIT Exodus format,
- LaGriT GMV and Pset files, and PyLith mesh ASCII format.
- The modeling of the physical processes of interest is performed by a code
- such as PyLith.
- Present output consists of VTK or HDF5/Xdmf files which can be used by
- a number of visualization codes (e.g., ParaView, Visit, MayaVi, and Matlab).
- 
-\end_layout
-
-\begin_layout Standard
-\begin_inset Float figure
-placement H
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/workflow.eps
-	scale 67
-	keepAspectRatio
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:Workflow-summary"
-
-\end_inset
-
-Workflow involved in going from geologic structure to problem analysis.
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Section
-PyLith Design
-\end_layout
-
-\begin_layout Standard
-PyLith is separated into modules to encapsulate behavior and facilitate
- use across multiple applications.
- This allows expert users to replace functionality of a wide variety of
- components without recompiling or polluting the main code.
- PyLith employs external packages (see Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:pylith-dependencies"
-
-\end_inset
-
-) to reduce development time and enhance computational efficiency; for example,
- PyLith 0.8 ran two times faster when the PETSc linear solver was used.
-\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/packages.eps
-	scale 40
-
-\end_inset
-
-
-\begin_inset Caption
-
-\begin_layout Plain Layout
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:pylith-dependencies"
-
-\end_inset
-
-PyLith dependencies.
- PyLith makes direct use of several other packages, some of which have their
- own dependencies.
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-PyLith is written in two programming languages.
- High-level code is written in Python; this rich, expressive interpreted
- language with dynamic typing reduces development time and permits flexible
- addition of user-contributed modules.
- This high-level code makes use of Pyre, a science-neutral simulation framework
- developed at Caltech, to link the modules together at runtime and gather
- user-input.
- Low-level code is written in C++, providing fast execution while still
- allowing an object-oriented implementation.
- This low-level code relies on PETSc to perform operations on matrices and
- vectors in parallel.
- We also make extensive use of two Python packages.
- SWIG is a package that simplifies the task of adding C++ extensions to
- Python code, and FIAT provides tabulated basis functions and numerical
- quadrature points.
- 
-\end_layout
-
-\begin_layout Standard
-In writing PyLith 1.0, the code was designed to be object-oriented and modular.
- Each type of module is accessed through a specified interface (set of functions
-).
- This permits adding, replacing, and rewriting modules without affecting
- other parts of the code.
- This code structure simplifies code maintenance and development.
- Extending the set of code features is also easier, since developers can
- create new modules derived from the existing ones.
-\end_layout
-
-\begin_layout Standard
-The new code design leverages Pyre, Sieve, and PETSc much more extensively
- than the previous version.
-  Pyre is used to glue together the various modules used to construct a
- simulation and specify the parameters.
- Sieve is used for all finite-element  storage and manipulation and handles
- the creation of the PETSc matrices and vectors.
-  As a result, most of the PyLith source code pertains to implementing the
- geodynamics, such as bulk rheology, boundary conditions, and slip on faults.
- 
-\end_layout
-
-\begin_layout Standard
-PyLith also uses FIAT to tabulate the finite-element basis functions  at
- the numerical integration (quadrature) points.
- Nemesis allows PyLith to run Python using the Message Passing Interface
- (MPI) for parallel processing.
- Additional, indirect dependencies (see Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:pylith-dependencies"
-
-\end_inset
-
-) include numpy (efficient operations on numerical arrays in Python), Proj.4
- (geographic projections), and SWIG (calling C++ functions from Python).
-\end_layout
-
-\begin_layout Standard
-During development, tests were constructed for nearly every module function.
- These unit tests are distributed with the source code.
- These tests are run throughout the development cycle to expose bugs and
- isolate their origin.
- As additional changes are made to the code, the tests are rerun to help
- prevent introduction of new bugs.
- A number of simple, full-scale tests, such as axial compression and extension,
- simple shear, and slip on through-going faults, have been used to test
- the code.
- Additionally, we have run the Southern California Earthquake Center crustal
- deformation and several of the spontaneous rupture benchmarks for strike-slip
- and reverse-slip to determine the relative local and global error (see
- Chapter 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "cha:Benchmarks"
-
-\end_inset
-
-).
-\end_layout
-
-\begin_layout Subsection
-Pyre
-\end_layout
-
-\begin_layout Standard
-Pyre is an object-oriented environment capable of specifying and launching
- numerical simulations on multiple platforms, including Beowulf-class parallel
- computers and grid computing systems.
- Pyre allows the binding of multiple components such as solid and fluid
- models used in Earth science simulations, and different meshers.
- The Pyre framework enables the elegant setup, modification and launching
- of massively parallel solver applications.
-\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/pyre_overview.png
-	width 4in
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:Pyre:Architecture"
-
-\end_inset
-
-Pyre Architecture.
- The integration framework is a set of cooperating abstract services.
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-Pyre is a framework, a combination of software and design philosophy that
- promotes the reuse of code.
- In their canonical software design book, 
-\emph on
-Design Patterns
-\emph default
-, Erich Gamma 
-\shape italic
-et al
-\shape default
-.
- condense the concept of a framework concept down to, ``When you use a framework
-, you reuse the main body and write the code it calls.'' In the context of
- frameworks and object-oriented programming, Pyre can be thought of as a
- collection of classes and the way their instances interact.
- Programming applications based on Pyre will look similar to those written
- in any other object-oriented language.
- The Pyre framework contains a subset of parts that make up the overall
- framework.
- Each of those parts is designed to solve a specific problem.
-\end_layout
-
-\begin_layout Standard
-The framework approach to computation offers many advantages.
- It permits the exchange of codes and promotes the reuse of standardized
- software while preserving efficiency.
- Frameworks are also an efficient way to handle changes in computer architecture.
- They present programmers and scientists with a unified and well-defined
- task and allow for shared costs of the housekeeping aspects of software
- development.
- They provide greater institutional continuity to model development than
- piecemeal approaches.
-\end_layout
-
-\begin_layout Standard
-The Pyre framework incorporates features aimed at enabling the scientific
- non-expert to perform tasks easily without hindering the expert.
- Target features for end users allow complete and intuitive simulation specifica
-tion, reasonable defaults, consistency checks of input, good diagnostics,
- easy access to remote facilities, and status monitoring.
- Target features for developers include easy access to user input, a shorter
- development cycle, and good debugging support.
-\end_layout
-
-\begin_layout Subsection
-Sieve and PETSc
-\end_layout
-
-\begin_layout Standard
-PyLith 1.x makes use of a set of data structures and routines in PETSc called
- 
-\family typewriter
-Sieve
-\family default
-, which is still under active development.
- 
-\family typewriter
-Sieve
-\family default
- provides data structures and routines for for representing and manipulating
- computational meshes, and it greatly simplifies finite-element computations.
-
-\family typewriter
- Sieve
-\family default
- represents the topology of the domain.
- Zero volume elements are inserted along all fault surfaces to implement
- kinematic (prescribed) or dynamic (constitutive model) implementations
- of fault slip.
- Material properties and other parameters are represented as sections (scalar
- and vector fields) over the mesh, and values for a vertex or cell can be
- retrieved by restricting the section to the vertex or cell.
- For each problem, functions are provided to calculate the residual and
- its Jacobian.
- All numerical integration is done in these functions, and parallel assembly
- is accomplished using the restrict/update paradigm of the 
-\family typewriter
-Sieve
-\family default
- framework.
- We assemble into PETSc linear algebra objects and then call PETSc solvers.
- The solution is mapped back into a section, which can be output in VTK
- format.
-\end_layout
-
-\begin_layout Standard
-PETSc 
-\begin_inset Flex URL
-status collapsed
-
-\begin_layout Plain Layout
-
-www-unix.mcs.anl.gov/petsc/petsc-as
-\end_layout
-
-\end_inset
-
-, the Portable, Extensible Toolkit for Scientific computation, provides
- a suite of routines for parallel, numerical solution of partial differential
- equations for linear and nonlinear systems with large, sparse systems of
- equations.
- PETSc includes solvers that implement a variety of Newton and Krylov subspace
- methods.
- It can also interface with many external packages, including ESSL, MUMPS,
- Matlab, ParMETIS, PVODE, and Hypre, thereby providing additional solvers
- and interaction with other software packages.
-\end_layout
-
-\begin_layout Standard
-PETSc includes interfaces for FORTRAN 77/90, C, C++, and Python for nearly
- all of the routines, and PETSc can be installed on most Unix systems.
- PETSc can be built with user-supplied, highly optimized linear algebra
- routines (e.g., ATLAS and commercial versions of BLAS/LAPACK), thereby improving
- application performance.
- Users can use PETSc parallel matrices, vectors, and other data structures
- for most parallel operations, eliminating the need for explicit calls to
- Message Passing Interface (MPI) routines.
- Many settings and options can be controlled with PETSc-specific command-line
- arguments, including selection of preconditions, solvers, and generation
- of performance logs.
-\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
+Introduction
+\end_layout
+
+\begin_layout Section
+Overview
+\end_layout
+
+\begin_layout Standard
+PyLith is a multi-scale simulation software package for earthquake physics.
+ It is portable, scalable software for simulation of crustal deformation
+ across spatial scales ranging from meters to hundreds of kilometers and
+ temporal scales ranging from milliseconds to thousands of years.
+\end_layout
+
+\begin_layout Section
+History
+\end_layout
+
+\begin_layout Standard
+PyLith 1.0 was the first version to allow the solution of both implicit (quasi-st
+atic) and explicit (dynamic) problems and was a complete rewrite of the
+ original PyLith (version 0.8).
+ PyLith 1.0 combines the functionality of EqSim 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "Aagaard:etal:2001a,Aagaard:etal:2001b"
+
+\end_inset
+
+ and PyLith 0.8.
+ PyLith 0.8 was a direct descendant of LithoMop and was the first version
+ that ran in parallel, as well as providing several other improvements over
+ LithoMop.
+ LithoMop was the product of major reengineering of Tecton, a finite-element
+ code for simulating static and quasi-static crustal deformation.
+ The major new features present in LithoMop included dynamic memory allocation
+ and the use of the Pyre simulation framework and PETSc solvers.
+ EqSim was written by Brad Aagaard to solve problems in earthquake dynamics,
+ including rupture propagation and seismic wave propagation.
+\end_layout
+
+\begin_layout Standard
+The release of PyLith 1.0 has been followed by additional releases that expand
+ the number of features as well as improve performance.
+ The PyLith 1.x series of releases allows the solution of both quasi-static
+ and dynamic problems in one, two, or three dimensions.
+ The code runs in either serial or parallel, and the design allows for relativel
+y easy scripting using the Python programming language.
+ Material properties and values for boundary and fault conditions are specified
+ using spatial databases, which permit easy prescription of complex spatial
+ variations of properties and parameters.
+ Simulation parameters are generally specified through the use of simple
+ ASCII files or the command line.
+ At present, mesh information may be provided using a simple ASCII file
+ (PyLith mesh ASCII format) or imported from CUBIT or LaGriT, two widely-used
+ meshing packages.
+ The elements currently available include a linear bar in 1D, linear triangles
+ and quadrilaterals in 2D, and linear tetrahedra and hexahedra in 3D.
+ Materials presently available include isotropic elastic, linear Maxwell
+ 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, 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
+PyLith Workflow
+\end_layout
+
+\begin_layout Standard
+PyLith is one component in the process of investigating problems in tectonics
+ (Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:Workflow-summary"
+
+\end_inset
+
+).
+ Given a geological problem of interest, a scientist must first provide
+ a geometrical representation of the desired structure.
+ Once the structure has been defined, a computational mesh must be created.
+ PyLith presently provides three mesh importing options: CUBIT Exodus format,
+ LaGriT GMV and Pset files, and PyLith mesh ASCII format.
+ The modeling of the physical processes of interest is performed by a code
+ such as PyLith.
+ Present output consists of VTK or HDF5/Xdmf files which can be used by
+ a number of visualization codes (e.g., ParaView, Visit, MayaVi, and Matlab).
+ 
+\end_layout
+
+\begin_layout Standard
+\begin_inset Float figure
+placement H
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/workflow.eps
+	scale 67
+	keepAspectRatio
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:Workflow-summary"
+
+\end_inset
+
+Workflow involved in going from geologic structure to problem analysis.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Section
+PyLith Design
+\end_layout
+
+\begin_layout Standard
+PyLith is separated into modules to encapsulate behavior and facilitate
+ use across multiple applications.
+ This allows expert users to replace functionality of a wide variety of
+ components without recompiling or polluting the main code.
+ PyLith employs external packages (see Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:pylith-dependencies"
+
+\end_inset
+
+) to reduce development time and enhance computational efficiency; for example,
+ PyLith 0.8 ran two times faster when the PETSc linear solver was used.
+\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/packages.eps
+	scale 40
+
+\end_inset
+
+
+\begin_inset Caption
+
+\begin_layout Plain Layout
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:pylith-dependencies"
+
+\end_inset
+
+PyLith dependencies.
+ PyLith makes direct use of several other packages, some of which have their
+ own dependencies.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+PyLith is written in two programming languages.
+ High-level code is written in Python; this rich, expressive interpreted
+ language with dynamic typing reduces development time and permits flexible
+ addition of user-contributed modules.
+ This high-level code makes use of Pyre, a science-neutral simulation framework
+ developed at Caltech, to link the modules together at runtime and gather
+ user-input.
+ Low-level code is written in C++, providing fast execution while still
+ allowing an object-oriented implementation.
+ This low-level code relies on PETSc to perform operations on matrices and
+ vectors in parallel.
+ We also make extensive use of two Python packages.
+ SWIG is a package that simplifies the task of adding C++ extensions to
+ Python code, and FIAT provides tabulated basis functions and numerical
+ quadrature points.
+ 
+\end_layout
+
+\begin_layout Standard
+In writing PyLith 1.0, the code was designed to be object-oriented and modular.
+ Each type of module is accessed through a specified interface (set of functions
+).
+ This permits adding, replacing, and rewriting modules without affecting
+ other parts of the code.
+ This code structure simplifies code maintenance and development.
+ Extending the set of code features is also easier, since developers can
+ create new modules derived from the existing ones.
+\end_layout
+
+\begin_layout Standard
+The new code design leverages Pyre, Sieve, and PETSc much more extensively
+ than the previous version.
+  Pyre is used to glue together the various modules used to construct a
+ simulation and specify the parameters.
+ Sieve is used for all finite-element  storage and manipulation and handles
+ the creation of the PETSc matrices and vectors.
+  As a result, most of the PyLith source code pertains to implementing the
+ geodynamics, such as bulk rheology, boundary conditions, and slip on faults.
+ 
+\end_layout
+
+\begin_layout Standard
+PyLith also uses FIAT to tabulate the finite-element basis functions  at
+ the numerical integration (quadrature) points.
+ Nemesis allows PyLith to run Python using the Message Passing Interface
+ (MPI) for parallel processing.
+ Additional, indirect dependencies (see Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:pylith-dependencies"
+
+\end_inset
+
+) include numpy (efficient operations on numerical arrays in Python), Proj.4
+ (geographic projections), and SWIG (calling C++ functions from Python).
+\end_layout
+
+\begin_layout Standard
+During development, tests were constructed for nearly every module function.
+ These unit tests are distributed with the source code.
+ These tests are run throughout the development cycle to expose bugs and
+ isolate their origin.
+ As additional changes are made to the code, the tests are rerun to help
+ prevent introduction of new bugs.
+ A number of simple, full-scale tests, such as axial compression and extension,
+ simple shear, and slip on through-going faults, have been used to test
+ the code.
+ Additionally, we have run the Southern California Earthquake Center crustal
+ deformation and several of the spontaneous rupture benchmarks for strike-slip
+ and reverse-slip to determine the relative local and global error (see
+ Chapter 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "cha:Benchmarks"
+
+\end_inset
+
+).
+\end_layout
+
+\begin_layout Subsection
+Pyre
+\end_layout
+
+\begin_layout Standard
+Pyre is an object-oriented environment capable of specifying and launching
+ numerical simulations on multiple platforms, including Beowulf-class parallel
+ computers and grid computing systems.
+ Pyre allows the binding of multiple components such as solid and fluid
+ models used in Earth science simulations, and different meshers.
+ The Pyre framework enables the elegant setup, modification and launching
+ of massively parallel solver applications.
+\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/pyre_overview.png
+	width 4in
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:Pyre:Architecture"
+
+\end_inset
+
+Pyre Architecture.
+ The integration framework is a set of cooperating abstract services.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+Pyre is a framework, a combination of software and design philosophy that
+ promotes the reuse of code.
+ In their canonical software design book, 
+\emph on
+Design Patterns
+\emph default
+, Erich Gamma 
+\shape italic
+et al
+\shape default
+.
+ condense the concept of a framework concept down to, ``When you use a framework
+, you reuse the main body and write the code it calls.'' In the context of
+ frameworks and object-oriented programming, Pyre can be thought of as a
+ collection of classes and the way their instances interact.
+ Programming applications based on Pyre will look similar to those written
+ in any other object-oriented language.
+ The Pyre framework contains a subset of parts that make up the overall
+ framework.
+ Each of those parts is designed to solve a specific problem.
+\end_layout
+
+\begin_layout Standard
+The framework approach to computation offers many advantages.
+ It permits the exchange of codes and promotes the reuse of standardized
+ software while preserving efficiency.
+ Frameworks are also an efficient way to handle changes in computer architecture.
+ They present programmers and scientists with a unified and well-defined
+ task and allow for shared costs of the housekeeping aspects of software
+ development.
+ They provide greater institutional continuity to model development than
+ piecemeal approaches.
+\end_layout
+
+\begin_layout Standard
+The Pyre framework incorporates features aimed at enabling the scientific
+ non-expert to perform tasks easily without hindering the expert.
+ Target features for end users allow complete and intuitive simulation specifica
+tion, reasonable defaults, consistency checks of input, good diagnostics,
+ easy access to remote facilities, and status monitoring.
+ Target features for developers include easy access to user input, a shorter
+ development cycle, and good debugging support.
+\end_layout
+
+\begin_layout Subsection
+Sieve and PETSc
+\end_layout
+
+\begin_layout Standard
+PyLith 1.x makes use of a set of data structures and routines in PETSc called
+ 
+\family typewriter
+Sieve
+\family default
+, which is still under active development.
+ 
+\family typewriter
+Sieve
+\family default
+ provides data structures and routines for for representing and manipulating
+ computational meshes, and it greatly simplifies finite-element computations.
+
+\family typewriter
+ Sieve
+\family default
+ represents the topology of the domain.
+ Zero volume elements are inserted along all fault surfaces to implement
+ kinematic (prescribed) or dynamic (constitutive model) implementations
+ of fault slip.
+ Material properties and other parameters are represented as sections (scalar
+ and vector fields) over the mesh, and values for a vertex or cell can be
+ retrieved by restricting the section to the vertex or cell.
+ For each problem, functions are provided to calculate the residual and
+ its Jacobian.
+ All numerical integration is done in these functions, and parallel assembly
+ is accomplished using the restrict/update paradigm of the 
+\family typewriter
+Sieve
+\family default
+ framework.
+ We assemble into PETSc linear algebra objects and then call PETSc solvers.
+ The solution is mapped back into a section, which can be output in VTK
+ format.
+\end_layout
+
+\begin_layout Standard
+PETSc 
+\begin_inset Flex URL
+status collapsed
+
+\begin_layout Plain Layout
+
+www-unix.mcs.anl.gov/petsc/petsc-as
+\end_layout
+
+\end_inset
+
+, the Portable, Extensible Toolkit for Scientific computation, provides
+ a suite of routines for parallel, numerical solution of partial differential
+ equations for linear and nonlinear systems with large, sparse systems of
+ equations.
+ PETSc includes solvers that implement a variety of Newton and Krylov subspace
+ methods.
+ It can also interface with many external packages, including ESSL, MUMPS,
+ Matlab, ParMETIS, PVODE, and Hypre, thereby providing additional solvers
+ and interaction with other software packages.
+\end_layout
+
+\begin_layout Standard
+PETSc includes interfaces for FORTRAN 77/90, C, C++, and Python for nearly
+ all of the routines, and PETSc can be installed on most Unix systems.
+ PETSc can be built with user-supplied, highly optimized linear algebra
+ routines (e.g., ATLAS and commercial versions of BLAS/LAPACK), thereby improving
+ application performance.
+ Users can use PETSc parallel matrices, vectors, and other data structures
+ for most parallel operations, eliminating the need for explicit calls to
+ Message Passing Interface (MPI) routines.
+ Many settings and options can be controlled with PETSc-specific command-line
+ arguments, including selection of preconditions, solvers, and generation
+ of performance logs.
+\end_layout
+
+\end_body
+\end_document

Modified: short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/materials/altformulations.lyx
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/materials/altformulations.lyx	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/materials/altformulations.lyx	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,320 +1,321 @@
-#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 0
-\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:Alternative-Formulations"
-
-\end_inset
-
-Alternative Material Model Formulations
-\end_layout
-
-\begin_layout Section
-\begin_inset CommandInset label
-LatexCommand label
-name "sec:ViscoelasticFormulations"
-
-\end_inset
-
-Viscoelastic Formulations
-\end_layout
-
-\begin_layout Standard
-The viscoelastic formulations presently used in PyLith are described in
- 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:Viscoelastic-Materials"
-
-\end_inset
-
-.
- In some cases there are alternative formulations that may be used in future
- versions of PyLith, and those are described here.
-\end_layout
-
-\begin_layout Subsection
-\begin_inset CommandInset label
-LatexCommand label
-name "sub:Effective-Stress-Formulation-Maxwell"
-
-\end_inset
-
-Effective Stress Formulation for a Linear Maxwell Viscoelastic Material
-\end_layout
-
-\begin_layout Standard
-An alternative technique for solving the equations for a Maxwell viscoelastic
- material is based on the effective stress formulation described in 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sub:Effective-Stress-Formulations-Viscoelastic"
-
-\end_inset
-
-.
- A linear Maxwell viscoelastic material may be characterized by the same
- elastic parameters as an isotropic elastic material (
-\begin_inset Formula $E$
-\end_inset
-
- and 
-\begin_inset Formula $\nu$
-\end_inset
-
-), as well as the viscosity, 
-\begin_inset Formula $\eta$
-\end_inset
-
-.
- The creep strain increment is
-\begin_inset Formula 
-\begin{gather}
-\underline{\Delta e}^{C}=\frac{\Delta t\phantom{}^{\tau}\underline{S}}{2\eta}\,\,.\label{eq:D1}
-\end{gather}
-
-\end_inset
-
-Therefore,
-\begin_inset Formula 
-\begin{gather}
-\Delta\overline{e}^{C}=\frac{\Delta t\sqrt{^{\tau}J_{2}^{\prime}}}{\sqrt{3\eta}}=\frac{\Delta t\phantom{}^{\tau}\overline{\sigma}}{3\eta}\,,\,\mathrm{and}\,^{\tau}\gamma=\frac{1}{2\eta}\,\,.\label{eq:D2}
-\end{gather}
-
-\end_inset
-
-Substituting Equations 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "eq:46"
-
-\end_inset
-
-, 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "eq:D1"
-
-\end_inset
-
-, and 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "eq:D2"
-
-\end_inset
-
- into 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "eq:43"
-
-\end_inset
-
-, we obtain
-\begin_inset Formula 
-\begin{gather}
-^{t+\Delta t}\underline{S}=\frac{1}{a_{E}}\left\{ ^{t+\Delta t}\underline{e}^{\prime}-\frac{\Delta t}{2\eta}\left[(1-\alpha)^{t}\underline{S}+\alpha\phantom{}^{t+\Delta t}\underline{S}\right]\right\} +\underline{S}^{I}\,\,.\label{eq:D3}
-\end{gather}
-
-\end_inset
-
-Solving for 
-\begin_inset Formula $^{t+\Delta t}\underline{S}$
-\end_inset
-
-,
-\begin_inset Formula 
-\begin{gather}
-^{t+\Delta t}\underline{S}=\frac{1}{a_{E}+\frac{\alpha\Delta t}{2\eta}}\left[^{t+\Delta t}\underline{e}^{\prime}-\frac{\Delta t}{2\eta}(1-\alpha)^{t}\underline{S}+\frac{1+\mathrm{\nu}}{E}\underline{S}^{I}\right]\,\,.\label{eq:D4}
-\end{gather}
-
-\end_inset
-
-In this case it is possible to solve directly for the deviatoric stresses,
- and the effective stress function approach is not needed.
- To obtain the total stress, we simply use
-\begin_inset Formula 
-\begin{gather}
-^{t+\Delta t}\sigma_{ij}=\phantom{}^{t+\Delta t}S_{ij}+\frac{\mathit{1}}{a_{m}}\left(\,^{t+\Delta t}\theta-\theta^{I}\right)\delta_{ij}+P^{I}\delta_{ij}\,\,.\label{eq:D5}
-\end{gather}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-To compute the viscoelastic tangent material matrix relating stress and
- strain, we need to compute the first term in 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "eq:58"
-
-\end_inset
-
-.
- From Equation 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "eq:D4"
-
-\end_inset
-
-, we have
-\begin_inset Formula 
-\begin{gather}
-\frac{\partial\phantom{}^{t+\Delta t}S_{i}}{\partial\phantom{}^{t+\Delta t}e_{k}^{\prime}}=\frac{\delta_{ik}}{a_{E}+\frac{\alpha\Delta t}{2\eta}}\,\,.\label{eq:D12}
-\end{gather}
-
-\end_inset
-
-Using this, along with 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "eq:58"
-
-\end_inset
-
-, 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "eq:59"
-
-\end_inset
-
-, and 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "eq:60"
-
-\end_inset
-
-, the final material matrix relating stress and tensor strain is
-\begin_inset Formula 
-\begin{gather}
-C_{ij}^{VE}=\frac{1}{3a_{m}}\left[\begin{array}{cccccc}
-1 & 1 & 1 & 0 & 0 & 0\\
-1 & 1 & 1 & 0 & 0 & 0\\
-1 & 1 & 1 & 0 & 0 & 0\\
-0 & 0 & 0 & 0 & 0 & 0\\
-0 & 0 & 0 & 0 & 0 & 0\\
-0 & 0 & 0 & 0 & 0 & 0
-\end{array}\right]+\frac{1}{3\left(a_{E}+\frac{\alpha\Delta t}{2\eta}\right)}\left[\begin{array}{cccccc}
-2 & -1 & -1 & 0 & 0 & 0\\
--1 & 2 & -1 & 0 & 0 & 0\\
--1 & -1 & 2 & 0 & 0 & 0\\
-0 & 0 & 0 & 3 & 0 & 0\\
-0 & 0 & 0 & 0 & 3 & 0\\
-0 & 0 & 0 & 0 & 0 & 3
-\end{array}\right]\,.\label{eq:D13}
-\end{gather}
-
-\end_inset
-
-Note that the coefficient of the second matrix approaches 
-\begin_inset Formula $E/3(1+\nu)=1/3a_{E}$
-\end_inset
-
- as 
-\begin_inset Formula $\eta$
-\end_inset
-
- goes to infinity.
- To check the results we make sure that the regular elastic constitutive
- matrix is obtained for selected terms in the case where 
-\begin_inset Formula $\eta$
-\end_inset
-
- goes to infinity.
-\begin_inset Formula 
-\begin{gather}
-C_{11}^{E}=\frac{E(1-\nu)}{(1+\nu)(1-2\nu)}\,\,\nonumber \\
-C_{12}^{E}=\frac{E\nu}{(1+\nu)(1-2\nu)}\,.\label{eq:D14}\\
-C_{44}^{E}=\frac{E}{1+\nu}\,\,\nonumber 
-\end{gather}
-
-\end_inset
-
-This is consistent with the regular elasticity matrix, and Equation 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "eq:D13"
-
-\end_inset
-
- should thus be used when forming the stiffness matrix.
- We do not presently use this formulation, but it may be included in future
- versions.
-\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 0
+\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:Alternative-Formulations"
+
+\end_inset
+
+Alternative Material Model Formulations
+\end_layout
+
+\begin_layout Section
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:ViscoelasticFormulations"
+
+\end_inset
+
+Viscoelastic Formulations
+\end_layout
+
+\begin_layout Standard
+The viscoelastic formulations presently used in PyLith are described in
+ Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Viscoelastic-Materials"
+
+\end_inset
+
+.
+ In some cases there are alternative formulations that may be used in future
+ versions of PyLith, and those are described here.
+\end_layout
+
+\begin_layout Subsection
+\begin_inset CommandInset label
+LatexCommand label
+name "sub:Effective-Stress-Formulation-Maxwell"
+
+\end_inset
+
+Effective Stress Formulation for a Linear Maxwell Viscoelastic Material
+\end_layout
+
+\begin_layout Standard
+An alternative technique for solving the equations for a Maxwell viscoelastic
+ material is based on the effective stress formulation described in Section
+ 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Effective-Stress-Formulations-Viscoelastic"
+
+\end_inset
+
+.
+ A linear Maxwell viscoelastic material may be characterized by the same
+ elastic parameters as an isotropic elastic material (
+\begin_inset Formula $E$
+\end_inset
+
+ and 
+\begin_inset Formula $\nu$
+\end_inset
+
+), as well as the viscosity, 
+\begin_inset Formula $\eta$
+\end_inset
+
+.
+ The creep strain increment is
+\begin_inset Formula 
+\begin{gather}
+\underline{\Delta e}^{C}=\frac{\Delta t\phantom{}^{\tau}\underline{S}}{2\eta}\,\,.\label{eq:D1}
+\end{gather}
+
+\end_inset
+
+Therefore,
+\begin_inset Formula 
+\begin{gather}
+\Delta\overline{e}^{C}=\frac{\Delta t\sqrt{^{\tau}J_{2}^{\prime}}}{\sqrt{3\eta}}=\frac{\Delta t\phantom{}^{\tau}\overline{\sigma}}{3\eta}\,,\,\mathrm{and}\,^{\tau}\gamma=\frac{1}{2\eta}\,\,.\label{eq:D2}
+\end{gather}
+
+\end_inset
+
+Substituting Equations 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "eq:46"
+
+\end_inset
+
+, 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "eq:D1"
+
+\end_inset
+
+, and 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "eq:D2"
+
+\end_inset
+
+ into 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "eq:43"
+
+\end_inset
+
+, we obtain
+\begin_inset Formula 
+\begin{gather}
+^{t+\Delta t}\underline{S}=\frac{1}{a_{E}}\left\{ ^{t+\Delta t}\underline{e}^{\prime}-\frac{\Delta t}{2\eta}\left[(1-\alpha)^{t}\underline{S}+\alpha\phantom{}^{t+\Delta t}\underline{S}\right]\right\} +\underline{S}^{I}\,\,.\label{eq:D3}
+\end{gather}
+
+\end_inset
+
+Solving for 
+\begin_inset Formula $^{t+\Delta t}\underline{S}$
+\end_inset
+
+,
+\begin_inset Formula 
+\begin{gather}
+^{t+\Delta t}\underline{S}=\frac{1}{a_{E}+\frac{\alpha\Delta t}{2\eta}}\left[^{t+\Delta t}\underline{e}^{\prime}-\frac{\Delta t}{2\eta}(1-\alpha)^{t}\underline{S}+\frac{1+\mathrm{\nu}}{E}\underline{S}^{I}\right]\,\,.\label{eq:D4}
+\end{gather}
+
+\end_inset
+
+In this case it is possible to solve directly for the deviatoric stresses,
+ and the effective stress function approach is not needed.
+ To obtain the total stress, we simply use
+\begin_inset Formula 
+\begin{gather}
+^{t+\Delta t}\sigma_{ij}=\phantom{}^{t+\Delta t}S_{ij}+\frac{\mathit{1}}{a_{m}}\left(\,^{t+\Delta t}\theta-\theta^{I}\right)\delta_{ij}+P^{I}\delta_{ij}\,\,.\label{eq:D5}
+\end{gather}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+To compute the viscoelastic tangent material matrix relating stress and
+ strain, we need to compute the first term in Equation 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "eq:58"
+
+\end_inset
+
+.
+ From Equation 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "eq:D4"
+
+\end_inset
+
+, we have
+\begin_inset Formula 
+\begin{gather}
+\frac{\partial\phantom{}^{t+\Delta t}S_{i}}{\partial\phantom{}^{t+\Delta t}e_{k}^{\prime}}=\frac{\delta_{ik}}{a_{E}+\frac{\alpha\Delta t}{2\eta}}\,\,.\label{eq:D12}
+\end{gather}
+
+\end_inset
+
+Using this, along with Equations 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "eq:58"
+
+\end_inset
+
+, 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "eq:59"
+
+\end_inset
+
+, and 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "eq:60"
+
+\end_inset
+
+, the final material matrix relating stress and tensor strain is
+\begin_inset Formula 
+\begin{gather}
+C_{ij}^{VE}=\frac{1}{3a_{m}}\left[\begin{array}{cccccc}
+1 & 1 & 1 & 0 & 0 & 0\\
+1 & 1 & 1 & 0 & 0 & 0\\
+1 & 1 & 1 & 0 & 0 & 0\\
+0 & 0 & 0 & 0 & 0 & 0\\
+0 & 0 & 0 & 0 & 0 & 0\\
+0 & 0 & 0 & 0 & 0 & 0
+\end{array}\right]+\frac{1}{3\left(a_{E}+\frac{\alpha\Delta t}{2\eta}\right)}\left[\begin{array}{cccccc}
+2 & -1 & -1 & 0 & 0 & 0\\
+-1 & 2 & -1 & 0 & 0 & 0\\
+-1 & -1 & 2 & 0 & 0 & 0\\
+0 & 0 & 0 & 3 & 0 & 0\\
+0 & 0 & 0 & 0 & 3 & 0\\
+0 & 0 & 0 & 0 & 0 & 3
+\end{array}\right]\,.\label{eq:D13}
+\end{gather}
+
+\end_inset
+
+Note that the coefficient of the second matrix approaches 
+\begin_inset Formula $E/3(1+\nu)=1/3a_{E}$
+\end_inset
+
+ as 
+\begin_inset Formula $\eta$
+\end_inset
+
+ goes to infinity.
+ To check the results we make sure that the regular elastic constitutive
+ matrix is obtained for selected terms in the case where 
+\begin_inset Formula $\eta$
+\end_inset
+
+ goes to infinity.
+\begin_inset Formula 
+\begin{gather}
+C_{11}^{E}=\frac{E(1-\nu)}{(1+\nu)(1-2\nu)}\,\,\nonumber \\
+C_{12}^{E}=\frac{E\nu}{(1+\nu)(1-2\nu)}\,.\label{eq:D14}\\
+C_{44}^{E}=\frac{E}{1+\nu}\,\,\nonumber 
+\end{gather}
+
+\end_inset
+
+This is consistent with the regular elasticity matrix, and Equation 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "eq:D13"
+
+\end_inset
+
+ should thus be used when forming the stiffness matrix.
+ We do not presently use this formulation, but it may be included in future
+ versions.
+\end_layout
+
+\end_body
+\end_document

Modified: short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/materials/materials.lyx
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/materials/materials.lyx	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/materials/materials.lyx	2012-11-01 17:04:11 UTC (rev 20976)
@@ -191,14 +191,16 @@
 
 \end_inset
 
-for examples 
-\family typewriter
-that
-\family default
- demonstrate how to specify more than one material model.
+ for examples that demonstrate how to specify more than one material model.
 \end_layout
 
 \begin_layout Subsection
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:material:parameters"
+
+\end_inset
+
 Material Parameters
 \end_layout
 
@@ -319,11 +321,7 @@
 \end_layout
 
 \begin_layout Standard
-These settings correspond to the the problem in 
-\family typewriter
-Section 
-\family default
-
+These settings correspond to the the problem in Section 
 \begin_inset CommandInset ref
 LatexCommand ref
 reference "sec:Tutorial-3d-hex8"
@@ -390,11 +388,7 @@
 \end_layout
 
 \begin_layout Standard
-These settings again correspond to the problem in 
-\family typewriter
-Section 
-\family default
-
+These settings again correspond to the problem in Section 
 \begin_inset CommandInset ref
 LatexCommand ref
 reference "sec:Tutorial-3d-hex8"
@@ -437,11 +431,7 @@
  Similarly, other material models require state variables in addition to
  the default stress and strain variables that are used by all material models.
  Additional output may be requested for a material model, as in this example
- (
-\family typewriter
-see Section 
-\family default
-
+ (see Section 
 \begin_inset CommandInset ref
 LatexCommand ref
 reference "sec:Tutorial-Two-hexahedra"
@@ -810,9 +800,9 @@
 \begin_layout Plain Layout
 
 \family typewriter
-mu, lambda, density, 
+mu, lambda, density, alpha_yield
 \family default
-alpha_yield,
+,
 \family typewriter
  beta, alpha_flow 
 \end_layout
@@ -874,7 +864,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 +921,7 @@
 \begin_inset Text
 
 \begin_layout Plain Layout
-total_strain, viscous_strain
+total_strain
 \end_layout
 
 \end_inset
@@ -1002,7 +992,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 +1001,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 +1013,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 +1033,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 +1066,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
@@ -1088,6 +1210,109 @@
 
 \end_layout
 
+\begin_layout Subsection
+Stable time step
+\end_layout
+
+\begin_layout Standard
+PyLith computes the stable time step in both quasi-static and dynamic simulation
+s.
+ In quasi-static simulations the stability of the implicit time stepping
+ scheme does not depend on the time step; instead, the stable time step
+ is associated with the accuracy of the solution.
+ In purely elastic materials, the accuracy is independent of the time step,
+ so the stable time step is infinite.
+ For viscoelastic materials we set the stable time step to be 1/5 of the
+ relaxation time.
+ In quasi-static simulations we check the stable time step at every time
+ step.
+\end_layout
+
+\begin_layout Standard
+In dynamic simulations the stability of the explicit time stepping scheme
+ integration does depend on the time step via the Courant-Friderichs-Lewy
+ condition 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "Courant:etal:1967"
+
+\end_inset
+
+.
+ This condition states that the critical time step is the time it takes
+ for the P wave to travel across the shortest dimension of a cell.
+ In most cases this is the shortest edge length.
+ However, distorted cells which have relatively small areas in 2-D or relatively
+ small volumes in 3-D for the given edge lengths also require small time
+ steps due to the artificially high stiffness associated with the distorted
+ shape.
+ As a result, we set the stable time step to be the smaller of the shortest
+ edge length and a scaling factor times the radius of an inscribed circle
+ (in 2-D), 
+\begin_inset Formula 
+\begin{gather}
+dt=\min(e_{\mathit{min}},3.0r_{inscribed})\\
+r_{inscribed}=\sqrt{\frac{k(k-e_{0})(k-e_{1})(k-e_{2})}{k}}\\
+k=\frac{1}{2}(e_{0}+e_{1}+e_{2})
+\end{gather}
+
+\end_inset
+
+and sphere (in 3-D),
+\begin_inset Formula 
+\begin{gather}
+dt=\min(e_{\mathit{min}},6.38r_{inscribed})\\
+r_{inscribed}=3V/(A_{0}+A_{1}+A_{2}+A_{3}),
+\end{gather}
+
+\end_inset
+
+where 
+\begin_inset Formula $e_{i}$
+\end_inset
+
+ denotes the length of edge 
+\begin_inset Formula $i$
+\end_inset
+
+, 
+\begin_inset Formula $A_{i}$
+\end_inset
+
+ denotes the area of face 
+\begin_inset Formula $i$
+\end_inset
+
+, and 
+\begin_inset Formula $V$
+\end_inset
+
+ is the volume of the cell.
+ We determined the scaling factoring empirically using several benchmarks.
+ In dynamic simulations we check the stable time step only at the beginning
+ of the simulation.
+ That is, we assume the elastic properties and mesh do not change, so that
+ the stable time step is constant throughout the simulation.
+\end_layout
+
+\begin_layout Standard
+The stable time steps for each cell can be included in the output with the
+ other 
+\family typewriter
+cell_info_fields
+\family default
+.
+ For implicit time stepping the field is 
+\family typewriter
+stable_dt_implicit
+\family default
+ and for explicit time stepping the field is 
+\family typewriter
+stable_dt_explicit
+\family default
+.
+\end_layout
+
 \begin_layout Section
 Elastic Material Models
 \end_layout
@@ -1209,7 +1434,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 +1459,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 +1484,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 +1509,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 +1800,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 +1843,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 +1897,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 +1926,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 +1946,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 +1966,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 +2006,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 +2026,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 +2937,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 +2962,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 +2987,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 +3012,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 +3037,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 +3107,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 +3132,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 +3157,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 +3182,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 +3207,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 +3232,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 +3257,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 +3282,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 +3307,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 +3332,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
@@ -3973,7 +4239,7 @@
 
 \end_inset
 
-Where
+where
 \begin_inset Formula 
 \begin{gather}
 ^{t+\Delta t}T_{i}=\phantom{}^{t+\Delta t}S_{i}\:;\:\:1\leq i\leq3\label{eq:91}\\
@@ -4139,7 +4405,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 +4430,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 +4455,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 +4480,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 +4505,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 +4530,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 +4555,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 +4596,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 +4727,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 +5175,7 @@
 
 \end_inset
 
- refer to 
+ refer respectively to 
 \begin_inset Formula $\phi$
 \end_inset
 
@@ -4641,41 +5187,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 +5290,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 +5384,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 +5799,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 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 +5954,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 +5979,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 +6001,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/branches/pylith-scecdynrup/doc/userguide/preface.lyx
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/preface.lyx	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/preface.lyx	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,280 +1,280 @@
-#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
-Preface
-\end_layout
-
-\begin_layout Section
-About This Document
-\end_layout
-
-\begin_layout Standard
-This document is organized into two parts.
- The first part begins with an introduction to PyLith and discusses the
- types of problems that PyLith can solve and how to run the software; the
- second part provides appendices and references.
-\end_layout
-
-\begin_layout Section
-Who Will Use This Documentation
-\end_layout
-
-\begin_layout Standard
-This documentation is aimed at two categories of users: scientists who prefer
- to use prepackaged and specialized analysis tools, and experienced computationa
-l Earth scientists.
- Of the latter, there are likely to be two classes of users: those who just
- run models, and those who modify the source code.
- Users who modify the source are likely to have familiarity with scripting,
- software installation, and programming, but are not necessarily professional
- programmers.
-\end_layout
-
-\begin_layout Section
-Citation
-\end_layout
-
-\begin_layout Standard
-The Computational Infrastructure for Geodynamics (CIG) 
-\begin_inset Flex URL
-status collapsed
-
-\begin_layout Plain Layout
-
-geodynamics.org
-\end_layout
-
-\end_inset
-
- is making this source code available to you at no cost in hopes that the
- software will enhance your research in geophysics.
- A number of individuals have contributed a significant portion of their
- careers toward the development of this software.
- It is essential that you recognize these individuals in the normal scientific
- practice by citing the appropriate peer-reviewed papers and making appropriate
- acknowledgements in talks and publications.
- At this time there are no refereed journal articles discussing the design
- and implementation of PyLith, so we request that you cite four AGU meeting
- abstracts associated with PyLith:
-\end_layout
-
-\begin_layout Itemize
-Williams, C.A., B.
- Aagaard, 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 Itemize
-Williams, C.A.
- (2006), Development of a package for modeling stress in the lithosphere,
- 
-\emph on
-Eos Trans.
- AGU, 87
-\emph default
-(36), Jt.
- Assem.
- Suppl., Abstract T24A-01 Invited.
-\end_layout
-
-\begin_layout Itemize
-Aagaard, B., C.
- Williams, M.
- Knepley (2007), PyLith: A finite-element code for modeling quasi-static
- and dynamic crustal deformation, 
-\emph on
-Eos Trans.
- AGU, 8
-\emph default
-8(52), Fall Meet.
- Suppl., Abstract T21B-0592.
-\end_layout
-
-\begin_layout Itemize
-Aagaard, B., C.
- Williams, M.
- Knepley (2008), PyLith: A finite-element code for modeling quasi-static
- and dynamic crustal deformation, 
-\emph on
-Eos Trans.
- AGU, 89
-\emph default
-(53), Fall Meet.
- Suppl., Abstract T41A-1925.
-\end_layout
-
-\begin_layout Standard
-To cite this manual, use:
-\end_layout
-
-\begin_layout Itemize
-Aagaard, B., S.
- Kientz, M.
- Knepley, S.
- Somala, L.
- Strand, and C.
- Williams (2011), 
-\emph on
-PyLith User Manual, Version 1.7.0.
-
-\emph default
- Davis, CA: Computational Infrastructure of Geodynamics.
-\begin_inset Newline newline
-\end_inset
-
-URL: geodynamics.org/cig/software/pylith/pylith_manual-1.7.pdf
-\end_layout
-
-\begin_layout Section
-Support
-\end_layout
-
-\begin_layout Standard
-Current PyLith development is supported by the CIG, and internal GNS Science
- 
-\begin_inset Flex URL
-status open
-
-\begin_layout Plain Layout
-
-www.gns.cri.nz
-\end_layout
-
-\end_inset
-
- and U.S.
- Geological Survey 
-\begin_inset Flex URL
-status collapsed
-
-\begin_layout Plain Layout
-
-www.usgs.gov
-\end_layout
-
-\end_inset
-
- funding.
- Pyre development was funded by the Department of Energy's 
-\begin_inset Flex URL
-status collapsed
-
-\begin_layout Plain Layout
-
-www.doe.gov/engine/content.do
-\end_layout
-
-\end_inset
-
- Advanced Simulation and Computing program and the National Science Foundation's
- Information Technology Research (ITR) program.
-\end_layout
-
-\begin_layout Standard
-This material is based upon work supported by the National Science Foundation
- under Grants No.
- 0313238, 0745391, and EAR-0949446.
- Any opinions, findings, and conclusions or recommendations expressed in
- this material are those of the author(s) and do not necessarily reflect
- the views of the National Science Foundation.
-\end_layout
-
-\begin_layout Section
-Request for Comments
-\end_layout
-
-\begin_layout Standard
-Your suggestions and corrections can only improve this documentation.
- Please report any errors, inaccuracies, or typos to the CIG Short-Term
- Tectonics email list 
-\begin_inset Flex URL
-status open
-
-\begin_layout Plain Layout
-
-cig-short at geodynamics.org
-\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 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
+Preface
+\end_layout
+
+\begin_layout Section
+About This Document
+\end_layout
+
+\begin_layout Standard
+This document is organized into two parts.
+ The first part begins with an introduction to PyLith and discusses the
+ types of problems that PyLith can solve and how to run the software; the
+ second part provides appendices and references.
+\end_layout
+
+\begin_layout Section
+Who Will Use This Documentation
+\end_layout
+
+\begin_layout Standard
+This documentation is aimed at two categories of users: scientists who prefer
+ to use prepackaged and specialized analysis tools, and experienced computationa
+l Earth scientists.
+ Of the latter, there are likely to be two classes of users: those who just
+ run models, and those who modify the source code.
+ Users who modify the source are likely to have familiarity with scripting,
+ software installation, and programming, but are not necessarily professional
+ programmers.
+\end_layout
+
+\begin_layout Section
+Citation
+\end_layout
+
+\begin_layout Standard
+The Computational Infrastructure for Geodynamics (CIG) 
+\begin_inset Flex URL
+status collapsed
+
+\begin_layout Plain Layout
+
+geodynamics.org
+\end_layout
+
+\end_inset
+
+ is making this source code available to you at no cost in hopes that the
+ software will enhance your research in geophysics.
+ A number of individuals have contributed a significant portion of their
+ careers toward the development of this software.
+ It is essential that you recognize these individuals in the normal scientific
+ practice by citing the appropriate peer-reviewed papers and making appropriate
+ acknowledgements in talks and publications.
+ At this time there are no refereed journal articles discussing the design
+ and implementation of PyLith, so we request that you cite four AGU meeting
+ abstracts associated with PyLith:
+\end_layout
+
+\begin_layout Itemize
+Williams, C.A., B.
+ Aagaard, 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 Itemize
+Williams, C.A.
+ (2006), Development of a package for modeling stress in the lithosphere,
+ 
+\emph on
+Eos Trans.
+ AGU, 87
+\emph default
+(36), Jt.
+ Assem.
+ Suppl., Abstract T24A-01 Invited.
+\end_layout
+
+\begin_layout Itemize
+Aagaard, B., C.
+ Williams, M.
+ Knepley (2007), PyLith: A finite-element code for modeling quasi-static
+ and dynamic crustal deformation, 
+\emph on
+Eos Trans.
+ AGU, 8
+\emph default
+8(52), Fall Meet.
+ Suppl., Abstract T21B-0592.
+\end_layout
+
+\begin_layout Itemize
+Aagaard, B., C.
+ Williams, M.
+ Knepley (2008), PyLith: A finite-element code for modeling quasi-static
+ and dynamic crustal deformation, 
+\emph on
+Eos Trans.
+ AGU, 89
+\emph default
+(53), Fall Meet.
+ Suppl., Abstract T41A-1925.
+\end_layout
+
+\begin_layout Standard
+To cite this manual, use:
+\end_layout
+
+\begin_layout Itemize
+Aagaard, B., S.
+ Kientz, M.
+ Knepley, S.
+ Somala, L.
+ Strand, and C.
+ Williams (2011), 
+\emph on
+PyLith User Manual, Version 1.8.0.
+
+\emph default
+ Davis, CA: Computational Infrastructure of Geodynamics.
+\begin_inset Newline newline
+\end_inset
+
+URL: geodynamics.org/cig/software/pylith/pylith_manual-1.8.0.pdf
+\end_layout
+
+\begin_layout Section
+Support
+\end_layout
+
+\begin_layout Standard
+Current PyLith development is supported by the CIG, and internal GNS Science
+ 
+\begin_inset Flex URL
+status open
+
+\begin_layout Plain Layout
+
+www.gns.cri.nz
+\end_layout
+
+\end_inset
+
+ and U.S.
+ Geological Survey 
+\begin_inset Flex URL
+status collapsed
+
+\begin_layout Plain Layout
+
+www.usgs.gov
+\end_layout
+
+\end_inset
+
+ funding.
+ Pyre development was funded by the Department of Energy's 
+\begin_inset Flex URL
+status collapsed
+
+\begin_layout Plain Layout
+
+www.doe.gov/engine/content.do
+\end_layout
+
+\end_inset
+
+ Advanced Simulation and Computing program and the National Science Foundation's
+ Information Technology Research (ITR) program.
+\end_layout
+
+\begin_layout Standard
+This material is based upon work supported by the National Science Foundation
+ under Grants No.
+ 0313238, 0745391, and EAR-0949446.
+ Any opinions, findings, and conclusions or recommendations expressed in
+ this material are those of the author(s) and do not necessarily reflect
+ the views of the National Science Foundation.
+\end_layout
+
+\begin_layout Section
+Request for Comments
+\end_layout
+
+\begin_layout Standard
+Your suggestions and corrections can only improve this documentation.
+ Please report any errors, inaccuracies, or typos to the CIG Short-Term
+ Tectonics email list 
+\begin_inset Flex URL
+status open
+
+\begin_layout Plain Layout
+
+cig-short at geodynamics.org
+\end_layout
+
+\end_inset
+
+.
+ 
+\end_layout
+
+\end_body
+\end_document

Modified: short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/runpylith/runpylith.lyx
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/runpylith/runpylith.lyx	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/runpylith/runpylith.lyx	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1308,7 +1308,7 @@
 \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,
+ 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
@@ -1317,11 +1317,11 @@
 \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,
+ 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 3-D hexahedral mesh a node is inserted at the midpoint of each edge,
+ 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
@@ -1351,7 +1351,7 @@
 \begin_inset Caption
 
 \begin_layout Plain Layout
-Global uniform mesh refinement of 2-D and 3-D linear cells.
+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
@@ -1383,8 +1383,8 @@
  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
+ 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
 
@@ -1591,6 +1591,68 @@
 \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"
@@ -1742,8 +1804,8 @@
 \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.
+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
@@ -2247,6 +2309,8 @@
 \begin_inset Text
 
 \begin_layout Plain Layout
+
+\family typewriter
 ksp_type
 \end_layout
 
@@ -2641,21 +2705,19 @@
 
 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">
+<lyxtabular version="3" rows="8" columns="3">
 <features tabularvalignment="middle">
-<column alignment="left" valignment="top" width="2in">
+<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="center" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
+<cell alignment="left" valignment="top" topline="true" bottomline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
@@ -2690,12 +2752,13 @@
 </cell>
 </row>
 <row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
 
 \family typewriter
+\size footnotesize
 fs_pc_type
 \end_layout
 
@@ -2723,22 +2786,25 @@
 </cell>
 </row>
 <row>
-<cell multicolumn="1" alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
 
 \family typewriter
+\size footnotesize
 fs_pc_fieldsplit_real_diagonal
 \end_layout
 
 \end_inset
 </cell>
-<cell multicolumn="2" alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<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
@@ -2754,12 +2820,13 @@
 </cell>
 </row>
 <row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
 
 \family typewriter
+\size footnotesize
 fs_pc_fieldsplit_type
 \end_layout
 
@@ -2788,13 +2855,14 @@
 </cell>
 </row>
 <row>
-<cell alignment="center" valignment="top" topline="true" leftline="true" usebox="none">
+<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
 \begin_inset Text
 
 \begin_layout Plain Layout
 
 \family typewriter
-fs_fieldsplit_X_pc_type
+\size footnotesize
+fs_fieldsplit_0_pc_type
 \end_layout
 
 \end_inset
@@ -2815,12 +2883,114 @@
 
 \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>
+<row>
+<cell alignment="left" valignment="top" topline="true" leftline="true" usebox="none">
+\begin_inset Text
+
+\begin_layout Plain Layout
+
+\family typewriter
+\size footnotesize
+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
+\size footnotesize
+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
+\size footnotesize
+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
@@ -2833,6 +3003,168 @@
 
 \end_layout
 
+\begin_layout Subsubsection
+Model Verification with PETSc Direct Solvers
+\end_layout
+
+\begin_layout Standard
+It is often useful to apply a direct solver so that solver convergence is
+ decoupled from model verification for the purposes of testing.
+ Unfortunately, the traditional LU factorization solvers cannot be directly
+ applied in PyLith due to the saddle-point formulation used to accomodate
+ the fault slip constraints.
+ However, we can combine an LU factorization of the displacement sub-block
+ with a full Schur complement factorization using the PETSc FieldSplit precondit
+ioner.
+ If the solver for the Schur complement S is given a very low tolerance,
+ this is effectively a direct solver.
+ The options given below will construct this solver in PyLith.
+\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
+use_custom_constraint_pc = True
+\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_type = schur
+\end_layout
+
+\begin_layout LyX-Code
+fs_pc_fieldsplit_schur_precondition = user
+\end_layout
+
+\begin_layout LyX-Code
+fs_pc_fieldsplit_schur_factorization_type = full
+\end_layout
+
+\begin_layout LyX-Code
+fs_pc_fieldsplit_real_diagonal = true
+\end_layout
+
+\begin_layout LyX-Code
+fs_fieldsplit_0_pc_type = lu
+\end_layout
+
+\begin_layout LyX-Code
+fs_fieldsplit_0_ksp_type = gmres
+\end_layout
+
+\begin_layout LyX-Code
+fs_fieldsplit_0_ksp_rtol = 1.0e-10
+\end_layout
+
+\begin_layout LyX-Code
+fs_fieldsplit_1_pc_type = jacobi
+\end_layout
+
+\begin_layout LyX-Code
+fs_fieldsplit_1_ksp_type = gmres
+\end_layout
+
+\begin_layout LyX-Code
+fs_fieldsplit_1_ksp_rtol = 1.0e-10 
+\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
@@ -2874,55 +3206,110 @@
 
 \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.
+ 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
 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.
+ExplicitTri3 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.
+ExplicitTet4 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:
+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 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
+formulation = pylith.problems.Implicit ; default
 \end_layout
 
+\begin_layout LyX-Code
+elastic_preset = True ; default
+\end_layout
+
 \begin_layout Standard
-The formulation can be set to the other formulations in a similar fashion.
+The formulation value can be set to the other formulations in a similar
+ fashion.
+ 
 \end_layout
 
 \begin_layout Subsection
@@ -2981,27 +3368,39 @@
 \end_layout
 
 \begin_layout LyX-Code
+
+\size footnotesize
 [pylithapp.timedependent.formulation]
 \end_layout
 
 \begin_layout LyX-Code
+
+\size footnotesize
 time_step = pylith.problems.TimeStepUniform
 \end_layout
 
 \begin_layout LyX-Code
+
+\size footnotesize
 solver = pylith.problems.SolverLinear ; Nonlinear solver is pylith.problems.SolverNo
 nlinear
 \end_layout
 
 \begin_layout LyX-Code
+
+\size footnotesize
 output = [domain,ground_surface]
 \end_layout
 
 \begin_layout LyX-Code
+
+\size footnotesize
 matrix_type = sbaij ; To use a non-symmetric sparse matrix, set it to aij
 \end_layout
 
 \begin_layout LyX-Code
+
+\size footnotesize
 view_jacobian = false
 \end_layout
 
@@ -3770,26 +4169,26 @@
 
 \begin_layout LyX-Code
 
-\size small
+\size footnotesize
 [pylithapp.timedependent.materials.material]
 \end_layout
 
 \begin_layout LyX-Code
 
-\size small
+\size footnotesize
 db_properties = spatialdata.spatialdb.UniformDB ; Set the db to a UniformDB
 \end_layout
 
 \begin_layout LyX-Code
 
-\size small
+\size footnotesize
 db_properties.values = [vp,vs,density] ; Set the names of the values in the
  database
 \end_layout
 
 \begin_layout LyX-Code
 
-\size small
+\size footnotesize
 db_properties.data = [5773.5*m/s, 3333.3*m/s, 2700.0*kg/m**3] ; Set the values
  in the database
 \end_layout
@@ -3827,6 +4226,83 @@
 \end_layout
 
 \begin_layout Subsection
+SimpleGridDB Spatial Database
+\end_layout
+
+\begin_layout Standard
+The SimpleGridDB object provides a much more efficient query algorithm than
+ SimpleDB in cases with a orthogonal grid.
+ The points do not need to be uniformly spaced along each coordinate direction.
+ Thus, in contrast to the SimpleDB there is an implicit topology.
+ Nevertheless, the points can be specified in any order, as well as over
+ a lower-dimension than the spatial dimension.
+ For example, one can specify a 2-D grid in 3-D space provided that the
+ 2-D grid is aligned with one of the coordinate axes.
+ 
+\end_layout
+
+\begin_layout Standard
+SimpleGridDB 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:SimpleGrid"
+
+\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 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
+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
+filename = mydb_grid.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+
+\end_layout
+
+\begin_layout Subsection
 \begin_inset CommandInset label
 LatexCommand label
 name "sub:SCECCVMH-Impl"
@@ -4388,6 +4864,12 @@
 \end_layout
 
 \begin_layout Subsection
+\begin_inset CommandInset label
+LatexCommand label
+name "sec:output:points"
+
+\end_inset
+
 Output at Arbitrary Points
 \end_layout
 
@@ -4436,6 +4918,10 @@
 ).
  In most cases users will want to use the 
 \family typewriter
+
+\begin_inset Newline linebreak
+\end_inset
+
 DataWriterHDF5Mesh
 \family default
 .
@@ -4580,6 +5066,12 @@
 \end_layout
 
 \begin_layout Subsection
+\begin_inset CommandInset label
+LatexCommand label
+name "sub:HDF5/Xdmf-Output"
+
+\end_inset
+
 HDF5/Xdmf Output
 \end_layout
 
@@ -4716,6 +5208,26 @@
 \end_layout
 
 \begin_layout Standard
+See Table 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "tab:material-model-statevars"
+
+\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 in HDF5 files.
+ To avoid confusion about the ordering of components for tensor data, we
+ separate the components in the Xdmf file.
+\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
@@ -4733,7 +5245,7 @@
 \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.
@@ -4771,13 +5283,57 @@
 \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.
+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-model-statevars"
+
+\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
+HDF5 Utilities
 \end_layout
 
 \begin_layout Standard
@@ -4950,7 +5506,7 @@
 \family typewriter
 --help-properties
 \family default
- command line arguments when running PyLith to check the parameters to make
+ command-line arguments when running PyLith to check the parameters to make
  sure PyLith is using the parameters you intended.
 \end_layout
 
@@ -4969,13 +5525,17 @@
 \family default
 , 
 \family typewriter
+
+\begin_inset Newline newline
+\end_inset
+
 --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
+ command-line arguments (or set them in a parameter file) to view PyLith
  performance and monitor the convergence.
 \end_layout
 
@@ -4995,10 +5555,21 @@
 \end_layout
 
 \begin_layout Itemize
-Consult the PyLith FAQ webpage (ADD URL HERE) which contains a growing list
- of common problems and their corresponding solutions.
+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
@@ -5085,12 +5656,21 @@
  The workaround is:
 \end_layout
 
+\begin_deeper
 \begin_layout Enumerate
-Go to the lib/python2.6/site-packages directory.
+Go to the 
+\family typewriter
+lib/python2.6/site-packages
+\family default
+ directory.
 \end_layout
 
 \begin_layout Enumerate
-Unzip merlin-1.7-py2.6.egg (if it is a file and not a directory).
+Unzip 
+\family typewriter
+merlin-1.7-py2.6.egg
+\family default
+ (if it is a file and not a directory).
 \end_layout
 
 \begin_layout Enumerate
@@ -5098,15 +5678,28 @@
 \end_layout
 
 \begin_layout Enumerate
-Edit __init__.py.
+Edit 
+\family typewriter
+__init__.py
+\family default
+.
  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".
+If 
+\family typewriter
+merlin-1.7-py2.6.egg
+\family default
+ is a file, rezip merlin.
+ Go to the site-packages directory and enter "
+\family typewriter
+zip -r merlin-1.7-py2.6.egg merlin
+\family default
+".
 \end_layout
 
+\end_deeper
 \begin_layout Itemize
 
 \family typewriter
@@ -5131,7 +5724,7 @@
  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
+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
@@ -5151,8 +5744,8 @@
 \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).
+ or installing PyLith (when building from source) or from 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.
@@ -5188,7 +5781,7 @@
 \family typewriter
 --petsc.start_in_debugger
 \family default
- command line argument:
+ command-line argument:
 \end_layout
 
 \begin_layout LyX-Code
@@ -5226,10 +5819,142 @@
 
 \begin_layout LyX-Code
 
-\size small
+\size footnotesize
 mpirun -np 1 /path/to/valgrind --log-file=valgrind-log  /path/to/mpinemesis
  --pyre-start [..lots of junk..]
 \end_layout
 
+\begin_layout Section
+Post-Processing Utilities
+\end_layout
+
+\begin_layout Standard
+The PyLith distribution includes a few post-processing utilities.
+ These are Python scripts that are installed into the same bin directory
+ as the 
+\family typewriter
+pylith
+\family default
+ executable.
+\end_layout
+
+\begin_layout Subsection
+
+\family typewriter
+pylith_eqinfo
+\end_layout
+
+\begin_layout Standard
+This utility computes the moment magnitude, seismic moment, seismic potency,
+ and average slip at user-specified time snapshots from PyLith fault HDF5
+ output.
+ The utility works with output from simulations with either prescribed slip
+ and/or spontaneous rupture.
+ Currently, we compute the shear modulus from a user-specified spatial database
+ at the centroid of the fault cells.
+ In the future we plan to account for lateral variations in shear modulus
+ across the fault when calculating the seismic moment.
+ The Python script is a Pyre application, so its parameters can be specified
+ using 
+\family typewriter
+.cfg
+\family default
+ and command line arguments just like PyLith.
+ The Pyre properties and facilities include:
+\end_layout
+
+\begin_layout Description
+output_filename Filename for output of slip information.
+\end_layout
+
+\begin_layout Description
+faults Array of fault names.
+\end_layout
+
+\begin_layout Description
+filename_pattern Filename pattern in C/Python format for creating filename
+ for each fault.
+ Default is
+\begin_inset Newline newline
+\end_inset
+
+
+\family typewriter
+output/fault_%s.h5
+\family default
+.
+\end_layout
+
+\begin_layout Description
+snapshots Array of timestamps for slip snapshosts ([-1] means use last time
+ step in file, which is the default).
+\end_layout
+
+\begin_layout Description
+snapshot_units Units for timestamps in array of snapshots.
+\end_layout
+
+\begin_layout Description
+db_properties Spatial database for elastic properties.
+\end_layout
+
+\begin_layout Description
+coordsys Coordinate system associated with mesh in simulation.
+\end_layout
+
+\begin_layout Subsection
+
+\family typewriter
+pylith_genxdmf
+\end_layout
+
+\begin_layout Standard
+This utility generates Xdmf files from HDF5 files that conform to the layout
+ used by PyLith.
+ It is a simple Python script with a single command line argument, the HDF5
+ file for input.
+ Typically, it is sued to regenerate Xdmf files that get corrupted or lost
+ due to renaming and moving.
+ It is also useful in updating Xdmf files when users add fields to HDF5
+ files during post-processing.
+\end_layout
+
+\begin_layout LyX-Code
+pylith_genxdmf --file=
+\shape italic
+PYLITH_HDF5_FILE
+\end_layout
+
+\begin_layout Quote
+
+\series bold
+\color red
+Warning:
+\color inherit
+ 
+\series default
+If the HDF5 files contain external datasets, then this utility should be
+ run from the same relative path to the HDF5 files as when they were created.
+ For example, if a PyLith simulation was run from directory 
+\family typewriter
+work
+\family default
+ and HDF5 files were generated in 
+\family typewriter
+output/work
+\family default
+, then the utility should be run from the directory 
+\family typewriter
+work
+\family default
+.
+ Furthermore, a visualization tool, such as ParaView, should also be started
+ from the working directory 
+\family typewriter
+work
+\family default
+.
+\end_layout
+
 \end_body
 \end_document

Modified: short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/3dhex8/3dhex8.lyx
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/3dhex8/3dhex8.lyx	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/3dhex8/3dhex8.lyx	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,627 +1,638 @@
-#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-hex8"
-
-\end_inset
-
-Tutorials Using Hexahedral Mesh Created by CUBIT
-\end_layout
-
-\begin_layout Standard
-PyLith features discussed in this set of tutorials:
-\end_layout
-
-\begin_layout Itemize
-Static solution
-\end_layout
-
-\begin_layout Itemize
-Quasi-static solution
-\end_layout
-
-\begin_layout Itemize
-CUBIT mesh format
-\end_layout
-
-\begin_layout Itemize
-Trilinear hexahedral cells
-\end_layout
-
-\begin_layout Itemize
-VTK output
-\end_layout
-
-\begin_layout Itemize
-HDF5 output
-\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
-ZeroDispDB spatial database
-\end_layout
-
-\begin_layout Itemize
-SimpleDB spatial database
-\end_layout
-
-\begin_layout Itemize
-UniformDB spatial database
-\end_layout
-
-\begin_layout Itemize
-Static fault rupture
-\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
-Linearly elastic isotropic material
-\end_layout
-
-\begin_layout Itemize
-Maxwell linear viscoelastic material
-\end_layout
-
-\begin_layout Itemize
-Generalized 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 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
-Gravitational body forces
-\end_layout
-
-\begin_layout Itemize
-Initial stresses
-\end_layout
-
-\begin_layout Itemize
-Finite strain
-\end_layout
-
-\begin_layout Standard
-All of the files necessary to run the examples are contained in the directory
- 
-\family typewriter
-examples/3d/hex8
-\family default
-.
-\end_layout
-
-\begin_layout Subsection
-Overview
-\end_layout
-
-\begin_layout Standard
-This tutorial is meant to demonstrate most of the important features of
- PyLith as a quasi-static finite-element code, using a sequence of example
- problems.
- All problems use the same 3D hexahedral mesh generated using the CUBIT
- 
-\begin_inset Flex URL
-status collapsed
-
-\begin_layout Plain Layout
-
-cubit.sandia.gov
-\end_layout
-
-\end_inset
-
- mesh generation package.
- Each example builds on the previous examples, as we demonstrate new features.
- As in the other examples, the files include extensive comments.
- We start with the generation of the mesh, which is composed of 144 trilinear
- hexahedra.
- The tutorial demonstrates the usage of the CUBIT mesh generation package
- to create a mesh, as well as describing how to use a CUBIT-generated mesh
- in PyLith.
- Following the discussion of how to generate the mesh, we discuss the 
-\family typewriter
-pylithapp.cfg
-\family default
- file, which contains information common to all the simulations.
- We group the examples into four sections, each pertaining to a particular
- set of PyLith features.
- We suggest users go through each of these sections in order as the complexity
- increases at each step.
- 
-\end_layout
-
-\begin_layout Subsection
-Mesh Generation and Description
-\end_layout
-
-\begin_layout Standard
-The mesh for these examples is a simple rectangular solid (Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:3dhex8-mesh"
-
-\end_inset
-
-).
- Although it would be possible to generate this mesh by hand, it is much
- simpler to use a mesh generation package, and we use CUBIT for this example.
- We provide documented journal files in 
-\family typewriter
-examples/3d/hex8/mesh.
-
-\family default
- Dissection of these journal files should provide some insight into how
- to use CUBIT with PyLith.
- For more detailed information on using CUBIT, refer to the CUBIT documentation
- 
-\begin_inset Flex URL
-status collapsed
-
-\begin_layout Plain Layout
-
-cubit.sandia.gov
-\end_layout
-
-\end_inset
-
-.
- If you have CUBIT installed on your machine, you can use the journal files
- to create your own mesh.
- Otherwise, you can use the mesh that has already been created.
-\end_layout
-
-\begin_layout Standard
-If you are using CUBIT to generate your own mesh, there are two ways to
- use the journal files.
- The simplest method is to go to the
-\family sans
- Tools
-\family default
- menu, select 
-\family sans
-Play Journal File
-\family default
-, and then select the file 
-\family typewriter
-mesh_hex8_1000m.jou
-\family default
-.
- This will run the commands in that file as well as the commands in 
-\family typewriter
-geometry.jou
-\family default
-, which is referenced from 
-\family typewriter
-mesh_hex8_1000m.jou
-\family default
-.
- Prior to doing this, you should set your directory to the one containing
- the journal files.
- 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 journal command into the CUBIT
- command window directly.
- That way, you will see what each command does.
- The first command in 
-\family typewriter
-mesh_hex8_1000m.jou
-\family default
- is 
-\family typewriter
-`playback
-\family default
- 
-\family typewriter
-geometry.jou
-\family default
-', so you should start with the commands in 
-\family typewriter
-geometry.jou
-\family default
-.
- The first three commands, which define the block shape, are
-\end_layout
-
-\begin_layout LyX-Code
-reset
-\end_layout
-
-\begin_layout LyX-Code
-brick x 6000 y 6000 z 4000
-\end_layout
-
-\begin_layout LyX-Code
-volume 1 move x 0 y 0 z -2000
-\end_layout
-
-\begin_layout Standard
-Continuing through the remainder of the commands in 
-\family typewriter
-geometry.jou
-\family default
-, and then using the additional commands in 
-\family typewriter
-mesh_hex8_1000m.jou
-\family default
-, you will eventually end up with the file 
-\family typewriter
-box_hex8_1000m.exo
-\family default
-, which contains all of the mesh information.
- This information is similar to that included in PyLith mesh ASCII format,
- but the information is contained in an Exodus file, which is a specialized
- netCDF file.
- If you have the 
-\family typewriter
-ncdump
-\family default
- command available, you can see what is in the file by typing:
-\end_layout
-
-\begin_layout LyX-Code
-ncdump box_hex8_1000m.exo
-\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/hex8-mesh.jpg
-	lyxscale 50
-	scale 33
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Mesh composed of trilinear hexahedral cells generated by CUBIT used for
- the suite of example problems.
- The different colors represent the two different materials.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:3dhex8-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 other information.
- As in previous examples, we place this information in 
-\family typewriter
-pylithapp.cfg
-\family default
-.
- Since these examples use a mesh from CUBIT, in this file we set the importer
- to 
-\family typewriter
-MeshIOCubit
-\family default
-:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.mesh_generator]
-\end_layout
-
-\begin_layout LyX-Code
-reader = pylith.meshio.MeshIOCubit
-\begin_inset Newline newline
-\end_inset
-
-
-\begin_inset Newline newline
-\end_inset
-
-
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.mesh_generator.reader]
-\end_layout
-
-\begin_layout LyX-Code
-filename = mesh/box_hex8_1000m.exo
-\end_layout
-
-\begin_layout Standard
-This example differs from some earlier examples, because we specify two
- material groups:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent]
-\end_layout
-
-\begin_layout LyX-Code
-materials = [upper_crust,lower_crust]
-\begin_inset Newline newline
-\end_inset
-
-
-\begin_inset Newline newline
-\end_inset
-
-
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.materials.upper_crust]
-\end_layout
-
-\begin_layout LyX-Code
-label = Upper crust 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.FIATLagrange
-\end_layout
-
-\begin_layout LyX-Code
-quadrature.cell.dimension = 3
-\begin_inset Newline newline
-\end_inset
-
-
-\begin_inset Newline newline
-\end_inset
-
-
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.materials.lower_crust]
-\end_layout
-
-\begin_layout LyX-Code
-label = Lower crust material
-\end_layout
-
-\begin_layout LyX-Code
-id = 2
-\end_layout
-
-\begin_layout LyX-Code
-db.iohandler.filename = spatialdb/mat_elastic.spatialdb
-\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 Standard
-The two material groups correspond to the two different colored regions
- in Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:3dhex8-mesh"
-
-\end_inset
-
-.
- Using two material groups allows us to specify different material types
- or material variations for the upper crust and lower crust, if desired.
- For now, we retain the default 
-\family typewriter
-ElasticIsotropic3D
-\family default
- material type for both materials.
- This behavior will be overridden by example-specific
-\family typewriter
-.cfg
-\family default
- files in some of the examples.
- Although the material groups are specified in 
-\family typewriter
-pylithapp.cfg
-\family default
-, the physical properties for the material models are given in 
-\family typewriter
-spatialdb/mat_elastic.spatialdb
-\family default
-.
- This spatial database provides values at a single point, resulting in uniform
- properties within the material.
-\end_layout
-
-\begin_layout Subsection
-Example Problems
-\end_layout
-
-\begin_layout Standard
-The example problems are divided into categories that roughly correspond
- to simple static problems, quasi-static problems, problems involving fault
- friction, and problems where gravity is used.
- For the most part, each successive example involves just adding or changing
- a few parameters from the previous example.
- For this reason, it is advisable to go through each example in order, starting
- with the simplest (static problems).
-\end_layout
-
-\begin_layout Standard
-\begin_inset CommandInset include
-LatexCommand input
-filename "static/static.lyx"
-
-\end_inset
-
-
-\begin_inset CommandInset include
-LatexCommand input
-filename "quasistatic/quasistatic.lyx"
-
-\end_inset
-
-
-\begin_inset CommandInset include
-LatexCommand input
-filename "friction/friction.lyx"
-
-\end_inset
-
-
-\begin_inset CommandInset include
-LatexCommand input
-filename "gravity/gravity.lyx"
-
-\end_inset
-
-
-\begin_inset CommandInset include
-LatexCommand input
-filename "surfload/surfload.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 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-hex8"
+
+\end_inset
+
+Tutorials Using Hexahedral Mesh Created by CUBIT
+\end_layout
+
+\begin_layout Standard
+PyLith features discussed in this set of tutorials:
+\end_layout
+
+\begin_layout Itemize
+Static solution
+\end_layout
+
+\begin_layout Itemize
+Quasi-static solution
+\end_layout
+
+\begin_layout Itemize
+CUBIT mesh format
+\end_layout
+
+\begin_layout Itemize
+Trilinear hexahedral cells
+\end_layout
+
+\begin_layout Itemize
+VTK output
+\end_layout
+
+\begin_layout Itemize
+HDF5 output
+\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
+ZeroDispDB spatial database
+\end_layout
+
+\begin_layout Itemize
+SimpleDB spatial database
+\end_layout
+
+\begin_layout Itemize
+UniformDB spatial database
+\end_layout
+
+\begin_layout Itemize
+Static fault rupture
+\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
+Linearly elastic isotropic material
+\end_layout
+
+\begin_layout Itemize
+Maxwell linear viscoelastic material
+\end_layout
+
+\begin_layout Itemize
+Generalized 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 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
+Gravitational body forces
+\end_layout
+
+\begin_layout Itemize
+Initial stresses
+\end_layout
+
+\begin_layout Itemize
+Finite strain
+\end_layout
+
+\begin_layout Standard
+All of the files necessary to run the examples are contained in the directory
+ 
+\family typewriter
+examples/3d/hex8
+\family default
+.
+\end_layout
+
+\begin_layout Subsection
+Overview
+\end_layout
+
+\begin_layout Standard
+This tutorial is meant to demonstrate most of the important features of
+ PyLith as a quasi-static finite-element code, using a sequence of example
+ problems.
+ All problems use the same 3D hexahedral mesh generated using the CUBIT
+ 
+\begin_inset Flex URL
+status collapsed
+
+\begin_layout Plain Layout
+
+cubit.sandia.gov
+\end_layout
+
+\end_inset
+
+ mesh generation package.
+ Each example builds on the previous examples, as we demonstrate new features.
+ As in the other examples, the files include extensive comments.
+ We start with the generation of the mesh, which is composed of 144 trilinear
+ hexahedra.
+ The tutorial demonstrates the usage of the CUBIT mesh generation package
+ to create a mesh, as well as describing how to use a CUBIT-generated mesh
+ in PyLith.
+ Following the discussion of how to generate the mesh, we discuss the 
+\family typewriter
+pylithapp.cfg
+\family default
+ file, which contains information common to all the simulations.
+ We group the examples into four sections, each pertaining to a particular
+ set of PyLith features.
+ We suggest users go through each of these sections in order as the complexity
+ increases at each step.
+ 
+\end_layout
+
+\begin_layout Subsection
+Mesh Generation and Description
+\end_layout
+
+\begin_layout Standard
+The mesh for these examples is a simple rectangular solid (Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:3dhex8-mesh"
+
+\end_inset
+
+).
+ Although it would be possible to generate this mesh by hand, it is much
+ simpler to use a mesh generation package, and we use CUBIT for this example.
+ We provide documented journal files in 
+\family typewriter
+examples/3d/hex8/mesh.
+
+\family default
+ Dissection of these journal files should provide some insight into how
+ to use CUBIT with PyLith.
+ For more detailed information on using CUBIT, refer to the CUBIT documentation
+ 
+\begin_inset Flex URL
+status collapsed
+
+\begin_layout Plain Layout
+
+cubit.sandia.gov
+\end_layout
+
+\end_inset
+
+.
+ If you have CUBIT installed on your machine, you can use the journal files
+ to create your own mesh.
+ Otherwise, you can use the mesh that has already been created.
+\end_layout
+
+\begin_layout Standard
+If you are using CUBIT to generate your own mesh, there are two ways to
+ use the journal files.
+ The simplest method is to go to the
+\family sans
+ Tools
+\family default
+ menu, select 
+\family sans
+Play Journal File
+\family default
+, and then select the file 
+\family typewriter
+mesh_hex8_1000m.jou
+\family default
+.
+ This will run the commands in that file as well as the commands in 
+\family typewriter
+geometry.jou
+\family default
+, which is referenced from 
+\family typewriter
+mesh_hex8_1000m.jou
+\family default
+.
+ Prior to doing this, you should set your directory to the one containing
+ the journal files.
+ 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 journal command into the CUBIT
+ command window directly.
+ That way, you will see what each command does.
+ The first command in 
+\family typewriter
+mesh_hex8_1000m.jou
+\family default
+ is 
+\family typewriter
+`playback
+\family default
+ 
+\family typewriter
+geometry.jou
+\family default
+', so you should start with the commands in 
+\family typewriter
+geometry.jou
+\family default
+.
+ The first three commands, which define the block shape, are
+\end_layout
+
+\begin_layout LyX-Code
+reset
+\end_layout
+
+\begin_layout LyX-Code
+brick x 6000 y 6000 z 4000
+\end_layout
+
+\begin_layout LyX-Code
+volume 1 move x 0 y 0 z -2000
+\end_layout
+
+\begin_layout Standard
+Continuing through the remainder of the commands in 
+\family typewriter
+geometry.jou
+\family default
+, and then using the additional commands in 
+\family typewriter
+mesh_hex8_1000m.jou
+\family default
+, you will eventually end up with the file 
+\family typewriter
+box_hex8_1000m.exo
+\family default
+, which contains all of the mesh information.
+ This information is similar to that included in PyLith mesh ASCII format,
+ but the information is contained in an Exodus file, which is a specialized
+ netCDF file.
+ If you have the 
+\family typewriter
+ncdump
+\family default
+ command available, you can see what is in the file by typing:
+\end_layout
+
+\begin_layout LyX-Code
+ncdump box_hex8_1000m.exo
+\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/hex8-mesh.jpg
+	lyxscale 50
+	scale 33
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Mesh composed of trilinear hexahedral cells generated by CUBIT used for
+ the suite of example problems.
+ The different colors represent the two different materials.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:3dhex8-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 other information.
+ As in previous examples, we place this information in 
+\family typewriter
+pylithapp.cfg
+\family default
+.
+ Since these examples use a mesh from CUBIT, in this file we set the importer
+ to 
+\family typewriter
+MeshIOCubit
+\family default
+:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.mesh_generator]
+\end_layout
+
+\begin_layout LyX-Code
+reader = pylith.meshio.MeshIOCubit
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.mesh_generator.reader]
+\end_layout
+
+\begin_layout LyX-Code
+filename = mesh/box_hex8_1000m.exo
+\end_layout
+
+\begin_layout Standard
+This example differs from some earlier examples, because we specify two
+ material groups:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent]
+\end_layout
+
+\begin_layout LyX-Code
+materials = [upper_crust,lower_crust]
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.materials.upper_crust]
+\end_layout
+
+\begin_layout LyX-Code
+label = Upper crust 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.FIATLagrange
+\end_layout
+
+\begin_layout LyX-Code
+quadrature.cell.dimension = 3
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.materials.lower_crust]
+\end_layout
+
+\begin_layout LyX-Code
+label = Lower crust material
+\end_layout
+
+\begin_layout LyX-Code
+id = 2
+\end_layout
+
+\begin_layout LyX-Code
+db.iohandler.filename = spatialdb/mat_elastic.spatialdb
+\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 Standard
+The two material groups correspond to the two different colored regions
+ in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:3dhex8-mesh"
+
+\end_inset
+
+.
+ Using two material groups allows us to specify different material types
+ or material variations for the upper crust and lower crust, if desired.
+ For now, we retain the default 
+\family typewriter
+ElasticIsotropic3D
+\family default
+ material type for both materials.
+ This behavior will be overridden by example-specific
+\family typewriter
+.cfg
+\family default
+ files in some of the examples.
+ Although the material groups are specified in 
+\family typewriter
+pylithapp.cfg
+\family default
+, the physical properties for the material models are given in 
+\family typewriter
+spatialdb/
+\begin_inset Newline linebreak
+\end_inset
+
+mat_elastic.spatialdb
+\family default
+.
+ This spatial database provides values at a single point, resulting in uniform
+ properties within the material.
+\end_layout
+
+\begin_layout Subsection
+Example Problems
+\end_layout
+
+\begin_layout Standard
+The example problems are divided into categories that roughly correspond
+ to simple static problems, quasi-static problems, problems involving fault
+ friction, and problems where gravity is used.
+ For the most part, each successive example involves just adding or changing
+ a few parameters from the previous example.
+ For this reason, it is advisable to go through each example in order, starting
+ with the simplest (static problems).
+\end_layout
+
+\begin_layout Standard
+\begin_inset CommandInset include
+LatexCommand input
+filename "static/static.lyx"
+
+\end_inset
+
+
+\begin_inset CommandInset include
+LatexCommand input
+filename "quasistatic/quasistatic.lyx"
+
+\end_inset
+
+
+\begin_inset CommandInset include
+LatexCommand input
+filename "friction/friction.lyx"
+
+\end_inset
+
+
+\begin_inset CommandInset include
+LatexCommand input
+filename "gravity/gravity.lyx"
+
+\end_inset
+
+
+\begin_inset CommandInset include
+LatexCommand input
+filename "surfload/surfload.lyx"
+
+\end_inset
+
+
+\begin_inset CommandInset include
+LatexCommand input
+filename "dike/dike.lyx"
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document

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

Modified: short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/3dhex8/friction/friction.lyx
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/3dhex8/friction/friction.lyx	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/3dhex8/friction/friction.lyx	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,1192 +1,1218 @@
-#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 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 "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
+
+\size small
+[pylithapp.timedependent.interfaces.fault]
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+# Set rate-and-state parameters using a UniformDB.
+ Set the parameters as
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+# follows:
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+# reference coefficient of friction: 0.6
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+# reference slip rate: 1.0e-06 m/s
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+# slip-weakening parameter: 0.037 m
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+# a: 0.0125
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+# b: 0.0172
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+# cohesion: 0 Pa
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+friction.db_properties = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+friction.db_properties.label = Rate State Ageing
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+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
+
+\size small
+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
+step14
+\family default
+).
+ 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/branches/pylith-scecdynrup/doc/userguide/tutorials/3dhex8/gravity/gravity.lyx
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/3dhex8/gravity/gravity.lyx	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/3dhex8/gravity/gravity.lyx	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,731 +1,731 @@
-#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-gravity"
-
-\end_inset
-
-Gravitational Body Force Examples
-\end_layout
-
-\begin_layout Standard
-PyLith features discussed in this tutorial:
-\end_layout
-
-\begin_layout Itemize
-Gravitational body forces
-\end_layout
-
-\begin_layout Itemize
-Initial stresses
-\end_layout
-
-\begin_layout Itemize
-Finite strain
-\end_layout
-
-\begin_layout Itemize
-Generalized Maxwell linear viscoelastic material
-\end_layout
-
-\begin_layout Subsubsection
-Overview
-\end_layout
-
-\begin_layout Standard
-This set of examples describes a set of problems for PyLith involving gravitatio
-nal body forces.
- All of the examples are quasi-static and run for a time period of 200 years.
- These examples also demonstrate the use of a generalized Maxwell viscoelastic
- material, which is used for the lower crust in all examples.
- The final example (step17) demonstrates the usage of a finite strain formulatio
-n, which automatically invokes 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
-step15.cfg
-\family default
-, 
-\family typewriter
-step16.cfg
-\family default
-, and 
-\family typewriter
-step17.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
-Step15 - Gravitational Body Forces
-\end_layout
-
-\begin_layout Standard
-The 
-\family typewriter
-step15.cfg
-\family default
- file defines a problem with extremely simple Dirichlet boundary conditions.
- On the positive and negative x-faces, the positive and negative y-faces,
- and the negative z-face, the displacements normal to the face are set to
- zero.
- Because all of the materials in the example have the same density, the
- elastic solution for loading via gravitational body forces is
-\begin_inset Formula 
-\begin{equation}
-\sigma_{zz}=\rho gh;\:\sigma_{xx}=\sigma_{yy}=\frac{\nu\rho gh}{1-\nu}\:.\label{eq:1-1}
-\end{equation}
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Standard
-We first set the gravity field, which by default has values of 9.80655 
-\begin_inset Formula $\unitfrac{m}{s^{2}}$
-\end_inset
-
- for acceleration and 
-\begin_inset Formula $\left[0,0,-1\right]$
-\end_inset
-
- for direction:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent]
-\end_layout
-
-\begin_layout LyX-Code
-# Set gravity field (default is None)
-\end_layout
-
-\begin_layout LyX-Code
-gravity_field = spatialdata.spatialdb.GravityField
-\end_layout
-
-\begin_layout Standard
-We use adaptive time stepping, set the simulation time to 200 years, and
- specify a maximum time step size of 10 years:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.implicit]
-\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 200 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 = 200.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
-We use a generalized Maxwell model for the lower crust (see Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sub:Formulation-for-Gen-Max"
-
-\end_inset
-
-), and use a 
-\family typewriter
-SimpleDB
-\family default
- to provide the properties.
- We also request the relevant properties and state variables for output:
-\end_layout
-
-\begin_layout LyX-Code
-# Change material type of lower crust to generalized Maxwell viscoelastic.
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent]
-\end_layout
-
-\begin_layout LyX-Code
-materials.lower_crust = pylith.materials.GenMaxwellIsotropic3D
-\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
-\end_layout
-
-\begin_layout LyX-Code
-# generalized Maxwell 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
-db_properties.iohandler.filename = spatialdb/mat_genmaxwell.spatialdb
-\end_layout
-
-\begin_layout LyX-Code
-output.cell_info_fields = [density,mu,lambda,shear_ratio,maxwell_time]
-\end_layout
-
-\begin_layout LyX-Code
-output.cell_data_fields = [total_strain,stress,viscous_strain_1,viscous_strain_2,
-\begin_inset Newline newline
-\end_inset
-
-viscous_strain_3]
-\end_layout
-
-\begin_layout Standard
-The boundary conditions for this example are trivial, so we are able to
- use the default 
-\family typewriter
-ZeroDispDB
-\family default
- for all faces.
- 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
-step15
-\family default
-).
- Results using ParaView are shown in Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:step15-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/step15-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 step15 at t = 200 years visualized using
- ParaView.
- The z-component of the displacement field is shown with the color contours,
- and the vectors show the computed displacements.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:step15-displ-t200"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection
-Step16 - Gravitational Body Forces with Initial Stresses
-\end_layout
-
-\begin_layout Standard
-The 
-\family typewriter
-step16.cfg
-\family default
- file defines a problem that is identical to example step15, except that
- initial stresses are used to prevent the initial large displacements due
- to 'turning on' gravity.
- Since all normal stress components are given an initial stress of 
-\begin_inset Formula $\rho gh$
-\end_inset
-
-, the initial stress state is lithostatic, which is an appropriate condition
- for many tectonic problems in the absence of tectonic stresses (e.g., McGarr
- 
-\begin_inset CommandInset citation
-LatexCommand cite
-key "McGarr:1988"
-
-\end_inset
-
-).
- When compared to example step15, this example should maintain a lithostatic
- state of stress for the entire simulation, and displacements should remain
- essentially zero.
-\end_layout
-
-\begin_layout Standard
-We set the gravity field, as in example step15, and we again use adaptive
- time stepping with a generalized Maxwell rheology for the lower crust.
- We provide values for the initial stress for both the upper and lower crust.
- Since the materials have the same density, we are able to use the same
- 
-\family typewriter
-SimpleDB
-\family default
- with a linear variation for both (see file 
-\family typewriter
-examples/3d/hex8/spatialdb/initial_stress.spatialdb
-\family default
-):
-\end_layout
-
-\begin_layout LyX-Code
-# We must specify initial stresses for each material.
-\end_layout
-
-\begin_layout LyX-Code
-# We provide a filename for the spatial database that gives the stresses,
-\end_layout
-
-\begin_layout LyX-Code
-# and we change the query_type from the default 'nearest' to 'linear'.
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.materials.upper_crust]
-\end_layout
-
-\begin_layout LyX-Code
-db_initial_stress = spatialdata.spatialdb.SimpleDB
-\end_layout
-
-\begin_layout LyX-Code
-db_initial_stress.iohandler.filename = spatialdb/initial_stress.spatialdb
-\end_layout
-
-\begin_layout LyX-Code
-db_initial_stress.query_type = linear
-\begin_inset Newline newline
-\end_inset
-
-
-\begin_inset Newline newline
-\end_inset
-
-
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.materials.lower_crust]
-\end_layout
-
-\begin_layout LyX-Code
-db_initial_stress = spatialdata.spatialdb.SimpleDB
-\end_layout
-
-\begin_layout LyX-Code
-db_initial_stress.iohandler.filename = spatialdb/initial_stress.spatialdb
-\end_layout
-
-\begin_layout LyX-Code
-db_initial_stress.query_type = linear
-\end_layout
-
-\begin_layout Standard
-Note that we use a 
-\family typewriter
-linear
-\family default
- 
-\family typewriter
-query_type
-\family default
- rather than the default type of 
-\family typewriter
-nearest
-\family default
-, so that a linear interpolation is performed along the z-direction.
- 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
-step16
-\family default
-).
- Results using ParaView are shown in Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:step16-stress_xx-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/step16-stress_xx-t200.jpg
-	lyxscale 50
-	width 10cm
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Stress field (xx-component) for example step16 at t = 200 years visualized
- using ParaView.
- Note that for this example, Stress_xx = Stress_yy = Stress_zz, and there
- is no vertical displacement throughout the simulation.
- Also note that 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:step16-stress_xx-t200"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection
-Step17 - Gravitational Body Forces with Small Strain
-\end_layout
-
-\begin_layout Standard
-The 
-\family typewriter
-step17.cfg
-\family default
- file defines a problem that is identical to example step15, except that
- we now use a small strain formulation (see Section 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "sec:Small-Strain-Formulation"
-
-\end_inset
-
-).
- All of the problems up to this point have assumed infinitesimal strain,
- meaning that the change in shape of the domain during deformation is not
- taken into account.
- In many problems it is important to consider the change in shape of the
- domain.
- This is particularly important in many problems involving gravitational
- body forces, since a change in shape of the domain results in a different
- stress field.
- By examining the stress and deformation fields for this example in comparison
- with those of example step15, we can see what effect the infinitesimal
- strain approximation has on our solution.
-\end_layout
-
-\begin_layout Standard
-We set the gravity field, as in example step15 and again use adaptive time
- stepping withs a generalized Maxwell rheology for the lower crust.
- The only change is that we change the problem formulation from the default
- 
-\family typewriter
-Implicit
-\family default
- to 
-\family typewriter
-ImplicitLgDeform
-\family default
-.
- Since the large deformation formulation is nonlinear, PyLith automatically
- switches the solver from the default 
-\family typewriter
-SolverLinear
-\family default
- to 
-\family typewriter
-SolverNonlinear
-\family default
-.
- It is thus only necessary to change the formulation:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent]
-\end_layout
-
-\begin_layout LyX-Code
-# Set the formulation for finite strain.
- The default solver will
-\end_layout
-
-\begin_layout LyX-Code
-# automatically be switched to the nonlinear solver.
-\end_layout
-
-\begin_layout LyX-Code
-formulation = pylith.problems.ImplicitLgDeform
-\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
-step17
-\family default
-).
- Results using ParaView are shown in Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:step17-disp-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/step17-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 step17 at t = 200 years visualized using
- ParaView.
- The z-component of the displacement field is shown with the color contours,
- and the vectors show the computed displacements.
- Note the larger displacements compared with example step15.
-\begin_inset CommandInset label
-LatexCommand label
-name "fig:step17-disp-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-gravity"
+
+\end_inset
+
+Gravitational Body Force Examples
+\end_layout
+
+\begin_layout Standard
+PyLith features discussed in this tutorial:
+\end_layout
+
+\begin_layout Itemize
+Gravitational body forces
+\end_layout
+
+\begin_layout Itemize
+Initial stresses
+\end_layout
+
+\begin_layout Itemize
+Finite strain
+\end_layout
+
+\begin_layout Itemize
+Generalized Maxwell linear viscoelastic material
+\end_layout
+
+\begin_layout Subsubsection
+Overview
+\end_layout
+
+\begin_layout Standard
+This set of examples describes a set of problems for PyLith involving gravitatio
+nal body forces.
+ All of the examples are quasi-static and run for a time period of 200 years.
+ These examples also demonstrate the use of a generalized Maxwell viscoelastic
+ material, which is used for the lower crust in all examples.
+ The final example (step17) demonstrates the usage of a finite strain formulatio
+n, which automatically invokes 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
+step15.cfg
+\family default
+, 
+\family typewriter
+step16.cfg
+\family default
+, and 
+\family typewriter
+step17.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
+Step15 - Gravitational Body Forces
+\end_layout
+
+\begin_layout Standard
+The 
+\family typewriter
+step15.cfg
+\family default
+ file defines a problem with extremely simple Dirichlet boundary conditions.
+ On the positive and negative x-faces, the positive and negative y-faces,
+ and the negative z-face, the displacements normal to the face are set to
+ zero.
+ Because all of the materials in the example have the same density, the
+ elastic solution for loading via gravitational body forces is
+\begin_inset Formula 
+\begin{equation}
+\sigma_{zz}=\rho gh;\:\sigma_{xx}=\sigma_{yy}=\frac{\nu\rho gh}{1-\nu}\:.\label{eq:1-1}
+\end{equation}
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Standard
+We first set the gravity field, which by default has values of 9.80655 
+\begin_inset Formula $\unitfrac{m}{s^{2}}$
+\end_inset
+
+ for acceleration and 
+\begin_inset Formula $\left[0,0,-1\right]$
+\end_inset
+
+ for direction:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent]
+\end_layout
+
+\begin_layout LyX-Code
+# Set gravity field (default is None)
+\end_layout
+
+\begin_layout LyX-Code
+gravity_field = spatialdata.spatialdb.GravityField
+\end_layout
+
+\begin_layout Standard
+We use adaptive time stepping, set the simulation time to 200 years, and
+ specify a maximum time step size of 10 years:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.implicit]
+\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 200 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 = 200.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
+We use a generalized Maxwell model for the lower crust (see Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sub:Formulation-for-Gen-Max"
+
+\end_inset
+
+), and use a 
+\family typewriter
+SimpleDB
+\family default
+ to provide the properties.
+ We also request the relevant properties and state variables for output:
+\end_layout
+
+\begin_layout LyX-Code
+# Change material type of lower crust to generalized Maxwell viscoelastic.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent]
+\end_layout
+
+\begin_layout LyX-Code
+materials.lower_crust = pylith.materials.GenMaxwellIsotropic3D
+\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
+\end_layout
+
+\begin_layout LyX-Code
+# generalized Maxwell 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
+db_properties.iohandler.filename = spatialdb/mat_genmaxwell.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+output.cell_info_fields = [density,mu,lambda,shear_ratio,maxwell_time]
+\end_layout
+
+\begin_layout LyX-Code
+output.cell_data_fields = [total_strain,stress,viscous_strain_1,viscous_strain_2,
+\begin_inset Newline newline
+\end_inset
+
+viscous_strain_3]
+\end_layout
+
+\begin_layout Standard
+The boundary conditions for this example are trivial, so we are able to
+ use the default 
+\family typewriter
+ZeroDispDB
+\family default
+ for all faces.
+ 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
+step15
+\family default
+).
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step15-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/step15-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 step15 at t = 200 years visualized using
+ ParaView.
+ The z-component of the displacement field is shown with the color contours,
+ and the vectors show the computed displacements.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:step15-displ-t200"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Step16 - Gravitational Body Forces with Initial Stresses
+\end_layout
+
+\begin_layout Standard
+The 
+\family typewriter
+step16.cfg
+\family default
+ file defines a problem that is identical to example step15, except that
+ initial stresses are used to prevent the initial large displacements due
+ to 'turning on' gravity.
+ Since all normal stress components are given an initial stress of 
+\begin_inset Formula $\rho gh$
+\end_inset
+
+, the initial stress state is lithostatic, which is an appropriate condition
+ for many tectonic problems in the absence of tectonic stresses (e.g., McGarr
+ 
+\begin_inset CommandInset citation
+LatexCommand cite
+key "McGarr:1988"
+
+\end_inset
+
+).
+ When compared to example step15, this example should maintain a lithostatic
+ state of stress for the entire simulation, and displacements should remain
+ essentially zero.
+\end_layout
+
+\begin_layout Standard
+We set the gravity field, as in example step15, and we again use adaptive
+ time stepping with a generalized Maxwell rheology for the lower crust.
+ We provide values for the initial stress for both the upper and lower crust.
+ Since the materials have the same density, we are able to use the same
+ 
+\family typewriter
+SimpleDB
+\family default
+ with a linear variation for both (see file 
+\family typewriter
+examples/3d/hex8/spatialdb/initial_stress.spatialdb
+\family default
+):
+\end_layout
+
+\begin_layout LyX-Code
+# We must specify initial stresses for each material.
+\end_layout
+
+\begin_layout LyX-Code
+# We provide a filename for the spatial database that gives the stresses,
+\end_layout
+
+\begin_layout LyX-Code
+# and we change the query_type from the default 'nearest' to 'linear'.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.materials.upper_crust]
+\end_layout
+
+\begin_layout LyX-Code
+db_initial_stress = spatialdata.spatialdb.SimpleDB
+\end_layout
+
+\begin_layout LyX-Code
+db_initial_stress.iohandler.filename = spatialdb/initial_stress.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+db_initial_stress.query_type = linear
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.materials.lower_crust]
+\end_layout
+
+\begin_layout LyX-Code
+db_initial_stress = spatialdata.spatialdb.SimpleDB
+\end_layout
+
+\begin_layout LyX-Code
+db_initial_stress.iohandler.filename = spatialdb/initial_stress.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+db_initial_stress.query_type = linear
+\end_layout
+
+\begin_layout Standard
+Note that we use a 
+\family typewriter
+linear
+\family default
+ 
+\family typewriter
+query_type
+\family default
+ rather than the default type of 
+\family typewriter
+nearest
+\family default
+, so that a linear interpolation is performed along the z-direction.
+ 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
+step16
+\family default
+).
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step16-stress_xx-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/step16-stress_xx-t200.jpg
+	lyxscale 50
+	width 10cm
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Stress field (xx-component) for example step16 at t = 200 years visualized
+ using ParaView.
+ Note that for this example, Stress_xx = Stress_yy = Stress_zz, and there
+ is no vertical displacement throughout the simulation.
+ Also note that the stresses appear as four layers since we have used 
+\family typewriter
+CellFilterAvgMesh
+\family default
+ for material output.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:step16-stress_xx-t200"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Step17 - Gravitational Body Forces with Small Strain
+\end_layout
+
+\begin_layout Standard
+The 
+\family typewriter
+step17.cfg
+\family default
+ file defines a problem that is identical to example step15, except that
+ we now use a small strain formulation (see Section 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "sec:Small-Strain-Formulation"
+
+\end_inset
+
+).
+ All of the problems up to this point have assumed infinitesimal strain,
+ meaning that the change in shape of the domain during deformation is not
+ taken into account.
+ In many problems it is important to consider the change in shape of the
+ domain.
+ This is particularly important in many problems involving gravitational
+ body forces, since a change in shape of the domain results in a different
+ stress field.
+ By examining the stress and deformation fields for this example in comparison
+ with those of example step15, we can see what effect the infinitesimal
+ strain approximation has on our solution.
+\end_layout
+
+\begin_layout Standard
+We set the gravity field, as in example step15 and again use adaptive time
+ stepping withs a generalized Maxwell rheology for the lower crust.
+ The only change is that we change the problem formulation from the default
+ 
+\family typewriter
+Implicit
+\family default
+ to 
+\family typewriter
+ImplicitLgDeform
+\family default
+.
+ Since the large deformation formulation is nonlinear, PyLith automatically
+ switches the solver from the default 
+\family typewriter
+SolverLinear
+\family default
+ to 
+\family typewriter
+SolverNonlinear
+\family default
+.
+ It is thus only necessary to change the formulation:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent]
+\end_layout
+
+\begin_layout LyX-Code
+# Set the formulation for finite strain.
+ The default solver will
+\end_layout
+
+\begin_layout LyX-Code
+# automatically be switched to the nonlinear solver.
+\end_layout
+
+\begin_layout LyX-Code
+formulation = pylith.problems.ImplicitLgDeform
+\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
+step17
+\family default
+).
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step17-disp-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/step17-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 step17 at t = 200 years visualized using
+ ParaView.
+ The z-component of the displacement field is shown with the color contours,
+ and the vectors show the computed displacements.
+ Note the larger displacements compared with example step15.
+\begin_inset CommandInset label
+LatexCommand label
+name "fig:step17-disp-t200"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document

Modified: short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/3dhex8/quasistatic/quasistatic.lyx
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/3dhex8/quasistatic/quasistatic.lyx	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/3dhex8/quasistatic/quasistatic.lyx	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,2492 +1,2520 @@
-#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,
+\begin_inset Newline newline
+\end_inset
+
+traction-rate-normal,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 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 
+\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 step06, 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 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.
+\begin_inset Newline linebreak
+\end_inset
+
+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 
+\family typewriter
+powerlaw_gendb.cfg
+\family default
+ 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
+
+\size small
+# Provide the values to be obtained from each database and the database
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+# name.
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+[pylithapp.timedependent.materials.lower_crust.db_properties]
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+values_A = [density,vs,vp]   ; Elastic properties.
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+db_A.label = Elastic properties
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+db_A.iohandler.filename = spatialdb/mat_elastic.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+values_B = [reference-stress,reference-strain-rate,power-law-exponent] 
+  ; Power-law properties.
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+db_B.label = Power-law properties
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+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 
+\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 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

Modified: short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/3dhex8/static/static.lyx
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/3dhex8/static/static.lyx	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/3dhex8/static/static.lyx	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,869 +1,872 @@
-#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-static"
-
-\end_inset
-
-Static Examples
-\end_layout
-
-\begin_layout Standard
-PyLith features discussed in this tutorial:
-\end_layout
-
-\begin_layout Itemize
-Static solution
-\end_layout
-
-\begin_layout Itemize
-VTK output
-\end_layout
-
-\begin_layout Itemize
-Dirichlet displacement boundary conditions
-\end_layout
-
-\begin_layout Itemize
-Neumann traction 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
-Static fault rupture
-\end_layout
-
-\begin_layout Itemize
-Specifying more than one material
-\end_layout
-
-\begin_layout Itemize
-Linearly elastic isotropic material
-\end_layout
-
-\begin_layout Subsubsection
-Overview
-\end_layout
-
-\begin_layout Standard
-This set of examples describe the simplest class of problems for PyLith.
- The problems are all purely elastic, and there is no time-dependence.
- This set of elastostatic examples primarily demonstrates the application
- of different types of boundary conditions in PyLith, as well as demonstrating
- the use of a kinematic fault for a 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
-step01.cfg
-\family default
-, 
-\family typewriter
-step02.cfg
-\family default
-, and 
-\family typewriter
-step03.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
-Step01 - Pure Dirichlet Boundary Conditions
-\end_layout
-
-\begin_layout Standard
-The 
-\family typewriter
-step01.cfg
-\family default
- file defines a problem with pure Dirichlet (displacement) boundary conditions
- corresponding to compression in the x-direction and shear in the y-direction.
- The bottom (minimum z) boundary is held fixed in the z-direction.
- On the positive and negative x-faces, compressional displacements of 1
- m are applied in the x-direction and shear displacements yielding a left-latera
-l sense of shear are applied in the y-direction.
- In this example and in subsequent examples we would like to output the
- displacement solution over a subset of the domain corresponding to the
- ground surface.
- To do this, we first set the output to an array of two output managers
- as follows:
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.implicit]
-\end_layout
-
-\begin_layout LyX-Code
-# Set the output to an array of 2 output managers.
-\end_layout
-
-\begin_layout LyX-Code
-# We will output the solution over the domain and the ground surface.
-\end_layout
-
-\begin_layout LyX-Code
-output = [domain,subdomain]
-\end_layout
-
-\begin_layout Standard
-We then define the subdomain output manager to correspond to a subset of
- the domain:
-\end_layout
-
-\begin_layout LyX-Code
-# Set subdomain component to OutputSolnSubset (boundary of the domain).
-\end_layout
-
-\begin_layout LyX-Code
-output.subdomain = pylith.meshio.OutputSolnSubset
-\end_layout
-
-\begin_layout Standard
-Later (in the output section at the end of the file), we specify the nodeset
- that corresponds to the desired output:
-\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
-writer.filename = output/step01-groundsurf.vtk
-\end_layout
-
-\begin_layout Standard
-For the boundary conditions, we must describe which degrees of freedom are
- being constrained (
-\family typewriter
-bc_dof
-\family default
-), we must provide a the label associated with the CUBIT nodeset associated
- with the BC, and we must specify the type of spatial database is being
- used to describe the boundary conditions.
- For the x-faces, we use a 
-\family typewriter
-SimpleDB
-\family default
- to provide the displacements on the x-faces:
-\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.SimpleDB
-\end_layout
-
-\begin_layout LyX-Code
-db_initial.label = Dirichlet BC on +x
-\end_layout
-
-\begin_layout LyX-Code
-db_initial.iohandler.filename = spatialdb/fixeddisp_axial_shear.spatialdb
-\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 = spatialdata.spatialdb.SimpleDB
-\end_layout
-
-\begin_layout LyX-Code
-db_initial.label = Dirichlet BC on -x
-\end_layout
-
-\begin_layout LyX-Code
-db_initial.iohandler.filename = spatialdb/fixeddisp_axial_shear.spatialdb
-\end_layout
-
-\begin_layout Standard
-For a 
-\family typewriter
-SimpleDB
-\family default
-, we must provide a filename.
- The default spatial database for 
-\family typewriter
-db_initial
-\family default
- is 
-\family typewriter
-ZeroDispBC
-\family default
-, which automatically applies zero displacements to all vertices in the
- nodeset, and no filename is required (or needed).
- This is what we use for the bottom of the mesh:
-\end_layout
-
-\begin_layout LyX-Code
-# -z face
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.bc.z_neg]
-\end_layout
-
-\begin_layout LyX-Code
-bc_dof = [2]
-\end_layout
-
-\begin_layout LyX-Code
-label = face_zneg
-\end_layout
-
-\begin_layout LyX-Code
-db_initial.label = Dirichlet BC on -z
-\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
-step01
-\family default
-).
- Results using ParaView are shown in Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:step01-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/step01-displ.jpg
-	width 10cm
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Plain Layout
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Displacement field for example step01 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:step01-displ"
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection
-Step02 - Dirichlet and Neumann Boundary Conditions
-\end_layout
-
-\begin_layout Standard
-The 
-\family typewriter
-step02.cfg
-\family default
- file defines a problem with Dirichlet (displacement) boundary conditions
- corresponding to zero x and y-displacements applied on the negative x-face
- and Neumann (traction) boundary conditions corresponding to normal compression
- and horizontal shear applied on the positive x-face.
- The bottom (negative z) boundary is held fixed in the z-direction.
- The problem is similar to example step01, except that 1 MPa of normal compressi
-on and 1 MPa of shear (in a left-lateral sense) are applied on the positive
- x-face, and the negative x-face is pinned in both the x and y-directions.
-\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 use a 
-\family typewriter
-SimpleDB
-\family default
- to describe the traction boundary conditions.
- When applying traction boundary conditions over a surface, it is also necessary
- to specify integration information for the surface.
- Since this is a three-dimensional problem, the dimension of the surface
- is 2.
- Since the cells being used are trilinear hexahedra, the cell type is 
-\family typewriter
-FIATLagrange
-\family default
- and we use an integration order of 2.
- A lower integration order would not provide sufficient accuracy while a
- higher integration order would offer no benefit (while requiring more computati
-on time and storage):
-\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
-label = face_xpos
-\end_layout
-
-\begin_layout LyX-Code
-db_initial = spatialdata.spatialdb.SimpleDB
-\end_layout
-
-\begin_layout LyX-Code
-db_initial.label = Neumann BC on +x
-\end_layout
-
-\begin_layout LyX-Code
-db_initial.iohandler.filename = spatialdb/tractions_axial_shear.spatialdb
-\begin_inset Newline newline
-\end_inset
-
-
-\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 
-\end_layout
-
-\begin_layout Standard
-The boundary conditions on the negative x-face are simpler than they were
- in example step01 (zero displacements in the x and y-directions), so we
- can use the default 
-\family typewriter
-ZeroDispBC
-\family default
-:
-\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 Standard
-The boundary conditions on the negative z-face are supplied in the same
- manner as for example step01.
- 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
-step02
-\family default
-).
- Results using ParaView are shown in Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:step02-displ"
-
-\end_inset
-
-.
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/step02-displ.jpg
-	lyxscale 50
-	width 10cm
-
-\end_inset
-
-
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Displacement field for example step02 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:step02-displ"
-
-\end_inset
-
-.
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\end_inset
-
-
-\end_layout
-
-\begin_layout Subsubsection
-Step03 - Dirichlet Boundary Conditions with Kinematic Fault Slip
-\end_layout
-
-\begin_layout Standard
-The 
-\family typewriter
-step03.cfg
-\family default
- file describes 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 with a combination of left-lateral
- and updip motion.
- The left-lateral component of fault slip has a constant value of 2 m in
- the upper crust, and then decreases linearly to zero at the base of the
- model.
- The reverse slip component has a value of 0.25 m at the surface, and then
- decreases linearly to zero at 2 km depth.
-\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.
- To use a fault, we must first define a fault interface.
- We do this by providing an array containing a single interface:
-\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
-For this example we specify the fault slip, so we set the interface type
- to 
-\family typewriter
-FaultCohesiveKin
-\family default
-:
-\end_layout
-
-\begin_layout LyX-Code
-# Set the type of fault interface condition.
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.interfaces]
-\end_layout
-
-\begin_layout LyX-Code
-fault = pylith.faults.FaultCohesiveKin 
-\end_layout
-
-\begin_layout Standard
-We must then identify the nodeset corresponding to the fault, and provide
- integration information for the fault surface:
-\end_layout
-
-\begin_layout LyX-Code
-# Set the parameters for the fault interface condition.
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.timedependent.interfaces.fault]
-\end_layout
-
-\begin_layout LyX-Code
-# The label corresponds to the name of the nodeset in CUBIT.
-\end_layout
-
-\begin_layout LyX-Code
-label = fault
-\begin_inset Newline newline
-\end_inset
-
-
-\begin_inset Newline newline
-\end_inset
-
-
-\end_layout
-
-\begin_layout LyX-Code
-# We must define the quadrature information for fault cells.
-\end_layout
-
-\begin_layout LyX-Code
-# The fault cells are 2D (surface).
-\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
-We retain the default 
-\family typewriter
-StepSlipFn
-\family default
- since we want static fault slip.
- Finally, we use one 
-\family typewriter
-SimpleDB
-\family default
- to define the spatial variation of fault slip, and another 
-\family typewriter
-SimpleDB
-\family default
- to define the spatial variation in slip initiation times (the start time
- is 0.0 everywhere since this is a static problem):
-\end_layout
-
-\begin_layout LyX-Code
-# The slip time and final slip are defined in spatial databases.
- [pylithapp.timedependent.interfaces.fault.eq_srcs.rupture.slip_function]
-\end_layout
-
-\begin_layout LyX-Code
-slip.iohandler.filename = spatialdb/finalslip.spatialdb
-\end_layout
-
-\begin_layout LyX-Code
-slip.query_type = linear
-\end_layout
-
-\begin_layout LyX-Code
-slip_time.iohandler.filename = spatialdb/sliptime.spatialdb 
-\end_layout
-
-\begin_layout Standard
-Since the problem now contains a fault, we can request that fault infomation
- is also output:
-\end_layout
-
-\begin_layout LyX-Code
-# Give basename for VTK fault output.
-\end_layout
-
-\begin_layout LyX-Code
-[pylithapp.problem.interfaces.fault.output]
-\end_layout
-
-\begin_layout LyX-Code
-writer.filename = output/step03-fault.vtk 
-\end_layout
-
-\begin_layout Standard
-This will result in two extra files being produced.
- The first file (
-\family typewriter
-step03-fault_info.vtk
-\family default
-) contains information such as the normal directions to the fault surface,
- the applied fault slip, and the fault slip times.
- The second file (
-\family typewriter
-step03-fault_t0000000.vtk
-\family default
-) contains the cumulative fault slip for the time step and the change in
- tractions on the fault surface due to the slip.
- 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
-step03
-\family default
-).
- Results using ParaView are shown in Figure 
-\begin_inset CommandInset ref
-LatexCommand ref
-reference "fig:step03-displ"
-
-\end_inset
-
-.
-\begin_inset Float figure
-wide false
-sideways false
-status open
-
-\begin_layout Plain Layout
-\align center
-\begin_inset Graphics
-	filename figs/step03-displ.jpg
-	lyxscale 50
-	width 10cm
-
-\end_inset
-
-
-\begin_inset Caption
-
-\begin_layout Plain Layout
-Displacement field for example step03 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:step03-displ"
-
-\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-static"
+
+\end_inset
+
+Static Examples
+\end_layout
+
+\begin_layout Standard
+PyLith features discussed in this tutorial:
+\end_layout
+
+\begin_layout Itemize
+Static solution
+\end_layout
+
+\begin_layout Itemize
+VTK output
+\end_layout
+
+\begin_layout Itemize
+Dirichlet displacement boundary conditions
+\end_layout
+
+\begin_layout Itemize
+Neumann traction 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
+Static fault rupture
+\end_layout
+
+\begin_layout Itemize
+Specifying more than one material
+\end_layout
+
+\begin_layout Itemize
+Linearly elastic isotropic material
+\end_layout
+
+\begin_layout Subsubsection
+Overview
+\end_layout
+
+\begin_layout Standard
+This set of examples describe the simplest class of problems for PyLith.
+ The problems are all purely elastic, and there is no time-dependence.
+ This set of elastostatic examples primarily demonstrates the application
+ of different types of boundary conditions in PyLith, as well as demonstrating
+ the use of a kinematic fault for a 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
+step01.cfg
+\family default
+, 
+\family typewriter
+step02.cfg
+\family default
+, and 
+\family typewriter
+step03.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
+Step01 - Pure Dirichlet Boundary Conditions
+\end_layout
+
+\begin_layout Standard
+The 
+\family typewriter
+step01.cfg
+\family default
+ file defines a problem with pure Dirichlet (displacement) boundary conditions
+ corresponding to compression in the x-direction and shear in the y-direction.
+ The bottom (minimum z) boundary is held fixed in the z-direction.
+ On the positive and negative x-faces, compressional displacements of 1
+ m are applied in the x-direction and shear displacements yielding a left-latera
+l sense of shear are applied in the y-direction.
+ In this example and in subsequent examples we would like to output the
+ displacement solution over a subset of the domain corresponding to the
+ ground surface.
+ To do this, we first set the output to an array of two output managers
+ as follows:
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.implicit]
+\end_layout
+
+\begin_layout LyX-Code
+# Set the output to an array of 2 output managers.
+\end_layout
+
+\begin_layout LyX-Code
+# We will output the solution over the domain and the ground surface.
+\end_layout
+
+\begin_layout LyX-Code
+output = [domain,subdomain]
+\end_layout
+
+\begin_layout Standard
+We then define the subdomain output manager to correspond to a subset of
+ the domain:
+\end_layout
+
+\begin_layout LyX-Code
+# Set subdomain component to OutputSolnSubset (boundary of the domain).
+\end_layout
+
+\begin_layout LyX-Code
+output.subdomain = pylith.meshio.OutputSolnSubset
+\end_layout
+
+\begin_layout Standard
+Later (in the output section at the end of the file), we specify the nodeset
+ that corresponds to the desired output:
+\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
+writer.filename = output/step01-groundsurf.vtk
+\end_layout
+
+\begin_layout Standard
+For the boundary conditions, we must describe which degrees of freedom are
+ being constrained (
+\family typewriter
+bc_dof
+\family default
+), we must provide a the label associated with the CUBIT nodeset associated
+ with the BC, and we must specify the type of spatial database is being
+ used to describe the boundary conditions.
+ For the x-faces, we use a 
+\family typewriter
+SimpleDB
+\family default
+ to provide the displacements on the x-faces:
+\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.SimpleDB
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.label = Dirichlet BC on +x
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.iohandler.filename = spatialdb/fixeddisp_axial_shear.spatialdb
+\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 = spatialdata.spatialdb.SimpleDB
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.label = Dirichlet BC on -x
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.iohandler.filename = spatialdb/fixeddisp_axial_shear.spatialdb
+\end_layout
+
+\begin_layout Standard
+For a 
+\family typewriter
+SimpleDB
+\family default
+, we must provide a filename.
+ The default spatial database for 
+\family typewriter
+db_initial
+\family default
+ is 
+\family typewriter
+ZeroDispBC
+\family default
+, which automatically applies zero displacements to all vertices in the
+ nodeset, and no filename is required (or needed).
+ This is what we use for the bottom of the mesh:
+\end_layout
+
+\begin_layout LyX-Code
+# -z face
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.bc.z_neg]
+\end_layout
+
+\begin_layout LyX-Code
+bc_dof = [2]
+\end_layout
+
+\begin_layout LyX-Code
+label = face_zneg
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.label = Dirichlet BC on -z
+\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
+step01
+\family default
+).
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step01-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/step01-displ.jpg
+	width 10cm
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Plain Layout
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Displacement field for example step01 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:step01-displ"
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Step02 - Dirichlet and Neumann Boundary Conditions
+\end_layout
+
+\begin_layout Standard
+The 
+\family typewriter
+step02.cfg
+\family default
+ file defines a problem with Dirichlet (displacement) boundary conditions
+ corresponding to zero x and y-displacements applied on the negative x-face
+ and Neumann (traction) boundary conditions corresponding to normal compression
+ and horizontal shear applied on the positive x-face.
+ The bottom (negative z) boundary is held fixed in the z-direction.
+ The problem is similar to example step01, except that 1 MPa of normal compressi
+on and 1 MPa of shear (in a left-lateral sense) are applied on the positive
+ x-face, and the negative x-face is pinned in both the x and y-directions.
+\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 use a 
+\family typewriter
+SimpleDB
+\family default
+ to describe the traction boundary conditions.
+ When applying traction boundary conditions over a surface, it is also necessary
+ to specify integration information for the surface.
+ Since this is a three-dimensional problem, the dimension of the surface
+ is 2.
+ Since the cells being used are trilinear hexahedra, the cell type is 
+\family typewriter
+FIATLagrange
+\family default
+ and we use an integration order of 2.
+ A lower integration order would not provide sufficient accuracy while a
+ higher integration order would offer no benefit (while requiring more computati
+on time and storage):
+\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
+label = face_xpos
+\end_layout
+
+\begin_layout LyX-Code
+db_initial = spatialdata.spatialdb.SimpleDB
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.label = Neumann BC on +x
+\end_layout
+
+\begin_layout LyX-Code
+db_initial.iohandler.filename = spatialdb/tractions_axial_shear.spatialdb
+\begin_inset Newline newline
+\end_inset
+
+
+\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 
+\end_layout
+
+\begin_layout Standard
+The boundary conditions on the negative x-face are simpler than they were
+ in example step01 (zero displacements in the x and y-directions), so we
+ can use the default 
+\family typewriter
+ZeroDispBC
+\family default
+:
+\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 Standard
+The boundary conditions on the negative z-face are supplied in the same
+ manner as for example step01.
+ 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
+step02
+\family default
+).
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step02-displ"
+
+\end_inset
+
+.
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step02-displ.jpg
+	lyxscale 50
+	width 10cm
+
+\end_inset
+
+
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Displacement field for example step02 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:step02-displ"
+
+\end_inset
+
+.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\begin_layout Subsubsection
+Step03 - Dirichlet Boundary Conditions with Kinematic Fault Slip
+\end_layout
+
+\begin_layout Standard
+The 
+\family typewriter
+step03.cfg
+\family default
+ file describes 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 with a combination of left-lateral
+ and updip motion.
+ The left-lateral component of fault slip has a constant value of 2 m in
+ the upper crust, and then decreases linearly to zero at the base of the
+ model.
+ The reverse slip component has a value of 0.25 m at the surface, and then
+ decreases linearly to zero at 2 km depth.
+\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.
+ To use a fault, we must first define a fault interface.
+ We do this by providing an array containing a single interface:
+\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
+For this example we specify the fault slip, so we set the interface type
+ to 
+\family typewriter
+FaultCohesiveKin
+\family default
+:
+\end_layout
+
+\begin_layout LyX-Code
+# Set the type of fault interface condition.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces]
+\end_layout
+
+\begin_layout LyX-Code
+fault = pylith.faults.FaultCohesiveKin 
+\end_layout
+
+\begin_layout Standard
+We must then identify the nodeset corresponding to the fault, and provide
+ integration information for the fault surface:
+\end_layout
+
+\begin_layout LyX-Code
+# Set the parameters for the fault interface condition.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.timedependent.interfaces.fault]
+\end_layout
+
+\begin_layout LyX-Code
+# The label corresponds to the name of the nodeset in CUBIT.
+\end_layout
+
+\begin_layout LyX-Code
+label = fault
+\begin_inset Newline newline
+\end_inset
+
+
+\begin_inset Newline newline
+\end_inset
+
+
+\end_layout
+
+\begin_layout LyX-Code
+# We must define the quadrature information for fault cells.
+\end_layout
+
+\begin_layout LyX-Code
+# The fault cells are 2D (surface).
+\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
+We retain the default 
+\family typewriter
+StepSlipFn
+\family default
+ since we want static fault slip.
+ Finally, we use one 
+\family typewriter
+SimpleDB
+\family default
+ to define the spatial variation of fault slip, and another 
+\family typewriter
+SimpleDB
+\family default
+ to define the spatial variation in slip initiation times (the start time
+ is 0.0 everywhere since this is a static problem):
+\end_layout
+
+\begin_layout LyX-Code
+# The slip time and final slip are defined in spatial databases.
+\begin_inset Newline newline
+\end_inset
+
+[pylithapp.timedependent.interfaces.fault.eq_srcs.rupture.slip_function]
+\begin_inset Newline newline
+\end_inset
+
+slip.iohandler.filename = spatialdb/finalslip.spatialdb
+\end_layout
+
+\begin_layout LyX-Code
+slip.query_type = linear
+\end_layout
+
+\begin_layout LyX-Code
+slip_time.iohandler.filename = spatialdb/sliptime.spatialdb 
+\end_layout
+
+\begin_layout Standard
+Since the problem now contains a fault, we can request that fault infomation
+ is also output:
+\end_layout
+
+\begin_layout LyX-Code
+# Give basename for VTK fault output.
+\end_layout
+
+\begin_layout LyX-Code
+[pylithapp.problem.interfaces.fault.output]
+\end_layout
+
+\begin_layout LyX-Code
+writer.filename = output/step03-fault.vtk 
+\end_layout
+
+\begin_layout Standard
+This will result in two extra files being produced.
+ The first file (
+\family typewriter
+step03-fault_info.vtk
+\family default
+) contains information such as the normal directions to the fault surface,
+ the applied fault slip, and the fault slip times.
+ The second file (
+\family typewriter
+step03-fault_t0000000.vtk
+\family default
+) contains the cumulative fault slip for the time step and the change in
+ tractions on the fault surface due to the slip.
+ 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
+step03
+\family default
+).
+ Results using ParaView are shown in Figure 
+\begin_inset CommandInset ref
+LatexCommand ref
+reference "fig:step03-displ"
+
+\end_inset
+
+.
+\begin_inset Float figure
+wide false
+sideways false
+status open
+
+\begin_layout Plain Layout
+\align center
+\begin_inset Graphics
+	filename figs/step03-displ.jpg
+	lyxscale 50
+	width 10cm
+
+\end_inset
+
+
+\begin_inset Caption
+
+\begin_layout Plain Layout
+Displacement field for example step03 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:step03-displ"
+
+\end_inset
+
+.
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_inset
+
+
+\end_layout
+
+\end_body
+\end_document

Modified: short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/3dhex8/surfload/surfload.lyx
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/3dhex8/surfload/surfload.lyx	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/3dhex8/surfload/surfload.lyx	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,530 +1,559 @@
-#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
+step18
+\family default
+).
+ 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
+step19
+\family default
+).
+ 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 step19 at t = 200 years visualized
+ using ParaView.
+ The stresses appear as four 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/branches/pylith-scecdynrup/doc/userguide/tutorials/3dtet4/3dtet4.lyx
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/3dtet4/3dtet4.lyx	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/3dtet4/3dtet4.lyx	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,1954 +1,1962 @@
-#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
+
+\begin_inset Newline linebreak
+\end_inset
+
+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
+MeshIOLagrit
+\family default
+:
+\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 
+\begin_inset Newline linebreak
+\end_inset
+
+(
+\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
+tet4_1000m_binary.gmv, tet4_1000m_binary.pset, 
+\begin_inset Newline linebreak
+\end_inset
+
+pylithapp.cfg, mat_elastic.spatialdb, and mat_viscoelastic.spatialdb
+\family default
+) along with the problem-specific files (
+\family typewriter
+step01.cfg 
+\family default
+and
+\family typewriter
+ fixeddisp_shear.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 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
+
+\begin_inset Newline linebreak
+\end_inset
+
+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 
+\begin_inset Newline linebreak
+\end_inset
+
+(
+\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 
+\begin_inset Newline linebreak
+\end_inset
+
+(
+\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
+
+\begin_inset Newline linebreak
+\end_inset
+
+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/branches/pylith-scecdynrup/doc/userguide/tutorials/greensfns2d (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/doc/userguide/tutorials/greensfns2d)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/shearwave/hex8.lyx
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/shearwave/hex8.lyx	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/shearwave/hex8.lyx	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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
+
+3D 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/branches/pylith-scecdynrup/doc/userguide/tutorials/shearwave/quad4.lyx
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/shearwave/quad4.lyx	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/shearwave/quad4.lyx	2012-11-01 17:04:11 UTC (rev 20976)
@@ -74,7 +74,7 @@
 
 \end_inset
 
-3-D Bar Discretized with Quadrilaterals
+3D Bar Discretized with Quadrilaterals
 \end_layout
 
 \begin_layout Standard
@@ -137,7 +137,7 @@
 \end_layout
 
 \begin_layout Standard
-The mesh is a simple rectangular prism 8 km by 400 m by 400m (Figure 
+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"
@@ -217,20 +217,21 @@
 .cfg
 \family default
  files.
- The parameters common parameters are placed in 
+ The common parameters are placed in 
 \family typewriter
 pylithapp.cfg
 \family default
- with the parameters specific to the kinematic fault example in 
+ with the parameters specific to the kinematic fault (prescribed rupture)
+ example in 
 \family typewriter
-kinematic.cfg
+prescribedrup.cfg
 \family default
 .
  To run the problem, simply run PyLith via:
 \end_layout
 
 \begin_layout LyX-Code
-pylith kinematic.cfg
+pylith prescribedrup.cfg
 \end_layout
 
 \begin_layout Standard
@@ -240,7 +241,7 @@
 \family default
  directory with the prefix 
 \family typewriter
-kinematic
+prescribedrup
 \family default
 .
  The output includes the displacement field over the entire domain at every
@@ -329,10 +330,9 @@
  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
+spontaneousrup.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
@@ -368,13 +368,13 @@
  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
+spontaneousrup_staticfriction.cfg
 \family default
 , so we run the problem via:
 \end_layout
 
 \begin_layout LyX-Code
-pylith dynamic.cfg dynamic_staticfriction.cfg
+pylith spontaneousrup.cfg spontaneousrup_staticfriction.cfg
 \end_layout
 
 \begin_layout Standard
@@ -513,7 +513,7 @@
 \end_layout
 
 \begin_layout LyX-Code
-pylith dynamic.cfg dynamic_slipweakening.cfg
+pylith spontaneousrup.cfg spontaneousrup_slipweakening.cfg
 \end_layout
 
 \begin_layout Standard
@@ -626,7 +626,7 @@
 \end_layout
 
 \begin_layout LyX-Code
-pylith dynamic.cfg dynamic_ratestateageing.cfg
+pylith spontaneousrup.cfg spontaneousrup_ratestateageing.cfg
 \end_layout
 
 \begin_layout Standard

Modified: short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/shearwave/shearwave.lyx
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/shearwave/shearwave.lyx	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/shearwave/shearwave.lyx	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/doc/userguide/tutorials/shearwave/tet4.lyx
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/shearwave/tet4.lyx	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/shearwave/tet4.lyx	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/doc/userguide/tutorials/shearwave/tri3.lyx
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/shearwave/tri3.lyx	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/shearwave/tri3.lyx	2012-11-01 17:04:11 UTC (rev 20976)
@@ -74,7 +74,7 @@
 
 \end_inset
 
-2-D Bar Discretized with Triangles
+2D Bar Discretized with Triangles
 \end_layout
 
 \begin_layout Standard
@@ -145,7 +145,7 @@
 
 \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
+ then create blocks and nodesets to associate the cells and vertices with
  materials and boundary conditions.
  See Section 
 \begin_inset CommandInset ref
@@ -207,14 +207,18 @@
 \end_layout
 
 \begin_layout Standard
-All of the parameters are set in the pylithapp.cfg file.
+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
+ time stepping to explicit time stepping with a lumped Jacobian matrix by
+ setting the formulation object via
 \end_layout
 
 \begin_layout LyX-Code
@@ -222,14 +226,12 @@
 \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
+Using the Explicit 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.
+ Use of this simple solver is also triggered by the selection of any of
+ the Explicit formulation objects.
  
 \end_layout
 

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

Modified: short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/subduction/subduction.lyx
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/subduction/subduction.lyx	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/subduction/subduction.lyx	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,1073 +1,1293 @@
-#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.
+\begin_inset Newline linebreak
+\end_inset
+
+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 in 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/branches/pylith-scecdynrup/doc/userguide/tutorials/tutorials.lyx
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/tutorials.lyx	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/tutorials.lyx	2012-11-01 17:04:11 UTC (rev 20976)
@@ -256,30 +256,45 @@
 \end_inset
 
 
+\begin_inset CommandInset include
+LatexCommand input
+filename "greensfns2d/greensfns2d.lyx"
+
+\end_inset
+
+
 \end_layout
 
 \begin_layout Section
 Additional Examples
 \end_layout
 
+\begin_layout Subsection
+CUBIT Meshing Examples
+\end_layout
+
 \begin_layout Standard
-The 
+The directory 
 \family typewriter
-examples
+examples/meshing
 \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 
+ contains several examples of using CUBIT to construct finite-element meshes
+ for complex geometry.
+ This includes features such as constructing nonplanar fault geometry from
+ contours, constructing topography from a DEM, and merging sheet bodies
+ (surfaces).
+ A separate examples discusses defining the discretization size using a
+ vertex field in an Exodus-II file.
+ See 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.
+README files in the subdirectories for more detailed descriptions of these
+ examples.
 \end_layout
 
+\begin_layout Subsection
+Code Verification Benchmarks
+\end_layout
+
 \begin_layout Standard
 The CIG subversion software repository 
 \begin_inset Flex URL
@@ -293,8 +308,8 @@
 \end_inset
 
  contains input files for a number of community benchmarks.
- Most of the benchmarks include complete sets of PyLith input files.
- Some of the dynamic benchmarks do not include the mesh files because they
+ Some of the benchmarks include complete sets of PyLith input files.
+ However, most of the benchmarks do not include the mesh files because they
  are so large; instead they include the CUBIT journal files that can be
  used to generate the meshes.
 \end_layout

Modified: short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/twohex8/twohex8.lyx
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/twohex8/twohex8.lyx	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/twohex8/twohex8.lyx	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,855 +1,876 @@
-#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
+
+\size small
+[pylithapp.timedependent.materials]
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+material = pylith.materials.MaxwellIsotropic3D
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+[pylithapp.timedependent.materials.material]
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+label = viscoelastic material
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+id = 1
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+db = spatialdata.spatialdb.UniformDB
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+db.values = [vp,vs,density,viscosity]
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+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
+
+\size small
+ 
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+quadrature.cell = pylith.feassemble.FIATLagrange
+\end_layout
+
+\begin_layout LyX-Code
+
+\size small
+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
+twohex8.mesh,
+\family default
+\size small
+ 
+\family typewriter
+
+\begin_inset Newline linebreak
+\end_inset
+
+
+\size default
+pylithapp.cfg
+\family default
+) along with the problem-specific files (
+\family typewriter
+dislocation.cfg, dislocation_slip.spatialdb, dislocation_sliptime.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 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/branches/pylith-scecdynrup/doc/userguide/tutorials/twoquad4/twoquad4.lyx
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/twoquad4/twoquad4.lyx	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/twoquad4/twoquad4.lyx	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,1001 +1,1009 @@
-#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_pos
+\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 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
+
+\begin_inset Newline linebreak
+\end_inset
+
+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
+
+\begin_inset Newline linebreak
+\end_inset
+
+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/branches/pylith-scecdynrup/doc/userguide/tutorials/twotet4/twotet4.lyx
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/twotet4/twotet4.lyx	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/twotet4/twotet4.lyx	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,549 +1,543 @@
-#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
+dislocation.cfg, dislocation_slip.spatialdb, 
+\begin_inset Newline linebreak
+\end_inset
+
+dislocation_sliptime.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 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/branches/pylith-scecdynrup/doc/userguide/tutorials/twotet4-geoproj/twotet4-geoproj.lyx
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/twotet4-geoproj/twotet4-geoproj.lyx	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/twotet4-geoproj/twotet4-geoproj.lyx	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,577 +1,571 @@
-#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
+
+\begin_inset Newline linebreak
+\end_inset
+
+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
+dislocation.cfg, dislocation_slip.spatialdb, dislocation_sliptime.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 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/branches/pylith-scecdynrup/doc/userguide/tutorials/twotri3/twotri3.lyx
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/twotri3/twotri3.lyx	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/tutorials/twotri3/twotri3.lyx	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,870 +1,882 @@
-#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 
+\begin_inset Newline linebreak
+\end_inset
+
+(
+\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_pos
+\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 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 
+\begin_inset Newline linebreak
+\end_inset
+
+(
+\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
+
+\begin_inset Newline linebreak
+\end_inset
+
+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/branches/pylith-scecdynrup/doc/userguide/userguide.lyx
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/userguide.lyx	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/doc/userguide/userguide.lyx	2012-11-01 17:04:11 UTC (rev 20976)
@@ -15,10 +15,10 @@
 \language english
 \language_package default
 \inputencoding latin1
-\fontencoding global
-\font_roman default
-\font_sans default
-\font_typewriter default
+\fontencoding T1
+\font_roman times
+\font_sans helvet
+\font_typewriter courier
 \font_default_family default
 \use_non_tex_fonts false
 \font_sc false
@@ -136,7 +136,7 @@
 \begin_inset Newline newline
 \end_inset
 
-Version 1.7.0
+Version 1.8.0
 \end_layout
 
 \begin_layout Date
@@ -158,7 +158,7 @@
 
 \begin_layout Standard
 \begin_inset ERT
-status collapsed
+status open
 
 \begin_layout Plain Layout
 
@@ -270,12 +270,12 @@
 
 \begin_layout Standard
 \begin_inset CommandInset include
-LatexCommand input
+LatexCommand include
 filename "boundaryconditions/boundaryconditions.lyx"
 
 \end_inset
 
- 
+
 \begin_inset CommandInset include
 LatexCommand input
 filename "tutorials/tutorials.lyx"
@@ -475,9 +475,14 @@
 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.
+ solid, 
+\emph on
+Journal of Geophysical Research
+\shape italic
+\emph default
+, 102
+\shape default
+, 17,771–17,784.
 \end_layout
 
 \begin_layout Bibliography
@@ -502,6 +507,25 @@
 \labelwidthstring Bibliography
 \begin_inset CommandInset bibitem
 LatexCommand bibitem
+label "Courant et al., 1967"
+key "Courant:etal:1967"
+
+\end_inset
+
+Courant, R., K.
+ Friedrichs and H.
+ Lewy (1967), On the Partial Differential Equations of Mathematical Physics,
+ 
+\shape italic
+IBM Jounral of Research and Development
+\shape default
+, 11(2), 215--234.
+\end_layout
+
+\begin_layout Bibliography
+\labelwidthstring Bibliography
+\begin_inset CommandInset bibitem
+LatexCommand bibitem
 label "Day and Ely, 2002"
 key "Day:Ely:2002"
 
@@ -562,9 +586,9 @@
 Bull.
  Seismol.
  Soc.
- Am.
+ Am., 96
 \shape default
-, 96, 2118-2130.
+, 2118-2130.
 \end_layout
 
 \begin_layout Bibliography
@@ -584,7 +608,11 @@
 \shape italic
 Journal of Geophysical Research
 \shape default
-, 113, B09317, doi:10.1029/2007JB005553.
+,
+\shape italic
+ 113
+\shape default
+, B09317, doi:10.1029/2007JB005553.
 \end_layout
 
 \begin_layout Bibliography
@@ -620,9 +648,13 @@
  and X.X.
  Ni (2001), Numerical instability at the edge of a dynamic fracture, 
 \emph on
-Geophysical Journal International, 
+Geophysical Journal International,
+\shape italic
+ 
 \emph default
-147(3), 1-6, doi: 10.1046/j.1365-246x.2001.01567.x.
+147
+\shape default
+(3), 1-6, doi: 10.1046/j.1365-246x.2001.01567.x.
 \end_layout
 
 \begin_layout Bibliography
@@ -678,6 +710,23 @@
 \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"
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/Makefile.am	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/Makefile.am	2012-11-01 17:04:11 UTC (rev 20976)
@@ -16,6 +16,11 @@
 # ----------------------------------------------------------------------
 #
 
+dist_noinst_DATA = \
+	README \
+	invert_slip.py
+
+
 SUBDIRS = \
 	strikeslip \
 	reverse

Copied: short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/README (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/README)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/README	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/README	2012-11-01 17:04:11 UTC (rev 20976)
@@ -0,0 +1,117 @@
+This directory contains two examples that demonstrate computing static
+Green's functions via PyLith and using them in a simple inversion for
+fault slip. The directory strikeslip contains a 2-D strike-slip fault
+example and the directory reverse contains a 2-D reverse fault
+example. The two examples are run using exactly the same commands.
+
+The main features of these examples are:
+
+  * Generating a finite-element mesh using CUBIT
+    + Variable mesh resolution
+  * Spatially variable slip
+  * Computing Green's functions using PyLith
+
+Each example consists of two simulations. In the first simulation we
+compute the displacements due to a variable slip on the fault fault
+(idealized in a 2-D model with plane-strain); this serves as the
+"observed" displacements. In the second simulation we compute Green's
+functions for the fault. We use these Green's functions in the second
+simulation and the observed displacements from the first simulation to
+invert for the slip (in the first simulation).
+
+The imposed slip in the first simulation includes a region of uniform
+slip with a linear taper at each end. We use uniform linear elastic
+properties with a plane-strain formulation.
+
+The parameters for the bulk constitutive models are defined in
+  mat_elastic.spatialdb
+
+The simulation will output the displacements on the ground surface as
+well as a selection of points (defined in output_points.txt).
+
+For each of the simulations, we recommend examining the displacements,
+stress field, and fault slip.
+
+
+Mesh generation (optional)
+
+  NOTE: The result of this step will overwrite the included file
+        tri3_mesh.exo. You may want to copy/rename this file so that
+        you have a backup copy in case you have difficulty running
+        CUBIT.
+
+  Start CUBIT and play the journal file "mesh_tri3.jou". We highly
+  recommend that you study the contents of the journal files to
+  understand the mesh generation process.
+
+
+Step 1. Forward simulation
+
+  This simulation mimics an earthquake generating an observed
+  displacement field.
+
+  The parameters for the earthquake slip are defined in
+    eqslip.spatialdb
+
+  Run the simulation via the following command:
+    pylith eqsim.cfg
+
+
+Step 2. Generate Green's functions
+
+  This simulation generates Green's functions for a subset of the fault.
+
+  The parameters for the amplitude (and sign) of the slip impulses are
+  defined in
+    impulse_amplitude.spatialdb
+
+  Run the simulation via the following command:
+    pylith --problem=pylith.problems.GreensFns
+
+
+Step 3. Invert for coseismic slip
+
+  Now that we have the forward simulation (data) and Green's functions, we
+  can perform an inversion for the fault slip. We have written a very
+  simple Python script that performs a miminim moment solution using a
+  range of penalty parameters (contained in penalty_params.txt). The inversion
+  code is in invert_slip.py.  You can run the inversion by typing:
+
+    ../invert_slip.py --impulses=output/greensfns-fault.h5 --responses=output/greensfns-points.h5 --data=output/eqsim-points.h5 --penalty=penalty_params.txt --output=output/slip_inverted.txt
+
+  This will generate a set of predicted slip values, contained in
+  output/slip_inverted.txt.
+
+
+Step 4.  Plot the true and predicted slip values (**requires matplotlib**).
+
+  The python script, plot_invresults.py, compares the inversion with the
+  forward simulation.  If you have matplotlib installed, you can run
+  this script by typing:
+
+    plot_invresults.py --solution=output/eqsim-fault.h5 --predicted=output/slip_inverted.txt
+
+  This will display a matplotlib window with the true solution in
+  black and the predicted solution corresponding to different values
+  of the penalty parameter.
+
+
+Suggestions variations
+
+  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.
+
+  * Create a spatial variation in material properties. For example you
+    might create a velocity contrast across the fault.
+
+  * Adjust the slip distribution.
+
+  * Adjust the location and number of the observation points.
+
+  * Increase/decrease the resolution of the mesh.
+
+  * Try a different penalty function for the inversion. One simple option
+     would be a 1D Laplacian approximation (sets of values of [1, -2, 1])
+     centered along the diagonal.
+

Copied: short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/invert_slip.py (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/invert_slip.py)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/invert_slip.py	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/invert_slip.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -0,0 +1,159 @@
+#!/usr/bin/env python
+"""
+This is an extremely simple example showing how to set up an inversion
+using PyLith-generated Green's functions. In this simple example,
+there are no data uncertainties, and for a penalty function we use a
+simple minimum moment.
+"""
+
+# The code requires the numpy and h5py packages.
+import numpy
+import h5py
+
+
+# ----------------------------------------------------------------------
+def getImpResp():
+  """
+  Function to get impulse and response coordinates and values. Both are sorted
+  along the y-dimension of the fault.
+  """
+
+  # Open impulse file and determine which fault vertices were used.
+  impulses = h5py.File(impulseFile, "r", driver="sec2")
+  impC = impulses['geometry/vertices'][:]
+  impV = impulses['vertex_fields/slip'][:,:,0]
+  impInds = numpy.nonzero(impV != 0.0)
+  impCUsed = impC[impInds[1]]
+  impVUsed = impV[impInds[0], impInds[1]]
+
+  # Sort by y-coordinate.
+  impInds = numpy.argsort(impCUsed[:,1])
+  impCSort = impCUsed[impInds,:]
+  impVSort = impVUsed[impInds]
+
+  # Close impulse file and get responses.
+  impulses.close()
+  responses = h5py.File(responseFile, "r", driver="sec2")
+  respC = responses['geometry/vertices'][:]
+  respV = responses['vertex_fields/displacement'][:]
+  respVIsort = respV[impInds,:,:]
+  responses.close()
+
+  return (impCSort, impVSort, respC, respVIsort)
+
+
+# ----------------------------------------------------------------------
+def getData():
+  """
+  Function to get data values and coordinates.
+  """
+
+  # Open data file. Since the response and data coordinates are in the same
+  # order, we don't have to worry about sorting.
+  data = h5py.File(dataFile, "r", driver="sec2")
+  dataC = data['geometry/vertices'][:]
+  dataV = data['vertex_fields/displacement'][:]
+  data.close()
+
+  return (dataC, dataV)
+
+
+# ======================================================================
+# The main part of the code is below.
+# Get command-line arguments.
+from optparse import OptionParser
+parser = OptionParser()
+parser.add_option("-i", "--impulses", action="store", type="string",
+                  dest="impulse_file", help="HDF5 file with fault GF info")
+parser.add_option("-r", "--responses", action="store", type="string",
+                  dest="response_file", help="HDF5 file with GF responses")
+parser.add_option("-d", "--data", action="store", type="string",
+                  dest="data_file", help="HDF5 file with data")
+parser.add_option("-p", "--penalty", action="store", type="string",
+                  dest="penalty_file", help="text file with penalty parameters")
+parser.add_option("-o", "--output", action="store", type="string",
+                  dest="output_file", help="text file with estimated slip")
+
+(options, args) = parser.parse_args()
+
+if not options.impulse_file:
+  parser.error("Impulse input file must be specified.")
+
+if not options.response_file:
+  parser.error("Response input file must be specified.")
+
+if not options.data_file:
+  parser.error("Data input file must be specified.")
+
+if not options.penalty_file:
+  parser.error("penalty input file must be specified.")
+
+if not options.output_file:
+  parser.error("Output file must be specified.")
+
+impulseFile = options.impulse_file
+responseFile = options.response_file
+dataFile = options.data_file
+penaltyFile = options.penalty_file
+outputFile = options.output_file
+
+# Get GF info.
+(impCoords, impVals, respCoords, respVals) = getImpResp()
+
+# Get observed displacements and observation locations.
+(dataCoords, dataVals) = getData()
+
+# Get penalty parameters.
+penalties = numpy.loadtxt(penaltyFile, dtype=numpy.float64)
+
+# Determine matrix sizes and set up A-matrix.
+numParams = impVals.shape[0]
+numObs = 2 * dataVals.shape[1]
+aMat = respVals.reshape((numParams, numObs)).transpose()
+
+# Create diagonal matrix to use as the penalty.
+parDiag = numpy.eye(numParams, dtype=numpy.float64)
+
+# Data vector is a flattened version of the dataVals, plus the a priori
+# values of the parameters (assumed to be zero).
+dataVec = numpy.concatenate((dataVals.flatten(),
+                             numpy.zeros(numParams, dtype=numpy.float64)))
+
+# Determine number of inversions and create empty array to hold results.
+numInv = penalties.shape[0]
+invResults = numpy.zeros((numParams, 2 + numInv))
+invResults[:,0:2] = impCoords
+head = "# X_Coord Y_Coord"
+
+# Loop over number of inversions.
+for inversion in range(numInv):
+  penalty = penalties[inversion]
+  head += " Penalty=%g" % penalty
+
+  # Scale diagonal by penalty parameter, and stack A-matrix with penalty matrix.
+  penMat = penalty * parDiag
+  designMat = numpy.vstack((aMat, penMat))
+  designMatTrans = designMat.transpose()
+
+  # Form generalized inverse matrix.
+  genInv = numpy.dot(numpy.linalg.inv(numpy.dot(designMatTrans, designMat)),
+                                      designMatTrans)
+
+  # Solution is matrix-vector product of generalized inverse with data vector.
+  solution = numpy.dot(genInv, dataVec)
+  invResults[:,2 + inversion] = solution
+
+  # Compute predicted results and residual.
+  predicted = numpy.dot(aMat, solution)
+  residual = dataVals.flatten() - predicted
+  residualNorm = numpy.linalg.norm(residual)
+  print "Penalty parameter:  %g" % penalty
+  print "  Residual norm:    %g" % residualNorm
+
+head += "\n"
+
+# Output results.
+f = open(outputFile, "w")
+f.write(head)
+numpy.savetxt(f, invResults, fmt="%14.6e")
+f.close()

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/reverse/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/reverse/Makefile.am	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/reverse/Makefile.am	2012-11-01 17:04:11 UTC (rev 20976)
@@ -29,7 +29,9 @@
 	eqslip.spatialdb \
 	impulse_amplitude.spatialdb \
 	mat_elastic.spatialdb \
-	output_points.txt
+	output_points.txt \
+	penalty_params.txt \
+	plot_invresults.py
 
 
 SUBDIRS = \

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/reverse/README
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/reverse/README	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/reverse/README	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,88 +1,2 @@
-The example in this directory demonstrates the use of computing static
-Green's functions using PyLith and using them in a simple inversion
-for slip on a reverse fault.
-
-The main features of this example are:
-
-  * Generating a finite-element mesh using CUBIT
-    + Variable mesh resolution
-  * Spatially variable slip
-  * Computing Green's functions using PyLith
-
-The examples consists of two simulations. In the first simulation we
-compute the displacements due to a variable slip on a reverse
-fault (idealized in a 2-D model with plane-strain); this serves as the
-"observed" displacements. In the second simulation we compute Green's
-functions for the fault. We use these Green's functions in the second
-simulation and the observed displacements from the first simulation to
-invert for the slip (in the first simulation).
-
-The imposed slip in the first simulation includes a region of uniform
-slip with a linear taper at each end. We use uniform linear elastic
-properties with a plane-strain formulation.
-
-The parameters for the bulk constitutive models are defined in
-  mat_elastic.spatialdb
-
-The simulation will output the displacements on the ground surface as
-well as a selection of points (defined in output_points.txt).
-
-For each of the simulations, we recommend examining the displacements,
-stress field, and fault slip. 
-
-
-Mesh generation (optional)
-
-  NOTE: The result of this step will overwrite the included file
-        tri3_mesh.exo. You may want to copy/rename this file so that
-        you have a backup copy in case you have difficulty running
-        CUBIT.
-
-  Start CUBIT and play the journal file "mesh_tri3.jou". We highly
-  recommend that you study the contents of the journal files to
-  understand the mesh generation process.
-
-
-Step 1. Forward simulation
-
-  This simulation mimics an earthquake generating an observed
-  displacement field.
-
-  The parameters for the earthquake slip are defined in
-    eqslip.spatialdb
-
-  Run the simulation via the following command:
-    pylith eqsim.cfg.
-
-
-Step 2. Generate Green's functions
-
-  This simulation generates Green's functions for a subset of the fault.
-
-  The parameters for the amplitude (and sign) of the slip impulses are
-  defined in
-    impulse_amplitude.spatialdb
-
-  Run the simulation via the following command:
-    pylith --problem.pylith.problems.GreensFns
-
-
-Step 3. Invert for coseismic slip
-
-  ADD STUFF HERE
-
-
-Suggestions variations
-
-  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.
-
-  * Create a spatial variation in material properties. For example you
-    might create a velocity contrast across the fault.
-
-  * Adjust the slip distribution.
-
-  * Adjust the location and number of the observation points.
-
-  * Increase/decrease the resolution of the mesh.
+See the README one level up (examples/2d/greensfns/README) for a
+description and detailed instructions.

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/reverse/impulse_amplitude.spatialdb
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/reverse/impulse_amplitude.spatialdb	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/reverse/impulse_amplitude.spatialdb	2012-11-01 17:04:11 UTC (rev 20976)
@@ -19,7 +19,6 @@
 // Columns are
 // (1) x coordinate (km)
 // (2) y coordinate (km)
-// (3) reverse-slip (cm)
-// (4) fault-opening (cm)
+// (3) slip (m)
 0.0  +18.0   -1.0
 0.0  +18.1    0.0

Copied: short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/reverse/penalty_params.txt (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/penalty_params.txt)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/reverse/penalty_params.txt	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/reverse/penalty_params.txt	2012-11-01 17:04:11 UTC (rev 20976)
@@ -0,0 +1,7 @@
+0.00001
+0.0001
+0.001
+0.01
+0.1
+1.0
+10.0

Copied: short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/reverse/plot_invresults.py (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/reverse/plot_invresults.py)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/reverse/plot_invresults.py	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/reverse/plot_invresults.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -0,0 +1,84 @@
+#!/usr/bin/env python
+"""
+This script generates a set of line plots comparing the predicted solution to
+the true solution.
+"""
+
+# The code requires the numpy, h5py, and matplotlib packages.
+import numpy
+import h5py
+import matplotlib.pyplot as pyplot
+import math
+
+# Define line colors and other parameters.
+solnColor = "black"
+predColors = ["cyan", "red", "blue", "green", "orange", "purple", "yellow"]
+
+# ----------------------------------------------------------------------
+def getSolution():
+  """
+  Function to get applied slip and fault coordinates.
+  """
+
+  # Open solution file and get slip and coordinates.
+  solution = h5py.File(solutionFile, "r")
+  solC = solution['geometry/vertices'][:]
+  solV = solution['vertex_fields/slip'][:,:,0].flatten()
+
+  # Sort by y-coordinate.
+  solInds = numpy.argsort(solC[:,1])
+  solCSort = solC[solInds,:]
+  solVSort = solV[solInds]
+  # Reverse sign, since this is right-lateral slip.
+  solVSort *= -1.0
+  solution.close()
+
+  return (solCSort, solVSort)
+
+
+# ======================================================================
+# The main part of the code is below.
+# Get command-line arguments.
+from optparse import OptionParser
+parser = OptionParser()
+parser.add_option("-s", "--solution", action="store", type="string",
+                  dest="solution_file",
+                  help="HDF5 file with applied fault slip")
+parser.add_option("-p", "--predicted", action="store", type="string",
+                  dest="predicted_file", help="file with predicted solutions")
+
+(options, args) = parser.parse_args()
+
+if not options.solution_file:
+  parser.error("Solution input file must be specified.")
+
+if not options.predicted_file:
+  parser.error("Predicted input file must be specified.")
+
+solutionFile = options.solution_file
+predictedFile = options.predicted_file
+
+# Get applied fault slip.
+(solCoords, solVals) = getSolution()
+
+# Get predicted fault slip.
+predicted = numpy.loadtxt(predictedFile)
+predCoords = predicted[:,0:2]
+predSlip = predicted[:, 2:]
+
+# Generate figure, starting with true solution.
+pyplot.plot(solVals, -solCoords[:,1]/1.0e+3, linewidth=2, color=solnColor)
+pyplot.xlabel("Reverse slip (m)")
+pyplot.ylabel("Depth (km)")
+pyplot.ylim( (22, 0) )
+
+# Loop over predicted results, using a different line color for each.
+numInv = predSlip.shape[1]
+
+for inversion in range(numInv):
+  pyplot.plot(predSlip[:,inversion], -predCoords[:,1]/1.0e+3,
+              color=predColors[inversion])
+
+
+pyplot.show()
+# pyplot.savefig("reverse_inversion.pdf")

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/strikeslip/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/strikeslip/Makefile.am	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/strikeslip/Makefile.am	2012-11-01 17:04:11 UTC (rev 20976)
@@ -29,7 +29,9 @@
 	eqslip.spatialdb \
 	impulse_amplitude.spatialdb \
 	mat_elastic.spatialdb \
-	output_points.txt
+	output_points.txt \
+	penalty_params.txt \
+	plot_invresults.py
 
 
 SUBDIRS = \

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/strikeslip/README
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/strikeslip/README	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/strikeslip/README	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,88 +1,2 @@
-The example in this directory demonstrates the use of computing static
-Green's functions using PyLith and using them in a simple inversion
-for slip on a strike-slip fault.
-
-The main features of this example are:
-
-  * Generating a finite-element mesh using CUBIT
-    + Variable mesh resolution
-  * Spatially variable slip
-  * Computing Green's functions using PyLith
-
-The examples consists of two simulations. In the first simulation we
-compute the displacements due to a variable slip on a strike-slip
-fault (idealized in a 2-D model with plane-strain); this serves as the
-"observed" displacements. In the second simulation we compute Green's
-functions for the fault. We use these Green's functions in the second
-simulation and the observed displacements from the first simulation to
-invert for the slip (in the first simulation).
-
-The imposed slip in the first simulation includes a region of uniform
-slip with a linear taper at each end. We use uniform linear elastic
-properties with a plane-strain formulation.
-
-The parameters for the bulk constitutive models are defined in
-  mat_elastic.spatialdb
-
-The simulation will output the displacements on the ground surface as
-well as a selection of points (defined in output_points.txt).
-
-For each of the simulations, we recommend examining the displacements,
-stress field, and fault slip. 
-
-
-Mesh generation (optional)
-
-  NOTE: The result of this step will overwrite the included file
-        tri3_mesh.exo. You may want to copy/rename this file so that
-        you have a backup copy in case you have difficulty running
-        CUBIT.
-
-  Start CUBIT and play the journal file "mesh_tri3.jou". We highly
-  recommend that you study the contents of the journal files to
-  understand the mesh generation process.
-
-
-Step 1. Forward simulation
-
-  This simulation mimics an earthquake generating an observed
-  displacement field.
-
-  The parameters for the earthquake slip are defined in
-    eqslip.spatialdb
-
-  Run the simulation via the following command:
-    pylith eqsim.cfg.
-
-
-Step 2. Generate Green's functions
-
-  This simulation generates Green's functions for a subset of the fault.
-
-  The parameters for the amplitude (and sign) of the slip impulses are
-  defined in
-    impulse_amplitude.spatialdb
-
-  Run the simulation via the following command:
-    pylith --problem.pylith.problems.GreensFns
-
-
-Step 3. Invert for coseismic slip
-
-  ADD STUFF HERE
-
-
-Suggestions variations
-
-  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.
-
-  * Create a spatial variation in material properties. For example you
-    might create a velocity contrast across the fault.
-
-  * Adjust the slip distribution.
-
-  * Adjust the location and number of the observation points.
-
-  * Increase/decrease the resolution of the mesh.
+See the README one level up (examples/2d/greensfns/README) for a
+description and detailed instructions.

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/strikeslip/eqslip.spatialdb
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/strikeslip/eqslip.spatialdb	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/strikeslip/eqslip.spatialdb	2012-11-01 17:04:11 UTC (rev 20976)
@@ -19,8 +19,8 @@
 // Columns are
 // (1) x coordinate (km)
 // (2) y coordinate (km)
-// (3) reverse-slip (cm)
-// (4) fault-opening (cm)
+// (3) left-lateral-slip (m)
+// (4) fault-opening (m)
 0.0  -99.9    0.0  0.0
 0.0  -20.0    0.0  0.0
 0.0  -15.0   -2.5  0.0

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/strikeslip/greensfns.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/strikeslip/greensfns.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/strikeslip/greensfns.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -64,6 +64,7 @@
 # Fault
 [greensfns.interfaces.fault.output]
 writer.filename = output/greensfns-fault.h5
+vertex_info_fields = [area]
 
 # Materials
 [greensfns.materials.elastic.output]

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/strikeslip/impulse_amplitude.spatialdb
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/strikeslip/impulse_amplitude.spatialdb	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/strikeslip/impulse_amplitude.spatialdb	2012-11-01 17:04:11 UTC (rev 20976)
@@ -19,8 +19,7 @@
 // Columns are
 // (1) x coordinate (km)
 // (2) y coordinate (km)
-// (3) reverse-slip (cm)
-// (4) fault-opening (cm)
+// (3) slip (m)
 0.0  -22.6    0.0
 0.0  -22.5   -1.0
 0.0  +22.5   -1.0

Copied: short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/strikeslip/penalty_params.txt (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/strikeslip/penalty_params.txt)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/strikeslip/penalty_params.txt	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/strikeslip/penalty_params.txt	2012-11-01 17:04:11 UTC (rev 20976)
@@ -0,0 +1,7 @@
+0.00001
+0.0001
+0.001
+0.01
+0.1
+1.0
+10.0

Copied: short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/strikeslip/plot_invresults.py (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/examples/2d/greensfns/strikeslip/plot_invresults.py)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/strikeslip/plot_invresults.py	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/greensfns/strikeslip/plot_invresults.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -0,0 +1,82 @@
+#!/usr/bin/env python
+"""
+This script generates a plot comparing the predicted solutions to
+the true solution.
+"""
+
+# The code requires the numpy, h5py, and matplotlib packages.
+import numpy
+import h5py
+import matplotlib.pyplot as pyplot
+
+# Define line colors and other parameters.
+solnColor = "black"
+predColors = ["cyan", "red", "blue", "green", "orange", "purple", "yellow"]
+
+
+# ----------------------------------------------------------------------
+def getSolution():
+  """
+  Function to get applied slip and fault coordinates.
+  """
+
+  # Open solution file and get slip and coordinates.
+  solution = h5py.File(solutionFile, "r")
+  solC = solution['geometry/vertices'][:]
+  solV = solution['vertex_fields/slip'][:,:,0].flatten()
+
+  # Sort by y-coordinate.
+  solInds = numpy.argsort(solC[:,1])
+  solCSort = solC[solInds,:]
+  solVSort = solV[solInds]
+  # Reverse sign, since this is right-lateral slip.
+  solVSort *= -1.0
+  solution.close()
+
+  return (solCSort, solVSort)
+
+# ======================================================================
+# The main part of the code is below.
+# Get command-line arguments.
+from optparse import OptionParser
+parser = OptionParser()
+parser.add_option("-s", "--solution", action="store", type="string",
+                  dest="solution_file",
+                  help="HDF5 file with applied fault slip")
+parser.add_option("-p", "--predicted", action="store", type="string",
+                  dest="predicted_file", help="file with predicted solutions")
+
+(options, args) = parser.parse_args()
+
+if not options.solution_file:
+  parser.error("Solution input file must be specified.")
+
+if not options.predicted_file:
+  parser.error("Predicted input file must be specified.")
+
+solutionFile = options.solution_file
+predictedFile = options.predicted_file
+
+# Get applied fault slip.
+(solCoords, solVals) = getSolution()
+
+# Get predicted fault slip.
+predicted = numpy.loadtxt(predictedFile)
+predCoords = predicted[:,0:2]
+predSlip = predicted[:, 2:]
+
+# Generate figure, starting with true solution.
+pyplot.plot(solCoords[:,1]/1.0e+3, solVals, linewidth=2, color=solnColor)
+pyplot.xlabel("Distance Along Strike (km)")
+pyplot.ylabel("Right-Lateral Slip (m)")
+
+# Loop over predicted results, using a different line color for each.
+numInv = predSlip.shape[1]
+
+for inversion in range(numInv):
+  pyplot.plot(predCoords[:,1]/1.0e+3, predSlip[:,inversion],
+              color=predColors[inversion])
+
+
+pyplot.show()
+# pyplot.savefig("strikeslip_inversion.pdf")

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/Makefile.am	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/Makefile.am	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/2d/subduction/README
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/README	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/README	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/2d/subduction/afterslip_tractions.py (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/examples/2d/subduction/afterslip_tractions.py)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/afterslip_tractions.py	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/afterslip_tractions.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/2d/subduction/afterslip_tractions.spatialdb (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/examples/2d/subduction/afterslip_tractions.spatialdb)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/afterslip_tractions.spatialdb	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/afterslip_tractions.spatialdb	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/2d/subduction/plot_faultinfo.py (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/examples/2d/subduction/plot_faultinfo.py)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/plot_faultinfo.py	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/plot_faultinfo.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/2d/subduction/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/pylithapp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/pylithapp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # This is not a self-contained simulation configuration file. This

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/step01.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/step01.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/step01.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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,7 +85,7 @@
 # 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).

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/step02.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/step02.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/step02.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/step03.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/step03.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/step03.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Copied: short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/step04.cfg (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/examples/2d/subduction/step04.cfg)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/step04.cfg	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/2d/subduction/step04.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/3d/hex8/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/Makefile.am	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/Makefile.am	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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 \

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/spatialdb/powerlaw/powerlaw_gendb.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/spatialdb/powerlaw/powerlaw_gendb.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/spatialdb/powerlaw/powerlaw_gendb.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [powerlaw_gendb]
 
 reference_value = strain_rate

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/step02.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/step02.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/step02.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/3d/hex8/step05.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/step05.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/step05.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/3d/hex8/step14.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/step14.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/step14.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -125,7 +125,7 @@
 # Use the rate-and-state aging friction model.
 friction = pylith.friction.RateStateAgeing
 friction.label = Rate and state
-friction.min_slip_rate = 1.0e-9
+friction.linear_slip_rate = 1.0e-9
 
 # We must define the quadrature information for fault cells.
 # The fault cells are 2D (surface).
@@ -141,7 +141,7 @@
 # b: 0.08
 # cohesion: 0 Pa
 friction.db_properties = spatialdata.spatialdb.UniformDB
-friction.db_properties.label = Rate Stete Ageing
+friction.db_properties.label = Rate State Ageing
 friction.db_properties.values = [reference-friction-coefficient,reference-slip-rate,characteristic-slip-distance,constitutive-parameter-a,constitutive-parameter-b,cohesion]
 friction.db_properties.data = [0.4,2.0e-11*m/s,0.05*m,0.002,0.08,0.0*Pa]
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/step18.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/step18.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/step18.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/3d/hex8/step19.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/step19.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/step19.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/step20.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/step20.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/hex8/step20.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -6,7 +6,7 @@
 #
 # This is a pure elastic static problem that demonstrates how to use
 # initial tractions with the FaultCohesiveDyn object to create fault
-# opening consistent with a fluid intrusion, such as a dike.
+# opening consistent with fluid intrusion, such as a dike.
 #
 # ----------------------------------------------------------------------
 # RUNNING THE SIMULATON
@@ -26,9 +26,9 @@
 # problem
 # ----------------------------------------------------------------------
 [pylithapp.timedependent.formulation.time_step]
-# Define the total time for the simulation and the default time step size.
-total_time = 0.0*s ; total time of simulation
-# Define an appropriat time step for simulations. Important for
+# 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
 
@@ -95,6 +95,9 @@
 # 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
@@ -111,29 +114,15 @@
 friction.db_properties.values = [friction-coefficient,cohesion]
 friction.db_properties.data = [0.1,0.0*Pa]
 
-db_initial_tractions = spatialdata.spatialdb.SimpleDB
-db_initial_tractions.label = Initial fault tractions
-db_initial_tractions.iohandler.filename = spatialdb/tractions_opening.spatialdb
-db_initial_tractions.query_type = nearest
+# Prescribed tractions for fluid intrusion.
+traction_perturbation = pylith.faults.TractPerturbation
 
-# ----------------------------------------------------------------------
-# PETSc settings
-# ----------------------------------------------------------------------
-# NOTE: There are additional settings specific to fault friction.
-[pylithapp.petsc]
+[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
 
-# Friction sensitivity solve used to compute the increment in slip
-# associated with changes in the Lagrange multiplier imposed by the
-# fault constitutive model.
-friction_pc_type = asm
-friction_sub_pc_factor_shift_type = nonzero
-friction_ksp_max_it = 25
-friction_ksp_gmres_restart = 30
-# Uncomment to view details of friction sensitivity solve.
-#friction_ksp_monitor = true
-#friction_ksp_view = true
-friction_ksp_converged_reason = true
-
 # ----------------------------------------------------------------------
 # output
 # ----------------------------------------------------------------------
@@ -149,7 +138,7 @@
 
 # Give basename for VTK fault output.
 [pylithapp.problem.interfaces.fault.output]
-vertex_info_fields = [initial_traction]
+vertex_info_fields = [traction_initial_value]
 writer.filename = output/step20-fault.vtk
 
 # Give basename for VTK output of upper_crust state variables.
@@ -163,3 +152,23 @@
 # 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/branches/pylith-scecdynrup/examples/3d/tet4/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/tet4/pylithapp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/tet4/pylithapp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/tet4/step02.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/tet4/step02.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/tet4/step02.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -102,8 +102,6 @@
 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 = True
 fs_pc_fieldsplit_type = multiplicative

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/tet4/step04.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/tet4/step04.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/3d/tet4/step04.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -125,9 +125,9 @@
 
 [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 = True
+fs_pc_fieldsplit_real_diagonal = true
 fs_pc_fieldsplit_type = multiplicative
 fs_fieldsplit_0_pc_type = ml
 fs_fieldsplit_1_pc_type = jacobi

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/Makefile.am	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/Makefile.am	2012-11-01 17:04:11 UTC (rev 20976)
@@ -20,7 +20,6 @@
 	2d \
 	3d \
 	bar_shearwave \
-	greensfns \
 	meshing \
 	twocells
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/hex8/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/hex8/pylithapp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/hex8/pylithapp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------
@@ -58,7 +57,6 @@
 
 # Change to an explicit time stepping formulation
 formulation = pylith.problems.Explicit
-#formulation = pylith.problems.ExplicitLumped
 
 # Nondimensionalize problem using wave propagation parameters.
 normalizer = spatialdata.units.NondimElasticDynamic
@@ -194,19 +192,6 @@
 # PETSc
 # ----------------------------------------------------------------------
 [pylithapp.petsc]
-ksp_type = gmres
-pc_type = asm
-
-# Change the preconditioner settings.
-sub_pc_factor_shift_type = nonzero
-
-ksp_rtol = 1.0e-8
-ksp_atol = 1.0e-10
-ksp_max_it = 50
-ksp_gmres_restart = 75
-
-#ksp_monitor = true
-#ksp_view = true
 log_summary = true
 
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/Makefile.am	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/Makefile.am	2012-11-01 17:04:11 UTC (rev 20976)
@@ -26,13 +26,13 @@
 	matprops.spatialdb \
 	mesh_quad4_200m.jou \
 	pylithapp.cfg \
-	kinematic.cfg \
-	kinematic_slip.spatialdb \
-	kinematic_risetime.spatialdb \
-	kinematic_sliptime.spatialdb \
-	dynamic.cfg \
-	dynamic_staticfriction.cfg \
-	dynamic_slipweakening.cfg \
-	dynamic_ratestateageing.cfg
+	prescribedrup.cfg \
+	prescribedrup_slip.spatialdb \
+	prescribedrup_risetime.spatialdb \
+	prescribedrup_sliptime.spatialdb \
+	spontaneousrup.cfg \
+	spontaneousrup_staticfriction.cfg \
+	spontaneousrup_slipweakening.cfg \
+	spontaneousrup_ratestateageing.cfg
 
 # End of file 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/README
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/README	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/README	2012-11-01 17:04:11 UTC (rev 20976)
@@ -5,14 +5,14 @@
 
 Example problems
 
-  * Kinematic fault slip (same as problem in tri3, tet4, and hex8
+  * Prescribed rupture (same as problem in tri3, tet4, and hex8
     subdirectories)
 
-  * Dynamic fault slip with static friction fault constitutive model
+  * Spontaneous rupture with static friction fault constitutive model
 
-  * Dynamic fault slip with linear slip-weakening fault constitutive model
+  * Spontaneous rupture with linear slip-weakening fault constitutive model
 
-  * Dynamic fault slip with rate- and state-friction fault constitutive model
+  * Spontaneous rupture with rate- and state-friction fault constitutive model
 
 
 Files common to all example problems
@@ -25,23 +25,23 @@
 
 Files associated with the example problems:
 
-  + Kinematic fault slip
-    - kinematic.cfg: Parameters for simulation
-    - kinematic_risetime.spatialdb: Spatial database for slip rise time
-    - kinematic_slip.spatialdb: Spatial database for final slip
-    - kinematic_sliptime.spatialdb: Spatial database for slip initiation time 
+  + Prescribed rupture
+    - prescribedrup.cfg: Parameters for simulation
+    - prescribedrup_risetime.spatialdb: Spatial database for slip rise time
+    - prescribedrup_slip.spatialdb: Spatial database for final slip
+    - prescribedrup_sliptime.spatialdb: Spatial database for slip initiation time 
 
-  + Dynamic fault slip with static friction fault constitutive model
+  + Spontaneous rupture with static friction fault constitutive model
 
-    - dynamic.cfg: Parameters common to dynamic friction problems
-    - dynamic_staticfriction.cfg: Parameters for simulation 
+    - spontaneousrup.cfg: Parameters common to dynamic friction problems
+    - spontaneousrup_staticfriction.cfg: Parameters for simulation 
 
-  + Dynamic fault slip with linear slip-weakening fault constitutive model
+  + Spontaneous rupture with linear slip-weakening fault constitutive model
 
-    - dynamic.cfg: Parameters common to dynamic friction problems
-    - dynamic_slipweakening.cfg: Parameters for simulation 
+    - spontaneousrup.cfg: Parameters common to dynamic friction problems
+    - spontaneousrup_slipweakening.cfg: Parameters for simulation 
 
-  + Dynamic fault slip with rate- and state-friction fault constitutive model
+  + Spontaneous rupture with rate- and state-friction fault constitutive model
 
-    - dynamic.cfg: Parameters common to dynamic friction problems
-    - dynamic_ratestateageing.cfg: Parameters for simulation 
+    - spontaneousrup.cfg: Parameters common to dynamic friction problems
+    - spontaneousrup_ratestateageing.cfg: Parameters for simulation 

Deleted: short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/dynamic.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/dynamic.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/dynamic.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,52 +0,0 @@
-# -*- Python -*-
-[pylithapp]
-
-# This is not a self-contained simulation configuration file. This
-# file only specifies the general parameters common to the dynamic
-# fault (friction interface) simulations in this directory.
-
-# ----------------------------------------------------------------------
-# journal
-# ----------------------------------------------------------------------
-# Turn on progress for the dynamic fault.
-[pylithapp.journal.info]
-faultcohesivedyn = 1
-
-# ----------------------------------------------------------------------
-# problem
-# ----------------------------------------------------------------------
-[pylithapp.timedependent]
-
-# Overwrite the use of explicit time stepping with a full Jacobian
-# matrix set in pylithapp.cfg with a lumped Jacobian matrix. The
-# lumped Jacobian reduces memory use and uncouples the degrees of
-# freedom in the solve, permitting use of a very fast, simple solver.
-formulation = pylith.problems.ExplicitLumped
-
-# ----------------------------------------------------------------------
-# faults
-# ----------------------------------------------------------------------
-[pylithapp.timedependent.interfaces]
-# Change fault to dynamic fault interface.
-fault = pylith.faults.FaultCohesiveDyn
-
-[pylithapp.timedependent.interfaces.fault]
-# Specify the initial tractions on the fault using a uniform DB.
-#  shear: 6.1 MPa (right-lateral)
-#  normal 10 MPa (compressive)
-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=[traction_initial_value]
-vertex_data_fields=[slip,slip_rate,traction]
-skip = 1
-writer.time_format = %05.2f

Deleted: short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/dynamic_ratestateageing.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/dynamic_ratestateageing.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/dynamic_ratestateageing.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,67 +0,0 @@
-# -*- Python -*-
-[pylithapp]
-
-# ----------------------------------------------------------------------
-# PROBLEM DESCRIPTION
-# ----------------------------------------------------------------------
-
-# Use constant initial tractions on the fault to drive fault slip
-# subject to rate- and state-friction on the fault. Deformation
-# propagates to the edges of the bar where it is absorbed using
-# absorbing dampers boundary conditions. The steady state solution is
-# a constant slip rate on the fault with uniform strain in the bar.
-
-# ----------------------------------------------------------------------
-# RUNNING THE SIMULATION
-# ----------------------------------------------------------------------
-
-# This is not a self-contained simulation configuration file. This
-# file only specifies the specific parameters for an explicit
-# time-stepping problem using a dynamic fault interface condition with
-# static friction.
-#
-# To run the simulation:
-# pylith dynamicfault.cfg staticfriction.cfg
-#
-# Output will be directed to the directory output.
-
-# ----------------------------------------------------------------------
-# faults
-# ----------------------------------------------------------------------
-[pylithapp.timedependent.interfaces.fault]
-
-# Use rate- and state-friction with the ageing law for evolution of
-# the state variable.
-friction = pylith.friction.RateStateAgeing
-friction.label = Rate and state
-
-# Set the friction model parameters.
-#  reference coefficient of friction: 0.6
-#  reference slip rate: 1.0e-06 m/s
-#  slip weakening parameter: 0.037 m
-#  a: 0.0125
-#  b: 0.0172
-#  cohesion: 0 Pa
-friction.db_properties = spatialdata.spatialdb.UniformDB
-friction.db_properties.label = Rate State Ageing
-friction.db_properties.values = [reference-friction-coefficient,reference-slip-rate,characteristic-slip-distance,constitutive-parameter-a,constitutive-parameter-b,cohesion]
-friction.db_properties.data = [0.6,1.0e-6*m/s,0.0370*m,0.0125,0.0172,0.0*Pa]
-
-# Set spatial database for the initial value of the state variable.
-friction.db_initial_state = spatialdata.spatialdb.UniformDB
-friction.db_initial_state.label = Rate State Ageing State
-friction.db_initial_state.values = [state-variable]
-friction.db_initial_state.data = [92.7*s]
-
-# ----------------------------------------------------------------------
-# output
-# ----------------------------------------------------------------------
-# Set filenames for output.
-[pylithapp.problem.formulation.output.output]
-writer.filename = output/ratestateageing.vtk
-
-[pylithapp.timedependent.interfaces.fault.output]
-writer.filename = output/ratestateageing-fault.vtk
-
-[pylithapp.timedependent.materials.elastic.output]
-writer.filename = output/ratestateageing-statevars.vtk

Deleted: short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/dynamic_slipweakening.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/dynamic_slipweakening.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/dynamic_slipweakening.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,66 +0,0 @@
-# -*- Python -*-
-[pylithapp]
-
-# ----------------------------------------------------------------------
-# PROBLEM DESCRIPTION
-# ----------------------------------------------------------------------
-
-# Use constant initial tractions on the fault to drive fault slip
-# subject to linear slip-weakening friction on the fault. Deformation
-# propagates to the edges of the bar where it is absorbed using
-# absorbing dampers boundary conditions. The steady state solution is
-# a constant slip rate on the fault with uniform strain in the bar.
-
-# ----------------------------------------------------------------------
-# RUNNING THE SIMULATION
-# ----------------------------------------------------------------------
-
-# This is not a self-contained simulation configuration file. This
-# file only specifies the specific parameters for an explicit
-# time-stepping problem using a dynamic fault interface condition with
-# linear slip-weakening friction.
-#
-# To run the simulation:
-# pylith dynamicfault.cfg slipweakening.cfg
-#
-# Output will be directed to the directory output.
-
-# ----------------------------------------------------------------------
-# faults
-# ----------------------------------------------------------------------
-[pylithapp.timedependent.interfaces.fault]
-
-# Use slip-weakening friction
-friction = pylith.friction.SlipWeakening
-friction.label = Slip weakening
-
-# Set the slip-weakening friction model parameters.
-#  static coefficient of friction: 0.6
-#  dynamic coefficient of friction: 0.5
-#  slip-weakening parameter: 0.2 m
-#  cohesion: 0 Pa
-friction.db_properties = spatialdata.spatialdb.UniformDB
-friction.db_properties.label = Slip weakening
-friction.db_properties.values = [static-coefficient,dynamic-coefficient,slip-weakening-parameter,cohesion]
-friction.db_properties.data = [0.6,0.5,0.2*m,0.0*Pa]
-
-# ----------------------------------------------------------------------
-# output
-# ----------------------------------------------------------------------
-[pylithapp.problem.formulation.output.output]
-writer.filename = output/slipweakening.vtk
-
-[pylithapp.timedependent.interfaces.fault.output]
-writer.filename = output/slipweakening-fault.vtk
-
-# Add friction model parameters to fault info file in addition to
-# default values.
-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.
-vertex_data_fields = [slip,traction,cumulative_slip,previous_slip]
-
-
-[pylithapp.timedependent.materials.elastic.output]
-writer.filename = output/slipweakening-statevars.vtk

Deleted: short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/dynamic_staticfriction.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/dynamic_staticfriction.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/dynamic_staticfriction.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,54 +0,0 @@
-# -*- Python -*-
-[pylithapp]
-
-# ----------------------------------------------------------------------
-# PROBLEM DESCRIPTION
-# ----------------------------------------------------------------------
-
-# Use constant initial tractions on the fault to drive fault slip
-# subject to static friction on the fault. Deformation propagates to
-# the edges of the bar where it is absorbed using absorbing dampers
-# boundary conditions. The steady state solution is a constant slip
-# rate on the fault with uniform strain in the bar.
-
-# ----------------------------------------------------------------------
-# RUNNING THE SIMULATION
-# ----------------------------------------------------------------------
-
-# This is not a self-contained simulation configuration file. This
-# file only specifies the specific parameters for an explicit
-# time-stepping problem using a dynamic fault interface condition with
-# static friction.
-#
-# To run the simulation:
-# pylith dynamicfault.cfg staticfriction.cfg
-
-# ----------------------------------------------------------------------
-# faults
-# ----------------------------------------------------------------------
-[pylithapp.timedependent.interfaces.fault]
-
-# Use static friction
-friction = pylith.friction.StaticFriction
-friction.label = Static friction
-
-# Set the static friction model parameters.
-#  static coefficient of friction: 0.6
-#  cohesion: 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.6,0.0*Pa]
-
-# ----------------------------------------------------------------------
-# output
-# ----------------------------------------------------------------------
-# Set filenames for output.
-[pylithapp.problem.formulation.output.output]
-writer.filename = output/staticfriction.vtk
-
-[pylithapp.timedependent.interfaces.fault.output]
-writer.filename = output/staticfriction-fault.vtk
-
-[pylithapp.timedependent.materials.elastic.output]
-writer.filename = output/staticfriction-statevars.vtk

Deleted: short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/kinematic.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/kinematic.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/kinematic.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,86 +0,0 @@
-# -*- Python -*-
-[pylithapp]
-
-# ----------------------------------------------------------------------
-# PROBLEM DESCRIPTION
-# ----------------------------------------------------------------------
-
-# Impose 1.0 m of left-lateral slip at time 0.1 s with slip rate
-# following Brune's far-field time function. The rise time (95% of the
-# final slip) is 2.0 s.
-#
-# The fault slip causes a shear wave to propagate down the bar. The
-# shear wave is absorbed at the lateral ends of the bar using the
-# absorbing dampers boundary condition.
-
-# ----------------------------------------------------------------------
-# RUNNING THE SIMULATION
-# ----------------------------------------------------------------------
-
-# This is not a self-contained simulation configuration file. This
-# file only specifies the specific parameters for an explicit
-# time-stepping problem using a fault with kinematically-specified
-# slip.
-#
-# To run the simulation:
-# pylith shearwave_kinematicslip.cfg
-
-# ----------------------------------------------------------------------
-# journal
-# ----------------------------------------------------------------------
-# Turn on progress for the kinematic fault.
-[pylithapp.journal.info]
-faultcohesivekin = 1
-
-# ----------------------------------------------------------------------
-# problem
-# ----------------------------------------------------------------------
-[pylithapp.timedependent]
-
-# Uncomment the line below to overwrite the use of explicit time
-# stepping with a full Jacobian matrix set in pylithapp.cfg with a
-# lumped Jacobian matrix. The lumped Jacobian reduces memory use and
-# uncouples the degrees of freedom in the solve, permitting use of a
-# very fast, simple solver.
-#formulation = pylith.problems.ExplicitLumped
-
-# ----------------------------------------------------------------------
-# faults
-# ----------------------------------------------------------------------
-[pylithapp.timedependent.interfaces]
-fault = pylith.faults.FaultCohesiveKin
-
-[pylithapp.timedependent.interfaces.fault]
-# Switch to Brune slip time function
-eq_srcs.rupture.slip_function = pylith.faults.BruneSlipFn
-
-[pylithapp.timedependent.interfaces.fault.eq_srcs.rupture.slip_function]
-
-# Database specifying the final slip.
-slip.label = Final slip
-slip.iohandler.filename = kinematic_slip.spatialdb
-
-# Database specifying rise_time.
-rise_time.label = Rise time
-rise_time.iohandler.filename = kinematic_risetime.spatialdb
-
-# Database specifying time at which slip begins at each point.
-slip_time.label = Slip initiation time
-slip_time.iohandler.filename = kinematic_sliptime.spatialdb
-
-# ----------------------------------------------------------------------
-# output
-# ----------------------------------------------------------------------
-# Set the filename for each type of output.
-
-# Give basename for VTK domain output of solution over domain.
-[pylithapp.problem.formulation.output.output]
-writer.filename = output/kinematic.vtk
-
-# Give basename for VTK fault output.
-[pylithapp.timedependent.interfaces.fault.output]
-writer.filename = output/kinematic-fault.vtk
-
-# Give basename for VTK output of state variables.
-[pylithapp.timedependent.materials.elastic.output]
-writer.filename = output/kinematic-statevars.vtk

Deleted: short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/kinematic_risetime.spatialdb
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/kinematic_risetime.spatialdb	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/kinematic_risetime.spatialdb	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,25 +0,0 @@
-#SPATIAL.ascii 1
-SimpleDB {
-  // number of values for rise time
-  num-values = 1
-
-  // Name and units for rise time
-  value-names =  rise-time
-  value-units =  s
-
-  // Number of locations where physical properties are given
-  // 1 location -> data is uniform -> data dimension is 0
-  num-locs = 1
-  data-dim = 0
-
-  // Problem is in 2-D
-  space-dim = 2
-
-  // Coordinate system (2-D with coordinates in meters)
-  cs-data = cartesian {
-    to-meters = 1.0
-    space-dim = 2
-  }
-}
-// Columns are x, y, rise-time
-0.0  0.0    2.0

Deleted: short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/kinematic_slip.spatialdb
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/kinematic_slip.spatialdb	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/kinematic_slip.spatialdb	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,25 +0,0 @@
-#SPATIAL.ascii 1
-SimpleDB {
-  // number of values for final slip
-  num-values = 2
-
-  // Names and units of final slip values
-  value-names =  left-lateral-slip  fault-opening
-  value-units =  m  m
-
-  // Number of locations where physical properties are given
-  // 1 location -> data is uniform -> data dimension is 0
-  num-locs = 1
-  data-dim = 0
-
-  // Problem is in 2-D
-  space-dim = 2
-
-  // Coordinate system (2-D with coordinates in meters)
-  cs-data = cartesian {
-    to-meters = 1.0
-    space-dim = 2
-  }
-}
-// Columns are x, y, left-lateral-slip, fault-opening
-0.0  0.0   1.0  0.0

Deleted: short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/kinematic_sliptime.spatialdb
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/kinematic_sliptime.spatialdb	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/kinematic_sliptime.spatialdb	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,25 +0,0 @@
-#SPATIAL.ascii 1
-SimpleDB {
-  // number of values for slip initiation time
-  num-values = 1
-
-  // Names and units of slip initiation time
-  value-names =  slip-time
-  value-units =  s
-
-  // Number of locations where physical properties are given
-  // 1 location -> data is uniform -> data dimension is 0
-  num-locs = 1
-  data-dim = 0
-
-  // Problem is in 2-D
-  space-dim = 2
-
-  // Coordinate system (2-D with coordinates in meters)
-  cs-data = cartesian {
-    to-meters = 1.0
-    space-dim = 2
-  }
-}
-// Columns are x, y, slip-time
-0.0 0.0   0.1

Copied: short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/prescribedrup.cfg (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/examples/bar_shearwave/quad4/prescribedrup.cfg)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/prescribedrup.cfg	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/prescribedrup.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -0,0 +1,72 @@
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# PROBLEM DESCRIPTION
+# ----------------------------------------------------------------------
+
+# Impose 1.0 m of left-lateral slip at time 0.1 s with slip rate
+# following Brune's far-field time function. The rise time (95% of the
+# final slip) is 2.0 s.
+#
+# The fault slip causes a shear wave to propagate down the bar. The
+# shear wave is absorbed at the lateral ends of the bar using the
+# absorbing dampers boundary condition.
+
+# ----------------------------------------------------------------------
+# RUNNING THE SIMULATION
+# ----------------------------------------------------------------------
+
+# This is not a self-contained simulation configuration file. This
+# file only specifies the specific parameters for an explicit
+# time-stepping problem using a fault with prescribed rupture.
+#
+# To run the simulation:
+# pylith prescribedrup.cfg
+
+# ----------------------------------------------------------------------
+# journal
+# ----------------------------------------------------------------------
+# Turn on progress for the prescribed rupture fault.
+[pylithapp.journal.info]
+faultcohesivekin = 1
+
+# ----------------------------------------------------------------------
+# faults
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.interfaces]
+fault = pylith.faults.FaultCohesiveKin
+
+[pylithapp.timedependent.interfaces.fault]
+# Switch to Brune slip time function
+eq_srcs.rupture.slip_function = pylith.faults.BruneSlipFn
+
+[pylithapp.timedependent.interfaces.fault.eq_srcs.rupture.slip_function]
+
+# Database specifying the final slip.
+slip.label = Final slip
+slip.iohandler.filename = prescribedrup_slip.spatialdb
+
+# Database specifying rise_time.
+rise_time.label = Rise time
+rise_time.iohandler.filename = prescribedrup_risetime.spatialdb
+
+# Database specifying time at which slip begins at each point.
+slip_time.label = Slip initiation time
+slip_time.iohandler.filename = prescribedrup_sliptime.spatialdb
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+# Set the filename for each type of output.
+
+# Give basename for VTK domain output of solution over domain.
+[pylithapp.problem.formulation.output.output]
+writer.filename = output/prescribedrup.vtk
+
+# Give basename for VTK fault output.
+[pylithapp.timedependent.interfaces.fault.output]
+writer.filename = output/prescribedrup-fault.vtk
+
+# Give basename for VTK output of state variables.
+[pylithapp.timedependent.materials.elastic.output]
+writer.filename = output/prescribedrup-statevars.vtk

Copied: short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/prescribedrup_risetime.spatialdb (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/examples/bar_shearwave/quad4/prescribedrup_risetime.spatialdb)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/prescribedrup_risetime.spatialdb	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/prescribedrup_risetime.spatialdb	2012-11-01 17:04:11 UTC (rev 20976)
@@ -0,0 +1,25 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  // number of values for rise time
+  num-values = 1
+
+  // Name and units for rise time
+  value-names =  rise-time
+  value-units =  s
+
+  // Number of locations where physical properties are given
+  // 1 location -> data is uniform -> data dimension is 0
+  num-locs = 1
+  data-dim = 0
+
+  // Problem is in 2-D
+  space-dim = 2
+
+  // Coordinate system (2-D with coordinates in meters)
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 2
+  }
+}
+// Columns are x, y, rise-time
+0.0  0.0    2.0

Copied: short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/prescribedrup_slip.spatialdb (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/examples/bar_shearwave/quad4/prescribedrup_slip.spatialdb)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/prescribedrup_slip.spatialdb	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/prescribedrup_slip.spatialdb	2012-11-01 17:04:11 UTC (rev 20976)
@@ -0,0 +1,25 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  // number of values for final slip
+  num-values = 2
+
+  // Names and units of final slip values
+  value-names =  left-lateral-slip  fault-opening
+  value-units =  m  m
+
+  // Number of locations where physical properties are given
+  // 1 location -> data is uniform -> data dimension is 0
+  num-locs = 1
+  data-dim = 0
+
+  // Problem is in 2-D
+  space-dim = 2
+
+  // Coordinate system (2-D with coordinates in meters)
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 2
+  }
+}
+// Columns are x, y, left-lateral-slip, fault-opening
+0.0  0.0   1.0  0.0

Copied: short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/prescribedrup_sliptime.spatialdb (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/examples/bar_shearwave/quad4/prescribedrup_sliptime.spatialdb)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/prescribedrup_sliptime.spatialdb	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/prescribedrup_sliptime.spatialdb	2012-11-01 17:04:11 UTC (rev 20976)
@@ -0,0 +1,25 @@
+#SPATIAL.ascii 1
+SimpleDB {
+  // number of values for slip initiation time
+  num-values = 1
+
+  // Names and units of slip initiation time
+  value-names =  slip-time
+  value-units =  s
+
+  // Number of locations where physical properties are given
+  // 1 location -> data is uniform -> data dimension is 0
+  num-locs = 1
+  data-dim = 0
+
+  // Problem is in 2-D
+  space-dim = 2
+
+  // Coordinate system (2-D with coordinates in meters)
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 2
+  }
+}
+// Columns are x, y, slip-time
+0.0 0.0   0.1

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/pylithapp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/pylithapp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # This is not a self-contained simulation configuration file. This
@@ -173,28 +172,6 @@
 # PETSc
 # ----------------------------------------------------------------------
 [pylithapp.petsc]
-
-# Preconditioner settings.
-pc_type = asm
-sub_pc_factor_shift_type = nonzero
-
-# Convergence parameters.
-ksp_rtol = 1.0e-8
-ksp_atol = 1.0e-12
-ksp_max_it = 500
-ksp_gmres_restart = 100
-snes_max_it = 500
-
-# Linear solver monitoring options.
-ksp_monitor = true
-ksp_view = true
-ksp_converged_reason = true
-
-# Nonlinear solver monitoring options.
-snes_monitor = true
-snes_view = true
-snes_converged_reason = true
-
 # PETSc summary -- useful for performance information.
 log_summary = true
 

Copied: short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/spontaneousrup.cfg (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/examples/bar_shearwave/quad4/spontaneousrup.cfg)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/spontaneousrup.cfg	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/spontaneousrup.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -0,0 +1,40 @@
+[pylithapp]
+
+# This is not a self-contained simulation configuration file. This
+# file only specifies the general parameters common to the dynamic
+# fault (friction interface) simulations in this directory.
+
+# ----------------------------------------------------------------------
+# journal
+# ----------------------------------------------------------------------
+# Turn on progress for the dynamic fault.
+[pylithapp.journal.info]
+faultcohesivedyn = 1
+
+# ----------------------------------------------------------------------
+# faults
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.interfaces]
+# Change fault to dynamic fault interface.
+fault = pylith.faults.FaultCohesiveDyn
+
+[pylithapp.timedependent.interfaces.fault]
+# Specify the initial tractions on the fault using a uniform DB.
+#  shear: 6.1 MPa (right-lateral)
+#  normal 10 MPa (compressive)
+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=[traction_initial_value]
+vertex_data_fields=[slip,slip_rate,traction]
+skip = 1
+writer.time_format = %05.2f

Copied: short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/spontaneousrup_ratestateageing.cfg (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/examples/bar_shearwave/quad4/spontaneousrup_ratestateageing.cfg)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/spontaneousrup_ratestateageing.cfg	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/spontaneousrup_ratestateageing.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -0,0 +1,66 @@
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# PROBLEM DESCRIPTION
+# ----------------------------------------------------------------------
+
+# Use constant initial tractions on the fault to drive fault slip
+# subject to rate- and state-friction on the fault. Deformation
+# propagates to the edges of the bar where it is absorbed using
+# absorbing dampers boundary conditions. The steady state solution is
+# a constant slip rate on the fault with uniform strain in the bar.
+
+# ----------------------------------------------------------------------
+# RUNNING THE SIMULATION
+# ----------------------------------------------------------------------
+
+# This is not a self-contained simulation configuration file. This
+# file only specifies the specific parameters for an explicit
+# time-stepping problem using a dynamic fault interface condition with
+# static friction.
+#
+# To run the simulation:
+# pylith dynamicfault.cfg staticfriction.cfg
+#
+# Output will be directed to the directory output.
+
+# ----------------------------------------------------------------------
+# faults
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.interfaces.fault]
+
+# Use rate- and state-friction with the ageing law for evolution of
+# the state variable.
+friction = pylith.friction.RateStateAgeing
+friction.label = Rate and state
+
+# Set the friction model parameters.
+#  reference coefficient of friction: 0.6
+#  reference slip rate: 1.0e-06 m/s
+#  slip weakening parameter: 0.037 m
+#  a: 0.0125
+#  b: 0.0172
+#  cohesion: 0 Pa
+friction.db_properties = spatialdata.spatialdb.UniformDB
+friction.db_properties.label = Rate State Ageing
+friction.db_properties.values = [reference-friction-coefficient,reference-slip-rate,characteristic-slip-distance,constitutive-parameter-a,constitutive-parameter-b,cohesion]
+friction.db_properties.data = [0.6,1.0e-6*m/s,0.0370*m,0.0125,0.0172,0.0*Pa]
+
+# Set spatial database for the initial value of the state variable.
+friction.db_initial_state = spatialdata.spatialdb.UniformDB
+friction.db_initial_state.label = Rate State Ageing State
+friction.db_initial_state.values = [state-variable]
+friction.db_initial_state.data = [92.7*s]
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+# Set filenames for output.
+[pylithapp.problem.formulation.output.output]
+writer.filename = output/ratestateageing.vtk
+
+[pylithapp.timedependent.interfaces.fault.output]
+writer.filename = output/ratestateageing-fault.vtk
+
+[pylithapp.timedependent.materials.elastic.output]
+writer.filename = output/ratestateageing-statevars.vtk

Copied: short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/spontaneousrup_slipweakening.cfg (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/examples/bar_shearwave/quad4/spontaneousrup_slipweakening.cfg)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/spontaneousrup_slipweakening.cfg	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/spontaneousrup_slipweakening.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -0,0 +1,65 @@
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# PROBLEM DESCRIPTION
+# ----------------------------------------------------------------------
+
+# Use constant initial tractions on the fault to drive fault slip
+# subject to linear slip-weakening friction on the fault. Deformation
+# propagates to the edges of the bar where it is absorbed using
+# absorbing dampers boundary conditions. The steady state solution is
+# a constant slip rate on the fault with uniform strain in the bar.
+
+# ----------------------------------------------------------------------
+# RUNNING THE SIMULATION
+# ----------------------------------------------------------------------
+
+# This is not a self-contained simulation configuration file. This
+# file only specifies the specific parameters for an explicit
+# time-stepping problem using a dynamic fault interface condition with
+# linear slip-weakening friction.
+#
+# To run the simulation:
+# pylith dynamicfault.cfg slipweakening.cfg
+#
+# Output will be directed to the directory output.
+
+# ----------------------------------------------------------------------
+# faults
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.interfaces.fault]
+
+# Use slip-weakening friction
+friction = pylith.friction.SlipWeakening
+friction.label = Slip weakening
+
+# Set the slip-weakening friction model parameters.
+#  static coefficient of friction: 0.6
+#  dynamic coefficient of friction: 0.5
+#  slip-weakening parameter: 0.2 m
+#  cohesion: 0 Pa
+friction.db_properties = spatialdata.spatialdb.UniformDB
+friction.db_properties.label = Slip weakening
+friction.db_properties.values = [static-coefficient,dynamic-coefficient,slip-weakening-parameter,cohesion]
+friction.db_properties.data = [0.6,0.5,0.2*m,0.0*Pa]
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+[pylithapp.problem.formulation.output.output]
+writer.filename = output/slipweakening.vtk
+
+[pylithapp.timedependent.interfaces.fault.output]
+writer.filename = output/slipweakening-fault.vtk
+
+# Add friction model parameters to fault info file in addition to
+# default values.
+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.
+vertex_data_fields = [slip,traction,cumulative_slip,previous_slip]
+
+
+[pylithapp.timedependent.materials.elastic.output]
+writer.filename = output/slipweakening-statevars.vtk

Copied: short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/spontaneousrup_staticfriction.cfg (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/examples/bar_shearwave/quad4/spontaneousrup_staticfriction.cfg)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/spontaneousrup_staticfriction.cfg	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/quad4/spontaneousrup_staticfriction.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -0,0 +1,53 @@
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# PROBLEM DESCRIPTION
+# ----------------------------------------------------------------------
+
+# Use constant initial tractions on the fault to drive fault slip
+# subject to static friction on the fault. Deformation propagates to
+# the edges of the bar where it is absorbed using absorbing dampers
+# boundary conditions. The steady state solution is a constant slip
+# rate on the fault with uniform strain in the bar.
+
+# ----------------------------------------------------------------------
+# RUNNING THE SIMULATION
+# ----------------------------------------------------------------------
+
+# This is not a self-contained simulation configuration file. This
+# file only specifies the specific parameters for an explicit
+# time-stepping problem using a dynamic fault interface condition with
+# static friction.
+#
+# To run the simulation:
+# pylith dynamicfault.cfg staticfriction.cfg
+
+# ----------------------------------------------------------------------
+# faults
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.interfaces.fault]
+
+# Use static friction
+friction = pylith.friction.StaticFriction
+friction.label = Static friction
+
+# Set the static friction model parameters.
+#  static coefficient of friction: 0.6
+#  cohesion: 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.6,0.0*Pa]
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+# Set filenames for output.
+[pylithapp.problem.formulation.output.output]
+writer.filename = output/staticfriction.vtk
+
+[pylithapp.timedependent.interfaces.fault.output]
+writer.filename = output/staticfriction-fault.vtk
+
+[pylithapp.timedependent.materials.elastic.output]
+writer.filename = output/staticfriction-statevars.vtk

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/tet4/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/tet4/pylithapp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/tet4/pylithapp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------
@@ -60,12 +59,9 @@
 # Change to an explicit time stepping formulation
 formulation = pylith.problems.Explicit
 
-# Uncomment next line to use lumped formulation.
-#formulation = pylith.problems.ExplicitLumped
-
 # Uncomment next line to use optimized lumped formulation and change
 # the quadrature order of the bulk material to 1.
-#formulation = pylith.problems.ExplicitLumpedTet4
+#formulation = pylith.problems.ExplicitTet4
 
 # Nondimensionalize problem using wave propagation parameters.
 normalizer = spatialdata.units.NondimElasticDynamic
@@ -217,19 +213,6 @@
 # PETSc
 # ----------------------------------------------------------------------
 [pylithapp.petsc]
-ksp_type = gmres
-pc_type = asm
-
-# Change the preconditioner settings.
-sub_pc_factor_shift_type = nonzero
-
-ksp_rtol = 1.0e-8
-ksp_atol = 1.0e-10
-ksp_max_it = 50
-ksp_gmres_restart = 75
-
-ksp_monitor = true
-#ksp_view = true
 #log_summary = true
 
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/tri3/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/tri3/pylithapp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/bar_shearwave/tri3/pylithapp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------
@@ -59,7 +58,7 @@
 
 # Change to an explicit time stepping formulation
 formulation = pylith.problems.Explicit
-#formulation = pylith.problems.ExplicitLumpedTri3
+#formulation = pylith.problems.ExplicitTri3
 
 # Nondimensionalize problem using wave propagation parameters.
 normalizer = spatialdata.units.NondimElasticDynamic
@@ -198,19 +197,6 @@
 # PETSc
 # ----------------------------------------------------------------------
 [pylithapp.petsc]
-ksp_type = gmres
-pc_type = asm
-
-# Change the preconditioner settings.
-sub_pc_factor_shift_type = nonzero
-
-ksp_rtol = 1.0e-8
-ksp_atol = 1.0e-10
-ksp_max_it = 50
-ksp_gmres_restart = 25
-
-#ksp_monitor = true
-#ksp_view = true
 log_summary = true
 
 
@@ -237,6 +223,7 @@
 
 # Give basename for VTK output of state variables.
 [pylithapp.timedependent.materials.elastic.output]
+cell_info_fields = [mu,lambda,density,stable_dt_explicit]
 skip = 29
 writer.filename = output/shearwave-statevars.vtk
 writer.time_format = %05.2f

Deleted: short/3D/PyLith/branches/pylith-scecdynrup/examples/greensfns/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/greensfns/Makefile.am	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/greensfns/Makefile.am	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/greensfns/hex8/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/greensfns/hex8/Makefile.am	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/greensfns/hex8/Makefile.am	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/greensfns/hex8/README
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/greensfns/hex8/README	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/greensfns/hex8/README	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/greensfns/hex8/gfgen.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/greensfns/hex8/gfgen.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/greensfns/hex8/gfgen.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [gfgen]
 
 # Configuration file for gfgen.py application.

Deleted: short/3D/PyLith/branches/pylith-scecdynrup/examples/greensfns/hex8/gfimpulses/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/greensfns/hex8/gfimpulses/Makefile.am	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/greensfns/hex8/gfimpulses/Makefile.am	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/greensfns/hex8/gfoutput.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/greensfns/hex8/gfoutput.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/greensfns/hex8/gfoutput.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # This is not a self-contained simulation configuration file. This

Deleted: short/3D/PyLith/branches/pylith-scecdynrup/examples/greensfns/hex8/gfresponses/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/greensfns/hex8/gfresponses/Makefile.am	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/greensfns/hex8/gfresponses/Makefile.am	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/greensfns/hex8/gfspatialdb/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/greensfns/hex8/gfspatialdb/Makefile.am	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/greensfns/hex8/gfspatialdb/Makefile.am	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/greensfns/hex8/initial-run.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/greensfns/hex8/initial-run.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/greensfns/hex8/initial-run.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # This is not a self-contained simulation configuration file. This

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/greensfns/hex8/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/greensfns/hex8/pylithapp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/greensfns/hex8/pylithapp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/meshing/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/meshing/Makefile.am	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/meshing/Makefile.am	2012-11-01 17:04:11 UTC (rev 20976)
@@ -17,7 +17,8 @@
 #
 
 SUBDIRS = \
-	surface_nurbs
+	surface_nurbs \
+	cubit_cellsize
 
 
 # End of file 

Copied: short/3D/PyLith/branches/pylith-scecdynrup/examples/meshing/cubit_cellsize (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/examples/meshing/cubit_cellsize)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/meshing/surface_nurbs/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/meshing/surface_nurbs/Makefile.am	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/meshing/surface_nurbs/Makefile.am	2012-11-01 17:04:11 UTC (rev 20976)
@@ -19,7 +19,8 @@
 SUBDIRS = \
 	contours \
 	dem \
-	triangles
+	triangles \
+	merge_surfs
 
 
 dist_noinst_DATA = \

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/meshing/surface_nurbs/contours/cont2lines.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/meshing/surface_nurbs/contours/cont2lines.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/meshing/surface_nurbs/contours/cont2lines.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [cont2lines]
 in_file = hikurangi_shiftrot_fill.txt
 out_root = journal/hikurangi_shiftrot_fill

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/meshing/surface_nurbs/contours/fill_contours.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/meshing/surface_nurbs/contours/fill_contours.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/meshing/surface_nurbs/contours/fill_contours.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [fill_contours]
 in_file = hikurangi_shiftrot.txt
 out_file = hikurangi_shiftrot_fill.txt

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/meshing/surface_nurbs/dem/dem2lines.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/meshing/surface_nurbs/dem/dem2lines.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/meshing/surface_nurbs/dem/dem2lines.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [dem2lines]
 input_dem = ruapehu-nzmg-1km.txt
 vtk_output_file = ruapehu-nzmg-1km-resampled.vtk

Copied: short/3D/PyLith/branches/pylith-scecdynrup/examples/meshing/surface_nurbs/merge_surfs (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/examples/meshing/surface_nurbs/merge_surfs)

Deleted: short/3D/PyLith/branches/pylith-scecdynrup/examples/meshing/surface_nurbs/shiftrot.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/meshing/surface_nurbs/shiftrot.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/meshing/surface_nurbs/shiftrot.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,137 +0,0 @@
-#!/usr/bin/env python
-
-## @file shiftrot.py
-
-## @brief Python application to take a set of (x,y,z) points from an ASCII file,
-## shift them in the (x,y) plane by a given amount, and then rotate them about
-## the origin by a given amount in the (x,y) plane (shifting occurs in the old
-## coordinate system).
-## It is assumed that the input coordinates and the shift values have the same
-## units.
-
-import math
-import pdb
-
-from pyre.applications.Script import Script as Application
-
-class ShiftRot(Application):
-  """
-  Python application to take a set of (x,y,z) points from an ASCII file,
-  shift them in the (x,y) plane by a given amount, and then rotate them about
-  the origin by a given amount in the (x,y) plane (shifting occurs in the old
-  coordinate system).
-  It is assumed that the input coordinates and the shift values have the same
-  units.
-  """
-
-  class Inventory(Application.Inventory):
-    """
-    Python object for managing ShiftRot facilities and properties.
-    """
-    
-    ## @class Inventory
-    ## Python object for managing ShiftRot facilities and properties.
-    ##
-    ## \b Properties
-    ## @li \b in_file Input file containing original coordinates.
-    ## @li \b out_file Output file containing shifted and rotated coordinates.
-    ## @li \b x_shift Amount by which to shift coordinates in the x-direction.
-    ## @li \b y_shift Amount by which to shift coordinates in the y-direction.
-    ## @li \b rot_angle Amount by which to rotate coordinates.
-    ## @li \b scale_factor Amount by which to scale coordinates.
-
-    import pyre.inventory
-    from pyre.units.angle import degree
-    
-    inFile = pyre.inventory.str("in_file", default="in_file.txt")
-    inFile.meta['tip'] = "Input file containing original coordinates."
-    
-    outFile = pyre.inventory.str("out_file", default="out_file.txt")
-    outFile.meta['tip'] = "Output file with shifted and rotated coordoutates."
-    
-    xShift = pyre.inventory.float("x_shift", default=0.0)
-    xShift.meta['tip'] = "X-shift to apply to coordinates."
-    
-    yShift = pyre.inventory.float("y_shift", default=0.0)
-    yShift.meta['tip'] = "Y-shift to apply to coordinates."
-    
-    rotAngle = pyre.inventory.dimensional("rot_angle", default=0.0*degree)
-    rotAngle.meta['tip'] = "Amount by which to rotate coordinates."
-    
-    scaleFactor = pyre.inventory.float("scale_factor", default=1.0)
-    scaleFactor.meta['tip'] = "Scaling factor to apply to results."
-
-
-  # PUBLIC METHODS /////////////////////////////////////////////////////
-
-  def __init__(self, name="shiftrot"):
-    Application.__init__(self, name)
-
-    return
-
-
-  def main(self):
-    # pdb.set_trace()
-    self._transformCoords()
-
-    return
-  
-
-  # PRIVATE METHODS /////////////////////////////////////////////////////
-
-  def _configure(self):
-    """
-    Setup members using inventory.
-    """
-    Application._configure(self)
-
-    # Filenames
-    self.inFile = self.inventory.inFile
-    self.outFile = self.inventory.outFile
-
-    # Parameters
-    self.xShift = self.inventory.xShift
-    self.yShift = self.inventory.yShift
-    self.rotAngle = self.inventory.rotAngle.value
-    self.scaleFactor = self.inventory.scaleFactor
-
-    return
-
-
-  def _transformCoords(self):
-    """
-    Rotate, shift, and scale coordinates.
-    """
-    # pdb.set_trace()
-    cosRot = math.cos(self.rotAngle)
-    sinRot = math.sin(self.rotAngle)
-
-    f = open(self.inFile, 'r')
-    g = open(self.outFile, 'w')
-
-    for line in f:
-      data = line.split()
-      x = float(data[0])
-      y = float(data[1])
-      z = float(data[2])
-      xTrans = self.scaleFactor * ( (x + self.xShift) * cosRot + \
-                                    (y + self.yShift) * sinRot)
-      yTrans = self.scaleFactor * (-(x + self.xShift) * sinRot + \
-                                   (y + self.yShift) * cosRot)
-      g.write('%.12f' % xTrans)
-      g.write('  %.12f' % yTrans)
-      g.write('  %.12f' % z)
-      g.write( '\n')
-
-    f.close()
-    g.close()
-
-    return
-
-# ----------------------------------------------------------------------
-if __name__ == '__main__':
-  app = ShiftRot()
-  app.run()
-
-# End of file
-

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/meshing/surface_nurbs/triangles/mkfacets.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/meshing/surface_nurbs/triangles/mkfacets.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/meshing/surface_nurbs/triangles/mkfacets.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/run_examples.sh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/run_examples.sh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/run_examples.sh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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
@@ -91,10 +91,10 @@
 
 # bar_shearwave/quad4
 dir="bar_shearwave/quad4"
-examples="kinematic.cfg"
+examples="prescribedrup.cfg"
 run_examples
-examples="dynamic_staticfriction.cfg dynamic_slipweakening.cfg dynamic_ratestateageing.cfg"
-run_examples2 "dynamic.cfg"
+examples="spontaneousrup_staticfriction.cfg spontaneousrup_slipweakening.cfg spontaneousrup_ratestateageing.cfg"
+run_examples2 "spontaneousrup.cfg"
 
 # bar_shearwave/tet4
 dir="bar_shearwave/tet4"
@@ -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/branches/pylith-scecdynrup/examples/twocells/twohex27-cubit/axialdisp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twohex27-cubit/axialdisp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twohex27-cubit/axialdisp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/twocells/twohex27-cubit/dislocation.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twohex27-cubit/dislocation.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twohex27-cubit/dislocation.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/twocells/twohex27-cubit/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twohex27-cubit/pylithapp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twohex27-cubit/pylithapp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/twocells/twohex27-cubit/sheardisp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twohex27-cubit/sheardisp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twohex27-cubit/sheardisp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/twocells/twohex8/axialdisp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twohex8/axialdisp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twohex8/axialdisp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/twocells/twohex8/dislocation.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twohex8/dislocation.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twohex8/dislocation.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/twocells/twohex8/dislocation_sliptime.spatialdb
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twohex8/dislocation_sliptime.spatialdb	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twohex8/dislocation_sliptime.spatialdb	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/twocells/twohex8/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twohex8/pylithapp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twohex8/pylithapp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/twocells/twohex8/sheardisp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twohex8/sheardisp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twohex8/sheardisp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/twocells/twoquad4/axialdisp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twoquad4/axialdisp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twoquad4/axialdisp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/twocells/twoquad4/axialtract.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twoquad4/axialtract.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twoquad4/axialtract.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/twocells/twoquad4/dislocation.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twoquad4/dislocation.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twoquad4/dislocation.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/twocells/twoquad4/dislocation_sliptime.spatialdb
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twoquad4/dislocation_sliptime.spatialdb	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twoquad4/dislocation_sliptime.spatialdb	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/twocells/twoquad4/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twoquad4/pylithapp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twoquad4/pylithapp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/twocells/twoquad4/sheardisp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twoquad4/sheardisp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twoquad4/sheardisp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/twocells/twotet4/axialdisp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotet4/axialdisp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotet4/axialdisp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/twocells/twotet4/dislocation.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotet4/dislocation.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotet4/dislocation.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/twocells/twotet4/dislocation_sliptime.spatialdb
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotet4/dislocation_sliptime.spatialdb	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotet4/dislocation_sliptime.spatialdb	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/twocells/twotet4/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotet4/pylithapp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotet4/pylithapp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/twocells/twotet4-geoproj/dislocation.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotet4-geoproj/dislocation.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotet4-geoproj/dislocation.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/twocells/twotet4-geoproj/dislocation_sliptime.spatialdb
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotet4-geoproj/dislocation_sliptime.spatialdb	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotet4-geoproj/dislocation_sliptime.spatialdb	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/twocells/twotet4-geoproj/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotet4-geoproj/pylithapp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotet4-geoproj/pylithapp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/twocells/twotri3/axialdisp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotri3/axialdisp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotri3/axialdisp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/twocells/twotri3/dislocation.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotri3/dislocation.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotri3/dislocation.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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

Modified: short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotri3/dislocation_sliptime.spatialdb
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotri3/dislocation_sliptime.spatialdb	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotri3/dislocation_sliptime.spatialdb	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/twocells/twotri3/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotri3/pylithapp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotri3/pylithapp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/examples/twocells/twotri3/sheardisp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotri3/sheardisp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/examples/twocells/twotri3/sheardisp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/libsrc/pylith/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/Makefile.am	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/Makefile.am	2012-11-01 17:04:11 UTC (rev 20976)
@@ -122,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/branches/pylith-scecdynrup/libsrc/pylith/bc/AbsorbingDampers.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/bc/AbsorbingDampers.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/bc/AbsorbingDampers.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -67,6 +67,7 @@
 void 
 pylith::bc::AbsorbingDampers::deallocate(void)
 { // deallocate
+  BCIntegratorSubMesh::deallocate();
   _db = 0; // :TODO: Use shared pointer
 } // deallocate
   

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/bc/Neumann.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/bc/Neumann.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/bc/Neumann.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -62,6 +62,7 @@
 void
 pylith::bc::Neumann::deallocate(void)
 { // deallocate
+  BCIntegratorSubMesh::deallocate();
   TimeDependent::deallocate();
 } // deallocate
   

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesive.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesive.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesive.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -56,6 +56,7 @@
 pylith::faults::FaultCohesive::deallocate(void)
 { // deallocate
   Fault::deallocate();
+  feassemble::Integrator<feassemble::Quadrature<topology::SubMesh> >::deallocate();
 
   delete _fields; _fields = 0;
 } // deallocate
@@ -120,53 +121,62 @@
   assert(0 != mesh);
   assert(std::string("") != label());
   
-  topology::SubMesh faultMesh;
-  ALE::Obj<SieveFlexMesh> faultBoundary;
+  try {
+    topology::SubMesh faultMesh;
+    ALE::Obj<SieveFlexMesh> faultBoundary;
   
-  // Get group of vertices associated with fault
-  const ALE::Obj<topology::Mesh::SieveMesh>& sieveMesh = mesh->sieveMesh();
-  assert(!sieveMesh.isNull());
-
-  if (!_useFaultMesh) {
-    if (!sieveMesh->hasIntSection(label())) {
-      std::ostringstream msg;
-      msg << "Mesh missing group of vertices '" << label()
-          << "' for fault interface condition.";
-      throw std::runtime_error(msg.str());
-    } // if  
-    const ALE::Obj<topology::Mesh::IntSection>& groupField = 
-      sieveMesh->getIntSection(label());
-    assert(!groupField.isNull());
-    CohesiveTopology::createFault(&faultMesh, faultBoundary, *mesh, groupField, 
-				  flipFault);
-
-    CohesiveTopology::create(mesh, faultMesh, faultBoundary, groupField, id(), 
-                             *firstFaultVertex, *firstLagrangeVertex, *firstFaultCell, useLagrangeConstraints());
-
-  } else {
-    //std::cout << "BEFORE ADJUSTING TOPOLOGY FOR FAULT '" << label() << "' firstFaultVertex: " << *firstFaultVertex << ", firstFaultCell: " << *firstFaultCell << std::endl;
-
-    const int faultDim = 2;
-    assert(3 == mesh->dimension());
-
-    meshio::UCDFaultFile::read(_faultMeshFilename.c_str(),
-			       &faultMesh, faultBoundary, *mesh);
-
-    // Set coordinates in fault mesh
-    const ALE::Obj<topology::SubMesh::SieveMesh>& faultSieveMesh = 
-      faultMesh.sieveMesh();
-    assert(!faultSieveMesh.isNull());
-    faultSieveMesh->setRealSection("coordinates", 
-				   sieveMesh->getRealSection("coordinates"));
-
-    const ALE::Obj<topology::Mesh::IntSection>& groupField = 
-      sieveMesh->getIntSection(label());
-    assert(!groupField.isNull());
-    CohesiveTopology::create(mesh, faultMesh, faultBoundary, groupField, id(),
-                             *firstFaultVertex, *firstLagrangeVertex, *firstFaultCell, useLagrangeConstraints());
-
-    //std::cout << "AFTER ADJUSTING TOPOLOGY FOR FAULT '" << label() << "' firstFaultVertex: " << *firstFaultVertex << ", firstFaultCell: " << *firstFaultCell << std::endl;
-  } // if/else
+    // Get group of vertices associated with fault
+    const ALE::Obj<topology::Mesh::SieveMesh>& sieveMesh = mesh->sieveMesh();
+    assert(!sieveMesh.isNull());
+    
+    if (!_useFaultMesh) {
+      if (!sieveMesh->hasIntSection(label())) {
+	std::ostringstream msg;
+	msg << "Mesh missing group of vertices '" << label()
+	    << "' for fault interface condition.";
+	throw std::runtime_error(msg.str());
+      } // if  
+      const ALE::Obj<topology::Mesh::IntSection>& groupField = 
+	sieveMesh->getIntSection(label());
+      assert(!groupField.isNull());
+      CohesiveTopology::createFault(&faultMesh, faultBoundary, *mesh, groupField, 
+				    flipFault);
+      
+      CohesiveTopology::create(mesh, faultMesh, faultBoundary, groupField, id(), 
+			       *firstFaultVertex, *firstLagrangeVertex, *firstFaultCell, useLagrangeConstraints());
+      
+    } else {
+      const int faultDim = 2;
+      assert(3 == mesh->dimension());
+      
+      meshio::UCDFaultFile::read(_faultMeshFilename.c_str(),
+				 &faultMesh, faultBoundary, *mesh);
+      
+      // Set coordinates in fault mesh
+      const ALE::Obj<topology::SubMesh::SieveMesh>& faultSieveMesh = 
+	faultMesh.sieveMesh();
+      assert(!faultSieveMesh.isNull());
+      faultSieveMesh->setRealSection("coordinates", 
+				     sieveMesh->getRealSection("coordinates"));
+      
+      const ALE::Obj<topology::Mesh::IntSection>& groupField = 
+	sieveMesh->getIntSection(label());
+      assert(!groupField.isNull());
+      CohesiveTopology::create(mesh, faultMesh, faultBoundary, groupField, id(),
+			       *firstFaultVertex, *firstLagrangeVertex, *firstFaultCell, useLagrangeConstraints());
+      
+    } // if/else
+  } catch (const ALE::Exception& err) {
+    std::ostringstream msg;
+    msg << "Error occurred while adjusting topology to create cohesive cells for fault '" << label() << "'.\n"
+	<< err.message();
+    throw std::runtime_error(msg.str());
+  } catch (const std::exception& err) {
+    std::ostringstream msg;
+    msg << "Error occurred while adjusting topology to create cohesive cells for fault '" << label() << "'.\n"
+	<< err.what();
+    throw std::runtime_error(msg.str());
+  }
 } // adjustTopology
 
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveDyn.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveDyn.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveDyn.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -93,10 +93,7 @@
   _friction = 0; // :TODO: Use shared pointer
 
   delete _jacobian; _jacobian = 0;
-  if (_ksp) {
-    PetscErrorCode err = KSPDestroy(&_ksp); _ksp = 0;
-    CHECK_PETSC_ERROR(err);
-  } // if
+  PetscErrorCode err = KSPDestroy(&_ksp);CHECK_PETSC_ERROR(err);
 } // deallocate
 
 // ----------------------------------------------------------------------
@@ -594,6 +591,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 =
@@ -644,19 +645,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));
@@ -664,8 +662,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
@@ -783,6 +780,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) {
@@ -799,12 +797,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
 
@@ -853,7 +852,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
@@ -926,6 +926,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;
@@ -1123,25 +1130,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
 
@@ -1901,13 +1914,10 @@
   // 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);
@@ -1918,12 +1928,9 @@
   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();
@@ -1946,57 +1953,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();
+    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;
+	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
 
 // ----------------------------------------------------------------------
@@ -2007,7 +2044,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;
@@ -2115,11 +2152,12 @@
   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();
 
@@ -2246,34 +2284,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);
@@ -2285,24 +2331,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)
@@ -2311,13 +2353,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
@@ -2431,7 +2471,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
 
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveImpulses.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveImpulses.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveImpulses.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -256,6 +256,10 @@
         _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)");

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveLagrange.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveLagrange.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveLagrange.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1417,7 +1417,7 @@
   } // for
   PetscLogFlops(count * orientationSize * 4);
 
-  if (1 == cohesiveDim && vertices->size() > 0) {
+  if (1 == cohesiveDim) {
     // Default sense of positive slip is left-lateral and
     // fault-opening.
     // 
@@ -1437,21 +1437,28 @@
     // opposite of what we would want, but we cannot flip the fault
     // normal direction because it is tied to how the cohesive cells
     // are created.
-    assert(vertices->size() > 0);
-    orientationSection->restrictPoint(*vertices->begin(),
-      &orientationVertex[0], orientationVertex.size());
+    int flipLocal = 0;
+    if (vertices->size() > 0) {
+      orientationSection->restrictPoint(*vertices->begin(), &orientationVertex[0], orientationVertex.size());
 
-    assert(2 == spaceDim);
-    const PylithScalar* shearDirVertex = &orientationVertex[0];
-    const PylithScalar* normalDirVertex = &orientationVertex[2];
-    const PylithScalar shearDirDot = 
-      upDir[0] * shearDirVertex[0] + upDir[1] * shearDirVertex[1];
-    const PylithScalar normalDirDot = 
-      upDir[0] * normalDirVertex[0] + upDir[1] * normalDirVertex[1];
+      assert(2 == spaceDim);
+      const PylithScalar* shearDirVertex = &orientationVertex[0];
+      const PylithScalar* normalDirVertex = &orientationVertex[2];
+      const PylithScalar shearDirDot = 
+	upDir[0] * shearDirVertex[0] + upDir[1] * shearDirVertex[1];
+      const PylithScalar normalDirDot = 
+	upDir[0] * normalDirVertex[0] + upDir[1] * normalDirVertex[1];
+      if (normalDirDot * shearDirDot < 0.0) {
+	flipLocal = 1;
+      } // if
+    } // if
+    // Collect flip decisions across all processors
+    int flipGlobal = 0;
+    MPI_Allreduce(&flipLocal, &flipGlobal, 1, MPI_INT, MPI_SUM, faultSieveMesh->comm());
 
     const int ishear = 0;
     const int inormal = 2;
-    if (normalDirDot * shearDirDot < 0.0) {
+    if (flipGlobal > 0) { // flip in any processor wants to flip
       // Flip shear direction
       for (SieveSubMesh::label_sequence::iterator v_iter=verticesBegin; 
 	   v_iter != verticesEnd;
@@ -1468,11 +1475,7 @@
       PetscLogFlops(3 + count * 2);
     } // if
 
-  } else if (2 == cohesiveDim && vertices->size() > 0) {
-    // Check orientation of first vertex, if dot product of fault
-    // normal with preferred normal is negative, flip up/down dip
-    // direction.
-    //
+  } else if (2 == cohesiveDim) {
     // Check orientation of first vertex, (1) if dot product of the
     // normal-dir with preferred up-dir is positive, then we want dot
     // product of shear-dir and preferred up-dir to be positive and
@@ -1486,32 +1489,38 @@
     // are used are the opposite of what we would want, but we cannot
     // flip the fault normal direction because it is tied to how the
     // cohesive cells are created.
+    int flipLocal = 0;
+    if (vertices->size() > 0) {
+      orientationSection->restrictPoint(*vertices->begin(), &orientationVertex[0], orientationVertex.size());
 
-    assert(vertices->size() > 0);
-    orientationSection->restrictPoint(*vertices->begin(),
-      &orientationVertex[0], orientationVertex.size());
+      assert(3 == spaceDim);
+      const PylithScalar* dipDirVertex = &orientationVertex[3];
+      const PylithScalar* normalDirVertex = &orientationVertex[6];
+      const PylithScalar dipDirDot = 
+	upDir[0]*dipDirVertex[0] + 
+	upDir[1]*dipDirVertex[1] + 
+	upDir[2]*dipDirVertex[2];
+      const PylithScalar normalDirDot = 
+	upDir[0]*normalDirVertex[0] +
+	upDir[1]*normalDirVertex[1] +
+	upDir[2]*normalDirVertex[2];
 
-    assert(3 == spaceDim);
-    const PylithScalar* dipDirVertex = &orientationVertex[3];
-    const PylithScalar* normalDirVertex = &orientationVertex[6];
-    const PylithScalar dipDirDot = 
-      upDir[0]*dipDirVertex[0] + 
-      upDir[1]*dipDirVertex[1] + 
-      upDir[2]*dipDirVertex[2];
-    const PylithScalar normalDirDot = 
-      upDir[0]*normalDirVertex[0] +
-      upDir[1]*normalDirVertex[1] +
-      upDir[2]*normalDirVertex[2];
+      if (dipDirDot * normalDirDot < 0.0 || fabs(normalDirVertex[2] + 1.0) < 0.001) {
+	// if fault normal is (0,0,+-1) then up-dir dictates reverse
+	// motion for case with normal (0,0,1), so we reverse the dip-dir
+	// if we have (0,0,-1).
+	flipLocal = 1;
+      } // if
+    } // if
 
+    // Collect flip decisions across all processors
+    int flipGlobal = 0;
+    MPI_Allreduce(&flipLocal, &flipGlobal, 1, MPI_INT, MPI_SUM, faultSieveMesh->comm());
+
     const int istrike = 0;
     const int idip = 3;
     const int inormal = 6;
-    if (dipDirDot * normalDirDot < 0.0 ||
-	fabs(normalDirVertex[2] + 1.0) < 0.001) {
-      // if fault normal is (0,0,+-1) then up-dir dictates reverse
-      // motion for case with normal (0,0,1), so we reverse the dip-dir
-      // if we have (0,0,-1).
-
+    if (flipGlobal > 0) { // flip in any processor wants to flip
       // Flip dip direction
       for (SieveSubMesh::label_sequence::iterator v_iter = verticesBegin; v_iter
 	     != verticesEnd; ++v_iter) {
@@ -1535,8 +1544,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();
@@ -1569,6 +1579,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());

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveLagrange.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveLagrange.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/FaultCohesiveLagrange.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -278,16 +278,6 @@
 			       const topology::Jacobian& jacobian,
 			       const topology::SolutionFields& fields);
 
-  // PROTECTED MEMBERS //////////////////////////////////////////////////
-protected :
-
-  /// Array of cohesive vertex information.
-  std::vector<CohesiveInfo> _cohesiveVertices;
-
-  /// Map label of cohesive cell to label of cells in fault mesh.
-  std::map<topology::Mesh::SieveMesh::point_type,
-           topology::SubMesh::SieveMesh::point_type> _cohesiveToFault;
-
   // PRIVATE METHODS ////////////////////////////////////////////////////
 private :
 
@@ -305,6 +295,16 @@
   /// Calculate fault area field.
   void _calcArea(void);
 
+  // PROTECTED MEMBERS //////////////////////////////////////////////////
+protected :
+
+  /// Array of cohesive vertex information.
+  std::vector<CohesiveInfo> _cohesiveVertices;
+
+  /// Map label of cohesive cell to label of cells in fault mesh.
+  std::map<topology::Mesh::SieveMesh::point_type,
+           topology::SubMesh::SieveMesh::point_type> _cohesiveToFault;
+
   // NOT IMPLEMENTED ////////////////////////////////////////////////////
 private :
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/TopologyOps.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/TopologyOps.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/faults/TopologyOps.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -116,7 +116,12 @@
     }
     assert(classifySize < vReplaceCells.size() + vNoReplaceCells.size());
     classifySize = vReplaceCells.size() + vNoReplaceCells.size();
-    assert(classifySize <= classifyTotal);
+    if (classifySize > classifyTotal) {
+      std::ostringstream msg;
+      msg << "Error classifying cells during creation of cohesive cells.\n"
+	  << "  classifySize: " << classifySize << ", classifyTotal: " << classifyTotal;
+      throw std::logic_error(msg.str());
+    } // if
   }
   replaceCells.insert(vReplaceCells.begin(), vReplaceCells.end());
   // More checking

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/CellGeometry.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/CellGeometry.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/CellGeometry.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -151,6 +151,14 @@
 		const int dim,
 		const int npts) const = 0;
 
+  /** Compute minimum width across cell.
+   *
+   * @param coordinatesCell Coordinates of vertices in cell.
+   * @returns Minimum width across cell.
+   */
+  virtual
+  PylithScalar minCellWidth(const scalar_array& coordinatesCell) const = 0;
+
   /** Compute orientation of cell at location.
    *
    * The orientation is returned as an array of direction cosines

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/ElasticityExplicit.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/ElasticityExplicit.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/ElasticityExplicit.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -83,6 +83,15 @@
 } // timeStep
 
 // ----------------------------------------------------------------------
+// Get stable time step for advancing from time t to time t+dt.
+PylithScalar
+pylith::feassemble::ElasticityExplicit::stableTimeStep(const topology::Mesh& mesh) const
+{ // stableTimeStep
+  assert(_material);
+  return _material->stableTimeStepExplicit(mesh, _quadrature);
+} // stableTimeStep
+
+// ----------------------------------------------------------------------
 // Set normalized viscosity for numerical damping.
 void
 pylith::feassemble::ElasticityExplicit::normViscosity(const PylithScalar viscosity)
@@ -112,10 +121,9 @@
 // ----------------------------------------------------------------------
 // Integrate constributions to residual term (r) for operator.
 void
-pylith::feassemble::ElasticityExplicit::integrateResidual(
-			  const topology::Field<topology::Mesh>& residual,
-			  const PylithScalar t,
-			  topology::SolutionFields* const fields)
+pylith::feassemble::ElasticityExplicit::integrateResidual(const topology::Field<topology::Mesh>& residual,
+							  const PylithScalar t,
+							  topology::SolutionFields* const fields)
 { // integrateResidual
   /// Member prototype for _elasticityResidualXD()
   typedef void (pylith::feassemble::ElasticityExplicit::*elasticityResidual_fn_type)
@@ -153,282 +161,6 @@
    */
   if (cellDim != spaceDim)
     throw std::logic_error("Integration for cells with spatial dimensions "
-			   "different than the spatial dimension of the "
-			   "domain not implemented yet.");
-
-  // Set variables dependent on dimension of cell
-  totalStrain_fn_type calcTotalStrainFn;
-  elasticityResidual_fn_type elasticityResidualFn;
-  switch (cellDim) {
-  case 1 :
-    elasticityResidualFn = 
-      &pylith::feassemble::ElasticityExplicit::_elasticityResidual1D;
-    calcTotalStrainFn = 
-      &pylith::feassemble::IntegratorElasticity::_calcTotalStrain1D;
-    break;
-  case 2 :
-    elasticityResidualFn = 
-      &pylith::feassemble::ElasticityExplicit::_elasticityResidual2D;
-    calcTotalStrainFn = 
-      &pylith::feassemble::IntegratorElasticity::_calcTotalStrain2D;
-    break;
-  case 3 :
-    elasticityResidualFn = 
-      &pylith::feassemble::ElasticityExplicit::_elasticityResidual3D;
-    calcTotalStrainFn = 
-      &pylith::feassemble::IntegratorElasticity::_calcTotalStrain3D;
-    break;
-  default :
-    assert(0);
-    throw std::logic_error("Unknown cellDim in "
-			   "ElasticityExplicit::integrateResidual.");
-  } // switch
-
-  // Allocate vectors for cell values.
-  scalar_array strainCell(numQuadPts*tensorSize);
-  strainCell = 0.0;
-  scalar_array gravVec(spaceDim);
-  scalar_array quadPtsGlobal(numQuadPts*spaceDim);
-
-  // Get cell information
-  const ALE::Obj<SieveMesh>& sieveMesh = fields->mesh().sieveMesh();
-  assert(!sieveMesh.isNull());
-  const int materialId = _material->id();
-  const ALE::Obj<SieveMesh::label_sequence>& cells = 
-    sieveMesh->getLabelStratum("material-id", materialId);
-  assert(!cells.isNull());
-  const SieveMesh::label_sequence::iterator cellsBegin = cells->begin();
-  const SieveMesh::label_sequence::iterator cellsEnd = cells->end();
-
-  // Get sections
-  scalar_array accCell(numBasis*spaceDim);
-  const ALE::Obj<RealSection>& accSection = 
-    fields->get("acceleration(t)").section();
-  assert(!accSection.isNull());
-  RestrictVisitor accVisitor(*accSection, accCell.size(), &accCell[0]);
-  
-  scalar_array velCell(numBasis*spaceDim);
-  const ALE::Obj<RealSection>& velSection = 
-    fields->get("velocity(t)").section();
-  assert(!velSection.isNull());
-  RestrictVisitor velVisitor(*velSection, velCell.size(), &velCell[0]);
-  
-  scalar_array dispCell(numBasis*spaceDim);
-  scalar_array dispAdjCell(numBasis*spaceDim);
-  const ALE::Obj<RealSection>& dispSection = fields->get("disp(t)").section();
-  assert(!dispSection.isNull());
-  RestrictVisitor dispVisitor(*dispSection, dispCell.size(), &dispCell[0]);
-  
-  const ALE::Obj<RealSection>& residualSection = residual.section();
-  UpdateAddVisitor residualVisitor(*residualSection, &_cellVector[0]);
-
-  scalar_array coordinatesCell(numBasis*spaceDim);
-  const ALE::Obj<RealSection>& coordinates = 
-    sieveMesh->getRealSection("coordinates");
-  assert(!coordinates.isNull());
-  RestrictVisitor coordsVisitor(*coordinates, 
-				coordinatesCell.size(), &coordinatesCell[0]);
-
-  assert(0 != _normalizer);
-  const PylithScalar lengthScale = _normalizer->lengthScale();
-  const PylithScalar gravityScale = 
-    _normalizer->pressureScale() / (_normalizer->lengthScale() *
-				    _normalizer->densityScale());
-
-  const PylithScalar dt = _dt;
-  assert(_normViscosity > 0.0);
-  assert(dt > 0);
-  const PylithScalar viscosity = dt*_normViscosity;
-
-  _logger->eventEnd(setupEvent);
-#if !defined(DETAILED_EVENT_LOGGING)
-  _logger->eventBegin(computeEvent);
-#endif
-
-  // Loop over cells
-  for (SieveMesh::label_sequence::iterator c_iter=cellsBegin;
-       c_iter != cellsEnd;
-       ++c_iter) {
-    // Compute geometry information for current cell
-#if defined(DETAILED_EVENT_LOGGING)
-    _logger->eventBegin(geometryEvent);
-#endif
-#if defined(PRECOMPUTE_GEOMETRY)
-    _quadrature->retrieveGeometry(*c_iter);
-#else
-    coordsVisitor.clear();
-    sieveMesh->restrictClosure(*c_iter, coordsVisitor);
-    _quadrature->computeGeometry(coordinatesCell, *c_iter);
-#endif
-#if defined(DETAILED_EVENT_LOGGING)
-    _logger->eventEnd(geometryEvent);
-    _logger->eventBegin(stateVarsEvent);
-#endif
-
-    // Get state variables for cell.
-    _material->retrievePropsAndVars(*c_iter);
-
-#if defined(DETAILED_EVENT_LOGGING)
-    _logger->eventEnd(stateVarsEvent);
-    _logger->eventBegin(restrictEvent);
-#endif
-
-    // Reset element vector to zero
-    _resetCellVector();
-
-    // Restrict input fields to cell
-    accVisitor.clear();
-    sieveMesh->restrictClosure(*c_iter, accVisitor);
-
-    velVisitor.clear();
-    sieveMesh->restrictClosure(*c_iter, velVisitor);
-
-    dispVisitor.clear();
-    sieveMesh->restrictClosure(*c_iter, dispVisitor);
-
-#if defined(DETAILED_EVENT_LOGGING)
-    _logger->eventEnd(restrictEvent);
-    _logger->eventBegin(computeEvent);
-#endif
-
-    // Get cell geometry information that depends on cell
-    const scalar_array& basis = _quadrature->basis();
-    const scalar_array& basisDeriv = _quadrature->basisDeriv();
-    const scalar_array& jacobianDet = _quadrature->jacobianDet();
-    const scalar_array& quadPtsNondim = _quadrature->quadPts();
-
-    // Compute body force vector if gravity is being used.
-    if (0 != _gravityField) {
-      const spatialdata::geocoords::CoordSys* cs = fields->mesh().coordsys();
-      assert(0 != cs);
-
-      // Get density at quadrature points for this cell
-      const scalar_array& density = _material->calcDensity();
-
-      quadPtsGlobal = quadPtsNondim;
-      _normalizer->dimensionalize(&quadPtsGlobal[0], quadPtsGlobal.size(),
-          lengthScale);
-
-      // Compute action for element body forces
-      spatialdata::spatialdb::SpatialDB* db = _gravityField;
-      for (int iQuad = 0; iQuad < numQuadPts; ++iQuad) {
-        const int err = db->query(&gravVec[0], gravVec.size(),
-            &quadPtsGlobal[0], spaceDim, cs);
-        if (err)
-          throw std::runtime_error("Unable to get gravity vector for point.");
-        _normalizer->nondimensionalize(&gravVec[0], gravVec.size(),
-            gravityScale);
-        const PylithScalar wt = quadWts[iQuad] * jacobianDet[iQuad] * density[iQuad];
-        for (int iBasis = 0, iQ = iQuad * numBasis; iBasis < numBasis; ++iBasis) {
-          const PylithScalar valI = wt * basis[iQ + iBasis];
-          for (int iDim = 0; iDim < spaceDim; ++iDim) {
-            _cellVector[iBasis * spaceDim + iDim] += valI * gravVec[iDim];
-          } // for
-        } // for
-      } // for
-      PetscLogFlops(numQuadPts * (2 + numBasis * (1 + 2 * spaceDim)));
-    } // if
-
-    // Compute action for inertial terms
-    const scalar_array& density = _material->calcDensity();
-    for (int iQuad = 0; iQuad < numQuadPts; ++iQuad) {
-      const PylithScalar wt = quadWts[iQuad] * jacobianDet[iQuad] * density[iQuad];
-      for (int iBasis = 0; iBasis < numBasis; ++iBasis) {
-        const PylithScalar valI = wt * basis[iQuad*numBasis+iBasis];
-        for (int jBasis = 0; jBasis < numBasis; ++jBasis) {
-          const PylithScalar valIJ = valI * basis[iQuad*numBasis+jBasis];
-          for (int iDim = 0; iDim < spaceDim; ++iDim)
-            _cellVector[iBasis*spaceDim+iDim] -= valIJ * 
-	      accCell[jBasis*spaceDim+iDim];
-        } // for
-      } // for
-    } // for
-#if defined(DETAILED_EVENT_LOGGING)
-    PetscLogFlops(numQuadPts*(2+numBasis*(1+numBasis*(2*spaceDim))));
-    _logger->eventEnd(computeEvent);
-    _logger->eventBegin(stressEvent);
-#endif
-
-    // Numerical damping. Compute displacements adjusted by velocity
-    // times normalized viscosity.
-    dispAdjCell = dispCell + viscosity * velCell;
-
-    // Compute B(transpose) * sigma, first computing strains
-    calcTotalStrainFn(&strainCell, basisDeriv, dispAdjCell, 
-		      numBasis, numQuadPts);
-
-    const scalar_array& stressCell = _material->calcStress(strainCell, false);
-
-#if defined(DETAILED_EVENT_LOGGING)
-    _logger->eventEnd(stressEvent);
-    _logger->eventBegin(computeEvent);
-#endif
-
-    CALL_MEMBER_FN(*this, elasticityResidualFn)(stressCell);
-
-#if defined(DETAILED_EVENT_LOGGING)
-    _logger->eventEnd(computeEvent);
-    _logger->eventBegin(updateEvent);
-#endif
-
-    // Assemble cell contribution into field
-    residualVisitor.clear();
-    sieveMesh->updateClosure(*c_iter, residualVisitor);
-#if defined(DETAILED_EVENT_LOGGING)
-    _logger->eventEnd(updateEvent);
-#endif
-  } // for
-
-#if !defined(DETAILED_EVENT_LOGGING)
-  PetscLogFlops(cells->size()*numQuadPts*(3+numBasis*(1+numBasis*(2*spaceDim))));
-  _logger->eventEnd(computeEvent);
-#endif
-} // integrateResidual
-
-// ----------------------------------------------------------------------
-// Integrate constributions to residual term (r) for operator.
-void
-pylith::feassemble::ElasticityExplicit::integrateResidualLumped(
-        const topology::Field<topology::Mesh>& residual,
-        const PylithScalar t,
-        topology::SolutionFields* const fields)
-{ // integrateResidualLumped
-  /// Member prototype for _elasticityResidualXD()
-  typedef void (pylith::feassemble::ElasticityExplicit::*elasticityResidual_fn_type)
-    (const scalar_array&);
-
-  assert(0 != _quadrature);
-  assert(0 != _material);
-  assert(0 != _logger);
-  assert(0 != fields);
-
-  const int setupEvent = _logger->eventId("ElIR setup");
-  const int geometryEvent = _logger->eventId("ElIR geometry");
-  const int computeEvent = _logger->eventId("ElIR compute");
-  const int restrictEvent = _logger->eventId("ElIR restrict");
-  const int stateVarsEvent = _logger->eventId("ElIR stateVars");
-  const int stressEvent = _logger->eventId("ElIR stress");
-  const int updateEvent = _logger->eventId("ElIR update");
-
-  _logger->eventBegin(setupEvent);
-
-  // Get cell geometry information that doesn't depend on cell
-  const int numQuadPts = _quadrature->numQuadPts();
-  const scalar_array& quadWts = _quadrature->quadWts();
-  assert(quadWts.size() == numQuadPts);
-  const int numBasis = _quadrature->numBasis();
-  const int spaceDim = _quadrature->spaceDim();
-  const int cellDim = _quadrature->cellDim();
-  const int tensorSize = _material->tensorSize();
-  /** :TODO:
-   *
-   * If cellDim and spaceDim are different, we need to transform
-   * displacements into cellDim, compute action, and transform result
-   * back into spaceDim. We get this information from the Jacobian and
-   * inverse of the Jacobian.
-   */
-  if (cellDim != spaceDim)
-    throw std::logic_error("Integration for cells with spatial dimensions "
          "different than the spatial dimension of the "
          "domain not implemented yet.");
 
@@ -508,7 +240,7 @@
             _normalizer->densityScale());
 
   const PylithScalar dt = _dt;
-  assert(_normViscosity > 0.0);
+  assert(_normViscosity >= 0.0);
   assert(dt > 0);
   const PylithScalar viscosity = dt*_normViscosity;
 
@@ -672,159 +404,7 @@
 					const PylithScalar t,
 					topology::SolutionFields* fields)
 { // integrateJacobian
-  assert(0 != _quadrature);
-  assert(0 != _material);
-  assert(0 != jacobian);
-  assert(0 != fields);
-
-  const int setupEvent = _logger->eventId("ElIJ setup");
-  const int geometryEvent = _logger->eventId("ElIJ geometry");
-  const int computeEvent = _logger->eventId("ElIJ compute");
-  const int restrictEvent = _logger->eventId("ElIJ restrict");
-  const int stateVarsEvent = _logger->eventId("ElIJ stateVars");
-  const int updateEvent = _logger->eventId("ElIJ update");
-
-  _logger->eventBegin(setupEvent);
-
-  // Get cell geometry information that doesn't depend on cell
-  const int numQuadPts = _quadrature->numQuadPts();
-  const scalar_array& quadWts = _quadrature->quadWts();
-  assert(quadWts.size() == numQuadPts);
-  const int numBasis = _quadrature->numBasis();
-  const int spaceDim = _quadrature->spaceDim();
-  const int cellDim = _quadrature->cellDim();
-  if (cellDim != spaceDim)
-    throw std::logic_error("Don't know how to integrate elasticity " \
-			   "contribution to Jacobian matrix for cells with " \
-			   "different dimensions than the spatial dimension.");
-
-  // Get cell information
-  const ALE::Obj<SieveMesh>& sieveMesh = fields->mesh().sieveMesh();
-  assert(!sieveMesh.isNull());
-  const int materialId = _material->id();
-  const ALE::Obj<SieveMesh::label_sequence>& cells = 
-    sieveMesh->getLabelStratum("material-id", materialId);
-  assert(!cells.isNull());
-  const SieveMesh::label_sequence::iterator cellsBegin = cells->begin();
-  const SieveMesh::label_sequence::iterator cellsEnd = cells->end();
-
-  // Get sections
-  const ALE::Obj<RealSection>& solnSection = fields->solution().section();
-  assert(!solnSection.isNull());
-
-  // Get sparse matrix
-  const PetscMat jacobianMat = jacobian->matrix();
-  assert(0 != jacobianMat);
-
-  // Get parameters used in integration.
-  const PylithScalar dt = _dt;
-  const PylithScalar dt2 = dt*dt;
-  assert(dt > 0);
-
-  const ALE::Obj<SieveMesh::order_type>& globalOrder = 
-    sieveMesh->getFactory()->getGlobalOrder(sieveMesh, "default", solnSection);
-  assert(!globalOrder.isNull());
-  // We would need to request unique points here if we had an interpolated mesh
-  const ALE::Obj<SieveMesh::sieve_type>& sieve = sieveMesh->getSieve();
-  assert(!sieve.isNull());
-  const int closureSize = 
-    int(pow(sieve->getMaxConeSize(), sieveMesh->depth()));
-  assert(closureSize >= 0);
-  IndicesVisitor jacobianVisitor(*solnSection, *globalOrder, 
-				 closureSize*spaceDim);
-
-  scalar_array coordinatesCell(numBasis*spaceDim);
-  const ALE::Obj<RealSection>& coordinates = 
-    sieveMesh->getRealSection("coordinates");
-  assert(!coordinates.isNull());
-  RestrictVisitor coordsVisitor(*coordinates, 
-				coordinatesCell.size(), &coordinatesCell[0]);
-
-  _logger->eventEnd(setupEvent);
-#if !defined(DETAILED_EVENT_LOGGING)
-  _logger->eventBegin(computeEvent);
-#endif
-
-  // Loop over cells
-  for (SieveMesh::label_sequence::iterator c_iter=cellsBegin;
-       c_iter != cellsEnd;
-       ++c_iter) {
-    // Compute geometry information for current cell
-#if defined(DETAILED_EVENT_LOGGING)
-    _logger->eventBegin(geometryEvent);
-#endif
-#if defined(PRECOMPUTE_GEOMETRY)
-    _quadrature->retrieveGeometry(*c_iter);
-#else
-    coordsVisitor.clear();
-    sieveMesh->restrictClosure(*c_iter, coordsVisitor);
-    _quadrature->computeGeometry(coordinatesCell, *c_iter);
-#endif
-
-#if defined(DETAILED_EVENT_LOGGING)
-    _logger->eventEnd(geometryEvent);
-    _logger->eventBegin(stateVarsEvent);
-#endif
-
-    // Get state variables for cell.
-    _material->retrievePropsAndVars(*c_iter);
-
-#if defined(DETAILED_EVENT_LOGGING)
-    _logger->eventEnd(stateVarsEvent);
-    _logger->eventBegin(computeEvent);
-#endif
-
-    // Reset element matrix to zero
-    _resetCellMatrix();
-
-    // Get cell geometry information that depends on cell
-    const scalar_array& basis = _quadrature->basis();
-    const scalar_array& jacobianDet = _quadrature->jacobianDet();
-
-    // Get material physical properties at quadrature points for this cell
-    const scalar_array& density = _material->calcDensity();
-
-    // Compute Jacobian for inertial terms
-    for (int iQuad=0; iQuad < numQuadPts; ++iQuad) {
-      const PylithScalar wt = 
-          quadWts[iQuad] * jacobianDet[iQuad] * density[iQuad] / dt2;
-      for (int iBasis=0, iQ=iQuad*numBasis; iBasis < numBasis; ++iBasis) {
-        const PylithScalar valI = wt*basis[iQ+iBasis];
-        for (int jBasis=0; jBasis < numBasis; ++jBasis) {
-          const PylithScalar valIJ = valI * basis[iQ+jBasis];
-          for (int iDim=0; iDim < spaceDim; ++iDim) {
-            const int iBlock = (iBasis*spaceDim + iDim) * (numBasis*spaceDim);
-            const int jBlock = (jBasis*spaceDim + iDim);
-            _cellMatrix[iBlock+jBlock] += valIJ;
-          } // for
-        } // for
-      } // for
-    } // for
-#if defined(DETAILED_EVENT_LOGGING)
-    PetscLogFlops(numQuadPts*(3+numBasis*(1+numBasis*(1+spaceDim))));
-    _logger->eventEnd(computeEvent);
-    _logger->eventBegin(updateEvent);
-#endif
-    
-    // Assemble cell contribution into PETSc matrix.
-    jacobianVisitor.clear();
-    PetscErrorCode err = updateOperator(jacobianMat, *sieveMesh->getSieve(),
-					jacobianVisitor, *c_iter,
-					&_cellMatrix[0], ADD_VALUES);
-    CHECK_PETSC_ERROR_MSG(err, "Update to PETSc Mat failed.");
-
-#if defined(DETAILED_EVENT_LOGGING)
-    _logger->eventEnd(updateEvent);
-#endif
-  } // for
-
-#if !defined(DETAILED_EVENT_LOGGING)
-  PetscLogFlops(cells->size()*numQuadPts*(3+numBasis*(1+numBasis*(1+spaceDim))));
-  _logger->eventEnd(computeEvent);
-#endif
-
-  _needNewJacobian = false;
-  _material->resetNeedNewJacobian();
+  throw std::logic_error("ElasticityExplicit::integrateJacobian() not implemented. Use integrateJacobian(lumped) instead.");
 } // integrateJacobian
 
 // ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/ElasticityExplicit.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/ElasticityExplicit.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/ElasticityExplicit.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -90,6 +90,15 @@
    */
   void timeStep(const PylithScalar dt);
 
+  /** Get stable time step for advancing from time t to time t+dt.
+   *
+   * Default is current time step.
+   *
+   * @param mesh Finite-element mesh.
+   * @returns Time step
+   */
+  PylithScalar stableTimeStep(const topology::Mesh& mesh) const;
+
   /** Set normalized viscosity for numerical damping.
    *
    * @param viscosity Normalized viscosity (viscosity / elastic modulus).
@@ -113,30 +122,9 @@
 			 const PylithScalar t,
 			 topology::SolutionFields* const fields);
 
-  /** Integrate contributions to residual term (r) for operator.
-   *
-   * @param residual Field containing values for residual
-   * @param t Current time
-   * @param fields Solution fields
-   */
-  void integrateResidualLumped(const topology::Field<topology::Mesh>& residual,
-       const PylithScalar t,
-       topology::SolutionFields* const fields);
-
   /** Integrate contributions to Jacobian matrix (A) associated with
    * operator.
    *
-   * @param jacobian Sparse matrix for Jacobian of system.
-   * @param t Current time
-   * @param fields Solution fields
-   */
-  void integrateJacobian(topology::Jacobian* jacobian,
-			 const PylithScalar t,
-			 topology::SolutionFields* const fields);
-
-  /** Integrate contributions to Jacobian matrix (A) associated with
-   * operator.
-   *
    * @param jacobian Diagonal matrix (as field) for Jacobian of system.
    * @param t Current time
    * @param fields Solution fields
@@ -151,9 +139,15 @@
   /// Not implemented.
   ElasticityExplicit(const ElasticityExplicit&);
 
-  /// Not implemented
+  /// Not implemented.
   const ElasticityExplicit& operator=(const ElasticityExplicit&);
 
+  /// Not implemented.
+  void integrateJacobian(topology::Jacobian*,
+			 const PylithScalar,
+			 topology::SolutionFields* const);
+
+
 // PRIVATE MEMBERS //////////////////////////////////////////////////////
 private :
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/ElasticityExplicitLgDeform.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/ElasticityExplicitLgDeform.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/ElasticityExplicitLgDeform.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -81,6 +81,15 @@
 } // timeStep
 
 // ----------------------------------------------------------------------
+// Get stable time step for advancing from time t to time t+dt.
+PylithScalar
+pylith::feassemble::ElasticityExplicitLgDeform::stableTimeStep(const topology::Mesh& mesh) const
+{ // stableTimeStep
+  assert(_material);
+  return _material->stableTimeStepExplicit(mesh, _quadrature);
+} // stableTimeStep
+
+// ----------------------------------------------------------------------
 // Set normalized viscosity for numerical damping.
 void
 pylith::feassemble::ElasticityExplicitLgDeform::normViscosity(const PylithScalar viscosity)
@@ -109,10 +118,9 @@
 // ----------------------------------------------------------------------
 // Integrate constributions to residual term (r) for operator.
 void
-pylith::feassemble::ElasticityExplicitLgDeform::integrateResidual(
-			  const topology::Field<topology::Mesh>& residual,
-			  const PylithScalar t,
-			  topology::SolutionFields* const fields)
+pylith::feassemble::ElasticityExplicitLgDeform::integrateResidual(const topology::Field<topology::Mesh>& residual,
+								  const PylithScalar t,
+								  topology::SolutionFields* const fields)
 { // integrateResidual
   /// Member prototype for _elasticityResidualXD()
   typedef void (pylith::feassemble::ElasticityExplicitLgDeform::*elasticityResidual_fn_type)
@@ -197,17 +205,14 @@
   assert(!accSection.isNull());
   RestrictVisitor accVisitor(*accSection, accCell.size(), &accCell[0]);
 
-#if 0 // Numerical damping not yet implemented
   scalar_array velCell(numBasis*spaceDim);
   const ALE::Obj<RealSection>& velSection = 
     fields->get("velocity(t)").section();
   assert(!velSection.isNull());
   RestrictVisitor velVisitor(*velSection, velCell.size(), &velCell[0]);
 
-  scalar_array dispAdjCell(numBasis*spaceDim);
-#endif
-
   scalar_array dispCell(numBasis*spaceDim);
+  scalar_array dispAdjCell(numBasis*spaceDim);
   const ALE::Obj<RealSection>& dispSection = fields->get("disp(t)").section();
   assert(!dispSection.isNull());
   RestrictVisitor dispVisitor(*dispSection, dispCell.size(), &dispCell[0]);
@@ -229,246 +234,10 @@
 				    _normalizer->densityScale());
 
   const PylithScalar dt = _dt;
-  assert(_normViscosity > 0.0);
+  assert(_normViscosity >= 0.0);
   assert(dt > 0);
   const PylithScalar viscosity = dt*_normViscosity;
 
-  _logger->eventEnd(setupEvent);
-  _logger->eventBegin(computeEvent);
-
-  // Loop over cells
-  for (SieveMesh::label_sequence::iterator c_iter=cellsBegin;
-       c_iter != cellsEnd;
-       ++c_iter) {
-    // Compute geometry information for current cell
-#if defined(PRECOMPUTE_GEOMETRY)
-    _quadrature->retrieveGeometry(*c_iter);
-#else
-    coordsVisitor.clear();
-    sieveMesh->restrictClosure(*c_iter, coordsVisitor);
-    _quadrature->computeGeometry(coordinatesCell, *c_iter);
-#endif
-
-    // Get state variables for cell.
-    _material->retrievePropsAndVars(*c_iter);
-
-    // Reset element vector to zero
-    _resetCellVector();
-
-    // Restrict input fields to cell
-    accVisitor.clear();
-    sieveMesh->restrictClosure(*c_iter, accVisitor);
-
-#if 0 // Numerical damping not yet implemented.
-    velVisitor.clear();
-    sieveMesh->restrictClosure(*c_iter, velVisitor);
-#endif
-
-    dispVisitor.clear();
-    sieveMesh->restrictClosure(*c_iter, dispVisitor);
-
-    // Get cell geometry information that depends on cell
-    const scalar_array& basis = _quadrature->basis();
-    const scalar_array& basisDeriv = _quadrature->basisDeriv();
-    const scalar_array& jacobianDet = _quadrature->jacobianDet();
-    const scalar_array& quadPtsNondim = _quadrature->quadPts();
-
-    // Compute body force vector if gravity is being used.
-    if (0 != _gravityField) {
-      const spatialdata::geocoords::CoordSys* cs = fields->mesh().coordsys();
-      assert(0 != cs);
-      
-      // Get density at quadrature points for this cell
-      const scalar_array& density = _material->calcDensity();
-
-      quadPtsGlobal = quadPtsNondim;
-      _normalizer->dimensionalize(&quadPtsGlobal[0], quadPtsGlobal.size(),
-				  lengthScale);
-
-      // Compute action for element body forces
-      spatialdata::spatialdb::SpatialDB* db = _gravityField;
-      for (int iQuad=0; iQuad < numQuadPts; ++iQuad) {
-	const int err = db->query(&gravVec[0], gravVec.size(),
-					     &quadPtsGlobal[0], spaceDim, cs);
-	if (err)
-	  throw std::runtime_error("Unable to get gravity vector for point.");
-	_normalizer->nondimensionalize(&gravVec[0], gravVec.size(), 
-				       gravityScale);
-	const PylithScalar wt = quadWts[iQuad] * jacobianDet[iQuad] * density[iQuad];
-	for (int iBasis=0, iQ=iQuad*numBasis;
-	     iBasis < numBasis; ++iBasis) {
-	  const PylithScalar valI = wt*basis[iQ+iBasis];
-	  for (int iDim=0; iDim < spaceDim; ++iDim) {
-	    _cellVector[iBasis*spaceDim+iDim] += valI*gravVec[iDim];
-	  } // for
-	} // for
-      } // for
-      PetscLogFlops(numQuadPts*(2+numBasis*(1+2*spaceDim)));
-    } // if
-
-    // Compute action for inertial terms
-    const scalar_array& density = _material->calcDensity();
-    for (int iQuad=0; iQuad < numQuadPts; ++iQuad) {
-      const PylithScalar wt = 
-	quadWts[iQuad] * jacobianDet[iQuad] * density[iQuad];
-      for (int iBasis=0; iBasis < numBasis; ++iBasis) {
-        const PylithScalar valI = wt*basis[iQuad*numBasis+iBasis];
-        for (int jBasis=0; jBasis < numBasis; ++jBasis) {
-          const PylithScalar valIJ = valI * basis[iQuad*numBasis+jBasis];
-          for (int iDim=0; iDim < spaceDim; ++iDim)
-            _cellVector[iBasis*spaceDim+iDim] -= 
-	      valIJ * accCell[jBasis*spaceDim+iDim];
-        } // for
-      } // for
-    } // for
-    PetscLogFlops(numQuadPts*(2+numBasis*(1+numBasis*(2*spaceDim))));
-
-#if 0 // Numerical damping not yet implemented. Is small strain
-      // formulation compatible with numerical damping?
-
-    // Numerical damping. Compute displacements adjusted by velocity
-    // times normalized viscosity.
-    dispAdjCell = dispCell + viscosity * velCell;
-#endif
-
-    // Compute B(transpose) * sigma, first computing strains
-    _calcDeformation(&deformCell, basisDeriv, coordinatesCell, dispCell,
-		     numBasis, numQuadPts, spaceDim);
-    calcTotalStrainFn(&strainCell, deformCell, numQuadPts);
-    const scalar_array& stressCell = _material->calcStress(strainCell, true);
-
-    CALL_MEMBER_FN(*this, elasticityResidualFn)(stressCell, dispCell);
-
-    // Assemble cell contribution into field
-    residualVisitor.clear();
-    sieveMesh->updateClosure(*c_iter, residualVisitor);
-  } // for
-
-  _logger->eventEnd(computeEvent);
-} // integrateResidual
-
-// ----------------------------------------------------------------------
-// Integrate constributions to residual term (r) for operator.
-void
-pylith::feassemble::ElasticityExplicitLgDeform::integrateResidualLumped(
-			  const topology::Field<topology::Mesh>& residual,
-			  const PylithScalar t,
-			  topology::SolutionFields* const fields)
-{ // integrateResidualLumped
-  /// Member prototype for _elasticityResidualXD()
-  typedef void (pylith::feassemble::ElasticityExplicitLgDeform::*elasticityResidual_fn_type)
-    (const scalar_array&, const scalar_array&);
-
-  assert(0 != _quadrature);
-  assert(0 != _material);
-  assert(0 != _logger);
-  assert(0 != fields);
-
-  const int setupEvent = _logger->eventId("ElIR setup");
-  const int geometryEvent = _logger->eventId("ElIR geometry");
-  const int computeEvent = _logger->eventId("ElIR compute");
-  const int restrictEvent = _logger->eventId("ElIR restrict");
-  const int stateVarsEvent = _logger->eventId("ElIR stateVars");
-  const int stressEvent = _logger->eventId("ElIR stress");
-  const int updateEvent = _logger->eventId("ElIR update");
-
-  _logger->eventBegin(setupEvent);
-
-  // Get cell geometry information that doesn't depend on cell
-  const int numQuadPts = _quadrature->numQuadPts();
-  const scalar_array& quadWts = _quadrature->quadWts();
-  assert(quadWts.size() == numQuadPts);
-  const int numBasis = _quadrature->numBasis();
-  const int spaceDim = _quadrature->spaceDim();
-  const int cellDim = _quadrature->cellDim();
-  const int tensorSize = _material->tensorSize();
-  /** :TODO:
-   *
-   * If cellDim and spaceDim are different, we need to transform
-   * displacements into cellDim, compute action, and transform result
-   * back into spaceDim. We get this information from the Jacobian and
-   * inverse of the Jacobian.
-   */
-  if (cellDim != spaceDim)
-    throw std::logic_error("Integration for cells with spatial dimensions "
-			   "different than the spatial dimension of the "
-			   "domain not implemented yet.");
-
-  // Set variables dependent on dimension of cell
-  totalStrain_fn_type calcTotalStrainFn;
-  elasticityResidual_fn_type elasticityResidualFn;
-  if (1 == cellDim) {
-    elasticityResidualFn = 
-      &pylith::feassemble::ElasticityExplicitLgDeform::_elasticityResidual1D;
-    calcTotalStrainFn = 
-      &pylith::feassemble::IntegratorElasticityLgDeform::_calcTotalStrain1D;
-  } else if (2 == cellDim) {
-    elasticityResidualFn = 
-      &pylith::feassemble::ElasticityExplicitLgDeform::_elasticityResidual2D;
-    calcTotalStrainFn = 
-      &pylith::feassemble::IntegratorElasticityLgDeform::_calcTotalStrain2D;
-  } else if (3 == cellDim) {
-    elasticityResidualFn = 
-      &pylith::feassemble::ElasticityExplicitLgDeform::_elasticityResidual3D;
-    calcTotalStrainFn = 
-      &pylith::feassemble::IntegratorElasticityLgDeform::_calcTotalStrain3D;
-  } else
-    assert(0);
-
-  // Allocate vectors for cell values.
-  scalar_array deformCell(numQuadPts*spaceDim*spaceDim);
-  scalar_array strainCell(numQuadPts*tensorSize);
-  scalar_array gravVec(spaceDim);
-  scalar_array quadPtsGlobal(numQuadPts*spaceDim);
-
-  // Get cell information
-  const ALE::Obj<SieveMesh>& sieveMesh = fields->mesh().sieveMesh();
-  assert(!sieveMesh.isNull());
-  const int materialId = _material->id();
-  const ALE::Obj<SieveMesh::label_sequence>& cells = 
-    sieveMesh->getLabelStratum("material-id", materialId);
-  assert(!cells.isNull());
-  const SieveMesh::label_sequence::iterator cellsBegin = cells->begin();
-  const SieveMesh::label_sequence::iterator cellsEnd = cells->end();
-
-  // Get sections
-  scalar_array accCell(numBasis*spaceDim);
-  const ALE::Obj<RealSection>& accSection = 
-    fields->get("acceleration(t)").section();
-  assert(!accSection.isNull());
-  RestrictVisitor accVisitor(*accSection, accCell.size(), &accCell[0]);
-
-#if 0 // Numerical damping not yet implemented
-  scalar_array velCell(numBasis*spaceDim);
-  const ALE::Obj<RealSection>& velSection = 
-    fields->get("velocity(t)").section();
-  assert(!velSection.isNull());
-  RestrictVisitor velVisitor(*velSection, velCell.size(), &velCell[0]);
-
-  scalar_array dispAdjCell(numBasis*spaceDim);
-#endif
-
-  scalar_array dispCell(numBasis*spaceDim);
-  const ALE::Obj<RealSection>& dispSection = fields->get("disp(t)").section();
-  assert(!dispSection.isNull());
-  RestrictVisitor dispVisitor(*dispSection, dispCell.size(), &dispCell[0]);
-
-  const ALE::Obj<RealSection>& residualSection = residual.section();
-  UpdateAddVisitor residualVisitor(*residualSection, &_cellVector[0]);
-
-  scalar_array coordinatesCell(numBasis*spaceDim);
-  const ALE::Obj<RealSection>& coordinates = 
-    sieveMesh->getRealSection("coordinates");
-  assert(!coordinates.isNull());
-  RestrictVisitor coordsVisitor(*coordinates, 
-				coordinatesCell.size(), &coordinatesCell[0]);
-
-  assert(0 != _normalizer);
-  const PylithScalar lengthScale = _normalizer->lengthScale();
-  const PylithScalar gravityScale = 
-    _normalizer->pressureScale() / (_normalizer->lengthScale() *
-				    _normalizer->densityScale());
-
   // Get parameters used in integration.
   scalar_array valuesIJ(numBasis);
 
@@ -564,20 +333,17 @@
 	  accCell[iBasis*spaceDim+iDim];
     PetscLogFlops(numQuadPts*(4+numBasis*3));
 
-#if 0 // Numerical damping not yet implemented. Is small strain
-      // formulation compatible with numerical damping?
-
     // Numerical damping. Compute displacements adjusted by velocity
     // times normalized viscosity.
     dispAdjCell = dispCell + viscosity * velCell;
-#endif
+
     // Compute B(transpose) * sigma, first computing strains
-    _calcDeformation(&deformCell, basisDeriv, coordinatesCell, dispCell,
+    _calcDeformation(&deformCell, basisDeriv, coordinatesCell, dispAdjCell,
 		     numBasis, numQuadPts, spaceDim);
     calcTotalStrainFn(&strainCell, deformCell, numQuadPts);
     const scalar_array& stressCell = _material->calcStress(strainCell, true);
 
-    CALL_MEMBER_FN(*this, elasticityResidualFn)(stressCell, dispCell);
+    CALL_MEMBER_FN(*this, elasticityResidualFn)(stressCell, dispAdjCell);
     
     // Assemble cell contribution into field
     residualVisitor.clear();
@@ -585,7 +351,7 @@
   } // for
 
   _logger->eventEnd(computeEvent);
-} // integrateResidualLumped
+} // integrateResidual
 
 // ----------------------------------------------------------------------
 // Compute matrix associated with operator.
@@ -595,134 +361,7 @@
 					const PylithScalar t,
 					topology::SolutionFields* fields)
 { // integrateJacobian
-  assert(0 != _quadrature);
-  assert(0 != _material);
-  assert(0 != jacobian);
-  assert(0 != fields);
-
-  const int setupEvent = _logger->eventId("ElIJ setup");
-  const int geometryEvent = _logger->eventId("ElIJ geometry");
-  const int computeEvent = _logger->eventId("ElIJ compute");
-  const int restrictEvent = _logger->eventId("ElIJ restrict");
-  const int stateVarsEvent = _logger->eventId("ElIJ stateVars");
-  const int updateEvent = _logger->eventId("ElIJ update");
-
-  _logger->eventBegin(setupEvent);
-
-  // Get cell geometry information that doesn't depend on cell
-  const int numQuadPts = _quadrature->numQuadPts();
-  const scalar_array& quadWts = _quadrature->quadWts();
-  assert(quadWts.size() == numQuadPts);
-  const int numBasis = _quadrature->numBasis();
-  const int spaceDim = _quadrature->spaceDim();
-  const int cellDim = _quadrature->cellDim();
-  const int tensorSize = _material->tensorSize();
-  if (cellDim != spaceDim)
-    throw std::logic_error("Don't know how to integrate elasticity " \
-			   "contribution to Jacobian matrix for cells with " \
-			   "different dimensions than the spatial dimension.");
-
-  // Get cell information
-  const ALE::Obj<SieveMesh>& sieveMesh = fields->mesh().sieveMesh();
-  assert(!sieveMesh.isNull());
-  const int materialId = _material->id();
-  const ALE::Obj<SieveMesh::label_sequence>& cells = 
-    sieveMesh->getLabelStratum("material-id", materialId);
-  assert(!cells.isNull());
-  const SieveMesh::label_sequence::iterator cellsBegin = cells->begin();
-  const SieveMesh::label_sequence::iterator cellsEnd = cells->end();
-
-  // Get sections
-  const ALE::Obj<RealSection>& solnSection = fields->solution().section();
-  assert(!solnSection.isNull());
-
-  // Get sparse matrix
-  const PetscMat jacobianMat = jacobian->matrix();
-  assert(0 != jacobianMat);
-
-  // Get parameters used in integration.
-  const PylithScalar dt = _dt;
-  const PylithScalar dt2 = dt*dt;
-  assert(dt > 0);
-
-  const ALE::Obj<SieveMesh::order_type>& globalOrder = 
-    sieveMesh->getFactory()->getGlobalOrder(sieveMesh, "default", solnSection);
-  assert(!globalOrder.isNull());
-  // We would need to request unique points here if we had an interpolated mesh
-  const ALE::Obj<SieveMesh::sieve_type>& sieve = sieveMesh->getSieve();
-  assert(!sieve.isNull());
-  const int closureSize = 
-    int(pow(sieve->getMaxConeSize(), sieveMesh->depth()));
-  assert(closureSize >= 0);
-  IndicesVisitor jacobianVisitor(*solnSection, *globalOrder,
-				 closureSize*spaceDim);
-
-  scalar_array coordinatesCell(numBasis*spaceDim);
-  const ALE::Obj<RealSection>& coordinates = 
-    sieveMesh->getRealSection("coordinates");
-  assert(!coordinates.isNull());
-  RestrictVisitor coordsVisitor(*coordinates, 
-				coordinatesCell.size(), &coordinatesCell[0]);
-
-  _logger->eventEnd(setupEvent);
-  _logger->eventBegin(computeEvent);
-
-  // Loop over cells
-  for (SieveMesh::label_sequence::iterator c_iter=cellsBegin;
-       c_iter != cellsEnd;
-       ++c_iter) {
-    // Compute geometry information for current cell
-#if defined(PRECOMPUTE_GEOMETRY)
-    _quadrature->retrieveGeometry(*c_iter);
-#else
-    coordsVisitor.clear();
-    sieveMesh->restrictClosure(*c_iter, coordsVisitor);
-    _quadrature->computeGeometry(coordinatesCell, *c_iter);
-#endif
-
-    // Get state variables for cell.
-    _material->retrievePropsAndVars(*c_iter);
-
-    // Reset element matrix to zero
-    _resetCellMatrix();
-
-    // Get cell geometry information that depends on cell
-    const scalar_array& basis = _quadrature->basis();
-    const scalar_array& jacobianDet = _quadrature->jacobianDet();
-
-    // Get material physical properties at quadrature points for this cell
-    const scalar_array& density = _material->calcDensity();
-
-    // Compute Jacobian for inertial terms
-    for (int iQuad=0; iQuad < numQuadPts; ++iQuad) {
-      const PylithScalar wt = 
-	quadWts[iQuad] * jacobianDet[iQuad] * density[iQuad] / dt2;
-      for (int iBasis=0, iQ=iQuad*numBasis; iBasis < numBasis; ++iBasis) {
-        const PylithScalar valI = wt*basis[iQ+iBasis];
-        for (int jBasis=0; jBasis < numBasis; ++jBasis) {
-          const PylithScalar valIJ = valI * basis[iQ+jBasis];
-          for (int iDim=0; iDim < spaceDim; ++iDim) {
-            const int iBlock = (iBasis*spaceDim + iDim) * (numBasis*spaceDim);
-            const int jBlock = (jBasis*spaceDim + iDim);
-            _cellMatrix[iBlock+jBlock] += valIJ;
-          } // for
-        } // for
-      } // for
-    } // for
-    PetscLogFlops(numQuadPts*(3+numBasis*(1+numBasis*(1+spaceDim))));
-    
-    // Assemble cell contribution into PETSc matrix.
-    jacobianVisitor.clear();
-    PetscErrorCode err = updateOperator(jacobianMat, *sieveMesh->getSieve(),
-					jacobianVisitor, *c_iter,
-					&_cellMatrix[0], ADD_VALUES);
-    CHECK_PETSC_ERROR_MSG(err, "Update to PETSc Mat failed.");
-  } // for
-
-  _needNewJacobian = false;
-  _material->resetNeedNewJacobian();
-
-  _logger->eventEnd(computeEvent);
+  throw std::logic_error("ElasticityExplicit::integrateJacobian() not implemented. Use integrateJacobian(lumped) instead.");
 } // integrateJacobian
 
 // ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/ElasticityExplicitLgDeform.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/ElasticityExplicitLgDeform.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/ElasticityExplicitLgDeform.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -69,8 +69,7 @@
  * See governing equations section of user manual for more
  * information.
 */
-class pylith::feassemble::ElasticityExplicitLgDeform :
-  public IntegratorElasticityLgDeform
+class pylith::feassemble::ElasticityExplicitLgDeform : public IntegratorElasticityLgDeform
 { // ElasticityExplicitLgDeform
   friend class TestElasticityExplicitLgDeform; // unit testing
 
@@ -92,6 +91,15 @@
    */
   void timeStep(const PylithScalar dt);
 
+  /** Get stable time step for advancing from time t to time t+dt.
+   *
+   * Default is current time step.
+   *
+   * @param mesh Finite-element mesh.
+   * @returns Time step
+   */
+  PylithScalar stableTimeStep(const topology::Mesh& mesh) const;
+
   /** Set normalized viscosity for numerical damping.
    *
    * @param viscosity Normalized viscosity (viscosity / elastic modulus).
@@ -115,30 +123,9 @@
 			 const PylithScalar t,
 			 topology::SolutionFields* const fields);
 
-  /** Integrate contributions to residual term (r) for operator.
-   *
-   * @param residual Field containing values for residual
-   * @param t Current time
-   * @param fields Solution fields
-   */
-  void integrateResidualLumped(const topology::Field<topology::Mesh>& residual,
-       const PylithScalar t,
-       topology::SolutionFields* const fields);
-
   /** Integrate contributions to Jacobian matrix (A) associated with
    * operator.
    *
-   * @param jacobian Sparse matrix for Jacobian of system.
-   * @param t Current time
-   * @param fields Solution fields
-   */
-  void integrateJacobian(topology::Jacobian* jacobian,
-			 const PylithScalar t,
-			 topology::SolutionFields* const fields);
-
-  /** Integrate contributions to Jacobian matrix (A) associated with
-   * operator.
-   *
    * @param jacobian Diagonal matrix (as field) for Jacobian of system.
    * @param t Current time
    * @param fields Solution fields
@@ -156,6 +143,12 @@
   /// Not implemented
   const ElasticityExplicitLgDeform& operator=(const ElasticityExplicitLgDeform&);
 
+  /// Not implemented.
+  void integrateJacobian(topology::Jacobian*,
+			 const PylithScalar,
+			 topology::SolutionFields* const);
+
+
 // PRIVATE MEMBERS //////////////////////////////////////////////////////
 private :
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/ElasticityExplicitTet4.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/ElasticityExplicitTet4.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/ElasticityExplicitTet4.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -88,6 +88,15 @@
 } // timeStep
 
 // ----------------------------------------------------------------------
+// Get stable time step for advancing from time t to time t+dt.
+PylithScalar
+pylith::feassemble::ElasticityExplicitTet4::stableTimeStep(const topology::Mesh& mesh) const
+{ // stableTimeStep
+  assert(_material);
+  return _material->stableTimeStepExplicit(mesh, _quadrature);
+} // stableTimeStep
+
+// ----------------------------------------------------------------------
 // Set normalized viscosity for numerical damping.
 void
 pylith::feassemble::ElasticityExplicitTet4::normViscosity(const PylithScalar viscosity)
@@ -118,317 +127,10 @@
 // Integrate constributions to residual term (r) for operator.
 void
 pylith::feassemble::ElasticityExplicitTet4::integrateResidual(
-			  const topology::Field<topology::Mesh>& residual,
-			  const PylithScalar t,
-			  topology::SolutionFields* const fields)
-{ // integrateResidual
-  assert(0 != _quadrature);
-  assert(0 != _material);
-  assert(0 != _logger);
-  assert(0 != fields);
-
-  const int setupEvent = _logger->eventId("ElIR setup");
-  const int geometryEvent = _logger->eventId("ElIR geometry");
-  const int computeEvent = _logger->eventId("ElIR compute");
-  const int restrictEvent = _logger->eventId("ElIR restrict");
-  const int stateVarsEvent = _logger->eventId("ElIR stateVars");
-  const int stressEvent = _logger->eventId("ElIR stress");
-  const int updateEvent = _logger->eventId("ElIR update");
-
-  _logger->eventBegin(setupEvent);
-
-  // Get cell geometry information that doesn't depend on cell
-  assert(_quadrature->numQuadPts() == _numQuadPts);
-  const scalar_array& quadWts = _quadrature->quadWts();
-  assert(quadWts.size() == _numQuadPts);
-  assert(_quadrature->numBasis() == _numBasis);
-  assert(_quadrature->spaceDim() == _spaceDim);
-  assert(_quadrature->cellDim() == _cellDim);
-  assert(_material->tensorSize() == _tensorSize);
-  const int spaceDim = _spaceDim;
-  const int cellDim = _cellDim;
-  const int tensorSize = _tensorSize;
-  const int numBasis = _numBasis;
-  const int numQuadPts = _numQuadPts;
-  /** :TODO:
-   *
-   * If cellDim and spaceDim are different, we need to transform
-   * displacements into cellDim, compute action, and transform result
-   * back into spaceDim. We get this information from the Jacobian and
-   * inverse of the Jacobian.
-   */
-  if (cellDim != spaceDim)
-    throw std::logic_error("Integration for cells with spatial dimensions "
-			   "different than the spatial dimension of the "
-			   "domain not implemented yet.");
-
-  // Allocate vectors for cell values.
-  scalar_array strainCell(numQuadPts*tensorSize);
-  strainCell = 0.0;
-  scalar_array gravVec(spaceDim);
-  scalar_array quadPtsGlobal(numQuadPts*spaceDim);
-
-  // Get cell information
-  const ALE::Obj<SieveMesh>& sieveMesh = fields->mesh().sieveMesh();
-  assert(!sieveMesh.isNull());
-  const int materialId = _material->id();
-  const ALE::Obj<SieveMesh::label_sequence>& cells = 
-    sieveMesh->getLabelStratum("material-id", materialId);
-  assert(!cells.isNull());
-  const SieveMesh::label_sequence::iterator cellsBegin = cells->begin();
-  const SieveMesh::label_sequence::iterator cellsEnd = cells->end();
-
-  // Get sections
-  scalar_array accCell(numBasis*spaceDim);
-  const ALE::Obj<RealSection>& accSection = 
-    fields->get("acceleration(t)").section();
-  assert(!accSection.isNull());
-  RestrictVisitor accVisitor(*accSection, accCell.size(), &accCell[0]);
-
-  scalar_array velCell(numBasis*spaceDim);
-  const ALE::Obj<RealSection>& velSection = 
-    fields->get("velocity(t)").section();
-  assert(!velSection.isNull());
-  RestrictVisitor velVisitor(*velSection, velCell.size(), &velCell[0]);
-
-  scalar_array dispCell(numBasis*spaceDim);
-  scalar_array dispAdjCell(numBasis*spaceDim);
-  const ALE::Obj<RealSection>& dispSection = 
-    fields->get("disp(t)").section();
-  assert(!dispSection.isNull());
-  RestrictVisitor dispVisitor(*dispSection, dispCell.size(), &dispCell[0]);
-
-  const ALE::Obj<RealSection>& residualSection = residual.section();
-  UpdateAddVisitor residualVisitor(*residualSection, &_cellVector[0]);
-  
-  scalar_array coordinatesCell(numBasis*spaceDim);
-  const ALE::Obj<RealSection>& coordinates = 
-    sieveMesh->getRealSection("coordinates");
-  assert(!coordinates.isNull());
-  RestrictVisitor coordsVisitor(*coordinates, 
-				coordinatesCell.size(), &coordinatesCell[0]);
-
-  assert(0 != _normalizer);
-  const PylithScalar lengthScale = _normalizer->lengthScale();
-  const PylithScalar gravityScale = 
-    _normalizer->pressureScale() / (_normalizer->lengthScale() *
-				    _normalizer->densityScale());
-
-  const PylithScalar dt = _dt;
-  assert(_normViscosity > 0.0);
-  assert(dt > 0);
-  const PylithScalar viscosity = dt*_normViscosity;
-
-  _logger->eventEnd(setupEvent);
-#if !defined(DETAILED_EVENT_LOGGING)
-  _logger->eventBegin(computeEvent);
-#endif
-
-  // Loop over cells
-  for (SieveMesh::label_sequence::iterator c_iter=cellsBegin;
-       c_iter != cellsEnd;
-       ++c_iter) {
-#if defined(DETAILED_EVENT_LOGGING)
-    _logger->eventBegin(geometryEvent);
-#endif
-
-    // Compute geometry information for current cell
-    coordsVisitor.clear();
-    sieveMesh->restrictClosure(*c_iter, coordsVisitor);
-    const PylithScalar volume = _volume(coordinatesCell);
-    assert(volume > 0.0);
-
-#if defined(DETAILED_EVENT_LOGGING)
-    _logger->eventEnd(geometryEvent);
-    _logger->eventBegin(stateVarsEvent);
-#endif
-
-    // Get state variables for cell.
-    _material->retrievePropsAndVars(*c_iter);
-
-    #if defined(DETAILED_EVENT_LOGGING)
-    _logger->eventEnd(stateVarsEvent);
-    _logger->eventBegin(restrictEvent);
-#endif
-
-    // Reset element vector to zero
-    _resetCellVector();
-
-    // Restrict input fields to cell
-    accVisitor.clear();
-    sieveMesh->restrictClosure(*c_iter, accVisitor);
-    
-    velVisitor.clear();
-    sieveMesh->restrictClosure(*c_iter, velVisitor);
-    
-    dispVisitor.clear();
-    sieveMesh->restrictClosure(*c_iter, dispVisitor);
-    
-#if defined(DETAILED_EVENT_LOGGING)
-    _logger->eventEnd(restrictEvent);
-    _logger->eventBegin(computeEvent);
-#endif
-
-    const scalar_array& density = _material->calcDensity();
-    assert(density.size() == 1);
-
-    // Compute body force vector if gravity is being used.
-    if (0 != _gravityField) {
-      const spatialdata::geocoords::CoordSys* cs = fields->mesh().coordsys();
-      assert(0 != cs);
-
-      quadPtsGlobal = 0.0;
-      for (int iBasis=0; iBasis < numBasis; ++iBasis)
-        for (int iDim=0; iDim < spaceDim; ++iDim)
-          quadPtsGlobal[iDim] += 
-	    coordinatesCell[iBasis*spaceDim+iDim] / numBasis;
-      _normalizer->dimensionalize(&quadPtsGlobal[0], quadPtsGlobal.size(),
-          lengthScale);
-
-      // Compute action for element body forces
-      spatialdata::spatialdb::SpatialDB* db = _gravityField;
-      const int err = db->query(&gravVec[0], gravVec.size(),
-        &quadPtsGlobal[0], spaceDim, cs);
-      if (err)
-        throw std::runtime_error("Unable to get gravity vector for point.");
-      _normalizer->nondimensionalize(&gravVec[0], gravVec.size(),
-          gravityScale);
-      const PylithScalar wtVertex = density[0] * volume / 4.0;
-      for (int iBasis=0; iBasis < numBasis; ++iBasis)
-        for (int iDim=0; iDim < spaceDim; ++iDim)
-            _cellVector[iBasis * spaceDim + iDim] += wtVertex * gravVec[iDim];
-      PetscLogFlops(numBasis*spaceDim*2 + numBasis*spaceDim*2);
-    } // if
-
-    // Compute action for inertial terms
-    const PylithScalar wtVertex = density[0] * volume / 16.0;
-    for (int iBasis = 0; iBasis < numBasis; ++iBasis)
-      for (int jBasis = 0; jBasis < numBasis; ++jBasis)
-        for (int iDim = 0; iDim < spaceDim; ++iDim)
-            _cellVector[iBasis*spaceDim+iDim] -= 
-	      wtVertex * accCell[jBasis*spaceDim+iDim];
-
-#if defined(DETAILED_EVENT_LOGGING)
-    PetscLogFlops(3 + numBasis*numBasis*spaceDim*2);
-    _logger->eventEnd(computeEvent);
-    _logger->eventBegin(stressEvent);
-#endif
-
-    // Numerical damping. Compute displacements adjusted by velocity
-    // times normalized viscosity.
-    dispAdjCell = dispCell + viscosity * velCell;
-
-    // Compute B(transpose) * sigma, first computing strains
-    const PylithScalar x0 = coordinatesCell[0];
-    const PylithScalar y0 = coordinatesCell[1];
-    const PylithScalar z0 = coordinatesCell[2];
-
-    const PylithScalar x1 = coordinatesCell[3];
-    const PylithScalar y1 = coordinatesCell[4];
-    const PylithScalar z1 = coordinatesCell[5];
-
-    const PylithScalar x2 = coordinatesCell[6];
-    const PylithScalar y2 = coordinatesCell[7];
-    const PylithScalar z2 = coordinatesCell[8];
-
-    const PylithScalar x3 = coordinatesCell[9];
-    const PylithScalar y3 = coordinatesCell[10];
-    const PylithScalar z3 = coordinatesCell[11];
-
-    const PylithScalar scaleB = 6.0 * volume;
-    const PylithScalar b1 = (y1*(z3-z2)-y2*z3+y3*z2-(y3-y2)*z1) / scaleB;
-    const PylithScalar c1 = (-x1*(z3-z2)+x2*z3-x3*z2-(x2-x3)*z1) / scaleB;
-    const PylithScalar d1 = (-x2*y3-x1*(y2-y3)+x3*y2+(x2-x3)*y1) / scaleB;
-
-    const PylithScalar b2 = (-y0*z3-y2*(z0-z3)+(y0-y3)*z2+y3*z0) / scaleB;
-    const PylithScalar c2 = (x0*z3+x2*(z0-z3)+(x3-x0)*z2-x3*z0) / scaleB;
-    const PylithScalar d2 = (x2*(y3-y0)-x0*y3-(x3-x0)*y2+x3*y0) / scaleB;
-
-    const PylithScalar b3 = (-(y1-y0)*z3+y3*(z1-z0)-y0*z1+y1*z0) / scaleB;
-    const PylithScalar c3 = (-(x0-x1)*z3-x3*(z1-z0)+x0*z1-x1*z0) / scaleB;
-    const PylithScalar d3 = ((x0-x1)*y3-x0*y1-x3*(y0-y1)+x1*y0) / scaleB;
-
-    const PylithScalar b4 = (-y0*(z2-z1)+y1*z2-y2*z1+(y2-y1)*z0) / scaleB;
-    const PylithScalar c4 = (x0*(z2-z1)-x1*z2+x2*z1+(x1-x2)*z0) / scaleB;
-    const PylithScalar d4 = (x1*y2+x0*(y1-y2)-x2*y1-(x1-x2)*y0) / scaleB;
-
-    assert(strainCell.size() == 6);
-    strainCell[0] = 
-      b1 * dispAdjCell[0] + b2 * dispAdjCell[3] + 
-      b3 * dispAdjCell[6] + b4 * dispAdjCell[9];
-    strainCell[1] = 
-      c3 * dispAdjCell[7] + c2 * dispAdjCell[4] + 
-      c4 * dispAdjCell[10] + c1 * dispAdjCell[1];
-    strainCell[2] = 
-      d3 * dispAdjCell[8] + d2 * dispAdjCell[5] + 
-      d1 * dispAdjCell[2] + d4 * dispAdjCell[11];
-    strainCell[3] = 
-      (c4 * dispAdjCell[9] + b3 * dispAdjCell[7] + 
-       c3 * dispAdjCell[6] + b2 * dispAdjCell[4] + 
-       c2 * dispAdjCell[3] + b4 * dispAdjCell[10] + 
-       b1 * dispAdjCell[1] + c1 * dispAdjCell[0]) / 2.0;
-    strainCell[4] = 
-      (c3 * dispAdjCell[8] + d3 * dispAdjCell[7] + 
-       c2 * dispAdjCell[5] + d2 * dispAdjCell[4] +
-       c1 * dispAdjCell[2] + c4 * dispAdjCell[11] + 
-       d4 * dispAdjCell[10] + d1 * dispAdjCell[1]) / 2.0;
-    strainCell[5] = 
-      (d4 * dispAdjCell[9] + b3 * dispAdjCell[8] + 
-       d3 * dispAdjCell[6] + b2 * dispAdjCell[5] + 
-       d2 * dispAdjCell[3] + b1 * dispAdjCell[2] + 
-       b4 * dispAdjCell[11] + d1 * dispAdjCell[0]) / 2.0;
-
-    const scalar_array& stressCell = _material->calcStress(strainCell, false);
-
-#if defined(DETAILED_EVENT_LOGGING)
-    PetscLogFlops(196);
-    _logger->eventEnd(stressEvent);
-    _logger->eventBegin(computeEvent);
-#endif
-
-    assert(_cellVector.size() == 12);
-    assert(stressCell.size() == 6);
-    _cellVector[0] -= (d1*stressCell[5]+c1*stressCell[3]+b1*stressCell[0]) * volume;
-    _cellVector[1] -= (d1*stressCell[4]+b1*stressCell[3]+c1*stressCell[1]) * volume;
-    _cellVector[2] -= (b1*stressCell[5]+c1*stressCell[4]+d1*stressCell[2]) * volume;
-    _cellVector[3] -= (d2*stressCell[5]+c2*stressCell[3]+b2*stressCell[0]) * volume;
-    _cellVector[4] -= (d2*stressCell[4]+b2*stressCell[3]+c2*stressCell[1]) * volume;
-    _cellVector[5] -= (b2*stressCell[5]+c2*stressCell[4]+d2*stressCell[2]) * volume;
-    _cellVector[6] -= (d3*stressCell[5]+c3*stressCell[3]+b3*stressCell[0]) * volume;
-    _cellVector[7] -= (d3*stressCell[4]+b3*stressCell[3]+c3*stressCell[1]) * volume;
-    _cellVector[8] -= (b3*stressCell[5]+c3*stressCell[4]+d3*stressCell[2]) * volume;
-    _cellVector[9] -= (d4*stressCell[5]+c4*stressCell[3]+b4*stressCell[0]) * volume;
-    _cellVector[10] -= (d4*stressCell[4]+b4*stressCell[3]+c4*stressCell[1]) * volume;
-    _cellVector[11] -= (b4*stressCell[5]+c4*stressCell[4]+d4*stressCell[2]) * volume;
-
-#if defined(DETAILED_EVENT_LOGGING)
-    PetscLogFlops(84);
-    _logger->eventEnd(computeEvent);
-    _logger->eventBegin(updateEvent);
-#endif
-
-    // Assemble cell contribution into field
-    residualVisitor.clear();
-    sieveMesh->updateClosure(*c_iter, residualVisitor);
-#if defined(DETAILED_EVENT_LOGGING)
-    _logger->eventEnd(updateEvent);
-#endif
-  } // for
-
-#if !defined(DETAILED_EVENT_LOGGING)
-  PetscLogFlops(cells->size()*(3 + numBasis*numBasis*spaceDim*2 + 196+84));
-  _logger->eventEnd(computeEvent);
-#endif
-} // integrateResidual
-
-// ----------------------------------------------------------------------
-// Integrate constributions to residual term (r) for operator.
-void
-pylith::feassemble::ElasticityExplicitTet4::integrateResidualLumped(
         const topology::Field<topology::Mesh>& residual,
         const PylithScalar t,
         topology::SolutionFields* const fields)
-{ // integrateResidualLumped
+{ // integrateResidual
   /// Member prototype for _elasticityResidualXD()
   typedef void (pylith::feassemble::ElasticityExplicitTet4::*elasticityResidual_fn_type)
     (const scalar_array&);
@@ -757,7 +459,7 @@
   PetscLogFlops(cells->size()*(2 + numBasis*spaceDim*2 + 196+84));
   _logger->eventEnd(computeEvent);
 #endif
-} // integrateResidualLumped
+} // integrateResidual
 
 // ----------------------------------------------------------------------
 // Compute matrix associated with operator.
@@ -767,156 +469,15 @@
 					const PylithScalar t,
 					topology::SolutionFields* fields)
 { // integrateJacobian
-  assert(0 != _quadrature);
-  assert(0 != _material);
-  assert(0 != jacobian);
-  assert(0 != fields);
-
-  const int setupEvent = _logger->eventId("ElIJ setup");
-  const int geometryEvent = _logger->eventId("ElIJ geometry");
-  const int computeEvent = _logger->eventId("ElIJ compute");
-  const int restrictEvent = _logger->eventId("ElIJ restrict");
-  const int stateVarsEvent = _logger->eventId("ElIJ stateVars");
-  const int updateEvent = _logger->eventId("ElIJ update");
-
-  _logger->eventBegin(setupEvent);
-
-  // Get cell geometry information that doesn't depend on cell
-  const int numQuadPts = _quadrature->numQuadPts();
-  const scalar_array& quadWts = _quadrature->quadWts();
-  assert(quadWts.size() == numQuadPts);
-  const int numBasis = _quadrature->numBasis();
-  const int spaceDim = _quadrature->spaceDim();
-  const int cellDim = _quadrature->cellDim();
-  const int tensorSize = _material->tensorSize();
-  if (cellDim != spaceDim)
-    throw std::logic_error("Don't know how to integrate elasticity " \
-			   "contribution to Jacobian matrix for cells with " \
-			   "different dimensions than the spatial dimension.");
-
-  // Get cell information
-  const ALE::Obj<SieveMesh>& sieveMesh = fields->mesh().sieveMesh();
-  assert(!sieveMesh.isNull());
-  const int materialId = _material->id();
-  const ALE::Obj<SieveMesh::label_sequence>& cells = 
-    sieveMesh->getLabelStratum("material-id", materialId);
-  assert(!cells.isNull());
-  const SieveMesh::label_sequence::iterator cellsBegin = cells->begin();
-  const SieveMesh::label_sequence::iterator cellsEnd = cells->end();
-
-  // Get sections
-  scalar_array dispCell(numBasis*spaceDim);
-  const ALE::Obj<RealSection>& dispSection = 
-    fields->get("disp(t)").section();
-  assert(!dispSection.isNull());
-
-  // Get sparse matrix
-  const PetscMat jacobianMat = jacobian->matrix();
-  assert(0 != jacobianMat);
-
-  // Get parameters used in integration.
-  const PylithScalar dt = _dt;
-  const PylithScalar dt2 = dt*dt;
-  assert(dt > 0);
-
-  const ALE::Obj<SieveMesh::order_type>& globalOrder = 
-    sieveMesh->getFactory()->getGlobalOrder(sieveMesh, "default", dispSection);
-  assert(!globalOrder.isNull());
-  // We would need to request unique points here if we had an interpolated mesh
-  IndicesVisitor jacobianVisitor(*dispSection, *globalOrder,
-				 (int) pow(sieveMesh->getSieve()->getMaxConeSize(),
-					   sieveMesh->depth())*spaceDim);
-
-  scalar_array coordinatesCell(numBasis*spaceDim);
-  const ALE::Obj<RealSection>& coordinates = 
-    sieveMesh->getRealSection("coordinates");
-  assert(!coordinates.isNull());
-  RestrictVisitor coordsVisitor(*coordinates, 
-				coordinatesCell.size(), &coordinatesCell[0]);
-
-  _logger->eventEnd(setupEvent);
-#if !defined(DETAILED_EVENT_LOGGING)
-  _logger->eventBegin(computeEvent);
-#endif
-
-  // Loop over cells
-  for (SieveMesh::label_sequence::iterator c_iter=cellsBegin;
-       c_iter != cellsEnd;
-       ++c_iter) {
-#if defined(DETAILED_EVENT_LOGGING)
-    _logger->eventBegin(geometryEvent);
-#endif
-
-    // Compute geometry information for current cell
-    coordsVisitor.clear();
-    sieveMesh->restrictClosure(*c_iter, coordsVisitor);
-    const PylithScalar volume = _volume(coordinatesCell);
-    assert(volume > 0.0);
-
-#if defined(DETAILED_EVENT_LOGGING)
-    _logger->eventEnd(geometryEvent);
-    _logger->eventBegin(stateVarsEvent);
-#endif
-
-    // Get state variables for cell.
-    _material->retrievePropsAndVars(*c_iter);
-
-#if defined(DETAILED_EVENT_LOGGING)
-    _logger->eventEnd(stateVarsEvent);
-    _logger->eventBegin(computeEvent);
-#endif
-
-    // Reset element matrix to zero
-    _resetCellMatrix();
-
-    // Get material physical properties at quadrature points for this cell
-    const scalar_array& density = _material->calcDensity();
-    assert(density.size() == 1);
-
-    // Compute Jacobian for inertial terms
-    const PylithScalar wtVertex = density[0] * volume / (16.0 * dt2);
-    for (int iBasis = 0; iBasis < numBasis; ++iBasis)
-      for (int jBasis = 0; jBasis < numBasis; ++jBasis)
-	for (int iDim=0; iDim < spaceDim; ++iDim) {
-	  const int iBlock = (iBasis*spaceDim + iDim) * (numBasis*spaceDim);
-	  const int jBlock = (jBasis*spaceDim + iDim);
-	  _cellMatrix[iBlock+jBlock] += wtVertex;
-	} // for
-    
-#if defined(DETAILED_EVENT_LOGGING)
-    PetscLogFlops(numQuadPts*(3+numBasis*numBasis*spaceDim*1));
-    _logger->eventEnd(computeEvent);
-    _logger->eventBegin(updateEvent);
-#endif
-    
-    // Assemble cell contribution into PETSc matrix.
-    jacobianVisitor.clear();
-    PetscErrorCode err = updateOperator(jacobianMat, *sieveMesh->getSieve(),
-					jacobianVisitor, *c_iter,
-					&_cellMatrix[0], ADD_VALUES);
-    CHECK_PETSC_ERROR_MSG(err, "Update to PETSc Mat failed.");
-
-#if defined(DETAILED_EVENT_LOGGING)
-    _logger->eventEnd(updateEvent);
-#endif
-  } // for
-
-#if !defined(DETAILED_EVENT_LOGGING)
-  PetscLogFlops(cells->size()*(3+numBasis*numBasis*spaceDim*1));
-  _logger->eventEnd(computeEvent);
-#endif
-
-  _needNewJacobian = false;
-  _material->resetNeedNewJacobian();
+  throw std::logic_error("ElasticityExplicit::integrateJacobian() not implemented. Use integrateJacobian(lumped) instead.");
 } // integrateJacobian
 
 // ----------------------------------------------------------------------
 // Compute matrix associated with operator.
 void
-pylith::feassemble::ElasticityExplicitTet4::integrateJacobian(
-			    topology::Field<topology::Mesh>* jacobian,
-			    const PylithScalar t,
-			    topology::SolutionFields* fields)
+pylith::feassemble::ElasticityExplicitTet4::integrateJacobian(topology::Field<topology::Mesh>* jacobian,
+							      const PylithScalar t,
+							      topology::SolutionFields* fields)
 { // integrateJacobian
   assert(0 != _quadrature);
   assert(0 != _material);
@@ -1031,10 +592,29 @@
 } // integrateJacobian
 
 // ----------------------------------------------------------------------
+// Verify configuration is acceptable.
+void
+pylith::feassemble::ElasticityExplicitTet4::verifyConfiguration(const topology::Mesh& mesh) const
+{ // verifyConfiguration
+  IntegratorElasticity::verifyConfiguration(mesh);
+
+  assert(_quadrature);
+  assert(_material);
+  if (_spaceDim != _quadrature->spaceDim() || _cellDim != _quadrature->cellDim() || _numBasis != _quadrature->numBasis() ||  _numQuadPts != _quadrature->numQuadPts()) {
+    std::ostringstream msg;
+    msg << "User specified quadrature settings material '" << _material->label() << "' do not match ElasticityExplicitTet4 hardwired quadrature settings.\n"
+	<< "  Space dim: " << _spaceDim << " (code), " << _quadrature->spaceDim() << " (user)\n"
+	<< "  Cell dim: " << _cellDim << " (code), " << _quadrature->cellDim() << " (user)\n"
+	<< "  # basis fns: " << _numBasis << " (code), " << _quadrature->numBasis() << " (user)\n"
+	<< "  # quad points: " << _numQuadPts << " (code), " << _quadrature->numQuadPts() << " (user)";
+    throw std::runtime_error(msg.str());
+  } // if
+} // verifyConfiguration
+
+// ----------------------------------------------------------------------
 // Compute volume of tetrahedral cell.
 PylithScalar
-pylith::feassemble::ElasticityExplicitTet4::_volume(
-			     const scalar_array& coordinatesCell) const
+pylith::feassemble::ElasticityExplicitTet4::_volume(const scalar_array& coordinatesCell) const
 { // __volume
   assert(12 == coordinatesCell.size());
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/ElasticityExplicitTet4.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/ElasticityExplicitTet4.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/ElasticityExplicitTet4.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -90,6 +90,15 @@
    */
   void timeStep(const PylithScalar dt);
 
+  /** Get stable time step for advancing from time t to time t+dt.
+   *
+   * Default is current time step.
+   *
+   * @param mesh Finite-element mesh.
+   * @returns Time step
+   */
+  PylithScalar stableTimeStep(const topology::Mesh& mesh) const;
+
   /** Set normalized viscosity for numerical damping.
    *
    * @param viscosity Normalized viscosity (viscosity / elastic modulus).
@@ -113,37 +122,22 @@
 			 const PylithScalar t,
 			 topology::SolutionFields* const fields);
 
-  /** Integrate contributions to residual term (r) for operator.
-   *
-   * @param residual Field containing values for residual
-   * @param t Current time
-   * @param fields Solution fields
-   */
-  void integrateResidualLumped(const topology::Field<topology::Mesh>& residual,
-       const PylithScalar t,
-       topology::SolutionFields* const fields);
-
   /** Integrate contributions to Jacobian matrix (A) associated with
    * operator.
    *
-   * @param jacobian Sparse matrix for Jacobian of system.
+   * @param jacobian Diagonal matrix (as field) for Jacobian of system.
    * @param t Current time
    * @param fields Solution fields
    */
-  void integrateJacobian(topology::Jacobian* jacobian,
+  void integrateJacobian(topology::Field<topology::Mesh>* jacobian,
 			 const PylithScalar t,
 			 topology::SolutionFields* const fields);
 
-  /** Integrate contributions to Jacobian matrix (A) associated with
-   * operator.
+  /** Verify configuration is acceptable.
    *
-   * @param jacobian Diagonal matrix (as field) for Jacobian of system.
-   * @param t Current time
-   * @param fields Solution fields
+   * @param mesh Finite-element mesh
    */
-  void integrateJacobian(topology::Field<topology::Mesh>* jacobian,
-			 const PylithScalar t,
-			 topology::SolutionFields* const fields);
+  void verifyConfiguration(const topology::Mesh& mesh) const;
 
 // PRIVATE METHODS //////////////////////////////////////////////////////
 private :
@@ -185,6 +179,11 @@
   /// Not implemented
   const ElasticityExplicitTet4& operator=(const ElasticityExplicitTet4&);
 
+  /// Not implemented.
+  void integrateJacobian(topology::Jacobian*,
+			 const PylithScalar,
+			 topology::SolutionFields* const);
+
 }; // ElasticityExplicitTet4
 
 #endif // pylith_feassemble_elasticityexplicittet4_hh

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/ElasticityExplicitTri3.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/ElasticityExplicitTri3.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/ElasticityExplicitTri3.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -88,6 +88,15 @@
 } // timeStep
 
 // ----------------------------------------------------------------------
+// Get stable time step for advancing from time t to time t+dt.
+PylithScalar
+pylith::feassemble::ElasticityExplicitTri3::stableTimeStep(const topology::Mesh& mesh) const
+{ // stableTimeStep
+  assert(_material);
+  return _material->stableTimeStepExplicit(mesh, _quadrature);
+} // stableTimeStep
+
+// ----------------------------------------------------------------------
 // Set normalized viscosity for numerical damping.
 void
 pylith::feassemble::ElasticityExplicitTri3::normViscosity(const PylithScalar viscosity)
@@ -117,281 +126,10 @@
 // ----------------------------------------------------------------------
 // Integrate constributions to residual term (r) for operator.
 void
-pylith::feassemble::ElasticityExplicitTri3::integrateResidual(
-			  const topology::Field<topology::Mesh>& residual,
-			  const PylithScalar t,
-			  topology::SolutionFields* const fields)
+pylith::feassemble::ElasticityExplicitTri3::integrateResidual(const topology::Field<topology::Mesh>& residual,
+							      const PylithScalar t,
+							      topology::SolutionFields* const fields)
 { // integrateResidual
-  assert(0 != _quadrature);
-  assert(0 != _material);
-  assert(0 != _logger);
-  assert(0 != fields);
-
-  const int setupEvent = _logger->eventId("ElIR setup");
-  const int geometryEvent = _logger->eventId("ElIR geometry");
-  const int computeEvent = _logger->eventId("ElIR compute");
-  const int restrictEvent = _logger->eventId("ElIR restrict");
-  const int stateVarsEvent = _logger->eventId("ElIR stateVars");
-  const int stressEvent = _logger->eventId("ElIR stress");
-  const int updateEvent = _logger->eventId("ElIR update");
-
-  _logger->eventBegin(setupEvent);
-
-  // Get cell geometry information that doesn't depend on cell
-  assert(_quadrature->numQuadPts() == _numQuadPts);
-  const scalar_array& quadWts = _quadrature->quadWts();
-  assert(quadWts.size() == _numQuadPts);
-  assert(_quadrature->numBasis() == _numBasis);
-  assert(_quadrature->spaceDim() == _spaceDim);
-  assert(_quadrature->cellDim() == _cellDim);
-  assert(_material->tensorSize() == _tensorSize);
-  const int spaceDim = _spaceDim;
-  const int cellDim = _cellDim;
-  const int tensorSize = _tensorSize;
-  const int numBasis = _numBasis;
-  const int numQuadPts = _numQuadPts;
-  /** :TODO:
-   *
-   * If cellDim and spaceDim are different, we need to transform
-   * displacements into cellDim, compute action, and transform result
-   * back into spaceDim. We get this information from the Jacobian and
-   * inverse of the Jacobian.
-   */
-  if (cellDim != spaceDim)
-    throw std::logic_error("Integration for cells with spatial dimensions "
-			   "different than the spatial dimension of the "
-			   "domain not implemented yet.");
-
-  // Allocate vectors for cell values.
-  scalar_array strainCell(numQuadPts*tensorSize);
-  strainCell = 0.0;
-  scalar_array gravVec(spaceDim);
-  scalar_array quadPtsGlobal(numQuadPts*spaceDim);
-
-  // Get cell information
-  const ALE::Obj<SieveMesh>& sieveMesh = fields->mesh().sieveMesh();
-  assert(!sieveMesh.isNull());
-  const int materialId = _material->id();
-  const ALE::Obj<SieveMesh::label_sequence>& cells = 
-    sieveMesh->getLabelStratum("material-id", materialId);
-  assert(!cells.isNull());
-  const SieveMesh::label_sequence::iterator cellsBegin = cells->begin();
-  const SieveMesh::label_sequence::iterator cellsEnd = cells->end();
-
-  // Get sections
-  scalar_array accCell(numBasis*spaceDim);
-  const ALE::Obj<RealSection>& accSection = 
-    fields->get("acceleration(t)").section();
-  assert(!accSection.isNull());
-  RestrictVisitor accVisitor(*accSection, accCell.size(), &accCell[0]);
-
-  scalar_array velCell(numBasis*spaceDim);
-  const ALE::Obj<RealSection>& velSection = 
-    fields->get("velocity(t)").section();
-  assert(!velSection.isNull());
-  RestrictVisitor velVisitor(*velSection, velCell.size(), &velCell[0]);
-
-  scalar_array dispCell(numBasis*spaceDim);
-  scalar_array dispAdjCell(numBasis*spaceDim);
-  const ALE::Obj<RealSection>& dispSection = 
-    fields->get("disp(t)").section();
-  assert(!dispSection.isNull());
-  RestrictVisitor dispVisitor(*dispSection, dispCell.size(), &dispCell[0]);
-
-  const ALE::Obj<RealSection>& residualSection = residual.section();
-  UpdateAddVisitor residualVisitor(*residualSection, &_cellVector[0]);
-  
-  scalar_array coordinatesCell(numBasis*spaceDim);
-  const ALE::Obj<RealSection>& coordinates = 
-    sieveMesh->getRealSection("coordinates");
-  assert(!coordinates.isNull());
-  RestrictVisitor coordsVisitor(*coordinates, 
-				coordinatesCell.size(), &coordinatesCell[0]);
-
-  assert(0 != _normalizer);
-  const PylithScalar lengthScale = _normalizer->lengthScale();
-  const PylithScalar gravityScale = 
-    _normalizer->pressureScale() / (_normalizer->lengthScale() *
-				    _normalizer->densityScale());
-
-  const PylithScalar dt = _dt;
-  assert(_normViscosity > 0.0);
-  assert(dt > 0);
-  const PylithScalar viscosity = dt*_normViscosity;
-
-  _logger->eventEnd(setupEvent);
-#if !defined(DETAILED_EVENT_LOGGING)
-  _logger->eventBegin(computeEvent);
-#endif
-
-  // Loop over cells
-  for (SieveMesh::label_sequence::iterator c_iter=cellsBegin;
-       c_iter != cellsEnd;
-       ++c_iter) {
-#if defined(DETAILED_EVENT_LOGGING)
-    _logger->eventBegin(geometryEvent);
-#endif
-
-    // Compute geometry information for current cell
-    coordsVisitor.clear();
-    sieveMesh->restrictClosure(*c_iter, coordsVisitor);
-    const PylithScalar area = _area(coordinatesCell);
-    assert(area > 0.0);
-
-#if defined(DETAILED_EVENT_LOGGING)
-    _logger->eventEnd(geometryEvent);
-    _logger->eventBegin(stateVarsEvent);
-#endif
-
-    // Get state variables for cell.
-    _material->retrievePropsAndVars(*c_iter);
-
-    #if defined(DETAILED_EVENT_LOGGING)
-    _logger->eventEnd(stateVarsEvent);
-    _logger->eventBegin(restrictEvent);
-#endif
-
-    // Reset element vector to zero
-    _resetCellVector();
-
-    // Restrict input fields to cell
-    accVisitor.clear();
-    sieveMesh->restrictClosure(*c_iter, accVisitor);
-    
-    velVisitor.clear();
-    sieveMesh->restrictClosure(*c_iter, velVisitor);
-
-    dispVisitor.clear();
-    sieveMesh->restrictClosure(*c_iter, dispVisitor);
-    
-#if defined(DETAILED_EVENT_LOGGING)
-    _logger->eventEnd(restrictEvent);
-    _logger->eventBegin(computeEvent);
-#endif
-
-    const scalar_array& density = _material->calcDensity();
-    assert(density.size() == 1);
-
-    // Compute body force vector if gravity is being used.
-    if (0 != _gravityField) {
-      const spatialdata::geocoords::CoordSys* cs = fields->mesh().coordsys();
-      assert(0 != cs);
-
-      quadPtsGlobal = 0.0;
-      for (int iBasis=0; iBasis < numBasis; ++iBasis)
-        for (int iDim=0; iDim < spaceDim; ++iDim)
-          quadPtsGlobal[iDim] += 
-	    coordinatesCell[iBasis*spaceDim+iDim] / numBasis;
-      _normalizer->dimensionalize(&quadPtsGlobal[0], quadPtsGlobal.size(),
-          lengthScale);
-
-      // Compute action for element body forces
-      spatialdata::spatialdb::SpatialDB* db = _gravityField;
-      const int err = db->query(&gravVec[0], gravVec.size(),
-        &quadPtsGlobal[0], spaceDim, cs);
-      if (err)
-        throw std::runtime_error("Unable to get gravity vector for point.");
-      _normalizer->nondimensionalize(&gravVec[0], gravVec.size(),
-          gravityScale);
-      const PylithScalar wtVertex = density[0] * area / 3.0;
-      for (int iBasis=0; iBasis < numBasis; ++iBasis)
-        for (int iDim=0; iDim < spaceDim; ++iDim)
-            _cellVector[iBasis * spaceDim + iDim] += wtVertex * gravVec[iDim];
-      PetscLogFlops(numBasis*spaceDim*2 + numBasis*spaceDim*2);
-    } // if
-
-    // Compute action for inertial terms
-    const PylithScalar wtVertex = density[0] * area / 9.0;
-    for (int iBasis = 0; iBasis < numBasis; ++iBasis)
-      for (int jBasis = 0; jBasis < numBasis; ++jBasis)
-        for (int iDim = 0; iDim < spaceDim; ++iDim)
-            _cellVector[iBasis*spaceDim+iDim] -= 
-	      wtVertex * accCell[jBasis*spaceDim+iDim];
-
-#if defined(DETAILED_EVENT_LOGGING)
-    PetscLogFlops(3 + numBasis*numBasis*spaceDim*2);
-    _logger->eventEnd(computeEvent);
-    _logger->eventBegin(stressEvent);
-#endif
-
-    // Numerical damping. Compute displacements adjusted by velocity
-    // times normalized viscosity.
-    dispAdjCell = dispCell + viscosity * velCell;
-
-    // Compute B(transpose) * sigma, first computing strains
-    const PylithScalar x0 = coordinatesCell[0];
-    const PylithScalar y0 = coordinatesCell[1];
-
-    const PylithScalar x1 = coordinatesCell[2];
-    const PylithScalar y1 = coordinatesCell[3];
-
-    const PylithScalar x2 = coordinatesCell[4];
-    const PylithScalar y2 = coordinatesCell[5];
-
-    const PylithScalar scaleB = 2.0 * area;
-    const PylithScalar b0 = (y1 - y2) / scaleB;
-    const PylithScalar c0 = (x2 - x1) / scaleB;
-
-    const PylithScalar b1 = (y2 - y0) / scaleB;
-    const PylithScalar c1 = (x0 - x2) / scaleB;
-
-    const PylithScalar b2 = (y0 - y1) / scaleB;
-    const PylithScalar c2 = (x1 - x0) / scaleB;
-
-    assert(strainCell.size() == 3);
-    strainCell[0] = b2*dispAdjCell[4] + b1*dispAdjCell[2] + b0*dispAdjCell[0];
-    
-    strainCell[1] = c2*dispAdjCell[5] + c1*dispAdjCell[3] + c0*dispAdjCell[1];
-
-    strainCell[2] = (b2*dispAdjCell[5] + c2*dispAdjCell[4] + b1*dispAdjCell[3] + 
-		     c1*dispAdjCell[2] + b0*dispAdjCell[1] + c0*dispAdjCell[0]) / 2.0;
-
-
-    const scalar_array& stressCell = _material->calcStress(strainCell, false);
-
-#if defined(DETAILED_EVENT_LOGGING)
-    PetscLogFlops(34);
-    _logger->eventEnd(stressEvent);
-    _logger->eventBegin(computeEvent);
-#endif
-
-    assert(_cellVector.size() == 6);
-    assert(stressCell.size() == 3);
-    _cellVector[0] -= (c0*stressCell[2] + b0*stressCell[0]) * area;
-    _cellVector[1] -= (b0*stressCell[2] + c0*stressCell[1]) * area;
-    _cellVector[2] -= (c1*stressCell[2] + b1*stressCell[0]) * area;
-    _cellVector[3] -= (b1*stressCell[2] + c1*stressCell[1]) * area;
-    _cellVector[4] -= (c2*stressCell[2] + b2*stressCell[0]) * area;
-    _cellVector[5] -= (b2*stressCell[2] + c2*stressCell[1]) * area;
-
-#if defined(DETAILED_EVENT_LOGGING)
-    PetscLogFlops(30);
-    _logger->eventEnd(computeEvent);
-    _logger->eventBegin(updateEvent);
-#endif
-
-    // Assemble cell contribution into field
-    residualVisitor.clear();
-    sieveMesh->updateClosure(*c_iter, residualVisitor);
-#if defined(DETAILED_EVENT_LOGGING)
-    _logger->eventEnd(updateEvent);
-#endif
-  } // for
-
-#if !defined(DETAILED_EVENT_LOGGING)
-  PetscLogFlops(cells->size()*(3 + numBasis*numBasis*spaceDim*2 + 34+30));
-  _logger->eventEnd(computeEvent);
-#endif
-} // integrateResidual
-
-// ----------------------------------------------------------------------
-// Integrate constributions to residual term (r) for operator.
-void
-pylith::feassemble::ElasticityExplicitTri3::integrateResidualLumped(
-        const topology::Field<topology::Mesh>& residual,
-        const PylithScalar t,
-        topology::SolutionFields* const fields)
-{ // integrateResidualLumped
   /// Member prototype for _elasticityResidualXD()
   typedef void (pylith::feassemble::ElasticityExplicitTri3::*elasticityResidual_fn_type)
     (const scalar_array&);
@@ -668,157 +406,16 @@
   PetscLogFlops(cells->size()*(2 + numBasis*spaceDim*2 + 34+30));
   _logger->eventEnd(computeEvent);
 #endif
-} // integrateResidualLumped
+} // integrateResidual
 
 // ----------------------------------------------------------------------
 // Compute matrix associated with operator.
 void
-pylith::feassemble::ElasticityExplicitTri3::integrateJacobian(
-					topology::Jacobian* jacobian,
-					const PylithScalar t,
-					topology::SolutionFields* fields)
+pylith::feassemble::ElasticityExplicitTri3::integrateJacobian(topology::Jacobian* jacobian,
+							      const PylithScalar t,
+							      topology::SolutionFields* fields)
 { // integrateJacobian
-  assert(0 != _quadrature);
-  assert(0 != _material);
-  assert(0 != jacobian);
-  assert(0 != fields);
-
-  const int setupEvent = _logger->eventId("ElIJ setup");
-  const int geometryEvent = _logger->eventId("ElIJ geometry");
-  const int computeEvent = _logger->eventId("ElIJ compute");
-  const int restrictEvent = _logger->eventId("ElIJ restrict");
-  const int stateVarsEvent = _logger->eventId("ElIJ stateVars");
-  const int updateEvent = _logger->eventId("ElIJ update");
-
-  _logger->eventBegin(setupEvent);
-
-  // Get cell geometry information that doesn't depend on cell
-  const int numQuadPts = _quadrature->numQuadPts();
-  const scalar_array& quadWts = _quadrature->quadWts();
-  assert(quadWts.size() == numQuadPts);
-  const int numBasis = _quadrature->numBasis();
-  const int spaceDim = _quadrature->spaceDim();
-  const int cellDim = _quadrature->cellDim();
-  const int tensorSize = _material->tensorSize();
-  if (cellDim != spaceDim)
-    throw std::logic_error("Don't know how to integrate elasticity " \
-			   "contribution to Jacobian matrix for cells with " \
-			   "different dimensions than the spatial dimension.");
-
-  // Get cell information
-  const ALE::Obj<SieveMesh>& sieveMesh = fields->mesh().sieveMesh();
-  assert(!sieveMesh.isNull());
-  const int materialId = _material->id();
-  const ALE::Obj<SieveMesh::label_sequence>& cells = 
-    sieveMesh->getLabelStratum("material-id", materialId);
-  assert(!cells.isNull());
-  const SieveMesh::label_sequence::iterator cellsBegin = cells->begin();
-  const SieveMesh::label_sequence::iterator cellsEnd = cells->end();
-
-  // Get sections
-  scalar_array dispCell(numBasis*spaceDim);
-  const ALE::Obj<RealSection>& dispSection = 
-    fields->get("disp(t)").section();
-  assert(!dispSection.isNull());
-
-  // Get sparse matrix
-  const PetscMat jacobianMat = jacobian->matrix();
-  assert(0 != jacobianMat);
-
-  // Get parameters used in integration.
-  const PylithScalar dt = _dt;
-  const PylithScalar dt2 = dt*dt;
-  assert(dt > 0);
-
-  const ALE::Obj<SieveMesh::order_type>& globalOrder = 
-    sieveMesh->getFactory()->getGlobalOrder(sieveMesh, "default", dispSection);
-  assert(!globalOrder.isNull());
-  // We would need to request unique points here if we had an interpolated mesh
-  IndicesVisitor jacobianVisitor(*dispSection, *globalOrder,
-				 (int) pow(sieveMesh->getSieve()->getMaxConeSize(),
-					   sieveMesh->depth())*spaceDim);
-
-  scalar_array coordinatesCell(numBasis*spaceDim);
-  const ALE::Obj<RealSection>& coordinates = 
-    sieveMesh->getRealSection("coordinates");
-  assert(!coordinates.isNull());
-  RestrictVisitor coordsVisitor(*coordinates, 
-				coordinatesCell.size(), &coordinatesCell[0]);
-
-  _logger->eventEnd(setupEvent);
-#if !defined(DETAILED_EVENT_LOGGING)
-  _logger->eventBegin(computeEvent);
-#endif
-
-  // Loop over cells
-  for (SieveMesh::label_sequence::iterator c_iter=cellsBegin;
-       c_iter != cellsEnd;
-       ++c_iter) {
-#if defined(DETAILED_EVENT_LOGGING)
-    _logger->eventBegin(geometryEvent);
-#endif
-
-    // Compute geometry information for current cell
-    coordsVisitor.clear();
-    sieveMesh->restrictClosure(*c_iter, coordsVisitor);
-    const PylithScalar area = _area(coordinatesCell);
-    assert(area > 0.0);
-
-#if defined(DETAILED_EVENT_LOGGING)
-    _logger->eventEnd(geometryEvent);
-    _logger->eventBegin(stateVarsEvent);
-#endif
-
-    // Get state variables for cell.
-    _material->retrievePropsAndVars(*c_iter);
-
-#if defined(DETAILED_EVENT_LOGGING)
-    _logger->eventEnd(stateVarsEvent);
-    _logger->eventBegin(computeEvent);
-#endif
-
-    // Reset element matrix to zero
-    _resetCellMatrix();
-
-    // Get material physical properties at quadrature points for this cell
-    const scalar_array& density = _material->calcDensity();
-    assert(density.size() == 1);
-
-    // Compute Jacobian for inertial terms
-    const PylithScalar wtVertex = density[0] * area / (9.0 * dt2);
-    for (int iBasis = 0; iBasis < numBasis; ++iBasis)
-      for (int jBasis = 0; jBasis < numBasis; ++jBasis)
-	for (int iDim=0; iDim < spaceDim; ++iDim) {
-	  const int iBlock = (iBasis*spaceDim + iDim) * (numBasis*spaceDim);
-	  const int jBlock = (jBasis*spaceDim + iDim);
-	  _cellMatrix[iBlock+jBlock] += wtVertex;
-	} // for
-    
-#if defined(DETAILED_EVENT_LOGGING)
-    PetscLogFlops(numQuadPts*(3+numBasis*numBasis*spaceDim*1));
-    _logger->eventEnd(computeEvent);
-    _logger->eventBegin(updateEvent);
-#endif
-    
-    // Assemble cell contribution into PETSc matrix.
-    jacobianVisitor.clear();
-    PetscErrorCode err = updateOperator(jacobianMat, *sieveMesh->getSieve(),
-					jacobianVisitor, *c_iter,
-					&_cellMatrix[0], ADD_VALUES);
-    CHECK_PETSC_ERROR_MSG(err, "Update to PETSc Mat failed.");
-
-#if defined(DETAILED_EVENT_LOGGING)
-    _logger->eventEnd(updateEvent);
-#endif
-  } // for
-
-#if !defined(DETAILED_EVENT_LOGGING)
-  PetscLogFlops(cells->size()*(3+numBasis*numBasis*spaceDim*1));
-  _logger->eventEnd(computeEvent);
-#endif
-
-  _needNewJacobian = false;
-  _material->resetNeedNewJacobian();
+  throw std::logic_error("ElasticityExplicit::integrateJacobian() not implemented. Use integrateJacobian(lumped) instead.");
 } // integrateJacobian
 
 // ----------------------------------------------------------------------
@@ -942,6 +539,26 @@
 } // integrateJacobian
 
 // ----------------------------------------------------------------------
+// Verify configuration is acceptable.
+void
+pylith::feassemble::ElasticityExplicitTri3::verifyConfiguration(const topology::Mesh& mesh) const
+{ // verifyConfiguration
+  IntegratorElasticity::verifyConfiguration(mesh);
+
+  assert(_quadrature);
+  assert(_material);
+  if (_spaceDim != _quadrature->spaceDim() || _cellDim != _quadrature->cellDim() || _numBasis != _quadrature->numBasis() ||  _numQuadPts != _quadrature->numQuadPts()) {
+    std::ostringstream msg;
+    msg << "User specified quadrature settings material '" << _material->label() << "' do not match ElasticityExplicitTri3 hardwired quadrature settings.\n"
+	<< "  Space dim: " << _spaceDim << " (code), " << _quadrature->spaceDim() << " (user)\n"
+	<< "  Cell dim: " << _cellDim << " (code), " << _quadrature->cellDim() << " (user)\n"
+	<< "  # basis fns: " << _numBasis << " (code), " << _quadrature->numBasis() << " (user)\n"
+	<< "  # quad points: " << _numQuadPts << " (code), " << _quadrature->numQuadPts() << " (user)";
+    throw std::runtime_error(msg.str());
+  } // if
+} // verifyConfiguration
+
+// ----------------------------------------------------------------------
 // Compute area of triangular cell.
 PylithScalar
 pylith::feassemble::ElasticityExplicitTri3::_area(

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/ElasticityExplicitTri3.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/ElasticityExplicitTri3.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/ElasticityExplicitTri3.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -90,6 +90,15 @@
    */
   void timeStep(const PylithScalar dt);
 
+  /** Get stable time step for advancing from time t to time t+dt.
+   *
+   * Default is current time step.
+   *
+   * @param mesh Finite-element mesh.
+   * @returns Time step
+   */
+  PylithScalar stableTimeStep(const topology::Mesh& mesh) const;
+
   /** Set normalized viscosity for numerical damping.
    *
    * @param viscosity Normalized viscosity (viscosity / elastic modulus).
@@ -113,37 +122,22 @@
 			 const PylithScalar t,
 			 topology::SolutionFields* const fields);
 
-  /** Integrate contributions to residual term (r) for operator.
-   *
-   * @param residual Field containing values for residual
-   * @param t Current time
-   * @param fields Solution fields
-   */
-  void integrateResidualLumped(const topology::Field<topology::Mesh>& residual,
-       const PylithScalar t,
-       topology::SolutionFields* const fields);
-
   /** Integrate contributions to Jacobian matrix (A) associated with
    * operator.
    *
-   * @param jacobian Sparse matrix for Jacobian of system.
+   * @param jacobian Diagonal matrix (as field) for Jacobian of system.
    * @param t Current time
    * @param fields Solution fields
    */
-  void integrateJacobian(topology::Jacobian* jacobian,
+  void integrateJacobian(topology::Field<topology::Mesh>* jacobian,
 			 const PylithScalar t,
 			 topology::SolutionFields* const fields);
 
-  /** Integrate contributions to Jacobian matrix (A) associated with
-   * operator.
+  /** Verify configuration is acceptable.
    *
-   * @param jacobian Diagonal matrix (as field) for Jacobian of system.
-   * @param t Current time
-   * @param fields Solution fields
+   * @param mesh Finite-element mesh
    */
-  void integrateJacobian(topology::Field<topology::Mesh>* jacobian,
-			 const PylithScalar t,
-			 topology::SolutionFields* const fields);
+  void verifyConfiguration(const topology::Mesh& mesh) const;
 
 // PRIVATE METHODS //////////////////////////////////////////////////////
 private :
@@ -185,6 +179,11 @@
   /// Not implemented
   const ElasticityExplicitTri3& operator=(const ElasticityExplicitTri3&);
 
+  /// Not implemented.
+  void integrateJacobian(topology::Jacobian*,
+			 const PylithScalar,
+			 topology::SolutionFields* const);
+
 }; // ElasticityExplicitTri3
 
 #endif // pylith_feassemble_elasticityexplicittri3_hh

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryHex3D.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryHex3D.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryHex3D.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -25,6 +25,7 @@
 #include "petsc.h" // USES PetscLogFlops
 
 #include "pylith/utils/array.hh" // USES scalar_array
+#include "pylith/utils/constdefs.h" // USES PYLITH_MAXSCALAR
 
 #include <cassert> // USES assert()
 
@@ -366,5 +367,43 @@
   PetscLogFlops(78 + npts*69);
 } // jacobian
 
+// ----------------------------------------------------------------------
+// Compute minimum width across cell.
+PylithScalar
+pylith::feassemble::GeometryHex3D::minCellWidth(const scalar_array& coordinatesCell) const
+{ // minCellWidth
+  const int numCorners = 8;
+  const int spaceDim = 3;
+  assert(numCorners*spaceDim == coordinatesCell.size());
 
+  const int numEdges = 12;
+  const int edges[numEdges][2] = {
+    {0, 1}, {1, 2}, {2, 3}, {3, 0},
+    {4, 5}, {5, 6}, {6, 7}, {7, 0},
+    {0, 4}, {1, 5}, {2, 6}, {3, 7},
+  };
+
+  PylithScalar minWidth = PYLITH_MAXSCALAR;
+  for (int iedge=0; iedge < numEdges; ++iedge) {
+    const int iA = edges[iedge][0];
+    const int iB = edges[iedge][1];
+    const PylithScalar xA = coordinatesCell[spaceDim*iA  ];
+    const PylithScalar yA = coordinatesCell[spaceDim*iA+1];
+    const PylithScalar zA = coordinatesCell[spaceDim*iA+2];
+    const PylithScalar xB = coordinatesCell[spaceDim*iB  ];
+    const PylithScalar yB = coordinatesCell[spaceDim*iB+1];
+    const PylithScalar zB = coordinatesCell[spaceDim*iB+2];
+    
+    const PylithScalar edgeLen = sqrt(pow(xB-xA,2) + pow(yB-yA,2) + pow(zB-zA,2));
+    if (edgeLen < minWidth) {
+      minWidth = edgeLen;
+    } // if
+  } // for
+
+  PetscLogFlops(numEdges*9);
+
+  return minWidth;
+} // minCellWidth
+
+
 // End of file

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryHex3D.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryHex3D.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryHex3D.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -114,6 +114,13 @@
 		const int dim,
 		const int npts =1) const;
 
+  /** Compute minimum width across cell.
+   *
+   * @param coordinatesCell Coordinates of vertices in cell.
+   * @returns Minimum width across cell.
+   */
+  PylithScalar minCellWidth(const scalar_array& coordinatesCell) const;
+
   // NOT IMPLEMENTED ////////////////////////////////////////////////////
 private :
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryLine1D.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryLine1D.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryLine1D.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -23,6 +23,7 @@
 #include "GeometryPoint1D.hh" // USES GeometryPoint
 
 #include "pylith/utils/array.hh" // USES scalar_array
+#include "pylith/utils/constdefs.h" // USES scalar_array
 
 #include "petsc.h" // USES PetscLogFlops
 
@@ -140,4 +141,25 @@
 } // jacobian
 
 
+// ----------------------------------------------------------------------
+// Compute minimum width across cell.
+PylithScalar
+pylith::feassemble::GeometryLine1D::minCellWidth(const scalar_array& coordinatesCell) const
+{ // minCellWidth
+  const int numCorners = 2;
+  const int spaceDim = 1;
+  assert(2*spaceDim == coordinatesCell.size() ||
+	 3*spaceDim == coordinatesCell.size()); // :KLUDGE: allow quadratic
+
+  const PylithScalar xA = coordinatesCell[0];
+  const PylithScalar xB = coordinatesCell[1];
+    
+  const PylithScalar minWidth = fabs(xB-xA);
+
+  PetscLogFlops(2);
+
+  return minWidth;
+} // minCellWidth
+
+
 // End of file

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryLine1D.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryLine1D.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryLine1D.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -98,6 +98,13 @@
 		const int dim,
 		const int npts =1) const;
 
+  /** Compute minimum width across cell.
+   *
+   * @param coordinatesCell Coordinates of vertices in cell.
+   * @returns Minimum width across cell.
+   */
+  PylithScalar minCellWidth(const scalar_array& coordinatesCell) const;
+
   // NOT IMPLEMENTED ////////////////////////////////////////////////////
 private :
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryLine2D.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryLine2D.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryLine2D.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -23,6 +23,7 @@
 #include "GeometryPoint2D.hh" // USES GeometryPoint
 
 #include "pylith/utils/array.hh" // USES scalar_array
+#include "pylith/utils/constdefs.h" // USES scalar_array
 
 #include "petsc.h" // USES PetscLogFlops
 
@@ -161,4 +162,26 @@
 } // jacobian
 
 
+// ----------------------------------------------------------------------
+// Compute minimum width across cell.
+PylithScalar
+pylith::feassemble::GeometryLine2D::minCellWidth(const scalar_array& coordinatesCell) const
+{ // minCellWidth
+  const int numCorners = 2;
+  const int spaceDim = 2;
+  assert(numCorners*spaceDim == coordinatesCell.size());
+
+  const PylithScalar xA = coordinatesCell[0];
+  const PylithScalar yA = coordinatesCell[1];
+  const PylithScalar xB = coordinatesCell[2];
+  const PylithScalar yB = coordinatesCell[3];
+    
+  const PylithScalar minWidth = sqrt(pow(xB-xA,2) + pow(yB-yA,2));
+
+  PetscLogFlops(6);
+
+  return minWidth;
+} // minCellWidth
+
+
 // End of file

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryLine2D.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryLine2D.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryLine2D.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -98,6 +98,13 @@
 		const int dim,
 		const int npts =1) const;
 
+  /** Compute minimum width across cell.
+   *
+   * @param coordinatesCell Coordinates of vertices in cell.
+   * @returns Minimum width across cell.
+   */
+  PylithScalar minCellWidth(const scalar_array& coordinatesCell) const;
+
   // NOT IMPLEMENTED ////////////////////////////////////////////////////
 private :
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryLine3D.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryLine3D.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryLine3D.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -25,6 +25,7 @@
 #include "petsc.h" // USES PetscLogFlops
 
 #include "pylith/utils/array.hh" // USES scalar_array
+#include "pylith/utils/constdefs.h" // USES scalar_array
 
 #include <cassert> // USES assert()
 
@@ -172,4 +173,28 @@
 } // jacobian
 
 
+// ----------------------------------------------------------------------
+// Compute minimum width across cell.
+PylithScalar
+pylith::feassemble::GeometryLine3D::minCellWidth(const scalar_array& coordinatesCell) const
+{ // minCellWidth
+  const int numCorners = 2;
+  const int spaceDim = 3;
+  assert(numCorners*spaceDim == coordinatesCell.size());
+
+  const PylithScalar xA = coordinatesCell[0];
+  const PylithScalar yA = coordinatesCell[1];
+  const PylithScalar zA = coordinatesCell[2];
+  const PylithScalar xB = coordinatesCell[3];
+  const PylithScalar yB = coordinatesCell[4];
+  const PylithScalar zB = coordinatesCell[5];
+    
+  const PylithScalar minWidth = sqrt(pow(xB-xA,2) + pow(yB-yA,2) + pow(zB-zA,2));
+
+  PetscLogFlops(9);
+
+  return minWidth;
+} // minCellWidth
+
+
 // End of file

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryLine3D.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryLine3D.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryLine3D.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -98,6 +98,13 @@
 		const int dim,
 		const int npts =1) const;
 
+  /** Compute minimum width across cell.
+   *
+   * @param coordinatesCell Coordinates of vertices in cell.
+   * @returns Minimum width across cell.
+   */
+  PylithScalar minCellWidth(const scalar_array& coordinatesCell) const;
+
   // NOT IMPLEMENTED ////////////////////////////////////////////////////
 private :
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryPoint1D.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryPoint1D.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryPoint1D.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -21,6 +21,7 @@
 #include "GeometryPoint1D.hh" // implementation of class methods
 
 #include "pylith/utils/array.hh" // USES scalar_array
+#include "pylith/utils/constdefs.h" // USES scalar_array
 
 #include <cassert> // USES assert()
 
@@ -115,4 +116,13 @@
 } // jacobian
 
 
+// ----------------------------------------------------------------------
+// Compute minimum width across cell.
+PylithScalar
+pylith::feassemble::GeometryPoint1D::minCellWidth(const scalar_array& coordinatesCell) const
+{ // minCellWidth
+  return PYLITH_MAXSCALAR;
+} // minCellWidth
+
+
 // End of file

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryPoint1D.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryPoint1D.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryPoint1D.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -98,6 +98,13 @@
 		const int dim,
 		const int npts =1) const;
 
+  /** Compute minimum width across cell.
+   *
+   * @param coordinatesCell Coordinates of vertices in cell.
+   * @returns Minimum width across cell.
+   */
+  PylithScalar minCellWidth(const scalar_array& coordinatesCell) const;
+
   // NOT IMPLEMENTED ////////////////////////////////////////////////////
 private :
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryPoint2D.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryPoint2D.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryPoint2D.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -21,6 +21,7 @@
 #include "GeometryPoint2D.hh" // implementation of class methods
 
 #include "pylith/utils/array.hh" // USES scalar_array
+#include "pylith/utils/constdefs.h" // USES scalar_array
 
 #include <cassert> // USES assert()
 
@@ -116,4 +117,13 @@
 } // jacobian
 
 
+// ----------------------------------------------------------------------
+// Compute minimum width across cell.
+PylithScalar
+pylith::feassemble::GeometryPoint2D::minCellWidth(const scalar_array& coordinatesCell) const
+{ // minCellWidth
+  return PYLITH_MAXSCALAR;
+} // minCellWidth
+
+
 // End of file

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryPoint2D.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryPoint2D.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryPoint2D.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -98,6 +98,13 @@
 		const int dim,
 		const int npts =1) const;
 
+  /** Compute minimum width across cell.
+   *
+   * @param coordinatesCell Coordinates of vertices in cell.
+   * @returns Minimum width across cell.
+   */
+  PylithScalar minCellWidth(const scalar_array& coordinatesCell) const;
+
   // NOT IMPLEMENTED ////////////////////////////////////////////////////
 private :
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryPoint3D.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryPoint3D.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryPoint3D.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -21,6 +21,7 @@
 #include "GeometryPoint3D.hh" // implementation of class methods
 
 #include "pylith/utils/array.hh" // USES scalar_array
+#include "pylith/utils/constdefs.h" // USES scalar_array
 
 #include <cassert> // USES assert()
 
@@ -116,4 +117,13 @@
 } // jacobian
 
 
+// ----------------------------------------------------------------------
+// Compute minimum width across cell.
+PylithScalar
+pylith::feassemble::GeometryPoint3D::minCellWidth(const scalar_array& coordinatesCell) const
+{ // minCellWidth
+  return PYLITH_MAXSCALAR;
+} // minCellWidth
+
+
 // End of file

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryPoint3D.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryPoint3D.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryPoint3D.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -98,6 +98,13 @@
 		const int dim,
 		const int npts =1) const;
 
+  /** Compute minimum width across cell.
+   *
+   * @param coordinatesCell Coordinates of vertices in cell.
+   * @returns Minimum width across cell.
+   */
+  PylithScalar minCellWidth(const scalar_array& coordinatesCell) const;
+
   // NOT IMPLEMENTED ////////////////////////////////////////////////////
 private :
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryQuad2D.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryQuad2D.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryQuad2D.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -25,6 +25,7 @@
 #include "petsc.h" // USES PetscLogFlops
 
 #include "pylith/utils/array.hh" // USES scalar_array
+#include "pylith/utils/constdefs.h" // USES scalar_array
 
 #include <cassert> // USES assert()
 
@@ -217,4 +218,39 @@
 } // jacobian
 
 
+// ----------------------------------------------------------------------
+// Compute minimum width across cell.
+PylithScalar
+pylith::feassemble::GeometryQuad2D::minCellWidth(const scalar_array& coordinatesCell) const
+{ // minCellWidth
+  const int numCorners = 4;
+  const int spaceDim = 2;
+  assert(numCorners*spaceDim == coordinatesCell.size());
+
+  const int numEdges = 4;
+  const int edges[numEdges][2] = {
+    {0, 1}, {1, 2}, {2, 3}, {3, 0},
+  };
+
+  PylithScalar minWidth = PYLITH_MAXSCALAR;
+  for (int iedge=0; iedge < numEdges; ++iedge) {
+    const int iA = edges[iedge][0];
+    const int iB = edges[iedge][1];
+    const PylithScalar xA = coordinatesCell[spaceDim*iA  ];
+    const PylithScalar yA = coordinatesCell[spaceDim*iA+1];
+    const PylithScalar xB = coordinatesCell[spaceDim*iB  ];
+    const PylithScalar yB = coordinatesCell[spaceDim*iB+1];
+    
+    const PylithScalar edgeLen = sqrt(pow(xB-xA,2) + pow(yB-yA,2));
+    if (edgeLen < minWidth) {
+      minWidth = edgeLen;
+    } // if
+  } // for
+
+  PetscLogFlops(numEdges*6);
+
+  return minWidth;
+} // minCellWidth
+
+
 // End of file

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryQuad2D.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryQuad2D.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryQuad2D.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -116,6 +116,13 @@
 		const int dim,
 		const int npts =1) const;
 
+  /** Compute minimum width across cell.
+   *
+   * @param coordinatesCell Coordinates of vertices in cell.
+   * @returns Minimum width across cell.
+   */
+  PylithScalar minCellWidth(const scalar_array& coordinatesCell) const;
+
   // NOT IMPLEMENTED ////////////////////////////////////////////////////
 private :
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryQuad3D.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryQuad3D.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryQuad3D.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -25,6 +25,7 @@
 #include "petsc.h" // USES PetscLogFlops
 
 #include "pylith/utils/array.hh" // USES scalar_array
+#include "pylith/utils/constdefs.h" // USES scalar_array
 
 #include <cassert> // USES assert()
 
@@ -262,4 +263,41 @@
 } // jacobian
 
 
+// ----------------------------------------------------------------------
+// Compute minimum width across cell.
+PylithScalar
+pylith::feassemble::GeometryQuad3D::minCellWidth(const scalar_array& coordinatesCell) const
+{ // minCellWidth
+  const int numCorners = 4;
+  const int spaceDim = 3;
+  assert(numCorners*spaceDim == coordinatesCell.size());
+
+  const int numEdges = 4;
+  const int edges[numEdges][2] = {
+    {0, 1}, {1, 2}, {2, 3}, {3, 0},
+  };
+
+  PylithScalar minWidth = PYLITH_MAXSCALAR;
+  for (int iedge=0; iedge < numEdges; ++iedge) {
+    const int iA = edges[iedge][0];
+    const int iB = edges[iedge][1];
+    const PylithScalar xA = coordinatesCell[spaceDim*iA  ];
+    const PylithScalar yA = coordinatesCell[spaceDim*iA+1];
+    const PylithScalar zA = coordinatesCell[spaceDim*iA+2];
+    const PylithScalar xB = coordinatesCell[spaceDim*iB  ];
+    const PylithScalar yB = coordinatesCell[spaceDim*iB+1];
+    const PylithScalar zB = coordinatesCell[spaceDim*iB+2];
+    
+    const PylithScalar edgeLen = sqrt(pow(xB-xA,2) + pow(yB-yA,2) + pow(zB-zA,2));
+    if (edgeLen < minWidth) {
+      minWidth = edgeLen;
+    } // if
+  } // for
+
+  PetscLogFlops(numEdges*9);
+
+  return minWidth;
+} // minCellWidth
+
+
 // End of file

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryQuad3D.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryQuad3D.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryQuad3D.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -114,6 +114,13 @@
 		const int dim,
 		const int npts =1) const;
 
+  /** Compute minimum width across cell.
+   *
+   * @param coordinatesCell Coordinates of vertices in cell.
+   * @returns Minimum width across cell.
+   */
+  PylithScalar minCellWidth(const scalar_array& coordinatesCell) const;
+
   // NOT IMPLEMENTED ////////////////////////////////////////////////////
 private :
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryTet3D.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryTet3D.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryTet3D.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -25,6 +25,7 @@
 #include "petsc.h" // USES PetscLogFlops
 
 #include "pylith/utils/array.hh" // USES scalar_array
+#include "pylith/utils/constdefs.h" // USES scalar_array
 
 #include <cassert> // USES assert()
 
@@ -241,4 +242,169 @@
 } // jacobian
 
 
+// ----------------------------------------------------------------------
+// Compute minimum width across cell.
+PylithScalar
+pylith::feassemble::GeometryTet3D::minCellWidth(const scalar_array& coordinatesCell) const
+{ // minCellWidth
+  const int numCorners = 4;
+  const int spaceDim = 3;
+  assert(4*spaceDim == coordinatesCell.size() ||
+	 10*spaceDim == coordinatesCell.size()); // :KLUDGE: allow quadratic
+
+  const int numEdges = 6;
+  const int edges[numEdges][2] = {
+    {0, 1}, {1, 2}, {2, 0},
+    {0, 3}, {1, 3}, {2, 3},
+  };
+
+  PylithScalar minWidth = PYLITH_MAXSCALAR;
+  for (int iedge=0; iedge < numEdges; ++iedge) {
+    const int iA = edges[iedge][0];
+    const int iB = edges[iedge][1];
+    const PylithScalar xA = coordinatesCell[spaceDim*iA  ];
+    const PylithScalar yA = coordinatesCell[spaceDim*iA+1];
+    const PylithScalar zA = coordinatesCell[spaceDim*iA+2];
+    const PylithScalar xB = coordinatesCell[spaceDim*iB  ];
+    const PylithScalar yB = coordinatesCell[spaceDim*iB+1];
+    const PylithScalar zB = coordinatesCell[spaceDim*iB+2];
+    
+    const PylithScalar edgeLen = sqrt(pow(xB-xA,2) + pow(yB-yA,2) + pow(zB-zA,2));
+    if (edgeLen < minWidth) {
+      minWidth = edgeLen;
+    } // if
+  } // for
+
+  PetscLogFlops(numEdges*9);
+
+  // Radius of inscribed sphere
+  const PylithScalar v = volume(coordinatesCell);
+  const PylithScalar a = faceArea(coordinatesCell, 0) +
+    faceArea(coordinatesCell, 1) +
+    faceArea(coordinatesCell, 2) +
+    faceArea(coordinatesCell, 3);
+    
+  const PylithScalar r = 3.0 * v / a;
+  const PylithScalar rwidth = 6.38*r; // based on empirical tests
+  if (rwidth < minWidth) {
+    minWidth = rwidth;
+  } // if
+
+  PetscLogFlops(3);
+
+  return minWidth;
+} // minCellWidth
+
+// ----------------------------------------------------------------------
+// Compute cell volume.
+PylithScalar
+pylith::feassemble::GeometryTet3D::volume(const scalar_array& coordinatesCell) const
+{ // volume
+  assert(12 == coordinatesCell.size() ||
+	 30 == coordinatesCell.size()); // :KLUDGE: allow quadratic
+  
+  const PylithScalar x0 = coordinatesCell[0];
+  const PylithScalar y0 = coordinatesCell[1];
+  const PylithScalar z0 = coordinatesCell[2];
+  
+  const PylithScalar x1 = coordinatesCell[3];
+  const PylithScalar y1 = coordinatesCell[4];
+  const PylithScalar z1 = coordinatesCell[5];
+  
+  const PylithScalar x2 = coordinatesCell[6];
+  const PylithScalar y2 = coordinatesCell[7];
+  const PylithScalar z2 = coordinatesCell[8];
+  
+  const PylithScalar x3 = coordinatesCell[9];
+  const PylithScalar y3 = coordinatesCell[10];
+  const PylithScalar z3 = coordinatesCell[11];
+
+  const PylithScalar det = 
+    x1*(y2*z3-y3*z2)-y1*(x2*z3-x3*z2)+(x2*y3-x3*y2)*z1 - 
+    x0*((y2*z3-y3*z2)-y1*(z3-z2)+(y3-y2)*z1) +
+    y0*((x2*z3-x3*z2)-x1*(z3-z2)+(x3-x2)*z1) -
+    z0*((x2*y3-x3*y2)-x1*(y3-y2)+(x3-x2)*y1);
+  
+  const PylithScalar v = det / 6.0;
+  PetscLogFlops(48);
+  
+  return v;  
+} // volume
+
+// ----------------------------------------------------------------------
+// Compute area of face.
+PylithScalar
+pylith::feassemble::GeometryTet3D::faceArea(const scalar_array& coordinatesCell,
+	 const int face) const
+{ // faceArea
+  assert(12 == coordinatesCell.size() ||
+	 30 == coordinatesCell.size()); // :KLUDGE: allow quadratic
+
+  const PylithScalar x0 = coordinatesCell[0];
+  const PylithScalar y0 = coordinatesCell[1];
+  const PylithScalar z0 = coordinatesCell[2];
+  
+  const PylithScalar x1 = coordinatesCell[3];
+  const PylithScalar y1 = coordinatesCell[4];
+  const PylithScalar z1 = coordinatesCell[5];
+  
+  const PylithScalar x2 = coordinatesCell[6];
+  const PylithScalar y2 = coordinatesCell[7];
+  const PylithScalar z2 = coordinatesCell[8];
+  
+  const PylithScalar x3 = coordinatesCell[9];
+  const PylithScalar y3 = coordinatesCell[10];
+  const PylithScalar z3 = coordinatesCell[11];
+
+  PylithScalar a[3];
+  PylithScalar b[3];
+  switch (face) {
+  case 0:
+    a[0] = x3-x1;
+    a[1] = y3-y1;
+    a[2] = z3-z1;
+    b[0] = x2-x1;
+    b[1] = y2-y1;
+    b[2] = z2-z1;
+    break;
+  case 1:
+    a[0] = x3-x2;
+    a[1] = y3-y2;
+    a[2] = z3-z2;
+    b[0] = x0-x2;
+    b[1] = y0-y2;
+    b[2] = z0-z2;
+    break;
+  case 2:
+    a[0] = x3-x0;
+    a[1] = y3-y0;
+    a[2] = z3-z0;
+    b[0] = x1-x0;
+    b[1] = y1-y0;
+    b[2] = z1-z0;
+    break;
+  case 3:
+    a[0] = x1-x0;
+    a[1] = y1-y0;
+    a[2] = z1-z0;
+    b[0] = x2-x0;
+    b[1] = y2-y0;
+    b[2] = z2-z0;
+    break;
+  default:
+    assert(0);
+    throw std::logic_error("Unknown face.");
+  } // switch
+
+  const PylithScalar areaX = a[1]*b[2] - a[2]*b[1];
+  const PylithScalar areaY = a[2]*b[0] - a[0]*b[2];
+  const PylithScalar areaZ = a[0]*b[1] - a[1]*b[0];
+
+  const PylithScalar area = 0.5*sqrt(areaX*areaX + areaY*areaY + areaZ*areaZ);
+  PetscLogFlops(22);
+  
+  return area;
+} // faceArea
+
+
 // End of file

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryTet3D.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryTet3D.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryTet3D.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -109,6 +109,29 @@
 		const int dim,
 		const int npts =1) const;
 
+  /** Compute minimum width across cell.
+   *
+   * @param coordinatesCell Coordinates of vertices in cell.
+   * @returns Minimum width across cell.
+   */
+  PylithScalar minCellWidth(const scalar_array& coordinatesCell) const;
+
+  /** Compute cell volume.
+   *
+   * @param coordinatesCell Coordinates of vertices in cell.
+   * @returns Volume of cell.
+   */
+  PylithScalar volume(const scalar_array& coordinatesCell) const;
+
+  /** Compute area of face.
+   *
+   * @param coordinatesCell Coordinates of vertices in cell.
+   * @param face Index of vertex across from face.
+   * @returns Area of cell face.
+   */
+  PylithScalar faceArea(const scalar_array& coordinatesCell,
+			const int face) const;
+
   // NOT IMPLEMENTED ////////////////////////////////////////////////////
 private :
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryTri2D.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryTri2D.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryTri2D.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -25,6 +25,7 @@
 #include "petsc.h" // USES PetscLogFlops
 
 #include "pylith/utils/array.hh" // USES scalar_array
+#include "pylith/utils/constdefs.h" // USES scalar_array
 
 #include <cassert> // USES assert()
 
@@ -107,9 +108,9 @@
 // Compute Jacobian at location in cell.
 void
 pylith::feassemble::GeometryTri2D::jacobian(scalar_array* jacobian,
-					  PylithScalar* det,
-					  const scalar_array& vertices,
-					  const scalar_array& location) const
+					    PylithScalar* det,
+					    const scalar_array& vertices,
+					    const scalar_array& location) const
 { // jacobian
   assert(0 != jacobian);
 
@@ -182,4 +183,62 @@
 } // jacobian
 
 
+// ----------------------------------------------------------------------
+// Compute minimum width across cell.
+PylithScalar
+pylith::feassemble::GeometryTri2D::minCellWidth(const scalar_array& coordinatesCell) const
+{ // minCellWidth
+  const int numCorners = 3;
+  const int spaceDim = 2;
+  assert(3*spaceDim == coordinatesCell.size() ||
+	 6*spaceDim == coordinatesCell.size()); // :KLUDGE: allow quadratic
+
+  const int numEdges = 3;
+  const int edges[numEdges][2] = {
+    {0, 1}, {1, 2}, {2, 0},
+  };
+
+  PylithScalar minWidth = PYLITH_MAXSCALAR;
+  for (int iedge=0; iedge < numEdges; ++iedge) {
+    const int iA = edges[iedge][0];
+    const int iB = edges[iedge][1];
+    const PylithScalar xA = coordinatesCell[spaceDim*iA  ];
+    const PylithScalar yA = coordinatesCell[spaceDim*iA+1];
+    const PylithScalar xB = coordinatesCell[spaceDim*iB  ];
+    const PylithScalar yB = coordinatesCell[spaceDim*iB+1];
+    
+    const PylithScalar edgeLen = sqrt(pow(xB-xA,2) + pow(yB-yA,2));
+    if (edgeLen < minWidth) {
+      minWidth = edgeLen;
+    } // if
+  } // for
+
+  PetscLogFlops(numEdges*6);
+
+  // Ad-hoc to account for distorted cells.
+  // Radius of inscribed circle.
+  const PylithScalar xA = coordinatesCell[0];
+  const PylithScalar yA = coordinatesCell[1];
+  const PylithScalar xB = coordinatesCell[2];
+  const PylithScalar yB = coordinatesCell[3];
+  const PylithScalar xC = coordinatesCell[4];
+  const PylithScalar yC = coordinatesCell[5];
+
+  const PylithScalar c  = sqrt(pow(xB-xA,2) + pow(yB-yA, 2));
+  const PylithScalar a  = sqrt(pow(xC-xB,2) + pow(yC-yB, 2));
+  const PylithScalar b  = sqrt(pow(xA-xC,2) + pow(yA-yC, 2));
+  
+  const PylithScalar k = 0.5 * (a + b + c);
+  const PylithScalar r = sqrt(k*(k-a)*(k-b)*(k-c)) / k;
+  const PylithScalar rwidth = 3.0*r; // based on empirical tests
+  if (rwidth < minWidth) {
+    minWidth = rwidth;
+  } // if
+
+  PetscLogFlops(3*6 + 3 + 8);
+
+  return minWidth;
+} // minCellWidth
+
+
 // End of file

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryTri2D.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryTri2D.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryTri2D.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -115,6 +115,13 @@
 		const int dim,
 		const int npts =1) const;
 
+  /** Compute minimum width across cell.
+   *
+   * @param coordinatesCell Coordinates of vertices in cell.
+   * @returns Minimum width across cell.
+   */
+  PylithScalar minCellWidth(const scalar_array& coordinatesCell) const;
+
   // NOT IMPLEMENTED ////////////////////////////////////////////////////
 private :
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryTri3D.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryTri3D.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryTri3D.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -25,6 +25,7 @@
 #include "petsc.h" // USES PetscLogFlops
 
 #include "pylith/utils/array.hh" // USES scalar_array
+#include "pylith/utils/constdefs.h" // USES scalar_array
 
 #include <cassert> // USES assert()
 
@@ -218,4 +219,64 @@
 } // jacobian
 
 
+// ----------------------------------------------------------------------
+// Compute minimum width across cell.
+PylithScalar
+pylith::feassemble::GeometryTri3D::minCellWidth(const scalar_array& coordinatesCell) const
+{ // minCellWidth
+  const int numCorners = 2;
+  const int spaceDim = 3;
+  assert(numCorners*spaceDim == coordinatesCell.size());
+
+  const int numEdges = 3;
+  const int edges[numEdges][2] = {
+    {0, 1}, {1, 2}, {2, 0},
+  };
+
+  PylithScalar minWidth = PYLITH_MAXSCALAR;
+  for (int iedge=0; iedge < numEdges; ++iedge) {
+    const int iA = edges[iedge][0];
+    const int iB = edges[iedge][1];
+    const PylithScalar xA = coordinatesCell[spaceDim*iA  ];
+    const PylithScalar yA = coordinatesCell[spaceDim*iA+1];
+    const PylithScalar zA = coordinatesCell[spaceDim*iA+2];
+    const PylithScalar xB = coordinatesCell[spaceDim*iB  ];
+    const PylithScalar yB = coordinatesCell[spaceDim*iB+1];
+    const PylithScalar zB = coordinatesCell[spaceDim*iB+2];
+    
+    const PylithScalar edgeLen = sqrt(pow(xB-xA,2) + pow(yB-yA,2) + pow(zB-zA,2));
+    if (edgeLen < minWidth) {
+      minWidth = edgeLen;
+    } // if
+  } // for
+
+  PetscLogFlops(numEdges*9);
+
+#if 1
+  // Ad-hoc to account for distorted cells.
+  // Radius of inscribed circle.
+  const PylithScalar xA = coordinatesCell[0];
+  const PylithScalar yA = coordinatesCell[1];
+  const PylithScalar zA = coordinatesCell[2];
+  const PylithScalar xB = coordinatesCell[3];
+  const PylithScalar yB = coordinatesCell[4];
+  const PylithScalar zB = coordinatesCell[5];
+  const PylithScalar xC = coordinatesCell[6];
+  const PylithScalar yC = coordinatesCell[7];
+  const PylithScalar zC = coordinatesCell[8];
+
+  const PylithScalar c  = sqrt(pow(xB-xA,2) + pow(yB-yA, 2) + pow(zB-zA, 2));
+  const PylithScalar a  = sqrt(pow(xC-xB,2) + pow(yC-yB, 2) + pow(zC-zB, 2));
+  const PylithScalar b  = sqrt(pow(xA-xC,2) + pow(yA-yC, 2) + pow(zA-zC, 2));
+  
+  const PylithScalar k = (a + b + c) / 3.0;
+  const PylithScalar r = sqrt(k*(k-a)*(k-b)*(k-c)) / k;
+  minWidth = r;
+
+#endif
+
+  return minWidth;
+} // minCellWidth
+
+
 // End of file

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryTri3D.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryTri3D.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/GeometryTri3D.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -115,6 +115,13 @@
 		const int dim,
 		const int npts =1) const;
 
+  /** Compute minimum width across cell.
+   *
+   * @param coordinatesCell Coordinates of vertices in cell.
+   * @returns Minimum width across cell.
+   */
+  PylithScalar minCellWidth(const scalar_array& coordinatesCell) const;
+
   // NOT IMPLEMENTED ////////////////////////////////////////////////////
 private :
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/IntegratorElasticity.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/IntegratorElasticity.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/IntegratorElasticity.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -256,8 +256,8 @@
 pylith::feassemble::IntegratorElasticity::verifyConfiguration(
 					   const topology::Mesh& mesh) const
 { // verifyConfiguration
-  assert(0 != _quadrature);
-  assert(0 != _material);
+  assert(_quadrature);
+  assert(_material);
 
   const int dimension = mesh.dimension();
 
@@ -282,8 +282,8 @@
 	<< ".";
     throw std::runtime_error(msg.str());
   } // if
+
   const int numCorners = _quadrature->refGeometry().numCorners();
-
   const ALE::Obj<SieveMesh>& sieveMesh = mesh.sieveMesh();
   assert(!sieveMesh.isNull());
   const ALE::Obj<SieveMesh::label_sequence>& cells = 
@@ -386,6 +386,23 @@
       } // else
 
     } // else
+
+  } else if (0 == strcasecmp(name, "stable_dt_implicit")) {
+    if (!_outputFields->hasField("buffer (other)"))
+      _outputFields->add("buffer (other)", "buffer");
+    topology::Field<topology::Mesh>& buffer = _outputFields->get("buffer (other)");
+    _material->stableTimeStepImplicit(mesh, &buffer);
+    buffer.addDimensionOkay(true);
+    return buffer;
+    
+  } else if (0 == strcasecmp(name, "stable_dt_explicit")) {
+    if (!_outputFields->hasField("buffer (other)"))
+      _outputFields->add("buffer (other)", "buffer");
+    topology::Field<topology::Mesh>& buffer = _outputFields->get("buffer (other)");
+    _material->stableTimeStepExplicit(mesh, _quadrature, &buffer);
+    buffer.addDimensionOkay(true);
+    return buffer;
+    
   } else {
     if (!_outputFields->hasField("buffer (other)"))
       _outputFields->add("buffer (other)", "buffer");

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/IntegratorElasticity.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/IntegratorElasticity.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/IntegratorElasticity.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -108,6 +108,7 @@
    *
    * @param mesh Finite-element mesh
    */
+  virtual
   void verifyConfiguration(const topology::Mesh& mesh) const;
 
   /** Get output fields.
@@ -243,15 +244,6 @@
 			  const int numBasis,
 			  const int numQuadPts);
 
-// PROTECTED MEMBERS ////////////////////////////////////////////////////
-protected :
-
-  /// Elastic material associated with integrator
-  materials::ElasticMaterial* _material;
-
-  /// Buffers for output.
-  topology::Fields<topology::Field<topology::Mesh> >* _outputFields;
-
 // PROTECTED TYPEDEFS ///////////////////////////////////////////////////
 protected :
 
@@ -262,6 +254,15 @@
   typedef pylith::topology::Field<pylith::topology::Mesh>::UpdateAddVisitor UpdateAddVisitor;
   typedef ALE::ISieveVisitor::IndicesVisitor<RealSection,SieveMesh::order_type,PylithInt> IndicesVisitor;
 
+// PROTECTED MEMBERS ////////////////////////////////////////////////////
+protected :
+
+  /// Elastic material associated with integrator
+  materials::ElasticMaterial* _material;
+
+  /// Buffers for output.
+  topology::Fields<topology::Field<topology::Mesh> >* _outputFields;
+
 // NOT IMPLEMENTED //////////////////////////////////////////////////////
 private :
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/IntegratorElasticityLgDeform.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/IntegratorElasticityLgDeform.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/IntegratorElasticityLgDeform.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -35,8 +35,7 @@
  * time integration of the elasticity equation for large rigid body
  * rotations and small strains.
  */
-class pylith::feassemble::IntegratorElasticityLgDeform : 
-  public IntegratorElasticity
+class pylith::feassemble::IntegratorElasticityLgDeform : public IntegratorElasticity
 { // IntegratorElasticityLgDeform
   friend class TestIntegratorElasticityLgDeform; // unit testing
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/Quadrature.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/Quadrature.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/Quadrature.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -135,7 +135,7 @@
   /// Deallocate temporary storage.
   void clear(void);
 
-  /** Precompute geometric quantities for each cell.
+  /** Compute geometric quantities for cell.
    *
    * @param coordinatesCell Coordinates of vertices in cell.
    * @param cell Finite-element cell

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/QuadratureRefCell.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/QuadratureRefCell.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/QuadratureRefCell.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -29,6 +29,7 @@
 // Include directives ---------------------------------------------------
 #include "feassemblefwd.hh" // forward declarations
 
+#include "CellGeometry.hh" // USES CellGeometry
 #include "pylith/utils/array.hh" // HASA scalar_array
 
 // Quadrature -----------------------------------------------------------
@@ -186,6 +187,13 @@
    */
   int spaceDim(void) const;
 
+  /** Compute minimum width across cell.
+   *
+   * @param coordinatesCell Coordinates of vertices in cell.
+   * @returns Minimum width across cell.
+   */
+  PylithScalar minCellWidth(const scalar_array& coordinatesCell) const;
+
 // PROTECTED METHODS ////////////////////////////////////////////////////
 protected :
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/QuadratureRefCell.icc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/QuadratureRefCell.icc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/feassemble/QuadratureRefCell.icc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -90,6 +90,14 @@
   return _spaceDim;
 }
 
+// Compute minimum width across cell.
+inline
+PylithScalar
+pylith::feassemble::QuadratureRefCell::minCellWidth(const scalar_array& coordinatesCell) const {
+  assert(_geometry);
+  return _geometry->minCellWidth(coordinatesCell);
+}
+
 #endif
 
 // End of file

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/friction/FrictionModel.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/friction/FrictionModel.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/friction/FrictionModel.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -234,7 +234,9 @@
     } // for
     // Close database
     _dbInitialState->close();
-  } // if
+  } else if (_metadata.numDBStateVars()) {
+    std::cerr << "WARNING: No initial state given for friction model '" << label() << "'. Using default value of zero." << std::endl;
+  } // if/else
 
   // Setup buffers for restrict/update of properties and state variables.
   _propsStateVarsVertex.resize(fieldsFiberDim);

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/friction/RateStateAgeing.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/friction/RateStateAgeing.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/friction/RateStateAgeing.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -122,7 +122,7 @@
 				    _RateStateAgeing::numStateVars,
 				    _RateStateAgeing::dbStateVars,
 				    _RateStateAgeing::numDBStateVars)),
-  _minSlipRate(1.0e-12)
+  _linearSlipRate(1.0e-12)
 { // constructor
 } // constructor
 
@@ -133,20 +133,21 @@
 } // destructor
 
 // ----------------------------------------------------------------------
-// Set floor for slip rate used in computing friction. Used to
+// Set nondimensional slip rate below which friction varies
+//  linearly with slip rate.
 void
-pylith::friction::RateStateAgeing::minSlipRate(const PylithScalar value)
-{ // minSlipRate
+pylith::friction::RateStateAgeing::linearSlipRate(const PylithScalar value)
+{ // linearSlipRate
   if (value < 0.0) {
     std::ostringstream msg;
-    msg << "Minimum slip rate (" << value << ") for rate state friction model "
+    msg << "Nondimensional linear slip rate threshold (" << value << ") for rate state friction model "
 	<< label() << " must be nonnegative.";
     throw std::runtime_error(msg.str());
   } // if
+  
+  _linearSlipRate = value;
+} // linearSlipRate
 
-  _minSlipRate = value;
-} // minSlipRate
-
 // ----------------------------------------------------------------------
 // Compute properties from values in spatial database.
 void
@@ -310,15 +311,17 @@
   if (normalTraction <= 0.0) {
     // if fault is in compression
 
-    const PylithScalar slipRateLinear = _minSlipRate;
+    const PylithScalar slipRateLinear = _linearSlipRate;
 
     const PylithScalar f0 = properties[p_coef];
     const PylithScalar a = properties[p_a];
     const PylithScalar b = properties[p_b];
     const PylithScalar L = properties[p_L];
     const PylithScalar slipRate0 = properties[p_slipRate0];
-    const PylithScalar theta = stateVars[s_state];
 
+    // Prevent zero value for theta, reasonable value is L / slipRate0
+    const PylithScalar theta = (stateVars[s_state] > 0.0) ? stateVars[s_state] : L / slipRate0;
+
     if (slipRate >= slipRateLinear) {
       mu_f = f0 + a*log(slipRate / slipRate0) + b*log(slipRate0*theta/L);
     } else {
@@ -375,7 +378,7 @@
 
   // Since regulatized friction -> 0 as slipRate -> 0, limit slip
   // rate to some minimum value
-  const PylithScalar slipRateEff = std::max(_minSlipRate, slipRate);
+  const PylithScalar slipRateEff = std::max(1.0e-2*_linearSlipRate, slipRate);
 
   const PylithScalar dt = _dt;
   const PylithScalar thetaTVertex = stateVars[s_state];

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/friction/RateStateAgeing.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/friction/RateStateAgeing.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/friction/RateStateAgeing.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -20,10 +20,11 @@
  *
  * @brief C++ Rate and State fault constitutive model with ageing law.
  *
- * Implementation comes from "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, J. Geophys. Res., 113, B09317" 
+ * Implementation of evolving state variable comes from "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,
+ * J. Geophys. Res., 113, B09317"
  *
  * Regularized Rate & State equation : Eqn(15) of Kaneko et. al. (2008)
  *
@@ -58,12 +59,12 @@
   /// Destructor.
   ~RateStateAgeing(void);
 
-  /** Set floor for slip rate used in computing friction. Used to
-   *  avoid zero friction at zero slip rate.
+  /** Set nondimensional slip rate below which friction varies
+   *  linearly with slip rate.
    *
-   * @param value Floor for slip rate.
+   * @param value Nondimensional slip rate.
    */
-  void minSlipRate(const PylithScalar value);
+  void linearSlipRate(const PylithScalar value);
 
   // PROTECTED METHODS //////////////////////////////////////////////////
 protected :
@@ -167,7 +168,7 @@
 private :
 
   /// Floor for slip rate used in friction calculation.
-  PylithScalar _minSlipRate;
+  PylithScalar _linearSlipRate;
 
   /// Indices for properties in section and spatial database.
   static const int p_coef;

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/DruckerPrager3D.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/DruckerPrager3D.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/DruckerPrager3D.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -159,7 +159,7 @@
   _calcStressFn(0),
   _updateStateVarsFn(0)
 { // constructor
-  useElasticBehavior(true);
+  useElasticBehavior(false);
 } // constructor
 
 // ----------------------------------------------------------------------
@@ -432,6 +432,30 @@
 } // _stableTimeStepImplicit
 
 // ----------------------------------------------------------------------
+// Get stable time step for explicit time integration.
+PylithScalar
+pylith::materials::DruckerPrager3D::_stableTimeStepExplicit(const PylithScalar* properties,
+							    const int numProperties,
+							    const PylithScalar* stateVars,
+							    const int numStateVars,
+							    const double minCellWidth) const
+{ // _stableTimeStepExplicit
+  assert(properties);
+  assert(_numPropsQuadPt == numProperties);
+ 
+  const PylithScalar mu = properties[p_mu];
+  const PylithScalar lambda = properties[p_lambda];
+  const PylithScalar density = properties[p_density];
+
+  assert(density > 0.0);
+  const PylithScalar vp = sqrt((lambda + 2*mu) / density);
+
+  const PylithScalar dtStable = minCellWidth / vp;
+  return dtStable;
+} // _stableTimeStepExplicit
+
+
+// ----------------------------------------------------------------------
 // Compute stress tensor at location from properties as an elastic
 // material.
 void
@@ -1272,10 +1296,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/branches/pylith-scecdynrup/libsrc/pylith/materials/DruckerPrager3D.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/DruckerPrager3D.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/DruckerPrager3D.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -229,6 +229,22 @@
 				 const PylithScalar* stateVars,
 				 const int numStateVars) const;
 
+  /** Get stable time step for explicit time integration.
+   *
+   * @param properties Properties at location.
+   * @param numProperties Number of properties.
+   * @param stateVars State variables at location.
+   * @param numStateVars Number of state variables.
+   * @param minCellWidth Minimum width across cell.
+   *
+   * @returns Time step
+   */
+  PylithScalar _stableTimeStepExplicit(const PylithScalar* properties,
+				       const int numProperties,
+				       const PylithScalar* stateVars,
+				       const int numStateVars,
+				       const double minCellWidth) const;
+  
   /** Update state variables (for next time step).
    *
    * @param stateVars State variables at location.
@@ -465,31 +481,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/branches/pylith-scecdynrup/libsrc/pylith/materials/DruckerPragerPlaneStrain.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/DruckerPragerPlaneStrain.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/DruckerPragerPlaneStrain.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -165,7 +165,7 @@
   _calcStressFn(0),
   _updateStateVarsFn(0)
 { // constructor
-  useElasticBehavior(true);
+  useElasticBehavior(false);
 } // constructor
 
 // ----------------------------------------------------------------------
@@ -452,6 +452,30 @@
 } // _stableTimeStepImplicit
 
 // ----------------------------------------------------------------------
+// Get stable time step for explicit time integration.
+PylithScalar
+pylith::materials::DruckerPragerPlaneStrain::_stableTimeStepExplicit(const PylithScalar* properties,
+								     const int numProperties,
+								     const PylithScalar* stateVars,
+								     const int numStateVars,
+								     const double minCellWidth) const
+{ // _stableTimeStepExplicit
+  assert(properties);
+  assert(_numPropsQuadPt == numProperties);
+ 
+  const PylithScalar mu = properties[p_mu];
+  const PylithScalar lambda = properties[p_lambda];
+  const PylithScalar density = properties[p_density];
+
+  assert(density > 0.0);
+  const PylithScalar vp = sqrt((lambda + 2*mu) / density);
+
+  const PylithScalar dtStable = minCellWidth / vp;
+  return dtStable;
+} // _stableTimeStepExplicit
+
+
+// ----------------------------------------------------------------------
 // Compute stress tensor at location from properties as an elastic
 // material.
 void
@@ -1241,10 +1265,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/branches/pylith-scecdynrup/libsrc/pylith/materials/DruckerPragerPlaneStrain.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/DruckerPragerPlaneStrain.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/DruckerPragerPlaneStrain.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -225,10 +225,26 @@
    * @returns Time step
    */
   PylithScalar _stableTimeStepImplicit(const PylithScalar* properties,
-				 const int numProperties,
-				 const PylithScalar* stateVars,
-				 const int numStateVars) const;
+				       const int numProperties,
+				       const PylithScalar* stateVars,
+				       const int numStateVars) const;
 
+  /** Get stable time step for explicit time integration.
+   *
+   * @param properties Properties at location.
+   * @param numProperties Number of properties.
+   * @param stateVars State variables at location.
+   * @param numStateVars Number of state variables.
+   * @param minCellWidth Minimum width across cell.
+   *
+   * @returns Time step
+   */
+  PylithScalar _stableTimeStepExplicit(const PylithScalar* properties,
+				       const int numProperties,
+				       const PylithScalar* stateVars,
+				       const int numStateVars,
+				       const double minCellWidth) const;
+  
   /** Update state variables (for next time step).
    *
    * @param stateVars State variables at location.
@@ -465,31 +481,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/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticIsotropic3D.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticIsotropic3D.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticIsotropic3D.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -325,10 +325,10 @@
 // ----------------------------------------------------------------------
 // Get stable time step for implicit time integration.
 PylithScalar
-pylith::materials::ElasticIsotropic3D::stableTimeStepImplicit(
-					const topology::Mesh& mesh) {
-  return pylith::PYLITH_MAXSCALAR;
-}
+pylith::materials::ElasticIsotropic3D::stableTimeStepImplicit(const topology::Mesh& mesh,
+							      topology::Field<topology::Mesh>* field) {
+  return ElasticMaterial::_stableTimeStepImplicitMax(mesh, field);
+} // stableTimeStepImplicitMax
 
 // ----------------------------------------------------------------------
 // Get stable time step for implicit time integration.
@@ -343,4 +343,28 @@
 } // _stableTimeStepImplicit
 
 
+// ----------------------------------------------------------------------
+// Get stable time step for explicit time integration.
+PylithScalar
+pylith::materials::ElasticIsotropic3D::_stableTimeStepExplicit(const PylithScalar* properties,
+							       const int numProperties,
+							       const PylithScalar* stateVars,
+							       const int numStateVars,
+							       const double minCellWidth) const
+{ // _stableTimeStepExplicit
+  assert(properties);
+  assert(_numPropsQuadPt == numProperties);
+ 
+  const PylithScalar mu = properties[p_mu];
+  const PylithScalar lambda = properties[p_lambda];
+  const PylithScalar density = properties[p_density];
+
+  assert(density > 0.0);
+  const PylithScalar vp = sqrt((lambda + 2*mu) / density);
+
+  const PylithScalar dtStable = minCellWidth / vp;
+  return dtStable;
+} // _stableTimeStepExplicit
+
+
 // End of file 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticIsotropic3D.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticIsotropic3D.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticIsotropic3D.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -59,9 +59,12 @@
    * Default is MAXDOUBLE (or 1.0e+30 if MAXFLOAT is not defined in math.h).
    *
    * @param mesh Finite-element mesh.
+   * @param field Field for storing min stable time step for each cell.
+   *
    * @returns Time step
    */
-  PylithScalar stableTimeStepImplicit(const topology::Mesh& mesh);
+  PylithScalar stableTimeStepImplicit(const topology::Mesh& mesh,
+				      topology::Field<topology::Mesh>* field =0);
 
   // PROTECTED METHODS //////////////////////////////////////////////////
 protected :
@@ -181,6 +184,22 @@
 				 const PylithScalar* stateVars,
 				 const int numStateVars) const;
 
+  /** Get stable time step for explicit time integration.
+   *
+   * @param properties Properties at location.
+   * @param numProperties Number of properties.
+   * @param stateVars State variables at location.
+   * @param numStateVars Number of state variables.
+   * @param minCellWidth Minimum width across cell.
+   *
+   * @returns Time step
+   */
+  PylithScalar _stableTimeStepExplicit(const PylithScalar* properties,
+				       const int numProperties,
+				       const PylithScalar* stateVars,
+				       const int numStateVars,
+				       const double minCellWidth) const;
+  
   // PRIVATE MEMBERS ////////////////////////////////////////////////////
 private :
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticMaterial.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticMaterial.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticMaterial.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -70,6 +70,7 @@
 void
 pylith::materials::ElasticMaterial::deallocate(void)
 { // deallocate
+  Material::deallocate();
   delete _initialFields; _initialFields = 0;
 
   _dbInitialStress = 0; // :TODO: Use shared pointer.
@@ -231,7 +232,8 @@
 // ----------------------------------------------------------------------
 // Get stable time step for implicit time integration.
 PylithScalar
-pylith::materials::ElasticMaterial::stableTimeStepImplicit(const topology::Mesh& mesh)
+pylith::materials::ElasticMaterial::stableTimeStepImplicit(const topology::Mesh& mesh,
+							   topology::Field<topology::Mesh>* field)
 { // stableTimeStepImplicit
   const int numQuadPts = _numQuadPts;
   const int numPropsQuadPt = _numPropsQuadPt;
@@ -243,8 +245,6 @@
   assert(_initialStressCell.size() == numQuadPts*_tensorSize);
   assert(_initialStrainCell.size() == numQuadPts*_tensorSize);
 
-  PylithScalar dtStable = pylith::PYLITH_MAXSCALAR;
-
   // Get cells associated with material
   const ALE::Obj<SieveMesh>& sieveMesh = mesh.sieveMesh();
   assert(!sieveMesh.isNull());
@@ -254,6 +254,39 @@
   const SieveMesh::label_sequence::iterator cellsBegin = cells->begin();
   const SieveMesh::label_sequence::iterator cellsEnd = cells->end();
 
+  // Setup field if necessary.
+  ALE::Obj<RealSection> fieldSection;
+  if (field) {
+    const int fiberDim = 1*numQuadPts;
+    fieldSection = field->section();
+    bool useCurrentField = false;
+    if (!fieldSection.isNull()) {
+      // check fiber dimension
+      const int fiberDimCurrentLocal = (cells->size() > 0) ? fieldSection->getFiberDimension(*cells->begin()) : 0;
+      int fiberDimCurrent = 0;
+      MPI_Allreduce((void *) &fiberDimCurrentLocal, 
+		    (void *) &fiberDimCurrent, 1, 
+		    MPI_INT, MPI_MAX, field->mesh().comm());
+      assert(fiberDimCurrent > 0);
+      useCurrentField = fiberDim == fiberDimCurrent;
+    } // if
+    if (!useCurrentField) {
+      ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
+      logger.stagePush("OutputFields");
+      field->newSection(cells, fiberDim);
+      field->allocate();
+      fieldSection = field->section();
+      logger.stagePop();
+    } // if
+    assert(!fieldSection.isNull());
+    field->label("stable_dt_implicit");
+    assert(_normalizer);
+    field->scale(_normalizer->timeScale());
+    field->vectorFieldType(topology::FieldBase::MULTI_SCALAR);
+  } // if
+
+  PylithScalar dtStable = pylith::PYLITH_MAXSCALAR;
+  scalar_array dtStableCell(numQuadPts);
   for (SieveMesh::label_sequence::iterator c_iter=cellsBegin;
        c_iter != cellsEnd;
        ++c_iter) {
@@ -265,15 +298,180 @@
 				numPropsQuadPt,
 				&_stateVarsCell[iQuad*numVarsQuadPt],
 				numVarsQuadPt);
-      if (dt < dtStable)
+      dtStableCell[iQuad] = dt;
+      if (dt < dtStable) {
 	dtStable = dt;
+      } // if
     } // for
+    if (field) {
+      assert(!fieldSection.isNull());
+      assert(numQuadPts == fieldSection->getFiberDimension(*c_iter));
+      fieldSection->updatePoint(*c_iter, &dtStableCell[0]);
+    } // if
   } // for
   
   return dtStable;
 } // stableTimeStepImplicit
 
 // ----------------------------------------------------------------------
+// Get stable time step for explicit time integration.
+PylithScalar
+pylith::materials::ElasticMaterial::stableTimeStepExplicit(const topology::Mesh& mesh,
+							   feassemble::Quadrature<topology::Mesh>* quadrature,
+							   topology::Field<topology::Mesh>* field)
+{ // stableTimeStepImplicit
+  assert(quadrature);
+
+  const int numQuadPts = _numQuadPts;
+  const int numPropsQuadPt = _numPropsQuadPt;
+  const int tensorSize = _tensorSize;
+  const int numVarsQuadPt = _numVarsQuadPt;
+  assert(_propertiesCell.size() == numQuadPts*numPropsQuadPt);
+  assert(_stateVarsCell.size() == numQuadPts*numVarsQuadPt);
+  assert(_elasticConstsCell.size() == numQuadPts*_numElasticConsts);
+  assert(_initialStressCell.size() == numQuadPts*_tensorSize);
+  assert(_initialStrainCell.size() == numQuadPts*_tensorSize);
+
+  // Get cells associated with material
+  const ALE::Obj<SieveMesh>& sieveMesh = mesh.sieveMesh();
+  assert(!sieveMesh.isNull());
+  const ALE::Obj<SieveMesh::label_sequence>& cells = 
+    sieveMesh->getLabelStratum("material-id", id());
+  assert(!cells.isNull());
+  const SieveMesh::label_sequence::iterator cellsBegin = cells->begin();
+  const SieveMesh::label_sequence::iterator cellsEnd = cells->end();
+
+  // Setup field if necessary.
+  ALE::Obj<RealSection> fieldSection;
+  if (field) {
+    const int fiberDim = 1*numQuadPts;
+    fieldSection = field->section();
+    bool useCurrentField = false;
+    if (!fieldSection.isNull()) {
+      // check fiber dimension
+      const int fiberDimCurrentLocal = (cells->size() > 0) ? fieldSection->getFiberDimension(*cells->begin()) : 0;
+      int fiberDimCurrent = 0;
+      MPI_Allreduce((void *) &fiberDimCurrentLocal, 
+		    (void *) &fiberDimCurrent, 1, 
+		    MPI_INT, MPI_MAX, field->mesh().comm());
+      assert(fiberDimCurrent > 0);
+      useCurrentField = fiberDim == fiberDimCurrent;
+    } // if
+    if (!useCurrentField) {
+      ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
+      logger.stagePush("OutputFields");
+      field->newSection(cells, fiberDim);
+      field->allocate();
+      fieldSection = field->section();
+      logger.stagePop();
+    } // if
+    assert(!fieldSection.isNull());
+    field->label("stable_dt_explicit");
+    assert(_normalizer);
+    field->scale(_normalizer->timeScale());
+    field->vectorFieldType(topology::FieldBase::MULTI_SCALAR);
+  } // if
+
+  const int spaceDim = quadrature->spaceDim();
+  const int numBasis = quadrature->numBasis();
+  scalar_array coordinatesCell(numBasis*spaceDim);
+  const ALE::Obj<RealSection>& coordinates = 
+    sieveMesh->getRealSection("coordinates");
+  RestrictVisitor coordsVisitor(*coordinates, 
+				coordinatesCell.size(), &coordinatesCell[0]);
+
+  PylithScalar dtStable = pylith::PYLITH_MAXSCALAR;
+  scalar_array dtStableCell(numQuadPts);
+  for (SieveMesh::label_sequence::iterator c_iter=cellsBegin;
+       c_iter != cellsEnd;
+       ++c_iter) {
+    retrievePropsAndVars(*c_iter);
+
+    coordsVisitor.clear();
+    sieveMesh->restrictClosure(*c_iter, coordsVisitor);
+    const double minCellWidth = quadrature->minCellWidth(coordinatesCell);
+
+    for (int iQuad=0; iQuad < numQuadPts; ++iQuad) {
+      const PylithScalar dt = 
+	_stableTimeStepExplicit(&_propertiesCell[iQuad*numPropsQuadPt],
+				numPropsQuadPt,
+				&_stateVarsCell[iQuad*numVarsQuadPt],
+				numVarsQuadPt,
+				minCellWidth);
+      dtStableCell[iQuad] = dt;
+      if (dt < dtStable) {
+	dtStable = dt;
+      } // if
+    } // for
+    if (field) {
+      assert(!fieldSection.isNull());
+      assert(numQuadPts == fieldSection->getFiberDimension(*c_iter));
+      fieldSection->updatePoint(*c_iter, &dtStableCell[0]);
+    } // if
+  } // for
+  
+  return dtStable;
+} // stableTimeStepExplicit
+
+// ----------------------------------------------------------------------
+// Get stable time step for implicit time integration (return large value).
+PylithScalar
+pylith::materials::ElasticMaterial::_stableTimeStepImplicitMax(const topology::Mesh& mesh,
+							       topology::Field<topology::Mesh>* field)
+{ // _stableTimeStepImplicitMax
+  const PylithScalar dtStable = pylith::PYLITH_MAXSCALAR;
+  
+  if (field) {
+    const int numQuadPts = _numQuadPts;
+
+    const ALE::Obj<RealSection>& fieldSection = field->section();
+    // Get cells associated with material
+    const ALE::Obj<SieveMesh>& sieveMesh = mesh.sieveMesh();
+    assert(!sieveMesh.isNull());
+    const ALE::Obj<SieveMesh::label_sequence>& cells = sieveMesh->getLabelStratum("material-id", id());
+    assert(!cells.isNull());
+    const SieveMesh::label_sequence::iterator cellsBegin = cells->begin();
+    const SieveMesh::label_sequence::iterator cellsEnd = cells->end();
+    
+    const int fiberDim = 1*numQuadPts;
+    bool useCurrentField = false;
+    if (!fieldSection.isNull()) {
+      // check fiber dimension
+      const int fiberDimCurrentLocal = (cells->size() > 0) ? fieldSection->getFiberDimension(*cells->begin()) : 0;
+      int fiberDimCurrent = 0;
+      MPI_Allreduce((void *) &fiberDimCurrentLocal, 
+		    (void *) &fiberDimCurrent, 1, 
+		    MPI_INT, MPI_MAX, field->mesh().comm());
+      assert(fiberDimCurrent > 0);
+      useCurrentField = fiberDim == fiberDimCurrent;
+    } // if
+    if (!useCurrentField) {
+      ALE::MemoryLogger& logger = ALE::MemoryLogger::singleton();
+      logger.stagePush("OutputFields");
+      field->newSection(cells, fiberDim);
+      field->allocate();
+      logger.stagePop();
+    } // if
+    assert(!fieldSection.isNull());
+    field->label("stable_dt_implicit");
+    assert(_normalizer);
+    field->scale(_normalizer->timeScale());
+    field->vectorFieldType(topology::FieldBase::MULTI_SCALAR);
+
+    scalar_array dtStableCell(numQuadPts);
+    dtStableCell = PYLITH_MAXSCALAR;
+    for (SieveMesh::label_sequence::iterator c_iter=cellsBegin;
+	 c_iter != cellsEnd;
+	 ++c_iter) {
+      assert(numQuadPts == fieldSection->getFiberDimension(*c_iter));
+      fieldSection->updatePoint(*c_iter, &dtStableCell[0]);
+    } // for
+  } // if
+  
+  return dtStable;
+} // _stableTimeStepImplicitMax
+
+// ----------------------------------------------------------------------
 // Allocate cell arrays.
 void
 pylith::materials::ElasticMaterial::_allocateCellArrays(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticMaterial.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticMaterial.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticMaterial.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -172,16 +172,31 @@
 
   /** Get stable time step for implicit time integration.
    *
-   * @pre Must call retrievePropsAndVars for cell before calling
-   * stableTimeStep().
+   * Default is MAXFLOAT (or 1.0e+30 if MAXFLOAT is not defined in math.h).
    *
+   * @param mesh Finite-element mesh.
+   * @param field Field for storing min stable time step for each cell.
+   *
+   * @returns Time step
+   */
+  virtual
+  PylithScalar stableTimeStepImplicit(const topology::Mesh& mesh,
+				      topology::Field<topology::Mesh>* field =0);
+
+  /** Get stable time step for explicit time integration.
+   *
    * Default is MAXFLOAT (or 1.0e+30 if MAXFLOAT is not defined in math.h).
    *
    * @param mesh Finite-element mesh.
+   * @param quadrature Quadrature for finite-element integration
+   * @param field Field for storing min stable time step for each cell.
+   *
    * @returns Time step
    */
   virtual
-  PylithScalar stableTimeStepImplicit(const topology::Mesh& mesh);
+  PylithScalar stableTimeStepExplicit(const topology::Mesh& mesh,
+				      feassemble::Quadrature<topology::Mesh>* quadrature,
+				      topology::Field<topology::Mesh>* field =0);
 
   /** Set whether elastic or inelastic constitutive relations are used.
    *
@@ -315,10 +330,41 @@
    */
   virtual
   PylithScalar _stableTimeStepImplicit(const PylithScalar* properties,
-				 const int numProperties,
-				 const PylithScalar* stateVars,
-				 const int numStateVars) const = 0;
+				       const int numProperties,
+				       const PylithScalar* stateVars,
+				       const int numStateVars) const = 0;
 
+  /** Get stable time step for explicit time integration.
+   *
+   * @param properties Properties at location.
+   * @param numProperties Number of properties.
+   * @param stateVars State variables at location.
+   * @param numStateVars Number of state variables.
+   * @param minCellWidth Minimum width across cell.
+   *
+   * @returns Time step
+   */
+  virtual
+  PylithScalar _stableTimeStepExplicit(const PylithScalar* properties,
+				       const int numProperties,
+				       const PylithScalar* stateVars,
+				       const int numStateVars,
+				       const double minCellWidth) const = 0;
+  
+  // PROTECTED METHODS //////////////////////////////////////////////////
+protected :
+
+  /** Get stable time step for implicit time integration for a
+   * material where the stable time step is infinite.
+   *
+   * @param mesh Finite-element mesh.
+   * @param field Field for storing min stable time step for each cell.
+   *
+   * @returns PYLITH::MAX_SCALAR;
+   */
+  PylithScalar _stableTimeStepImplicitMax(const topology::Mesh& mesh,
+					  topology::Field<topology::Mesh>* field =0);
+
   /** Compute 2D deviatoric stress/strain from vector and mean value.
    *
    * @param deviatoric Array for deviatoric tensor.

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticPlaneStrain.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticPlaneStrain.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticPlaneStrain.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -311,9 +311,9 @@
 // ----------------------------------------------------------------------
 // Get stable time step for implicit time integration.
 PylithScalar
-pylith::materials::ElasticPlaneStrain::stableTimeStepImplicit(
-					const topology::Mesh& mesh) {
-  return pylith::PYLITH_MAXSCALAR;
+pylith::materials::ElasticPlaneStrain::stableTimeStepImplicit(const topology::Mesh& mesh,
+							      topology::Field<topology::Mesh>* field) {
+  return ElasticMaterial::_stableTimeStepImplicitMax(mesh, field);
 }
 
 // ----------------------------------------------------------------------
@@ -329,4 +329,28 @@
 } // _stableTimeStepImplicit
 
 
+// ----------------------------------------------------------------------
+// Get stable time step for explicit time integration.
+PylithScalar
+pylith::materials::ElasticPlaneStrain::_stableTimeStepExplicit(const PylithScalar* properties,
+							       const int numProperties,
+							       const PylithScalar* stateVars,
+							       const int numStateVars,
+							       const double minCellWidth) const
+{ // _stableTimeStepExplicit
+  assert(properties);
+  assert(_numPropsQuadPt == numProperties);
+ 
+  const PylithScalar mu = properties[p_mu];
+  const PylithScalar lambda = properties[p_lambda];
+  const PylithScalar density = properties[p_density];
+
+  assert(density > 0.0);
+  const PylithScalar vp = sqrt((lambda + 2*mu) / density);
+
+  const PylithScalar dtStable = minCellWidth / vp;
+  return dtStable;
+} // _stableTimeStepExplicit
+
+
 // End of file 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticPlaneStrain.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticPlaneStrain.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticPlaneStrain.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -59,9 +59,12 @@
    * Default is MAXDOUBLE (or 1.0e+30 if MAXFLOAT is not defined in math.h).
    *
    * @param mesh Finite-element mesh.
+   * @param field Field for storing min stable time step for each cell.
+   *
    * @returns Time step
    */
-  PylithScalar stableTimeStepImplicit(const topology::Mesh& mesh);
+  PylithScalar stableTimeStepImplicit(const topology::Mesh& mesh,
+				      topology::Field<topology::Mesh>* field =0);
 
   // PROTECTED METHODS //////////////////////////////////////////////////
 protected :
@@ -181,6 +184,22 @@
 				 const PylithScalar* stateVars,
 				 const int numStateVars) const;
 
+  /** Get stable time step for explicit time integration.
+   *
+   * @param properties Properties at location.
+   * @param numProperties Number of properties.
+   * @param stateVars State variables at location.
+   * @param numStateVars Number of state variables.
+   * @param minCellWidth Minimum width across cell.
+   *
+   * @returns Time step
+   */
+  PylithScalar _stableTimeStepExplicit(const PylithScalar* properties,
+				       const int numProperties,
+				       const PylithScalar* stateVars,
+				       const int numStateVars,
+				       const double minCellWidth) const;
+  
   // PRIVATE MEMBERS ////////////////////////////////////////////////////
 private :
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticPlaneStress.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticPlaneStress.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticPlaneStress.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -314,9 +314,9 @@
 // ----------------------------------------------------------------------
 // Get stable time step for implicit time integration.
 PylithScalar
-pylith::materials::ElasticPlaneStress::stableTimeStepImplicit(
-					const topology::Mesh& mesh) {
-  return pylith::PYLITH_MAXSCALAR;
+pylith::materials::ElasticPlaneStress::stableTimeStepImplicit(const topology::Mesh& mesh,
+							      topology::Field<topology::Mesh>* field) {
+  return ElasticMaterial::_stableTimeStepImplicitMax(mesh, field);
 }
 
 // ----------------------------------------------------------------------
@@ -332,4 +332,28 @@
 } // _stableTimeStepImplicit
 
 
+// ----------------------------------------------------------------------
+// Get stable time step for explicit time integration.
+PylithScalar
+pylith::materials::ElasticPlaneStress::_stableTimeStepExplicit(const PylithScalar* properties,
+							       const int numProperties,
+							       const PylithScalar* stateVars,
+							       const int numStateVars,
+							       const double minCellWidth) const
+{ // _stableTimeStepExplicit
+  assert(properties);
+  assert(_numPropsQuadPt == numProperties);
+ 
+  const PylithScalar mu = properties[p_mu];
+  const PylithScalar lambda = properties[p_lambda];
+  const PylithScalar density = properties[p_density];
+
+  assert(density > 0.0);
+  const PylithScalar vp = sqrt((lambda + 2*mu) / density);
+
+  const PylithScalar dtStable = minCellWidth / vp;
+  return dtStable;
+} // _stableTimeStepExplicit
+
+
 // End of file 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticPlaneStress.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticPlaneStress.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticPlaneStress.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -61,9 +61,12 @@
    * Default is MAXDOUBLE (or 1.0e+30 if MAXFLOAT is not defined in math.h).
    *
    * @param mesh Finite-element mesh.
+   * @param field Field for storing min stable time step for each cell.
+   *
    * @returns Time step
    */
-  PylithScalar stableTimeStepImplicit(const topology::Mesh& mesh);
+  PylithScalar stableTimeStepImplicit(const topology::Mesh& mesh,
+				      topology::Field<topology::Mesh>* field =0);
 
   // PROTECTED METHODS //////////////////////////////////////////////////
 protected :
@@ -183,6 +186,22 @@
 				 const PylithScalar* stateVars,
 				 const int numStateVars) const;
 
+  /** Get stable time step for explicit time integration.
+   *
+   * @param properties Properties at location.
+   * @param numProperties Number of properties.
+   * @param stateVars State variables at location.
+   * @param numStateVars Number of state variables.
+   * @param minCellWidth Minimum width across cell.
+   *
+   * @returns Time step
+   */
+  PylithScalar _stableTimeStepExplicit(const PylithScalar* properties,
+				       const int numProperties,
+				       const PylithScalar* stateVars,
+				       const int numStateVars,
+				       const double minCellWidth) const;
+  
   // PRIVATE MEMBERS ////////////////////////////////////////////////////
 private :
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticStrain1D.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticStrain1D.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticStrain1D.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -291,9 +291,9 @@
 // ----------------------------------------------------------------------
 // Get stable time step for implicit time integration.
 PylithScalar
-pylith::materials::ElasticStrain1D::stableTimeStepImplicit(
-					const topology::Mesh& mesh) {
-  return pylith::PYLITH_MAXSCALAR;
+pylith::materials::ElasticStrain1D::stableTimeStepImplicit(const topology::Mesh& mesh,
+							   topology::Field<topology::Mesh>* field) {
+  return ElasticMaterial::_stableTimeStepImplicitMax(mesh, field);
 }
 
 // ----------------------------------------------------------------------
@@ -309,4 +309,28 @@
 } // _stableTimeStepImplicit
 
 
+// ----------------------------------------------------------------------
+// Get stable time step for explicit time integration.
+PylithScalar
+pylith::materials::ElasticStrain1D::_stableTimeStepExplicit(const PylithScalar* properties,
+							    const int numProperties,
+							    const PylithScalar* stateVars,
+							    const int numStateVars,
+							    const double minCellWidth) const
+{ // _stableTimeStepExplicit
+  assert(properties);
+  assert(_numPropsQuadPt == numProperties);
+ 
+  const PylithScalar mu = properties[p_mu];
+  const PylithScalar lambda = properties[p_lambda];
+  const PylithScalar density = properties[p_density];
+
+  assert(density > 0.0);
+  const PylithScalar vp = sqrt((lambda + 2*mu) / density);
+
+  const PylithScalar dtStable = minCellWidth / vp;
+  return dtStable;
+} // _stableTimeStepExplicit
+
+
 // End of file 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticStrain1D.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticStrain1D.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticStrain1D.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -60,9 +60,12 @@
    * Default is MAXDOUBLE (or 1.0e+30 if MAXFLOAT is not defined in math.h).
    *
    * @param mesh Finite-element mesh.
+   * @param field Field for storing min stable time step for each cell.
+   *
    * @returns Time step
    */
-  PylithScalar stableTimeStepImplicit(const topology::Mesh& mesh);
+  PylithScalar stableTimeStepImplicit(const topology::Mesh& mesh,
+				      topology::Field<topology::Mesh>* field =0);
 
   // PROTECTED METHODS //////////////////////////////////////////////////
 protected :
@@ -182,6 +185,22 @@
 				 const PylithScalar* stateVars,
 				 const int numStateVars) const;
 
+  /** Get stable time step for explicit time integration.
+   *
+   * @param properties Properties at location.
+   * @param numProperties Number of properties.
+   * @param stateVars State variables at location.
+   * @param numStateVars Number of state variables.
+   * @param minCellWidth Minimum width across cell.
+   *
+   * @returns Time step
+   */
+  PylithScalar _stableTimeStepExplicit(const PylithScalar* properties,
+				       const int numProperties,
+				       const PylithScalar* stateVars,
+				       const int numStateVars,
+				       const double minCellWidth) const;
+  
   // PRIVATE MEMBERS ////////////////////////////////////////////////////
 private :
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticStress1D.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticStress1D.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticStress1D.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -291,9 +291,9 @@
 // ----------------------------------------------------------------------
 // Get stable time step for implicit time integration.
 PylithScalar
-pylith::materials::ElasticStress1D::stableTimeStepImplicit(
-					const topology::Mesh& mesh) {
-  return pylith::PYLITH_MAXSCALAR;
+pylith::materials::ElasticStress1D::stableTimeStepImplicit(const topology::Mesh& mesh,
+							   topology::Field<topology::Mesh>* field) {
+  return ElasticMaterial::_stableTimeStepImplicitMax(mesh, field);
 }
 
 // ----------------------------------------------------------------------
@@ -309,4 +309,28 @@
 } // _stableTimeStepImplicit
 
 
+// ----------------------------------------------------------------------
+// Get stable time step for explicit time integration.
+PylithScalar
+pylith::materials::ElasticStress1D::_stableTimeStepExplicit(const PylithScalar* properties,
+							    const int numProperties,
+							    const PylithScalar* stateVars,
+							    const int numStateVars,
+							    const double minCellWidth) const
+{ // _stableTimeStepExplicit
+  assert(properties);
+  assert(_numPropsQuadPt == numProperties);
+ 
+  const PylithScalar mu = properties[p_mu];
+  const PylithScalar lambda = properties[p_lambda];
+  const PylithScalar density = properties[p_density];
+
+  assert(density > 0.0);
+  const PylithScalar vp = sqrt((lambda + 2*mu) / density);
+
+  const PylithScalar dtStable = minCellWidth / vp;
+  return dtStable;
+} // _stableTimeStepExplicit
+
+
 // End of file 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticStress1D.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticStress1D.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/ElasticStress1D.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -61,9 +61,12 @@
    * Default is MAXDOUBLE (or 1.0e+30 if MAXFLOAT is not defined in math.h).
    *
    * @param mesh Finite-element mesh.
+   * @param field Field for storing min stable time step for each cell.
+   *
    * @returns Time step
    */
-  PylithScalar stableTimeStepImplicit(const topology::Mesh& mesh);
+  PylithScalar stableTimeStepImplicit(const topology::Mesh& mesh,
+				      topology::Field<topology::Mesh>* field =0);
 
   // PROTECTED METHODS //////////////////////////////////////////////////
 protected :
@@ -183,6 +186,22 @@
 				 const PylithScalar* stateVars,
 				 const int numStateVars) const;
 
+  /** Get stable time step for explicit time integration.
+   *
+   * @param properties Properties at location.
+   * @param numProperties Number of properties.
+   * @param stateVars State variables at location.
+   * @param numStateVars Number of state variables.
+   * @param minCellWidth Minimum width across cell.
+   *
+   * @returns Time step
+   */
+  PylithScalar _stableTimeStepExplicit(const PylithScalar* properties,
+				       const int numProperties,
+				       const PylithScalar* stateVars,
+				       const int numStateVars,
+				       const double minCellWidth) const;
+  
   // PRIVATE MEMBERS ////////////////////////////////////////////////////
 private :
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/GenMaxwellIsotropic3D.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/GenMaxwellIsotropic3D.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/GenMaxwellIsotropic3D.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -199,7 +199,7 @@
   _calcStressFn(0),
   _updateStateVarsFn(0)  
 { // constructor
-  useElasticBehavior(true);
+  useElasticBehavior(false);
   _viscousStrain.resize(_GenMaxwellIsotropic3D::numMaxwellModels*_tensorSize);
 } // constructor
 
@@ -895,8 +895,31 @@
   return dtStable;
 } // _stableTimeStepImplicit
 
-#include <iostream>
 // ----------------------------------------------------------------------
+// Get stable time step for explicit time integration.
+PylithScalar
+pylith::materials::GenMaxwellIsotropic3D::_stableTimeStepExplicit(const PylithScalar* properties,
+								  const int numProperties,
+								  const PylithScalar* stateVars,
+								  const int numStateVars,
+								  const double minCellWidth) const
+{ // _stableTimeStepExplicit
+  assert(properties);
+  assert(_numPropsQuadPt == numProperties);
+ 
+  const PylithScalar mu = properties[p_muEff];
+  const PylithScalar lambda = properties[p_lambdaEff];
+  const PylithScalar density = properties[p_density];
+
+  assert(density > 0.0);
+  const PylithScalar vp = sqrt((lambda + 2*mu) / density);
+
+  const PylithScalar dtStable = minCellWidth / vp;
+  return dtStable;
+} // _stableTimeStepExplicit
+
+
+// ----------------------------------------------------------------------
 // Compute viscous strain for current time step.
 void
 pylith::materials::GenMaxwellIsotropic3D::_computeStateVars(

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/GenMaxwellIsotropic3D.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/GenMaxwellIsotropic3D.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/GenMaxwellIsotropic3D.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -230,6 +230,22 @@
 				 const PylithScalar* stateVars,
 				 const int numStateVars) const;
 
+  /** Get stable time step for explicit time integration.
+   *
+   * @param properties Properties at location.
+   * @param numProperties Number of properties.
+   * @param stateVars State variables at location.
+   * @param numStateVars Number of state variables.
+   * @param minCellWidth Minimum width across cell.
+   *
+   * @returns Time step
+   */
+  PylithScalar _stableTimeStepExplicit(const PylithScalar* properties,
+				       const int numProperties,
+				       const PylithScalar* stateVars,
+				       const int numStateVars,
+				       const double minCellWidth) const;
+  
   // PRIVATE TYPEDEFS ///////////////////////////////////////////////////
 private :
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/GenMaxwellPlaneStrain.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/GenMaxwellPlaneStrain.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/GenMaxwellPlaneStrain.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -194,7 +194,7 @@
   _calcStressFn(0),
   _updateStateVarsFn(0)  
 { // constructor
-  useElasticBehavior(true);
+  useElasticBehavior(false);
   _viscousStrain.resize(_GenMaxwellPlaneStrain::numMaxwellModels * 4);
 } // constructor
 
@@ -843,8 +843,32 @@
   return dtStable;
 } // _stableTimeStepImplicit
 
-#include <iostream>
+
 // ----------------------------------------------------------------------
+// Get stable time step for explicit time integration.
+PylithScalar
+pylith::materials::GenMaxwellPlaneStrain::_stableTimeStepExplicit(const PylithScalar* properties,
+								  const int numProperties,
+								  const PylithScalar* stateVars,
+								  const int numStateVars,
+								  const double minCellWidth) const
+{ // _stableTimeStepExplicit
+  assert(properties);
+  assert(_numPropsQuadPt == numProperties);
+ 
+  const PylithScalar mu = properties[p_muEff];
+  const PylithScalar lambda = properties[p_lambdaEff];
+  const PylithScalar density = properties[p_density];
+
+  assert(density > 0.0);
+  const PylithScalar vp = sqrt((lambda + 2*mu) / density);
+
+  const PylithScalar dtStable = minCellWidth / vp;
+  return dtStable;
+} // _stableTimeStepExplicit
+
+
+// ----------------------------------------------------------------------
 // Compute viscous strain for current time step.
 void
 pylith::materials::GenMaxwellPlaneStrain::_computeStateVars(

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/GenMaxwellPlaneStrain.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/GenMaxwellPlaneStrain.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/GenMaxwellPlaneStrain.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -240,6 +240,22 @@
 				 const PylithScalar* stateVars,
 				 const int numStateVars) const;
 
+  /** Get stable time step for explicit time integration.
+   *
+   * @param properties Properties at location.
+   * @param numProperties Number of properties.
+   * @param stateVars State variables at location.
+   * @param numStateVars Number of state variables.
+   * @param minCellWidth Minimum width across cell.
+   *
+   * @returns Time step
+   */
+  PylithScalar _stableTimeStepExplicit(const PylithScalar* properties,
+				       const int numProperties,
+				       const PylithScalar* stateVars,
+				       const int numStateVars,
+				       const double minCellWidth) const;
+  
   // PRIVATE TYPEDEFS ///////////////////////////////////////////////////
 private :
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/GenMaxwellQpQsIsotropic3D.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/GenMaxwellQpQsIsotropic3D.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/GenMaxwellQpQsIsotropic3D.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -239,7 +239,7 @@
   _calcStressFn(0),
   _updateStateVarsFn(0)  
 { // constructor
-  useElasticBehavior(true);
+  useElasticBehavior(false);
   _viscousDevStrain.resize(_GenMaxwellQpQsIsotropic3D::numMaxwellModels*_tensorSize);
   _viscousMeanStrain.resize(_GenMaxwellQpQsIsotropic3D::numMaxwellModels);
 } // constructor
@@ -974,6 +974,30 @@
 } // _stableTimeStepImplicit
 
 // ----------------------------------------------------------------------
+// Get stable time step for explicit time integration.
+PylithScalar
+pylith::materials::GenMaxwellQpQsIsotropic3D::_stableTimeStepExplicit(const PylithScalar* properties,
+								      const int numProperties,
+								      const PylithScalar* stateVars,
+								      const int numStateVars,
+								      const double minCellWidth) const
+{ // _stableTimeStepExplicit
+  assert(properties);
+  assert(_numPropsQuadPt == numProperties);
+ 
+  const PylithScalar mu = properties[p_muEff];
+  const PylithScalar kappa = properties[p_kEff];
+  const PylithScalar density = properties[p_density];
+
+  assert(density > 0.0);
+  const PylithScalar vp = sqrt((kappa + 4.0/3.0*mu) / density);
+
+  const PylithScalar dtStable = minCellWidth / vp;
+  return dtStable;
+} // _stableTimeStepExplicit
+
+
+// ----------------------------------------------------------------------
 // Compute viscous strain for current time step.
 void
 pylith::materials::GenMaxwellQpQsIsotropic3D::_computeStateVars(

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/GenMaxwellQpQsIsotropic3D.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/GenMaxwellQpQsIsotropic3D.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/GenMaxwellQpQsIsotropic3D.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -230,6 +230,22 @@
 				 const PylithScalar* stateVars,
 				 const int numStateVars) const;
 
+  /** Get stable time step for explicit time integration.
+   *
+   * @param properties Properties at location.
+   * @param numProperties Number of properties.
+   * @param stateVars State variables at location.
+   * @param numStateVars Number of state variables.
+   * @param minCellWidth Minimum width across cell.
+   *
+   * @returns Time step
+   */
+  PylithScalar _stableTimeStepExplicit(const PylithScalar* properties,
+				       const int numProperties,
+				       const PylithScalar* stateVars,
+				       const int numStateVars,
+				       const double minCellWidth) const;
+  
   // PRIVATE TYPEDEFS ///////////////////////////////////////////////////
 private :
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/Makefile.am	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/Makefile.am	2012-11-01 17:04:11 UTC (rev 20976)
@@ -40,6 +40,8 @@
 	MaxwellPlaneStrain.icc \
 	PowerLaw3D.hh \
 	PowerLaw3D.icc \
+	PowerLawPlaneStrain.hh \
+	PowerLawPlaneStrain.icc \
 	DruckerPrager3D.hh \
 	DruckerPrager3D.icc \
 	DruckerPragerPlaneStrain.hh \

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/Material.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/Material.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/Material.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -109,9 +109,8 @@
 // ----------------------------------------------------------------------
 // Get physical property parameters and initial state (if used) from database.
 void
-pylith::materials::Material::initialize(
-		     const topology::Mesh& mesh,
-		     feassemble::Quadrature<topology::Mesh>* quadrature)
+pylith::materials::Material::initialize(const topology::Mesh& mesh,
+					feassemble::Quadrature<topology::Mesh>* quadrature)
 { // initialize
   assert(0 != _dbProperties);
   assert(0 != quadrature);

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/Material.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/Material.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/Material.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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.
@@ -188,7 +195,8 @@
    * @param field Field over material cells.
    * @param name Name of field to retrieve.
    */
-  void getField(topology::Field<topology::Mesh> *field, const char* name) const;
+  void getField(topology::Field<topology::Mesh> *field,
+		const char* name) const;
 
   /** Get the field with all properties.
    *

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/Material.icc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/Material.icc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/Material.icc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/libsrc/pylith/materials/MaxwellIsotropic3D.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/MaxwellIsotropic3D.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/MaxwellIsotropic3D.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -146,7 +146,7 @@
   _calcStressFn(0),
   _updateStateVarsFn(0)
 { // constructor
-  useElasticBehavior(true);
+  useElasticBehavior(false);
   _viscousStrain.resize(_tensorSize);
 } // constructor
 
@@ -739,6 +739,30 @@
 } // _stableTimeStepImplicit
 
 // ----------------------------------------------------------------------
+// Get stable time step for explicit time integration.
+PylithScalar
+pylith::materials::MaxwellIsotropic3D::_stableTimeStepExplicit(const PylithScalar* properties,
+							       const int numProperties,
+							       const PylithScalar* stateVars,
+							       const int numStateVars,
+							       const double minCellWidth) const
+{ // _stableTimeStepExplicit
+  assert(properties);
+  assert(_numPropsQuadPt == numProperties);
+ 
+  const PylithScalar mu = properties[p_mu];
+  const PylithScalar lambda = properties[p_lambda];
+  const PylithScalar density = properties[p_density];
+
+  assert(density > 0.0);
+  const PylithScalar vp = sqrt((lambda + 2*mu) / density);
+
+  const PylithScalar dtStable = minCellWidth / vp;
+  return dtStable;
+} // _stableTimeStepExplicit
+
+
+// ----------------------------------------------------------------------
 // Compute viscous strain for current time step.
 void
 pylith::materials::MaxwellIsotropic3D::_computeStateVars(

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/MaxwellIsotropic3D.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/MaxwellIsotropic3D.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/MaxwellIsotropic3D.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -218,6 +218,22 @@
 				 const PylithScalar* stateVars,
 				 const int numStateVars) const;
 
+  /** Get stable time step for explicit time integration.
+   *
+   * @param properties Properties at location.
+   * @param numProperties Number of properties.
+   * @param stateVars State variables at location.
+   * @param numStateVars Number of state variables.
+   * @param minCellWidth Minimum width across cell.
+   *
+   * @returns Time step
+   */
+  PylithScalar _stableTimeStepExplicit(const PylithScalar* properties,
+				       const int numProperties,
+				       const PylithScalar* stateVars,
+				       const int numStateVars,
+				       const double minCellWidth) const;
+  
   // PRIVATE TYPEDEFS ///////////////////////////////////////////////////
 private :
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/MaxwellPlaneStrain.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/MaxwellPlaneStrain.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/MaxwellPlaneStrain.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -149,7 +149,7 @@
   _calcStressFn(0),
   _updateStateVarsFn(0)
 { // constructor
-  useElasticBehavior(true);
+  useElasticBehavior(false);
   _viscousStrain.resize(4);
 } // constructor
 
@@ -697,6 +697,30 @@
 } // _stableTimeStepImplicit
 
 // ----------------------------------------------------------------------
+// Get stable time step for explicit time integration.
+PylithScalar
+pylith::materials::MaxwellPlaneStrain::_stableTimeStepExplicit(const PylithScalar* properties,
+							       const int numProperties,
+							       const PylithScalar* stateVars,
+							       const int numStateVars,
+							       const double minCellWidth) const
+{ // _stableTimeStepExplicit
+  assert(properties);
+  assert(_numPropsQuadPt == numProperties);
+ 
+  const PylithScalar mu = properties[p_mu];
+  const PylithScalar lambda = properties[p_lambda];
+  const PylithScalar density = properties[p_density];
+
+  assert(density > 0.0);
+  const PylithScalar vp = sqrt((lambda + 2*mu) / density);
+
+  const PylithScalar dtStable = minCellWidth / vp;
+  return dtStable;
+} // _stableTimeStepExplicit
+
+
+// ----------------------------------------------------------------------
 // Compute viscous strain for current time step.
 void
 pylith::materials::MaxwellPlaneStrain::_computeStateVars(

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/MaxwellPlaneStrain.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/MaxwellPlaneStrain.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/MaxwellPlaneStrain.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -232,6 +232,22 @@
 				 const PylithScalar* stateVars,
 				 const int numStateVars) const;
 
+  /** Get stable time step for explicit time integration.
+   *
+   * @param properties Properties at location.
+   * @param numProperties Number of properties.
+   * @param stateVars State variables at location.
+   * @param numStateVars Number of state variables.
+   * @param minCellWidth Minimum width across cell.
+   *
+   * @returns Time step
+   */
+  PylithScalar _stableTimeStepExplicit(const PylithScalar* properties,
+				       const int numProperties,
+				       const PylithScalar* stateVars,
+				       const int numStateVars,
+				       const double minCellWidth) const;
+  
   // PRIVATE TYPEDEFS ///////////////////////////////////////////////////
 private :
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/PowerLaw3D.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/PowerLaw3D.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/PowerLaw3D.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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) {
@@ -437,6 +436,30 @@
 } // _stableTimeStepImplicit
 
 // ----------------------------------------------------------------------
+// Get stable time step for explicit time integration.
+PylithScalar
+pylith::materials::PowerLaw3D::_stableTimeStepExplicit(const PylithScalar* properties,
+						       const int numProperties,
+						       const PylithScalar* stateVars,
+						       const int numStateVars,
+						       const double minCellWidth) const
+{ // _stableTimeStepExplicit
+  assert(properties);
+  assert(_numPropsQuadPt == numProperties);
+ 
+  const PylithScalar mu = properties[p_mu];
+  const PylithScalar lambda = properties[p_lambda];
+  const PylithScalar density = properties[p_density];
+
+  assert(density > 0.0);
+  const PylithScalar vp = sqrt((lambda + 2*mu) / density);
+
+  const PylithScalar dtStable = minCellWidth / vp;
+  return dtStable;
+} // _stableTimeStepExplicit
+
+
+// ----------------------------------------------------------------------
 // Compute stress tensor at location from properties as an elastic
 // material.
 void
@@ -524,7 +547,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 +559,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 +588,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 +722,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 +751,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 +790,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 +921,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 +931,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 +960,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 +988,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 +1069,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 +1081,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 +1178,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 +1192,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 +1228,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 +1239,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 +1267,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 +1292,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 +1364,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/branches/pylith-scecdynrup/libsrc/pylith/materials/PowerLaw3D.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/PowerLaw3D.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/PowerLaw3D.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -233,6 +233,22 @@
 				 const PylithScalar* stateVars,
 				 const int numStateVars) const;
 
+  /** Get stable time step for explicit time integration.
+   *
+   * @param properties Properties at location.
+   * @param numProperties Number of properties.
+   * @param stateVars State variables at location.
+   * @param numStateVars Number of state variables.
+   * @param minCellWidth Minimum width across cell.
+   *
+   * @returns Time step
+   */
+  PylithScalar _stableTimeStepExplicit(const PylithScalar* properties,
+				       const int numProperties,
+				       const PylithScalar* stateVars,
+				       const int numStateVars,
+				       const double minCellWidth) const;
+  
   /** Update state variables (for next time step).
    *
    * @param stateVars State variables at location.
@@ -469,13 +485,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/branches/pylith-scecdynrup/libsrc/pylith/materials/PowerLawPlaneStrain.cc (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/libsrc/pylith/materials/PowerLawPlaneStrain.cc)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/PowerLawPlaneStrain.cc	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/PowerLawPlaneStrain.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -0,0 +1,1291 @@
+// -*- 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
+
+// ----------------------------------------------------------------------
+// Get stable time step for explicit time integration.
+PylithScalar
+pylith::materials::PowerLawPlaneStrain::_stableTimeStepExplicit(const PylithScalar* properties,
+								const int numProperties,
+								const PylithScalar* stateVars,
+								const int numStateVars,
+								const double minCellWidth) const
+{ // _stableTimeStepExplicit
+  assert(properties);
+  assert(_numPropsQuadPt == numProperties);
+ 
+  const PylithScalar mu = properties[p_mu];
+  const PylithScalar lambda = properties[p_lambda];
+  const PylithScalar density = properties[p_density];
+
+  assert(density > 0.0);
+  const PylithScalar vp = sqrt((lambda + 2*mu) / density);
+
+  const PylithScalar dtStable = minCellWidth / vp;
+  return dtStable;
+} // _stableTimeStepExplicit
+
+
+// ----------------------------------------------------------------------
+// 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/branches/pylith-scecdynrup/libsrc/pylith/materials/PowerLawPlaneStrain.hh (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/libsrc/pylith/materials/PowerLawPlaneStrain.hh)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/PowerLawPlaneStrain.hh	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/PowerLawPlaneStrain.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -0,0 +1,553 @@
+// -*- 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;
+
+  /** Get stable time step for explicit time integration.
+   *
+   * @param properties Properties at location.
+   * @param numProperties Number of properties.
+   * @param stateVars State variables at location.
+   * @param numStateVars Number of state variables.
+   * @param minCellWidth Minimum width across cell.
+   *
+   * @returns Time step
+   */
+  PylithScalar _stableTimeStepExplicit(const PylithScalar* properties,
+				       const int numProperties,
+				       const PylithScalar* stateVars,
+				       const int numStateVars,
+				       const double minCellWidth) 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/branches/pylith-scecdynrup/libsrc/pylith/materials/PowerLawPlaneStrain.icc (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/libsrc/pylith/materials/PowerLawPlaneStrain.icc)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/PowerLawPlaneStrain.icc	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/PowerLawPlaneStrain.icc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/libsrc/pylith/materials/materialsfwd.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/materialsfwd.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/materials/materialsfwd.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -47,6 +47,7 @@
     class GenMaxwellPlaneStrain;
     class GenMaxwellQpQsIsotropic3D;
     class PowerLaw3D;
+    class PowerLawPlaneStrain;
     class DruckerPrager3D;
     class DruckerPragerPlaneStrain;
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/DataWriterHDF5.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/DataWriterHDF5.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/DataWriterHDF5.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -50,8 +50,9 @@
 void
 pylith::meshio::DataWriterHDF5<mesh_type, field_type>::deallocate(void)
 { // deallocate
+  DataWriter<mesh_type, field_type>::deallocate();
+
   PetscErrorCode err = 0;
-
   err = PetscViewerDestroy(&_viewer); CHECK_PETSC_ERROR(err);
   err = VecDestroy(&_tstamp); CHECK_PETSC_ERROR(err);
 } // deallocate

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/DataWriterHDF5Ext.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/DataWriterHDF5Ext.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/DataWriterHDF5Ext.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -50,12 +50,14 @@
 void
 pylith::meshio::DataWriterHDF5Ext<mesh_type,field_type>::deallocate(void)
 { // deallocate
+  DataWriter<mesh_type, field_type>::deallocate();
+
+  PetscErrorCode err = 0;
   const typename dataset_type::const_iterator& dEnd = _datasets.end();
   for (typename dataset_type::iterator d_iter=_datasets.begin();
        d_iter != dEnd;
        ++d_iter) {
-    PetscErrorCode err = PetscViewerDestroy(&d_iter->second.viewer);
-    CHECK_PETSC_ERROR(err);
+    err = PetscViewerDestroy(&d_iter->second.viewer);CHECK_PETSC_ERROR(err);
   } // for
 } // deallocate
   

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/DataWriterVTK.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/DataWriterVTK.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/DataWriterVTK.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -67,9 +67,10 @@
 void
 pylith::meshio::DataWriterVTK<mesh_type, field_type>::deallocate(void)
 { // deallocate
-  if (0 != _viewer)
-    PetscViewerDestroy(&_viewer);
-  _viewer = 0;
+  DataWriter<mesh_type, field_type>::deallocate();
+
+  PetscErrorCode err = 0;
+  err = PetscViewerDestroy(&_viewer);CHECK_PETSC_ERROR(err);
 } // deallocate
   
 // ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/ExodusII.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/ExodusII.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/ExodusII.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -51,10 +51,18 @@
 // Destructor
 pylith::meshio::ExodusII::~ExodusII(void)
 { // destructor
-  close();
+  deallocate();
 } // destructor
 
 // ----------------------------------------------------------------------
+// Deallocate data structures.
+void
+pylith::meshio::ExodusII::deallocate(void)
+{ // deallocate
+  close();
+} // deallocate
+
+// ----------------------------------------------------------------------
 // Set filename.
 void
 pylith::meshio::ExodusII::filename(const char* name)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/ExodusII.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/ExodusII.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/ExodusII.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -56,6 +56,9 @@
   /// Destructor
   ~ExodusII(void);
 
+  /// Deallocate data structures.
+  void deallocate(void);
+
   /** Set filename.
    *
    * @param filename Name of file

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/OutputSolnPoints.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/OutputSolnPoints.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/OutputSolnPoints.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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
 
@@ -257,12 +257,12 @@
     _fields->get("buffer (interpolated)");
   if (fieldInterp.section().isNull() || vertices->size()*fiberDim != fieldInterp.sectionSize()) {
     fieldInterp.newSection(vertices, fiberDim);
-    fieldInterp.label(field.label());
     fieldInterp.allocate();
   } // if
   logger.stagePop();
 
   fieldInterp.zero();
+  fieldInterp.label(field.label());
   fieldInterp.vectorFieldType(field.vectorFieldType());
   fieldInterp.scale(field.scale());
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/OutputSolnPoints.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/OutputSolnPoints.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/OutputSolnPoints.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -38,8 +38,7 @@
 /** @brief C++ object for managing output of finite-element data over
  * a subdomain.
  */
-class pylith::meshio::OutputSolnPoints : 
-  public OutputManager<topology::Mesh, topology::Field<topology::Mesh> >
+class pylith::meshio::OutputSolnPoints : public OutputManager<topology::Mesh, topology::Field<topology::Mesh> >
 { // OutputSolnPoints
   friend class TestOutputSolnPoints; // unit testing
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/Xdmf.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/Xdmf.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/Xdmf.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -165,8 +165,13 @@
 	     std::string("Matrix") == fieldsMetadata[iField].vectorFieldType) ) {
 	  const int fiberDim = fieldsMetadata[iField].fiberDim;
 	  for (int component=0; component < fiberDim; ++component)
-	    _writeGridAttributeComponent(fieldsMetadata[iField],
-					 iTimeStep, component);
+	    _writeGridAttributeComponent(fieldsMetadata[iField], iTimeStep, component, spaceDim);
+	} else if (3 == spaceDim && 
+		   (std::string("Tensor6") == fieldsMetadata[iField].vectorFieldType  ||
+		    std::string("Matrix") == fieldsMetadata[iField].vectorFieldType) ) {
+	  const int fiberDim = fieldsMetadata[iField].fiberDim;
+	  for (int component=0; component < fiberDim; ++component)
+	    _writeGridAttributeComponent(fieldsMetadata[iField], iTimeStep, component, spaceDim);
 	} else {
 	  _writeGridAttribute(fieldsMetadata[iField],
 			      iTimeStep);
@@ -183,13 +188,18 @@
     const int iTimeStep = 0;
     for (int iField=0; iField < numFields; ++iField) {
       if (2 == spaceDim && 
-	    (std::string("Vector") == fieldsMetadata[iField].vectorFieldType ||
-	     std::string("Tensor6") == fieldsMetadata[iField].vectorFieldType  ||
-	     std::string("Matrix") == fieldsMetadata[iField].vectorFieldType) ) {
+	  (std::string("Vector") == fieldsMetadata[iField].vectorFieldType ||
+	   std::string("Tensor6") == fieldsMetadata[iField].vectorFieldType  ||
+	   std::string("Matrix") == fieldsMetadata[iField].vectorFieldType) ) {
 	const int fiberDim = fieldsMetadata[iField].fiberDim;
 	for (int component=0; component < fiberDim; ++component)
-	  _writeGridAttributeComponent(fieldsMetadata[iField],
-				       iTimeStep, component);
+	  _writeGridAttributeComponent(fieldsMetadata[iField], iTimeStep, component, spaceDim);
+      } else if (3 == spaceDim && 
+		 (std::string("Tensor6") == fieldsMetadata[iField].vectorFieldType  ||
+		  std::string("Matrix") == fieldsMetadata[iField].vectorFieldType) ) {
+	const int fiberDim = fieldsMetadata[iField].fiberDim;
+	for (int component=0; component < fiberDim; ++component)
+	  _writeGridAttributeComponent(fieldsMetadata[iField], iTimeStep, component, spaceDim);
       } else {
 	_writeGridAttribute(fieldsMetadata[iField],
 			    iTimeStep);
@@ -504,7 +514,8 @@
 void
 pylith::meshio::Xdmf::_writeGridAttributeComponent(const FieldMetadata& metadata,
 						   const int iTime,
-						   const int component)
+						   const int component,
+						   const int spaceDim)
 { // _writeGridAttribute
   assert(_file.is_open() && _file.good());
 
@@ -529,6 +540,9 @@
     case 1:
       componentName = std::string(metadata.name) + std::string("_y");
       break;
+    case 2:
+      componentName = std::string(metadata.name) + std::string("_z");
+      break;
     default:
       { // default
 	std::ostringstream msg;
@@ -539,24 +553,65 @@
       } // default
     } // switch
   } else if (std::string("Tensor6") == metadata.vectorFieldType) {
-    switch (component) {
-    case 0:
-      componentName = std::string(metadata.name) + std::string("_xx");
+    switch (spaceDim) {
+    case 2 :
+      switch (component) {
+      case 0:
+	componentName = std::string(metadata.name) + std::string("_xx");
+	break;
+      case 1:
+	componentName = std::string(metadata.name) + std::string("_yy");
+	break;
+      case 2:
+	componentName = std::string(metadata.name) + std::string("_xy");
+	break;
+      default:
+	{ // default
+	  std::ostringstream msg;
+	  msg << "Unknown component " << component << " while writing Xdmf file.";
+	  std::cerr << msg.str() << std::endl;
+	  assert(0);
+	  throw std::logic_error(msg.str());
+	} // default
+      } // switch
       break;
-    case 1:
-      componentName = std::string(metadata.name) + std::string("_yy");
-      break;
-    case 2:
-      componentName = std::string(metadata.name) + std::string("_xy");
-      break;
-    default:
-      { // default
+    case 3 :
+      switch (component) {
+      case 0:
+	componentName = std::string(metadata.name) + std::string("_xx");
+	break;
+      case 1:
+	componentName = std::string(metadata.name) + std::string("_yy");
+	break;
+      case 2:
+	componentName = std::string(metadata.name) + std::string("_zz");
+	break;
+      case 3:
+	componentName = std::string(metadata.name) + std::string("_xy");
+	break;
+      case 4:
+	componentName = std::string(metadata.name) + std::string("_yz");
+	break;
+      case 5:
+	componentName = std::string(metadata.name) + std::string("_xz");
+	break;
+      default: {
 	std::ostringstream msg;
 	msg << "Unknown component " << component << " while writing Xdmf file.";
 	std::cerr << msg.str() << std::endl;
 	assert(0);
 	throw std::logic_error(msg.str());
       } // default
+      } // switch
+      break;
+      
+    default: {
+	std::ostringstream msg;
+	msg << "Unknown spatial dimension " << spaceDim << " while writing Xdmf file.";
+	std::cerr << msg.str() << std::endl;
+	assert(0);
+	throw std::logic_error(msg.str());
+    } // default
     } // switch
   } else if (std::string("Matrix") == metadata.vectorFieldType) {
     std::ostringstream sname;

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/Xdmf.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/Xdmf.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/meshio/Xdmf.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -148,10 +148,12 @@
    * @param metadata Metadata for field.
    * @param iTime Index of time step.
    * @param component Index of component.
+   * @param spaceDim Spatial dimension.
    */
   void _writeGridAttributeComponent(const FieldMetadata& metadata,
 				    const int iTime,
-				    const int component);
+				    const int component,
+				    const int spaceDim);
 
 // PRIVATE MEMBERS ------------------------------------------------------
 private :

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/Explicit.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/Explicit.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/Explicit.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -36,7 +36,6 @@
 // Destructor
 pylith::problems::Explicit::~Explicit(void)
 { // destructor
-  deallocate();
 } // destructor
 
 // ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/Formulation.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/Formulation.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/Formulation.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -262,54 +262,6 @@
 } // reformResidual
 
 // ----------------------------------------------------------------------
-// Reform system residual.
-void
-pylith::problems::Formulation::reformResidualLumped(const PetscVec* tmpResidualVec,
-                const PetscVec* tmpSolutionVec)
-{ // reformResidualLumped
-  assert(0 != _fields);
-
-  // Update section view of field.
-  if (0 != tmpSolutionVec) {
-    topology::Field<topology::Mesh>& solution = _fields->solution();
-    solution.scatterVectorToSection(*tmpSolutionVec);
-  } // if
-
-  // Update rate fields (must be consistent with current solution).
-  calcRateFields();  
-
-  // Set residual to zero.
-  topology::Field<topology::Mesh>& residual = _fields->get("residual");
-  residual.zero();
-
-  // Add in contributions that require assembly.
-  int numIntegrators = _meshIntegrators.size();
-  assert(numIntegrators > 0); // must have at least 1 bulk integrator
-  for (int i=0; i < numIntegrators; ++i) {
-    _meshIntegrators[i]->timeStep(_dt);
-    _meshIntegrators[i]->integrateResidualLumped(residual, _t, _fields);
-  } // for
-  numIntegrators = _submeshIntegrators.size();
-  for (int i=0; i < numIntegrators; ++i) {
-    _submeshIntegrators[i]->timeStep(_dt);
-    _submeshIntegrators[i]->integrateResidualLumped(residual, _t, _fields);
-  } // for
-
-  // Assemble residual.
-  residual.complete();
-
-  // Update PETSc view of residual
-  if (0 != tmpResidualVec)
-    residual.scatterSectionToVector(*tmpResidualVec);
-  else
-    residual.scatterSectionToVector();
-
-  // TODO: Move this to SolverLinear
-  if (0 != tmpResidualVec)
-    VecScale(*tmpResidualVec, -1.0);
-} // reformResidualLumped
-
-// ----------------------------------------------------------------------
 // Reform system Jacobian.
 void
 pylith::problems::Formulation::reformJacobian(const PetscVec* tmpSolutionVec)
@@ -362,7 +314,7 @@
 // Reform system Jacobian.
 void
 pylith::problems::Formulation::reformJacobianLumped(void)
-{ // reformJacobian
+{ // reformJacobianLumped
   assert(0 != _jacobianLumped);
   assert(0 != _fields);
 
@@ -380,19 +332,28 @@
   // Assemble jacbian.
   _jacobianLumped->complete();
 
-} // reformJacobian
+} // reformJacobianLumped
 
 // ----------------------------------------------------------------------
 // Constrain solution space.
 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
 
@@ -408,9 +369,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/branches/pylith-scecdynrup/libsrc/pylith/problems/Formulation.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/Formulation.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/Formulation.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -165,14 +165,6 @@
   void reformResidual(const PetscVec* tmpResidualVec =0,
 		      const PetscVec* tmpSolutionVec =0);
   
-  /** Reform system residual.
-   *
-   * @param tmpResidualVec Temporary PETSc vector for residual.
-   * @param tmpSolutionVec Temporary PETSc vector for solution.
-   */
-  void reformResidualLumped(const PetscVec* tmpResidualVec =0,
-          const PetscVec* tmpSolutionVec =0);
-
   /* Reform system Jacobian.
    *
    * @param tmpSolveSolnVec Temporary PETSc vector for solution.

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/Implicit.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/Implicit.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/Implicit.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -36,7 +36,6 @@
 // Destructor
 pylith::problems::Implicit::~Implicit(void)
 { // destructor
-  deallocate();
 } // destructor
 
 // ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/SolverLinear.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/SolverLinear.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/SolverLinear.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -108,6 +108,7 @@
   _logger->eventEnd(scatterEvent);
   _logger->eventBegin(setupEvent);
 
+
   PetscErrorCode err = 0;
   const PetscMat jacobianMat = jacobian->matrix();
   if (!jacobian->valuesChanged()) {
@@ -119,38 +120,6 @@
   } // else
   jacobian->resetValuesChanged();
 
-  // Update KSP operators with custom preconditioner if necessary.
-  const ALE::Obj<RealSection>& solutionSection = solution->section();
-  assert(!solutionSection.isNull());
-  const ALE::Obj<SieveMesh>& sieveMesh = solution->mesh().sieveMesh();
-  assert(!sieveMesh.isNull());
-
-#if 0 // OBSOLETE? Replaced by stuff in Solver?
-  if (solutionSection->getNumSpaces() > sieveMesh->getDimension() &&
-      _jacobianPCFault) {
-    
-    PetscPC pc = 0;
-    PCCompositeType ctype;
-    
-    err = KSPSetUp(_ksp); CHECK_PETSC_ERROR(err);
-    err = KSPGetPC(_ksp, &pc); CHECK_PETSC_ERROR(err);
-    err = PCFieldSplitGetType(pc, &ctype); CHECK_PETSC_ERROR(err);
-    if (ctype != PC_COMPOSITE_SCHUR) {
-      PetscKSP    *ksps = 0;
-      PylithInt    num  = 0;
-      PetscMat     A    = 0;
-      MatStructure flag;
-
-      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
-
-
   const PetscVec residualVec = residual.vector();
   const PetscVec solutionVec = solution->vector();
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/SolverNonlinear.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/SolverNonlinear.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/problems/SolverNonlinear.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -36,18 +36,12 @@
 #define isinf std::isinf // TEMPORARY
 
 // Customized line search based on PETSc code in
-// src/snes/linesearch/bt/linesearchbt.c.
+// src/snes/linesearch/impls/bt/linesearchbt.c.
 #include <petsc-private/snesimpl.h>
 #include <petsc-private/linesearchimpl.h>
 
-typedef enum {
-  SNES_LINESEARCH_BT_QUADRATIC, 
-  SNES_LINESEARCH_BT_CUBIC,
-} PetscSNESLineSearchBTOrder;
-
 struct PetscSNESLineSearch_BT {
   PetscReal        alpha; /* sufficient decrease parameter */
-  PetscSNESLineSearchBTOrder order;
 };
 
 #define PYLITH_CUSTOM_LINESEARCH 1
@@ -109,13 +103,16 @@
   err = SNESSetJacobian(_snes, jacobian.matrix(), _jacobianPC, reformJacobian, (void*) formulation);
   CHECK_PETSC_ERROR(err);
 
-  err = SNESSetFromOptions(_snes); CHECK_PETSC_ERROR(err);
-  err = SNESSetComputeInitialGuess(_snes, initialGuess, (void*) formulation); CHECK_PETSC_ERROR(err);
+  // Set default line search type to SNESSHELL and use our custom line search
   PetscSNESLineSearch ls;
+  err = SNESGetSNESLineSearch(_snes, &ls);CHECK_PETSC_ERROR(err);
+  err = SNESLineSearchSetType(ls, SNESSHELL);CHECK_PETSC_ERROR(err);
+  err = SNESLineSearchSetOrder(ls, SNES_LINESEARCH_ORDER_CUBIC);CHECK_PETSC_ERROR(err);
+  err = SNESLineSearchShellSetUserFunc(ls, lineSearch, (void*) formulation);CHECK_PETSC_ERROR(err);
 
-  err = SNESGetSNESLineSearch(_snes, &ls); CHECK_PETSC_ERROR(err);
-  err = SNESLineSearchSetType(ls, SNESSHELL); CHECK_PETSC_ERROR(err);
-  err = SNESLineSearchShellSetUserFunc(ls, lineSearch, (void*) formulation); CHECK_PETSC_ERROR(err);
+  // Get SNES options and allow the user to override the line search type
+  err = SNESSetFromOptions(_snes);CHECK_PETSC_ERROR(err);
+  err = SNESSetComputeInitialGuess(_snes, initialGuess, (void*) formulation);CHECK_PETSC_ERROR(err);
 
   if (formulation->splitFields()) {
     PetscKSP ksp = 0;
@@ -170,7 +167,7 @@
   Formulation* formulation = (Formulation*) context;
   assert(0 != formulation);
 
-  // Make sure we have an admissible Lagrange force (\lambda)
+  // Make sure we have an admissible Lagrange multiplier (\lambda)
   formulation->constrainSolnSpace(&tmpSolutionVec);
 
   // Reform residual
@@ -219,8 +216,8 @@
   Vec            X, F, Y, W, G;
   SNES           snes;
   PetscReal      fnorm, xnorm, ynorm, gnorm, gnormprev;
-  PetscReal      lambda, lambdatemp, lambdaprev, minlambda, maxstep, rellength, initslope, alpha;
-  PetscReal      t1, t2, a, b, d, steptol;
+  PetscReal      lambda, lambdatemp, lambdaprev, minlambda, maxstep, initslope, alpha, stol;
+  PetscReal      t1, t2, a, b, d;
 #if defined(PETSC_USE_COMPLEX)
   PetscScalar    cinitslope;
 #endif
@@ -238,7 +235,8 @@
   ierr = SNESLineSearchGetLambda(linesearch, &lambda);CHKERRQ(ierr);
   ierr = SNESLineSearchGetSNES(linesearch, &snes);CHKERRQ(ierr);
   ierr = SNESLineSearchGetMonitor(linesearch, &monitor);CHKERRQ(ierr);
-  ierr = SNESLineSearchGetTolerances(linesearch, &steptol, &maxstep, PETSC_NULL, PETSC_NULL, PETSC_NULL, &max_its);
+  ierr = SNESLineSearchGetTolerances(linesearch, &minlambda, &maxstep, PETSC_NULL, PETSC_NULL, PETSC_NULL, &max_its);CHKERRQ(ierr);
+  ierr = SNESGetTolerances(snes, PETSC_NULL, PETSC_NULL, &stol, PETSC_NULL, PETSC_NULL);CHKERRQ(ierr);
   bt = (PetscSNESLineSearch_BT *)linesearch->data;
 
   alpha = bt->alpha;
@@ -251,7 +249,11 @@
   ierr = SNESLineSearchPreCheck(linesearch,X,Y,&changed_y);CHKERRQ(ierr);
   ierr = SNESLineSearchSetSuccess(linesearch, PETSC_TRUE);CHKERRQ(ierr);
 
-  ierr = VecNorm(Y, NORM_2, &ynorm);CHKERRQ(ierr);
+  ierr = VecNormBegin(Y, NORM_2, &ynorm);CHKERRQ(ierr);
+  ierr = VecNormBegin(X, NORM_2, &xnorm);CHKERRQ(ierr);
+  ierr = VecNormEnd(Y, NORM_2, &ynorm);CHKERRQ(ierr);
+  ierr = VecNormEnd(X, NORM_2, &xnorm);CHKERRQ(ierr);
+
   if (ynorm == 0.0) {
     if (monitor) {
       ierr = PetscViewerASCIIAddTab(monitor,((PetscObject)linesearch)->tablevel);CHKERRQ(ierr);
@@ -272,15 +274,7 @@
     ierr = VecScale(Y,maxstep/(ynorm));CHKERRQ(ierr);
     ynorm = maxstep;
   }
-  ierr      = VecMaxPointwiseDivide(Y,X,&rellength);CHKERRQ(ierr);
 
-#if defined(PYLITH_CUSTOM_LINESEARCH)
-  // Place reasonable absolute limit on minimum lambda
-  minlambda = std::max(steptol/rellength, 1.0/PYLITH_MAXSCALAR);
-#else // ORIGINAL
-  minlambda = steptol/rellength;
-#endif
-
   ierr      = MatMult(jac,Y,W);CHKERRQ(ierr);
 #if defined(PETSC_USE_COMPLEX)
   ierr      = VecDot(F,W,&cinitslope);CHKERRQ(ierr);
@@ -316,13 +310,19 @@
 
   if (PetscIsInfOrNanReal(gnorm)) SETERRQ(PETSC_COMM_SELF,PETSC_ERR_FP,"User provided compute function generated a Not-a-Number");
   ierr = PetscInfo2(snes,"Initial fnorm %14.12e gnorm %14.12e\n", fnorm, gnorm);CHKERRQ(ierr);
-  if (.5*gnorm*gnorm <= .5*fnorm*fnorm + lambda*alpha*initslope) { /* Sufficient reduction */
+  if (.5*gnorm*gnorm <= .5*fnorm*fnorm + lambda*alpha*initslope) { /* Sufficient reduction or step tolerance convergence */
     if (monitor) {
       ierr = PetscViewerASCIIAddTab(monitor,((PetscObject)linesearch)->tablevel);CHKERRQ(ierr);
       ierr = PetscViewerASCIIPrintf(monitor,"    Line search: Using full step: fnorm %14.12e gnorm %14.12e\n", fnorm, gnorm);CHKERRQ(ierr);
       ierr = PetscViewerASCIISubtractTab(monitor,((PetscObject)linesearch)->tablevel);CHKERRQ(ierr);
     }
   } else {
+    /* Since the full step didn't work and the step is tiny, quit */
+    if (stol*xnorm > ynorm) {
+      ierr = SNESLineSearchSetSuccess(linesearch, PETSC_FALSE);CHKERRQ(ierr);
+      ierr = PetscInfo2(monitor, "Aborted due to ynorm < stol*xnorm (%14.12e < %14.12e) and inadequate full step.\n",ynorm,stol*xnorm);CHKERRQ(ierr);
+      PetscFunctionReturn(0);
+    }
     /* Fit points with quadratic */
     lambdatemp = -initslope/(gnorm*gnorm - fnorm*fnorm - 2.0*lambda*initslope);
     lambdaprev = lambda;
@@ -391,7 +391,7 @@
           PetscFunctionReturn(0);
 #endif
         }
-        if (bt->order == SNES_LINESEARCH_BT_CUBIC) {
+        if (linesearch->order == SNES_LINESEARCH_ORDER_CUBIC) {
           t1 = .5*(gnorm*gnorm - fnorm*fnorm) - lambda*initslope;
           t2 = .5*(gnormprev*gnormprev  - fnorm*fnorm) - lambdaprev*initslope;
           a  = (t1/(lambda*lambda) - t2/(lambdaprev*lambdaprev))/(lambda-lambdaprev);
@@ -403,8 +403,10 @@
           } else {
             lambdatemp = (-b + PetscSqrtReal(d))/(3.0*a);
           }
-        } else if (bt->order == SNES_LINESEARCH_BT_QUADRATIC) {
+        } else if (linesearch->order == SNES_LINESEARCH_ORDER_QUADRATIC) {
           lambdatemp = -initslope/(gnorm*gnorm - fnorm*fnorm - 2.0*initslope);
+	} else {
+	  SETERRQ(((PetscObject) linesearch)->comm, PETSC_ERR_SUP, "unsupported line search order for type bt");
         }
           lambdaprev = lambda;
           gnormprev  = gnorm;
@@ -412,6 +414,9 @@
         if (lambdatemp <= .1*lambda) lambda     = .1*lambda;
         else                         lambda     = lambdatemp;
         ierr  = VecWAXPY(W,-lambda,Y,X);CHKERRQ(ierr);
+        if (linesearch->ops->viproject) {
+          ierr = (*linesearch->ops->viproject)(snes,W);CHKERRQ(ierr);
+        }
         if (snes->nfuncs >= snes->max_funcs) {
           ierr = PetscInfo1(snes,"Exceeded maximum function evaluations, while looking for good step length! %D \n",count);CHKERRQ(ierr);
           ierr = PetscInfo5(snes,"fnorm=%18.16e, gnorm=%18.16e, ynorm=%18.16e, lambda=%18.16e, initial slope=%18.16e\n",
@@ -436,10 +441,10 @@
         if (.5*gnorm*gnorm < .5*fnorm*fnorm + lambda*alpha*initslope) { /* is reduction enough? */
           if (monitor) {
             ierr = PetscViewerASCIIAddTab(monitor,((PetscObject)linesearch)->tablevel);CHKERRQ(ierr);
-            if (bt->order == SNES_LINESEARCH_BT_CUBIC) {
-              ierr = PetscViewerASCIIPrintf(monitor,"    Line search: Cubically determined step, current gnorm %14.12e lambda=%18.16e\n",gnorm,lambda);CHKERRQ(ierr);
+            if (linesearch->order == SNES_LINESEARCH_ORDER_CUBIC) {
+              ierr = PetscViewerASCIIPrintf(monitor,"    Line search: Cubically determined step, current gnorm %14.12e lambda=%18.16e\n",(double)gnorm,(double)lambda);CHKERRQ(ierr);
             } else {
-              ierr = PetscViewerASCIIPrintf(monitor,"    Line search: Quadratically determined step, current gnorm %14.12e lambda=%18.16e\n",gnorm,lambda);CHKERRQ(ierr);
+              ierr = PetscViewerASCIIPrintf(monitor,"    Line search: Quadratically determined step, current gnorm %14.12e lambda=%18.16e\n",(double)gnorm,(double)lambda);CHKERRQ(ierr);
             }
             ierr = PetscViewerASCIISubtractTab(monitor,((PetscObject)linesearch)->tablevel);CHKERRQ(ierr);
           }
@@ -447,10 +452,10 @@
         } else {
           if (monitor) {
             ierr = PetscViewerASCIIAddTab(monitor,((PetscObject)linesearch)->tablevel);CHKERRQ(ierr);
-            if (bt->order == SNES_LINESEARCH_BT_CUBIC) {
-              ierr = PetscViewerASCIIPrintf(monitor,"    Line search: Cubic step no good, shrinking lambda, current gnorm %12.12e lambda=%18.16e\n",gnorm,lambda);CHKERRQ(ierr);
+            if (linesearch->order == SNES_LINESEARCH_ORDER_CUBIC) {
+              ierr = PetscViewerASCIIPrintf(monitor,"    Line search: Cubic step no good, shrinking lambda, current gnorm %12.12e lambda=%18.16e\n",(double)gnorm,(double)lambda);CHKERRQ(ierr);
             } else {
-              ierr = PetscViewerASCIIPrintf(monitor,"    Line search: Quadratic step no good, shrinking lambda, current gnorm %12.12e lambda=%18.16e\n",gnorm,lambda);CHKERRQ(ierr);
+              ierr = PetscViewerASCIIPrintf(monitor,"    Line search: Quadratic step no good, shrinking lambda, current gnorm %12.12e lambda=%18.16e\n",(double)gnorm,(double)lambda);CHKERRQ(ierr);
             }
             ierr = PetscViewerASCIISubtractTab(monitor,((PetscObject)linesearch)->tablevel);CHKERRQ(ierr);
           }

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/topology/RefineUniform.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/topology/RefineUniform.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/topology/RefineUniform.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -45,9 +45,17 @@
 // Destructor
 pylith::topology::RefineUniform::~RefineUniform(void)
 { // destructor
+  deallocate();
 } // destructor
 
 // ----------------------------------------------------------------------
+// Deallocate data structures.
+void
+pylith::topology::RefineUniform::deallocate(void)
+{ // deallocate
+} // deallocate
+
+// ----------------------------------------------------------------------
 // Refine mesh.
 void
 pylith::topology::RefineUniform::refine(Mesh* const newMesh,

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/topology/RefineUniform.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/topology/RefineUniform.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/topology/RefineUniform.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -43,6 +43,9 @@
   /// Destructor
   ~RefineUniform(void);
 
+  /// Deallocate data structures.
+  void deallocate(void);
+
   /** Refine mesh.
    *
    * @param newMesh Refined mesh (result).

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/utils/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/utils/Makefile.am	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/utils/Makefile.am	2012-11-01 17:04:11 UTC (rev 20976)
@@ -32,6 +32,7 @@
 	petscerror.h \
 	sievefwd.hh \
 	sievetypes.hh \
+        types.hh \
 	utilsfwd.hh
 
 noinst_HEADERS = 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/utils/constdefs.h
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/utils/constdefs.h	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/libsrc/pylith/utils/constdefs.h	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/modulesrc/feassemble/ElasticityExplicit.i
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/feassemble/ElasticityExplicit.i	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/feassemble/ElasticityExplicit.i	2012-11-01 17:04:11 UTC (rev 20976)
@@ -45,6 +45,15 @@
        */
       void timeStep(const PylithScalar dt);
       
+      /** Get stable time step for advancing from time t to time t+dt.
+       *
+       * Default is current time step.
+       *
+       * @param mesh Finite-element mesh.
+       * @returns Time step
+       */
+      PylithScalar stableTimeStep(const pylith::topology::Mesh& mesh) const;
+
       /** Set normalized viscosity for numerical damping.
        *
        * @param viscosity Nondimensional viscosity.
@@ -68,27 +77,6 @@
 			     const PylithScalar t,
 			     pylith::topology::SolutionFields* const fields);
       
-      /** Integrate contributions to residual term (r) for operator.
-       *
-       * @param residual Field containing values for residual
-       * @param t Current time
-       * @param fields Solution fields
-       */
-      void integrateResidualLumped(const pylith::topology::Field<pylith::topology::Mesh>& residual,
-				   const PylithScalar t,
-				   pylith::topology::SolutionFields* const fields);
-
-      /** Integrate contributions to Jacobian matrix (A) associated with
-       * operator.
-       *
-       * @param jacobian Sparse matrix for Jacobian of system.
-       * @param t Current time
-       * @param fields Solution fields
-       */
-      void integrateJacobian(pylith::topology::Jacobian* jacobian,
-			     const PylithScalar t,
-			     pylith::topology::SolutionFields* const fields);
-
       /** Integrate contributions to Jacobian matrix (A) associated
        * with operator that require assembly across cells, vertices,
        * or processors.
@@ -101,6 +89,15 @@
 			     const PylithScalar t,
 			     pylith::topology::SolutionFields* const fields);
 
+      // NOT IMPLEMENTED //////////////////////////////////////////////////
+    private :
+
+      /// Not implemented.
+      void integrateJacobian(topology::Jacobian*,
+			     const PylithScalar,
+			     topology::SolutionFields* const);
+
+
     }; // ElasticityExplicit
 
   } // feassemble

Modified: short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/feassemble/ElasticityExplicitLgDeform.i
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/feassemble/ElasticityExplicitLgDeform.i	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/feassemble/ElasticityExplicitLgDeform.i	2012-11-01 17:04:11 UTC (rev 20976)
@@ -68,27 +68,6 @@
 			     const PylithScalar t,
 			     pylith::topology::SolutionFields* const fields);
 
-      /** Integrate contributions to residual term (r) for operator.
-       *
-       * @param residual Field containing values for residual
-       * @param t Current time
-       * @param fields Solution fields
-       */
-      void integrateResidualLumped(const pylith::topology::Field<pylith::topology::Mesh>& residual,
-				   const PylithScalar t,
-				   pylith::topology::SolutionFields* const fields);
-
-      /** Integrate contributions to Jacobian matrix (A) associated with
-       * operator.
-       *
-       * @param jacobian Sparse matrix for Jacobian of system.
-       * @param t Current time
-       * @param fields Solution fields
-       */
-      void integrateJacobian(pylith::topology::Jacobian* jacobian,
-			     const PylithScalar t,
-			     pylith::topology::SolutionFields* const fields);
-
       /** Integrate contributions to Jacobian matrix (A) associated
        * with operator that require assembly across cells, vertices,
        * or processors.
@@ -101,6 +80,15 @@
 			     const PylithScalar t,
 			     pylith::topology::SolutionFields* const fields);
 
+      // NOT IMPLEMENTED //////////////////////////////////////////////////
+    private :
+
+      /// Not implemented.
+      void integrateJacobian(topology::Jacobian*,
+			     const PylithScalar,
+			     topology::SolutionFields* const);
+
+
     }; // ElasticityExplicitLgDeform
 
   } // feassemble

Modified: short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/feassemble/ElasticityExplicitTet4.i
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/feassemble/ElasticityExplicitTet4.i	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/feassemble/ElasticityExplicitTet4.i	2012-11-01 17:04:11 UTC (rev 20976)
@@ -45,6 +45,15 @@
        */
       void timeStep(const PylithScalar dt);
       
+      /** Get stable time step for advancing from time t to time t+dt.
+       *
+       * Default is current time step.
+       *
+       * @param mesh Finite-element mesh.
+       * @returns Time step
+       */
+      PylithScalar stableTimeStep(const pylith::topology::Mesh& mesh) const;
+
       /** Set normalized viscosity for numerical damping.
        *
        * @param viscosity Nondimensional viscosity.
@@ -68,27 +77,6 @@
 			     const PylithScalar t,
 			     pylith::topology::SolutionFields* const fields);
       
-      /** Integrate contributions to residual term (r) for operator.
-       *
-       * @param residual Field containing values for residual
-       * @param t Current time
-       * @param fields Solution fields
-       */
-      void integrateResidualLumped(const pylith::topology::Field<pylith::topology::Mesh>& residual,
-				   const PylithScalar t,
-				   pylith::topology::SolutionFields* const fields);
-
-      /** Integrate contributions to Jacobian matrix (A) associated with
-       * operator.
-       *
-       * @param jacobian Sparse matrix for Jacobian of system.
-       * @param t Current time
-       * @param fields Solution fields
-       */
-      void integrateJacobian(pylith::topology::Jacobian* jacobian,
-			     const PylithScalar t,
-			     pylith::topology::SolutionFields* const fields);
-
       /** Integrate contributions to Jacobian matrix (A) associated
        * with operator that require assembly across cells, vertices,
        * or processors.
@@ -101,6 +89,21 @@
 			     const PylithScalar t,
 			     pylith::topology::SolutionFields* const fields);
 
+      /** Verify configuration is acceptable.
+       *
+       * @param mesh Finite-element mesh
+       */
+      void verifyConfiguration(const pylith::topology::Mesh& mesh) const;
+      
+      // NOT IMPLEMENTED //////////////////////////////////////////////////
+    private :
+
+      /// Not implemented.
+      void integrateJacobian(topology::Jacobian*,
+			     const PylithScalar,
+			     topology::SolutionFields* const);
+
+
     }; // ElasticityExplicitTet4
 
   } // feassemble

Modified: short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/feassemble/ElasticityExplicitTri3.i
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/feassemble/ElasticityExplicitTri3.i	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/feassemble/ElasticityExplicitTri3.i	2012-11-01 17:04:11 UTC (rev 20976)
@@ -45,6 +45,15 @@
        */
       void timeStep(const PylithScalar dt);
       
+      /** Get stable time step for advancing from time t to time t+dt.
+       *
+       * Default is current time step.
+       *
+       * @param mesh Finite-element mesh.
+       * @returns Time step
+       */
+      PylithScalar stableTimeStep(const pylith::topology::Mesh& mesh) const;
+
       /** Set normalized viscosity for numerical damping.
        *
        * @param viscosity Nondimensional viscosity.
@@ -68,27 +77,6 @@
 			     const PylithScalar t,
 			     pylith::topology::SolutionFields* const fields);
       
-      /** Integrate contributions to residual term (r) for operator.
-       *
-       * @param residual Field containing values for residual
-       * @param t Current time
-       * @param fields Solution fields
-       */
-      void integrateResidualLumped(const pylith::topology::Field<pylith::topology::Mesh>& residual,
-				   const PylithScalar t,
-				   pylith::topology::SolutionFields* const fields);
-
-      /** Integrate contributions to Jacobian matrix (A) associated with
-       * operator.
-       *
-       * @param jacobian Sparse matrix for Jacobian of system.
-       * @param t Current time
-       * @param fields Solution fields
-       */
-      void integrateJacobian(pylith::topology::Jacobian* jacobian,
-			     const PylithScalar t,
-			     pylith::topology::SolutionFields* const fields);
-
       /** Integrate contributions to Jacobian matrix (A) associated
        * with operator that require assembly across cells, vertices,
        * or processors.
@@ -101,6 +89,21 @@
 			     const PylithScalar t,
 			     pylith::topology::SolutionFields* const fields);
 
+      /** Verify configuration is acceptable.
+       *
+       * @param mesh Finite-element mesh
+       */
+      void verifyConfiguration(const pylith::topology::Mesh& mesh) const;
+      
+      // NOT IMPLEMENTED //////////////////////////////////////////////////
+    private :
+
+      /// Not implemented.
+      void integrateJacobian(topology::Jacobian*,
+			     const PylithScalar,
+			     topology::SolutionFields* const);
+
+
     }; // ElasticityExplicitTri3
 
   } // feassemble

Modified: short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/feassemble/IntegratorElasticity.i
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/feassemble/IntegratorElasticity.i	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/feassemble/IntegratorElasticity.i	2012-11-01 17:04:11 UTC (rev 20976)
@@ -82,6 +82,7 @@
        *
        * @param mesh Finite-element mesh
        */
+      virtual
       void verifyConfiguration(const pylith::topology::Mesh& mesh) const;
       
       /** Get cell field associated with integrator.

Modified: short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/friction/RateStateAgeing.i
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/friction/RateStateAgeing.i	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/friction/RateStateAgeing.i	2012-11-01 17:04:11 UTC (rev 20976)
@@ -36,12 +36,12 @@
       /// Destructor.
       ~RateStateAgeing(void);
 
-      /** Set floor for slip rate used in computing friction. Used to
-       *  avoid zero friction at zero slip rate.
+      /** Set nondimensional slip rate below which friction varies
+       *  linearly with slip rate.
        *
-       * @param value Floor for slip rate.
+       * @param value Nondimensional slip rate.
        */
-      void minSlipRate(const PylithScalar value);
+      void linearSlipRate(const PylithScalar value);
 
       // PROTECTED METHODS //////////////////////////////////////////////
     protected :

Modified: short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/DruckerPrager3D.i
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/DruckerPrager3D.i	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/DruckerPrager3D.i	2012-11-01 17:04:11 UTC (rev 20976)
@@ -213,6 +213,22 @@
 				     const PylithScalar* stateVars,
 				     const int numStateVars) const;
       
+      /** Get stable time step for explicit time integration.
+       *
+       * @param properties Properties at location.
+       * @param numProperties Number of properties.
+       * @param stateVars State variables at location.
+       * @param numStateVars Number of state variables.
+       * @param minCellWidth Minimum width across cell.
+       *
+       * @returns Time step
+       */
+      PylithScalar _stableTimeStepExplicit(const PylithScalar* properties,
+					   const int numProperties,
+					   const PylithScalar* stateVars,
+					   const int numStateVars,
+					   const double minCellWidth) const;
+  
       /** Update state variables (for next time step).
        *
        * @param stateVars State variables at location.

Modified: short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/DruckerPragerPlaneStrain.i
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/DruckerPragerPlaneStrain.i	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/DruckerPragerPlaneStrain.i	2012-11-01 17:04:11 UTC (rev 20976)
@@ -213,6 +213,22 @@
 				     const PylithScalar* stateVars,
 				     const int numStateVars) const;
       
+      /** Get stable time step for explicit time integration.
+       *
+       * @param properties Properties at location.
+       * @param numProperties Number of properties.
+       * @param stateVars State variables at location.
+       * @param numStateVars Number of state variables.
+       * @param minCellWidth Minimum width across cell.
+       *
+       * @returns Time step
+       */
+      PylithScalar _stableTimeStepExplicit(const PylithScalar* properties,
+					   const int numProperties,
+					   const PylithScalar* stateVars,
+					   const int numStateVars,
+					   const double minCellWidth) const;
+  
       /** Update state variables (for next time step).
        *
        * @param stateVars State variables at location.

Modified: short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/ElasticIsotropic3D.i
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/ElasticIsotropic3D.i	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/ElasticIsotropic3D.i	2012-11-01 17:04:11 UTC (rev 20976)
@@ -165,6 +165,22 @@
 				     const PylithScalar* stateVars,
 				     const int numStateVars) const;
 
+      /** Get stable time step for explicit time integration.
+       *
+       * @param properties Properties at location.
+       * @param numProperties Number of properties.
+       * @param stateVars State variables at location.
+       * @param numStateVars Number of state variables.
+       * @param minCellWidth Minimum width across cell.
+       *
+       * @returns Time step
+       */
+      PylithScalar _stableTimeStepExplicit(const PylithScalar* properties,
+					   const int numProperties,
+					   const PylithScalar* stateVars,
+					   const int numStateVars,
+					   const double minCellWidth) const;
+  
     }; // class ElasticIsotropic3D
 
   } // materials

Modified: short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/ElasticMaterial.i
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/ElasticMaterial.i	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/ElasticMaterial.i	2012-11-01 17:04:11 UTC (rev 20976)
@@ -71,9 +71,6 @@
 
       /** Get stable time step for implicit time integration.
        *
-       * @pre Must call retrievePropsAndVars for cell before calling
-       * stableTimeStep().
-       *
        * Default is MAXFLOAT (or 1.0e+30 if MAXFLOAT is not defined in math.h).
        *
        * @returns Time step
@@ -81,6 +78,18 @@
       virtual
       PylithScalar stableTimeStepImplicit(const pylith::topology::Mesh& mesh);
 
+      /** Get stable time step for explicit time integration.
+       *
+       * Default is MAXFLOAT (or 1.0e+30 if MAXFLOAT is not defined in math.h).
+       *
+       * @param mesh Finite-element mesh.
+       * @param quadrature Quadrature for finite-element integration
+       * @returns Time step
+       */
+      virtual
+      PylithScalar stableTimeStepExplicit(const pylith::topology::Mesh& mesh,
+					  pylith::feassemble::Quadrature<pylith::topology::Mesh>* quadrature);
+      
       /** Set whether elastic or inelastic constitutive relations are used.
        *
        * @param flag True to use elastic, false to use inelastic.
@@ -190,6 +199,23 @@
 				     const PylithScalar* stateVars,
 				     const int numStateVars) const = 0;
       
+      /** Get stable time step for explicit time integration.
+       *
+       * @param properties Properties at location.
+       * @param numProperties Number of properties.
+       * @param stateVars State variables at location.
+       * @param numStateVars Number of state variables.
+       * @param minCellWidth Minimum width across cell.
+       *
+       * @returns Time step
+       */
+      virtual
+      PylithScalar _stableTimeStepExplicit(const PylithScalar* properties,
+					   const int numProperties,
+					   const PylithScalar* stateVars,
+					   const int numStateVars,
+					   const double minCellWidth) const = 0;
+  
     }; // class ElasticMaterial
 
   } // materials

Modified: short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/ElasticPlaneStrain.i
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/ElasticPlaneStrain.i	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/ElasticPlaneStrain.i	2012-11-01 17:04:11 UTC (rev 20976)
@@ -165,6 +165,22 @@
 				     const PylithScalar* stateVars,
 				     const int numStateVars) const;
 
+      /** Get stable time step for explicit time integration.
+       *
+       * @param properties Properties at location.
+       * @param numProperties Number of properties.
+       * @param stateVars State variables at location.
+       * @param numStateVars Number of state variables.
+       * @param minCellWidth Minimum width across cell.
+       *
+       * @returns Time step
+       */
+      PylithScalar _stableTimeStepExplicit(const PylithScalar* properties,
+					   const int numProperties,
+					   const PylithScalar* stateVars,
+					   const int numStateVars,
+					   const double minCellWidth) const;
+  
     }; // class ElasticPlaneStrain
 
   } // materials

Modified: short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/ElasticPlaneStress.i
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/ElasticPlaneStress.i	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/ElasticPlaneStress.i	2012-11-01 17:04:11 UTC (rev 20976)
@@ -165,6 +165,22 @@
 				     const PylithScalar* stateVars,
 				     const int numStateVars) const;
 
+      /** Get stable time step for explicit time integration.
+       *
+       * @param properties Properties at location.
+       * @param numProperties Number of properties.
+       * @param stateVars State variables at location.
+       * @param numStateVars Number of state variables.
+       * @param minCellWidth Minimum width across cell.
+       *
+       * @returns Time step
+       */
+      PylithScalar _stableTimeStepExplicit(const PylithScalar* properties,
+					   const int numProperties,
+					   const PylithScalar* stateVars,
+					   const int numStateVars,
+					   const double minCellWidth) const;
+  
     }; // class ElasticPlaneStress
 
   } // materials

Modified: short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/ElasticStrain1D.i
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/ElasticStrain1D.i	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/ElasticStrain1D.i	2012-11-01 17:04:11 UTC (rev 20976)
@@ -165,6 +165,22 @@
 				     const PylithScalar* stateVars,
 				     const int numStateVars) const;
 
+      /** Get stable time step for explicit time integration.
+       *
+       * @param properties Properties at location.
+       * @param numProperties Number of properties.
+       * @param stateVars State variables at location.
+       * @param numStateVars Number of state variables.
+       * @param minCellWidth Minimum width across cell.
+       *
+       * @returns Time step
+       */
+      PylithScalar _stableTimeStepExplicit(const PylithScalar* properties,
+					   const int numProperties,
+					   const PylithScalar* stateVars,
+					   const int numStateVars,
+					   const double minCellWidth) const;
+  
     }; // class ElasticStrain1D
 
   } // materials

Modified: short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/ElasticStress1D.i
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/ElasticStress1D.i	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/ElasticStress1D.i	2012-11-01 17:04:11 UTC (rev 20976)
@@ -165,6 +165,22 @@
 				     const PylithScalar* stateVars,
 				     const int numStateVars) const;
 
+      /** Get stable time step for explicit time integration.
+       *
+       * @param properties Properties at location.
+       * @param numProperties Number of properties.
+       * @param stateVars State variables at location.
+       * @param numStateVars Number of state variables.
+       * @param minCellWidth Minimum width across cell.
+       *
+       * @returns Time step
+       */
+      PylithScalar _stableTimeStepExplicit(const PylithScalar* properties,
+					   const int numProperties,
+					   const PylithScalar* stateVars,
+					   const int numStateVars,
+					   const double minCellWidth) const;
+  
     }; // class ElasticStress1D
 
   } // materials

Modified: short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/GenMaxwellIsotropic3D.i
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/GenMaxwellIsotropic3D.i	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/GenMaxwellIsotropic3D.i	2012-11-01 17:04:11 UTC (rev 20976)
@@ -200,6 +200,22 @@
 				     const PylithScalar* stateVars,
 				     const int numStateVars) const;
 
+      /** Get stable time step for explicit time integration.
+       *
+       * @param properties Properties at location.
+       * @param numProperties Number of properties.
+       * @param stateVars State variables at location.
+       * @param numStateVars Number of state variables.
+       * @param minCellWidth Minimum width across cell.
+       *
+       * @returns Time step
+       */
+      PylithScalar _stableTimeStepExplicit(const PylithScalar* properties,
+					   const int numProperties,
+					   const PylithScalar* stateVars,
+					   const int numStateVars,
+					   const double minCellWidth) const;
+  
     }; // class GenMaxwellIsotropic3D
 
   } // materials

Modified: short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/GenMaxwellPlaneStrain.i
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/GenMaxwellPlaneStrain.i	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/GenMaxwellPlaneStrain.i	2012-11-01 17:04:11 UTC (rev 20976)
@@ -200,6 +200,22 @@
 				     const PylithScalar* stateVars,
 				     const int numStateVars) const;
 
+      /** Get stable time step for explicit time integration.
+       *
+       * @param properties Properties at location.
+       * @param numProperties Number of properties.
+       * @param stateVars State variables at location.
+       * @param numStateVars Number of state variables.
+       * @param minCellWidth Minimum width across cell.
+       *
+       * @returns Time step
+       */
+      PylithScalar _stableTimeStepExplicit(const PylithScalar* properties,
+					   const int numProperties,
+					   const PylithScalar* stateVars,
+					   const int numStateVars,
+					   const double minCellWidth) const;
+  
     }; // class GenMaxwellPlaneStrain
 
   } // materials

Modified: short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/GenMaxwellQpQsIsotropic3D.i
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/GenMaxwellQpQsIsotropic3D.i	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/GenMaxwellQpQsIsotropic3D.i	2012-11-01 17:04:11 UTC (rev 20976)
@@ -200,6 +200,22 @@
 				     const PylithScalar* stateVars,
 				     const int numStateVars) const;
 
+      /** Get stable time step for explicit time integration.
+       *
+       * @param properties Properties at location.
+       * @param numProperties Number of properties.
+       * @param stateVars State variables at location.
+       * @param numStateVars Number of state variables.
+       * @param minCellWidth Minimum width across cell.
+       *
+       * @returns Time step
+       */
+      PylithScalar _stableTimeStepExplicit(const PylithScalar* properties,
+					   const int numProperties,
+					   const PylithScalar* stateVars,
+					   const int numStateVars,
+					   const double minCellWidth) const;
+  
     }; // class GenMaxwellQpQsIsotropic3D
 
   } // materials

Modified: short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/Makefile.am	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/Makefile.am	2012-11-01 17:04:11 UTC (rev 20976)
@@ -38,6 +38,7 @@
 	GenMaxwellPlaneStrain.i \
 	GenMaxwellQpQsIsotropic3D.i \
 	PowerLaw3D.i \
+	PowerLawPlaneStrain.i \
 	DruckerPrager3D.i \
 	DruckerPragerPlaneStrain.i
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/MaxwellIsotropic3D.i
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/MaxwellIsotropic3D.i	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/MaxwellIsotropic3D.i	2012-11-01 17:04:11 UTC (rev 20976)
@@ -202,6 +202,22 @@
 				     const PylithScalar* stateVars,
 				     const int numStateVars) const;
 
+      /** Get stable time step for explicit time integration.
+       *
+       * @param properties Properties at location.
+       * @param numProperties Number of properties.
+       * @param stateVars State variables at location.
+       * @param numStateVars Number of state variables.
+       * @param minCellWidth Minimum width across cell.
+       *
+       * @returns Time step
+       */
+      PylithScalar _stableTimeStepExplicit(const PylithScalar* properties,
+					   const int numProperties,
+					   const PylithScalar* stateVars,
+					   const int numStateVars,
+					   const double minCellWidth) const;
+  
     }; // class MaxwellIsotropic3D
 
   } // materials

Modified: short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/MaxwellPlaneStrain.i
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/MaxwellPlaneStrain.i	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/MaxwellPlaneStrain.i	2012-11-01 17:04:11 UTC (rev 20976)
@@ -202,6 +202,22 @@
 				     const PylithScalar* stateVars,
 				     const int numStateVars) const;
 
+      /** Get stable time step for explicit time integration.
+       *
+       * @param properties Properties at location.
+       * @param numProperties Number of properties.
+       * @param stateVars State variables at location.
+       * @param numStateVars Number of state variables.
+       * @param minCellWidth Minimum width across cell.
+       *
+       * @returns Time step
+       */
+      PylithScalar _stableTimeStepExplicit(const PylithScalar* properties,
+					   const int numProperties,
+					   const PylithScalar* stateVars,
+					   const int numStateVars,
+					   const double minCellWidth) const;
+  
     }; // class MaxwellPlaneStrain
 
   } // materials

Modified: short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/PowerLaw3D.i
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/PowerLaw3D.i	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/PowerLaw3D.i	2012-11-01 17:04:11 UTC (rev 20976)
@@ -192,6 +192,22 @@
 				     const PylithScalar* stateVars,
 				     const int numStateVars) const;
       
+      /** Get stable time step for explicit time integration.
+       *
+       * @param properties Properties at location.
+       * @param numProperties Number of properties.
+       * @param stateVars State variables at location.
+       * @param numStateVars Number of state variables.
+       * @param minCellWidth Minimum width across cell.
+       *
+       * @returns Time step
+       */
+      PylithScalar _stableTimeStepExplicit(const PylithScalar* properties,
+					   const int numProperties,
+					   const PylithScalar* stateVars,
+					   const int numStateVars,
+					   const double minCellWidth) const;
+  
       /** Update state variables (for next time step).
        *
        * @param stateVars State variables at location.

Copied: short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/PowerLawPlaneStrain.i (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/modulesrc/materials/PowerLawPlaneStrain.i)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/PowerLawPlaneStrain.i	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/PowerLawPlaneStrain.i	2012-11-01 17:04:11 UTC (rev 20976)
@@ -0,0 +1,240 @@
+// -*- 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;
+      
+      /** Get stable time step for explicit time integration.
+       *
+       * @param properties Properties at location.
+       * @param numProperties Number of properties.
+       * @param stateVars State variables at location.
+       * @param numStateVars Number of state variables.
+       * @param minCellWidth Minimum width across cell.
+       *
+       * @returns Time step
+       */
+      PylithScalar _stableTimeStepExplicit(const PylithScalar* properties,
+					   const int numProperties,
+					   const PylithScalar* stateVars,
+					   const int numStateVars,
+					   const double minCellWidth) 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/branches/pylith-scecdynrup/modulesrc/materials/materials.i
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/materials.i	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/materials/materials.i	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/modulesrc/mpi/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/mpi/Makefile.am	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/mpi/Makefile.am	2012-11-01 17:04:11 UTC (rev 20976)
@@ -26,6 +26,7 @@
 swig_sources = \
 	mpi.i \
 	mpi_comm.i \
+	mpi_reduce.i \
 	mpi_error.i
 
 swig_generated = \

Modified: short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/mpi/mpi.i
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/mpi/mpi.i	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/mpi/mpi.i	2012-11-01 17:04:11 UTC (rev 20976)
@@ -29,6 +29,7 @@
 // Interfaces
 %include "mpi_comm.i"
 %include "mpi_error.i"
+%include "mpi_reduce.i"
 
 
 // End of file

Copied: short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/mpi/mpi_reduce.i (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/modulesrc/mpi/mpi_reduce.i)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/mpi/mpi_reduce.i	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/mpi/mpi_reduce.i	2012-11-01 17:04:11 UTC (rev 20976)
@@ -0,0 +1,78 @@
+// -*- 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.
+//
+// ======================================================================
+//
+
+// ----------------------------------------------------------------------
+// MPI_SUM
+%inline %{
+  MPI_Op*
+  mpi_sum(void) {
+    return new MPI_Op(MPI_SUM);
+  } // mpi_sum
+%}
+
+
+// ----------------------------------------------------------------------
+// MPI_MIN
+%inline %{
+  MPI_Op*
+  mpi_min(void) {
+    return new MPI_Op(MPI_MIN);
+  } // mpi_min
+%}
+
+
+// ----------------------------------------------------------------------
+// MPI_AX
+%inline %{
+  MPI_Op*
+  mpi_max(void) {
+    return new MPI_Op(MPI_MAX);
+  } // mpi_max
+%}
+
+
+// ----------------------------------------------------------------------
+// allreduce_scalar_double
+%inline %{
+  double
+    allreduce_scalar_double(double value,
+			    MPI_Op* op,
+			    MPI_Comm* comm) {
+    double result = 0.0;
+    MPI_Allreduce(&value, &result, 1, MPI_DOUBLE, *op, *comm);
+    return result;
+  } // allreduce_scalar_double
+%}
+
+
+// ----------------------------------------------------------------------
+// allreduce_scalar_int
+%inline %{
+  int
+    allreduce_scalar_int(int value,
+			 MPI_Op* op,
+			 MPI_Comm* comm) {
+    int result = 0;
+    MPI_Allreduce(&value, &result, 1, MPI_INT, *op, *comm);
+    return result;
+  } // allreduce_int
+%}
+
+
+// End of file
+

Modified: short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/problems/Formulation.i
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/problems/Formulation.i	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/modulesrc/problems/Formulation.i	2012-11-01 17:04:11 UTC (rev 20976)
@@ -141,14 +141,6 @@
       void reformResidual(const PetscVec* tmpResidualVec =0,
 			  const PetscVec* tmpSolveSolnVec =0);
       
-      /** Reform system residual for case with lumped Jacobian.
-       *
-       * @param tmpResidualVec Temporary PETSc vector for residual.
-       * @param tmpSolveSolnVec Temporary PETSc vector for solution.
-       */
-      void reformResidualLumped(const PetscVec* tmpResidualVec =0,
-			  const PetscVec* tmpSolveSolnVec =0);
-      
       /* Reform system Jacobian.
        *
        * @param tmpSolveSolnVec Temporary PETSc vector for solution.
@@ -159,6 +151,12 @@
        */
       void reformJacobianLumped(void);
 
+      /** Constrain solution space.
+       *
+       * @param tmpSolutionVec Temporary PETSc vector for solution.
+       */
+      void constrainSolnSpace(const PetscVec* tmpSolutionVec);
+
       /// Compute rate fields (velocity and/or acceleration) at time t.
       virtual
       void calcRateFields(void) = 0;

Modified: short/3D/PyLith/branches/pylith-scecdynrup/playpen/euler/euler.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/playpen/euler/euler.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/playpen/euler/euler.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [euler]
 
 # Top-level info

Modified: short/3D/PyLith/branches/pylith-scecdynrup/playpen/faultfaces/test/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/playpen/faultfaces/test/pylithapp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/playpen/faultfaces/test/pylithapp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 #nodes = 4
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/playpen/postproc/fault/faultinfo.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/playpen/postproc/fault/faultinfo.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/playpen/postproc/fault/faultinfo.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [faultinfo]
 
 # Top-level info

Modified: short/3D/PyLith/branches/pylith-scecdynrup/playpen/postproc/princaxes.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/playpen/postproc/princaxes.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/playpen/postproc/princaxes.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [princaxes]
 
 # Top-level info

Modified: short/3D/PyLith/branches/pylith-scecdynrup/playpen/postproc/vtkcff.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/playpen/postproc/vtkcff.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/playpen/postproc/vtkcff.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [vtkcff]
 
 # Top-level info

Modified: short/3D/PyLith/branches/pylith-scecdynrup/playpen/postproc/vtkdiff.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/playpen/postproc/vtkdiff.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/playpen/postproc/vtkdiff.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [vtkdiff]
 
 # Top-level info

Modified: short/3D/PyLith/branches/pylith-scecdynrup/playpen/powerlaw/powerlaw_gendb.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/playpen/powerlaw/powerlaw_gendb.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/playpen/powerlaw/powerlaw_gendb.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [powerlaw_gendb]
 
 reference_value = strain_rate

Modified: short/3D/PyLith/branches/pylith-scecdynrup/playpen/quadratic/twohex27/axialdisp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/playpen/quadratic/twohex27/axialdisp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/playpen/quadratic/twohex27/axialdisp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/playpen/quadratic/twohex27/dislocation.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/playpen/quadratic/twohex27/dislocation.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/playpen/quadratic/twohex27/dislocation.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/playpen/quadratic/twohex27/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/playpen/quadratic/twohex27/pylithapp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/playpen/quadratic/twohex27/pylithapp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/playpen/quadratic/twoquad9/axialdisp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/playpen/quadratic/twoquad9/axialdisp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/playpen/quadratic/twoquad9/axialdisp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/playpen/quadratic/twoquad9/dislocation.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/playpen/quadratic/twoquad9/dislocation.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/playpen/quadratic/twoquad9/dislocation.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/playpen/quadratic/twoquad9/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/playpen/quadratic/twoquad9/pylithapp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/playpen/quadratic/twoquad9/pylithapp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/playpen/quadratic/twotet10/dislocation.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/playpen/quadratic/twotet10/dislocation.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/playpen/quadratic/twotet10/dislocation.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/playpen/quadratic/twotet10/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/playpen/quadratic/twotet10/pylithapp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/playpen/quadratic/twotet10/pylithapp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/playpen/reordering/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/playpen/reordering/pylithapp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/playpen/reordering/pylithapp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 [pylithapp]
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/playpen/savpres_ss/savpres_ss.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/playpen/savpres_ss/savpres_ss.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/playpen/savpres_ss/savpres_ss.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [savpres_ss]
 
 # Top-level info

Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/Makefile.am	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/Makefile.am	2012-11-01 17:04:11 UTC (rev 20976)
@@ -21,6 +21,7 @@
 	apps/__init__.py \
 	apps/PyLithApp.py \
 	apps/PetscApplication.py \
+	apps/EqInfoApp.py \
 	apps/PrepMeshApp.py \
 	bc/__init__.py \
 	bc/AbsorbingDampers.py \
@@ -87,6 +88,7 @@
 	materials/MaxwellIsotropic3D.py \
 	materials/MaxwellPlaneStrain.py \
 	materials/PowerLaw3D.py \
+	materials/PowerLawPlaneStrain.py \
 	materials/DruckerPrager3D.py \
 	materials/DruckerPragerPlaneStrain.py \
 	meshio/__init__.py \
@@ -135,9 +137,8 @@
 	perf/Jacobian.py \
 	problems/__init__.py \
 	problems/Explicit.py \
-	problems/ExplicitLumped.py \
-	problems/ExplicitLumpedTri3.py \
-	problems/ExplicitLumpedTet4.py \
+	problems/ExplicitTri3.py \
+	problems/ExplicitTet4.py \
 	problems/ExplicitLgDeform.py \
 	problems/Formulation.py \
 	problems/Implicit.py \

Copied: short/3D/PyLith/branches/pylith-scecdynrup/pylith/apps/EqInfoApp.py (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/pylith/apps/EqInfoApp.py)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/apps/EqInfoApp.py	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/apps/EqInfoApp.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -0,0 +1,331 @@
+#!/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/apps/PyLithApp.py
+##
+## @brief Python PyLith application
+
+from pyre.applications.Script import Script as Application
+
+import h5py
+import numpy
+import math
+import os
+
+# ======================================================================
+class RuptureStats(object):
+  """
+  Python object to hold rupture stats.
+  """
+
+  def __init__(self, nsnapshots):
+    self.fault = None
+    self.timestamp = numpy.zeros( (nsnapshots,), dtype=numpy.float64)
+    self.ruparea = numpy.zeros( (nsnapshots,), dtype=numpy.float64)
+    self.potency = numpy.zeros( (nsnapshots,), dtype=numpy.float64)
+    self.moment = numpy.zeros( (nsnapshots,), dtype=numpy.float64)
+    return
+
+  def update(self, isnapshot, timestamp, ruparea, potency, moment):
+    self.timestamp[isnapshot] = timestamp
+    self.ruparea[isnapshot] = ruparea
+    self.potency[isnapshot] = potency
+    self.moment[isnapshot] = moment
+    self.recalculate()
+    return
+
+
+  def recalculate(self):
+    self.avgslip = self.potency / (self.ruparea + 1.0e-30)
+    self.mommag = 2.0/3.0*(numpy.log10(self.moment) - 9.05)
+    return
+
+
+  def writeObj(self, fout):
+    fout.write("class RuptureStats(object):\n"
+               "    pass\n")
+    return
+
+
+  def write(self, fout):
+    fout.write("%s = RuptureStats()\n" % self.fault)
+
+    self._writeArray("timestamp", fout)
+    self._writeArray("ruparea", fout)
+    self._writeArray("potency", fout)
+    self._writeArray("moment", fout)
+    self._writeArray("avgslip", fout)
+    self._writeArray("mommag", fout)
+
+    return
+
+
+  def _writeArray(self, name, fout):
+    vals = self.__getattribute__(name)
+    for i in xrange(len(vals)):
+      if math.isnan(vals[i]) or math.isinf(vals[i]):
+        if vals[i] > 0:
+          vals[i] = 1.0e+30
+        else:
+          vals[i] = -1.0e+30
+    g = ("%14.6e" % v for v in vals)
+    astr = ", ".join(g)
+    fout.write("%s.%s = [%s]\n" % (self.fault, name, astr))
+    return
+
+
+# ======================================================================
+# EqInfoApp class
+class EqInfoApp(Application):
+  """
+  Python EqInfoApp application.
+  """
+  
+  # INVENTORY //////////////////////////////////////////////////////////
+
+  class Inventory(Application.Inventory):
+    """
+    Python object for managing EqInfoApp facilities and properties.
+    """
+
+    ## @class Inventory
+    ## Python object for managing EqInfoApp facilities and properties.
+    ##
+    ## \b Properties
+    ## @li \b faults Array of fault names.
+    ## @li \b filename_pattern Pattern for fault files.
+    ## @li \b snapshots Array of timestamps for slip snapshots.
+    ## @li \b snapshotUnits Units for timestamps in array of snapshots.
+    ## @li \b output_filename Filename for output.
+    ##
+    ## \b Facilities
+    ## @li \b db_properties Spatial database for elastic properties.
+    ## @li \b coordsys Coordinate system associated with mesh.
+
+    import pyre.inventory
+
+    faults = pyre.inventory.list("faults", default=[])
+    faults.meta['tip'] = "Array of fault names."
+
+    filenamePattern = pyre.inventory.str("filename_pattern", default="output/fault_%s.h5")
+    filenamePattern.meta['tip'] = "Pattern for fault files."
+
+    snapshots = pyre.inventory.list("snapshots", default=[-1])
+    snapshots.meta['tip'] = "Array of timestamps for slip snapshots (-1 == last time step)."
+
+    from pyre.units.time import second
+    snapshotUnits = pyre.inventory.dimensional("snapshot_units", default=1*second)
+    snapshotUnits.meta['tip'] = "Units for timestamps in array of snapshots."
+    
+    filenameOut = pyre.inventory.str("output_filename", default="eqstats.py")
+    filenameOut.meta['tip'] = "Filename for output."
+
+    from spatialdata.spatialdb.SimpleDB import SimpleDB
+    dbProps = pyre.inventory.facility("db_properties", family="spatial_database", factory=SimpleDB)
+    dbProps.meta['tip'] = "Spatial database for elastic properties."
+    
+    from spatialdata.geocoords.CSCart import CSCart
+    cs = pyre.inventory.facility("coordsys", family="coordsys", factory=CSCart)
+    cs.meta['tip'] = "Coordinate system associated with mesh."
+    
+    typos = pyre.inventory.str("typos", default="pedantic",
+                               validator=pyre.inventory.choice(['relaxed', 'strict', 'pedantic']))
+    typos.meta['tip'] = "Specifies the handling of unknown properties and " \
+        "facilities"
+    
+
+  # PUBLIC METHODS /////////////////////////////////////////////////////
+
+  def __init__(self, name="eqinfoapp"):
+    """
+    Constructor.
+    """
+    Application.__init__(self, name)
+    return
+
+
+  def main(self, *args, **kwds):
+    """
+    Run the application.
+    """
+    self.cs.initialize()
+    nfaults = len(self.faults)
+    
+    if nfaults == 0:
+      raise ValueError("No faults specified")
+
+    nsnapshots = len(self.snapshots)
+    statsFaults = [None]*nfaults
+    
+    ifault = 0
+    for fault in self.faults:
+      filenameIn = self.filenamePattern % fault
+      if not os.path.isfile(filenameIn):
+        raise IOError("Could not open PyLith fault output file '%s'." % filenameIn)
+
+      h5 = h5py.File(filenameIn, "r", driver='sec2')
+      vertices = h5['geometry/vertices'][:]
+      cells = numpy.array(h5['topology/cells'][:], dtype=numpy.int32)
+      timestamps = h5['time'][:]
+      cellsArea = self._calcCellArea(cells, vertices)
+      cellsShearMod = self._getShearModulus(cells, vertices)
+
+
+      stats = RuptureStats(nsnapshots)
+      statsFaults[ifault] = stats
+      stats.fault = fault
+      
+      isnapshot = 0
+      for snapshot in self.snapshots:
+        # Get slip at snapshot
+        istep = self._findTimeStep(snapshot, timestamps)
+        slip = h5['vertex_fields/slip'][istep,:,:]
+        
+        cellsSlip = self._ptsToCells(slip, cells)
+        cellsSlipMag = self._vectorMag(cellsSlip)
+        mask = cellsSlipMag > 0.0
+
+        ruparea = numpy.sum(cellsArea[mask])
+        potency = numpy.sum(cellsSlipMag*cellsArea)
+        moment = numpy.sum(cellsSlipMag*cellsArea*cellsShearMod)
+
+        stats.update(isnapshot, timestamp=timestamps[istep], ruparea=ruparea, potency=potency, moment=moment)
+        
+        isnapshot += 1
+      h5.close()
+      ifault += 1
+      
+    statsTotal = RuptureStats(nsnapshots)
+    statsTotal.fault = "all"
+    isnapshot = 0
+    for snapshot in self.snapshots:
+      istep = self._findTimeStep(snapshot, timestamps)
+      statsTotal.timestamp[isnapshot] = timestamps[istep]
+      isnapshot += 1
+
+    ruparea = statsTotal.ruparea
+    potency = statsTotal.potency
+    moment = statsTotal.moment
+    for s in statsFaults:
+      ruparea += s.ruparea
+      potency += s.potency
+      moment += s.moment
+
+    statsTotal.recalculate()
+
+    fout = open(self.filenameOut, "w")
+    statsTotal.writeObj(fout)
+    statsTotal.write(fout)
+    for s in statsFaults:
+      s.write(fout)
+    fout.close()
+    return
+  
+
+  # PRIVATE METHODS ////////////////////////////////////////////////////
+
+  def _configure(self):
+    """
+    Setup members using inventory.
+    """
+    Application._configure(self)
+    self.faults = self.inventory.faults
+    self.filenamePattern = self.inventory.filenamePattern
+    self.snapshots = map(float, self.inventory.snapshots)
+    self.snapshotUnits = self.inventory.snapshotUnits
+    self.dbProps = self.inventory.dbProps
+    self.cs = self.inventory.cs
+    self.filenameOut = self.inventory.filenameOut
+    self.typos = self.inventory.typos
+
+    return
+
+
+  def _calcCellArea(self, cells, vertices):
+    (ncells, ncorners) = cells.shape
+    if ncorners == 1: # point
+      area = numpy.ones( (ncells,), dtype=numpy.float64)
+    elif ncorners == 2: # line2
+      area = self._vectorMag(vertices[cells[:,1]] - vertices[cells[:,0]])
+    elif ncorners == 3: # tri3
+      v01 = vertices[cells[:,1]] - vertices[cells[:,0]]
+      v02 = vertices[cells[:,2]] - vertices[cells[:,0]]
+      area = 0.5*self._vectorMag(numpy.cross(v01, v02))
+    elif ncorners == 4: # quad4
+      v01 = vertices[cells[:,1]] - vertices[cells[:,0]]
+      v02 = vertices[cells[:,2]] - vertices[cells[:,0]]
+      v03 = vertices[cells[:,3]] - vertices[cells[:,0]]
+      area = 0.5*self._vectorMag(numpy.cross(v01, v02)) + \
+          0.5*self._vectorMag(numpy.cross(v02, v03))
+    else:
+      raise ValueError("Unknown case for number of cell corners (%d)." % ncorners)
+    return area
+
+
+  def _getShearModulus(self, cells, vertices):
+    coords = self._ptsToCells(vertices, cells)
+    db = self.dbProps
+    db.open()
+    db.queryVals(["density","vs"])
+    (ncells, ndims) = coords.shape
+    data = numpy.zeros( (ncells, 2), dtype=numpy.float64)
+    err = numpy.zeros( (ncells,), dtype=numpy.int32)
+    db.multiquery(data, err, coords, self.cs)
+    db.close()
+    shearMod = data[:,0]*data[:,1]**2
+    return shearMod
+
+
+  def _findTimeStep(self, value, timestamps):
+    if value == -1:
+      i = len(timestamps)-1
+    else:
+      tdiff = numpy.abs(timestamps-value*self.snapshotUnits.value)
+      mindiff = numpy.min(tdiff)
+      i = numpy.where(tdiff < mindiff+1.0e-10)[0]
+      if len(i) > 1:
+        raise ValueError("Could not find snapshot %12.4e s in time stamps." % value)
+    return i
+
+
+  def _vectorMag(self, v):
+    (npts, ndims) = v.shape
+    mag = numpy.zeros( (npts,), dtype=numpy.float64)
+    for i in xrange(ndims):
+      mag += v[:,i]**2
+    mag = mag**0.5
+    return mag
+
+
+  def _ptsToCells(self, valueP, cells):
+    (ncells, ncorners) = cells.shape
+    if len(valueP.shape) > 1:
+      (nvertices, nvals) = valueP.shape
+      valueC = numpy.zeros( (ncells,nvals), dtype=numpy.float64)
+      for i in xrange(ncorners):
+        valueC[:,:] += valueP[cells[:,i],:]
+    else:
+      nvertices = valueP.shape
+      valueC = numpy.zeros( (ncells,), dtype=numpy.float64)
+      for i in xrange(ncorners):
+        valueC[:] += valueP[cells[:,i]]
+    valueC /= ncorners
+    return valueC
+
+
+# End of file 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/apps/PyLithApp.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/apps/PyLithApp.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/apps/PyLithApp.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -39,7 +39,7 @@
     ## Python object for managing PyLithApp facilities and properties.
     ##
     ## \b Properties
-    ## @li None
+    ## @li \b initialize_only Stop simulation after initializing problem.
     ##
     ## \b Facilities
     ## @li \b mesher Generates or imports the computational mesh.
@@ -48,6 +48,9 @@
 
     import pyre.inventory
 
+    initializeOnly = pyre.inventory.bool("initialize_only", default=False)
+    initializeOnly.meta['tip'] = "Stop simulation after initializing problem."
+
     from pylith.topology.MeshImporter import MeshImporter
     mesher = pyre.inventory.facility("mesh_generator", family="mesh_generator",
                                      factory=MeshImporter)
@@ -115,6 +118,10 @@
 
     self._eventLogger.stagePop()
 
+    # If initializing only, stop before running problem
+    if self.initializeOnly:
+      return
+
     # Run problem
     self.problem.run(self)
     self._debug.log(resourceUsageString())
@@ -141,6 +148,7 @@
     Setup members using inventory.
     """
     PetscApplication._configure(self)
+    self.initializeOnly = self.inventory.initializeOnly
     self.mesher = self.inventory.mesher
     self.problem = self.inventory.problem
     self.perfLogger = self.inventory.perfLogger

Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/faults/FaultCohesiveImpulses.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/faults/FaultCohesiveImpulses.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/faults/FaultCohesiveImpulses.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -101,7 +101,8 @@
     self.availableFields = \
         {'vertex': \
            {'info': ["normal_dir",
-                     "impulse_amplitude"],
+                     "impulse_amplitude",
+                     "area",],
             'data': ["slip",
                      "traction_change"]},
          'cell': \

Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/feassemble/ElasticityExplicit.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/feassemble/ElasticityExplicit.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/feassemble/ElasticityExplicit.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -60,6 +60,13 @@
     return
 
 
+  # PRIVATE METHODS ////////////////////////////////////////////////////
+
+  def _verifyConfiguration(self):
+    ModuleElasticityExplicit.verifyConfiguration(self, self.mesh)
+    return
+
+
 # FACTORIES ////////////////////////////////////////////////////////////
 
 def integrator():

Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/feassemble/ElasticityExplicitLgDeform.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/feassemble/ElasticityExplicitLgDeform.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/feassemble/ElasticityExplicitLgDeform.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -63,6 +63,13 @@
     return
 
 
+  # PRIVATE METHODS ////////////////////////////////////////////////////
+
+  def _verifyConfiguration(self):
+    ModuleElasticityExplicitLgDeform.verifyConfiguration(self, self.mesh)
+    return
+
+
 # FACTORIES ////////////////////////////////////////////////////////////
 
 def integrator():

Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/feassemble/ElasticityExplicitTet4.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/feassemble/ElasticityExplicitTet4.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/feassemble/ElasticityExplicitTet4.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -60,6 +60,13 @@
     return
 
 
+  # PRIVATE METHODS ////////////////////////////////////////////////////
+
+  def _verifyConfiguration(self):
+    ModuleElasticityExplicitTet4.verifyConfiguration(self, self.mesh)
+    return
+
+
 # FACTORIES ////////////////////////////////////////////////////////////
 
 def integrator():

Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/feassemble/ElasticityExplicitTri3.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/feassemble/ElasticityExplicitTri3.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/feassemble/ElasticityExplicitTri3.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -60,6 +60,13 @@
     return
 
 
+  # PRIVATE METHODS ////////////////////////////////////////////////////
+
+  def _verifyConfiguration(self):
+    ModuleElasticityExplicitTri3.verifyConfiguration(self, self.mesh)
+    return
+
+
 # FACTORIES ////////////////////////////////////////////////////////////
 
 def integrator():

Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/feassemble/ElasticityImplicit.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/feassemble/ElasticityImplicit.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/feassemble/ElasticityImplicit.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -60,6 +60,13 @@
     return
 
 
+  # PRIVATE METHODS ////////////////////////////////////////////////////
+
+  def _verifyConfiguration(self):
+    ModuleElasticityImplicit.verifyConfiguration(self, self.mesh)
+    return
+
+
 # FACTORIES ////////////////////////////////////////////////////////////
 
 def integrator():

Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/feassemble/ElasticityImplicitLgDeform.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/feassemble/ElasticityImplicitLgDeform.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/feassemble/ElasticityImplicitLgDeform.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -62,6 +62,13 @@
     return
 
 
+  # PRIVATE METHODS ////////////////////////////////////////////////////
+
+  def _verifyConfiguration(self):
+    ModuleElasticityImplicitLgDeform.verifyConfiguration(self, self.mesh)
+    return
+
+
 # FACTORIES ////////////////////////////////////////////////////////////
 
 def integrator():

Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/feassemble/IntegratorElasticity.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/feassemble/IntegratorElasticity.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/feassemble/IntegratorElasticity.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -85,7 +85,7 @@
                         self.materialObj.label(),
                         self.materialObj,
                         self.materialObj.dimension()))
-    
+    self._verifyConfiguration()
     self.output.verifyConfiguration(self.mesh)
 
     self._eventLogger.eventEnd(logEvent)    
@@ -170,6 +170,10 @@
     return
 
 
+  def _verifyConfiguration(self):
+    raise NotImplementedError("Implement _verifyConfiguration() in child class.")
+
+
   def _modelMemoryUse(self):
     """
     Model memory allocation.

Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/friction/RateStateAgeing.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/friction/RateStateAgeing.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/friction/RateStateAgeing.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -44,18 +44,18 @@
     ## Python object for managing RateStateAgeing facilities and properties.
     ##
     ## \b Properties
-    ## @li \b min_slip_rate Floor for nondimensional slip rate used in 
-    ##   friction calculation.
+    ## @li \b linear_slip_rate Nondimensional slip rate below which friction 
+    ## varies linearly with slip rate.
     ##
     ## \b Facilities
     ## @li None
 
     import pyre.inventory
 
-    minSlipRate = pyre.inventory.float("min_slip_rate", default=1.0e-12,
-                                       validator=pyre.inventory.greaterEqual(0.0))
-    minSlipRate.meta['tip'] = "Floor for nondimensional slip rate used in "\
-        "friction calculation."
+    linearSlipRate = pyre.inventory.float("linear_slip_rate", default=1.0e-12,
+                                          validator=pyre.inventory.greaterEqual(0.0))
+    linearSlipRate.meta['tip'] = "Nondimensional slip rate below which friction " \
+        "varies linearly with slip rate."
 
   # PUBLIC METHODS /////////////////////////////////////////////////////
 
@@ -88,7 +88,7 @@
     """
     try:
       FrictionModel._configure(self)
-      ModuleRateStateAgeing.minSlipRate(self, self.inventory.minSlipRate)
+      ModuleRateStateAgeing.linearSlipRate(self, self.inventory.linearSlipRate)
     except ValueError, err:
       aliases = ", ".join(self.aliases)
       raise ValueError("Error while configuring friction model "

Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/DruckerPrager3D.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/DruckerPrager3D.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/DruckerPrager3D.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -86,7 +86,7 @@
            {'info': [],
             'data': []},
          'cell': \
-           {'info': ["mu", "lambda", "density", 
+           {'info': ["mu", "lambda", "density", "stable_dt_implicit", "stable_dt_explicit",
                      "alpha_yield", "beta", "alpha_flow"],
             'data': ["total_strain", "stress", "plastic_strain"]}}
     self._loggingPrefix = "MaDP3D "

Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/DruckerPragerPlaneStrain.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/DruckerPragerPlaneStrain.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/DruckerPragerPlaneStrain.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -86,7 +86,7 @@
            {'info': [],
             'data': []},
          'cell': \
-           {'info': ["mu", "lambda", "density", 
+           {'info': ["mu", "lambda", "density", "stable_dt_implicit", "stable_dt_explicit",
                      "alpha_yield", "beta", "alpha_flow"],
             'data': ["total_strain", "stress", "stress_zz_initial",
                      "plastic_strain"]}}

Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/ElasticIsotropic3D.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/ElasticIsotropic3D.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/ElasticIsotropic3D.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -45,7 +45,7 @@
            {'info': [],
             'data': []},
          'cell': \
-           {'info': ["mu", "lambda", "density"],
+           {'info': ["mu", "lambda", "density", "stable_dt_implicit", "stable_dt_explicit",],
             'data': ["total_strain", "stress"]}}
     self._loggingPrefix = "MaEl3D "
     return

Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/ElasticPlaneStrain.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/ElasticPlaneStrain.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/ElasticPlaneStrain.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -47,7 +47,7 @@
            {'info': [],
             'data': []},
          'cell': \
-           {'info': ["mu", "lambda", "density"],
+           {'info': ["mu", "lambda", "density", "stable_dt_implicit", "stable_dt_explicit",],
             'data': ["total_strain", "stress"]}}
     self._loggingPrefix = "MaPlSn "
     return

Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/ElasticPlaneStress.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/ElasticPlaneStress.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/ElasticPlaneStress.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -47,7 +47,7 @@
            {'info': [],
             'data': []},
          'cell': \
-           {'info': ["mu", "lambda", "density"],
+           {'info': ["mu", "lambda", "density", "stable_dt_implicit", "stable_dt_explicit",],
             'data': ["total_strain", "stress"]}}
     self._loggingPrefix = "MaPlSt "
     return

Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/ElasticStrain1D.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/ElasticStrain1D.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/ElasticStrain1D.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -46,7 +46,7 @@
            {'info': [],
             'data': []},
          'cell': \
-           {'info': ["mu", "lambda", "density"],
+           {'info': ["mu", "lambda", "density", "stable_dt_implicit", "stable_dt_explicit",],
             'data': ["total_strain", "stress"]}}
     self._loggingPrefix = "MaSt1D "
     return

Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/ElasticStress1D.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/ElasticStress1D.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/ElasticStress1D.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -46,7 +46,7 @@
            {'info': [],
             'data': []},
          'cell': \
-           {'info': ["mu", "lambda", "density"],
+           {'info': ["mu", "lambda", "density", "stable_dt_implicit", "stable_dt_explicit",],
             'data': ["total_strain", "stress"]}}
     self._loggingPrefix = "MaSn1D "
     return

Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/GenMaxwellIsotropic3D.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/GenMaxwellIsotropic3D.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/GenMaxwellIsotropic3D.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -47,14 +47,14 @@
            {'info': [],
             'data': []},
          'cell': \
-           {'info': ["mu", "lambda", "density",
+           {'info': ["mu", "lambda", "density", "stable_dt_implicit", "stable_dt_explicit",
                      "shear_ratio", "maxwell_time"],
             'data': ["total_strain", "stress",
                      "viscous_strain_1", 
                      "viscous_strain_2", 
                      "viscous_strain_3",
                      ]}}
-    self._loggingPrefix = "MaMx3D "
+    self._loggingPrefix = "MaGM3D "
     return
 
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/GenMaxwellPlaneStrain.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/GenMaxwellPlaneStrain.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/GenMaxwellPlaneStrain.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -47,7 +47,7 @@
            {'info': [],
             'data': []},
          'cell': \
-           {'info': ["mu", "lambda", "density",
+           {'info': ["mu", "lambda", "density", "stable_dt_implicit", "stable_dt_explicit",
                      "shear_ratio", "maxwell_time"],
             'data': ["stress_zz_initial",
                      "total_strain", "stress",
@@ -55,7 +55,7 @@
                      "viscous_strain_2", 
                      "viscous_strain_3",
                      ]}}
-    self._loggingPrefix = "MaMx2D "
+    self._loggingPrefix = "MaGM2D "
     return
 
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/GenMaxwellQpQsIsotropic3D.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/GenMaxwellQpQsIsotropic3D.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/GenMaxwellQpQsIsotropic3D.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -47,7 +47,7 @@
            {'info': [],
             'data': []},
          'cell': \
-           {'info': ["mu", "k", "density",
+           {'info': ["mu", "k", "density", "stable_dt_implicit", "stable_dt_explicit",
                      "shear_ratio", 
                      "bulk_ratio",
                      "maxwell_time_shear",
@@ -56,7 +56,7 @@
                      "viscous_deviatoric_strain", 
                      "viscous_mean_strain", 
                      ]}}
-    self._loggingPrefix = "MaMx3D "
+    self._loggingPrefix = "MaGQ3D "
     return
 
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/MaxwellIsotropic3D.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/MaxwellIsotropic3D.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/MaxwellIsotropic3D.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -47,7 +47,7 @@
            {'info': [],
             'data': []},
          'cell': \
-           {'info': ["mu", "lambda", "density", "maxwell_time"],
+           {'info': ["mu", "lambda", "density", "stable_dt_implicit", "stable_dt_explicit", "maxwell_time"],
             'data': ["total_strain", "viscous_strain", "stress"]}}
     self._loggingPrefix = "MaMx3D "
     return

Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/MaxwellPlaneStrain.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/MaxwellPlaneStrain.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/MaxwellPlaneStrain.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -47,8 +47,9 @@
            {'info': [],
             'data': []},
          'cell': \
-           {'info': ["mu", "lambda", "density", "maxwell_time"],
-            'data': ["total_strain", "viscous_strain", "stress"]}}
+           {'info': ["mu", "lambda", "density", "stable_dt_implicit", "stable_dt_explicit", "maxwell_time"],
+            'data': ["total_strain", "stress",
+                     "stress_zz_initial", "viscous_strain"]}}
     self._loggingPrefix = "MaMx2D "
     return
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/PowerLaw3D.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/PowerLaw3D.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/PowerLaw3D.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -46,7 +46,7 @@
            {'info': [],
             'data': []},
          'cell': \
-           {'info': ["mu", "lambda", "density", 
+           {'info': ["mu", "lambda", "density", "stable_dt_implicit", "stable_dt_explicit",
                      "reference_strain_rate", "reference_stress",
                      "power_law_exponent"],
             'data': ["total_strain", "stress", "viscous_strain"]}}

Copied: short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/PowerLawPlaneStrain.py (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/pylith/materials/PowerLawPlaneStrain.py)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/PowerLawPlaneStrain.py	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/PowerLawPlaneStrain.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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", "stable_dt_implicit", "stable_dt_explicit",
+                     "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/branches/pylith-scecdynrup/pylith/materials/__init__.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/__init__.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/materials/__init__.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -32,6 +32,7 @@
            'Material',
            'MaxwellIsotropic3D',
            'PowerLaw3D',
+           'PowerLawPlaneStrain',
            'DruckerPrager3D',
            ]
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/ExplicitLgDeform.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/ExplicitLgDeform.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/ExplicitLgDeform.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -42,22 +42,16 @@
     """
 
     ## @class Inventory
-    ## Python object for managing ExplicitLumped facilities and properties.
+    ## Python object for managing Explicit facilities and properties.
     ##
     ## \b Properties
     ## @li None
     ##
     ## \b Facilities
-    ## @li \b solver Algebraic solver.
+    ## @li None
 
     import pyre.inventory
 
-    from SolverNonlinear import SolverNonlinear
-    solver = pyre.inventory.facility("solver", family="solver",
-                                     factory=SolverNonlinear)
-    solver.meta['tip'] = "Algebraic solver."
-
-
   # PUBLIC METHODS /////////////////////////////////////////////////////
 
   def __init__(self, name="explicitlgdeform"):
@@ -83,7 +77,6 @@
     Set members based using inventory.
     """
     Explicit._configure(self)
-    self.solver = self.inventory.solver
     return
 
 

Deleted: short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/ExplicitLumped.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/ExplicitLumped.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/ExplicitLumped.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,237 +0,0 @@
-#!/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/problems/ExplicitLumped.py
-##
-## @brief Python ExplicitLumped object for solving equations using an
-## explicit formulation with a lumped Jacobian matrix that is stored
-## as a Field.
-##
-## Factory: pde_formulation
-
-from Explicit import Explicit
-from problems import Explicit as ModuleExplicit
-from pylith.utils.profiling import resourceUsageString
-
-# ExplicitLumped class
-class ExplicitLumped(Explicit, ModuleExplicit):
-  """
-  Python ExplicitLumped object for solving equations using an explicit
-  formulation.
-
-  The formulation has the general form, [A(t)] {u(t+dt)} = {b(t)},
-  where we want to solve for {u(t+dt)}, A(t) is usually constant
-  (i.e., independent of time), and {b(t)} usually depends on {u(t)}
-  and {u(t-dt)}.
-
-  Jacobian: A(t)
-  solution: u(t+dt)
-  residual: b(t) - A(t) \hat u(t+dt)
-  constant: b(t)
-
-  Factory: pde_formulation.
-  """
-
-  # INVENTORY //////////////////////////////////////////////////////////
-
-  class Inventory(Explicit.Inventory):
-    """
-    Python object for managing ExplicitLumped facilities and properties.
-
-    Provide appropriate solver for lumped Jacobian as the default.
-    """
-
-    ## @class Inventory
-    ## Python object for managing ExplicitLumped facilities and properties.
-    ##
-    ## \b Properties
-    ## @li None
-    ##
-    ## \b Facilities
-    ## @li \b solver Algebraic solver.
-
-    import pyre.inventory
-
-    from SolverLumped import SolverLumped
-    solver = pyre.inventory.facility("solver", family="solver",
-                                     factory=SolverLumped)
-    solver.meta['tip'] = "Algebraic solver."
-
-
-  # PUBLIC METHODS /////////////////////////////////////////////////////
-
-  def __init__(self, name="explicitlumped"):
-    """
-    Constructor.
-    """
-    Explicit.__init__(self, name)
-    return
-
-
-  def initialize(self, dimension, normalizer):
-    """
-    Initialize problem for explicit time integration.
-    """
-    logEvent = "%sinit" % self._loggingPrefix
-    self._eventLogger.eventBegin(logEvent)
-    
-    from pylith.mpi.Communicator import mpi_comm_world
-    comm = mpi_comm_world()
-
-    self._initialize(dimension, normalizer)
-
-    from pylith.utils.petsc import MemoryLogger
-    logger = MemoryLogger.singleton()
-    logger.setDebug(0)
-    logger.stagePush("Problem")
-
-    # Allocate other fields, reusing layout from dispIncr
-    if 0 == comm.rank:
-      self._info.log("Creating other fields.")
-    self.fields.add("disp(t-dt)", "displacement")
-    self.fields.add("velocity(t)", "velocity")
-    self.fields.add("acceleration(t)", "acceleration")
-    self.fields.copyLayout("dispIncr(t->t+dt)")
-    self._debug.log(resourceUsageString())
-
-    # Setup fields and set to zero
-    dispTmdt = self.fields.get("disp(t-dt)")
-    dispTmdt.zero()
-    dispT = self.fields.get("disp(t)")
-    dispT.zero()
-    residual = self.fields.get("residual")
-    residual.zero()
-    residual.createScatterMesh(residual.mesh())
-
-    lengthScale = normalizer.lengthScale()
-    timeScale = normalizer.timeScale()
-    velocityScale = lengthScale / timeScale
-    velocityT = self.fields.get("velocity(t)")
-    velocityT.scale(velocityScale.value)
-    velocityT.zero()
-
-    accelerationScale = velocityScale / timeScale
-    accelerationT = self.fields.get("acceleration(t)")
-    accelerationT.scale(accelerationScale.value)
-    accelerationT.zero()
-
-    self._debug.log(resourceUsageString())
-    logger.stagePop()
-
-    if 0 == comm.rank:
-      self._info.log("Creating lumped Jacobian matrix.")
-    from pylith.topology.topology import MeshField
-    jacobian = MeshField(self.mesh)
-    jacobian.newSection(jacobian.VERTICES_FIELD, dimension)
-    jacobian.allocate()
-    jacobian.label("jacobian")
-    jacobian.vectorFieldType(jacobian.VECTOR)
-    self.jacobian = jacobian
-    self._debug.log(resourceUsageString())
-
-    logger.stagePush("Problem")
-    if 0 == comm.rank:
-      self._info.log("Initializing solver.")
-    self.solver.initialize(self.fields, self.jacobian, self)
-    self._debug.log(resourceUsageString())
-
-    # Solve for increment in displacement field.
-    for constraint in self.constraints:
-      constraint.useSolnIncr(True)
-    for integrator in self.integratorsMesh + self.integratorsSubMesh:
-      integrator.useSolnIncr(True)
-
-    logger.stagePop()
-    logger.setDebug(0)
-    self._eventLogger.eventEnd(logEvent)
-    return
-
-
-  # PRIVATE METHODS ////////////////////////////////////////////////////
-
-  def _configure(self):
-    """
-    Set members based using inventory.
-    """
-    Explicit._configure(self)
-    self.solver = self.inventory.solver
-    return
-
-
-  def _reformResidual(self, t, dt):
-    """
-    Reform residual vector for operator.
-    """
-    from pylith.mpi.Communicator import mpi_comm_world
-    comm = mpi_comm_world()
-
-    if 0 == comm.rank:
-      self._info.log("Integrating residual term in operator.")
-    self._eventLogger.stagePush("Reform Residual")
-
-    self.updateSettings(self.jacobian, self.fields, t, dt)
-    self.reformResidualLumped()
-
-    self._eventLogger.stagePop()
-    self._debug.log(resourceUsageString())
-    return
-
-
-  def _reformJacobian(self, t, dt):
-    """
-    Reform Jacobian matrix for operator.
-    """
-    from pylith.mpi.Communicator import mpi_comm_world
-    comm = mpi_comm_world()
-
-    self._debug.log(resourceUsageString())
-    if 0 == comm.rank:
-      self._info.log("Integrating Jacobian operator.")
-    self._eventLogger.stagePush("Reform Jacobian")
-
-    self.updateSettings(self.jacobian, self.fields, t, dt)
-    self.reformJacobianLumped()
-
-    self._eventLogger.stagePop()
-
-    if self.viewJacobian:
-      self.jacobian.view("Lumped Jacobian")
-
-    self._debug.log(resourceUsageString())
-    return
-
-
-  def _cleanup(self):
-    """
-    Deallocate PETSc and local data structures.
-    """
-    if not self.fields is None:
-      self.fields.cleanup()
-    return
-
-
-# FACTORIES ////////////////////////////////////////////////////////////
-
-def pde_formulation():
-  """
-  Factory associated with ExplicitLumped.
-  """
-  return ExplicitLumped()
-
-
-# End of file 

Deleted: short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/ExplicitLumpedTet4.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/ExplicitLumpedTet4.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/ExplicitLumpedTet4.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,88 +0,0 @@
-#!/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/problems/ExplicitLumpedTet4.py
-##
-## @brief Python ExplicitLumpedTet4 object for solving equations using an
-## explicit formulation with a lumped Jacobian matrix that is stored
-## as a Field.
-##
-## Factory: pde_formulation
-
-from ExplicitLumped import ExplicitLumped
-from pylith.utils.profiling import resourceUsageString
-
-# ExplicitLumpedTet4 class
-class ExplicitLumpedTet4(ExplicitLumped):
-  """
-  Python ExplicitLumpedTet4 object for solving equations using an explicit
-  formulation.
-
-  The formulation has the general form, [A(t)] {u(t+dt)} = {b(t)},
-  where we want to solve for {u(t+dt)}, A(t) is usually constant
-  (i.e., independent of time), and {b(t)} usually depends on {u(t)}
-  and {u(t-dt)}.
-
-  Jacobian: A(t)
-  solution: u(t+dt)
-  residual: b(t) - A(t) \hat u(t+dt)
-  constant: b(t)
-
-  Factory: pde_formulation.
-  """
-
-  # PUBLIC METHODS /////////////////////////////////////////////////////
-
-  def __init__(self, name="explicitlumpedtet4"):
-    """
-    Constructor.
-    """
-    ExplicitLumped.__init__(self, name)
-    return
-
-
-  def elasticityIntegrator(self):
-    """
-    Get integrator for elastic material.
-    """
-    from pylith.feassemble.ElasticityExplicitTet4 import ElasticityExplicitTet4
-    integrator = ElasticityExplicitTet4()
-    integrator.normViscosity(self.normViscosity)
-    return integrator
-
-
-  # PRIVATE METHODS ////////////////////////////////////////////////////
-
-  def _configure(self):
-    """
-    Set members based using inventory.
-    """
-    ExplicitLumped._configure(self)
-    return
-
-
-# FACTORIES ////////////////////////////////////////////////////////////
-
-def pde_formulation():
-  """
-  Factory associated with ExplicitLumped.
-  """
-  return ExplicitLumpedTet4()
-
-
-# End of file 

Deleted: short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/ExplicitLumpedTri3.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/ExplicitLumpedTri3.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/ExplicitLumpedTri3.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,88 +0,0 @@
-#!/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/problems/ExplicitLumpedTri3.py
-##
-## @brief Python ExplicitLumpedTri3 object for solving equations using an
-## explicit formulation with a lumped Jacobian matrix that is stored
-## as a Field.
-##
-## Factory: pde_formulation
-
-from ExplicitLumped import ExplicitLumped
-from pylith.utils.profiling import resourceUsageString
-
-# ExplicitLumpedTri3 class
-class ExplicitLumpedTri3(ExplicitLumped):
-  """
-  Python ExplicitLumpedTri3 object for solving equations using an explicit
-  formulation.
-
-  The formulation has the general form, [A(t)] {u(t+dt)} = {b(t)},
-  where we want to solve for {u(t+dt)}, A(t) is usually constant
-  (i.e., independent of time), and {b(t)} usually depends on {u(t)}
-  and {u(t-dt)}.
-
-  Jacobian: A(t)
-  solution: u(t+dt)
-  residual: b(t) - A(t) \hat u(t+dt)
-  constant: b(t)
-
-  Factory: pde_formulation.
-  """
-
-  # PUBLIC METHODS /////////////////////////////////////////////////////
-
-  def __init__(self, name="explicitlumpedtri3"):
-    """
-    Constructor.
-    """
-    ExplicitLumped.__init__(self, name)
-    return
-
-
-  def elasticityIntegrator(self):
-    """
-    Get integrator for elastic material.
-    """
-    from pylith.feassemble.ElasticityExplicitTri3 import ElasticityExplicitTri3
-    integrator = ElasticityExplicitTri3()
-    integrator.normViscosity(self.normViscosity)
-    return integrator
-
-
-  # PRIVATE METHODS ////////////////////////////////////////////////////
-
-  def _configure(self):
-    """
-    Set members based using inventory.
-    """
-    ExplicitLumped._configure(self)
-    return
-
-
-# FACTORIES ////////////////////////////////////////////////////////////
-
-def pde_formulation():
-  """
-  Factory associated with ExplicitLumped.
-  """
-  return ExplicitLumpedTri3()
-
-
-# End of file 

Copied: short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/ExplicitTet4.py (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/pylith/problems/ExplicitTet4.py)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/ExplicitTet4.py	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/ExplicitTet4.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -0,0 +1,88 @@
+#!/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/problems/ExplicitTet4.py
+##
+## @brief Python ExplicitTet4 object for solving equations using an
+## explicit formulation with a lumped Jacobian matrix that is stored
+## as a Field.
+##
+## Factory: pde_formulation
+
+from Explicit import Explicit
+from pylith.utils.profiling import resourceUsageString
+
+# ExplicitTet4 class
+class ExplicitTet4(Explicit):
+  """
+  Python ExplicitTet4 object for solving equations using an explicit
+  formulation.
+
+  The formulation has the general form, [A(t)] {u(t+dt)} = {b(t)},
+  where we want to solve for {u(t+dt)}, A(t) is usually constant
+  (i.e., independent of time), and {b(t)} usually depends on {u(t)}
+  and {u(t-dt)}.
+
+  Jacobian: A(t)
+  solution: u(t+dt)
+  residual: b(t) - A(t) \hat u(t+dt)
+  constant: b(t)
+
+  Factory: pde_formulation.
+  """
+
+  # PUBLIC METHODS /////////////////////////////////////////////////////
+
+  def __init__(self, name="explicittet4"):
+    """
+    Constructor.
+    """
+    Explicit.__init__(self, name)
+    return
+
+
+  def elasticityIntegrator(self):
+    """
+    Get integrator for elastic material.
+    """
+    from pylith.feassemble.ElasticityExplicitTet4 import ElasticityExplicitTet4
+    integrator = ElasticityExplicitTet4()
+    integrator.normViscosity(self.normViscosity)
+    return integrator
+
+
+  # PRIVATE METHODS ////////////////////////////////////////////////////
+
+  def _configure(self):
+    """
+    Set members based using inventory.
+    """
+    Explicit._configure(self)
+    return
+
+
+# FACTORIES ////////////////////////////////////////////////////////////
+
+def pde_formulation():
+  """
+  Factory associated with Explicit.
+  """
+  return ExplicitTet4()
+
+
+# End of file 

Copied: short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/ExplicitTri3.py (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/pylith/problems/ExplicitTri3.py)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/ExplicitTri3.py	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/ExplicitTri3.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -0,0 +1,88 @@
+#!/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/problems/ExplicitTri3.py
+##
+## @brief Python ExplicitTri3 object for solving equations using an
+## explicit formulation with a lumped Jacobian matrix that is stored
+## as a Field.
+##
+## Factory: pde_formulation
+
+from Explicit import Explicit
+from pylith.utils.profiling import resourceUsageString
+
+# ExplicitTri3 class
+class ExplicitTri3(Explicit):
+  """
+  Python ExplicitTri3 object for solving equations using an explicit
+  formulation.
+
+  The formulation has the general form, [A(t)] {u(t+dt)} = {b(t)},
+  where we want to solve for {u(t+dt)}, A(t) is usually constant
+  (i.e., independent of time), and {b(t)} usually depends on {u(t)}
+  and {u(t-dt)}.
+
+  Jacobian: A(t)
+  solution: u(t+dt)
+  residual: b(t) - A(t) \hat u(t+dt)
+  constant: b(t)
+
+  Factory: pde_formulation.
+  """
+
+  # PUBLIC METHODS /////////////////////////////////////////////////////
+
+  def __init__(self, name="explicittri3"):
+    """
+    Constructor.
+    """
+    Explicit.__init__(self, name)
+    return
+
+
+  def elasticityIntegrator(self):
+    """
+    Get integrator for elastic material.
+    """
+    from pylith.feassemble.ElasticityExplicitTri3 import ElasticityExplicitTri3
+    integrator = ElasticityExplicitTri3()
+    integrator.normViscosity(self.normViscosity)
+    return integrator
+
+
+  # PRIVATE METHODS ////////////////////////////////////////////////////
+
+  def _configure(self):
+    """
+    Set members based using inventory.
+    """
+    Explicit._configure(self)
+    return
+
+
+# FACTORIES ////////////////////////////////////////////////////////////
+
+def pde_formulation():
+  """
+  Factory associated with Explicit.
+  """
+  return ExplicitTri3()
+
+
+# End of file 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/Formulation.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/Formulation.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/Formulation.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -90,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."
@@ -366,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/branches/pylith-scecdynrup/pylith/problems/GreensFns.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/GreensFns.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/GreensFns.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -149,7 +149,7 @@
 
     # Limit material behavior to linear regime
     for material in self.materials.components():
-      material.useLinearBehavior(True)
+      material.useElasticBehavior(True)
 
     nimpulses = self.source.numImpulses()*self.source.numComponents()
     ipulse = 0;

Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/Implicit.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/Implicit.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/Implicit.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/pylith/problems/Solver.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/Solver.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/Solver.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/pylith/problems/TimeDependent.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/TimeDependent.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/TimeDependent.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/pylith/problems/TimeStep.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/TimeStep.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/problems/TimeStep.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -153,11 +153,13 @@
       dt = integrator.stableTimeStep(mesh)
       if dt < dtStable:
         dtStable = dt
+    import pylith.mpi.mpi as mpi
+    comm = mesh.getComm()
+    dtStableAll = mpi.allreduce_scalar_double(dtStable, mpi.mpi_min(), comm.handle)
+    return dtStableAll
 
-    return dtStable
 
 
-
 # FACTORIES ////////////////////////////////////////////////////////////
 
 def time_step():

Modified: short/3D/PyLith/branches/pylith-scecdynrup/pylith/tests/Fault.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/tests/Fault.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/tests/Fault.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/pylith/tests/PhysicalProperties.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/tests/PhysicalProperties.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/tests/PhysicalProperties.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/pylith/tests/Solution.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/tests/Solution.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/tests/Solution.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/pylith/tests/StateVariables.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/tests/StateVariables.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/tests/StateVariables.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/pylith/tests/__init__.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/pylith/tests/__init__.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/pylith/tests/__init__.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/setup.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/setup.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/setup.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -22,7 +22,7 @@
 setup(
     
     name = 'PyLith', 
-    version = '1.7.0',
+    version = '1.8.0',
 
     zip_safe = False,
     packages = find_packages(),

Modified: short/3D/PyLith/branches/pylith-scecdynrup/templates/friction/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/templates/friction/Makefile.am	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/templates/friction/Makefile.am	2012-11-01 17:04:11 UTC (rev 20976)
@@ -45,6 +45,7 @@
 AM_CPPFLAGS = $(PYTHON_EGG_CPPFLAGS) -I$(PYTHON_INCDIR) 
 
 INCLUDES = 
+INCLUDES += $(PETSC_CC_INCLUDES)
 
 # MODULE ---------------------------------------------------------------
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/templates/friction/ViscousFriction.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/templates/friction/ViscousFriction.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/templates/friction/ViscousFriction.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/templates/friction/ViscousFriction.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/templates/friction/ViscousFriction.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/templates/friction/ViscousFriction.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/templates/friction/ViscousFriction.i
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/templates/friction/ViscousFriction.i	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/templates/friction/ViscousFriction.i	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/templates/friction/configure.ac
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/templates/friction/configure.ac	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/templates/friction/configure.ac	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/templates/friction/frictioncontrib.i
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/templates/friction/frictioncontrib.i	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/templates/friction/frictioncontrib.i	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/templates/friction/tests/TestViscousFriction.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/templates/friction/tests/TestViscousFriction.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/templates/friction/tests/TestViscousFriction.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/templates/materials/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/templates/materials/Makefile.am	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/templates/materials/Makefile.am	2012-11-01 17:04:11 UTC (rev 20976)
@@ -45,6 +45,7 @@
 AM_CPPFLAGS = $(PYTHON_EGG_CPPFLAGS) -I$(PYTHON_INCDIR) 
 
 INCLUDES = 
+INCLUDES += $(PETSC_CC_INCLUDES)
 
 # MODULE ---------------------------------------------------------------
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/templates/materials/PlaneStrainState.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/templates/materials/PlaneStrainState.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/templates/materials/PlaneStrainState.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/templates/materials/PlaneStrainState.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/templates/materials/PlaneStrainState.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/templates/materials/PlaneStrainState.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/templates/materials/PlaneStrainState.i
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/templates/materials/PlaneStrainState.i	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/templates/materials/PlaneStrainState.i	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/templates/materials/configure.ac
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/templates/materials/configure.ac	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/templates/materials/configure.ac	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/templates/materials/materialscontrib.i
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/templates/materials/materialscontrib.i	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/templates/materials/materialscontrib.i	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests/2d/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/Makefile.am	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/Makefile.am	2012-11-01 17:04:11 UTC (rev 20976)
@@ -18,6 +18,7 @@
 
 SUBDIRS = \
 	maxwell \
+	powerlaw \
 	slipdir \
 	frictionslide
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/faultstrip/dynamic_slipweakening.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/faultstrip/dynamic_slipweakening.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/faultstrip/dynamic_slipweakening.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/faultstrip/dynamic_timeweakening.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/faultstrip/dynamic_timeweakening.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/faultstrip/dynamic_timeweakening.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/faultstrip/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/faultstrip/pylithapp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/faultstrip/pylithapp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # This is not a self-contained simulation configuration file. This
@@ -41,7 +40,7 @@
 [pylithapp.timedependent]
 dimension = 2
 
-formulation = pylith.problems.ExplicitLumped
+formulation = pylith.problems.Explicit
 
 normalizer = spatialdata.units.NondimElasticDynamic
 normalizer.shear_wave_speed = 1.0*km/s

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/frictionslide/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/frictionslide/pylithapp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/frictionslide/pylithapp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------
@@ -112,12 +111,11 @@
 snes_max_it = 100
 
 snes_monitor = true
-snes_ls_monitor = true
+snes_linesearch_monitor = true
 #snes_view = true
 snes_converged_reason = true
 
-#log_summary = true
-#info =
+log_summary = true
 
 # ----------------------------------------------------------------------
 # output

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/frictionslide/ratestate.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/frictionslide/ratestate.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/frictionslide/ratestate.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/frictionslide/ratestate_stable.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/frictionslide/ratestate_stable.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/frictionslide/ratestate_stable.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------
@@ -13,7 +12,7 @@
 [pylithapp.timedependent.interfaces.fault]
 friction = pylith.friction.RateStateAgeing
 friction.label = Rate state ageing
-friction.min_slip_rate = 1.0e-8
+friction.linear_slip_rate = 1.0e-8
 
 # Set the friction model parameters.
 #  reference coefficient of friction: 0.6

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/frictionslide/ratestate_weak.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/frictionslide/ratestate_weak.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/frictionslide/ratestate_weak.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------
@@ -13,7 +12,7 @@
 [pylithapp.timedependent.interfaces.fault]
 friction = pylith.friction.RateStateAgeing
 friction.label = Rate state ageing
-friction.min_slip_rate = 1.0e-9
+friction.linear_slip_rate = 1.0e-9
 
 # Set the friction model parameters.
 #  reference coefficient of friction: 0.6

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/maxwell/axialdisp2d.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/maxwell/axialdisp2d.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/maxwell/axialdisp2d.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests/2d/maxwell/axialdisp3d.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/maxwell/axialdisp3d.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/maxwell/axialdisp3d.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests/2d/maxwell/planestrain2d.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/maxwell/planestrain2d.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/maxwell/planestrain2d.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # The settings in this file define the setting specific to a 2D
 # (plane strain) problem.

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/maxwell/planestrain3d.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/maxwell/planestrain3d.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/maxwell/planestrain3d.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests/2d/maxwell/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/maxwell/pylithapp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/maxwell/pylithapp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests/2d/maxwell/sheardisp2d.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/maxwell/sheardisp2d.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/maxwell/sheardisp2d.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests/2d/maxwell/sheardisp3d.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/maxwell/sheardisp3d.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/maxwell/sheardisp3d.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests/2d/plasticity/cyclic/dynamic.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/cyclic/dynamic.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/cyclic/dynamic.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -4,4 +4,4 @@
 # problem
 # ----------------------------------------------------------------------
 [pylithapp.timedependent]
-formulation = pylith.problems.ExplicitLumped
+formulation = pylith.problems.Explicit

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/axialdisp_fine_2d.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/axialdisp_fine_2d.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/axialdisp_fine_2d.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # To run this problem, type
 # "pylith planestrain_fine_2d.cfg axialdisp_fine_2d.cfg".

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/axialdisp_fine_3d.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/axialdisp_fine_3d.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/axialdisp_fine_3d.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # To run this problem, type
 # "pylith planestrain_fine_3d.cfg axialdisp_fine_3d.cfg".

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/axialdisp_twocells_2d.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/axialdisp_twocells_2d.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/axialdisp_twocells_2d.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # To run this problem, type
 # "pylith planestrain_twocells_2d.cfg axialdisp_twocells_2d.cfg".

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/axialdisp_twocells_3d.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/axialdisp_twocells_3d.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/axialdisp_twocells_3d.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # To run this problem, type
 # "pylith planestrain_twocells_3d.cfg axialdisp_twocells_3d.cfg".

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/planestrain_fine_2d.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/planestrain_fine_2d.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/planestrain_fine_2d.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # The settings in this file define the setting specific to a 2D
 # (plane strain) problem.

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/planestrain_fine_3d.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/planestrain_fine_3d.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/planestrain_fine_3d.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests/2d/plasticity/static/planestrain_twocells_2d.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/planestrain_twocells_2d.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/planestrain_twocells_2d.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # The settings in this file define the setting specific to a 2D
 # (plane strain) problem.

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/planestrain_twocells_3d.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/planestrain_twocells_3d.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/planestrain_twocells_3d.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests/2d/plasticity/static/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/pylithapp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/pylithapp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests/2d/plasticity/static/sheardisp_fine_2d.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/sheardisp_fine_2d.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/sheardisp_fine_2d.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # To run this problem, type
 # "pylith planestrain_fine_2d.cfg sheardisp_fine_2d.cfg".

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/sheardisp_fine_3d.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/sheardisp_fine_3d.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/sheardisp_fine_3d.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # To run this problem, type
 # "pylith planestrain_fine_3d.cfg sheardisp_fine_3d.cfg".

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/sheardisp_twocells_2d.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/sheardisp_twocells_2d.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/sheardisp_twocells_2d.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # To run this problem, type
 # "pylith planestrain_twocells_2d.cfg sheardisp_twocells_2d.cfg".

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/sheardisp_twocells_3d.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/sheardisp_twocells_3d.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/plasticity/static/sheardisp_twocells_3d.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 
 # To run this problem, type
 # "pylith planestrain_twocells_3d.cfg sheardisp_twocells_3d.cfg".

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

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/slipdir/fault_x.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/slipdir/fault_x.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/slipdir/fault_x.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/slipdir/fault_xy1.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/slipdir/fault_xy1.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/slipdir/fault_xy1.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/slipdir/fault_xy2.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/slipdir/fault_xy2.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/slipdir/fault_xy2.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/slipdir/fault_y.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/slipdir/fault_y.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/slipdir/fault_y.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/slipdir/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/slipdir/pylithapp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/slipdir/pylithapp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Copied: short/3D/PyLith/branches/pylith-scecdynrup/tests/2d/stressoutput (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/tests/2d/stressoutput)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/cyclicfriction/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/cyclicfriction/pylithapp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/cyclicfriction/pylithapp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------
@@ -174,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.
@@ -189,7 +188,7 @@
 snes_atol = 1.0e-10
 snes_max_it = 100
 snes_monitor = true
-snes_ls_monitor = true
+#snes_linesearch_monitor = true
 #snes_steptol = 1.0e-20
 #snes_view = true
 snes_converged_reason = true

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/matprops/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/matprops/pylithapp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/matprops/pylithapp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/hex8.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/hex8.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/hex8.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/hex8_pwave.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/hex8_pwave.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/hex8_pwave.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/hex8_swave.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/hex8_swave.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/hex8_swave.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/pwave.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/pwave.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/pwave.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/pylithapp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/pylithapp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------
@@ -21,7 +20,7 @@
 [pylithapp.timedependent]
 dimension = 3
 
-formulation = pylith.problems.ExplicitLumped
+formulation = pylith.problems.Explicit
 formulation.norm_viscosity = 1.0e-30
 normalizer = spatialdata.units.NondimElasticDynamic
 normalizer.shear_wave_speed = 3300*m/s

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/swave.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/swave.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/swave.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/tet4.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/tet4.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/tet4.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,11 +1,10 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------
 # problem
 # ----------------------------------------------------------------------
 [pylithapp.timedependent]
-formulation = pylith.problems.ExplicitLumpedTet4
+formulation = pylith.problems.ExplicitTet4
 
 # ----------------------------------------------------------------------
 # mesh_generator

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/tet4_pwave.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/tet4_pwave.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/tet4_pwave.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/tet4_swave.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/tet4_swave.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/dynamic/tet4_swave.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/threehex8/config/elas_ng_ni_v03.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/threehex8/config/elas_ng_ni_v03.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/threehex8/config/elas_ng_ni_v03.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/threehex8/config/plas_dp1_ng_ni_v03.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/threehex8/config/plas_dp1_ng_ni_v03.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/threehex8/config/plas_dp1_ng_ni_v03.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/threehex8/config/plas_dp2_ng_ni_v03.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/threehex8/config/plas_dp2_ng_ni_v03.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/threehex8/config/plas_dp2_ng_ni_v03.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/threehex8/config/plas_dp3_ng_ni_v03.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/threehex8/config/plas_dp3_ng_ni_v03.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/threehex8/config/plas_dp3_ng_ni_v03.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/threehex8/config/plas_vm1_ng_ni_v03.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/threehex8/config/plas_vm1_ng_ni_v03.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/threehex8/config/plas_vm1_ng_ni_v03.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/threehex8/config/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/threehex8/config/pylithapp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/threehex8/config/pylithapp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # This is not a self-contained simulation configuration file. This

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/threehex8/config/visc_e10_ng_ni_v03.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/threehex8/config/visc_e10_ng_ni_v03.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/plasticity/threehex8/config/visc_e10_ng_ni_v03.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/refine/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/refine/pylithapp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/refine/pylithapp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/relaxation/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/relaxation/pylithapp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/relaxation/pylithapp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/relaxation/shear_elastic.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/relaxation/shear_elastic.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/relaxation/shear_elastic.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/relaxation/shear_genmaxwell.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/relaxation/shear_genmaxwell.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/relaxation/shear_genmaxwell.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/relaxation/shear_genmaxwell_QpQs.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/relaxation/shear_genmaxwell_QpQs.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/relaxation/shear_genmaxwell_QpQs.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/slipdir/fault_x.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/slipdir/fault_x.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/slipdir/fault_x.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/slipdir/fault_xy.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/slipdir/fault_xy.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/slipdir/fault_xy.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/slipdir/fault_xz1.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/slipdir/fault_xz1.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/slipdir/fault_xz1.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/slipdir/fault_xz2.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/slipdir/fault_xz2.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/slipdir/fault_xz2.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/slipdir/fault_y.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/slipdir/fault_y.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/slipdir/fault_y.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/slipdir/fault_z.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/slipdir/fault_z.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/slipdir/fault_z.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/slipdir/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/slipdir/pylithapp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/3d/slipdir/pylithapp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/refinefaulttip/hex8.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/refinefaulttip/hex8.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/refinefaulttip/hex8.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/refinefaulttip/quad4.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/refinefaulttip/quad4.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/refinefaulttip/quad4.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/refinefaulttip/tet4.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/refinefaulttip/tet4.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/refinefaulttip/tet4.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests/refinefaulttip/tri3.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/refinefaulttip/tri3.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/refinefaulttip/tri3.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Copied: short/3D/PyLith/branches/pylith-scecdynrup/tests/runtests.sh (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/tests/runtests.sh)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests/runtests.sh	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests/runtests.sh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/1d/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/Makefile.am	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/Makefile.am	2012-11-01 17:04:11 UTC (rev 20976)
@@ -17,8 +17,10 @@
 #
 
 SUBDIRS = \
-	line2 \
-	line3
+	line2
 
 
+#	line3 (disable until higher order with 2 vertices works)
+
+
 # End of file 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/TestDislocation.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/TestDislocation.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/TestDislocation.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/1d/line2/TestExtensionDisp.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/TestExtensionDisp.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/TestExtensionDisp.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/1d/line2/TestExtensionForce.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/TestExtensionForce.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/TestExtensionForce.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/1d/line2/TestLine2.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/TestLine2.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/TestLine2.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/1d/line2/dislocation.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/dislocation.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/dislocation.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [dislocation]
 
 [dislocation.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -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/branches/pylith-scecdynrup/tests_auto/1d/line2/extensiondisp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/extensiondisp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/extensiondisp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [extensiondisp]
 
 [extensiondisp.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -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/branches/pylith-scecdynrup/tests_auto/1d/line2/extensionforce.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/extensionforce.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/extensionforce.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [extensionforce]
 
 [extensionforce.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -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/branches/pylith-scecdynrup/tests_auto/1d/line2/lgdeformtranslation.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/lgdeformtranslation.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line2/lgdeformtranslation.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 [pylithapp.launcher] # WARNING: THIS IS NOT PORTABLE

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line3/TestAxial.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line3/TestAxial.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line3/TestAxial.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/1d/line3/TestDislocation.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line3/TestDislocation.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line3/TestDislocation.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/1d/line3/TestLine3.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line3/TestLine3.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line3/TestLine3.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/1d/line3/axialextension.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line3/axialextension.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line3/axialextension.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [axialextension]
 
 [axialextension.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -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/branches/pylith-scecdynrup/tests_auto/1d/line3/dislocation.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line3/dislocation.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/1d/line3/dislocation.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [dislocation]
 
 [dislocation.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -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/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestAxialDisp.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestAxialDisp.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestAxialDisp.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestDislocation.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestDislocation.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestDislocation.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestFrictionCompression.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestFrictionCompression.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestFrictionCompression.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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,10 +74,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 = ["strike_dir", "normal_dir", "traction_initial","friction_coefficient","cohesion"]
     check_vertex_fields(self, filename, self.faultMesh, fields)
 
@@ -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 == "traction_initial":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = initialTraction[0]
-      field[:,1] = initialTraction[1]
+      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/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestFrictionOpening.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestFrictionOpening.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestFrictionOpening.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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,10 +74,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 = ["strike_dir", "normal_dir", "traction_initial","friction_coefficient","cohesion"]
     check_vertex_fields(self, filename, self.faultMesh, fields)
 
@@ -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 == "traction_initial":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = initialTraction[0]
-      field[:,1] = initialTraction[1]
+      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/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestFrictionShearSliding.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestFrictionShearSliding.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestFrictionShearSliding.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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,10 +74,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 = ["strike_dir", "normal_dir", "traction_initial","friction_coefficient","cohesion"]
     check_vertex_fields(self, filename, self.faultMesh, fields)
 
@@ -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 == "traction_initial":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = initialTraction[0]
-      field[:,1] = initialTraction[1]
+      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/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestFrictionShearStick.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestFrictionShearStick.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestFrictionShearStick.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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,10 +74,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 = ["strike_dir", "normal_dir", "traction_initial","friction_coefficient","cohesion"]
     check_vertex_fields(self, filename, self.faultMesh, fields)
 
@@ -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 == "traction_initial":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = initialTraction[0]
-      field[:,1] = initialTraction[1]
+      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/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestLgDeformRigidBody.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestLgDeformRigidBody.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestLgDeformRigidBody.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestLgDeformTraction.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestLgDeformTraction.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestLgDeformTraction.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestQuad4.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestQuad4.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestQuad4.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestShearDisp.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestShearDisp.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestShearDisp.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestSlipWeakeningCompression.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestSlipWeakeningCompression.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestSlipWeakeningCompression.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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,10 +74,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 = ["strike_dir", "normal_dir", "traction_initial","static_coefficient","dynamic_coefficient","slip_weakening_parameter","cohesion"]
     check_vertex_fields(self, filename, self.faultMesh, fields)
 
@@ -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 == "traction_initial":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = initialTraction[0]
-      field[:,1] = initialTraction[1]
+      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/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestSlipWeakeningOpening.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestSlipWeakeningOpening.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestSlipWeakeningOpening.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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,10 +74,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 = ["strike_dir", "normal_dir", "traction_initial","static_coefficient","dynamic_coefficient","slip_weakening_parameter","cohesion"]
     check_vertex_fields(self, filename, self.faultMesh, fields)
 
@@ -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 == "traction_initial":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = initialTraction[0]
-      field[:,1] = initialTraction[1]
+      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/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestSlipWeakeningShearSliding.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestSlipWeakeningShearSliding.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestSlipWeakeningShearSliding.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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,10 +74,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 = ["strike_dir", "normal_dir", "traction_initial","static_coefficient","dynamic_coefficient","slip_weakening_parameter","cohesion"]
     check_vertex_fields(self, filename, self.faultMesh, fields)
 
@@ -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 == "traction_initial":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = initialTraction[0]
-      field[:,1] = initialTraction[1]
+      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/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestSlipWeakeningShearStick.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestSlipWeakeningShearStick.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/TestSlipWeakeningShearStick.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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,10 +74,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 = ["strike_dir", "normal_dir", "traction_initial","static_coefficient","dynamic_coefficient","slip_weakening_parameter","cohesion"]
     check_vertex_fields(self, filename, self.faultMesh, fields)
 
@@ -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 == "traction_initial":
-      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
-      field[:,0] = initialTraction[0]
-      field[:,1] = initialTraction[1]
+      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/branches/pylith-scecdynrup/tests_auto/2d/quad4/axialdisp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/axialdisp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/axialdisp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/2d/quad4/axialdisp_gendb.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/axialdisp_gendb.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/axialdisp_gendb.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/2d/quad4/axialdisp_soln.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/axialdisp_soln.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/axialdisp_soln.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/2d/quad4/dislocation.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/dislocation.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/dislocation.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/2d/quad4/dislocation2.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/dislocation2.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/dislocation2.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 [pylithapp.launcher] # WARNING: THIS IS NOT PORTABLE

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/dislocation_soln.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/dislocation_soln.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/dislocation_soln.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/2d/quad4/fourcells_twofaults.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/fourcells_twofaults.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/fourcells_twofaults.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 [pylithapp.launcher] # WARNING: THIS IS NOT PORTABLE

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/friction_compression.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/friction_compression.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/friction_compression.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [friction_compression]
 
 [friction_compression.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -156,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
+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/branches/pylith-scecdynrup/tests_auto/2d/quad4/friction_compression_soln.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/friction_compression_soln.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/friction_compression_soln.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/2d/quad4/friction_opening.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/friction_opening.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/friction_opening.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [friction_opening]
 
 [friction_opening.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -159,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
+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/branches/pylith-scecdynrup/tests_auto/2d/quad4/friction_opening_soln.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/friction_opening_soln.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/friction_opening_soln.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/2d/quad4/friction_shear_sliding.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/friction_shear_sliding.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/friction_shear_sliding.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [friction_shear_sliding]
 
 [friction_shear_sliding.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -176,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
+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/branches/pylith-scecdynrup/tests_auto/2d/quad4/friction_shear_sliding_soln.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/friction_shear_sliding_soln.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/friction_shear_sliding_soln.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/2d/quad4/friction_shear_stick.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/friction_shear_stick.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/friction_shear_stick.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [friction_shear_stick]
 
 [friction_shear_stick.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -182,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
+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/branches/pylith-scecdynrup/tests_auto/2d/quad4/friction_shear_stick_soln.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/friction_shear_stick_soln.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/friction_shear_stick_soln.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/2d/quad4/lgdeformrigidbody.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/lgdeformrigidbody.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/lgdeformrigidbody.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/2d/quad4/lgdeformtraction.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/lgdeformtraction.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/lgdeformtraction.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/2d/quad4/lgdeformtraction_soln.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/lgdeformtraction_soln.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/lgdeformtraction_soln.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/2d/quad4/rigidbody_gendb.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/rigidbody_gendb.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/rigidbody_gendb.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/2d/quad4/rigidbody_soln.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/rigidbody_soln.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/rigidbody_soln.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/2d/quad4/sheardisp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/sheardisp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/sheardisp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/2d/quad4/sheardisp_gendb.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/sheardisp_gendb.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/sheardisp_gendb.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/2d/quad4/sheardisp_soln.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/sheardisp_soln.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/sheardisp_soln.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/2d/quad4/slipweakening_compression.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/slipweakening_compression.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/slipweakening_compression.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [slipweakening_compression]
 
 [slipweakening_compression.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -156,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
+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/branches/pylith-scecdynrup/tests_auto/2d/quad4/slipweakening_compression_soln.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/slipweakening_compression_soln.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/slipweakening_compression_soln.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/2d/quad4/slipweakening_opening.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/slipweakening_opening.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/slipweakening_opening.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [slipweakening_opening]
 
 [slipweakening_opening.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -148,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
+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/branches/pylith-scecdynrup/tests_auto/2d/quad4/slipweakening_opening_soln.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/slipweakening_opening_soln.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/slipweakening_opening_soln.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/2d/quad4/slipweakening_shear_sliding.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/slipweakening_shear_sliding.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/slipweakening_shear_sliding.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [slipweakening_shear_sliding]
 
 [slipweakening_shear_sliding.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -169,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
+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/branches/pylith-scecdynrup/tests_auto/2d/quad4/slipweakening_shear_sliding_soln.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/slipweakening_shear_sliding_soln.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/slipweakening_shear_sliding_soln.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/2d/quad4/slipweakening_shear_stick.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/slipweakening_shear_stick.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/slipweakening_shear_stick.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [slipweakening_shear_stick]
 
 [slipweakening_shear_stick.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -184,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
+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/branches/pylith-scecdynrup/tests_auto/2d/quad4/slipweakening_shear_stick_soln.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/slipweakening_shear_stick_soln.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/slipweakening_shear_stick_soln.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/2d/quad4/testpylith.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/testpylith.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad4/testpylith.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/2d/quad9/axialdisp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad9/axialdisp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad9/axialdisp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 [pylithapp.launcher] # WARNING: THIS IS NOT PORTABLE

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad9/dislocation.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad9/dislocation.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/quad9/dislocation.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 [pylithapp.launcher] # WARNING: THIS IS NOT PORTABLE

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/TestAxialDisp.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/TestAxialDisp.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/TestAxialDisp.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/2d/tri3/TestShearDisp.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/TestShearDisp.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/TestShearDisp.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/2d/tri3/TestTri3.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/TestTri3.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/TestTri3.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/2d/tri3/axialdisp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/axialdisp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/axialdisp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [axialdisp]
 
 [axialdisp.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -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/branches/pylith-scecdynrup/tests_auto/2d/tri3/axialdisp_gendb.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/axialdisp_gendb.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/axialdisp_gendb.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/2d/tri3/axialdisp_soln.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/axialdisp_soln.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/axialdisp_soln.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/2d/tri3/dislocation.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/dislocation.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/dislocation.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [dislocation]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/dislocation2.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/dislocation2.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/dislocation2.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [dislocation2]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/sheardisp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/sheardisp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/sheardisp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [sheardisp]
 
 [sheardisp.launcher] # WARNING: THIS IS NOT PORTABLE
@@ -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/branches/pylith-scecdynrup/tests_auto/2d/tri3/sheardisp_gendb.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/sheardisp_gendb.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/sheardisp_gendb.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/2d/tri3/sheardisp_refine.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/sheardisp_refine.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/sheardisp_refine.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 [pylithapp.launcher] # WARNING: THIS IS NOT PORTABLE

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/sheardisp_soln.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/sheardisp_soln.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri3/sheardisp_soln.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/tests_auto/2d/tri6/axialdisp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri6/axialdisp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri6/axialdisp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 [pylithapp.launcher] # WARNING: THIS IS NOT PORTABLE

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri6/dislocation.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri6/dislocation.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/2d/tri6/dislocation.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 [pylithapp.launcher] # WARNING: THIS IS NOT PORTABLE

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/axial-small-tractions.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/axial-small-tractions.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/axial-small-tractions.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/axialelasticisotropic.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/axialelasticisotropic.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/axialelasticisotropic.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/axialgenmax1-tract-8cells.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/axialgenmax1-tract-8cells.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/axialgenmax1-tract-8cells.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/axialgenmax2-tract-8cells.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/axialgenmax2-tract-8cells.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/axialgenmax2-tract-8cells.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/axialgenmax3-tract-8cells.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/axialgenmax3-tract-8cells.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/axialgenmax3-tract-8cells.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/axialgenmax4-tract-8cells.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/axialgenmax4-tract-8cells.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/axialgenmax4-tract-8cells.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/axialmaxwellisotropic.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/axialmaxwellisotropic.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/axialmaxwellisotropic.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/pylithapp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/pylithapp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/pylithapp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/shearelastic-eightcells.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/shearelastic-eightcells.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/shearelastic-eightcells.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/shearelastic-fourcells.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/shearelastic-fourcells.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/shearelastic-fourcells.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/shearelastic-small.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/shearelastic-small.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/shearelastic-small.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/shearelastic-threecells.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/shearelastic-threecells.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/shearelastic-threecells.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/shearelastic-twocells.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/shearelastic-twocells.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/shearelastic-twocells.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/shearelastic-twocellsb.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/shearelastic-twocellsb.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/shearelastic-twocellsb.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/shearelasticisotropic.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/shearelasticisotropic.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/shearelasticisotropic.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/shearmaxwellisotropic.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/shearmaxwellisotropic.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/shearmaxwellisotropic.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/shearplanestrain.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/shearplanestrain.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/hex8/shearplanestrain.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/tet4/axialelasticisotropic.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/tet4/axialelasticisotropic.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/tet4/axialelasticisotropic.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/tet4/dislocation.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/tet4/dislocation.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/tet4/dislocation.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/tet4/shearelasticisotropic.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/tet4/shearelasticisotropic.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3d/tet4/shearelasticisotropic.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 # ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/hex27/axialdisp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/hex27/axialdisp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/hex27/axialdisp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 [pylithapp.launcher] # WARNING: THIS IS NOT PORTABLE

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/hex27/dislocation.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/hex27/dislocation.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/hex27/dislocation.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 [pylithapp.launcher] # WARNING: THIS IS NOT PORTABLE

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/hex8/axialdisp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/hex8/axialdisp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/hex8/axialdisp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 [pylithapp.launcher] # WARNING: THIS IS NOT PORTABLE

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/hex8/lgdeformrigidbody.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/hex8/lgdeformrigidbody.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/hex8/lgdeformrigidbody.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [lgdeformrigidbody]
 
 [lgdeformrigidbody.launcher] # WARNING: THIS IS NOT PORTABLE

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/hex8/lgdeformtraction.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/hex8/lgdeformtraction.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/hex8/lgdeformtraction.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [lgdeformtraction]
 
 [lgdeformtraction.launcher] # WARNING: THIS IS NOT PORTABLE

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/tet10/axialdisp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/tet10/axialdisp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/tet10/axialdisp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 [pylithapp.launcher] # WARNING: THIS IS NOT PORTABLE

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/tet10/dislocation.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/tet10/dislocation.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/tet10/dislocation.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 [pylithapp.launcher] # WARNING: THIS IS NOT PORTABLE

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/tet4/axialdisp.cfg
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/tet4/axialdisp.cfg	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/3dnew/tet4/axialdisp.cfg	2012-11-01 17:04:11 UTC (rev 20976)
@@ -1,4 +1,3 @@
-# -*- Python -*-
 [pylithapp]
 
 [pylithapp.launcher] # WARNING: THIS IS NOT PORTABLE

Modified: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/Makefile.am	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/Makefile.am	2012-11-01 17:04:11 UTC (rev 20976)
@@ -19,7 +19,8 @@
 SUBDIRS = \
 	1d \
 	2d \
-	petsc
+	petsc \
+	eqinfo
 
 
 # End of file 

Copied: short/3D/PyLith/branches/pylith-scecdynrup/tests_auto/eqinfo (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/tests_auto/eqinfo)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveDyn.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveDyn.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/faults/TestFaultCohesiveDyn.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -233,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
@@ -352,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
@@ -477,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
@@ -780,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/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicit.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicit.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicit.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -202,7 +202,7 @@
   const int size = residualSection->sizeWithBC();
   CPPUNIT_ASSERT_EQUAL(sizeE, size);
 
-#if 0
+#if 0 // DEBUGGING
   residual.view("RESIDUAL");
   std::cout << "EXPECTED RESIDUAL" << std::endl;
   for (int i=0; i < size; ++i)
@@ -218,46 +218,6 @@
 } // testIntegrateResidual
 
 // ----------------------------------------------------------------------
-// Test integrateResidual().
-void
-pylith::feassemble::TestElasticityExplicit::testIntegrateResidualLumped(void)
-{ // testIntegrateResidualLumped
-  CPPUNIT_ASSERT(0 != _data);
-
-  topology::Mesh mesh;
-  ElasticityExplicit integrator;
-  topology::SolutionFields fields(mesh);
-  _initialize(&mesh, &integrator, &fields);
-
-  topology::Field<topology::Mesh>& residual = fields.get("residual");
-  const PylithScalar t = 1.0;
-  integrator.integrateResidualLumped(residual, t, &fields);
-
-  const PylithScalar* valsE = _data->valsResidualLumped;
-  const int sizeE = _data->spaceDim * _data->numVertices;
-
-  const ALE::Obj<RealSection>& residualSection = residual.section();
-  CPPUNIT_ASSERT(!residualSection.isNull());
-  const PylithScalar* vals = residualSection->restrictSpace();
-  const int size = residualSection->sizeWithBC();
-  CPPUNIT_ASSERT_EQUAL(sizeE, size);
-
-#if 0
-  residual.view("RESIDUAL");
-  std::cout << "EXPECTED RESIDUAL" << std::endl;
-  for (int i=0; i < size; ++i)
-    std::cout << "  " << valsE[i] << std::endl;
-#endif
-
-  const PylithScalar tolerance = (sizeof(double) == sizeof(PylithScalar)) ? 1.0e-06 : 1.0e-05;
-  for (int i=0; i < size; ++i)
-    if (fabs(valsE[i]) > 1.0)
-      CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, vals[i]/valsE[i], tolerance);
-    else
-      CPPUNIT_ASSERT_DOUBLES_EQUAL(valsE[i], vals[i], tolerance);
-} // testIntegrateResidualLumped
-
-// ----------------------------------------------------------------------
 // Test integrateJacobian().
 void
 pylith::feassemble::TestElasticityExplicit::testIntegrateJacobian(void)
@@ -270,61 +230,6 @@
   _initialize(&mesh, &integrator, &fields);
   integrator._needNewJacobian = true;
 
-  topology::Jacobian jacobian(fields.solution());
-
-  const PylithScalar t = 1.0;
-  integrator.integrateJacobian(&jacobian, t, &fields);
-  CPPUNIT_ASSERT_EQUAL(false, integrator.needNewJacobian());
-  jacobian.assemble("final_assembly");
-
-  const PylithScalar* valsE = _data->valsJacobian;
-  const int nrowsE = _data->numVertices * _data->spaceDim;
-  const int ncolsE = _data->numVertices * _data->spaceDim;
-
-  const PetscMat jacobianMat = jacobian.matrix();
-
-  int nrows = 0;
-  int ncols = 0;
-  MatGetSize(jacobianMat, &nrows, &ncols);
-  CPPUNIT_ASSERT_EQUAL(nrowsE, nrows);
-  CPPUNIT_ASSERT_EQUAL(ncolsE, ncols);
-
-  PetscMat jDense;
-  MatConvert(jacobianMat, MATSEQDENSE, MAT_INITIAL_MATRIX, &jDense);
-
-  scalar_array vals(nrows*ncols);
-  int_array rows(nrows);
-  int_array cols(ncols);
-  for (int iRow=0; iRow < nrows; ++iRow)
-    rows[iRow] = iRow;
-  for (int iCol=0; iCol < ncols; ++iCol)
-    cols[iCol] = iCol;
-  MatGetValues(jDense, nrows, &rows[0], ncols, &cols[0], &vals[0]);
-  const PylithScalar tolerance = 1.0e-06;
-  for (int iRow=0; iRow < nrows; ++iRow)
-    for (int iCol=0; iCol < ncols; ++iCol) {
-      const int index = ncols*iRow+iCol;
-      if (fabs(valsE[index]) > 1.0)
-	CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, vals[index]/valsE[index], tolerance);
-      else
-	CPPUNIT_ASSERT_DOUBLES_EQUAL(valsE[index], vals[index], tolerance);
-    } // for
-  MatDestroy(&jDense);
-} // testIntegrateJacobian
-
-// ----------------------------------------------------------------------
-// Test integrateJacobian().
-void
-pylith::feassemble::TestElasticityExplicit::testIntegrateJacobianLumped(void)
-{ // testIntegrateJacobianLumped
-  CPPUNIT_ASSERT(0 != _data);
-
-  topology::Mesh mesh;
-  ElasticityExplicit integrator;
-  topology::SolutionFields fields(mesh);
-  _initialize(&mesh, &integrator, &fields);
-  integrator._needNewJacobian = true;
-
   topology::Field<topology::Mesh> jacobian(mesh);
   jacobian.label("Jacobian");
   jacobian.vectorFieldType(topology::FieldBase::VECTOR);
@@ -336,7 +241,7 @@
   CPPUNIT_ASSERT_EQUAL(false, integrator.needNewJacobian());
   jacobian.complete();
 
-  const PylithScalar* valsE = _data->valsJacobianLumped;
+  const PylithScalar* valsE = _data->valsJacobian;
 
 #if 0 // DEBUGGING
   // TEMPORARY
@@ -363,14 +268,14 @@
       CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, vals[i]/valsE[i], tolerance);
     else
       CPPUNIT_ASSERT_DOUBLES_EQUAL(valsE[i], vals[i], tolerance);
-} // testIntegrateJacobianLumped
+} // testIntegrateJacobian
 
 // ----------------------------------------------------------------------
 // Test updateStateVars().
 void 
 pylith::feassemble::TestElasticityExplicit::testUpdateStateVars(void)
 { // testUpdateStateVars
-  CPPUNIT_ASSERT(0 != _data);
+  CPPUNIT_ASSERT(_data);
 
   topology::Mesh mesh;
   ElasticityExplicit integrator;
@@ -386,13 +291,16 @@
 void
 pylith::feassemble::TestElasticityExplicit::testStableTimeStep(void)
 { // testStableTimeStep
+  CPPUNIT_ASSERT(_data);
+
   topology::Mesh mesh;
   ElasticityExplicit integrator;
   topology::SolutionFields fields(mesh);
   _initialize(&mesh, &integrator, &fields);
 
-  const PylithScalar stableTimeStep = integrator.stableTimeStep(mesh);
-  CPPUNIT_ASSERT_EQUAL(pylith::PYLITH_MAXSCALAR, stableTimeStep);
+  const PylithScalar dtStable = integrator.stableTimeStep(mesh);
+  const PylithScalar tolerance = 1.0e-6;
+  CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, dtStable/_data->dtStableExplicit, tolerance);
 } // testStableTimeStep
 
 // ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicit.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicit.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicit.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -97,15 +97,9 @@
   /// Test integrateResidual().
   void testIntegrateResidual(void);
 
-  /// Test integrateResidualLumped().
-  void testIntegrateResidualLumped(void);
-
   /// Test integrateJacobian().
   void testIntegrateJacobian(void);
 
-  /// Test integrateJacobianLumped().
-  void testIntegrateJacobianLumped(void);
-
   /// Test updateStateVars().
   void testUpdateStateVars(void);
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicit1DLinear.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicit1DLinear.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicit1DLinear.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -46,9 +46,7 @@
 
   CPPUNIT_TEST( testInitialize );
   CPPUNIT_TEST( testIntegrateResidual );
-  CPPUNIT_TEST( testIntegrateResidualLumped );
   CPPUNIT_TEST( testIntegrateJacobian );
-  CPPUNIT_TEST( testIntegrateJacobianLumped );
   CPPUNIT_TEST( testUpdateStateVars );
   CPPUNIT_TEST( testStableTimeStep );
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicit1DQuadratic.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicit1DQuadratic.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicit1DQuadratic.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -46,9 +46,7 @@
 
   CPPUNIT_TEST( testInitialize );
   CPPUNIT_TEST( testIntegrateResidual );
-  CPPUNIT_TEST( testIntegrateResidualLumped );
   CPPUNIT_TEST( testIntegrateJacobian );
-  CPPUNIT_TEST( testIntegrateJacobianLumped );
   CPPUNIT_TEST( testUpdateStateVars );
   CPPUNIT_TEST( testStableTimeStep );
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicit2DLinear.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicit2DLinear.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicit2DLinear.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -46,9 +46,7 @@
 
   CPPUNIT_TEST( testInitialize );
   CPPUNIT_TEST( testIntegrateResidual );
-  CPPUNIT_TEST( testIntegrateResidualLumped );
   CPPUNIT_TEST( testIntegrateJacobian );
-  CPPUNIT_TEST( testIntegrateJacobianLumped );
   CPPUNIT_TEST( testUpdateStateVars );
   CPPUNIT_TEST( testStableTimeStep );
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicit2DQuadratic.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicit2DQuadratic.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicit2DQuadratic.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -46,9 +46,7 @@
 
   CPPUNIT_TEST( testInitialize );
   CPPUNIT_TEST( testIntegrateResidual );
-  CPPUNIT_TEST( testIntegrateResidualLumped );
   CPPUNIT_TEST( testIntegrateJacobian );
-  CPPUNIT_TEST( testIntegrateJacobianLumped );
   CPPUNIT_TEST( testUpdateStateVars );
   CPPUNIT_TEST( testStableTimeStep );
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicit3DLinear.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicit3DLinear.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicit3DLinear.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -46,9 +46,7 @@
 
   CPPUNIT_TEST( testInitialize );
   CPPUNIT_TEST( testIntegrateResidual );
-  CPPUNIT_TEST( testIntegrateResidualLumped );
   CPPUNIT_TEST( testIntegrateJacobian );
-  CPPUNIT_TEST( testIntegrateJacobianLumped );
   CPPUNIT_TEST( testUpdateStateVars );
   CPPUNIT_TEST( testStableTimeStep );
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicit3DQuadratic.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicit3DQuadratic.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicit3DQuadratic.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -46,9 +46,7 @@
 
   CPPUNIT_TEST( testInitialize );
   CPPUNIT_TEST( testIntegrateResidual );
-  CPPUNIT_TEST( testIntegrateResidualLumped );
   CPPUNIT_TEST( testIntegrateJacobian );
-  CPPUNIT_TEST( testIntegrateJacobianLumped );
   CPPUNIT_TEST( testUpdateStateVars );
   CPPUNIT_TEST( testStableTimeStep );
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitGrav1DLinear.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitGrav1DLinear.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitGrav1DLinear.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -46,9 +46,7 @@
 
   CPPUNIT_TEST( testInitialize );
   CPPUNIT_TEST( testIntegrateResidual );
-  CPPUNIT_TEST( testIntegrateResidualLumped );
   CPPUNIT_TEST( testIntegrateJacobian );
-  CPPUNIT_TEST( testIntegrateJacobianLumped );
   CPPUNIT_TEST( testUpdateStateVars );
 
   CPPUNIT_TEST_SUITE_END();

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitGrav1DQuadratic.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitGrav1DQuadratic.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitGrav1DQuadratic.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -46,9 +46,7 @@
 
   CPPUNIT_TEST( testInitialize );
   CPPUNIT_TEST( testIntegrateResidual );
-  CPPUNIT_TEST( testIntegrateResidualLumped );
   CPPUNIT_TEST( testIntegrateJacobian );
-  CPPUNIT_TEST( testIntegrateJacobianLumped );
   CPPUNIT_TEST( testUpdateStateVars );
 
   CPPUNIT_TEST_SUITE_END();

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitGrav2DLinear.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitGrav2DLinear.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitGrav2DLinear.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -46,9 +46,7 @@
 
   CPPUNIT_TEST( testInitialize );
   CPPUNIT_TEST( testIntegrateResidual );
-  CPPUNIT_TEST( testIntegrateResidualLumped );
   CPPUNIT_TEST( testIntegrateJacobian );
-  CPPUNIT_TEST( testIntegrateJacobianLumped );
   CPPUNIT_TEST( testUpdateStateVars );
 
   CPPUNIT_TEST_SUITE_END();

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitGrav2DQuadratic.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitGrav2DQuadratic.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitGrav2DQuadratic.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -46,9 +46,7 @@
 
   CPPUNIT_TEST( testInitialize );
   CPPUNIT_TEST( testIntegrateResidual );
-  CPPUNIT_TEST( testIntegrateResidualLumped );
   CPPUNIT_TEST( testIntegrateJacobian );
-  CPPUNIT_TEST( testIntegrateJacobianLumped );
   CPPUNIT_TEST( testUpdateStateVars );
 
   CPPUNIT_TEST_SUITE_END();

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitGrav3DLinear.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitGrav3DLinear.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitGrav3DLinear.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -46,9 +46,7 @@
 
   CPPUNIT_TEST( testInitialize );
   CPPUNIT_TEST( testIntegrateResidual );
-  CPPUNIT_TEST( testIntegrateResidualLumped );
   CPPUNIT_TEST( testIntegrateJacobian );
-  CPPUNIT_TEST( testIntegrateJacobianLumped );
   CPPUNIT_TEST( testUpdateStateVars );
 
   CPPUNIT_TEST_SUITE_END();

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitGrav3DQuadratic.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitGrav3DQuadratic.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitGrav3DQuadratic.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -46,9 +46,7 @@
 
   CPPUNIT_TEST( testInitialize );
   CPPUNIT_TEST( testIntegrateResidual );
-  CPPUNIT_TEST( testIntegrateResidualLumped );
   CPPUNIT_TEST( testIntegrateJacobian );
-  CPPUNIT_TEST( testIntegrateJacobianLumped );
   CPPUNIT_TEST( testUpdateStateVars );
 
   CPPUNIT_TEST_SUITE_END();

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeform.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeform.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeform.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -108,52 +108,12 @@
   const PylithScalar* valsE = _data->valsResidual;
   const int sizeE = _data->spaceDim * _data->numVertices;
 
-#if 0 // DEBUGGING
-  residual.view("RESIDUAL");
-  std::cout << "RESIDUAL EXPECTED\n";
-  for (int i=0; i < sizeE; ++i)
-    std::cout << "  " << valsE[i] << "\n";
-#endif
-
   const ALE::Obj<RealSection>& residualSection = residual.section();
   CPPUNIT_ASSERT(!residualSection.isNull());
   const PylithScalar* vals = residualSection->restrictSpace();
   const int size = residualSection->sizeWithBC();
   CPPUNIT_ASSERT_EQUAL(sizeE, size);
 
-  const PylithScalar tolerance = (sizeof(double) == sizeof(PylithScalar)) ? 1.0e-06 : 1.0e-04;
-  for (int i=0; i < size; ++i)
-    if (fabs(valsE[i]) > 1.0)
-      CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, vals[i]/valsE[i], tolerance);
-    else
-      CPPUNIT_ASSERT_DOUBLES_EQUAL(valsE[i], vals[i], tolerance);
-} // testIntegrateResidual
-
-// ----------------------------------------------------------------------
-// Test integrateResidual().
-void
-pylith::feassemble::TestElasticityExplicitLgDeform::testIntegrateResidualLumped(void)
-{ // testIntegrateResidualLumped
-  CPPUNIT_ASSERT(0 != _data);
-
-  topology::Mesh mesh;
-  ElasticityExplicitLgDeform integrator;
-  topology::SolutionFields fields(mesh);
-  _initialize(&mesh, &integrator, &fields);
-
-  topology::Field<topology::Mesh>& residual = fields.get("residual");
-  const PylithScalar t = 1.0;
-  integrator.integrateResidualLumped(residual, t, &fields);
-
-  const PylithScalar* valsE = _data->valsResidualLumped;
-  const int sizeE = _data->spaceDim * _data->numVertices;
-
-  const ALE::Obj<RealSection>& residualSection = residual.section();
-  CPPUNIT_ASSERT(!residualSection.isNull());
-  const PylithScalar* vals = residualSection->restrictSpace();
-  const int size = residualSection->sizeWithBC();
-  CPPUNIT_ASSERT_EQUAL(sizeE, size);
-
 #if 0
   residual.view("RESIDUAL");
   std::cout << "EXPECTED RESIDUAL" << std::endl;
@@ -167,7 +127,7 @@
       CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, vals[i]/valsE[i], tolerance);
     else
       CPPUNIT_ASSERT_DOUBLES_EQUAL(valsE[i], vals[i], tolerance);
-} // testIntegrateResidualLumped
+} // testIntegrateResidual
 
 // ----------------------------------------------------------------------
 // Test integrateJacobian().
@@ -182,61 +142,6 @@
   _initialize(&mesh, &integrator, &fields);
   integrator._needNewJacobian = true;
 
-  topology::Jacobian jacobian(fields.solution());
-
-  const PylithScalar t = 1.0;
-  integrator.integrateJacobian(&jacobian, t, &fields);
-  CPPUNIT_ASSERT_EQUAL(false, integrator.needNewJacobian());
-  jacobian.assemble("final_assembly");
-
-  const PylithScalar* valsE = _data->valsJacobian;
-  const int nrowsE = _data->numVertices * _data->spaceDim;
-  const int ncolsE = _data->numVertices * _data->spaceDim;
-
-  const PetscMat jacobianMat = jacobian.matrix();
-
-  int nrows = 0;
-  int ncols = 0;
-  MatGetSize(jacobianMat, &nrows, &ncols);
-  CPPUNIT_ASSERT_EQUAL(nrowsE, nrows);
-  CPPUNIT_ASSERT_EQUAL(ncolsE, ncols);
-
-  PetscMat jDense;
-  MatConvert(jacobianMat, MATSEQDENSE, MAT_INITIAL_MATRIX, &jDense);
-
-  scalar_array vals(nrows*ncols);
-  int_array rows(nrows);
-  int_array cols(ncols);
-  for (int iRow=0; iRow < nrows; ++iRow)
-    rows[iRow] = iRow;
-  for (int iCol=0; iCol < ncols; ++iCol)
-    cols[iCol] = iCol;
-  MatGetValues(jDense, nrows, &rows[0], ncols, &cols[0], &vals[0]);
-  const PylithScalar tolerance = 1.0e-06;
-  for (int iRow=0; iRow < nrows; ++iRow)
-    for (int iCol=0; iCol < ncols; ++iCol) {
-      const int index = ncols*iRow+iCol;
-      if (fabs(valsE[index]) > 1.0)
-	CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, vals[index]/valsE[index], tolerance);
-      else
-	CPPUNIT_ASSERT_DOUBLES_EQUAL(valsE[index], vals[index], tolerance);
-    } // for
-  MatDestroy(&jDense);
-} // testIntegrateJacobian
-
-// ----------------------------------------------------------------------
-// Test integrateJacobian().
-void
-pylith::feassemble::TestElasticityExplicitLgDeform::testIntegrateJacobianLumped(void)
-{ // testIntegrateJacobianLumped
-  CPPUNIT_ASSERT(0 != _data);
-
-  topology::Mesh mesh;
-  ElasticityExplicitLgDeform integrator;
-  topology::SolutionFields fields(mesh);
-  _initialize(&mesh, &integrator, &fields);
-  integrator._needNewJacobian = true;
-
   topology::Field<topology::Mesh> jacobian(mesh);
   jacobian.label("Jacobian");
   jacobian.vectorFieldType(topology::FieldBase::VECTOR);
@@ -248,7 +153,7 @@
   CPPUNIT_ASSERT_EQUAL(false, integrator.needNewJacobian());
   jacobian.complete();
 
-  const PylithScalar* valsE = _data->valsJacobianLumped;
+  const PylithScalar* valsE = _data->valsJacobian;
 
 #if 0 // DEBUGGING
   // TEMPORARY
@@ -275,7 +180,7 @@
       CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, vals[i]/valsE[i], tolerance);
     else
       CPPUNIT_ASSERT_DOUBLES_EQUAL(valsE[i], vals[i], tolerance);
-} // testIntegrateJacobianLumped
+} // testIntegrateJacobian
 
 // ----------------------------------------------------------------------
 // Test updateStateVars().

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeform.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeform.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeform.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -76,15 +76,9 @@
   /// Test integrateResidual().
   void testIntegrateResidual(void);
 
-  /// Test integrateResidual().
-  void testIntegrateResidualLumped(void);
-
   /// Test integrateJacobian().
   void testIntegrateJacobian(void);
 
-  /// Test integrateJacobian().
-  void testIntegrateJacobianLumped(void);
-
   /// Test updateStateVars().
   void testUpdateStateVars(void);
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeform1DLinear.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeform1DLinear.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeform1DLinear.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -46,9 +46,7 @@
 
   CPPUNIT_TEST( testInitialize );
   CPPUNIT_TEST( testIntegrateResidual );
-  CPPUNIT_TEST( testIntegrateResidualLumped );
   CPPUNIT_TEST( testIntegrateJacobian );
-  CPPUNIT_TEST( testIntegrateJacobianLumped );
   CPPUNIT_TEST( testUpdateStateVars );
 
   CPPUNIT_TEST_SUITE_END();

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeform1DQuadratic.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeform1DQuadratic.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeform1DQuadratic.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -46,9 +46,7 @@
 
   CPPUNIT_TEST( testInitialize );
   CPPUNIT_TEST( testIntegrateResidual );
-  CPPUNIT_TEST( testIntegrateResidualLumped );
   CPPUNIT_TEST( testIntegrateJacobian );
-  CPPUNIT_TEST( testIntegrateJacobianLumped );
   CPPUNIT_TEST( testUpdateStateVars );
 
   CPPUNIT_TEST_SUITE_END();

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeform2DLinear.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeform2DLinear.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeform2DLinear.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -46,9 +46,7 @@
 
   CPPUNIT_TEST( testInitialize );
   CPPUNIT_TEST( testIntegrateResidual );
-  CPPUNIT_TEST( testIntegrateResidualLumped );
   CPPUNIT_TEST( testIntegrateJacobian );
-  CPPUNIT_TEST( testIntegrateJacobianLumped );
   CPPUNIT_TEST( testUpdateStateVars );
 
   CPPUNIT_TEST_SUITE_END();

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeform2DQuadratic.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeform2DQuadratic.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeform2DQuadratic.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -46,9 +46,7 @@
 
   CPPUNIT_TEST( testInitialize );
   CPPUNIT_TEST( testIntegrateResidual );
-  CPPUNIT_TEST( testIntegrateResidualLumped );
   CPPUNIT_TEST( testIntegrateJacobian );
-  CPPUNIT_TEST( testIntegrateJacobianLumped );
   CPPUNIT_TEST( testUpdateStateVars );
 
   CPPUNIT_TEST_SUITE_END();

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeform3DLinear.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeform3DLinear.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeform3DLinear.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -46,9 +46,7 @@
 
   CPPUNIT_TEST( testInitialize );
   CPPUNIT_TEST( testIntegrateResidual );
-  CPPUNIT_TEST( testIntegrateResidualLumped );
   CPPUNIT_TEST( testIntegrateJacobian );
-  CPPUNIT_TEST( testIntegrateJacobianLumped );
   CPPUNIT_TEST( testUpdateStateVars );
 
   CPPUNIT_TEST_SUITE_END();

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeform3DQuadratic.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeform3DQuadratic.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeform3DQuadratic.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -46,9 +46,7 @@
 
   CPPUNIT_TEST( testInitialize );
   CPPUNIT_TEST( testIntegrateResidual );
-  CPPUNIT_TEST( testIntegrateResidualLumped );
   CPPUNIT_TEST( testIntegrateJacobian );
-  CPPUNIT_TEST( testIntegrateJacobianLumped );
   CPPUNIT_TEST( testUpdateStateVars );
 
   CPPUNIT_TEST_SUITE_END();

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeformGrav1DLinear.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeformGrav1DLinear.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeformGrav1DLinear.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -46,9 +46,7 @@
 
   CPPUNIT_TEST( testInitialize );
   CPPUNIT_TEST( testIntegrateResidual );
-  CPPUNIT_TEST( testIntegrateResidualLumped );
   CPPUNIT_TEST( testIntegrateJacobian );
-  CPPUNIT_TEST( testIntegrateJacobianLumped );
   CPPUNIT_TEST( testUpdateStateVars );
 
   CPPUNIT_TEST_SUITE_END();

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeformGrav1DQuadratic.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeformGrav1DQuadratic.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeformGrav1DQuadratic.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -46,9 +46,7 @@
 
   CPPUNIT_TEST( testInitialize );
   CPPUNIT_TEST( testIntegrateResidual );
-  CPPUNIT_TEST( testIntegrateResidualLumped );
   CPPUNIT_TEST( testIntegrateJacobian );
-  CPPUNIT_TEST( testIntegrateJacobianLumped );
   CPPUNIT_TEST( testUpdateStateVars );
 
   CPPUNIT_TEST_SUITE_END();

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeformGrav2DLinear.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeformGrav2DLinear.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeformGrav2DLinear.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -46,9 +46,7 @@
 
   CPPUNIT_TEST( testInitialize );
   CPPUNIT_TEST( testIntegrateResidual );
-  CPPUNIT_TEST( testIntegrateResidualLumped );
   CPPUNIT_TEST( testIntegrateJacobian );
-  CPPUNIT_TEST( testIntegrateJacobianLumped );
   CPPUNIT_TEST( testUpdateStateVars );
 
   CPPUNIT_TEST_SUITE_END();

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeformGrav2DQuadratic.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeformGrav2DQuadratic.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeformGrav2DQuadratic.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -46,9 +46,7 @@
 
   CPPUNIT_TEST( testInitialize );
   CPPUNIT_TEST( testIntegrateResidual );
-  CPPUNIT_TEST( testIntegrateResidualLumped );
   CPPUNIT_TEST( testIntegrateJacobian );
-  CPPUNIT_TEST( testIntegrateJacobianLumped );
   CPPUNIT_TEST( testUpdateStateVars );
 
   CPPUNIT_TEST_SUITE_END();

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeformGrav3DLinear.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeformGrav3DLinear.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeformGrav3DLinear.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -46,9 +46,7 @@
 
   CPPUNIT_TEST( testInitialize );
   CPPUNIT_TEST( testIntegrateResidual );
-  CPPUNIT_TEST( testIntegrateResidualLumped );
   CPPUNIT_TEST( testIntegrateJacobian );
-  CPPUNIT_TEST( testIntegrateJacobianLumped );
   CPPUNIT_TEST( testUpdateStateVars );
 
   CPPUNIT_TEST_SUITE_END();

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeformGrav3DQuadratic.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeformGrav3DQuadratic.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitLgDeformGrav3DQuadratic.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -46,9 +46,7 @@
 
   CPPUNIT_TEST( testInitialize );
   CPPUNIT_TEST( testIntegrateResidual );
-  CPPUNIT_TEST( testIntegrateResidualLumped );
   CPPUNIT_TEST( testIntegrateJacobian );
-  CPPUNIT_TEST( testIntegrateJacobianLumped );
   CPPUNIT_TEST( testUpdateStateVars );
 
   CPPUNIT_TEST_SUITE_END();

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitTet4.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitTet4.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitTet4.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -58,7 +58,7 @@
   GeometryTet3D geometry;
   _quadrature->refGeometry(&geometry);
 
-  _data = new ElasticityExplicitData3DLinear();
+  _data = new ElasticityExplicitData3DLinear;
   CPPUNIT_ASSERT(0 != _data);
   _material = new materials::ElasticIsotropic3D;
   CPPUNIT_ASSERT(0 != _material);
@@ -213,46 +213,6 @@
 } // testIntegrateResidual
 
 // ----------------------------------------------------------------------
-// Test integrateResidual().
-void
-pylith::feassemble::TestElasticityExplicitTet4::testIntegrateResidualLumped(void)
-{ // testIntegrateResidualLumped
-  CPPUNIT_ASSERT(0 != _data);
-
-  topology::Mesh mesh;
-  ElasticityExplicitTet4 integrator;
-  topology::SolutionFields fields(mesh);
-  _initialize(&mesh, &integrator, &fields);
-
-  topology::Field<topology::Mesh>& residual = fields.get("residual");
-  const PylithScalar t = 1.0;
-  integrator.integrateResidualLumped(residual, t, &fields);
-
-  const PylithScalar* valsE = _data->valsResidualLumped;
-  const int sizeE = _data->spaceDim * _data->numVertices;
-
-  const ALE::Obj<RealSection>& residualSection = residual.section();
-  CPPUNIT_ASSERT(!residualSection.isNull());
-  const PylithScalar* vals = residualSection->restrictSpace();
-  const int size = residualSection->sizeWithBC();
-  CPPUNIT_ASSERT_EQUAL(sizeE, size);
-
-#if 0 // DEBUGGING
-  residual.view("RESIDUAL");
-  std::cout << "EXPECTED RESIDUAL" << std::endl;
-  for (int i=0; i < size; ++i)
-    std::cout << "  " << valsE[i] << std::endl;
-#endif // DEBUGGING
-
-  const PylithScalar tolerance = 1.0e-06;
-  for (int i=0; i < size; ++i)
-    if (fabs(valsE[i]) > 1.0)
-      CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, vals[i]/valsE[i], tolerance);
-    else
-      CPPUNIT_ASSERT_DOUBLES_EQUAL(valsE[i], vals[i], tolerance);
-} // testIntegrateResidualLumped
-
-// ----------------------------------------------------------------------
 // Test integrateJacobian().
 void
 pylith::feassemble::TestElasticityExplicitTet4::testIntegrateJacobian(void)
@@ -265,61 +225,6 @@
   _initialize(&mesh, &integrator, &fields);
   integrator._needNewJacobian = true;
 
-  topology::Jacobian jacobian(fields.solution());
-
-  const PylithScalar t = 1.0;
-  integrator.integrateJacobian(&jacobian, t, &fields);
-  CPPUNIT_ASSERT_EQUAL(false, integrator.needNewJacobian());
-  jacobian.assemble("final_assembly");
-
-  const PylithScalar* valsE = _data->valsJacobian;
-  const int nrowsE = _data->numVertices * _data->spaceDim;
-  const int ncolsE = _data->numVertices * _data->spaceDim;
-
-  const PetscMat jacobianMat = jacobian.matrix();
-
-  int nrows = 0;
-  int ncols = 0;
-  MatGetSize(jacobianMat, &nrows, &ncols);
-  CPPUNIT_ASSERT_EQUAL(nrowsE, nrows);
-  CPPUNIT_ASSERT_EQUAL(ncolsE, ncols);
-
-  PetscMat jDense;
-  MatConvert(jacobianMat, MATSEQDENSE, MAT_INITIAL_MATRIX, &jDense);
-
-  scalar_array vals(nrows*ncols);
-  int_array rows(nrows);
-  int_array cols(ncols);
-  for (int iRow=0; iRow < nrows; ++iRow)
-    rows[iRow] = iRow;
-  for (int iCol=0; iCol < ncols; ++iCol)
-    cols[iCol] = iCol;
-  MatGetValues(jDense, nrows, &rows[0], ncols, &cols[0], &vals[0]);
-  const PylithScalar tolerance = 1.0e-06;
-  for (int iRow=0; iRow < nrows; ++iRow)
-    for (int iCol=0; iCol < ncols; ++iCol) {
-      const int index = ncols*iRow+iCol;
-      if (fabs(valsE[index]) > 1.0)
-	CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, vals[index]/valsE[index], tolerance);
-      else
-	CPPUNIT_ASSERT_DOUBLES_EQUAL(valsE[index], vals[index], tolerance);
-    } // for
-  MatDestroy(&jDense);
-} // testIntegrateJacobian
-
-// ----------------------------------------------------------------------
-// Test integrateJacobian().
-void
-pylith::feassemble::TestElasticityExplicitTet4::testIntegrateJacobianLumped(void)
-{ // testIntegrateJacobian
-  CPPUNIT_ASSERT(0 != _data);
-
-  topology::Mesh mesh;
-  ElasticityExplicitTet4 integrator;
-  topology::SolutionFields fields(mesh);
-  _initialize(&mesh, &integrator, &fields);
-  integrator._needNewJacobian = true;
-
   topology::Field<topology::Mesh> jacobian(mesh);
   jacobian.label("Jacobian");
   jacobian.vectorFieldType(topology::FieldBase::VECTOR);
@@ -331,19 +236,10 @@
   CPPUNIT_ASSERT_EQUAL(false, integrator.needNewJacobian());
   jacobian.complete();
 
-  const PylithScalar* valsMatrixE = _data->valsJacobian;
+  const PylithScalar* valsE = _data->valsJacobian;
   const int sizeE = _data->numVertices * _data->spaceDim;
-  scalar_array valsE(sizeE);
   const int spaceDim = _data->spaceDim;
   const int numBasis = _data->numVertices;
-  for (int iBasis=0; iBasis < numBasis; ++iBasis)
-    for (int iDim=0; iDim < spaceDim; ++iDim) {
-      const int indexRow = (iBasis*spaceDim+iDim)*numBasis*spaceDim;
-      PylithScalar value = 0.0;
-      for (int jBasis=0; jBasis < numBasis; ++jBasis)
-	value += valsMatrixE[indexRow + jBasis*spaceDim+iDim];
-      valsE[iBasis*spaceDim+iDim] = value;
-    } // for
 
 #if 0 // DEBUGGING
   jacobian.view("JACOBIAN");
@@ -365,7 +261,7 @@
       CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, vals[i]/valsE[i], tolerance);
     else
       CPPUNIT_ASSERT_DOUBLES_EQUAL(valsE[i], vals[i], tolerance);
-} // testIntegrateJacobianLumped
+} // testIntegrateJacobian
 
 // ----------------------------------------------------------------------
 // Test updateStateVars().
@@ -388,13 +284,16 @@
 void
 pylith::feassemble::TestElasticityExplicitTet4::testStableTimeStep(void)
 { // testStableTimeStep
+  CPPUNIT_ASSERT(_data);
+
   topology::Mesh mesh;
   ElasticityExplicitTet4 integrator;
   topology::SolutionFields fields(mesh);
   _initialize(&mesh, &integrator, &fields);
 
-  const PylithScalar stableTimeStep = integrator.stableTimeStep(mesh);
-  CPPUNIT_ASSERT_EQUAL(pylith::PYLITH_MAXSCALAR, stableTimeStep);
+  const PylithScalar dtStable = integrator.stableTimeStep(mesh);
+  const PylithScalar tolerance = 1.0e-6;
+  CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, dtStable/_data->dtStableExplicit, tolerance);
 } // testStableTimeStep
 
 // ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitTet4.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitTet4.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitTet4.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -57,9 +57,7 @@
   CPPUNIT_TEST( testUseSolnIncr );
   CPPUNIT_TEST( testInitialize );
   CPPUNIT_TEST( testIntegrateResidual );
-  CPPUNIT_TEST( testIntegrateResidualLumped );
   CPPUNIT_TEST( testIntegrateJacobian );
-  CPPUNIT_TEST( testIntegrateJacobianLumped );
   CPPUNIT_TEST( testUpdateStateVars );
   CPPUNIT_TEST( testStableTimeStep );
 
@@ -95,15 +93,9 @@
   /// Test integrateResidual().
   void testIntegrateResidual(void);
 
-  /// Test integrateResidualLumped().
-  void testIntegrateResidualLumped(void);
-
   /// Test integrateJacobian().
   void testIntegrateJacobian(void);
 
-  /// Test integrateJacobianLumped().
-  void testIntegrateJacobianLumped(void);
-
   /// Test updateStateVars().
   void testUpdateStateVars(void);
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitTri3.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitTri3.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitTri3.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -213,46 +213,6 @@
 } // testIntegrateResidual
 
 // ----------------------------------------------------------------------
-// Test integrateResidual().
-void
-pylith::feassemble::TestElasticityExplicitTri3::testIntegrateResidualLumped(void)
-{ // testIntegrateResidualLumped
-  CPPUNIT_ASSERT(0 != _data);
-
-  topology::Mesh mesh;
-  ElasticityExplicitTri3 integrator;
-  topology::SolutionFields fields(mesh);
-  _initialize(&mesh, &integrator, &fields);
-
-  topology::Field<topology::Mesh>& residual = fields.get("residual");
-  const PylithScalar t = 1.0;
-  integrator.integrateResidualLumped(residual, t, &fields);
-
-  const PylithScalar* valsE = _data->valsResidualLumped;
-  const int sizeE = _data->spaceDim * _data->numVertices;
-
-  const ALE::Obj<RealSection>& residualSection = residual.section();
-  CPPUNIT_ASSERT(!residualSection.isNull());
-  const PylithScalar* vals = residualSection->restrictSpace();
-  const int size = residualSection->sizeWithBC();
-  CPPUNIT_ASSERT_EQUAL(sizeE, size);
-
-#if 0 // DEBUGGING
-  residual.view("RESIDUAL");
-  std::cout << "EXPECTED RESIDUAL" << std::endl;
-  for (int i=0; i < size; ++i)
-    std::cout << "  " << valsE[i] << std::endl;
-#endif // DEBUGGING
-
-  const PylithScalar tolerance = 1.0e-06;
-  for (int i=0; i < size; ++i)
-    if (fabs(valsE[i]) > 1.0)
-      CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, vals[i]/valsE[i], tolerance);
-    else
-      CPPUNIT_ASSERT_DOUBLES_EQUAL(valsE[i], vals[i], tolerance);
-} // testIntegrateResidualLumped
-
-// ----------------------------------------------------------------------
 // Test integrateJacobian().
 void
 pylith::feassemble::TestElasticityExplicitTri3::testIntegrateJacobian(void)
@@ -265,61 +225,6 @@
   _initialize(&mesh, &integrator, &fields);
   integrator._needNewJacobian = true;
 
-  topology::Jacobian jacobian(fields.solution());
-
-  const PylithScalar t = 1.0;
-  integrator.integrateJacobian(&jacobian, t, &fields);
-  CPPUNIT_ASSERT_EQUAL(false, integrator.needNewJacobian());
-  jacobian.assemble("final_assembly");
-
-  const PylithScalar* valsE = _data->valsJacobian;
-  const int nrowsE = _data->numVertices * _data->spaceDim;
-  const int ncolsE = _data->numVertices * _data->spaceDim;
-
-  const PetscMat jacobianMat = jacobian.matrix();
-
-  int nrows = 0;
-  int ncols = 0;
-  MatGetSize(jacobianMat, &nrows, &ncols);
-  CPPUNIT_ASSERT_EQUAL(nrowsE, nrows);
-  CPPUNIT_ASSERT_EQUAL(ncolsE, ncols);
-
-  PetscMat jDense;
-  MatConvert(jacobianMat, MATSEQDENSE, MAT_INITIAL_MATRIX, &jDense);
-
-  scalar_array vals(nrows*ncols);
-  int_array rows(nrows);
-  int_array cols(ncols);
-  for (int iRow=0; iRow < nrows; ++iRow)
-    rows[iRow] = iRow;
-  for (int iCol=0; iCol < ncols; ++iCol)
-    cols[iCol] = iCol;
-  MatGetValues(jDense, nrows, &rows[0], ncols, &cols[0], &vals[0]);
-  const PylithScalar tolerance = 1.0e-06;
-  for (int iRow=0; iRow < nrows; ++iRow)
-    for (int iCol=0; iCol < ncols; ++iCol) {
-      const int index = ncols*iRow+iCol;
-      if (fabs(valsE[index]) > 1.0)
-	CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, vals[index]/valsE[index], tolerance);
-      else
-	CPPUNIT_ASSERT_DOUBLES_EQUAL(valsE[index], vals[index], tolerance);
-    } // for
-  MatDestroy(&jDense);
-} // testIntegrateJacobian
-
-// ----------------------------------------------------------------------
-// Test integrateJacobian().
-void
-pylith::feassemble::TestElasticityExplicitTri3::testIntegrateJacobianLumped(void)
-{ // testIntegrateJacobian
-  CPPUNIT_ASSERT(0 != _data);
-
-  topology::Mesh mesh;
-  ElasticityExplicitTri3 integrator;
-  topology::SolutionFields fields(mesh);
-  _initialize(&mesh, &integrator, &fields);
-  integrator._needNewJacobian = true;
-
   topology::Field<topology::Mesh> jacobian(mesh);
   jacobian.label("Jacobian");
   jacobian.vectorFieldType(topology::FieldBase::VECTOR);
@@ -331,19 +236,10 @@
   CPPUNIT_ASSERT_EQUAL(false, integrator.needNewJacobian());
   jacobian.complete();
 
-  const PylithScalar* valsMatrixE = _data->valsJacobian;
+  const PylithScalar* valsE = _data->valsJacobian;
   const int sizeE = _data->numVertices * _data->spaceDim;
-  scalar_array valsE(sizeE);
   const int spaceDim = _data->spaceDim;
   const int numBasis = _data->numVertices;
-  for (int iBasis=0; iBasis < numBasis; ++iBasis)
-    for (int iDim=0; iDim < spaceDim; ++iDim) {
-      const int indexRow = (iBasis*spaceDim+iDim)*numBasis*spaceDim;
-      PylithScalar value = 0.0;
-      for (int jBasis=0; jBasis < numBasis; ++jBasis)
-	value += valsMatrixE[indexRow + jBasis*spaceDim+iDim];
-      valsE[iBasis*spaceDim+iDim] = value;
-    } // for
 
 #if 0 // DEBUGGING
   jacobian.view("JACOBIAN");
@@ -365,7 +261,7 @@
       CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, vals[i]/valsE[i], tolerance);
     else
       CPPUNIT_ASSERT_DOUBLES_EQUAL(valsE[i], vals[i], tolerance);
-} // testIntegrateJacobianLumped
+} // testIntegrateJacobian
 
 // ----------------------------------------------------------------------
 // Test updateStateVars().
@@ -388,13 +284,16 @@
 void
 pylith::feassemble::TestElasticityExplicitTri3::testStableTimeStep(void)
 { // testStableTimeStep
+  CPPUNIT_ASSERT(_data);
+
   topology::Mesh mesh;
   ElasticityExplicitTri3 integrator;
   topology::SolutionFields fields(mesh);
   _initialize(&mesh, &integrator, &fields);
 
-  const PylithScalar stableTimeStep = integrator.stableTimeStep(mesh);
-  CPPUNIT_ASSERT_EQUAL(pylith::PYLITH_MAXSCALAR, stableTimeStep);
+  const PylithScalar dtStable = integrator.stableTimeStep(mesh);
+  const PylithScalar tolerance = 1.0e-6;
+  CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, dtStable/_data->dtStableExplicit, tolerance);
 } // testStableTimeStep
 
 // ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitTri3.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitTri3.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestElasticityExplicitTri3.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -57,9 +57,7 @@
   CPPUNIT_TEST( testUseSolnIncr );
   CPPUNIT_TEST( testInitialize );
   CPPUNIT_TEST( testIntegrateResidual );
-  CPPUNIT_TEST( testIntegrateResidualLumped );
   CPPUNIT_TEST( testIntegrateJacobian );
-  CPPUNIT_TEST( testIntegrateJacobianLumped );
   CPPUNIT_TEST( testUpdateStateVars );
   CPPUNIT_TEST( testStableTimeStep );
 
@@ -95,15 +93,9 @@
   /// Test integrateResidual().
   void testIntegrateResidual(void);
 
-  /// Test integrateResidualLumped().
-  void testIntegrateResidualLumped(void);
-
   /// Test integrateJacobian().
   void testIntegrateJacobian(void);
 
-  /// Test integrateJacobianLumped().
-  void testIntegrateJacobianLumped(void);
-
   /// Test updateStateVars().
   void testUpdateStateVars(void);
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestIntegrator.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestIntegrator.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/TestIntegrator.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -22,6 +22,7 @@
 
 #include "pylith/feassemble/ElasticityExplicit.hh" // USES ElasticityExplicit
 #include "pylith/feassemble/ElasticityImplicit.hh" // USES ElasticityImplicit
+#include "pylith/bc/Neumann.hh" // USES Neumann
 #include "pylith/topology/Mesh.hh" // USES Mesh
 #include "pylith/feassemble/Quadrature.hh" // USES Quadrature
 #include "pylith/utils/constdefs.h" // USES MAXSCALAR
@@ -48,7 +49,7 @@
 void
 pylith::feassemble::TestIntegrator::testStableTimeStep(void)
 { // testStableTimeStep
-  ElasticityExplicit integrator;
+  bc::Neumann integrator;
   topology::Mesh mesh;
 
   CPPUNIT_ASSERT_EQUAL(pylith::PYLITH_MAXSCALAR,

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicit.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicit.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicit.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -63,20 +63,8 @@
     return residual.flatten()
 
 
-  def calculateJacobian(self, integrator):
+  def calculateResidual(self, integrator):
     """
-    Calculate contribution to Jacobian matrix of operator for integrator.
-
-    [A] = (1/dt**2)[M]
-    """
-    M = integrator._calculateMassMat()
-
-    jacobian = 1.0/integrator.dt**2 * M
-    return jacobian
-
-
-  def calculateResidualLumped(self, integrator):
-    """
     Calculate contribution to residual of operator for integrator.
 
     {r} = (1/dt**2)[M](-{u(t+dt)} + 2 {u(t)} - {u(t-dt)}) -
@@ -94,7 +82,7 @@
     return residual.flatten()
 
 
-  def calculateJacobianLumped(self, integrator):
+  def calculateJacobian(self, integrator):
     """
     Calculate contribution to Jacobian matrix of operator for integrator.
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitApp.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitApp.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitApp.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -54,8 +54,7 @@
     self._collectData()
     self._calculateResidual()
     self._calculateJacobian()
-    self._calculateResidualLumped()
-    self._calculateJacobianLumped()
+    self._calcDtStable()
     self._initData()
     self.data.write(self.name)
     return
@@ -63,34 +62,42 @@
 
   # PRIVATE METHODS ////////////////////////////////////////////////////
 
-  def _calculateResidualLumped(self):
+  def _calcDtStable(self):
     """
+    Calculate stable time step for explicit time stepping.
+    """
+    vp = ((self.lameLambda + 2.0*self.lameMu) / self.density)**0.5
+    minCellWidth = self.mesh.minCellWidth
+    self.dtStableExplicit = minCellWidth / vp
+    return
+
+
+  def _calculateResidual(self):
+    """
     Calculate contribution to residual of operator for integrator.
     """
-    self.valsResidualLumped = self.formulation.calculateResidualLumped(self)
+    self.valsResidual = self.formulation.calculateResidual(self)
     if self.useGravity:
-      self.valsResidualLumped += self._calculateGravityVec()
+      self.valsResidual += self._calculateGravityVec()
     return
 
 
-  def _calculateJacobianLumped(self):
+  def _calculateJacobian(self):
     """
     Calculate contribution to Jacobian matrix of operator for integrator.
     """
-    self.valsJacobianLumped = self.formulation.calculateJacobianLumped(self)
+    self.valsJacobian = self.formulation.calculateJacobian(self)
     return
 
 
   def _initData(self):
 
     ElasticityApp._initData(self)
+    
     # Calculated values
-    self.data.addArray(vtype="PylithScalar", name="_valsResidualLumped",
-                       values=self.valsResidualLumped,
-                       format="%16.8e", ncols=self.spaceDim)
-    self.data.addArray(vtype="PylithScalar", name="_valsJacobianLumped",
-                       values=self.valsJacobianLumped,
-                       format="%16.8e", ncols=self.spaceDim)
+    self.data.addScalar(vtype="PylithScalar", name="_dtStableExplicit",
+                       value=self.dtStableExplicit,
+                       format="%16.8e");
     return
 
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -21,8 +21,7 @@
 // ----------------------------------------------------------------------
 // Constructor
 pylith::feassemble::ElasticityExplicitData::ElasticityExplicitData(void) :
-  valsResidualLumped(0),
-  valsJacobianLumped(0)
+  dtStableExplicit(1.0e+99)
 { // constructor
 } // constructor
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -44,8 +44,7 @@
 
   /// @name Calculated values.
   //@{
-  PylithScalar* valsResidualLumped; ///< Expected values from residual calculation (lumped Jacobian).
-  PylithScalar* valsJacobianLumped; ///< Expected values from lumped Jacobian calculation.
+  PylithScalar dtStableExplicit; ///< Stable time step for explicit time integration.
   //@}
 };
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData1DLinear.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData1DLinear.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData1DLinear.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -43,6 +43,8 @@
 
 const PylithScalar pylith::feassemble::ElasticityExplicitData1DLinear::_dt =   1.00000000e-02;
 
+const PylithScalar pylith::feassemble::ElasticityExplicitData1DLinear::_dtStableExplicit =   3.75000000e-04;
+
 const PylithScalar pylith::feassemble::ElasticityExplicitData1DLinear::_gravityVec[] = {
  -1.00000000e+08,
 };
@@ -95,23 +97,11 @@
 };
 
 const PylithScalar pylith::feassemble::ElasticityExplicitData1DLinear::_valsResidual[] = {
-  1.71634375e+10,
- -1.72365625e+10,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitData1DLinear::_valsJacobian[] = {
-  1.40625000e+07,
-  1.40625000e+07,
-  1.40625000e+07,
-  1.40625000e+07,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitData1DLinear::_valsResidualLumped[] = {
   1.71690625e+10,
  -1.72421875e+10,
 };
 
-const PylithScalar pylith::feassemble::ElasticityExplicitData1DLinear::_valsJacobianLumped[] = {
+const PylithScalar pylith::feassemble::ElasticityExplicitData1DLinear::_valsJacobian[] = {
   2.81250000e+07,
   2.81250000e+07,
 };
@@ -129,6 +119,7 @@
   matId = _matId;
   matLabel = const_cast<char*>(_matLabel);
   dt = _dt;
+  dtStableExplicit = _dtStableExplicit;
   gravityVec = const_cast<PylithScalar*>(_gravityVec);
   vertices = const_cast<PylithScalar*>(_vertices);
   cells = const_cast<int*>(_cells);
@@ -142,8 +133,6 @@
   fieldTmdt = const_cast<PylithScalar*>(_fieldTmdt);
   valsResidual = const_cast<PylithScalar*>(_valsResidual);
   valsJacobian = const_cast<PylithScalar*>(_valsJacobian);
-  valsResidualLumped = const_cast<PylithScalar*>(_valsResidualLumped);
-  valsJacobianLumped = const_cast<PylithScalar*>(_valsJacobianLumped);
 } // constructor
 
 pylith::feassemble::ElasticityExplicitData1DLinear::~ElasticityExplicitData1DLinear(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData1DLinear.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData1DLinear.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData1DLinear.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -65,6 +65,8 @@
 
   static const PylithScalar _dt;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const PylithScalar _gravityVec[];
 
   static const PylithScalar _vertices[];
@@ -91,10 +93,6 @@
 
   static const PylithScalar _valsJacobian[];
 
-  static const PylithScalar _valsResidualLumped[];
-
-  static const PylithScalar _valsJacobianLumped[];
-
 };
 
 #endif // pylith_feassemble_elasticityexplicitdata1dlinear_hh

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData1DQuadratic.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData1DQuadratic.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData1DQuadratic.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -43,6 +43,8 @@
 
 const PylithScalar pylith::feassemble::ElasticityExplicitData1DQuadratic::_dt =   1.00000000e-02;
 
+const PylithScalar pylith::feassemble::ElasticityExplicitData1DQuadratic::_dtStableExplicit =   3.75000000e-04;
+
 const PylithScalar pylith::feassemble::ElasticityExplicitData1DQuadratic::_gravityVec[] = {
  -1.00000000e+08,
 };
@@ -109,30 +111,12 @@
 };
 
 const PylithScalar pylith::feassemble::ElasticityExplicitData1DQuadratic::_valsResidual[] = {
-  6.00504167e+10,
-  1.45260729e+11,
- -2.05377708e+11,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitData1DQuadratic::_valsJacobian[] = {
-  6.25000000e+06,
- -3.12500000e+06,
-  6.25000000e+06,
- -3.12500000e+06,
-  6.25000000e+06,
-  6.25000000e+06,
-  6.25000000e+06,
-  6.25000000e+06,
-  2.50000000e+07,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitData1DQuadratic::_valsResidualLumped[] = {
   6.00563542e+10,
   1.45266667e+11,
  -2.05389583e+11,
 };
 
-const PylithScalar pylith::feassemble::ElasticityExplicitData1DQuadratic::_valsJacobianLumped[] = {
+const PylithScalar pylith::feassemble::ElasticityExplicitData1DQuadratic::_valsJacobian[] = {
   9.37500000e+06,
   9.37500000e+06,
   3.75000000e+07,
@@ -151,6 +135,7 @@
   matId = _matId;
   matLabel = const_cast<char*>(_matLabel);
   dt = _dt;
+  dtStableExplicit = _dtStableExplicit;
   gravityVec = const_cast<PylithScalar*>(_gravityVec);
   vertices = const_cast<PylithScalar*>(_vertices);
   cells = const_cast<int*>(_cells);
@@ -164,8 +149,6 @@
   fieldTmdt = const_cast<PylithScalar*>(_fieldTmdt);
   valsResidual = const_cast<PylithScalar*>(_valsResidual);
   valsJacobian = const_cast<PylithScalar*>(_valsJacobian);
-  valsResidualLumped = const_cast<PylithScalar*>(_valsResidualLumped);
-  valsJacobianLumped = const_cast<PylithScalar*>(_valsJacobianLumped);
 } // constructor
 
 pylith::feassemble::ElasticityExplicitData1DQuadratic::~ElasticityExplicitData1DQuadratic(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData1DQuadratic.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData1DQuadratic.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData1DQuadratic.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -65,6 +65,8 @@
 
   static const PylithScalar _dt;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const PylithScalar _gravityVec[];
 
   static const PylithScalar _vertices[];
@@ -91,10 +93,6 @@
 
   static const PylithScalar _valsJacobian[];
 
-  static const PylithScalar _valsResidualLumped[];
-
-  static const PylithScalar _valsJacobianLumped[];
-
 };
 
 #endif // pylith_feassemble_elasticityexplicitdata1dquadratic_hh

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData2DLinear.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData2DLinear.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData2DLinear.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -43,6 +43,8 @@
 
 const PylithScalar pylith::feassemble::ElasticityExplicitData2DLinear::_dt =   1.00000000e-02;
 
+const PylithScalar pylith::feassemble::ElasticityExplicitData2DLinear::_dtStableExplicit =   1.50923086e-04;
+
 const PylithScalar pylith::feassemble::ElasticityExplicitData2DLinear::_gravityVec[] = {
   0.00000000e+00, -1.00000000e+08,
 };
@@ -100,39 +102,12 @@
 };
 
 const PylithScalar pylith::feassemble::ElasticityExplicitData2DLinear::_valsResidual[] = {
- -7.10095578e+10,  1.36893348e+11,
- -1.02829242e+10, -1.20976325e+11,
-  8.12828570e+10, -1.59202314e+10,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitData2DLinear::_valsJacobian[] = {
-  1.52777778e+06,  0.00000000e+00,
-  1.52777778e+06,  0.00000000e+00,
-  1.52777778e+06,  0.00000000e+00,
-  0.00000000e+00,  1.52777778e+06,
-  0.00000000e+00,  1.52777778e+06,
-  0.00000000e+00,  1.52777778e+06,
-  1.52777778e+06,  0.00000000e+00,
-  1.52777778e+06,  0.00000000e+00,
-  1.52777778e+06,  0.00000000e+00,
-  0.00000000e+00,  1.52777778e+06,
-  0.00000000e+00,  1.52777778e+06,
-  0.00000000e+00,  1.52777778e+06,
-  1.52777778e+06,  0.00000000e+00,
-  1.52777778e+06,  0.00000000e+00,
-  1.52777778e+06,  0.00000000e+00,
-  0.00000000e+00,  1.52777778e+06,
-  0.00000000e+00,  1.52777778e+06,
-  0.00000000e+00,  1.52777778e+06,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitData2DLinear::_valsResidualLumped[] = {
  -7.10086411e+10,  1.36894418e+11,
  -1.02842992e+10, -1.20980297e+11,
   8.12833153e+10, -1.59173286e+10,
 };
 
-const PylithScalar pylith::feassemble::ElasticityExplicitData2DLinear::_valsJacobianLumped[] = {
+const PylithScalar pylith::feassemble::ElasticityExplicitData2DLinear::_valsJacobian[] = {
   4.58333333e+06,  4.58333333e+06,
   4.58333333e+06,  4.58333333e+06,
   4.58333333e+06,  4.58333333e+06,
@@ -151,6 +126,7 @@
   matId = _matId;
   matLabel = const_cast<char*>(_matLabel);
   dt = _dt;
+  dtStableExplicit = _dtStableExplicit;
   gravityVec = const_cast<PylithScalar*>(_gravityVec);
   vertices = const_cast<PylithScalar*>(_vertices);
   cells = const_cast<int*>(_cells);
@@ -164,8 +140,6 @@
   fieldTmdt = const_cast<PylithScalar*>(_fieldTmdt);
   valsResidual = const_cast<PylithScalar*>(_valsResidual);
   valsJacobian = const_cast<PylithScalar*>(_valsJacobian);
-  valsResidualLumped = const_cast<PylithScalar*>(_valsResidualLumped);
-  valsJacobianLumped = const_cast<PylithScalar*>(_valsJacobianLumped);
 } // constructor
 
 pylith::feassemble::ElasticityExplicitData2DLinear::~ElasticityExplicitData2DLinear(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData2DLinear.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData2DLinear.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData2DLinear.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -65,6 +65,8 @@
 
   static const PylithScalar _dt;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const PylithScalar _gravityVec[];
 
   static const PylithScalar _vertices[];
@@ -91,10 +93,6 @@
 
   static const PylithScalar _valsJacobian[];
 
-  static const PylithScalar _valsResidualLumped[];
-
-  static const PylithScalar _valsJacobianLumped[];
-
 };
 
 #endif // pylith_feassemble_elasticityexplicitdata2dlinear_hh

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData2DQuadratic.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData2DQuadratic.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData2DQuadratic.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -43,6 +43,8 @@
 
 const PylithScalar pylith::feassemble::ElasticityExplicitData2DQuadratic::_dt =   1.00000000e-02;
 
+const PylithScalar pylith::feassemble::ElasticityExplicitData2DQuadratic::_dtStableExplicit =   2.63523138e-04;
+
 const PylithScalar pylith::feassemble::ElasticityExplicitData2DQuadratic::_gravityVec[] = {
   0.00000000e+00, -1.00000000e+08,
 };
@@ -170,90 +172,6 @@
 };
 
 const PylithScalar pylith::feassemble::ElasticityExplicitData2DQuadratic::_valsResidual[] = {
-  1.14469580e+10,  9.89206525e+10,
- -3.22261697e+10, -5.24164966e+09,
-  5.33382294e+09,  6.79748894e+10,
-  6.97040375e+10,  1.10679118e+11,
- -7.00903642e+10, -2.03315152e+11,
-  1.58455201e+10, -6.90098433e+10,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitData2DQuadratic::_valsJacobian[] = {
-  2.24121094e+06,  0.00000000e+00,
-  2.41699219e+05,  0.00000000e+00,
-  2.41699219e+05,  0.00000000e+00,
-  4.21875000e+06,  0.00000000e+00,
- -1.36230469e+06,  0.00000000e+00,
- -1.36230469e+06,  0.00000000e+00,
-  0.00000000e+00,  2.24121094e+06,
-  0.00000000e+00,  2.41699219e+05,
-  0.00000000e+00,  2.41699219e+05,
-  0.00000000e+00,  4.21875000e+06,
-  0.00000000e+00, -1.36230469e+06,
-  0.00000000e+00, -1.36230469e+06,
-  2.41699219e+05,  0.00000000e+00,
-  3.61083984e+06,  0.00000000e+00,
- -6.73828125e+05,  0.00000000e+00,
-  3.45703125e+06,  0.00000000e+00,
- -1.52343750e+06,  0.00000000e+00,
- -1.12792969e+06,  0.00000000e+00,
-  0.00000000e+00,  2.41699219e+05,
-  0.00000000e+00,  3.61083984e+06,
-  0.00000000e+00, -6.73828125e+05,
-  0.00000000e+00,  3.45703125e+06,
-  0.00000000e+00, -1.52343750e+06,
-  0.00000000e+00, -1.12792969e+06,
-  2.41699219e+05,  0.00000000e+00,
- -6.73828125e+05,  0.00000000e+00,
-  3.61083984e+06,  0.00000000e+00,
-  3.45703125e+06,  0.00000000e+00,
- -1.12792969e+06,  0.00000000e+00,
- -1.52343750e+06,  0.00000000e+00,
-  0.00000000e+00,  2.41699219e+05,
-  0.00000000e+00, -6.73828125e+05,
-  0.00000000e+00,  3.61083984e+06,
-  0.00000000e+00,  3.45703125e+06,
-  0.00000000e+00, -1.12792969e+06,
-  0.00000000e+00, -1.52343750e+06,
-  4.21875000e+06,  0.00000000e+00,
-  3.45703125e+06,  0.00000000e+00,
-  3.45703125e+06,  0.00000000e+00,
-  2.21484375e+07,  0.00000000e+00,
- -5.39062500e+06,  0.00000000e+00,
- -5.39062500e+06,  0.00000000e+00,
-  0.00000000e+00,  4.21875000e+06,
-  0.00000000e+00,  3.45703125e+06,
-  0.00000000e+00,  3.45703125e+06,
-  0.00000000e+00,  2.21484375e+07,
-  0.00000000e+00, -5.39062500e+06,
-  0.00000000e+00, -5.39062500e+06,
- -1.36230469e+06,  0.00000000e+00,
- -1.52343750e+06,  0.00000000e+00,
- -1.12792969e+06,  0.00000000e+00,
- -5.39062500e+06,  0.00000000e+00,
-  8.46679688e+06,  0.00000000e+00,
-  6.09375000e+06,  0.00000000e+00,
-  0.00000000e+00, -1.36230469e+06,
-  0.00000000e+00, -1.52343750e+06,
-  0.00000000e+00, -1.12792969e+06,
-  0.00000000e+00, -5.39062500e+06,
-  0.00000000e+00,  8.46679688e+06,
-  0.00000000e+00,  6.09375000e+06,
- -1.36230469e+06,  0.00000000e+00,
- -1.12792969e+06,  0.00000000e+00,
- -1.52343750e+06,  0.00000000e+00,
- -5.39062500e+06,  0.00000000e+00,
-  6.09375000e+06,  0.00000000e+00,
-  8.46679688e+06,  0.00000000e+00,
-  0.00000000e+00, -1.36230469e+06,
-  0.00000000e+00, -1.12792969e+06,
-  0.00000000e+00, -1.52343750e+06,
-  0.00000000e+00, -5.39062500e+06,
-  0.00000000e+00,  6.09375000e+06,
-  0.00000000e+00,  8.46679688e+06,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitData2DQuadratic::_valsResidualLumped[] = {
   1.14454133e+10,  9.89209294e+10,
  -3.22283567e+10, -5.24308887e+09,
   5.33172309e+09,  6.79741797e+10,
@@ -262,7 +180,7 @@
   1.58484937e+10, -6.90064316e+10,
 };
 
-const PylithScalar pylith::feassemble::ElasticityExplicitData2DQuadratic::_valsJacobianLumped[] = {
+const PylithScalar pylith::feassemble::ElasticityExplicitData2DQuadratic::_valsJacobian[] = {
   4.21875000e+06,  4.21875000e+06,
   3.98437500e+06,  3.98437500e+06,
   3.98437500e+06,  3.98437500e+06,
@@ -284,6 +202,7 @@
   matId = _matId;
   matLabel = const_cast<char*>(_matLabel);
   dt = _dt;
+  dtStableExplicit = _dtStableExplicit;
   gravityVec = const_cast<PylithScalar*>(_gravityVec);
   vertices = const_cast<PylithScalar*>(_vertices);
   cells = const_cast<int*>(_cells);
@@ -297,8 +216,6 @@
   fieldTmdt = const_cast<PylithScalar*>(_fieldTmdt);
   valsResidual = const_cast<PylithScalar*>(_valsResidual);
   valsJacobian = const_cast<PylithScalar*>(_valsJacobian);
-  valsResidualLumped = const_cast<PylithScalar*>(_valsResidualLumped);
-  valsJacobianLumped = const_cast<PylithScalar*>(_valsJacobianLumped);
 } // constructor
 
 pylith::feassemble::ElasticityExplicitData2DQuadratic::~ElasticityExplicitData2DQuadratic(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData2DQuadratic.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData2DQuadratic.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData2DQuadratic.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -65,6 +65,8 @@
 
   static const PylithScalar _dt;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const PylithScalar _gravityVec[];
 
   static const PylithScalar _vertices[];
@@ -91,10 +93,6 @@
 
   static const PylithScalar _valsJacobian[];
 
-  static const PylithScalar _valsResidualLumped[];
-
-  static const PylithScalar _valsJacobianLumped[];
-
 };
 
 #endif // pylith_feassemble_elasticityexplicitdata2dquadratic_hh

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData3DLinear.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData3DLinear.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData3DLinear.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -43,6 +43,8 @@
 
 const PylithScalar pylith::feassemble::ElasticityExplicitData3DLinear::_dt =   1.00000000e-02;
 
+const PylithScalar pylith::feassemble::ElasticityExplicitData3DLinear::_dtStableExplicit =   1.80277564e-04;
+
 const PylithScalar pylith::feassemble::ElasticityExplicitData3DLinear::_gravityVec[] = {
   0.00000000e+00,  0.00000000e+00, -1.00000000e+08,
 };
@@ -106,71 +108,13 @@
 };
 
 const PylithScalar pylith::feassemble::ElasticityExplicitData3DLinear::_valsResidual[] = {
- -6.53693819e+09,  3.88079833e+10,  3.46544326e+09,
- -4.32000975e+09,  7.13967240e+10,  2.36593900e+10,
-  7.21670494e+09, -1.13026998e+11, -3.40757835e+10,
-  3.64360549e+09,  2.82229089e+09,  6.95364028e+09,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitData3DLinear::_valsJacobian[] = {
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitData3DLinear::_valsResidualLumped[] = {
  -6.53643381e+09,  3.88073108e+10,  3.46544326e+09,
  -4.31950537e+09,  7.13977327e+10,  2.36607350e+10,
   7.21485556e+09, -1.13028007e+11, -3.40771285e+10,
   3.64444612e+09,  2.82296339e+09,  6.95364028e+09,
 };
 
-const PylithScalar pylith::feassemble::ElasticityExplicitData3DLinear::_valsJacobianLumped[] = {
+const PylithScalar pylith::feassemble::ElasticityExplicitData3DLinear::_valsJacobian[] = {
   3.36250000e+06,  3.36250000e+06,  3.36250000e+06,
   3.36250000e+06,  3.36250000e+06,  3.36250000e+06,
   3.36250000e+06,  3.36250000e+06,  3.36250000e+06,
@@ -190,6 +134,7 @@
   matId = _matId;
   matLabel = const_cast<char*>(_matLabel);
   dt = _dt;
+  dtStableExplicit = _dtStableExplicit;
   gravityVec = const_cast<PylithScalar*>(_gravityVec);
   vertices = const_cast<PylithScalar*>(_vertices);
   cells = const_cast<int*>(_cells);
@@ -203,8 +148,6 @@
   fieldTmdt = const_cast<PylithScalar*>(_fieldTmdt);
   valsResidual = const_cast<PylithScalar*>(_valsResidual);
   valsJacobian = const_cast<PylithScalar*>(_valsJacobian);
-  valsResidualLumped = const_cast<PylithScalar*>(_valsResidualLumped);
-  valsJacobianLumped = const_cast<PylithScalar*>(_valsJacobianLumped);
 } // constructor
 
 pylith::feassemble::ElasticityExplicitData3DLinear::~ElasticityExplicitData3DLinear(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData3DLinear.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData3DLinear.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData3DLinear.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -65,6 +65,8 @@
 
   static const PylithScalar _dt;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const PylithScalar _gravityVec[];
 
   static const PylithScalar _vertices[];
@@ -91,10 +93,6 @@
 
   static const PylithScalar _valsJacobian[];
 
-  static const PylithScalar _valsResidualLumped[];
-
-  static const PylithScalar _valsJacobianLumped[];
-
 };
 
 #endif // pylith_feassemble_elasticityexplicitdata3dlinear_hh

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData3DQuadratic.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData3DQuadratic.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData3DQuadratic.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -43,6 +43,8 @@
 
 const PylithScalar pylith::feassemble::ElasticityExplicitData3DQuadratic::_dt =   1.00000000e-02;
 
+const PylithScalar pylith::feassemble::ElasticityExplicitData3DQuadratic::_dtStableExplicit =   3.68555740e-04;
+
 const PylithScalar pylith::feassemble::ElasticityExplicitData3DQuadratic::_gravityVec[] = {
   0.00000000e+00,  0.00000000e+00, -1.00000000e+08,
 };
@@ -187,322 +189,6 @@
 };
 
 const PylithScalar pylith::feassemble::ElasticityExplicitData3DQuadratic::_valsResidual[] = {
-  2.17054586e+10, -1.01739898e+10,  2.19940105e+10,
-  6.44485026e+10, -2.49355435e+10,  6.57568524e+09,
- -4.99706922e+10, -5.58679967e+10, -3.45875247e+10,
- -9.94786340e+09,  4.42029024e+10, -4.09053678e+10,
- -7.06409419e+09,  6.20990315e+10, -1.70066323e+09,
-  7.08323019e+10,  1.17494841e+11, -3.98014534e+10,
- -9.85096504e+10, -5.58231405e+10, -2.54484051e+10,
- -1.35961925e+10, -6.36499481e+10,  1.11445117e+10,
- -3.55911964e+10,  5.53493739e+10,  5.68991582e+09,
-  5.77073439e+10, -6.86734841e+10,  9.70537069e+10,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitData3DQuadratic::_valsJacobian[] = {
-  1.50251107e+06,  0.00000000e+00,  0.00000000e+00,
- -5.70500651e+05,  0.00000000e+00,  0.00000000e+00,
- -5.70500651e+05,  0.00000000e+00,  0.00000000e+00,
- -5.70500651e+05,  0.00000000e+00,  0.00000000e+00,
- -3.13041667e+05,  0.00000000e+00,  0.00000000e+00,
-  1.24238411e+06,  0.00000000e+00,  0.00000000e+00,
-  1.24238411e+06,  0.00000000e+00,  0.00000000e+00,
-  1.24238411e+06,  0.00000000e+00,  0.00000000e+00,
- -3.13041667e+05,  0.00000000e+00,  0.00000000e+00,
- -3.13041667e+05,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00,  1.50251107e+06,  0.00000000e+00,
-  0.00000000e+00, -5.70500651e+05,  0.00000000e+00,
-  0.00000000e+00, -5.70500651e+05,  0.00000000e+00,
-  0.00000000e+00, -5.70500651e+05,  0.00000000e+00,
-  0.00000000e+00, -3.13041667e+05,  0.00000000e+00,
-  0.00000000e+00,  1.24238411e+06,  0.00000000e+00,
-  0.00000000e+00,  1.24238411e+06,  0.00000000e+00,
-  0.00000000e+00,  1.24238411e+06,  0.00000000e+00,
-  0.00000000e+00, -3.13041667e+05,  0.00000000e+00,
-  0.00000000e+00, -3.13041667e+05,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00,  1.50251107e+06,
-  0.00000000e+00,  0.00000000e+00, -5.70500651e+05,
-  0.00000000e+00,  0.00000000e+00, -5.70500651e+05,
-  0.00000000e+00,  0.00000000e+00, -5.70500651e+05,
-  0.00000000e+00,  0.00000000e+00, -3.13041667e+05,
-  0.00000000e+00,  0.00000000e+00,  1.24238411e+06,
-  0.00000000e+00,  0.00000000e+00,  1.24238411e+06,
-  0.00000000e+00,  0.00000000e+00,  1.24238411e+06,
-  0.00000000e+00,  0.00000000e+00, -3.13041667e+05,
-  0.00000000e+00,  0.00000000e+00, -3.13041667e+05,
- -5.70500651e+05,  0.00000000e+00,  0.00000000e+00,
-  2.84272070e+06,  0.00000000e+00,  0.00000000e+00,
- -8.39520833e+05,  0.00000000e+00,  0.00000000e+00,
- -8.39520833e+05,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
-  5.45154948e+05,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
- -6.43869792e+05,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00, -5.70500651e+05,  0.00000000e+00,
-  0.00000000e+00,  2.84272070e+06,  0.00000000e+00,
-  0.00000000e+00, -8.39520833e+05,  0.00000000e+00,
-  0.00000000e+00, -8.39520833e+05,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00,  5.45154948e+05,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00, -6.43869792e+05,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00, -5.70500651e+05,
-  0.00000000e+00,  0.00000000e+00,  2.84272070e+06,
-  0.00000000e+00,  0.00000000e+00, -8.39520833e+05,
-  0.00000000e+00,  0.00000000e+00, -8.39520833e+05,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00,  5.45154948e+05,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00, -6.43869792e+05,
- -5.70500651e+05,  0.00000000e+00,  0.00000000e+00,
- -8.39520833e+05,  0.00000000e+00,  0.00000000e+00,
-  2.84272070e+06,  0.00000000e+00,  0.00000000e+00,
- -8.39520833e+05,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
-  5.45154948e+05,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
- -6.43869792e+05,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00, -5.70500651e+05,  0.00000000e+00,
-  0.00000000e+00, -8.39520833e+05,  0.00000000e+00,
-  0.00000000e+00,  2.84272070e+06,  0.00000000e+00,
-  0.00000000e+00, -8.39520833e+05,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00,  5.45154948e+05,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00, -6.43869792e+05,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00, -5.70500651e+05,
-  0.00000000e+00,  0.00000000e+00, -8.39520833e+05,
-  0.00000000e+00,  0.00000000e+00,  2.84272070e+06,
-  0.00000000e+00,  0.00000000e+00, -8.39520833e+05,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00,  5.45154948e+05,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00, -6.43869792e+05,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
- -5.70500651e+05,  0.00000000e+00,  0.00000000e+00,
- -8.39520833e+05,  0.00000000e+00,  0.00000000e+00,
- -8.39520833e+05,  0.00000000e+00,  0.00000000e+00,
-  2.84272070e+06,  0.00000000e+00,  0.00000000e+00,
- -6.43869792e+05,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
-  5.45154948e+05,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00, -5.70500651e+05,  0.00000000e+00,
-  0.00000000e+00, -8.39520833e+05,  0.00000000e+00,
-  0.00000000e+00, -8.39520833e+05,  0.00000000e+00,
-  0.00000000e+00,  2.84272070e+06,  0.00000000e+00,
-  0.00000000e+00, -6.43869792e+05,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00,  5.45154948e+05,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00, -5.70500651e+05,
-  0.00000000e+00,  0.00000000e+00, -8.39520833e+05,
-  0.00000000e+00,  0.00000000e+00, -8.39520833e+05,
-  0.00000000e+00,  0.00000000e+00,  2.84272070e+06,
-  0.00000000e+00,  0.00000000e+00, -6.43869792e+05,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00,  5.45154948e+05,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
- -3.13041667e+05,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
- -6.43869792e+05,  0.00000000e+00,  0.00000000e+00,
-  3.25847917e+06,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  5.19364583e+05,  0.00000000e+00,  0.00000000e+00,
-  2.05611458e+06,  0.00000000e+00,  0.00000000e+00,
-  2.05611458e+06,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00, -3.13041667e+05,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00, -6.43869792e+05,  0.00000000e+00,
-  0.00000000e+00,  3.25847917e+06,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  5.19364583e+05,  0.00000000e+00,
-  0.00000000e+00,  2.05611458e+06,  0.00000000e+00,
-  0.00000000e+00,  2.05611458e+06,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00, -3.13041667e+05,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00, -6.43869792e+05,
-  0.00000000e+00,  0.00000000e+00,  3.25847917e+06,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  5.19364583e+05,
-  0.00000000e+00,  0.00000000e+00,  2.05611458e+06,
-  0.00000000e+00,  0.00000000e+00,  2.05611458e+06,
-  1.24238411e+06,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
-  5.45154948e+05,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  1.80888281e+06,  0.00000000e+00,  0.00000000e+00,
-  1.50829167e+06,  0.00000000e+00,  0.00000000e+00,
-  1.50829167e+06,  0.00000000e+00,  0.00000000e+00,
-  5.19364583e+05,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00,  1.24238411e+06,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00,  5.45154948e+05,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  1.80888281e+06,  0.00000000e+00,
-  0.00000000e+00,  1.50829167e+06,  0.00000000e+00,
-  0.00000000e+00,  1.50829167e+06,  0.00000000e+00,
-  0.00000000e+00,  5.19364583e+05,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00,  1.24238411e+06,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00,  5.45154948e+05,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  1.80888281e+06,
-  0.00000000e+00,  0.00000000e+00,  1.50829167e+06,
-  0.00000000e+00,  0.00000000e+00,  1.50829167e+06,
-  0.00000000e+00,  0.00000000e+00,  5.19364583e+05,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  1.24238411e+06,  0.00000000e+00,  0.00000000e+00,
-  5.45154948e+05,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  1.50829167e+06,  0.00000000e+00,  0.00000000e+00,
-  1.80888281e+06,  0.00000000e+00,  0.00000000e+00,
-  1.50829167e+06,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  5.19364583e+05,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00,  1.24238411e+06,  0.00000000e+00,
-  0.00000000e+00,  5.45154948e+05,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  1.50829167e+06,  0.00000000e+00,
-  0.00000000e+00,  1.80888281e+06,  0.00000000e+00,
-  0.00000000e+00,  1.50829167e+06,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  5.19364583e+05,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00,  1.24238411e+06,
-  0.00000000e+00,  0.00000000e+00,  5.45154948e+05,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  1.50829167e+06,
-  0.00000000e+00,  0.00000000e+00,  1.80888281e+06,
-  0.00000000e+00,  0.00000000e+00,  1.50829167e+06,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  5.19364583e+05,
-  1.24238411e+06,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
-  5.45154948e+05,  0.00000000e+00,  0.00000000e+00,
-  5.19364583e+05,  0.00000000e+00,  0.00000000e+00,
-  1.50829167e+06,  0.00000000e+00,  0.00000000e+00,
-  1.50829167e+06,  0.00000000e+00,  0.00000000e+00,
-  1.80888281e+06,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00,  1.24238411e+06,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00,  5.45154948e+05,  0.00000000e+00,
-  0.00000000e+00,  5.19364583e+05,  0.00000000e+00,
-  0.00000000e+00,  1.50829167e+06,  0.00000000e+00,
-  0.00000000e+00,  1.50829167e+06,  0.00000000e+00,
-  0.00000000e+00,  1.80888281e+06,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00,  1.24238411e+06,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00,  5.45154948e+05,
-  0.00000000e+00,  0.00000000e+00,  5.19364583e+05,
-  0.00000000e+00,  0.00000000e+00,  1.50829167e+06,
-  0.00000000e+00,  0.00000000e+00,  1.50829167e+06,
-  0.00000000e+00,  0.00000000e+00,  1.80888281e+06,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
- -3.13041667e+05,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
- -6.43869792e+05,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
-  2.05611458e+06,  0.00000000e+00,  0.00000000e+00,
-  5.19364583e+05,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  3.25847917e+06,  0.00000000e+00,  0.00000000e+00,
-  2.05611458e+06,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00, -3.13041667e+05,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00, -6.43869792e+05,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00,  2.05611458e+06,  0.00000000e+00,
-  0.00000000e+00,  5.19364583e+05,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  3.25847917e+06,  0.00000000e+00,
-  0.00000000e+00,  2.05611458e+06,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00, -3.13041667e+05,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00, -6.43869792e+05,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00,  2.05611458e+06,
-  0.00000000e+00,  0.00000000e+00,  5.19364583e+05,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  3.25847917e+06,
-  0.00000000e+00,  0.00000000e+00,  2.05611458e+06,
- -3.13041667e+05,  0.00000000e+00,  0.00000000e+00,
- -6.43869792e+05,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
-  2.05611458e+06,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  5.19364583e+05,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  2.05611458e+06,  0.00000000e+00,  0.00000000e+00,
-  3.25847917e+06,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00, -3.13041667e+05,  0.00000000e+00,
-  0.00000000e+00, -6.43869792e+05,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00,  2.05611458e+06,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  5.19364583e+05,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  2.05611458e+06,  0.00000000e+00,
-  0.00000000e+00,  3.25847917e+06,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00, -3.13041667e+05,
-  0.00000000e+00,  0.00000000e+00, -6.43869792e+05,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00,  2.05611458e+06,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  5.19364583e+05,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  2.05611458e+06,
-  0.00000000e+00,  0.00000000e+00,  3.25847917e+06,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitData3DQuadratic::_valsResidualLumped[] = {
   2.17058857e+10, -1.01733961e+10,  2.19900081e+10,
   6.44476753e+10, -2.49368998e+10,  6.57917072e+09,
  -4.99716018e+10, -5.58679351e+10, -3.45875383e+10,
@@ -515,11 +201,11 @@
   5.76997342e+10, -6.86862545e+10,  9.70617888e+10,
 };
 
-const PylithScalar pylith::feassemble::ElasticityExplicitData3DQuadratic::_valsJacobianLumped[] = {
+const PylithScalar pylith::feassemble::ElasticityExplicitData3DQuadratic::_valsJacobian[] = {
   2.57903646e+06,  2.57903646e+06,  2.57903646e+06,
   2.40117187e+06,  2.40117187e+06,  2.40117187e+06,
+  2.40117187e+06,  2.40117187e+06,  2.40117187e+06,
   2.40117188e+06,  2.40117188e+06,  2.40117188e+06,
-  2.40117188e+06,  2.40117188e+06,  2.40117188e+06,
   1.20947917e+07,  1.20947917e+07,  1.20947917e+07,
   8.35963542e+06,  8.35963542e+06,  8.35963542e+06,
   8.35963542e+06,  8.35963542e+06,  8.35963542e+06,
@@ -541,6 +227,7 @@
   matId = _matId;
   matLabel = const_cast<char*>(_matLabel);
   dt = _dt;
+  dtStableExplicit = _dtStableExplicit;
   gravityVec = const_cast<PylithScalar*>(_gravityVec);
   vertices = const_cast<PylithScalar*>(_vertices);
   cells = const_cast<int*>(_cells);
@@ -554,8 +241,6 @@
   fieldTmdt = const_cast<PylithScalar*>(_fieldTmdt);
   valsResidual = const_cast<PylithScalar*>(_valsResidual);
   valsJacobian = const_cast<PylithScalar*>(_valsJacobian);
-  valsResidualLumped = const_cast<PylithScalar*>(_valsResidualLumped);
-  valsJacobianLumped = const_cast<PylithScalar*>(_valsJacobianLumped);
 } // constructor
 
 pylith::feassemble::ElasticityExplicitData3DQuadratic::~ElasticityExplicitData3DQuadratic(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData3DQuadratic.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData3DQuadratic.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitData3DQuadratic.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -65,6 +65,8 @@
 
   static const PylithScalar _dt;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const PylithScalar _gravityVec[];
 
   static const PylithScalar _vertices[];
@@ -91,10 +93,6 @@
 
   static const PylithScalar _valsJacobian[];
 
-  static const PylithScalar _valsResidualLumped[];
-
-  static const PylithScalar _valsJacobianLumped[];
-
 };
 
 #endif // pylith_feassemble_elasticityexplicitdata3dquadratic_hh

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData1DLinear.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData1DLinear.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData1DLinear.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -43,6 +43,8 @@
 
 const PylithScalar pylith::feassemble::ElasticityExplicitGravData1DLinear::_dt =   1.00000000e-02;
 
+const PylithScalar pylith::feassemble::ElasticityExplicitGravData1DLinear::_dtStableExplicit =   3.75000000e-04;
+
 const PylithScalar pylith::feassemble::ElasticityExplicitGravData1DLinear::_gravityVec[] = {
  -1.00000000e+08,
 };
@@ -95,23 +97,11 @@
 };
 
 const PylithScalar pylith::feassemble::ElasticityExplicitGravData1DLinear::_valsResidual[] = {
- -2.64086562e+11,
- -2.98486562e+11,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitGravData1DLinear::_valsJacobian[] = {
-  1.40625000e+07,
-  1.40625000e+07,
-  1.40625000e+07,
-  1.40625000e+07,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitGravData1DLinear::_valsResidualLumped[] = {
  -2.64080938e+11,
  -2.98492188e+11,
 };
 
-const PylithScalar pylith::feassemble::ElasticityExplicitGravData1DLinear::_valsJacobianLumped[] = {
+const PylithScalar pylith::feassemble::ElasticityExplicitGravData1DLinear::_valsJacobian[] = {
   2.81250000e+07,
   2.81250000e+07,
 };
@@ -129,6 +119,7 @@
   matId = _matId;
   matLabel = const_cast<char*>(_matLabel);
   dt = _dt;
+  dtStableExplicit = _dtStableExplicit;
   gravityVec = const_cast<PylithScalar*>(_gravityVec);
   vertices = const_cast<PylithScalar*>(_vertices);
   cells = const_cast<int*>(_cells);
@@ -142,8 +133,6 @@
   fieldTmdt = const_cast<PylithScalar*>(_fieldTmdt);
   valsResidual = const_cast<PylithScalar*>(_valsResidual);
   valsJacobian = const_cast<PylithScalar*>(_valsJacobian);
-  valsResidualLumped = const_cast<PylithScalar*>(_valsResidualLumped);
-  valsJacobianLumped = const_cast<PylithScalar*>(_valsJacobianLumped);
 } // constructor
 
 pylith::feassemble::ElasticityExplicitGravData1DLinear::~ElasticityExplicitGravData1DLinear(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData1DLinear.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData1DLinear.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData1DLinear.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -65,6 +65,8 @@
 
   static const PylithScalar _dt;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const PylithScalar _gravityVec[];
 
   static const PylithScalar _vertices[];
@@ -91,10 +93,6 @@
 
   static const PylithScalar _valsJacobian[];
 
-  static const PylithScalar _valsResidualLumped[];
-
-  static const PylithScalar _valsJacobianLumped[];
-
 };
 
 #endif // pylith_feassemble_elasticityexplicitgravdata1dlinear_hh

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData1DQuadratic.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData1DQuadratic.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData1DQuadratic.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -43,6 +43,8 @@
 
 const PylithScalar pylith::feassemble::ElasticityExplicitGravData1DQuadratic::_dt =   1.00000000e-02;
 
+const PylithScalar pylith::feassemble::ElasticityExplicitGravData1DQuadratic::_dtStableExplicit =   3.75000000e-04;
+
 const PylithScalar pylith::feassemble::ElasticityExplicitGravData1DQuadratic::_gravityVec[] = {
  -1.00000000e+08,
 };
@@ -109,30 +111,12 @@
 };
 
 const PylithScalar pylith::feassemble::ElasticityExplicitGravData1DQuadratic::_valsResidual[] = {
- -3.36995833e+10,
-  5.15107292e+10,
- -5.80377708e+11,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitGravData1DQuadratic::_valsJacobian[] = {
-  6.25000000e+06,
- -3.12500000e+06,
-  6.25000000e+06,
- -3.12500000e+06,
-  6.25000000e+06,
-  6.25000000e+06,
-  6.25000000e+06,
-  6.25000000e+06,
-  2.50000000e+07,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitGravData1DQuadratic::_valsResidualLumped[] = {
  -3.36936458e+10,
   5.15166667e+10,
  -5.80389583e+11,
 };
 
-const PylithScalar pylith::feassemble::ElasticityExplicitGravData1DQuadratic::_valsJacobianLumped[] = {
+const PylithScalar pylith::feassemble::ElasticityExplicitGravData1DQuadratic::_valsJacobian[] = {
   9.37500000e+06,
   9.37500000e+06,
   3.75000000e+07,
@@ -151,6 +135,7 @@
   matId = _matId;
   matLabel = const_cast<char*>(_matLabel);
   dt = _dt;
+  dtStableExplicit = _dtStableExplicit;
   gravityVec = const_cast<PylithScalar*>(_gravityVec);
   vertices = const_cast<PylithScalar*>(_vertices);
   cells = const_cast<int*>(_cells);
@@ -164,8 +149,6 @@
   fieldTmdt = const_cast<PylithScalar*>(_fieldTmdt);
   valsResidual = const_cast<PylithScalar*>(_valsResidual);
   valsJacobian = const_cast<PylithScalar*>(_valsJacobian);
-  valsResidualLumped = const_cast<PylithScalar*>(_valsResidualLumped);
-  valsJacobianLumped = const_cast<PylithScalar*>(_valsJacobianLumped);
 } // constructor
 
 pylith::feassemble::ElasticityExplicitGravData1DQuadratic::~ElasticityExplicitGravData1DQuadratic(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData1DQuadratic.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData1DQuadratic.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData1DQuadratic.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -65,6 +65,8 @@
 
   static const PylithScalar _dt;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const PylithScalar _gravityVec[];
 
   static const PylithScalar _vertices[];
@@ -91,10 +93,6 @@
 
   static const PylithScalar _valsJacobian[];
 
-  static const PylithScalar _valsResidualLumped[];
-
-  static const PylithScalar _valsJacobianLumped[];
-
 };
 
 #endif // pylith_feassemble_elasticityexplicitgravdata1dquadratic_hh

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData2DLinear.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData2DLinear.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData2DLinear.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -43,6 +43,8 @@
 
 const PylithScalar pylith::feassemble::ElasticityExplicitGravData2DLinear::_dt =   1.00000000e-02;
 
+const PylithScalar pylith::feassemble::ElasticityExplicitGravData2DLinear::_dtStableExplicit =   1.50923086e-04;
+
 const PylithScalar pylith::feassemble::ElasticityExplicitGravData2DLinear::_gravityVec[] = {
   0.00000000e+00, -1.00000000e+08,
 };
@@ -100,39 +102,12 @@
 };
 
 const PylithScalar pylith::feassemble::ElasticityExplicitGravData2DLinear::_valsResidual[] = {
- -7.10095578e+10,  9.10600148e+10,
- -1.02829242e+10, -1.66809658e+11,
-  8.12828570e+10, -6.17535647e+10,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitGravData2DLinear::_valsJacobian[] = {
-  1.52777778e+06,  0.00000000e+00,
-  1.52777778e+06,  0.00000000e+00,
-  1.52777778e+06,  0.00000000e+00,
-  0.00000000e+00,  1.52777778e+06,
-  0.00000000e+00,  1.52777778e+06,
-  0.00000000e+00,  1.52777778e+06,
-  1.52777778e+06,  0.00000000e+00,
-  1.52777778e+06,  0.00000000e+00,
-  1.52777778e+06,  0.00000000e+00,
-  0.00000000e+00,  1.52777778e+06,
-  0.00000000e+00,  1.52777778e+06,
-  0.00000000e+00,  1.52777778e+06,
-  1.52777778e+06,  0.00000000e+00,
-  1.52777778e+06,  0.00000000e+00,
-  1.52777778e+06,  0.00000000e+00,
-  0.00000000e+00,  1.52777778e+06,
-  0.00000000e+00,  1.52777778e+06,
-  0.00000000e+00,  1.52777778e+06,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitGravData2DLinear::_valsResidualLumped[] = {
  -7.10086411e+10,  9.10610843e+10,
  -1.02842992e+10, -1.66813631e+11,
   8.12833153e+10, -6.17506619e+10,
 };
 
-const PylithScalar pylith::feassemble::ElasticityExplicitGravData2DLinear::_valsJacobianLumped[] = {
+const PylithScalar pylith::feassemble::ElasticityExplicitGravData2DLinear::_valsJacobian[] = {
   4.58333333e+06,  4.58333333e+06,
   4.58333333e+06,  4.58333333e+06,
   4.58333333e+06,  4.58333333e+06,
@@ -151,6 +126,7 @@
   matId = _matId;
   matLabel = const_cast<char*>(_matLabel);
   dt = _dt;
+  dtStableExplicit = _dtStableExplicit;
   gravityVec = const_cast<PylithScalar*>(_gravityVec);
   vertices = const_cast<PylithScalar*>(_vertices);
   cells = const_cast<int*>(_cells);
@@ -164,8 +140,6 @@
   fieldTmdt = const_cast<PylithScalar*>(_fieldTmdt);
   valsResidual = const_cast<PylithScalar*>(_valsResidual);
   valsJacobian = const_cast<PylithScalar*>(_valsJacobian);
-  valsResidualLumped = const_cast<PylithScalar*>(_valsResidualLumped);
-  valsJacobianLumped = const_cast<PylithScalar*>(_valsJacobianLumped);
 } // constructor
 
 pylith::feassemble::ElasticityExplicitGravData2DLinear::~ElasticityExplicitGravData2DLinear(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData2DLinear.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData2DLinear.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData2DLinear.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -65,6 +65,8 @@
 
   static const PylithScalar _dt;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const PylithScalar _gravityVec[];
 
   static const PylithScalar _vertices[];
@@ -91,10 +93,6 @@
 
   static const PylithScalar _valsJacobian[];
 
-  static const PylithScalar _valsResidualLumped[];
-
-  static const PylithScalar _valsJacobianLumped[];
-
 };
 
 #endif // pylith_feassemble_elasticityexplicitgravdata2dlinear_hh

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData2DQuadratic.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData2DQuadratic.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData2DQuadratic.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -43,6 +43,8 @@
 
 const PylithScalar pylith::feassemble::ElasticityExplicitGravData2DQuadratic::_dt =   1.00000000e-02;
 
+const PylithScalar pylith::feassemble::ElasticityExplicitGravData2DQuadratic::_dtStableExplicit =   2.63523138e-04;
+
 const PylithScalar pylith::feassemble::ElasticityExplicitGravData2DQuadratic::_gravityVec[] = {
   0.00000000e+00, -1.00000000e+08,
 };
@@ -170,90 +172,6 @@
 };
 
 const PylithScalar pylith::feassemble::ElasticityExplicitGravData2DQuadratic::_valsResidual[] = {
-  1.14469580e+10,  5.67331525e+10,
- -3.22261697e+10, -4.50853997e+10,
-  5.33382294e+09,  2.81311394e+10,
-  6.97040375e+10, -1.14320882e+11,
- -7.00903642e+10, -2.54877652e+11,
-  1.58455201e+10, -1.20572343e+11,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitGravData2DQuadratic::_valsJacobian[] = {
-  2.24121094e+06,  0.00000000e+00,
-  2.41699219e+05,  0.00000000e+00,
-  2.41699219e+05,  0.00000000e+00,
-  4.21875000e+06,  0.00000000e+00,
- -1.36230469e+06,  0.00000000e+00,
- -1.36230469e+06,  0.00000000e+00,
-  0.00000000e+00,  2.24121094e+06,
-  0.00000000e+00,  2.41699219e+05,
-  0.00000000e+00,  2.41699219e+05,
-  0.00000000e+00,  4.21875000e+06,
-  0.00000000e+00, -1.36230469e+06,
-  0.00000000e+00, -1.36230469e+06,
-  2.41699219e+05,  0.00000000e+00,
-  3.61083984e+06,  0.00000000e+00,
- -6.73828125e+05,  0.00000000e+00,
-  3.45703125e+06,  0.00000000e+00,
- -1.52343750e+06,  0.00000000e+00,
- -1.12792969e+06,  0.00000000e+00,
-  0.00000000e+00,  2.41699219e+05,
-  0.00000000e+00,  3.61083984e+06,
-  0.00000000e+00, -6.73828125e+05,
-  0.00000000e+00,  3.45703125e+06,
-  0.00000000e+00, -1.52343750e+06,
-  0.00000000e+00, -1.12792969e+06,
-  2.41699219e+05,  0.00000000e+00,
- -6.73828125e+05,  0.00000000e+00,
-  3.61083984e+06,  0.00000000e+00,
-  3.45703125e+06,  0.00000000e+00,
- -1.12792969e+06,  0.00000000e+00,
- -1.52343750e+06,  0.00000000e+00,
-  0.00000000e+00,  2.41699219e+05,
-  0.00000000e+00, -6.73828125e+05,
-  0.00000000e+00,  3.61083984e+06,
-  0.00000000e+00,  3.45703125e+06,
-  0.00000000e+00, -1.12792969e+06,
-  0.00000000e+00, -1.52343750e+06,
-  4.21875000e+06,  0.00000000e+00,
-  3.45703125e+06,  0.00000000e+00,
-  3.45703125e+06,  0.00000000e+00,
-  2.21484375e+07,  0.00000000e+00,
- -5.39062500e+06,  0.00000000e+00,
- -5.39062500e+06,  0.00000000e+00,
-  0.00000000e+00,  4.21875000e+06,
-  0.00000000e+00,  3.45703125e+06,
-  0.00000000e+00,  3.45703125e+06,
-  0.00000000e+00,  2.21484375e+07,
-  0.00000000e+00, -5.39062500e+06,
-  0.00000000e+00, -5.39062500e+06,
- -1.36230469e+06,  0.00000000e+00,
- -1.52343750e+06,  0.00000000e+00,
- -1.12792969e+06,  0.00000000e+00,
- -5.39062500e+06,  0.00000000e+00,
-  8.46679688e+06,  0.00000000e+00,
-  6.09375000e+06,  0.00000000e+00,
-  0.00000000e+00, -1.36230469e+06,
-  0.00000000e+00, -1.52343750e+06,
-  0.00000000e+00, -1.12792969e+06,
-  0.00000000e+00, -5.39062500e+06,
-  0.00000000e+00,  8.46679688e+06,
-  0.00000000e+00,  6.09375000e+06,
- -1.36230469e+06,  0.00000000e+00,
- -1.12792969e+06,  0.00000000e+00,
- -1.52343750e+06,  0.00000000e+00,
- -5.39062500e+06,  0.00000000e+00,
-  6.09375000e+06,  0.00000000e+00,
-  8.46679688e+06,  0.00000000e+00,
-  0.00000000e+00, -1.36230469e+06,
-  0.00000000e+00, -1.12792969e+06,
-  0.00000000e+00, -1.52343750e+06,
-  0.00000000e+00, -5.39062500e+06,
-  0.00000000e+00,  6.09375000e+06,
-  0.00000000e+00,  8.46679688e+06,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitGravData2DQuadratic::_valsResidualLumped[] = {
   1.14454133e+10,  5.67334294e+10,
  -3.22283567e+10, -4.50868389e+10,
   5.33172309e+09,  2.81304297e+10,
@@ -262,7 +180,7 @@
   1.58484937e+10, -1.20568932e+11,
 };
 
-const PylithScalar pylith::feassemble::ElasticityExplicitGravData2DQuadratic::_valsJacobianLumped[] = {
+const PylithScalar pylith::feassemble::ElasticityExplicitGravData2DQuadratic::_valsJacobian[] = {
   4.21875000e+06,  4.21875000e+06,
   3.98437500e+06,  3.98437500e+06,
   3.98437500e+06,  3.98437500e+06,
@@ -284,6 +202,7 @@
   matId = _matId;
   matLabel = const_cast<char*>(_matLabel);
   dt = _dt;
+  dtStableExplicit = _dtStableExplicit;
   gravityVec = const_cast<PylithScalar*>(_gravityVec);
   vertices = const_cast<PylithScalar*>(_vertices);
   cells = const_cast<int*>(_cells);
@@ -297,8 +216,6 @@
   fieldTmdt = const_cast<PylithScalar*>(_fieldTmdt);
   valsResidual = const_cast<PylithScalar*>(_valsResidual);
   valsJacobian = const_cast<PylithScalar*>(_valsJacobian);
-  valsResidualLumped = const_cast<PylithScalar*>(_valsResidualLumped);
-  valsJacobianLumped = const_cast<PylithScalar*>(_valsJacobianLumped);
 } // constructor
 
 pylith::feassemble::ElasticityExplicitGravData2DQuadratic::~ElasticityExplicitGravData2DQuadratic(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData2DQuadratic.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData2DQuadratic.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData2DQuadratic.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -65,6 +65,8 @@
 
   static const PylithScalar _dt;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const PylithScalar _gravityVec[];
 
   static const PylithScalar _vertices[];
@@ -91,10 +93,6 @@
 
   static const PylithScalar _valsJacobian[];
 
-  static const PylithScalar _valsResidualLumped[];
-
-  static const PylithScalar _valsJacobianLumped[];
-
 };
 
 #endif // pylith_feassemble_elasticityexplicitgravdata2dquadratic_hh

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData3DLinear.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData3DLinear.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData3DLinear.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -43,6 +43,8 @@
 
 const PylithScalar pylith::feassemble::ElasticityExplicitGravData3DLinear::_dt =   1.00000000e-02;
 
+const PylithScalar pylith::feassemble::ElasticityExplicitGravData3DLinear::_dtStableExplicit =   1.80277564e-04;
+
 const PylithScalar pylith::feassemble::ElasticityExplicitGravData3DLinear::_gravityVec[] = {
   0.00000000e+00,  0.00000000e+00, -1.00000000e+08,
 };
@@ -106,71 +108,13 @@
 };
 
 const PylithScalar pylith::feassemble::ElasticityExplicitGravData3DLinear::_valsResidual[] = {
- -6.53693819e+09,  3.88079833e+10, -3.01595567e+10,
- -4.32000975e+09,  7.13967240e+10, -9.96561003e+09,
-  7.21670494e+09, -1.13026998e+11, -6.77007835e+10,
-  3.64360549e+09,  2.82229089e+09, -2.66713597e+10,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitGravData3DLinear::_valsJacobian[] = {
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitGravData3DLinear::_valsResidualLumped[] = {
  -6.53643381e+09,  3.88073108e+10, -3.01595567e+10,
  -4.31950537e+09,  7.13977327e+10, -9.96426503e+09,
   7.21485556e+09, -1.13028007e+11, -6.77021285e+10,
   3.64444612e+09,  2.82296339e+09, -2.66713597e+10,
 };
 
-const PylithScalar pylith::feassemble::ElasticityExplicitGravData3DLinear::_valsJacobianLumped[] = {
+const PylithScalar pylith::feassemble::ElasticityExplicitGravData3DLinear::_valsJacobian[] = {
   3.36250000e+06,  3.36250000e+06,  3.36250000e+06,
   3.36250000e+06,  3.36250000e+06,  3.36250000e+06,
   3.36250000e+06,  3.36250000e+06,  3.36250000e+06,
@@ -190,6 +134,7 @@
   matId = _matId;
   matLabel = const_cast<char*>(_matLabel);
   dt = _dt;
+  dtStableExplicit = _dtStableExplicit;
   gravityVec = const_cast<PylithScalar*>(_gravityVec);
   vertices = const_cast<PylithScalar*>(_vertices);
   cells = const_cast<int*>(_cells);
@@ -203,8 +148,6 @@
   fieldTmdt = const_cast<PylithScalar*>(_fieldTmdt);
   valsResidual = const_cast<PylithScalar*>(_valsResidual);
   valsJacobian = const_cast<PylithScalar*>(_valsJacobian);
-  valsResidualLumped = const_cast<PylithScalar*>(_valsResidualLumped);
-  valsJacobianLumped = const_cast<PylithScalar*>(_valsJacobianLumped);
 } // constructor
 
 pylith::feassemble::ElasticityExplicitGravData3DLinear::~ElasticityExplicitGravData3DLinear(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData3DLinear.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData3DLinear.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData3DLinear.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -65,6 +65,8 @@
 
   static const PylithScalar _dt;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const PylithScalar _gravityVec[];
 
   static const PylithScalar _vertices[];
@@ -91,10 +93,6 @@
 
   static const PylithScalar _valsJacobian[];
 
-  static const PylithScalar _valsResidualLumped[];
-
-  static const PylithScalar _valsJacobianLumped[];
-
 };
 
 #endif // pylith_feassemble_elasticityexplicitgravdata3dlinear_hh

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData3DQuadratic.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData3DQuadratic.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData3DQuadratic.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -43,6 +43,8 @@
 
 const PylithScalar pylith::feassemble::ElasticityExplicitGravData3DQuadratic::_dt =   1.00000000e-02;
 
+const PylithScalar pylith::feassemble::ElasticityExplicitGravData3DQuadratic::_dtStableExplicit =   3.68555740e-04;
+
 const PylithScalar pylith::feassemble::ElasticityExplicitGravData3DQuadratic::_gravityVec[] = {
   0.00000000e+00,  0.00000000e+00, -1.00000000e+08,
 };
@@ -187,322 +189,6 @@
 };
 
 const PylithScalar pylith::feassemble::ElasticityExplicitGravData3DQuadratic::_valsResidual[] = {
-  2.17054586e+10, -1.01739898e+10, -3.79635409e+09,
-  6.44485026e+10, -2.49355435e+10, -1.74360335e+10,
- -4.99706922e+10, -5.58679967e+10, -5.85992435e+10,
- -9.94786340e+09,  4.42029024e+10, -6.49170866e+10,
- -7.06409419e+09,  6.20990315e+10, -1.22648580e+11,
-  7.08323019e+10,  1.17494841e+11, -1.23397808e+11,
- -9.85096504e+10, -5.58231405e+10, -1.09044759e+11,
- -1.35961925e+10, -6.36499481e+10, -7.24518425e+10,
- -3.55911964e+10,  5.53493739e+10, -1.15258001e+11,
-  5.77073439e+10, -6.86734841e+10, -2.38942097e+10,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitGravData3DQuadratic::_valsJacobian[] = {
-  1.50251107e+06,  0.00000000e+00,  0.00000000e+00,
- -5.70500651e+05,  0.00000000e+00,  0.00000000e+00,
- -5.70500651e+05,  0.00000000e+00,  0.00000000e+00,
- -5.70500651e+05,  0.00000000e+00,  0.00000000e+00,
- -3.13041667e+05,  0.00000000e+00,  0.00000000e+00,
-  1.24238411e+06,  0.00000000e+00,  0.00000000e+00,
-  1.24238411e+06,  0.00000000e+00,  0.00000000e+00,
-  1.24238411e+06,  0.00000000e+00,  0.00000000e+00,
- -3.13041667e+05,  0.00000000e+00,  0.00000000e+00,
- -3.13041667e+05,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00,  1.50251107e+06,  0.00000000e+00,
-  0.00000000e+00, -5.70500651e+05,  0.00000000e+00,
-  0.00000000e+00, -5.70500651e+05,  0.00000000e+00,
-  0.00000000e+00, -5.70500651e+05,  0.00000000e+00,
-  0.00000000e+00, -3.13041667e+05,  0.00000000e+00,
-  0.00000000e+00,  1.24238411e+06,  0.00000000e+00,
-  0.00000000e+00,  1.24238411e+06,  0.00000000e+00,
-  0.00000000e+00,  1.24238411e+06,  0.00000000e+00,
-  0.00000000e+00, -3.13041667e+05,  0.00000000e+00,
-  0.00000000e+00, -3.13041667e+05,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00,  1.50251107e+06,
-  0.00000000e+00,  0.00000000e+00, -5.70500651e+05,
-  0.00000000e+00,  0.00000000e+00, -5.70500651e+05,
-  0.00000000e+00,  0.00000000e+00, -5.70500651e+05,
-  0.00000000e+00,  0.00000000e+00, -3.13041667e+05,
-  0.00000000e+00,  0.00000000e+00,  1.24238411e+06,
-  0.00000000e+00,  0.00000000e+00,  1.24238411e+06,
-  0.00000000e+00,  0.00000000e+00,  1.24238411e+06,
-  0.00000000e+00,  0.00000000e+00, -3.13041667e+05,
-  0.00000000e+00,  0.00000000e+00, -3.13041667e+05,
- -5.70500651e+05,  0.00000000e+00,  0.00000000e+00,
-  2.84272070e+06,  0.00000000e+00,  0.00000000e+00,
- -8.39520833e+05,  0.00000000e+00,  0.00000000e+00,
- -8.39520833e+05,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
-  5.45154948e+05,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
- -6.43869792e+05,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00, -5.70500651e+05,  0.00000000e+00,
-  0.00000000e+00,  2.84272070e+06,  0.00000000e+00,
-  0.00000000e+00, -8.39520833e+05,  0.00000000e+00,
-  0.00000000e+00, -8.39520833e+05,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00,  5.45154948e+05,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00, -6.43869792e+05,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00, -5.70500651e+05,
-  0.00000000e+00,  0.00000000e+00,  2.84272070e+06,
-  0.00000000e+00,  0.00000000e+00, -8.39520833e+05,
-  0.00000000e+00,  0.00000000e+00, -8.39520833e+05,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00,  5.45154948e+05,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00, -6.43869792e+05,
- -5.70500651e+05,  0.00000000e+00,  0.00000000e+00,
- -8.39520833e+05,  0.00000000e+00,  0.00000000e+00,
-  2.84272070e+06,  0.00000000e+00,  0.00000000e+00,
- -8.39520833e+05,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
-  5.45154948e+05,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
- -6.43869792e+05,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00, -5.70500651e+05,  0.00000000e+00,
-  0.00000000e+00, -8.39520833e+05,  0.00000000e+00,
-  0.00000000e+00,  2.84272070e+06,  0.00000000e+00,
-  0.00000000e+00, -8.39520833e+05,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00,  5.45154948e+05,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00, -6.43869792e+05,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00, -5.70500651e+05,
-  0.00000000e+00,  0.00000000e+00, -8.39520833e+05,
-  0.00000000e+00,  0.00000000e+00,  2.84272070e+06,
-  0.00000000e+00,  0.00000000e+00, -8.39520833e+05,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00,  5.45154948e+05,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00, -6.43869792e+05,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
- -5.70500651e+05,  0.00000000e+00,  0.00000000e+00,
- -8.39520833e+05,  0.00000000e+00,  0.00000000e+00,
- -8.39520833e+05,  0.00000000e+00,  0.00000000e+00,
-  2.84272070e+06,  0.00000000e+00,  0.00000000e+00,
- -6.43869792e+05,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
-  5.45154948e+05,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00, -5.70500651e+05,  0.00000000e+00,
-  0.00000000e+00, -8.39520833e+05,  0.00000000e+00,
-  0.00000000e+00, -8.39520833e+05,  0.00000000e+00,
-  0.00000000e+00,  2.84272070e+06,  0.00000000e+00,
-  0.00000000e+00, -6.43869792e+05,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00,  5.45154948e+05,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00, -5.70500651e+05,
-  0.00000000e+00,  0.00000000e+00, -8.39520833e+05,
-  0.00000000e+00,  0.00000000e+00, -8.39520833e+05,
-  0.00000000e+00,  0.00000000e+00,  2.84272070e+06,
-  0.00000000e+00,  0.00000000e+00, -6.43869792e+05,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00,  5.45154948e+05,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
- -3.13041667e+05,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
- -6.43869792e+05,  0.00000000e+00,  0.00000000e+00,
-  3.25847917e+06,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  5.19364583e+05,  0.00000000e+00,  0.00000000e+00,
-  2.05611458e+06,  0.00000000e+00,  0.00000000e+00,
-  2.05611458e+06,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00, -3.13041667e+05,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00, -6.43869792e+05,  0.00000000e+00,
-  0.00000000e+00,  3.25847917e+06,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  5.19364583e+05,  0.00000000e+00,
-  0.00000000e+00,  2.05611458e+06,  0.00000000e+00,
-  0.00000000e+00,  2.05611458e+06,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00, -3.13041667e+05,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00, -6.43869792e+05,
-  0.00000000e+00,  0.00000000e+00,  3.25847917e+06,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  5.19364583e+05,
-  0.00000000e+00,  0.00000000e+00,  2.05611458e+06,
-  0.00000000e+00,  0.00000000e+00,  2.05611458e+06,
-  1.24238411e+06,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
-  5.45154948e+05,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  1.80888281e+06,  0.00000000e+00,  0.00000000e+00,
-  1.50829167e+06,  0.00000000e+00,  0.00000000e+00,
-  1.50829167e+06,  0.00000000e+00,  0.00000000e+00,
-  5.19364583e+05,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00,  1.24238411e+06,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00,  5.45154948e+05,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  1.80888281e+06,  0.00000000e+00,
-  0.00000000e+00,  1.50829167e+06,  0.00000000e+00,
-  0.00000000e+00,  1.50829167e+06,  0.00000000e+00,
-  0.00000000e+00,  5.19364583e+05,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00,  1.24238411e+06,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00,  5.45154948e+05,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  1.80888281e+06,
-  0.00000000e+00,  0.00000000e+00,  1.50829167e+06,
-  0.00000000e+00,  0.00000000e+00,  1.50829167e+06,
-  0.00000000e+00,  0.00000000e+00,  5.19364583e+05,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  1.24238411e+06,  0.00000000e+00,  0.00000000e+00,
-  5.45154948e+05,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  1.50829167e+06,  0.00000000e+00,  0.00000000e+00,
-  1.80888281e+06,  0.00000000e+00,  0.00000000e+00,
-  1.50829167e+06,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  5.19364583e+05,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00,  1.24238411e+06,  0.00000000e+00,
-  0.00000000e+00,  5.45154948e+05,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  1.50829167e+06,  0.00000000e+00,
-  0.00000000e+00,  1.80888281e+06,  0.00000000e+00,
-  0.00000000e+00,  1.50829167e+06,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  5.19364583e+05,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00,  1.24238411e+06,
-  0.00000000e+00,  0.00000000e+00,  5.45154948e+05,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  1.50829167e+06,
-  0.00000000e+00,  0.00000000e+00,  1.80888281e+06,
-  0.00000000e+00,  0.00000000e+00,  1.50829167e+06,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  5.19364583e+05,
-  1.24238411e+06,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
-  5.45154948e+05,  0.00000000e+00,  0.00000000e+00,
-  5.19364583e+05,  0.00000000e+00,  0.00000000e+00,
-  1.50829167e+06,  0.00000000e+00,  0.00000000e+00,
-  1.50829167e+06,  0.00000000e+00,  0.00000000e+00,
-  1.80888281e+06,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00,  1.24238411e+06,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00,  5.45154948e+05,  0.00000000e+00,
-  0.00000000e+00,  5.19364583e+05,  0.00000000e+00,
-  0.00000000e+00,  1.50829167e+06,  0.00000000e+00,
-  0.00000000e+00,  1.50829167e+06,  0.00000000e+00,
-  0.00000000e+00,  1.80888281e+06,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00,  1.24238411e+06,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00,  5.45154948e+05,
-  0.00000000e+00,  0.00000000e+00,  5.19364583e+05,
-  0.00000000e+00,  0.00000000e+00,  1.50829167e+06,
-  0.00000000e+00,  0.00000000e+00,  1.50829167e+06,
-  0.00000000e+00,  0.00000000e+00,  1.80888281e+06,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
- -3.13041667e+05,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
- -6.43869792e+05,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
-  2.05611458e+06,  0.00000000e+00,  0.00000000e+00,
-  5.19364583e+05,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  3.25847917e+06,  0.00000000e+00,  0.00000000e+00,
-  2.05611458e+06,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00, -3.13041667e+05,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00, -6.43869792e+05,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00,  2.05611458e+06,  0.00000000e+00,
-  0.00000000e+00,  5.19364583e+05,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  3.25847917e+06,  0.00000000e+00,
-  0.00000000e+00,  2.05611458e+06,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00, -3.13041667e+05,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00, -6.43869792e+05,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00,  2.05611458e+06,
-  0.00000000e+00,  0.00000000e+00,  5.19364583e+05,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  3.25847917e+06,
-  0.00000000e+00,  0.00000000e+00,  2.05611458e+06,
- -3.13041667e+05,  0.00000000e+00,  0.00000000e+00,
- -6.43869792e+05,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
-  2.05611458e+06,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  5.19364583e+05,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  2.05611458e+06,  0.00000000e+00,  0.00000000e+00,
-  3.25847917e+06,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00, -3.13041667e+05,  0.00000000e+00,
-  0.00000000e+00, -6.43869792e+05,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00,  2.05611458e+06,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  5.19364583e+05,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  2.05611458e+06,  0.00000000e+00,
-  0.00000000e+00,  3.25847917e+06,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00, -3.13041667e+05,
-  0.00000000e+00,  0.00000000e+00, -6.43869792e+05,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00,  2.05611458e+06,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  5.19364583e+05,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  2.05611458e+06,
-  0.00000000e+00,  0.00000000e+00,  3.25847917e+06,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitGravData3DQuadratic::_valsResidualLumped[] = {
   2.17058857e+10, -1.01733961e+10, -3.80035653e+09,
   6.44476753e+10, -2.49368998e+10, -1.74325480e+10,
  -4.99716018e+10, -5.58679351e+10, -5.85992570e+10,
@@ -515,11 +201,11 @@
   5.76997342e+10, -6.86862545e+10, -2.38861279e+10,
 };
 
-const PylithScalar pylith::feassemble::ElasticityExplicitGravData3DQuadratic::_valsJacobianLumped[] = {
+const PylithScalar pylith::feassemble::ElasticityExplicitGravData3DQuadratic::_valsJacobian[] = {
   2.57903646e+06,  2.57903646e+06,  2.57903646e+06,
   2.40117187e+06,  2.40117187e+06,  2.40117187e+06,
+  2.40117187e+06,  2.40117187e+06,  2.40117187e+06,
   2.40117188e+06,  2.40117188e+06,  2.40117188e+06,
-  2.40117188e+06,  2.40117188e+06,  2.40117188e+06,
   1.20947917e+07,  1.20947917e+07,  1.20947917e+07,
   8.35963542e+06,  8.35963542e+06,  8.35963542e+06,
   8.35963542e+06,  8.35963542e+06,  8.35963542e+06,
@@ -541,6 +227,7 @@
   matId = _matId;
   matLabel = const_cast<char*>(_matLabel);
   dt = _dt;
+  dtStableExplicit = _dtStableExplicit;
   gravityVec = const_cast<PylithScalar*>(_gravityVec);
   vertices = const_cast<PylithScalar*>(_vertices);
   cells = const_cast<int*>(_cells);
@@ -554,8 +241,6 @@
   fieldTmdt = const_cast<PylithScalar*>(_fieldTmdt);
   valsResidual = const_cast<PylithScalar*>(_valsResidual);
   valsJacobian = const_cast<PylithScalar*>(_valsJacobian);
-  valsResidualLumped = const_cast<PylithScalar*>(_valsResidualLumped);
-  valsJacobianLumped = const_cast<PylithScalar*>(_valsJacobianLumped);
 } // constructor
 
 pylith::feassemble::ElasticityExplicitGravData3DQuadratic::~ElasticityExplicitGravData3DQuadratic(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData3DQuadratic.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData3DQuadratic.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitGravData3DQuadratic.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -65,6 +65,8 @@
 
   static const PylithScalar _dt;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const PylithScalar _gravityVec[];
 
   static const PylithScalar _vertices[];
@@ -91,10 +93,6 @@
 
   static const PylithScalar _valsJacobian[];
 
-  static const PylithScalar _valsResidualLumped[];
-
-  static const PylithScalar _valsJacobianLumped[];
-
 };
 
 #endif // pylith_feassemble_elasticityexplicitgravdata3dquadratic_hh

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeform.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeform.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeform.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -52,38 +52,6 @@
     Calculate contribution to residual of operator for integrator.
 
     {r} = (1/dt**2)[M](-{u(t+dt)} + 2 {u(t)} - {u(t-dt)}) -
-          Sum(wt * [BL]^T [S])
-    """
-    import feutils
-
-    # Calculate action for inertia
-    M = integrator._calculateMassMat()
-    acc = (integrator.fieldTIncr - 
-           integrator.fieldT + 
-           integrator.fieldTmdt) / (integrator.dt**2) 
-    residual = -numpy.dot(M, acc)
-    residual = residual.flatten()
-    residual += self._elasticityResidual(integrator)
-    return residual
-
-
-  def calculateJacobian(self, integrator):
-    """
-    Calculate contribution to Jacobian matrix of operator for integrator.
-
-    [A] = (1/dt**2)[M]
-    """
-    M = integrator._calculateMassMat()
-
-    jacobian = 1.0/integrator.dt**2 * M
-    return jacobian
-
-
-  def calculateResidualLumped(self, integrator):
-    """
-    Calculate contribution to residual of operator for integrator.
-
-    {r} = (1/dt**2)[M](-{u(t+dt)} + 2 {u(t)} - {u(t-dt)}) -
           [K]{u(t)}
     """
     M = integrator._calculateMassMat()
@@ -100,7 +68,7 @@
     return residual
 
 
-  def calculateJacobianLumped(self, integrator):
+  def calculateJacobian(self, integrator):
     """
     Calculate contribution to Jacobian matrix of operator for integrator.
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData1DLinear.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData1DLinear.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData1DLinear.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -43,6 +43,8 @@
 
 const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData1DLinear::_dt =   1.00000000e-02;
 
+const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData1DLinear::_dtStableExplicit =   3.75000000e-04;
+
 const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData1DLinear::_gravityVec[] = {
  -1.00000000e+08,
 };
@@ -95,23 +97,11 @@
 };
 
 const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData1DLinear::_valsResidual[] = {
-  2.04829437e+10,
- -2.05560687e+10,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData1DLinear::_valsJacobian[] = {
-  1.40625000e+07,
-  1.40625000e+07,
-  1.40625000e+07,
-  1.40625000e+07,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData1DLinear::_valsResidualLumped[] = {
   2.04885687e+10,
  -2.05616937e+10,
 };
 
-const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData1DLinear::_valsJacobianLumped[] = {
+const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData1DLinear::_valsJacobian[] = {
   2.81250000e+07,
   2.81250000e+07,
 };
@@ -129,6 +119,7 @@
   matId = _matId;
   matLabel = const_cast<char*>(_matLabel);
   dt = _dt;
+  dtStableExplicit = _dtStableExplicit;
   gravityVec = const_cast<PylithScalar*>(_gravityVec);
   vertices = const_cast<PylithScalar*>(_vertices);
   cells = const_cast<int*>(_cells);
@@ -142,8 +133,6 @@
   fieldTmdt = const_cast<PylithScalar*>(_fieldTmdt);
   valsResidual = const_cast<PylithScalar*>(_valsResidual);
   valsJacobian = const_cast<PylithScalar*>(_valsJacobian);
-  valsResidualLumped = const_cast<PylithScalar*>(_valsResidualLumped);
-  valsJacobianLumped = const_cast<PylithScalar*>(_valsJacobianLumped);
 } // constructor
 
 pylith::feassemble::ElasticityExplicitLgDeformData1DLinear::~ElasticityExplicitLgDeformData1DLinear(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData1DLinear.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData1DLinear.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData1DLinear.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -65,6 +65,8 @@
 
   static const PylithScalar _dt;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const PylithScalar _gravityVec[];
 
   static const PylithScalar _vertices[];
@@ -91,10 +93,6 @@
 
   static const PylithScalar _valsJacobian[];
 
-  static const PylithScalar _valsResidualLumped[];
-
-  static const PylithScalar _valsJacobianLumped[];
-
 };
 
 #endif // pylith_feassemble_elasticityexplicitlgdeformdata1dlinear_hh

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData1DQuadratic.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData1DQuadratic.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData1DQuadratic.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -43,6 +43,8 @@
 
 const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData1DQuadratic::_dt =   1.00000000e-02;
 
+const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData1DQuadratic::_dtStableExplicit =   3.75000000e-04;
+
 const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData1DQuadratic::_gravityVec[] = {
  -1.00000000e+08,
 };
@@ -109,30 +111,12 @@
 };
 
 const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData1DQuadratic::_valsResidual[] = {
-  8.41042438e+10,
- -9.31754244e+09,
- -7.48532639e+10,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData1DQuadratic::_valsJacobian[] = {
-  6.25000000e+06,
- -3.12500000e+06,
-  6.25000000e+06,
- -3.12500000e+06,
-  6.25000000e+06,
-  6.25000000e+06,
-  6.25000000e+06,
-  6.25000000e+06,
-  2.50000000e+07,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData1DQuadratic::_valsResidualLumped[] = {
   8.41101813e+10,
  -9.31160494e+09,
  -7.48651389e+10,
 };
 
-const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData1DQuadratic::_valsJacobianLumped[] = {
+const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData1DQuadratic::_valsJacobian[] = {
   9.37500000e+06,
   9.37500000e+06,
   3.75000000e+07,
@@ -151,6 +135,7 @@
   matId = _matId;
   matLabel = const_cast<char*>(_matLabel);
   dt = _dt;
+  dtStableExplicit = _dtStableExplicit;
   gravityVec = const_cast<PylithScalar*>(_gravityVec);
   vertices = const_cast<PylithScalar*>(_vertices);
   cells = const_cast<int*>(_cells);
@@ -164,8 +149,6 @@
   fieldTmdt = const_cast<PylithScalar*>(_fieldTmdt);
   valsResidual = const_cast<PylithScalar*>(_valsResidual);
   valsJacobian = const_cast<PylithScalar*>(_valsJacobian);
-  valsResidualLumped = const_cast<PylithScalar*>(_valsResidualLumped);
-  valsJacobianLumped = const_cast<PylithScalar*>(_valsJacobianLumped);
 } // constructor
 
 pylith::feassemble::ElasticityExplicitLgDeformData1DQuadratic::~ElasticityExplicitLgDeformData1DQuadratic(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData1DQuadratic.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData1DQuadratic.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData1DQuadratic.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -65,6 +65,8 @@
 
   static const PylithScalar _dt;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const PylithScalar _gravityVec[];
 
   static const PylithScalar _vertices[];
@@ -91,10 +93,6 @@
 
   static const PylithScalar _valsJacobian[];
 
-  static const PylithScalar _valsResidualLumped[];
-
-  static const PylithScalar _valsJacobianLumped[];
-
 };
 
 #endif // pylith_feassemble_elasticityexplicitlgdeformdata1dquadratic_hh

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData2DLinear.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData2DLinear.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData2DLinear.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -43,6 +43,8 @@
 
 const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData2DLinear::_dt =   1.00000000e-02;
 
+const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData2DLinear::_dtStableExplicit =   1.50923086e-04;
+
 const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData2DLinear::_gravityVec[] = {
   0.00000000e+00, -1.00000000e+08,
 };
@@ -100,39 +102,12 @@
 };
 
 const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData2DLinear::_valsResidual[] = {
- -5.23632630e+11,  5.83305846e+11,
-  1.65372743e+11, -5.78685990e+11,
-  3.58250262e+11, -4.62306437e+09,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData2DLinear::_valsJacobian[] = {
-  1.52777778e+06,  0.00000000e+00,
-  1.52777778e+06,  0.00000000e+00,
-  1.52777778e+06,  0.00000000e+00,
-  0.00000000e+00,  1.52777778e+06,
-  0.00000000e+00,  1.52777778e+06,
-  0.00000000e+00,  1.52777778e+06,
-  1.52777778e+06,  0.00000000e+00,
-  1.52777778e+06,  0.00000000e+00,
-  1.52777778e+06,  0.00000000e+00,
-  0.00000000e+00,  1.52777778e+06,
-  0.00000000e+00,  1.52777778e+06,
-  0.00000000e+00,  1.52777778e+06,
-  1.52777778e+06,  0.00000000e+00,
-  1.52777778e+06,  0.00000000e+00,
-  1.52777778e+06,  0.00000000e+00,
-  0.00000000e+00,  1.52777778e+06,
-  0.00000000e+00,  1.52777778e+06,
-  0.00000000e+00,  1.52777778e+06,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData2DLinear::_valsResidualLumped[] = {
  -5.23631714e+11,  5.83306915e+11,
   1.65371368e+11, -5.78689962e+11,
   3.58250720e+11, -4.62016160e+09,
 };
 
-const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData2DLinear::_valsJacobianLumped[] = {
+const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData2DLinear::_valsJacobian[] = {
   4.58333333e+06,  4.58333333e+06,
   4.58333333e+06,  4.58333333e+06,
   4.58333333e+06,  4.58333333e+06,
@@ -151,6 +126,7 @@
   matId = _matId;
   matLabel = const_cast<char*>(_matLabel);
   dt = _dt;
+  dtStableExplicit = _dtStableExplicit;
   gravityVec = const_cast<PylithScalar*>(_gravityVec);
   vertices = const_cast<PylithScalar*>(_vertices);
   cells = const_cast<int*>(_cells);
@@ -164,8 +140,6 @@
   fieldTmdt = const_cast<PylithScalar*>(_fieldTmdt);
   valsResidual = const_cast<PylithScalar*>(_valsResidual);
   valsJacobian = const_cast<PylithScalar*>(_valsJacobian);
-  valsResidualLumped = const_cast<PylithScalar*>(_valsResidualLumped);
-  valsJacobianLumped = const_cast<PylithScalar*>(_valsJacobianLumped);
 } // constructor
 
 pylith::feassemble::ElasticityExplicitLgDeformData2DLinear::~ElasticityExplicitLgDeformData2DLinear(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData2DLinear.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData2DLinear.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData2DLinear.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -65,6 +65,8 @@
 
   static const PylithScalar _dt;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const PylithScalar _gravityVec[];
 
   static const PylithScalar _vertices[];
@@ -91,10 +93,6 @@
 
   static const PylithScalar _valsJacobian[];
 
-  static const PylithScalar _valsResidualLumped[];
-
-  static const PylithScalar _valsJacobianLumped[];
-
 };
 
 #endif // pylith_feassemble_elasticityexplicitlgdeformdata2dlinear_hh

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData2DQuadratic.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData2DQuadratic.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData2DQuadratic.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -43,6 +43,8 @@
 
 const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData2DQuadratic::_dt =   1.00000000e-02;
 
+const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData2DQuadratic::_dtStableExplicit =   2.63523138e-04;
+
 const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData2DQuadratic::_gravityVec[] = {
   0.00000000e+00, -1.00000000e+08,
 };
@@ -170,90 +172,6 @@
 };
 
 const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData2DQuadratic::_valsResidual[] = {
-  3.35186619e+10,  8.10189832e+10,
- -7.94930135e+10, -4.37826989e+10,
-  2.10035850e+10,  2.15156871e+10,
-  7.31131484e+10, -6.34970387e+09,
- -5.42588065e+10, -9.94923096e+10,
-  6.13022939e+09,  4.70980577e+10,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData2DQuadratic::_valsJacobian[] = {
-  2.24121094e+06,  0.00000000e+00,
-  2.41699219e+05,  0.00000000e+00,
-  2.41699219e+05,  0.00000000e+00,
-  4.21875000e+06,  0.00000000e+00,
- -1.36230469e+06,  0.00000000e+00,
- -1.36230469e+06,  0.00000000e+00,
-  0.00000000e+00,  2.24121094e+06,
-  0.00000000e+00,  2.41699219e+05,
-  0.00000000e+00,  2.41699219e+05,
-  0.00000000e+00,  4.21875000e+06,
-  0.00000000e+00, -1.36230469e+06,
-  0.00000000e+00, -1.36230469e+06,
-  2.41699219e+05,  0.00000000e+00,
-  3.61083984e+06,  0.00000000e+00,
- -6.73828125e+05,  0.00000000e+00,
-  3.45703125e+06,  0.00000000e+00,
- -1.52343750e+06,  0.00000000e+00,
- -1.12792969e+06,  0.00000000e+00,
-  0.00000000e+00,  2.41699219e+05,
-  0.00000000e+00,  3.61083984e+06,
-  0.00000000e+00, -6.73828125e+05,
-  0.00000000e+00,  3.45703125e+06,
-  0.00000000e+00, -1.52343750e+06,
-  0.00000000e+00, -1.12792969e+06,
-  2.41699219e+05,  0.00000000e+00,
- -6.73828125e+05,  0.00000000e+00,
-  3.61083984e+06,  0.00000000e+00,
-  3.45703125e+06,  0.00000000e+00,
- -1.12792969e+06,  0.00000000e+00,
- -1.52343750e+06,  0.00000000e+00,
-  0.00000000e+00,  2.41699219e+05,
-  0.00000000e+00, -6.73828125e+05,
-  0.00000000e+00,  3.61083984e+06,
-  0.00000000e+00,  3.45703125e+06,
-  0.00000000e+00, -1.12792969e+06,
-  0.00000000e+00, -1.52343750e+06,
-  4.21875000e+06,  0.00000000e+00,
-  3.45703125e+06,  0.00000000e+00,
-  3.45703125e+06,  0.00000000e+00,
-  2.21484375e+07,  0.00000000e+00,
- -5.39062500e+06,  0.00000000e+00,
- -5.39062500e+06,  0.00000000e+00,
-  0.00000000e+00,  4.21875000e+06,
-  0.00000000e+00,  3.45703125e+06,
-  0.00000000e+00,  3.45703125e+06,
-  0.00000000e+00,  2.21484375e+07,
-  0.00000000e+00, -5.39062500e+06,
-  0.00000000e+00, -5.39062500e+06,
- -1.36230469e+06,  0.00000000e+00,
- -1.52343750e+06,  0.00000000e+00,
- -1.12792969e+06,  0.00000000e+00,
- -5.39062500e+06,  0.00000000e+00,
-  8.46679688e+06,  0.00000000e+00,
-  6.09375000e+06,  0.00000000e+00,
-  0.00000000e+00, -1.36230469e+06,
-  0.00000000e+00, -1.52343750e+06,
-  0.00000000e+00, -1.12792969e+06,
-  0.00000000e+00, -5.39062500e+06,
-  0.00000000e+00,  8.46679688e+06,
-  0.00000000e+00,  6.09375000e+06,
- -1.36230469e+06,  0.00000000e+00,
- -1.12792969e+06,  0.00000000e+00,
- -1.52343750e+06,  0.00000000e+00,
- -5.39062500e+06,  0.00000000e+00,
-  6.09375000e+06,  0.00000000e+00,
-  8.46679688e+06,  0.00000000e+00,
-  0.00000000e+00, -1.36230469e+06,
-  0.00000000e+00, -1.12792969e+06,
-  0.00000000e+00, -1.52343750e+06,
-  0.00000000e+00, -5.39062500e+06,
-  0.00000000e+00,  6.09375000e+06,
-  0.00000000e+00,  8.46679688e+06,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData2DQuadratic::_valsResidualLumped[] = {
   3.35171172e+10,  8.10192601e+10,
  -7.94952005e+10, -4.37841381e+10,
   2.10014852e+10,  2.15149774e+10,
@@ -262,7 +180,7 @@
   6.13320302e+09,  4.71014693e+10,
 };
 
-const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData2DQuadratic::_valsJacobianLumped[] = {
+const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData2DQuadratic::_valsJacobian[] = {
   4.21875000e+06,  4.21875000e+06,
   3.98437500e+06,  3.98437500e+06,
   3.98437500e+06,  3.98437500e+06,
@@ -284,6 +202,7 @@
   matId = _matId;
   matLabel = const_cast<char*>(_matLabel);
   dt = _dt;
+  dtStableExplicit = _dtStableExplicit;
   gravityVec = const_cast<PylithScalar*>(_gravityVec);
   vertices = const_cast<PylithScalar*>(_vertices);
   cells = const_cast<int*>(_cells);
@@ -297,8 +216,6 @@
   fieldTmdt = const_cast<PylithScalar*>(_fieldTmdt);
   valsResidual = const_cast<PylithScalar*>(_valsResidual);
   valsJacobian = const_cast<PylithScalar*>(_valsJacobian);
-  valsResidualLumped = const_cast<PylithScalar*>(_valsResidualLumped);
-  valsJacobianLumped = const_cast<PylithScalar*>(_valsJacobianLumped);
 } // constructor
 
 pylith::feassemble::ElasticityExplicitLgDeformData2DQuadratic::~ElasticityExplicitLgDeformData2DQuadratic(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData2DQuadratic.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData2DQuadratic.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData2DQuadratic.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -65,6 +65,8 @@
 
   static const PylithScalar _dt;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const PylithScalar _gravityVec[];
 
   static const PylithScalar _vertices[];
@@ -91,10 +93,6 @@
 
   static const PylithScalar _valsJacobian[];
 
-  static const PylithScalar _valsResidualLumped[];
-
-  static const PylithScalar _valsJacobianLumped[];
-
 };
 
 #endif // pylith_feassemble_elasticityexplicitlgdeformdata2dquadratic_hh

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData3DLinear.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData3DLinear.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData3DLinear.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -43,6 +43,8 @@
 
 const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData3DLinear::_dt =   1.00000000e-02;
 
+const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData3DLinear::_dtStableExplicit =   1.80277564e-04;
+
 const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData3DLinear::_gravityVec[] = {
   0.00000000e+00,  0.00000000e+00, -1.00000000e+08,
 };
@@ -106,71 +108,13 @@
 };
 
 const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData3DLinear::_valsResidual[] = {
- -1.33659352e+10,  3.00655421e+11,  1.48221233e+11,
- -5.48900483e+10,  6.55599721e+11,  3.04460965e+11,
-  6.45910023e+10, -1.06342951e+12, -4.86426871e+11,
-  3.66834369e+09,  1.07174373e+11,  3.37473630e+10,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData3DLinear::_valsJacobian[] = {
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData3DLinear::_valsResidualLumped[] = {
  -1.33654308e+10,  3.00654749e+11,  1.48221233e+11,
  -5.48895440e+10,  6.55600730e+11,  3.04462310e+11,
   6.45891529e+10, -1.06343052e+12, -4.86428216e+11,
   3.66918432e+09,  1.07175045e+11,  3.37473630e+10,
 };
 
-const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData3DLinear::_valsJacobianLumped[] = {
+const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData3DLinear::_valsJacobian[] = {
   3.36250000e+06,  3.36250000e+06,  3.36250000e+06,
   3.36250000e+06,  3.36250000e+06,  3.36250000e+06,
   3.36250000e+06,  3.36250000e+06,  3.36250000e+06,
@@ -190,6 +134,7 @@
   matId = _matId;
   matLabel = const_cast<char*>(_matLabel);
   dt = _dt;
+  dtStableExplicit = _dtStableExplicit;
   gravityVec = const_cast<PylithScalar*>(_gravityVec);
   vertices = const_cast<PylithScalar*>(_vertices);
   cells = const_cast<int*>(_cells);
@@ -203,8 +148,6 @@
   fieldTmdt = const_cast<PylithScalar*>(_fieldTmdt);
   valsResidual = const_cast<PylithScalar*>(_valsResidual);
   valsJacobian = const_cast<PylithScalar*>(_valsJacobian);
-  valsResidualLumped = const_cast<PylithScalar*>(_valsResidualLumped);
-  valsJacobianLumped = const_cast<PylithScalar*>(_valsJacobianLumped);
 } // constructor
 
 pylith::feassemble::ElasticityExplicitLgDeformData3DLinear::~ElasticityExplicitLgDeformData3DLinear(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData3DLinear.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData3DLinear.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData3DLinear.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -65,6 +65,8 @@
 
   static const PylithScalar _dt;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const PylithScalar _gravityVec[];
 
   static const PylithScalar _vertices[];
@@ -91,10 +93,6 @@
 
   static const PylithScalar _valsJacobian[];
 
-  static const PylithScalar _valsResidualLumped[];
-
-  static const PylithScalar _valsJacobianLumped[];
-
 };
 
 #endif // pylith_feassemble_elasticityexplicitlgdeformdata3dlinear_hh

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData3DQuadratic.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData3DQuadratic.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData3DQuadratic.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -43,6 +43,8 @@
 
 const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData3DQuadratic::_dt =   1.00000000e-02;
 
+const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData3DQuadratic::_dtStableExplicit =   3.68555740e-04;
+
 const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData3DQuadratic::_gravityVec[] = {
   0.00000000e+00,  0.00000000e+00, -1.00000000e+08,
 };
@@ -187,322 +189,6 @@
 };
 
 const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData3DQuadratic::_valsResidual[] = {
-  3.68904302e+10,  2.89154635e+10, -8.34303196e+08,
-  1.31658958e+11, -3.38188176e+10,  5.13285187e+10,
- -3.92909711e+11, -2.10630391e+11, -2.01774869e+11,
- -1.14269176e+11,  1.30717232e+11, -1.07973309e+11,
- -2.64258575e+11, -2.85535726e+10, -4.02072308e+10,
-  4.59398355e+11,  2.32376498e+11,  2.74963691e+11,
- -2.46994434e+11, -7.38524287e+10, -4.79760043e+10,
-  5.25219225e+10, -8.35281650e+10, -1.48179494e+10,
- -1.20392699e+11,  3.07708241e+11, -2.63722439e+11,
-  4.58368848e+11, -2.69312012e+11,  3.51028310e+11,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData3DQuadratic::_valsJacobian[] = {
-  1.50251107e+06,  0.00000000e+00,  0.00000000e+00,
- -5.70500651e+05,  0.00000000e+00,  0.00000000e+00,
- -5.70500651e+05,  0.00000000e+00,  0.00000000e+00,
- -5.70500651e+05,  0.00000000e+00,  0.00000000e+00,
- -3.13041667e+05,  0.00000000e+00,  0.00000000e+00,
-  1.24238411e+06,  0.00000000e+00,  0.00000000e+00,
-  1.24238411e+06,  0.00000000e+00,  0.00000000e+00,
-  1.24238411e+06,  0.00000000e+00,  0.00000000e+00,
- -3.13041667e+05,  0.00000000e+00,  0.00000000e+00,
- -3.13041667e+05,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00,  1.50251107e+06,  0.00000000e+00,
-  0.00000000e+00, -5.70500651e+05,  0.00000000e+00,
-  0.00000000e+00, -5.70500651e+05,  0.00000000e+00,
-  0.00000000e+00, -5.70500651e+05,  0.00000000e+00,
-  0.00000000e+00, -3.13041667e+05,  0.00000000e+00,
-  0.00000000e+00,  1.24238411e+06,  0.00000000e+00,
-  0.00000000e+00,  1.24238411e+06,  0.00000000e+00,
-  0.00000000e+00,  1.24238411e+06,  0.00000000e+00,
-  0.00000000e+00, -3.13041667e+05,  0.00000000e+00,
-  0.00000000e+00, -3.13041667e+05,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00,  1.50251107e+06,
-  0.00000000e+00,  0.00000000e+00, -5.70500651e+05,
-  0.00000000e+00,  0.00000000e+00, -5.70500651e+05,
-  0.00000000e+00,  0.00000000e+00, -5.70500651e+05,
-  0.00000000e+00,  0.00000000e+00, -3.13041667e+05,
-  0.00000000e+00,  0.00000000e+00,  1.24238411e+06,
-  0.00000000e+00,  0.00000000e+00,  1.24238411e+06,
-  0.00000000e+00,  0.00000000e+00,  1.24238411e+06,
-  0.00000000e+00,  0.00000000e+00, -3.13041667e+05,
-  0.00000000e+00,  0.00000000e+00, -3.13041667e+05,
- -5.70500651e+05,  0.00000000e+00,  0.00000000e+00,
-  2.84272070e+06,  0.00000000e+00,  0.00000000e+00,
- -8.39520833e+05,  0.00000000e+00,  0.00000000e+00,
- -8.39520833e+05,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
-  5.45154948e+05,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
- -6.43869792e+05,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00, -5.70500651e+05,  0.00000000e+00,
-  0.00000000e+00,  2.84272070e+06,  0.00000000e+00,
-  0.00000000e+00, -8.39520833e+05,  0.00000000e+00,
-  0.00000000e+00, -8.39520833e+05,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00,  5.45154948e+05,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00, -6.43869792e+05,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00, -5.70500651e+05,
-  0.00000000e+00,  0.00000000e+00,  2.84272070e+06,
-  0.00000000e+00,  0.00000000e+00, -8.39520833e+05,
-  0.00000000e+00,  0.00000000e+00, -8.39520833e+05,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00,  5.45154948e+05,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00, -6.43869792e+05,
- -5.70500651e+05,  0.00000000e+00,  0.00000000e+00,
- -8.39520833e+05,  0.00000000e+00,  0.00000000e+00,
-  2.84272070e+06,  0.00000000e+00,  0.00000000e+00,
- -8.39520833e+05,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
-  5.45154948e+05,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
- -6.43869792e+05,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00, -5.70500651e+05,  0.00000000e+00,
-  0.00000000e+00, -8.39520833e+05,  0.00000000e+00,
-  0.00000000e+00,  2.84272070e+06,  0.00000000e+00,
-  0.00000000e+00, -8.39520833e+05,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00,  5.45154948e+05,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00, -6.43869792e+05,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00, -5.70500651e+05,
-  0.00000000e+00,  0.00000000e+00, -8.39520833e+05,
-  0.00000000e+00,  0.00000000e+00,  2.84272070e+06,
-  0.00000000e+00,  0.00000000e+00, -8.39520833e+05,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00,  5.45154948e+05,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00, -6.43869792e+05,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
- -5.70500651e+05,  0.00000000e+00,  0.00000000e+00,
- -8.39520833e+05,  0.00000000e+00,  0.00000000e+00,
- -8.39520833e+05,  0.00000000e+00,  0.00000000e+00,
-  2.84272070e+06,  0.00000000e+00,  0.00000000e+00,
- -6.43869792e+05,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
-  5.45154948e+05,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00, -5.70500651e+05,  0.00000000e+00,
-  0.00000000e+00, -8.39520833e+05,  0.00000000e+00,
-  0.00000000e+00, -8.39520833e+05,  0.00000000e+00,
-  0.00000000e+00,  2.84272070e+06,  0.00000000e+00,
-  0.00000000e+00, -6.43869792e+05,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00,  5.45154948e+05,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00, -5.70500651e+05,
-  0.00000000e+00,  0.00000000e+00, -8.39520833e+05,
-  0.00000000e+00,  0.00000000e+00, -8.39520833e+05,
-  0.00000000e+00,  0.00000000e+00,  2.84272070e+06,
-  0.00000000e+00,  0.00000000e+00, -6.43869792e+05,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00,  5.45154948e+05,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
- -3.13041667e+05,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
- -6.43869792e+05,  0.00000000e+00,  0.00000000e+00,
-  3.25847917e+06,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  5.19364583e+05,  0.00000000e+00,  0.00000000e+00,
-  2.05611458e+06,  0.00000000e+00,  0.00000000e+00,
-  2.05611458e+06,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00, -3.13041667e+05,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00, -6.43869792e+05,  0.00000000e+00,
-  0.00000000e+00,  3.25847917e+06,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  5.19364583e+05,  0.00000000e+00,
-  0.00000000e+00,  2.05611458e+06,  0.00000000e+00,
-  0.00000000e+00,  2.05611458e+06,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00, -3.13041667e+05,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00, -6.43869792e+05,
-  0.00000000e+00,  0.00000000e+00,  3.25847917e+06,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  5.19364583e+05,
-  0.00000000e+00,  0.00000000e+00,  2.05611458e+06,
-  0.00000000e+00,  0.00000000e+00,  2.05611458e+06,
-  1.24238411e+06,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
-  5.45154948e+05,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  1.80888281e+06,  0.00000000e+00,  0.00000000e+00,
-  1.50829167e+06,  0.00000000e+00,  0.00000000e+00,
-  1.50829167e+06,  0.00000000e+00,  0.00000000e+00,
-  5.19364583e+05,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00,  1.24238411e+06,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00,  5.45154948e+05,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  1.80888281e+06,  0.00000000e+00,
-  0.00000000e+00,  1.50829167e+06,  0.00000000e+00,
-  0.00000000e+00,  1.50829167e+06,  0.00000000e+00,
-  0.00000000e+00,  5.19364583e+05,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00,  1.24238411e+06,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00,  5.45154948e+05,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  1.80888281e+06,
-  0.00000000e+00,  0.00000000e+00,  1.50829167e+06,
-  0.00000000e+00,  0.00000000e+00,  1.50829167e+06,
-  0.00000000e+00,  0.00000000e+00,  5.19364583e+05,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  1.24238411e+06,  0.00000000e+00,  0.00000000e+00,
-  5.45154948e+05,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  1.50829167e+06,  0.00000000e+00,  0.00000000e+00,
-  1.80888281e+06,  0.00000000e+00,  0.00000000e+00,
-  1.50829167e+06,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  5.19364583e+05,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00,  1.24238411e+06,  0.00000000e+00,
-  0.00000000e+00,  5.45154948e+05,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  1.50829167e+06,  0.00000000e+00,
-  0.00000000e+00,  1.80888281e+06,  0.00000000e+00,
-  0.00000000e+00,  1.50829167e+06,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  5.19364583e+05,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00,  1.24238411e+06,
-  0.00000000e+00,  0.00000000e+00,  5.45154948e+05,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  1.50829167e+06,
-  0.00000000e+00,  0.00000000e+00,  1.80888281e+06,
-  0.00000000e+00,  0.00000000e+00,  1.50829167e+06,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  5.19364583e+05,
-  1.24238411e+06,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
-  5.45154948e+05,  0.00000000e+00,  0.00000000e+00,
-  5.19364583e+05,  0.00000000e+00,  0.00000000e+00,
-  1.50829167e+06,  0.00000000e+00,  0.00000000e+00,
-  1.50829167e+06,  0.00000000e+00,  0.00000000e+00,
-  1.80888281e+06,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00,  1.24238411e+06,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00,  5.45154948e+05,  0.00000000e+00,
-  0.00000000e+00,  5.19364583e+05,  0.00000000e+00,
-  0.00000000e+00,  1.50829167e+06,  0.00000000e+00,
-  0.00000000e+00,  1.50829167e+06,  0.00000000e+00,
-  0.00000000e+00,  1.80888281e+06,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00,  1.24238411e+06,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00,  5.45154948e+05,
-  0.00000000e+00,  0.00000000e+00,  5.19364583e+05,
-  0.00000000e+00,  0.00000000e+00,  1.50829167e+06,
-  0.00000000e+00,  0.00000000e+00,  1.50829167e+06,
-  0.00000000e+00,  0.00000000e+00,  1.80888281e+06,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
- -3.13041667e+05,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
- -6.43869792e+05,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
-  2.05611458e+06,  0.00000000e+00,  0.00000000e+00,
-  5.19364583e+05,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  3.25847917e+06,  0.00000000e+00,  0.00000000e+00,
-  2.05611458e+06,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00, -3.13041667e+05,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00, -6.43869792e+05,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00,  2.05611458e+06,  0.00000000e+00,
-  0.00000000e+00,  5.19364583e+05,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  3.25847917e+06,  0.00000000e+00,
-  0.00000000e+00,  2.05611458e+06,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00, -3.13041667e+05,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00, -6.43869792e+05,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00,  2.05611458e+06,
-  0.00000000e+00,  0.00000000e+00,  5.19364583e+05,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  3.25847917e+06,
-  0.00000000e+00,  0.00000000e+00,  2.05611458e+06,
- -3.13041667e+05,  0.00000000e+00,  0.00000000e+00,
- -6.43869792e+05,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
-  2.05611458e+06,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  5.19364583e+05,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  2.05611458e+06,  0.00000000e+00,  0.00000000e+00,
-  3.25847917e+06,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00, -3.13041667e+05,  0.00000000e+00,
-  0.00000000e+00, -6.43869792e+05,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00,  2.05611458e+06,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  5.19364583e+05,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  2.05611458e+06,  0.00000000e+00,
-  0.00000000e+00,  3.25847917e+06,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00, -3.13041667e+05,
-  0.00000000e+00,  0.00000000e+00, -6.43869792e+05,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00,  2.05611458e+06,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  5.19364583e+05,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  2.05611458e+06,
-  0.00000000e+00,  0.00000000e+00,  3.25847917e+06,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData3DQuadratic::_valsResidualLumped[] = {
   3.68908573e+10,  2.89160572e+10, -8.38305638e+08,
   1.31658131e+11, -3.38201739e+10,  5.13320041e+10,
  -3.92910621e+11, -2.10630330e+11, -2.01774882e+11,
@@ -515,11 +201,11 @@
   4.58361238e+11, -2.69324783e+11,  3.51036392e+11,
 };
 
-const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData3DQuadratic::_valsJacobianLumped[] = {
+const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformData3DQuadratic::_valsJacobian[] = {
   2.57903646e+06,  2.57903646e+06,  2.57903646e+06,
+  2.40117187e+06,  2.40117187e+06,  2.40117187e+06,
+  2.40117187e+06,  2.40117187e+06,  2.40117187e+06,
   2.40117188e+06,  2.40117188e+06,  2.40117188e+06,
-  2.40117188e+06,  2.40117188e+06,  2.40117188e+06,
-  2.40117188e+06,  2.40117188e+06,  2.40117188e+06,
   1.20947917e+07,  1.20947917e+07,  1.20947917e+07,
   8.35963542e+06,  8.35963542e+06,  8.35963542e+06,
   8.35963542e+06,  8.35963542e+06,  8.35963542e+06,
@@ -541,6 +227,7 @@
   matId = _matId;
   matLabel = const_cast<char*>(_matLabel);
   dt = _dt;
+  dtStableExplicit = _dtStableExplicit;
   gravityVec = const_cast<PylithScalar*>(_gravityVec);
   vertices = const_cast<PylithScalar*>(_vertices);
   cells = const_cast<int*>(_cells);
@@ -554,8 +241,6 @@
   fieldTmdt = const_cast<PylithScalar*>(_fieldTmdt);
   valsResidual = const_cast<PylithScalar*>(_valsResidual);
   valsJacobian = const_cast<PylithScalar*>(_valsJacobian);
-  valsResidualLumped = const_cast<PylithScalar*>(_valsResidualLumped);
-  valsJacobianLumped = const_cast<PylithScalar*>(_valsJacobianLumped);
 } // constructor
 
 pylith::feassemble::ElasticityExplicitLgDeformData3DQuadratic::~ElasticityExplicitLgDeformData3DQuadratic(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData3DQuadratic.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData3DQuadratic.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformData3DQuadratic.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -65,6 +65,8 @@
 
   static const PylithScalar _dt;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const PylithScalar _gravityVec[];
 
   static const PylithScalar _vertices[];
@@ -91,10 +93,6 @@
 
   static const PylithScalar _valsJacobian[];
 
-  static const PylithScalar _valsResidualLumped[];
-
-  static const PylithScalar _valsJacobianLumped[];
-
 };
 
 #endif // pylith_feassemble_elasticityexplicitlgdeformdata3dquadratic_hh

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData1DLinear.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData1DLinear.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData1DLinear.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -43,6 +43,8 @@
 
 const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData1DLinear::_dt =   1.00000000e-02;
 
+const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData1DLinear::_dtStableExplicit =   3.75000000e-04;
+
 const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData1DLinear::_gravityVec[] = {
  -1.00000000e+08,
 };
@@ -95,23 +97,11 @@
 };
 
 const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData1DLinear::_valsResidual[] = {
- -2.60767056e+11,
- -3.01806069e+11,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData1DLinear::_valsJacobian[] = {
-  1.40625000e+07,
-  1.40625000e+07,
-  1.40625000e+07,
-  1.40625000e+07,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData1DLinear::_valsResidualLumped[] = {
  -2.60761431e+11,
  -3.01811694e+11,
 };
 
-const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData1DLinear::_valsJacobianLumped[] = {
+const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData1DLinear::_valsJacobian[] = {
   2.81250000e+07,
   2.81250000e+07,
 };
@@ -129,6 +119,7 @@
   matId = _matId;
   matLabel = const_cast<char*>(_matLabel);
   dt = _dt;
+  dtStableExplicit = _dtStableExplicit;
   gravityVec = const_cast<PylithScalar*>(_gravityVec);
   vertices = const_cast<PylithScalar*>(_vertices);
   cells = const_cast<int*>(_cells);
@@ -142,8 +133,6 @@
   fieldTmdt = const_cast<PylithScalar*>(_fieldTmdt);
   valsResidual = const_cast<PylithScalar*>(_valsResidual);
   valsJacobian = const_cast<PylithScalar*>(_valsJacobian);
-  valsResidualLumped = const_cast<PylithScalar*>(_valsResidualLumped);
-  valsJacobianLumped = const_cast<PylithScalar*>(_valsJacobianLumped);
 } // constructor
 
 pylith::feassemble::ElasticityExplicitLgDeformGravData1DLinear::~ElasticityExplicitLgDeformGravData1DLinear(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData1DLinear.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData1DLinear.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData1DLinear.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -65,6 +65,8 @@
 
   static const PylithScalar _dt;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const PylithScalar _gravityVec[];
 
   static const PylithScalar _vertices[];
@@ -91,10 +93,6 @@
 
   static const PylithScalar _valsJacobian[];
 
-  static const PylithScalar _valsResidualLumped[];
-
-  static const PylithScalar _valsJacobianLumped[];
-
 };
 
 #endif // pylith_feassemble_elasticityexplicitlgdeformgravdata1dlinear_hh

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData1DQuadratic.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData1DQuadratic.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData1DQuadratic.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -43,6 +43,8 @@
 
 const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData1DQuadratic::_dt =   1.00000000e-02;
 
+const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData1DQuadratic::_dtStableExplicit =   3.75000000e-04;
+
 const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData1DQuadratic::_gravityVec[] = {
  -1.00000000e+08,
 };
@@ -109,30 +111,12 @@
 };
 
 const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData1DQuadratic::_valsResidual[] = {
- -9.64575617e+09,
- -1.03067542e+11,
- -4.49853264e+11,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData1DQuadratic::_valsJacobian[] = {
-  6.25000000e+06,
- -3.12500000e+06,
-  6.25000000e+06,
- -3.12500000e+06,
-  6.25000000e+06,
-  6.25000000e+06,
-  6.25000000e+06,
-  6.25000000e+06,
-  2.50000000e+07,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData1DQuadratic::_valsResidualLumped[] = {
  -9.63981867e+09,
  -1.03061605e+11,
  -4.49865139e+11,
 };
 
-const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData1DQuadratic::_valsJacobianLumped[] = {
+const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData1DQuadratic::_valsJacobian[] = {
   9.37500000e+06,
   9.37500000e+06,
   3.75000000e+07,
@@ -151,6 +135,7 @@
   matId = _matId;
   matLabel = const_cast<char*>(_matLabel);
   dt = _dt;
+  dtStableExplicit = _dtStableExplicit;
   gravityVec = const_cast<PylithScalar*>(_gravityVec);
   vertices = const_cast<PylithScalar*>(_vertices);
   cells = const_cast<int*>(_cells);
@@ -164,8 +149,6 @@
   fieldTmdt = const_cast<PylithScalar*>(_fieldTmdt);
   valsResidual = const_cast<PylithScalar*>(_valsResidual);
   valsJacobian = const_cast<PylithScalar*>(_valsJacobian);
-  valsResidualLumped = const_cast<PylithScalar*>(_valsResidualLumped);
-  valsJacobianLumped = const_cast<PylithScalar*>(_valsJacobianLumped);
 } // constructor
 
 pylith::feassemble::ElasticityExplicitLgDeformGravData1DQuadratic::~ElasticityExplicitLgDeformGravData1DQuadratic(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData1DQuadratic.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData1DQuadratic.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData1DQuadratic.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -65,6 +65,8 @@
 
   static const PylithScalar _dt;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const PylithScalar _gravityVec[];
 
   static const PylithScalar _vertices[];
@@ -91,10 +93,6 @@
 
   static const PylithScalar _valsJacobian[];
 
-  static const PylithScalar _valsResidualLumped[];
-
-  static const PylithScalar _valsJacobianLumped[];
-
 };
 
 #endif // pylith_feassemble_elasticityexplicitlgdeformgravdata1dquadratic_hh

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData2DLinear.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData2DLinear.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData2DLinear.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -43,6 +43,8 @@
 
 const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData2DLinear::_dt =   1.00000000e-02;
 
+const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData2DLinear::_dtStableExplicit =   1.50923086e-04;
+
 const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData2DLinear::_gravityVec[] = {
   0.00000000e+00, -1.00000000e+08,
 };
@@ -100,39 +102,12 @@
 };
 
 const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData2DLinear::_valsResidual[] = {
- -5.23632630e+11,  5.37472513e+11,
-  1.65372743e+11, -6.24519323e+11,
-  3.58250262e+11, -5.04563977e+10,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData2DLinear::_valsJacobian[] = {
-  1.52777778e+06,  0.00000000e+00,
-  1.52777778e+06,  0.00000000e+00,
-  1.52777778e+06,  0.00000000e+00,
-  0.00000000e+00,  1.52777778e+06,
-  0.00000000e+00,  1.52777778e+06,
-  0.00000000e+00,  1.52777778e+06,
-  1.52777778e+06,  0.00000000e+00,
-  1.52777778e+06,  0.00000000e+00,
-  1.52777778e+06,  0.00000000e+00,
-  0.00000000e+00,  1.52777778e+06,
-  0.00000000e+00,  1.52777778e+06,
-  0.00000000e+00,  1.52777778e+06,
-  1.52777778e+06,  0.00000000e+00,
-  1.52777778e+06,  0.00000000e+00,
-  1.52777778e+06,  0.00000000e+00,
-  0.00000000e+00,  1.52777778e+06,
-  0.00000000e+00,  1.52777778e+06,
-  0.00000000e+00,  1.52777778e+06,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData2DLinear::_valsResidualLumped[] = {
  -5.23631714e+11,  5.37473582e+11,
   1.65371368e+11, -6.24523296e+11,
   3.58250720e+11, -5.04534949e+10,
 };
 
-const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData2DLinear::_valsJacobianLumped[] = {
+const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData2DLinear::_valsJacobian[] = {
   4.58333333e+06,  4.58333333e+06,
   4.58333333e+06,  4.58333333e+06,
   4.58333333e+06,  4.58333333e+06,
@@ -151,6 +126,7 @@
   matId = _matId;
   matLabel = const_cast<char*>(_matLabel);
   dt = _dt;
+  dtStableExplicit = _dtStableExplicit;
   gravityVec = const_cast<PylithScalar*>(_gravityVec);
   vertices = const_cast<PylithScalar*>(_vertices);
   cells = const_cast<int*>(_cells);
@@ -164,8 +140,6 @@
   fieldTmdt = const_cast<PylithScalar*>(_fieldTmdt);
   valsResidual = const_cast<PylithScalar*>(_valsResidual);
   valsJacobian = const_cast<PylithScalar*>(_valsJacobian);
-  valsResidualLumped = const_cast<PylithScalar*>(_valsResidualLumped);
-  valsJacobianLumped = const_cast<PylithScalar*>(_valsJacobianLumped);
 } // constructor
 
 pylith::feassemble::ElasticityExplicitLgDeformGravData2DLinear::~ElasticityExplicitLgDeformGravData2DLinear(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData2DLinear.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData2DLinear.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData2DLinear.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -65,6 +65,8 @@
 
   static const PylithScalar _dt;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const PylithScalar _gravityVec[];
 
   static const PylithScalar _vertices[];
@@ -91,10 +93,6 @@
 
   static const PylithScalar _valsJacobian[];
 
-  static const PylithScalar _valsResidualLumped[];
-
-  static const PylithScalar _valsJacobianLumped[];
-
 };
 
 #endif // pylith_feassemble_elasticityexplicitlgdeformgravdata2dlinear_hh

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData2DQuadratic.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData2DQuadratic.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData2DQuadratic.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -43,6 +43,8 @@
 
 const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData2DQuadratic::_dt =   1.00000000e-02;
 
+const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData2DQuadratic::_dtStableExplicit =   2.63523138e-04;
+
 const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData2DQuadratic::_gravityVec[] = {
   0.00000000e+00, -1.00000000e+08,
 };
@@ -170,90 +172,6 @@
 };
 
 const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData2DQuadratic::_valsResidual[] = {
-  3.35186619e+10,  3.88314832e+10,
- -7.94930135e+10, -8.36264489e+10,
-  2.10035850e+10, -1.83280629e+10,
-  7.31131484e+10, -2.31349704e+11,
- -5.42588065e+10, -1.51054810e+11,
-  6.13022939e+09, -4.46444228e+09,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData2DQuadratic::_valsJacobian[] = {
-  2.24121094e+06,  0.00000000e+00,
-  2.41699219e+05,  0.00000000e+00,
-  2.41699219e+05,  0.00000000e+00,
-  4.21875000e+06,  0.00000000e+00,
- -1.36230469e+06,  0.00000000e+00,
- -1.36230469e+06,  0.00000000e+00,
-  0.00000000e+00,  2.24121094e+06,
-  0.00000000e+00,  2.41699219e+05,
-  0.00000000e+00,  2.41699219e+05,
-  0.00000000e+00,  4.21875000e+06,
-  0.00000000e+00, -1.36230469e+06,
-  0.00000000e+00, -1.36230469e+06,
-  2.41699219e+05,  0.00000000e+00,
-  3.61083984e+06,  0.00000000e+00,
- -6.73828125e+05,  0.00000000e+00,
-  3.45703125e+06,  0.00000000e+00,
- -1.52343750e+06,  0.00000000e+00,
- -1.12792969e+06,  0.00000000e+00,
-  0.00000000e+00,  2.41699219e+05,
-  0.00000000e+00,  3.61083984e+06,
-  0.00000000e+00, -6.73828125e+05,
-  0.00000000e+00,  3.45703125e+06,
-  0.00000000e+00, -1.52343750e+06,
-  0.00000000e+00, -1.12792969e+06,
-  2.41699219e+05,  0.00000000e+00,
- -6.73828125e+05,  0.00000000e+00,
-  3.61083984e+06,  0.00000000e+00,
-  3.45703125e+06,  0.00000000e+00,
- -1.12792969e+06,  0.00000000e+00,
- -1.52343750e+06,  0.00000000e+00,
-  0.00000000e+00,  2.41699219e+05,
-  0.00000000e+00, -6.73828125e+05,
-  0.00000000e+00,  3.61083984e+06,
-  0.00000000e+00,  3.45703125e+06,
-  0.00000000e+00, -1.12792969e+06,
-  0.00000000e+00, -1.52343750e+06,
-  4.21875000e+06,  0.00000000e+00,
-  3.45703125e+06,  0.00000000e+00,
-  3.45703125e+06,  0.00000000e+00,
-  2.21484375e+07,  0.00000000e+00,
- -5.39062500e+06,  0.00000000e+00,
- -5.39062500e+06,  0.00000000e+00,
-  0.00000000e+00,  4.21875000e+06,
-  0.00000000e+00,  3.45703125e+06,
-  0.00000000e+00,  3.45703125e+06,
-  0.00000000e+00,  2.21484375e+07,
-  0.00000000e+00, -5.39062500e+06,
-  0.00000000e+00, -5.39062500e+06,
- -1.36230469e+06,  0.00000000e+00,
- -1.52343750e+06,  0.00000000e+00,
- -1.12792969e+06,  0.00000000e+00,
- -5.39062500e+06,  0.00000000e+00,
-  8.46679688e+06,  0.00000000e+00,
-  6.09375000e+06,  0.00000000e+00,
-  0.00000000e+00, -1.36230469e+06,
-  0.00000000e+00, -1.52343750e+06,
-  0.00000000e+00, -1.12792969e+06,
-  0.00000000e+00, -5.39062500e+06,
-  0.00000000e+00,  8.46679688e+06,
-  0.00000000e+00,  6.09375000e+06,
- -1.36230469e+06,  0.00000000e+00,
- -1.12792969e+06,  0.00000000e+00,
- -1.52343750e+06,  0.00000000e+00,
- -5.39062500e+06,  0.00000000e+00,
-  6.09375000e+06,  0.00000000e+00,
-  8.46679688e+06,  0.00000000e+00,
-  0.00000000e+00, -1.36230469e+06,
-  0.00000000e+00, -1.12792969e+06,
-  0.00000000e+00, -1.52343750e+06,
-  0.00000000e+00, -5.39062500e+06,
-  0.00000000e+00,  6.09375000e+06,
-  0.00000000e+00,  8.46679688e+06,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData2DQuadratic::_valsResidualLumped[] = {
   3.35171172e+10,  3.88317601e+10,
  -7.94952005e+10, -8.36278881e+10,
   2.10014852e+10, -1.83287726e+10,
@@ -262,7 +180,7 @@
   6.13320302e+09, -4.46103066e+09,
 };
 
-const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData2DQuadratic::_valsJacobianLumped[] = {
+const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData2DQuadratic::_valsJacobian[] = {
   4.21875000e+06,  4.21875000e+06,
   3.98437500e+06,  3.98437500e+06,
   3.98437500e+06,  3.98437500e+06,
@@ -284,6 +202,7 @@
   matId = _matId;
   matLabel = const_cast<char*>(_matLabel);
   dt = _dt;
+  dtStableExplicit = _dtStableExplicit;
   gravityVec = const_cast<PylithScalar*>(_gravityVec);
   vertices = const_cast<PylithScalar*>(_vertices);
   cells = const_cast<int*>(_cells);
@@ -297,8 +216,6 @@
   fieldTmdt = const_cast<PylithScalar*>(_fieldTmdt);
   valsResidual = const_cast<PylithScalar*>(_valsResidual);
   valsJacobian = const_cast<PylithScalar*>(_valsJacobian);
-  valsResidualLumped = const_cast<PylithScalar*>(_valsResidualLumped);
-  valsJacobianLumped = const_cast<PylithScalar*>(_valsJacobianLumped);
 } // constructor
 
 pylith::feassemble::ElasticityExplicitLgDeformGravData2DQuadratic::~ElasticityExplicitLgDeformGravData2DQuadratic(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData2DQuadratic.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData2DQuadratic.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData2DQuadratic.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -65,6 +65,8 @@
 
   static const PylithScalar _dt;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const PylithScalar _gravityVec[];
 
   static const PylithScalar _vertices[];
@@ -91,10 +93,6 @@
 
   static const PylithScalar _valsJacobian[];
 
-  static const PylithScalar _valsResidualLumped[];
-
-  static const PylithScalar _valsJacobianLumped[];
-
 };
 
 #endif // pylith_feassemble_elasticityexplicitlgdeformgravdata2dquadratic_hh

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData3DLinear.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData3DLinear.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData3DLinear.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -43,6 +43,8 @@
 
 const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData3DLinear::_dt =   1.00000000e-02;
 
+const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData3DLinear::_dtStableExplicit =   1.80277564e-04;
+
 const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData3DLinear::_gravityVec[] = {
   0.00000000e+00,  0.00000000e+00, -1.00000000e+08,
 };
@@ -106,71 +108,13 @@
 };
 
 const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData3DLinear::_valsResidual[] = {
- -1.33659352e+10,  3.00655421e+11,  1.14596233e+11,
- -5.48900483e+10,  6.55599721e+11,  2.70835965e+11,
-  6.45910023e+10, -1.06342951e+12, -5.20051871e+11,
-  3.66834369e+09,  1.07174373e+11,  1.22363040e+08,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData3DLinear::_valsJacobian[] = {
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  8.40625000e+05,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  8.40625000e+05,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-  0.00000000e+00,  0.00000000e+00,  8.40625000e+05,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData3DLinear::_valsResidualLumped[] = {
  -1.33654308e+10,  3.00654749e+11,  1.14596233e+11,
  -5.48895440e+10,  6.55600730e+11,  2.70837310e+11,
   6.45891529e+10, -1.06343052e+12, -5.20053216e+11,
   3.66918432e+09,  1.07175045e+11,  1.22363040e+08,
 };
 
-const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData3DLinear::_valsJacobianLumped[] = {
+const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData3DLinear::_valsJacobian[] = {
   3.36250000e+06,  3.36250000e+06,  3.36250000e+06,
   3.36250000e+06,  3.36250000e+06,  3.36250000e+06,
   3.36250000e+06,  3.36250000e+06,  3.36250000e+06,
@@ -190,6 +134,7 @@
   matId = _matId;
   matLabel = const_cast<char*>(_matLabel);
   dt = _dt;
+  dtStableExplicit = _dtStableExplicit;
   gravityVec = const_cast<PylithScalar*>(_gravityVec);
   vertices = const_cast<PylithScalar*>(_vertices);
   cells = const_cast<int*>(_cells);
@@ -203,8 +148,6 @@
   fieldTmdt = const_cast<PylithScalar*>(_fieldTmdt);
   valsResidual = const_cast<PylithScalar*>(_valsResidual);
   valsJacobian = const_cast<PylithScalar*>(_valsJacobian);
-  valsResidualLumped = const_cast<PylithScalar*>(_valsResidualLumped);
-  valsJacobianLumped = const_cast<PylithScalar*>(_valsJacobianLumped);
 } // constructor
 
 pylith::feassemble::ElasticityExplicitLgDeformGravData3DLinear::~ElasticityExplicitLgDeformGravData3DLinear(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData3DLinear.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData3DLinear.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData3DLinear.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -65,6 +65,8 @@
 
   static const PylithScalar _dt;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const PylithScalar _gravityVec[];
 
   static const PylithScalar _vertices[];
@@ -91,10 +93,6 @@
 
   static const PylithScalar _valsJacobian[];
 
-  static const PylithScalar _valsResidualLumped[];
-
-  static const PylithScalar _valsJacobianLumped[];
-
 };
 
 #endif // pylith_feassemble_elasticityexplicitlgdeformgravdata3dlinear_hh

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData3DQuadratic.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData3DQuadratic.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData3DQuadratic.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -43,6 +43,8 @@
 
 const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData3DQuadratic::_dt =   1.00000000e-02;
 
+const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData3DQuadratic::_dtStableExplicit =   3.68555740e-04;
+
 const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData3DQuadratic::_gravityVec[] = {
   0.00000000e+00,  0.00000000e+00, -1.00000000e+08,
 };
@@ -187,322 +189,6 @@
 };
 
 const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData3DQuadratic::_valsResidual[] = {
-  3.68904302e+10,  2.89154635e+10, -2.66246678e+10,
-  1.31658958e+11, -3.38188176e+10,  2.73167999e+10,
- -3.92909711e+11, -2.10630391e+11, -2.25786587e+11,
- -1.14269176e+11,  1.30717232e+11, -1.31985028e+11,
- -2.64258575e+11, -2.85535726e+10, -1.61155147e+11,
-  4.59398355e+11,  2.32376498e+11,  1.91367337e+11,
- -2.46994434e+11, -7.38524287e+10, -1.31572358e+11,
-  5.25219225e+10, -8.35281650e+10, -9.84143036e+10,
- -1.20392699e+11,  3.07708241e+11, -3.84670356e+11,
-  4.58368848e+11, -2.69312012e+11,  2.30080394e+11,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData3DQuadratic::_valsJacobian[] = {
-  1.50251107e+06,  0.00000000e+00,  0.00000000e+00,
- -5.70500651e+05,  0.00000000e+00,  0.00000000e+00,
- -5.70500651e+05,  0.00000000e+00,  0.00000000e+00,
- -5.70500651e+05,  0.00000000e+00,  0.00000000e+00,
- -3.13041667e+05,  0.00000000e+00,  0.00000000e+00,
-  1.24238411e+06,  0.00000000e+00,  0.00000000e+00,
-  1.24238411e+06,  0.00000000e+00,  0.00000000e+00,
-  1.24238411e+06,  0.00000000e+00,  0.00000000e+00,
- -3.13041667e+05,  0.00000000e+00,  0.00000000e+00,
- -3.13041667e+05,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00,  1.50251107e+06,  0.00000000e+00,
-  0.00000000e+00, -5.70500651e+05,  0.00000000e+00,
-  0.00000000e+00, -5.70500651e+05,  0.00000000e+00,
-  0.00000000e+00, -5.70500651e+05,  0.00000000e+00,
-  0.00000000e+00, -3.13041667e+05,  0.00000000e+00,
-  0.00000000e+00,  1.24238411e+06,  0.00000000e+00,
-  0.00000000e+00,  1.24238411e+06,  0.00000000e+00,
-  0.00000000e+00,  1.24238411e+06,  0.00000000e+00,
-  0.00000000e+00, -3.13041667e+05,  0.00000000e+00,
-  0.00000000e+00, -3.13041667e+05,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00,  1.50251107e+06,
-  0.00000000e+00,  0.00000000e+00, -5.70500651e+05,
-  0.00000000e+00,  0.00000000e+00, -5.70500651e+05,
-  0.00000000e+00,  0.00000000e+00, -5.70500651e+05,
-  0.00000000e+00,  0.00000000e+00, -3.13041667e+05,
-  0.00000000e+00,  0.00000000e+00,  1.24238411e+06,
-  0.00000000e+00,  0.00000000e+00,  1.24238411e+06,
-  0.00000000e+00,  0.00000000e+00,  1.24238411e+06,
-  0.00000000e+00,  0.00000000e+00, -3.13041667e+05,
-  0.00000000e+00,  0.00000000e+00, -3.13041667e+05,
- -5.70500651e+05,  0.00000000e+00,  0.00000000e+00,
-  2.84272070e+06,  0.00000000e+00,  0.00000000e+00,
- -8.39520833e+05,  0.00000000e+00,  0.00000000e+00,
- -8.39520833e+05,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
-  5.45154948e+05,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
- -6.43869792e+05,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00, -5.70500651e+05,  0.00000000e+00,
-  0.00000000e+00,  2.84272070e+06,  0.00000000e+00,
-  0.00000000e+00, -8.39520833e+05,  0.00000000e+00,
-  0.00000000e+00, -8.39520833e+05,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00,  5.45154948e+05,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00, -6.43869792e+05,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00, -5.70500651e+05,
-  0.00000000e+00,  0.00000000e+00,  2.84272070e+06,
-  0.00000000e+00,  0.00000000e+00, -8.39520833e+05,
-  0.00000000e+00,  0.00000000e+00, -8.39520833e+05,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00,  5.45154948e+05,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00, -6.43869792e+05,
- -5.70500651e+05,  0.00000000e+00,  0.00000000e+00,
- -8.39520833e+05,  0.00000000e+00,  0.00000000e+00,
-  2.84272070e+06,  0.00000000e+00,  0.00000000e+00,
- -8.39520833e+05,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
-  5.45154948e+05,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
- -6.43869792e+05,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00, -5.70500651e+05,  0.00000000e+00,
-  0.00000000e+00, -8.39520833e+05,  0.00000000e+00,
-  0.00000000e+00,  2.84272070e+06,  0.00000000e+00,
-  0.00000000e+00, -8.39520833e+05,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00,  5.45154948e+05,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00, -6.43869792e+05,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00, -5.70500651e+05,
-  0.00000000e+00,  0.00000000e+00, -8.39520833e+05,
-  0.00000000e+00,  0.00000000e+00,  2.84272070e+06,
-  0.00000000e+00,  0.00000000e+00, -8.39520833e+05,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00,  5.45154948e+05,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00, -6.43869792e+05,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
- -5.70500651e+05,  0.00000000e+00,  0.00000000e+00,
- -8.39520833e+05,  0.00000000e+00,  0.00000000e+00,
- -8.39520833e+05,  0.00000000e+00,  0.00000000e+00,
-  2.84272070e+06,  0.00000000e+00,  0.00000000e+00,
- -6.43869792e+05,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
-  5.45154948e+05,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00, -5.70500651e+05,  0.00000000e+00,
-  0.00000000e+00, -8.39520833e+05,  0.00000000e+00,
-  0.00000000e+00, -8.39520833e+05,  0.00000000e+00,
-  0.00000000e+00,  2.84272070e+06,  0.00000000e+00,
-  0.00000000e+00, -6.43869792e+05,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00,  5.45154948e+05,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00, -5.70500651e+05,
-  0.00000000e+00,  0.00000000e+00, -8.39520833e+05,
-  0.00000000e+00,  0.00000000e+00, -8.39520833e+05,
-  0.00000000e+00,  0.00000000e+00,  2.84272070e+06,
-  0.00000000e+00,  0.00000000e+00, -6.43869792e+05,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00,  5.45154948e+05,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
- -3.13041667e+05,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
- -6.43869792e+05,  0.00000000e+00,  0.00000000e+00,
-  3.25847917e+06,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  5.19364583e+05,  0.00000000e+00,  0.00000000e+00,
-  2.05611458e+06,  0.00000000e+00,  0.00000000e+00,
-  2.05611458e+06,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00, -3.13041667e+05,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00, -6.43869792e+05,  0.00000000e+00,
-  0.00000000e+00,  3.25847917e+06,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  5.19364583e+05,  0.00000000e+00,
-  0.00000000e+00,  2.05611458e+06,  0.00000000e+00,
-  0.00000000e+00,  2.05611458e+06,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00, -3.13041667e+05,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00, -6.43869792e+05,
-  0.00000000e+00,  0.00000000e+00,  3.25847917e+06,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  5.19364583e+05,
-  0.00000000e+00,  0.00000000e+00,  2.05611458e+06,
-  0.00000000e+00,  0.00000000e+00,  2.05611458e+06,
-  1.24238411e+06,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
-  5.45154948e+05,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  1.80888281e+06,  0.00000000e+00,  0.00000000e+00,
-  1.50829167e+06,  0.00000000e+00,  0.00000000e+00,
-  1.50829167e+06,  0.00000000e+00,  0.00000000e+00,
-  5.19364583e+05,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00,  1.24238411e+06,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00,  5.45154948e+05,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  1.80888281e+06,  0.00000000e+00,
-  0.00000000e+00,  1.50829167e+06,  0.00000000e+00,
-  0.00000000e+00,  1.50829167e+06,  0.00000000e+00,
-  0.00000000e+00,  5.19364583e+05,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00,  1.24238411e+06,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00,  5.45154948e+05,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  1.80888281e+06,
-  0.00000000e+00,  0.00000000e+00,  1.50829167e+06,
-  0.00000000e+00,  0.00000000e+00,  1.50829167e+06,
-  0.00000000e+00,  0.00000000e+00,  5.19364583e+05,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  1.24238411e+06,  0.00000000e+00,  0.00000000e+00,
-  5.45154948e+05,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  1.50829167e+06,  0.00000000e+00,  0.00000000e+00,
-  1.80888281e+06,  0.00000000e+00,  0.00000000e+00,
-  1.50829167e+06,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  5.19364583e+05,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00,  1.24238411e+06,  0.00000000e+00,
-  0.00000000e+00,  5.45154948e+05,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  1.50829167e+06,  0.00000000e+00,
-  0.00000000e+00,  1.80888281e+06,  0.00000000e+00,
-  0.00000000e+00,  1.50829167e+06,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  5.19364583e+05,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00,  1.24238411e+06,
-  0.00000000e+00,  0.00000000e+00,  5.45154948e+05,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  1.50829167e+06,
-  0.00000000e+00,  0.00000000e+00,  1.80888281e+06,
-  0.00000000e+00,  0.00000000e+00,  1.50829167e+06,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  5.19364583e+05,
-  1.24238411e+06,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
- -5.06914062e+05,  0.00000000e+00,  0.00000000e+00,
-  5.45154948e+05,  0.00000000e+00,  0.00000000e+00,
-  5.19364583e+05,  0.00000000e+00,  0.00000000e+00,
-  1.50829167e+06,  0.00000000e+00,  0.00000000e+00,
-  1.50829167e+06,  0.00000000e+00,  0.00000000e+00,
-  1.80888281e+06,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00,  1.24238411e+06,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00, -5.06914062e+05,  0.00000000e+00,
-  0.00000000e+00,  5.45154948e+05,  0.00000000e+00,
-  0.00000000e+00,  5.19364583e+05,  0.00000000e+00,
-  0.00000000e+00,  1.50829167e+06,  0.00000000e+00,
-  0.00000000e+00,  1.50829167e+06,  0.00000000e+00,
-  0.00000000e+00,  1.80888281e+06,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00,  1.24238411e+06,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00, -5.06914062e+05,
-  0.00000000e+00,  0.00000000e+00,  5.45154948e+05,
-  0.00000000e+00,  0.00000000e+00,  5.19364583e+05,
-  0.00000000e+00,  0.00000000e+00,  1.50829167e+06,
-  0.00000000e+00,  0.00000000e+00,  1.50829167e+06,
-  0.00000000e+00,  0.00000000e+00,  1.80888281e+06,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
- -3.13041667e+05,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
- -6.43869792e+05,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
-  2.05611458e+06,  0.00000000e+00,  0.00000000e+00,
-  5.19364583e+05,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  3.25847917e+06,  0.00000000e+00,  0.00000000e+00,
-  2.05611458e+06,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00, -3.13041667e+05,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00, -6.43869792e+05,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00,  2.05611458e+06,  0.00000000e+00,
-  0.00000000e+00,  5.19364583e+05,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  3.25847917e+06,  0.00000000e+00,
-  0.00000000e+00,  2.05611458e+06,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00, -3.13041667e+05,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00, -6.43869792e+05,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00,  2.05611458e+06,
-  0.00000000e+00,  0.00000000e+00,  5.19364583e+05,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  3.25847917e+06,
-  0.00000000e+00,  0.00000000e+00,  2.05611458e+06,
- -3.13041667e+05,  0.00000000e+00,  0.00000000e+00,
- -6.43869792e+05,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
-  1.46026823e+06,  0.00000000e+00,  0.00000000e+00,
-  2.05611458e+06,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  5.19364583e+05,  0.00000000e+00,  0.00000000e+00,
-  1.12054688e+06,  0.00000000e+00,  0.00000000e+00,
-  2.05611458e+06,  0.00000000e+00,  0.00000000e+00,
-  3.25847917e+06,  0.00000000e+00,  0.00000000e+00,
-  0.00000000e+00, -3.13041667e+05,  0.00000000e+00,
-  0.00000000e+00, -6.43869792e+05,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00,  1.46026823e+06,  0.00000000e+00,
-  0.00000000e+00,  2.05611458e+06,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  5.19364583e+05,  0.00000000e+00,
-  0.00000000e+00,  1.12054688e+06,  0.00000000e+00,
-  0.00000000e+00,  2.05611458e+06,  0.00000000e+00,
-  0.00000000e+00,  3.25847917e+06,  0.00000000e+00,
-  0.00000000e+00,  0.00000000e+00, -3.13041667e+05,
-  0.00000000e+00,  0.00000000e+00, -6.43869792e+05,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00,  1.46026823e+06,
-  0.00000000e+00,  0.00000000e+00,  2.05611458e+06,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  5.19364583e+05,
-  0.00000000e+00,  0.00000000e+00,  1.12054688e+06,
-  0.00000000e+00,  0.00000000e+00,  2.05611458e+06,
-  0.00000000e+00,  0.00000000e+00,  3.25847917e+06,
-};
-
-const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData3DQuadratic::_valsResidualLumped[] = {
   3.68908573e+10,  2.89160572e+10, -2.66286702e+10,
   1.31658131e+11, -3.38201739e+10,  2.73202854e+10,
  -3.92910621e+11, -2.10630330e+11, -2.25786601e+11,
@@ -515,11 +201,11 @@
   4.58361238e+11, -2.69324783e+11,  2.30088475e+11,
 };
 
-const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData3DQuadratic::_valsJacobianLumped[] = {
+const PylithScalar pylith::feassemble::ElasticityExplicitLgDeformGravData3DQuadratic::_valsJacobian[] = {
   2.57903646e+06,  2.57903646e+06,  2.57903646e+06,
+  2.40117187e+06,  2.40117187e+06,  2.40117187e+06,
+  2.40117187e+06,  2.40117187e+06,  2.40117187e+06,
   2.40117188e+06,  2.40117188e+06,  2.40117188e+06,
-  2.40117188e+06,  2.40117188e+06,  2.40117188e+06,
-  2.40117188e+06,  2.40117188e+06,  2.40117188e+06,
   1.20947917e+07,  1.20947917e+07,  1.20947917e+07,
   8.35963542e+06,  8.35963542e+06,  8.35963542e+06,
   8.35963542e+06,  8.35963542e+06,  8.35963542e+06,
@@ -541,6 +227,7 @@
   matId = _matId;
   matLabel = const_cast<char*>(_matLabel);
   dt = _dt;
+  dtStableExplicit = _dtStableExplicit;
   gravityVec = const_cast<PylithScalar*>(_gravityVec);
   vertices = const_cast<PylithScalar*>(_vertices);
   cells = const_cast<int*>(_cells);
@@ -554,8 +241,6 @@
   fieldTmdt = const_cast<PylithScalar*>(_fieldTmdt);
   valsResidual = const_cast<PylithScalar*>(_valsResidual);
   valsJacobian = const_cast<PylithScalar*>(_valsJacobian);
-  valsResidualLumped = const_cast<PylithScalar*>(_valsResidualLumped);
-  valsJacobianLumped = const_cast<PylithScalar*>(_valsJacobianLumped);
 } // constructor
 
 pylith::feassemble::ElasticityExplicitLgDeformGravData3DQuadratic::~ElasticityExplicitLgDeformGravData3DQuadratic(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData3DQuadratic.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData3DQuadratic.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityExplicitLgDeformGravData3DQuadratic.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -65,6 +65,8 @@
 
   static const PylithScalar _dt;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const PylithScalar _gravityVec[];
 
   static const PylithScalar _vertices[];
@@ -91,10 +93,6 @@
 
   static const PylithScalar _valsJacobian[];
 
-  static const PylithScalar _valsResidualLumped[];
-
-  static const PylithScalar _valsJacobianLumped[];
-
 };
 
 #endif // pylith_feassemble_elasticityexplicitlgdeformgravdata3dquadratic_hh

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityLgDeformExplicitApp.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityLgDeformExplicitApp.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/ElasticityLgDeformExplicitApp.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -54,8 +54,7 @@
     self._collectData()
     self._calculateResidual()
     self._calculateJacobian()
-    self._calculateResidualLumped()
-    self._calculateJacobianLumped()
+    self._calcDtStable()
     self._initData()
     self.data.write(self.name)
     return

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh1DLinear.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh1DLinear.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh1DLinear.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -51,6 +51,8 @@
     self.vertices = numpy.array( [[-0.25], [2.0]], dtype=numpy.float64)
     self.cells = numpy.array( [[0, 1]], dtype=numpy.int32)
     self.verticesRef = numpy.array( [[-1.0], [+1.0]], dtype=numpy.float64)
+
+    self.minCellWidth = 2.25
     return
   
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh1DQuadratic.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh1DQuadratic.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh1DQuadratic.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -53,6 +53,8 @@
     self.cells = numpy.array( [[0, 1, 2]], dtype=numpy.int32)
     self.verticesRef = numpy.array([[-1.0], [1.0], [0.0]],
                                    dtype=numpy.float64)
+
+    self.minCellWidth = 2.25
     return
   
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh1Din2DLinear.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh1Din2DLinear.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh1Din2DLinear.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -52,6 +52,9 @@
                                  dtype=numpy.float64)
     self.cells = numpy.array( [[0, 1]], dtype=numpy.int32)
     self.verticesRef = numpy.array([ [-1.0], [1.0] ], dtype=numpy.float64)
+
+    self.minCellWidth = ((self.vertices[1][0]-self.vertices[0][0])**2 + \
+                          (self.vertices[1][1]-self.vertices[0][1])**2)**0.5
     return
   
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh1Din2DQuadratic.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh1Din2DQuadratic.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh1Din2DQuadratic.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -52,6 +52,9 @@
                                  dtype=numpy.float64)
     self.cells = numpy.array( [[0, 1, 2]], dtype=numpy.int32)
     self.verticesRef = numpy.array([[-1.0], [1.0], [0.0]], dtype=numpy.float64)
+
+    self.minCellWidth = ((self.vertices[1][0]-self.vertices[0][0])**2 + \
+                          (self.vertices[1][1]-self.vertices[0][1])**2)**0.5
     return
   
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh1Din3DLinear.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh1Din3DLinear.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh1Din3DLinear.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -54,6 +54,9 @@
                                  dtype=numpy.float64)
     self.cells = numpy.array( [[0, 1]], dtype=numpy.int32)
     self.verticesRef = numpy.array( [[-1.0], [1.0]], dtype=numpy.float64)
+
+    self.minCellWidth = ((self.vertices[1][0]-self.vertices[0][0])**2 + \
+                          (self.vertices[1][1]-self.vertices[0][1])**2)**0.5
     return
   
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh1Din3DQuadratic.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh1Din3DQuadratic.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh1Din3DQuadratic.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -55,6 +55,9 @@
                                  dtype=numpy.float64)
     self.cells = numpy.array( [[0, 1, 2]], dtype=numpy.int32)
     self.verticesRef = numpy.array([[-1.0], [1.0], [0.0]], dtype=numpy.float64)
+
+    self.minCellWidth = ((self.vertices[1][0]-self.vertices[0][0])**2 + \
+                          (self.vertices[1][1]-self.vertices[0][1])**2)**0.5
     return
   
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh2DLinear.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh2DLinear.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh2DLinear.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -57,6 +57,13 @@
                                      [+1.0, -1.0],
                                      [-1.0, +1.0]],
                                     dtype=numpy.float64)
+
+    a = (0.1**2 + 0.9**2)**0.5
+    b = (1.3**2 + 0.7**2)**0.5
+    c = (1.2**2 + 0.2**2)**0.5
+    k = 0.5 * (a + b + c)
+    r = (k*(k-a)*(k-b)*(k-c))**0.5 / k
+    self.minCellWidth = min(a, b, c, 3.0*r)
     return
   
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh2DQuadratic.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh2DQuadratic.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh2DQuadratic.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -64,6 +64,13 @@
                                      [-1.0,  0.0],
                                      [ 0.0, -1.0]],
                                     dtype=numpy.float64)
+
+    a = (2.0**2 + 1.2**2)**0.5
+    b = (2.5**2 + 0.3**2)**0.5
+    c = (0.5**2 + 1.5**2)**0.5
+    k = 0.5 * (a + b + c)
+    r = (k*(k-a)*(k-b)*(k-c))**0.5 / k
+    self.minCellWidth = min(a, b, c, 3.0*r)
     return
   
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh2Din3DLinearXY.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh2Din3DLinearXY.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh2Din3DLinearXY.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -51,13 +51,20 @@
                                    dtype=numpy.float64)
     self.vertices = numpy.array( [[ 0.0,  0.0,  0.0],
                                   [-1.0,  0.0,  0.0],
-                                  [ 0.0,  0.0,  1.0]],
+                                  [ 0.0,  1.0,  0.0]],
                                  dtype=numpy.float64)
     self.cells = numpy.array( [[0, 1, 2]], dtype=numpy.int32)
     self.verticesRef = numpy.array( [[-1.0, -1.0],
                                      [+1.0, -1.0],
                                      [-1.0, +1.0]],
                                     dtype=numpy.float64)
+
+    a = (1.0**2 + 0.0**2 + 0.0**2)**0.5
+    b = (1.0**2 + 0.0**2 + 1.0**2)**0.5
+    c = (0.0**2 + 0.0**2 + 1.0**2)**0.5
+    k = 0.5 * (a + b + c)
+    r = (k*(k-a)*(k-b)*(k-c))**0.5 / k
+    self.minCellWidth = r
     return
   
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh2Din3DLinearXYZ.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh2Din3DLinearXYZ.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh2Din3DLinearXYZ.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -58,6 +58,13 @@
                                      [+1.0, -1.0],
                                      [-1.0, +1.0]],
                                     dtype=numpy.float64)
+
+    a = (1.0**2 + 0.0**2 + 0.0**2)**0.5
+    b = (1.0**2 + 0.0**2 + 1.0**2)**0.5
+    c = (0.0**2 + 0.0**2 + 1.0**2)**0.5
+    k = 0.5 * (a + b + c)
+    r = (k*(k-a)*(k-b)*(k-c))**0.5 / k
+    self.minCellWidth = r
     return
   
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh2Din3DLinearYZ.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh2Din3DLinearYZ.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh2Din3DLinearYZ.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -58,6 +58,13 @@
                                      [+1.0, -1.0],
                                      [-1.0, +1.0]],
                                     dtype=numpy.float64)
+
+    a = (0.0**2 + 1.0**2 + 0.0**2)**0.5
+    b = (0.0**2 + 1.0**2 + 0.0**2)**0.5
+    c = (0.0**2 + 0.0**2 + 1.0**2)**0.5
+    k = 0.5 * (a + b + c)
+    r = (k*(k-a)*(k-b)*(k-c))**0.5 / k
+    self.minCellWidth = r
     return
   
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh3DLinear.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh3DLinear.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh3DLinear.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -59,6 +59,39 @@
                                      [-1.0, +1.0, -1.0],
                                      [-1.0, -1.0, +1.0]],
                                     dtype=numpy.float64)
+
+    v0 = self.vertices[0,:]
+    v1 = self.vertices[1,:]
+    v2 = self.vertices[2,:]
+    v3 = self.vertices[3,:]
+
+    e01 = ((v0[0]-v1[0])**2 + (v0[1]-v1[1])**2 + (v0[2]-v1[2])**2)**0.5
+    e12 = ((v1[0]-v2[0])**2 + (v1[1]-v2[1])**2 + (v1[2]-v2[2])**2)**0.5
+    e20 = ((v2[0]-v0[0])**2 + (v2[1]-v0[1])**2 + (v2[2]-v0[2])**2)**0.5
+    e03 = ((v0[0]-v3[0])**2 + (v0[1]-v3[1])**2 + (v0[2]-v3[2])**2)**0.5
+    e13 = ((v1[0]-v3[0])**2 + (v1[1]-v3[1])**2 + (v1[2]-v3[2])**2)**0.5
+    e23 = ((v2[0]-v3[0])**2 + (v2[1]-v3[1])**2 + (v2[2]-v3[2])**2)**0.5
+
+    vol = 1.0/6.0*numpy.linalg.det(numpy.array([[1.0, v0[0], v0[1], v0[2]],
+                                                [1.0, v1[0], v1[1], v1[2]],
+                                                [1.0, v2[0], v2[1], v2[2]],
+                                                [1.0, v3[0], v3[1], v3[2]]],
+                                               dtype=numpy.float64))
+    cross012 = numpy.cross(v1-v0, v2-v0)
+    area012 = 0.5*(numpy.dot(cross012, cross012))**0.5
+
+    cross013 = numpy.cross(v1-v0, v3-v0)
+    area013 = 0.5*(numpy.dot(cross013, cross013))**0.5
+
+    cross123 = numpy.cross(v2-v1, v3-v1)
+    area123 = 0.5*(numpy.dot(cross123, cross123))**0.5
+
+    cross203 = numpy.cross(v0-v2, v3-v2)
+    area203 = 0.5*(numpy.dot(cross203, cross203))**0.5
+
+    area = area012 + area013 + area123 + area203;
+    r = 3.0 * vol / area
+    self.minCellWidth = min(e01, e12, e20, e03, e13, e23, 6.38*r)
     return
   
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh3DQuadratic.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh3DQuadratic.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/feassemble/data/Mesh3DQuadratic.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -73,6 +73,39 @@
                                      [ 0.0, -1.0,  0.0],
                                      [-1.0,  0.0,  0.0]],
                                     dtype=numpy.float64)
+
+    v0 = self.vertices[0,:]
+    v1 = self.vertices[1,:]
+    v2 = self.vertices[2,:]
+    v3 = self.vertices[3,:]
+
+    e01 = ((v0[0]-v1[0])**2 + (v0[1]-v1[1])**2 + (v0[2]-v1[2])**2)**0.5
+    e12 = ((v1[0]-v2[0])**2 + (v1[1]-v2[1])**2 + (v1[2]-v2[2])**2)**0.5
+    e20 = ((v2[0]-v0[0])**2 + (v2[1]-v0[1])**2 + (v2[2]-v0[2])**2)**0.5
+    e03 = ((v0[0]-v3[0])**2 + (v0[1]-v3[1])**2 + (v0[2]-v3[2])**2)**0.5
+    e13 = ((v1[0]-v3[0])**2 + (v1[1]-v3[1])**2 + (v1[2]-v3[2])**2)**0.5
+    e23 = ((v2[0]-v3[0])**2 + (v2[1]-v3[1])**2 + (v2[2]-v3[2])**2)**0.5
+
+    vol = 1.0/6.0*numpy.linalg.det(numpy.array([[1.0, v0[0], v0[1], v0[2]],
+                                                [1.0, v1[0], v1[1], v1[2]],
+                                                [1.0, v2[0], v2[1], v2[2]],
+                                                [1.0, v3[0], v3[1], v3[2]]],
+                                               dtype=numpy.float64))
+    cross012 = numpy.cross(v1-v0, v2-v0)
+    area012 = 0.5*(numpy.dot(cross012, cross012))**0.5
+
+    cross013 = numpy.cross(v1-v0, v3-v0)
+    area013 = 0.5*(numpy.dot(cross013, cross013))**0.5
+
+    cross123 = numpy.cross(v2-v1, v3-v1)
+    area123 = 0.5*(numpy.dot(cross123, cross123))**0.5
+
+    cross203 = numpy.cross(v0-v2, v3-v2)
+    area203 = 0.5*(numpy.dot(cross203, cross203))**0.5
+
+    area = area012 + area013 + area123 + area203;
+    r = 3.0 * vol / area
+    self.minCellWidth = min(e01, e12, e20, e03, e13, e23, 6.38*r)
     return
   
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/friction/TestRateStateAgeing.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/friction/TestRateStateAgeing.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/friction/TestRateStateAgeing.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -38,18 +38,18 @@
 } // setUp
 
 // ----------------------------------------------------------------------
-// Test floor for minimum slip rate.
+// Test cutoff for linear slip rate.
 void
-pylith::friction::TestRateStateAgeing::testMinSlipRate(void)
-{ // testMinSlipRate
+pylith::friction::TestRateStateAgeing::testLinearSlipRate(void)
+{ // testLinearSlipRate
   RateStateAgeing model;
 
-  CPPUNIT_ASSERT_EQUAL(PylithScalar(1.0e-12), model._minSlipRate); // default
+  CPPUNIT_ASSERT_EQUAL(PylithScalar(1.0e-12), model._linearSlipRate); // default
 
   const PylithScalar value = 1.0e-20;
-  model.minSlipRate(value);
-  CPPUNIT_ASSERT_EQUAL(value, model._minSlipRate);
-} // testMinSlipRate
+  model.linearSlipRate(value);
+  CPPUNIT_ASSERT_EQUAL(value, model._linearSlipRate);
+} // testLinearSlipRate
   
 // ----------------------------------------------------------------------
 // Test properties metadata.

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/friction/TestRateStateAgeing.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/friction/TestRateStateAgeing.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/friction/TestRateStateAgeing.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -43,7 +43,7 @@
   // CPPUNIT TEST SUITE /////////////////////////////////////////////////
   CPPUNIT_TEST_SUITE( TestRateStateAgeing );
 
-  CPPUNIT_TEST( testMinSlipRate );
+  CPPUNIT_TEST( testLinearSlipRate );
   CPPUNIT_TEST( testPropertiesMetadata );
   CPPUNIT_TEST( testStateVarsMetadata );
   CPPUNIT_TEST( testDBToProperties );
@@ -64,8 +64,8 @@
   /// Setup testing data.
   void setUp(void);
 
-  /// Test floor for minimum slip rate.
-  void testMinSlipRate(void);
+  /// Test cutoff for linear slip rate.
+  void testLinearSlipRate(void);
   
   /// Test properties metadata.
   void testPropertiesMetadata(void);

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/Makefile.am	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/Makefile.am	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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 \

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestDruckerPrager3D.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestDruckerPrager3D.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestDruckerPrager3D.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -55,6 +55,7 @@
   CPPUNIT_TEST( testDimStateVars );
   CPPUNIT_TEST( test_calcDensity );
   CPPUNIT_TEST( test_stableTimeStepImplicit );
+  CPPUNIT_TEST( test_stableTimeStepExplicit );
 
   // Need to test Drucker-Prager elastoplastic specific behavior.
   CPPUNIT_TEST( testTimeStep );

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestDruckerPragerPlaneStrain.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestDruckerPragerPlaneStrain.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestDruckerPragerPlaneStrain.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -55,6 +55,7 @@
   CPPUNIT_TEST( testDimStateVars );
   CPPUNIT_TEST( test_calcDensity );
   CPPUNIT_TEST( test_stableTimeStepImplicit );
+  CPPUNIT_TEST( test_stableTimeStepExplicit );
 
   // Need to test Drucker-Prager elastoplastic specific behavior.
   CPPUNIT_TEST( testTimeStep );

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestElasticIsotropic3D.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestElasticIsotropic3D.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestElasticIsotropic3D.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -57,6 +57,7 @@
   CPPUNIT_TEST( test_calcElasticConsts );
   CPPUNIT_TEST( test_updateStateVars );
   CPPUNIT_TEST( test_stableTimeStepImplicit );
+  CPPUNIT_TEST( test_stableTimeStepExplicit );
 
   CPPUNIT_TEST( testHasProperty );
   CPPUNIT_TEST( testHasStateVar );

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestElasticMaterial.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestElasticMaterial.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestElasticMaterial.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -393,6 +393,57 @@
 } // testStableTimeStepImplicit
 
 // ----------------------------------------------------------------------
+// Test calcStableTimeStepExplicit()
+void
+pylith::materials::TestElasticMaterial::testStableTimeStepExplicit(void)
+{ // testStableTimeStepExplicit
+  topology::Mesh mesh;
+  ElasticStrain1D material;
+  ElasticStrain1DData data;
+  _initialize(&mesh, &material, &data);
+
+  // Get cells associated with material
+  const int materialId = 24;
+  const ALE::Obj<SieveMesh>& sieveMesh = mesh.sieveMesh();
+  assert(!sieveMesh.isNull());
+  const ALE::Obj<SieveMesh::label_sequence>& cells = 
+    sieveMesh->getLabelStratum("material-id", materialId);
+  SieveMesh::point_type cell = *cells->begin();
+
+  // Setup quadrature
+  feassemble::Quadrature<topology::Mesh> quadrature;
+  feassemble::GeometryLine1D geometry;
+  quadrature.refGeometry(&geometry);
+  const int cellDim = 1;
+  const int numCorners = 3;
+  const int numQuadPts = 2;
+  const int spaceDim = 1;
+  const PylithScalar basis[] = { 0.455, -0.122, 0.667, -0.122, 0.455, 0.667 };
+  const PylithScalar basisDeriv[] = { 
+    -1.07735027e+00,
+    -7.73502692e-02,
+    1.15470054e+00,
+    7.73502692e-02,
+    1.07735027e+00,
+    -1.15470054e+00,
+  };
+  const PylithScalar quadPtsRef[] = { -0.577350269, 0.577350269 };
+  const PylithScalar quadWts[] = { 1.0, 1.0  };
+  quadrature.initialize(basis, numQuadPts, numCorners,
+			basisDeriv, numQuadPts, numCorners, cellDim,
+			quadPtsRef, numQuadPts, cellDim,
+			quadWts, numQuadPts,
+			spaceDim);
+
+  material.retrievePropsAndVars(cell);
+  const PylithScalar dt = material.stableTimeStepExplicit(mesh, &quadrature);
+
+  const PylithScalar tolerance = 1.0e-06;
+  const PylithScalar dtE = data.dtStableExplicit / 1000.0 * 2.0;
+  CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, dt/dtE, tolerance);
+} // testStableTimeStepExplicit
+
+// ----------------------------------------------------------------------
 // Setup testing data.
 void
 pylith::materials::TestElasticMaterial::setUp(void)
@@ -635,7 +686,7 @@
 // Test _stableTimeStepImplicit()
 void
 pylith::materials::TestElasticMaterial::test_stableTimeStepImplicit(void)
-{ // _testCalcDensity
+{ // test_stableTimeStepImplicit
   CPPUNIT_ASSERT(0 != _matElastic);
   CPPUNIT_ASSERT(0 != _dataElastic);
   const ElasticMaterialData* data = _dataElastic;
@@ -648,9 +699,32 @@
 
   const PylithScalar tolerance = 1.0e-06;
   CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, dt/dtE, tolerance);
-} // _testStableTimeStepImplicit
+} // test_stableTimeStepImplicit
 
 // ----------------------------------------------------------------------
+// Test _stableTimeStepExplicit()
+void
+pylith::materials::TestElasticMaterial::test_stableTimeStepExplicit(void)
+{ // test_stableTimeStepExplicit
+  CPPUNIT_ASSERT(0 != _matElastic);
+  CPPUNIT_ASSERT(0 != _dataElastic);
+  const ElasticMaterialData* data = _dataElastic;
+
+  const PylithScalar minCellWidth = 1000.0;
+
+  const PylithScalar dt =
+    _matElastic->_stableTimeStepExplicit(data->properties, data->numPropsQuadPt,
+					 data->stateVars, data->numVarsQuadPt,
+					 minCellWidth);
+
+  const PylithScalar dtE = data->dtStableExplicit;
+
+  const PylithScalar tolerance = 1.0e-06;
+  CPPUNIT_ASSERT_DOUBLES_EQUAL(dtE, dt, tolerance); // TEMPORARY
+  CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, dt/dtE, tolerance);
+} // test_stableTimeStepExplicit
+
+// ----------------------------------------------------------------------
 // Setup nondimensionalization.
 void
 pylith::materials::TestElasticMaterial::setupNormalizer(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestElasticMaterial.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestElasticMaterial.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestElasticMaterial.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -56,6 +56,7 @@
   CPPUNIT_TEST( testCalcDerivElastic );
   CPPUNIT_TEST( testUpdateStateVars );
   CPPUNIT_TEST( testStableTimeStepImplicit );
+  CPPUNIT_TEST( testStableTimeStepExplicit );
 
   CPPUNIT_TEST_SUITE_END();
 
@@ -89,6 +90,9 @@
   /// Test stableTimeStepImplicit().
   void testStableTimeStepImplicit(void);
 
+  /// Test stableTimeStepExplicit().
+  void testStableTimeStepExplicit(void);
+
   // PUBLIC METHODS /////////////////////////////////////////////////////
 public :
 
@@ -117,6 +121,9 @@
   /// Test _stableTimeStepImplicit().
   void test_stableTimeStepImplicit(void);
 
+  /// Test _stableTimeStepExplicit().
+  void test_stableTimeStepExplicit(void);
+
   // PROTECTED METHODS //////////////////////////////////////////////////
 protected :
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestElasticPlaneStrain.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestElasticPlaneStrain.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestElasticPlaneStrain.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -57,6 +57,7 @@
   CPPUNIT_TEST( test_calcElasticConsts );
   CPPUNIT_TEST( test_updateStateVars );
   CPPUNIT_TEST( test_stableTimeStepImplicit );
+  CPPUNIT_TEST( test_stableTimeStepExplicit );
 
   CPPUNIT_TEST_SUITE_END();
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestElasticPlaneStress.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestElasticPlaneStress.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestElasticPlaneStress.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -57,6 +57,7 @@
   CPPUNIT_TEST( test_calcElasticConsts );
   CPPUNIT_TEST( test_updateStateVars );
   CPPUNIT_TEST( test_stableTimeStepImplicit );
+  CPPUNIT_TEST( test_stableTimeStepExplicit );
 
   CPPUNIT_TEST_SUITE_END();
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestElasticStrain1D.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestElasticStrain1D.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestElasticStrain1D.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -57,6 +57,7 @@
   CPPUNIT_TEST( test_calcElasticConsts );
   CPPUNIT_TEST( test_updateStateVars );
   CPPUNIT_TEST( test_stableTimeStepImplicit );
+  CPPUNIT_TEST( test_stableTimeStepExplicit );
 
   CPPUNIT_TEST_SUITE_END();
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestElasticStress1D.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestElasticStress1D.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestElasticStress1D.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -57,6 +57,7 @@
   CPPUNIT_TEST( test_calcElasticConsts );
   CPPUNIT_TEST( test_updateStateVars );
   CPPUNIT_TEST( test_stableTimeStepImplicit );
+  CPPUNIT_TEST( test_stableTimeStepExplicit );
 
   CPPUNIT_TEST_SUITE_END();
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestGenMaxwellIsotropic3D.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestGenMaxwellIsotropic3D.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestGenMaxwellIsotropic3D.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -55,6 +55,7 @@
   CPPUNIT_TEST( testDimStateVars );
   CPPUNIT_TEST( test_calcDensity );
   CPPUNIT_TEST( test_stableTimeStepImplicit );
+  CPPUNIT_TEST( test_stableTimeStepExplicit );
 
   // Need to test Maxwell viscoelastic specific behavior.
   CPPUNIT_TEST( testTimeStep );

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestGenMaxwellPlaneStrain.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestGenMaxwellPlaneStrain.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestGenMaxwellPlaneStrain.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -55,6 +55,7 @@
   CPPUNIT_TEST( testDimStateVars );
   CPPUNIT_TEST( test_calcDensity );
   CPPUNIT_TEST( test_stableTimeStepImplicit );
+  CPPUNIT_TEST( test_stableTimeStepExplicit );
 
   // Need to test Maxwell viscoelastic specific behavior.
   CPPUNIT_TEST( testTimeStep );

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestGenMaxwellQpQsIsotropic3D.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestGenMaxwellQpQsIsotropic3D.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestGenMaxwellQpQsIsotropic3D.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -55,6 +55,7 @@
   CPPUNIT_TEST( testDimStateVars );
   CPPUNIT_TEST( test_calcDensity );
   CPPUNIT_TEST( test_stableTimeStepImplicit );
+  CPPUNIT_TEST( test_stableTimeStepExplicit );
 
   // Need to test Maxwell viscoelastic specific behavior.
   CPPUNIT_TEST( testTimeStep );

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestMaxwellIsotropic3D.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestMaxwellIsotropic3D.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestMaxwellIsotropic3D.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -55,6 +55,7 @@
   CPPUNIT_TEST( testDimStateVars );
   CPPUNIT_TEST( test_calcDensity );
   CPPUNIT_TEST( test_stableTimeStepImplicit );
+  CPPUNIT_TEST( test_stableTimeStepExplicit );
 
   // Need to test Maxwell viscoelastic specific behavior.
   CPPUNIT_TEST( testTimeStep );

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestMaxwellPlaneStrain.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestMaxwellPlaneStrain.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestMaxwellPlaneStrain.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -55,6 +55,7 @@
   CPPUNIT_TEST( testDimStateVars );
   CPPUNIT_TEST( test_calcDensity );
   CPPUNIT_TEST( test_stableTimeStepImplicit );
+  CPPUNIT_TEST( test_stableTimeStepExplicit );
 
   // Need to test Maxwell viscoelastic specific behavior.
   CPPUNIT_TEST( testTimeStep );

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestPowerLaw3D.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestPowerLaw3D.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestPowerLaw3D.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -55,6 +55,7 @@
   CPPUNIT_TEST( testDimStateVars );
   CPPUNIT_TEST( test_calcDensity );
   CPPUNIT_TEST( test_stableTimeStepImplicit );
+  CPPUNIT_TEST( test_stableTimeStepExplicit );
 
   // Need to test Power Law viscoelastic specific behavior.
   CPPUNIT_TEST( testTimeStep );

Copied: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestPowerLawPlaneStrain.cc (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/materials/TestPowerLawPlaneStrain.cc)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestPowerLawPlaneStrain.cc	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestPowerLawPlaneStrain.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/unittests/libtests/materials/TestPowerLawPlaneStrain.hh (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/materials/TestPowerLawPlaneStrain.hh)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestPowerLawPlaneStrain.hh	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/TestPowerLawPlaneStrain.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -0,0 +1,124 @@
+// -*- 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 );
+  CPPUNIT_TEST( test_stableTimeStepExplicit );
+
+  // 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 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DElastic.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DElastic.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DElastic.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -167,7 +167,8 @@
         self._calcStress(strainB, muB, lambdaB, \
                            initialStressB, initialStrainB)
 
-    self.dtStableImplicit = 1.0e10
+    self.dtStableImplicit = 1.0e+10
+    self.dtStableExplicit = 1000.0 / vpA
 
     plasticStrainUpdated = numpy.zeros((numLocs, tensorSize),
                                        dtype=numpy.float64)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DElasticData.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DElasticData.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DElasticData.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -47,6 +47,8 @@
 
 const PylithScalar pylith::materials::DruckerPrager3DElasticData::_dtStableImplicit =   1.00000000e+10;
 
+const PylithScalar pylith::materials::DruckerPrager3DElasticData::_dtStableExplicit =   1.92450090e-01;
+
 const int pylith::materials::DruckerPrager3DElasticData::_numPropertyValues[] = {
 1,
 1,
@@ -338,6 +340,7 @@
   pressureScale = _pressureScale;
   densityScale = _densityScale;
   dtStableImplicit = _dtStableImplicit;
+  dtStableExplicit = _dtStableExplicit;
   numPropertyValues = const_cast<int*>(_numPropertyValues);
   numStateVarValues = const_cast<int*>(_numStateVarValues);
   dbPropertyValues = const_cast<char**>(_dbPropertyValues);

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DElasticData.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DElasticData.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DElasticData.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -69,6 +69,8 @@
 
   static const PylithScalar _dtStableImplicit;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const int _numPropertyValues[];
 
   static const int _numStateVarValues[];

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DTimeDep.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DTimeDep.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DTimeDep.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -46,8 +46,6 @@
     """
     ElasticMaterialApp.__init__(self, name)
 
-    # import pdb
-    # pdb.set_trace()
     numLocs = 2
 
     self.dimension = dimension
@@ -190,6 +188,7 @@
                                                initialStressB, initialStrainB)
 
     self.dtStableImplicit = 1.0e+99
+    self.dtStableExplicit = 1000.0 / vpA
 
     return
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DTimeDepData.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DTimeDepData.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DTimeDepData.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -47,6 +47,8 @@
 
 const PylithScalar pylith::materials::DruckerPrager3DTimeDepData::_dtStableImplicit =   1.00000000e+99;
 
+const PylithScalar pylith::materials::DruckerPrager3DTimeDepData::_dtStableExplicit =   1.92450090e-01;
+
 const int pylith::materials::DruckerPrager3DTimeDepData::_numPropertyValues[] = {
 1,
 1,
@@ -338,6 +340,7 @@
   pressureScale = _pressureScale;
   densityScale = _densityScale;
   dtStableImplicit = _dtStableImplicit;
+  dtStableExplicit = _dtStableExplicit;
   numPropertyValues = const_cast<int*>(_numPropertyValues);
   numStateVarValues = const_cast<int*>(_numStateVarValues);
   dbPropertyValues = const_cast<char**>(_dbPropertyValues);

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DTimeDepData.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DTimeDepData.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPrager3DTimeDepData.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -69,6 +69,8 @@
 
   static const PylithScalar _dtStableImplicit;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const int _numPropertyValues[];
 
   static const int _numStateVarValues[];

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainElastic.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainElastic.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainElastic.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -78,7 +78,7 @@
     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.075e4], dtype=numpy.float64)
+    stressZZInitialA = 1.075e+4
 
     denomFrictionA = math.sqrt(3.0) * (3.0 - math.sin(frictionAngleA))
     denomDilatationA = math.sqrt(3.0) * (3.0 - math.sin(dilatationAngleA))
@@ -103,7 +103,7 @@
     alphaYieldB = 2.0 * math.sin(frictionAngleB)/denomFrictionB
     betaB = 6.0 * cohesionB * math.cos(frictionAngleB)/denomFrictionB
     alphaFlowB = 2.0 * math.sin(dilatationAngleB)/denomDilatationB
-    stressZZInitialB = numpy.array([2.575e4], dtype=numpy.float64)
+    stressZZInitialB = 2.575e+4
 
     self.lengthScale = 1.0e+3
     self.pressureScale = muA
@@ -179,6 +179,7 @@
                            initialStressB, initialStrainB)
 
     self.dtStableImplicit = 1.0e10
+    self.dtStableExplicit = 1000.0 / vpA
 
     stateVarsUpdatedA = numpy.array([stressZZInitialA, 0.0, 0.0, 0.0, 0.0],
                                     dtype=numpy.float64)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainElasticData.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainElasticData.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainElasticData.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -47,6 +47,8 @@
 
 const PylithScalar pylith::materials::DruckerPragerPlaneStrainElasticData::_dtStableImplicit =   1.00000000e+10;
 
+const PylithScalar pylith::materials::DruckerPragerPlaneStrainElasticData::_dtStableExplicit =   1.92450090e-01;
+
 const int pylith::materials::DruckerPragerPlaneStrainElasticData::_numPropertyValues[] = {
 1,
 1,
@@ -252,6 +254,7 @@
   pressureScale = _pressureScale;
   densityScale = _densityScale;
   dtStableImplicit = _dtStableImplicit;
+  dtStableExplicit = _dtStableExplicit;
   numPropertyValues = const_cast<int*>(_numPropertyValues);
   numStateVarValues = const_cast<int*>(_numStateVarValues);
   dbPropertyValues = const_cast<char**>(_dbPropertyValues);

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainElasticData.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainElasticData.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainElasticData.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -69,6 +69,8 @@
 
   static const PylithScalar _dtStableImplicit;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const int _numPropertyValues[];
 
   static const int _numStateVarValues[];

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainTimeDep.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainTimeDep.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainTimeDep.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -195,6 +195,7 @@
                                                stateVarsB)
 
     self.dtStableImplicit = 1.0e+99
+    self.dtStableExplicit = 1000.0 / vpA
 
     return
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainTimeDepData.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainTimeDepData.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainTimeDepData.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -47,6 +47,8 @@
 
 const PylithScalar pylith::materials::DruckerPragerPlaneStrainTimeDepData::_dtStableImplicit =   1.00000000e+99;
 
+const PylithScalar pylith::materials::DruckerPragerPlaneStrainTimeDepData::_dtStableExplicit =   1.92450090e-01;
+
 const int pylith::materials::DruckerPragerPlaneStrainTimeDepData::_numPropertyValues[] = {
 1,
 1,
@@ -252,6 +254,7 @@
   pressureScale = _pressureScale;
   densityScale = _densityScale;
   dtStableImplicit = _dtStableImplicit;
+  dtStableExplicit = _dtStableExplicit;
   numPropertyValues = const_cast<int*>(_numPropertyValues);
   numStateVarValues = const_cast<int*>(_numStateVarValues);
   dbPropertyValues = const_cast<char**>(_dbPropertyValues);

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainTimeDepData.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainTimeDepData.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/DruckerPragerPlaneStrainTimeDepData.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -69,6 +69,8 @@
 
   static const PylithScalar _dtStableImplicit;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const int _numPropertyValues[];
 
   static const int _numStateVarValues[];

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticIsotropic3D.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticIsotropic3D.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticIsotropic3D.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -119,6 +119,9 @@
 
     self.stress = stress
     self.elasticConsts = elasticConsts
+
+    self.dtStableExplicit = 1000.0 / vpA
+
     return
 
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticIsotropic3DData.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticIsotropic3DData.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticIsotropic3DData.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -47,6 +47,8 @@
 
 const PylithScalar pylith::materials::ElasticIsotropic3DData::_dtStableImplicit =   1.00000000e+99;
 
+const PylithScalar pylith::materials::ElasticIsotropic3DData::_dtStableExplicit =   1.92450090e-01;
+
 const int pylith::materials::ElasticIsotropic3DData::_numPropertyValues[] = {
 1,
 1,
@@ -253,6 +255,7 @@
   pressureScale = _pressureScale;
   densityScale = _densityScale;
   dtStableImplicit = _dtStableImplicit;
+  dtStableExplicit = _dtStableExplicit;
   numPropertyValues = const_cast<int*>(_numPropertyValues);
   numStateVarValues = const_cast<int*>(_numStateVarValues);
   dbPropertyValues = const_cast<char**>(_dbPropertyValues);

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticIsotropic3DData.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticIsotropic3DData.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticIsotropic3DData.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -69,6 +69,8 @@
 
   static const PylithScalar _dtStableImplicit;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const int _numPropertyValues[];
 
   static const int* _numStateVarValues;

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticMaterialApp.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticMaterialApp.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticMaterialApp.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -89,6 +89,7 @@
 
     # Elastic material information
     self.dtStableImplicit = 1.0e+99
+    self.dtStableExplicit = 1.0e+99
     self.density = None
     self.strain = None
     self.stress = None
@@ -200,6 +201,9 @@
     self.data.addScalar(vtype="PylithScalar", name="_dtStableImplicit",
                         value=self.dtStableImplicit,
                         format="%16.8e")
+    self.data.addScalar(vtype="PylithScalar", name="_dtStableExplicit",
+                        value=self.dtStableExplicit,
+                        format="%16.8e")
     self.data.addArray(vtype="PylithScalar", name="_density",
                        values=self.density,
                        format="%16.8e", ncols=1)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticMaterialData.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticMaterialData.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticMaterialData.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -20,6 +20,7 @@
 
 pylith::materials::ElasticMaterialData::ElasticMaterialData(void) :
   dtStableImplicit(0.0),
+  dtStableExplicit(0.0),
   density(0),
   strain(0),
   stress(0),

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticMaterialData.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticMaterialData.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticMaterialData.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -43,6 +43,7 @@
 public:
 
   PylithScalar dtStableImplicit; ///< Stable time step for implicit time stepping.
+  PylithScalar dtStableExplicit; ///< Stable time step for explicit time stepping.
   PylithScalar* density; ///< Density at location.
   PylithScalar* strain; ///< Strain at location.
   PylithScalar* stress; ///< Stress at location.

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticPlaneStrain.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticPlaneStrain.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticPlaneStrain.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -118,6 +118,9 @@
 
     self.stress = stress
     self.elasticConsts = elasticConsts
+
+    self.dtStableExplicit = 1000.0 / vpA
+
     return
 
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticPlaneStrainData.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticPlaneStrainData.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticPlaneStrainData.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -47,6 +47,8 @@
 
 const PylithScalar pylith::materials::ElasticPlaneStrainData::_dtStableImplicit =   1.00000000e+99;
 
+const PylithScalar pylith::materials::ElasticPlaneStrainData::_dtStableExplicit =   1.92450090e-01;
+
 const int pylith::materials::ElasticPlaneStrainData::_numPropertyValues[] = {
 1,
 1,
@@ -175,6 +177,7 @@
   pressureScale = _pressureScale;
   densityScale = _densityScale;
   dtStableImplicit = _dtStableImplicit;
+  dtStableExplicit = _dtStableExplicit;
   numPropertyValues = const_cast<int*>(_numPropertyValues);
   numStateVarValues = const_cast<int*>(_numStateVarValues);
   dbPropertyValues = const_cast<char**>(_dbPropertyValues);

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticPlaneStrainData.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticPlaneStrainData.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticPlaneStrainData.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -69,6 +69,8 @@
 
   static const PylithScalar _dtStableImplicit;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const int _numPropertyValues[];
 
   static const int* _numStateVarValues;

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticPlaneStress.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticPlaneStress.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticPlaneStress.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -118,6 +118,9 @@
 
     self.stress = stress
     self.elasticConsts = elasticConsts
+
+    self.dtStableExplicit = 1000.0 / vpA
+
     return
 
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticPlaneStressData.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticPlaneStressData.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticPlaneStressData.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -47,6 +47,8 @@
 
 const PylithScalar pylith::materials::ElasticPlaneStressData::_dtStableImplicit =   1.00000000e+99;
 
+const PylithScalar pylith::materials::ElasticPlaneStressData::_dtStableExplicit =   1.92450090e-01;
+
 const int pylith::materials::ElasticPlaneStressData::_numPropertyValues[] = {
 1,
 1,
@@ -175,6 +177,7 @@
   pressureScale = _pressureScale;
   densityScale = _densityScale;
   dtStableImplicit = _dtStableImplicit;
+  dtStableExplicit = _dtStableExplicit;
   numPropertyValues = const_cast<int*>(_numPropertyValues);
   numStateVarValues = const_cast<int*>(_numStateVarValues);
   dbPropertyValues = const_cast<char**>(_dbPropertyValues);

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticPlaneStressData.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticPlaneStressData.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticPlaneStressData.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -69,6 +69,8 @@
 
   static const PylithScalar _dtStableImplicit;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const int _numPropertyValues[];
 
   static const int* _numStateVarValues;

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticStrain1D.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticStrain1D.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticStrain1D.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -118,6 +118,9 @@
 
     self.stress = stress
     self.elasticConsts = elasticConsts
+
+    self.dtStableExplicit = 1000.0 / vpA
+
     return
 
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticStrain1DData.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticStrain1DData.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticStrain1DData.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -47,6 +47,8 @@
 
 const PylithScalar pylith::materials::ElasticStrain1DData::_dtStableImplicit =   1.00000000e+99;
 
+const PylithScalar pylith::materials::ElasticStrain1DData::_dtStableExplicit =   1.92450090e-01;
+
 const int pylith::materials::ElasticStrain1DData::_numPropertyValues[] = {
 1,
 1,
@@ -143,6 +145,7 @@
   pressureScale = _pressureScale;
   densityScale = _densityScale;
   dtStableImplicit = _dtStableImplicit;
+  dtStableExplicit = _dtStableExplicit;
   numPropertyValues = const_cast<int*>(_numPropertyValues);
   numStateVarValues = const_cast<int*>(_numStateVarValues);
   dbPropertyValues = const_cast<char**>(_dbPropertyValues);

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticStrain1DData.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticStrain1DData.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticStrain1DData.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -69,6 +69,8 @@
 
   static const PylithScalar _dtStableImplicit;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const int _numPropertyValues[];
 
   static const int* _numStateVarValues;

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticStress1D.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticStress1D.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticStress1D.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -118,6 +118,9 @@
 
     self.stress = stress
     self.elasticConsts = elasticConsts
+
+    self.dtStableExplicit = 1000.0 / vpA
+
     return
 
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticStress1DData.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticStress1DData.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticStress1DData.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -47,6 +47,8 @@
 
 const PylithScalar pylith::materials::ElasticStress1DData::_dtStableImplicit =   1.00000000e+99;
 
+const PylithScalar pylith::materials::ElasticStress1DData::_dtStableExplicit =   1.92450090e-01;
+
 const int pylith::materials::ElasticStress1DData::_numPropertyValues[] = {
 1,
 1,
@@ -143,6 +145,7 @@
   pressureScale = _pressureScale;
   densityScale = _densityScale;
   dtStableImplicit = _dtStableImplicit;
+  dtStableExplicit = _dtStableExplicit;
   numPropertyValues = const_cast<int*>(_numPropertyValues);
   numStateVarValues = const_cast<int*>(_numStateVarValues);
   dbPropertyValues = const_cast<char**>(_dbPropertyValues);

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticStress1DData.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticStress1DData.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/ElasticStress1DData.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -69,6 +69,8 @@
 
   static const PylithScalar _dtStableImplicit;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const int _numPropertyValues[];
 
   static const int* _numStateVarValues;

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellIsotropic3DElastic.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellIsotropic3DElastic.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellIsotropic3DElastic.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -186,6 +186,7 @@
                                                initialStressB, initialStrainB,
                                                self.stateVars[1,:])
     self.dtStableImplicit = 0.2*min(min(maxwellTimeA), min(maxwellTimeB))
+    self.dtStableExplicit = 1000.0 / vpA
 
     return
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellIsotropic3DElasticData.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellIsotropic3DElasticData.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellIsotropic3DElasticData.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -47,6 +47,8 @@
 
 const PylithScalar pylith::materials::GenMaxwellIsotropic3DElasticData::_dtStableImplicit =   8.88888889e+06;
 
+const PylithScalar pylith::materials::GenMaxwellIsotropic3DElasticData::_dtStableExplicit =   1.92450090e-01;
+
 const int pylith::materials::GenMaxwellIsotropic3DElasticData::_numPropertyValues[] = {
 1,
 1,
@@ -527,6 +529,7 @@
   pressureScale = _pressureScale;
   densityScale = _densityScale;
   dtStableImplicit = _dtStableImplicit;
+  dtStableExplicit = _dtStableExplicit;
   numPropertyValues = const_cast<int*>(_numPropertyValues);
   numStateVarValues = const_cast<int*>(_numStateVarValues);
   dbPropertyValues = const_cast<char**>(_dbPropertyValues);

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellIsotropic3DElasticData.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellIsotropic3DElasticData.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellIsotropic3DElasticData.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -69,6 +69,8 @@
 
   static const PylithScalar _dtStableImplicit;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const int _numPropertyValues[];
 
   static const int _numStateVarValues[];

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellIsotropic3DTimeDep.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellIsotropic3DTimeDep.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellIsotropic3DTimeDep.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -213,6 +213,7 @@
                                                initialStressB, initialStrainB,
                                                stateVarsB)
     self.dtStableImplicit = 0.2*min(min(maxwellTimeA), min(maxwellTimeB))
+    self.dtStableExplicit = 1000.0 / vpA
 
     return
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellIsotropic3DTimeDepData.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellIsotropic3DTimeDepData.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellIsotropic3DTimeDepData.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -47,6 +47,8 @@
 
 const PylithScalar pylith::materials::GenMaxwellIsotropic3DTimeDepData::_dtStableImplicit =   8.88888889e+06;
 
+const PylithScalar pylith::materials::GenMaxwellIsotropic3DTimeDepData::_dtStableExplicit =   1.92450090e-01;
+
 const int pylith::materials::GenMaxwellIsotropic3DTimeDepData::_numPropertyValues[] = {
 1,
 1,
@@ -527,6 +529,7 @@
   pressureScale = _pressureScale;
   densityScale = _densityScale;
   dtStableImplicit = _dtStableImplicit;
+  dtStableExplicit = _dtStableExplicit;
   numPropertyValues = const_cast<int*>(_numPropertyValues);
   numStateVarValues = const_cast<int*>(_numStateVarValues);
   dbPropertyValues = const_cast<char**>(_dbPropertyValues);

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellIsotropic3DTimeDepData.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellIsotropic3DTimeDepData.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellIsotropic3DTimeDepData.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -69,6 +69,8 @@
 
   static const PylithScalar _dtStableImplicit;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const int _numPropertyValues[];
 
   static const int _numStateVarValues[];

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellPlaneStrainElastic.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellPlaneStrainElastic.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellPlaneStrainElastic.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -194,6 +194,7 @@
                                                initialStressB, initialStrainB,
                                                self.stateVars[1,:])
     self.dtStableImplicit = 0.2*min(min(maxwellTimeA), min(maxwellTimeB))
+    self.dtStableExplicit = 1000.0 / vpA
 
     return
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellPlaneStrainElasticData.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellPlaneStrainElasticData.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellPlaneStrainElasticData.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -47,6 +47,8 @@
 
 const PylithScalar pylith::materials::GenMaxwellPlaneStrainElasticData::_dtStableImplicit =   8.88888889e+06;
 
+const PylithScalar pylith::materials::GenMaxwellPlaneStrainElasticData::_dtStableExplicit =   1.92450090e-01;
+
 const int pylith::materials::GenMaxwellPlaneStrainElasticData::_numPropertyValues[] = {
 1,
 1,
@@ -378,6 +380,7 @@
   pressureScale = _pressureScale;
   densityScale = _densityScale;
   dtStableImplicit = _dtStableImplicit;
+  dtStableExplicit = _dtStableExplicit;
   numPropertyValues = const_cast<int*>(_numPropertyValues);
   numStateVarValues = const_cast<int*>(_numStateVarValues);
   dbPropertyValues = const_cast<char**>(_dbPropertyValues);

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellPlaneStrainElasticData.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellPlaneStrainElasticData.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellPlaneStrainElasticData.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -69,6 +69,8 @@
 
   static const PylithScalar _dtStableImplicit;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const int _numPropertyValues[];
 
   static const int _numStateVarValues[];

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellPlaneStrainTimeDep.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellPlaneStrainTimeDep.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellPlaneStrainTimeDep.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -229,6 +229,7 @@
                                                initialStressB, initialStrainB,
                                                stateVarsB)
     self.dtStableImplicit = 0.2*min(min(maxwellTimeA), min(maxwellTimeB))
+    self.dtStableExplicit = 1000.0 / vpA
 
     return
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellPlaneStrainTimeDepData.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellPlaneStrainTimeDepData.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellPlaneStrainTimeDepData.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -47,6 +47,8 @@
 
 const PylithScalar pylith::materials::GenMaxwellPlaneStrainTimeDepData::_dtStableImplicit =   8.88888889e+06;
 
+const PylithScalar pylith::materials::GenMaxwellPlaneStrainTimeDepData::_dtStableExplicit =   1.92450090e-01;
+
 const int pylith::materials::GenMaxwellPlaneStrainTimeDepData::_numPropertyValues[] = {
 1,
 1,
@@ -378,6 +380,7 @@
   pressureScale = _pressureScale;
   densityScale = _densityScale;
   dtStableImplicit = _dtStableImplicit;
+  dtStableExplicit = _dtStableExplicit;
   numPropertyValues = const_cast<int*>(_numPropertyValues);
   numStateVarValues = const_cast<int*>(_numStateVarValues);
   dbPropertyValues = const_cast<char**>(_dbPropertyValues);

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellPlaneStrainTimeDepData.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellPlaneStrainTimeDepData.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellPlaneStrainTimeDepData.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -69,6 +69,8 @@
 
   static const PylithScalar _dtStableImplicit;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const int _numPropertyValues[];
 
   static const int _numStateVarValues[];

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellQpQsIsotropic3DElastic.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellQpQsIsotropic3DElastic.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellQpQsIsotropic3DElastic.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -212,6 +212,7 @@
         self._calcStress(strainB, muB, lambdaB, \
                            initialStressB, initialStrainB)
     self.dtStableImplicit = 0.2*min(min(maxwellTimeA), min(maxwellTimeB))
+    self.dtStableExplicit = 1000.0 / vpA
 
     return
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellQpQsIsotropic3DElasticData.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellQpQsIsotropic3DElasticData.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellQpQsIsotropic3DElasticData.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -47,6 +47,8 @@
 
 const PylithScalar pylith::materials::GenMaxwellQpQsIsotropic3DElasticData::_dtStableImplicit =   8.88888889e+05;
 
+const PylithScalar pylith::materials::GenMaxwellQpQsIsotropic3DElasticData::_dtStableExplicit =   1.92450090e-01;
+
 const int pylith::materials::GenMaxwellQpQsIsotropic3DElasticData::_numPropertyValues[] = {
 1,
 1,
@@ -570,6 +572,7 @@
   pressureScale = _pressureScale;
   densityScale = _densityScale;
   dtStableImplicit = _dtStableImplicit;
+  dtStableExplicit = _dtStableExplicit;
   numPropertyValues = const_cast<int*>(_numPropertyValues);
   numStateVarValues = const_cast<int*>(_numStateVarValues);
   dbPropertyValues = const_cast<char**>(_dbPropertyValues);

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellQpQsIsotropic3DElasticData.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellQpQsIsotropic3DElasticData.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellQpQsIsotropic3DElasticData.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -69,6 +69,8 @@
 
   static const PylithScalar _dtStableImplicit;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const int _numPropertyValues[];
 
   static const int _numStateVarValues[];

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellQpQsIsotropic3DTimeDep.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellQpQsIsotropic3DTimeDep.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellQpQsIsotropic3DTimeDep.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -247,6 +247,7 @@
                          strainTB, visStrainB, visStrainBulkB,
                          initialStressB, initialStrainB)
     self.dtStableImplicit = 0.2*min(min(maxwellTimeA), min(maxwellTimeB),min(maxwellTimeBulkA), min(maxwellTimeBulkB))
+    self.dtStableExplicit = 1000.0 / vpA
 
     return
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellQpQsIsotropic3DTimeDepData.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellQpQsIsotropic3DTimeDepData.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellQpQsIsotropic3DTimeDepData.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -47,6 +47,8 @@
 
 const PylithScalar pylith::materials::GenMaxwellQpQsIsotropic3DTimeDepData::_dtStableImplicit =   8.88888889e+05;
 
+const PylithScalar pylith::materials::GenMaxwellQpQsIsotropic3DTimeDepData::_dtStableExplicit =   1.92450090e-01;
+
 const int pylith::materials::GenMaxwellQpQsIsotropic3DTimeDepData::_numPropertyValues[] = {
 1,
 1,
@@ -570,6 +572,7 @@
   pressureScale = _pressureScale;
   densityScale = _densityScale;
   dtStableImplicit = _dtStableImplicit;
+  dtStableExplicit = _dtStableExplicit;
   numPropertyValues = const_cast<int*>(_numPropertyValues);
   numStateVarValues = const_cast<int*>(_numStateVarValues);
   dbPropertyValues = const_cast<char**>(_dbPropertyValues);

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellQpQsIsotropic3DTimeDepData.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellQpQsIsotropic3DTimeDepData.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/GenMaxwellQpQsIsotropic3DTimeDepData.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -69,6 +69,8 @@
 
   static const PylithScalar _dtStableImplicit;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const int _numPropertyValues[];
 
   static const int _numStateVarValues[];

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellIsotropic3DElastic.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellIsotropic3DElastic.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellIsotropic3DElastic.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -146,6 +146,8 @@
         self._calcStress(strainB, muB, lambdaB, \
                            initialStressB, initialStrainB)
     self.dtStableImplicit = 0.2*min(maxwellTimeA, maxwellTimeB)
+    self.dtStableExplicit = 1000.0 / vpA
+
     return
 
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellIsotropic3DElasticData.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellIsotropic3DElasticData.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellIsotropic3DElasticData.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -47,6 +47,8 @@
 
 const PylithScalar pylith::materials::MaxwellIsotropic3DElasticData::_dtStableImplicit =   8.88888889e+06;
 
+const PylithScalar pylith::materials::MaxwellIsotropic3DElasticData::_dtStableExplicit =   1.92450090e-01;
+
 const int pylith::materials::MaxwellIsotropic3DElasticData::_numPropertyValues[] = {
 1,
 1,
@@ -377,6 +379,7 @@
   pressureScale = _pressureScale;
   densityScale = _densityScale;
   dtStableImplicit = _dtStableImplicit;
+  dtStableExplicit = _dtStableExplicit;
   numPropertyValues = const_cast<int*>(_numPropertyValues);
   numStateVarValues = const_cast<int*>(_numStateVarValues);
   dbPropertyValues = const_cast<char**>(_dbPropertyValues);

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellIsotropic3DElasticData.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellIsotropic3DElasticData.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellIsotropic3DElasticData.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -69,6 +69,8 @@
 
   static const PylithScalar _dtStableImplicit;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const int _numPropertyValues[];
 
   static const int _numStateVarValues[];

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellIsotropic3DTimeDep.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellIsotropic3DTimeDep.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellIsotropic3DTimeDep.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -185,6 +185,8 @@
                                                initialStressB, initialStrainB)
 
     self.dtStableImplicit = 0.2*min(maxwellTimeA, maxwellTimeB)
+    self.dtStableExplicit = 1000.0 / vpA
+
     return
 
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellIsotropic3DTimeDepData.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellIsotropic3DTimeDepData.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellIsotropic3DTimeDepData.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -47,6 +47,8 @@
 
 const PylithScalar pylith::materials::MaxwellIsotropic3DTimeDepData::_dtStableImplicit =   8.88888889e+06;
 
+const PylithScalar pylith::materials::MaxwellIsotropic3DTimeDepData::_dtStableExplicit =   1.92450090e-01;
+
 const int pylith::materials::MaxwellIsotropic3DTimeDepData::_numPropertyValues[] = {
 1,
 1,
@@ -365,6 +367,7 @@
   pressureScale = _pressureScale;
   densityScale = _densityScale;
   dtStableImplicit = _dtStableImplicit;
+  dtStableExplicit = _dtStableExplicit;
   numPropertyValues = const_cast<int*>(_numPropertyValues);
   numStateVarValues = const_cast<int*>(_numStateVarValues);
   dbPropertyValues = const_cast<char**>(_dbPropertyValues);

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellIsotropic3DTimeDepData.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellIsotropic3DTimeDepData.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellIsotropic3DTimeDepData.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -69,6 +69,8 @@
 
   static const PylithScalar _dtStableImplicit;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const int _numPropertyValues[];
 
   static const int _numStateVarValues[];

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellPlaneStrainElastic.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellPlaneStrainElastic.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellPlaneStrainElastic.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -164,6 +164,8 @@
                                                initialStressB, initialStrainB,
                                                self.stateVars[1,:])
     self.dtStableImplicit = 0.2*min(maxwellTimeA, maxwellTimeB)
+    self.dtStableExplicit = 1000.0 / vpA
+
     return
 
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellPlaneStrainElasticData.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellPlaneStrainElasticData.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellPlaneStrainElasticData.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -47,6 +47,8 @@
 
 const PylithScalar pylith::materials::MaxwellPlaneStrainElasticData::_dtStableImplicit =   8.88888889e+06;
 
+const PylithScalar pylith::materials::MaxwellPlaneStrainElasticData::_dtStableExplicit =   1.92450090e-01;
+
 const int pylith::materials::MaxwellPlaneStrainElasticData::_numPropertyValues[] = {
 1,
 1,
@@ -264,6 +266,7 @@
   pressureScale = _pressureScale;
   densityScale = _densityScale;
   dtStableImplicit = _dtStableImplicit;
+  dtStableExplicit = _dtStableExplicit;
   numPropertyValues = const_cast<int*>(_numPropertyValues);
   numStateVarValues = const_cast<int*>(_numStateVarValues);
   dbPropertyValues = const_cast<char**>(_dbPropertyValues);

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellPlaneStrainElasticData.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellPlaneStrainElasticData.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellPlaneStrainElasticData.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -69,6 +69,8 @@
 
   static const PylithScalar _dtStableImplicit;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const int _numPropertyValues[];
 
   static const int _numStateVarValues[];

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellPlaneStrainTimeDep.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellPlaneStrainTimeDep.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellPlaneStrainTimeDep.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -199,6 +199,8 @@
                                                stateVarsB)
 
     self.dtStableImplicit = 0.2*min(maxwellTimeA, maxwellTimeB)
+    self.dtStableExplicit = 1000.0 / vpA
+
     return
 
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellPlaneStrainTimeDepData.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellPlaneStrainTimeDepData.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellPlaneStrainTimeDepData.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -47,6 +47,8 @@
 
 const PylithScalar pylith::materials::MaxwellPlaneStrainTimeDepData::_dtStableImplicit =   8.88888889e+06;
 
+const PylithScalar pylith::materials::MaxwellPlaneStrainTimeDepData::_dtStableExplicit =   1.92450090e-01;
+
 const int pylith::materials::MaxwellPlaneStrainTimeDepData::_numPropertyValues[] = {
 1,
 1,
@@ -264,6 +266,7 @@
   pressureScale = _pressureScale;
   densityScale = _densityScale;
   dtStableImplicit = _dtStableImplicit;
+  dtStableExplicit = _dtStableExplicit;
   numPropertyValues = const_cast<int*>(_numPropertyValues);
   numStateVarValues = const_cast<int*>(_numStateVarValues);
   dbPropertyValues = const_cast<char**>(_dbPropertyValues);

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellPlaneStrainTimeDepData.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellPlaneStrainTimeDepData.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/MaxwellPlaneStrainTimeDepData.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -69,6 +69,8 @@
 
   static const PylithScalar _dtStableImplicit;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const int _numPropertyValues[];
 
   static const int _numStateVarValues[];

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLaw3DElastic.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLaw3DElastic.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLaw3DElastic.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -193,6 +193,8 @@
                                          dtype=numpy.float64)
 
     self.dtStableImplicit = 0.1*min(maxwellTimeA, maxwellTimeB)
+    self.dtStableExplicit = 1000.0 / vpA
+
     return
 
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLaw3DElasticData.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLaw3DElasticData.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLaw3DElasticData.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -47,6 +47,8 @@
 
 const PylithScalar pylith::materials::PowerLaw3DElasticData::_dtStableImplicit =   4.44444444e+06;
 
+const PylithScalar pylith::materials::PowerLaw3DElasticData::_dtStableExplicit =   1.92450090e-01;
+
 const int pylith::materials::PowerLaw3DElasticData::_numPropertyValues[] = {
 1,
 1,
@@ -393,6 +395,7 @@
   pressureScale = _pressureScale;
   densityScale = _densityScale;
   dtStableImplicit = _dtStableImplicit;
+  dtStableExplicit = _dtStableExplicit;
   numPropertyValues = const_cast<int*>(_numPropertyValues);
   numStateVarValues = const_cast<int*>(_numStateVarValues);
   dbPropertyValues = const_cast<char**>(_dbPropertyValues);

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLaw3DElasticData.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLaw3DElasticData.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLaw3DElasticData.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -69,6 +69,8 @@
 
   static const PylithScalar _dtStableImplicit;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const int _numPropertyValues[];
 
   static const int _numStateVarValues[];

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLaw3DTimeDep.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLaw3DTimeDep.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLaw3DTimeDep.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -211,6 +211,8 @@
                                         powerLawExponentB, stressB)
 
     self.dtStableImplicit = 0.1*min(maxwellTimeA, maxwellTimeB)
+    self.dtStableExplicit = 1000.0 / vpA
+
     return
 
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLaw3DTimeDepData.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLaw3DTimeDepData.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLaw3DTimeDepData.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -47,6 +47,8 @@
 
 const PylithScalar pylith::materials::PowerLaw3DTimeDepData::_dtStableImplicit =   4.44444444e+06;
 
+const PylithScalar pylith::materials::PowerLaw3DTimeDepData::_dtStableExplicit =   1.92450090e-01;
+
 const int pylith::materials::PowerLaw3DTimeDepData::_numPropertyValues[] = {
 1,
 1,
@@ -381,6 +383,7 @@
   pressureScale = _pressureScale;
   densityScale = _densityScale;
   dtStableImplicit = _dtStableImplicit;
+  dtStableExplicit = _dtStableExplicit;
   numPropertyValues = const_cast<int*>(_numPropertyValues);
   numStateVarValues = const_cast<int*>(_numStateVarValues);
   dbPropertyValues = const_cast<char**>(_dbPropertyValues);

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLaw3DTimeDepData.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLaw3DTimeDepData.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLaw3DTimeDepData.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -69,6 +69,8 @@
 
   static const PylithScalar _dtStableImplicit;
 
+  static const PylithScalar _dtStableExplicit;
+
   static const int _numPropertyValues[];
 
   static const int _numStateVarValues[];

Copied: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLawPlaneStrainElastic.py (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/materials/data/PowerLawPlaneStrainElastic.py)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLawPlaneStrainElastic.py	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLawPlaneStrainElastic.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -0,0 +1,289 @@
+#!/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)
+    self.dtStableExplicit = 1000.0 / vpA
+
+    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/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLawPlaneStrainElasticData.cc (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/materials/data/PowerLawPlaneStrainElasticData.cc)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLawPlaneStrainElasticData.cc	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLawPlaneStrainElasticData.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -0,0 +1,318 @@
+// -*- 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 PylithScalar pylith::materials::PowerLawPlaneStrainElasticData::_dtStableExplicit =   1.92450090e-01;
+
+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;
+  dtStableExplicit = _dtStableExplicit;
+  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/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLawPlaneStrainElasticData.hh (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/materials/data/PowerLawPlaneStrainElasticData.hh)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLawPlaneStrainElasticData.hh	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLawPlaneStrainElasticData.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -0,0 +1,112 @@
+// -*- 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 PylithScalar _dtStableExplicit;
+
+  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/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLawPlaneStrainTimeDep.py (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/materials/data/PowerLawPlaneStrainTimeDep.py)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLawPlaneStrainTimeDep.py	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLawPlaneStrainTimeDep.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -0,0 +1,519 @@
+#!/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)
+    self.dtStableExplicit = 1000.0 / vpA
+
+    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/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLawPlaneStrainTimeDepData.cc (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/materials/data/PowerLawPlaneStrainTimeDepData.cc)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLawPlaneStrainTimeDepData.cc	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLawPlaneStrainTimeDepData.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -0,0 +1,306 @@
+// -*- 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 PylithScalar pylith::materials::PowerLawPlaneStrainTimeDepData::_dtStableExplicit =   1.92450090e-01;
+
+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;
+  dtStableExplicit = _dtStableExplicit;
+  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/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLawPlaneStrainTimeDepData.hh (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/materials/data/PowerLawPlaneStrainTimeDepData.hh)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLawPlaneStrainTimeDepData.hh	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/PowerLawPlaneStrainTimeDepData.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -0,0 +1,112 @@
+// -*- 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 PylithScalar _dtStableExplicit;
+
+  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/branches/pylith-scecdynrup/unittests/libtests/materials/data/generate.sh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/generate.sh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/materials/data/generate.sh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/unittests/libtests/meshio/TestDataWriterPoints.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/TestDataWriterPoints.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/TestDataWriterPoints.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/unittests/libtests/meshio/TestDataWriterVTKPoints.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/TestDataWriterVTKPoints.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/TestDataWriterVTKPoints.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/unittests/libtests/meshio/TestXdmf.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/TestXdmf.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/TestXdmf.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -36,10 +36,10 @@
 } // testConstructor
 
 // ----------------------------------------------------------------------
-// Test write() with 2D mesh and vertex data.
+// Test write() with tri3 mesh and vertex data.
 void
-pylith::meshio::TestXdmf::testWrite2DVertex(void)
-{ // testWrite2DVertex
+pylith::meshio::TestXdmf::testWriteTri3Vertex(void)
+{ // testWriteTri3Vertex
 
   const char* filenameHDF5 = "data/tri3_vertex.h5";
   const char* filenameXdmf = "tri3_vertex.xmf";
@@ -48,13 +48,13 @@
   metafile.write(filenameXdmf, filenameHDF5);
 
   _checkFile(filenameXdmf);
-} // testWrite2DVertex
+} // testWriteTri3Vertex
 
 // ----------------------------------------------------------------------
-// Test write() with 2D mesh and cell data.
+// Test write() with Tri3 mesh and cell data.
 void
-pylith::meshio::TestXdmf::testWrite2DCell(void)
-{ // testWrite2DCell
+pylith::meshio::TestXdmf::testWriteTri3Cell(void)
+{ // testWriteTri3Cell
   const char* filenameHDF5 = "data/tri3_cell.h5";
   const char* filenameXdmf = "tri3_cell.xmf";
 
@@ -62,13 +62,42 @@
   metafile.write(filenameXdmf, filenameHDF5);
 
   _checkFile(filenameXdmf);
-} // testWrite2DCell
+} // testWriteTri3Cell
 
 // ----------------------------------------------------------------------
-// Test write() with 3D mesh and vertex data.
+// Test write() with quad4 mesh and vertex data.
 void
-pylith::meshio::TestXdmf::testWrite3DVertex(void)
-{ // testWrite3DVertex
+pylith::meshio::TestXdmf::testWriteQuad4Vertex(void)
+{ // testWriteQuad4Vertex
+
+  const char* filenameHDF5 = "data/quad4_vertex.h5";
+  const char* filenameXdmf = "quad4_vertex.xmf";
+
+  Xdmf metafile;
+  metafile.write(filenameXdmf, filenameHDF5);
+
+  _checkFile(filenameXdmf);
+} // testWriteQuad4Vertex
+
+// ----------------------------------------------------------------------
+// Test write() with Quad4 mesh and cell data.
+void
+pylith::meshio::TestXdmf::testWriteQuad4Cell(void)
+{ // testWriteQuad4Cell
+  const char* filenameHDF5 = "data/quad4_cell.h5";
+  const char* filenameXdmf = "quad4_cell.xmf";
+
+  Xdmf metafile;
+  metafile.write(filenameXdmf, filenameHDF5);
+
+  _checkFile(filenameXdmf);
+} // testWriteQuad4Cell
+
+// ----------------------------------------------------------------------
+// Test write() with tet4 mesh and vertex data.
+void
+pylith::meshio::TestXdmf::testWriteTet4Vertex(void)
+{ // testWriteTet4Vertex
   const char* filenameHDF5 = "data/tet4_vertex.h5";
   const char* filenameXdmf = "tet4_vertex.xmf";
 
@@ -76,13 +105,13 @@
   metafile.write(filenameXdmf, filenameHDF5);
 
   _checkFile(filenameXdmf);
-} // testWrite3DVertex
+} // testWriteTet4Vertex
 
 // ----------------------------------------------------------------------
-// Test write() with 3D mesh and cell data.
+// Test write() with tet4 mesh and cell data.
 void
-pylith::meshio::TestXdmf::testWrite3DCell(void)
-{ // testWrite3DCell
+pylith::meshio::TestXdmf::testWriteTet4Cell(void)
+{ // testWriteTet4Cell
   const char* filenameHDF5 = "data/tet4_cell.h5";
   const char* filenameXdmf = "tet4_cell.xmf";
 
@@ -90,11 +119,39 @@
   metafile.write(filenameXdmf, filenameHDF5);
 
   _checkFile(filenameXdmf);
-} // testWrite3DCell
+} // testWriteTet4Cell
 
 // ----------------------------------------------------------------------
-// Check VTK file against archived file.
+// Test write() with hex8 mesh and vertex data.
 void
+pylith::meshio::TestXdmf::testWriteHex8Vertex(void)
+{ // testWriteHex8Vertex
+  const char* filenameHDF5 = "data/hex8_vertex.h5";
+  const char* filenameXdmf = "hex8_vertex.xmf";
+
+  Xdmf metafile;
+  metafile.write(filenameXdmf, filenameHDF5);
+
+  _checkFile(filenameXdmf);
+} // testWriteHex8Vertex
+
+// ----------------------------------------------------------------------
+// Test write() with hex8 mesh and cell data.
+void
+pylith::meshio::TestXdmf::testWriteHex8Cell(void)
+{ // testWriteHex8Cell
+  const char* filenameHDF5 = "data/hex8_cell.h5";
+  const char* filenameXdmf = "hex8_cell.xmf";
+
+  Xdmf metafile;
+  metafile.write(filenameXdmf, filenameHDF5);
+
+  _checkFile(filenameXdmf);
+} // testWriteHex8Cell
+
+// ----------------------------------------------------------------------
+// Check Xdmf file against archived file.
+void
 pylith::meshio::TestXdmf::_checkFile(const char* filename)
 { // _checkFile
   const std::string filenameE = std::string("data/") + std::string(filename);

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/TestXdmf.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/TestXdmf.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/TestXdmf.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -44,10 +44,14 @@
   CPPUNIT_TEST_SUITE( TestXdmf );
 
   CPPUNIT_TEST( testConstructor );
-  CPPUNIT_TEST( testWrite2DVertex );
-  CPPUNIT_TEST( testWrite2DCell );
-  CPPUNIT_TEST( testWrite3DVertex );
-  CPPUNIT_TEST( testWrite3DCell );
+  CPPUNIT_TEST( testWriteTri3Vertex );
+  CPPUNIT_TEST( testWriteTri3Cell );
+  CPPUNIT_TEST( testWriteQuad4Vertex );
+  CPPUNIT_TEST( testWriteQuad4Cell );
+  CPPUNIT_TEST( testWriteTet4Vertex );
+  CPPUNIT_TEST( testWriteTet4Cell );
+  CPPUNIT_TEST( testWriteHex8Vertex );
+  CPPUNIT_TEST( testWriteHex8Cell );
 
   CPPUNIT_TEST_SUITE_END();
 
@@ -57,18 +61,30 @@
   /// Test constructor.
   void testConstructor(void);
 
-  /// Test write() with 2D mesh and vertex data.
-  void testWrite2DVertex(void);
+  /// Test write() with tri3 mesh and vertex data.
+  void testWriteTri3Vertex(void);
 
-  /// Test write() with 2D mesh and cell data.
-  void testWrite2DCell(void);
+  /// Test write() with tri3 mesh and cell data.
+  void testWriteTri3Cell(void);
 
-  /// Test write() with 3D mesh and vertex data.
-  void testWrite3DVertex(void);
+  /// Test write() with quad4 mesh and vertex data.
+  void testWriteQuad4Vertex(void);
 
-  /// Test write() with 3D mesh and cell data.
-  void testWrite3DCell(void);
+  /// Test write() with quad4 mesh and cell data.
+  void testWriteQuad4Cell(void);
 
+  /// Test write() with tet4 mesh and vertex data.
+  void testWriteTet4Vertex(void);
+
+  /// Test write() with tet4 mesh and cell data.
+  void testWriteTet4Cell(void);
+
+  /// Test write() with hex8 mesh and vertex data.
+  void testWriteHex8Vertex(void);
+
+  /// Test write() with hex8 mesh and cell data.
+  void testWriteHex8Cell(void);
+
   // PRIVATE METHODS ////////////////////////////////////////////////////
 private :
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterData.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterData.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterData.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -18,6 +18,9 @@
 
 #include "DataWriterData.hh"
 
+const int pylith::meshio::DataWriterData::DataWriterData::numVertexFields = 4;
+const int pylith::meshio::DataWriterData::DataWriterData::numCellFields = 4;
+
 // ----------------------------------------------------------------------
 // Constructor
 pylith::meshio::DataWriterData::DataWriterData(void) :
@@ -32,13 +35,18 @@
   timeFormat(0),
   cellsLabel(0),
   labelId(0),
-  numVertexFields(0),
   numVertices(0),
   vertexFieldsInfo(0),
-  numCellFields(0),
   numCells(0),
   cellFieldsInfo(0)
 { // constructor
+  for (int i=0; i < numVertexFields; ++i) {
+    vertexFields[i] = 0;
+  } // for
+
+  for (int i=0; i < numCellFields; ++i) {
+    cellFields[i] = 0;
+  } // for
 } // constructor
 
 // ----------------------------------------------------------------------

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterData.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterData.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterData.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -69,18 +69,18 @@
 
   /// @name Vertex field information.
   //@{
-  int numVertexFields; ///< Number of vertex fields.
+  static const int numVertexFields; ///< Number of vertex fields.
   int numVertices; ///< Number of vertices.
   FieldStruct* vertexFieldsInfo; ///< Array of vertex field information.
-  PylithScalar* vertexFields[3]; ///< Array of vertex field values.
+  PylithScalar* vertexFields[4]; ///< Array of vertex field values.
   //@}
 
   /// @name Cell field information.
   //@{
-  int numCellFields; ///< Number of cell fields.
+  static const int numCellFields; ///< Number of cell fields.
   int numCells; ///< Number of vertices.
   FieldStruct* cellFieldsInfo; ///< Array of cell fields information.
-  PylithScalar* cellFields[3]; /// Array of cell field values.
+  PylithScalar* cellFields[4]; /// Array of cell field values.
   //@}
 
 }; // DataWriterData

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataBCMeshHex8.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataBCMeshHex8.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataBCMeshHex8.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -44,16 +44,19 @@
 const char* pylith::meshio::DataWriterHDF5DataBCMeshHex8::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterHDF5DataBCMeshHex8::_numVertexFields = 3;
 const int pylith::meshio::DataWriterHDF5DataBCMeshHex8::_numVertices = 8;
 
 const pylith::meshio::DataWriterData::FieldStruct
 pylith::meshio::DataWriterHDF5DataBCMeshHex8::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 3 },
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshHex8::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshHex8::_vertexFieldScalar[8*1] = {
+  2.1, 3.2, 4.3, 5.4, 6.5, 7.6, 8.7, 9.8,
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshHex8::_vertexFieldVector[8*3] = {
   1.1, 2.2, 3.3,
   4.4, 5.5, 6.6,
   7.7, 8.8, 9.9,
@@ -63,10 +66,17 @@
   7.8, 8.9, 9.0,
   10.2, 11.3, 12.4,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshHex8::_vertexField1[] = {
-  2.1, 3.2, 4.3, 5.4, 6.5, 7.6, 8.7, 9.8,
+const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshHex8::_vertexFieldTensor[8*6] = {
+  1.1, 1.2, 1.3, 1.4, 1.5, 1.6,
+  2.1, 2.2, 2.3, 2.4, 2.5, 2.6,
+  3.1, 3.2, 3.3, 3.4, 3.5, 3.6,
+  4.1, 4.2, 4.3, 4.4, 4.5, 4.6,
+  5.1, 5.2, 5.3, 5.4, 5.5, 5.6,
+  6.1, 6.2, 6.3, 6.4, 6.5, 6.6,
+  7.1, 7.2, 7.3, 7.4, 7.5, 7.6,
+  8.1, 8.2, 8.3, 8.4, 8.5, 8.6,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshHex8::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshHex8::_vertexFieldOther[8*2] = {
   1.2, 2.3,
   3.4, 4.5,
   5.6, 6.7,
@@ -77,26 +87,30 @@
   7.9, 8.0,
 };
 
-const int pylith::meshio::DataWriterHDF5DataBCMeshHex8::_numCellFields = 3;
 const int pylith::meshio::DataWriterHDF5DataBCMeshHex8::_numCells = 2;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataBCMeshHex8::_cellFields[] = {
+pylith::meshio::DataWriterHDF5DataBCMeshHex8::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 3 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 6 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
+  { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshHex8::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshHex8::_cellFieldScalar[2*1] = {
+  2.1, 3.2,
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshHex8::_cellFieldVector[2*3] = {
   1.1, 2.2, 3.3,
-  4.4, 5.5, 6.6
+  4.4, 5.5, 6.6,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshHex8::_cellField1[] = {
-  2.1, 3.2,
-};
-const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshHex8::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshHex8::_cellFieldTensor[2*6] = {
   1.2, 2.3, 3.4, 4.5, 5.6, 6.7,
-  7.8, 8.9, 9.0, 10.1, 11.2, 12.3
+  7.8, 8.9, 9.0, 10.1, 11.2, 12.3,
 };
+const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshHex8::_cellFieldOther[2*2] = {
+  1.1, 2.2,
+  5.5, 6.6,
+};
 
 pylith::meshio::DataWriterHDF5DataBCMeshHex8::DataWriterHDF5DataBCMeshHex8(void)
 { // constructor
@@ -112,21 +126,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
   numVertices = _numVertices;
-  assert(3 == numVertexFields);
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
   numCells = _numCells;
-  assert(3 == numCellFields);
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterHDF5DataBCMeshHex8::~DataWriterHDF5DataBCMeshHex8(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataBCMeshHex8.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataBCMeshHex8.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataBCMeshHex8.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -58,9 +58,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -69,9 +70,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterHDF5DataBCMeshHex8

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataBCMeshQuad4.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataBCMeshQuad4.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataBCMeshQuad4.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -40,46 +40,55 @@
 const char* pylith::meshio::DataWriterHDF5DataBCMeshQuad4::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterHDF5DataBCMeshQuad4::_numVertexFields = 3;
 const int pylith::meshio::DataWriterHDF5DataBCMeshQuad4::_numVertices = 3;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataBCMeshQuad4::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 2 },
+pylith::meshio::DataWriterHDF5DataBCMeshQuad4::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 2 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshQuad4::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshQuad4::_vertexFieldScalar[3*1] = {
+  2.1, 3.2, 4.3,
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshQuad4::_vertexFieldVector[3*2] = {
   1.1, 2.2,
   3.3, 4.4,
   5.5, 6.6,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshQuad4::_vertexField1[] = {
-  2.1, 3.2, 4.3,
+const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshQuad4::_vertexFieldTensor[3*3] = {
+  1.1, 1.2, 1.3,
+  2.1, 2.2, 2.3,
+  3.1, 3.2, 3.3,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshQuad4::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshQuad4::_vertexFieldOther[3*2] = {
   1.2, 2.3,
   3.4, 4.5,
   5.6, 6.7,
 };
 
-const int pylith::meshio::DataWriterHDF5DataBCMeshQuad4::_numCellFields = 3;
 const int pylith::meshio::DataWriterHDF5DataBCMeshQuad4::_numCells = 2;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataBCMeshQuad4::_cellFields[] = {
+pylith::meshio::DataWriterHDF5DataBCMeshQuad4::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 2 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
+  { "other", topology::FieldBase::OTHER, 3 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshQuad4::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshQuad4::_cellFieldScalar[2*1] = {
+  2.1, 3.2,
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshQuad4::_cellFieldVector[2*2] = {
   1.1, 2.2,
   3.3, 4.4,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshQuad4::_cellField1[] = {
-  2.1, 3.2,
+const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshQuad4::_cellFieldTensor[2*3] = {
+  1.2, 1.3, 1.4,
+  2.2, 2.3, 2.4,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshQuad4::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshQuad4::_cellFieldOther[2*3] = {
   1.2, 2.3, 3.4,
   4.5, 5.6, 6.7,
 };
@@ -96,21 +105,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
-  assert(3 == numVertexFields);
   numVertices = _numVertices;
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
-  assert(3 == numCellFields);
   numCells = _numCells;
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterHDF5DataBCMeshQuad4::~DataWriterHDF5DataBCMeshQuad4(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataBCMeshQuad4.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataBCMeshQuad4.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataBCMeshQuad4.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -56,9 +56,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -67,9 +68,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterHDF5DataBCMeshQuad4

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataBCMeshTet4.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataBCMeshTet4.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataBCMeshTet4.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -44,16 +44,19 @@
 const char* pylith::meshio::DataWriterHDF5DataBCMeshTet4::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterHDF5DataBCMeshTet4::_numVertexFields = 3;
 const int pylith::meshio::DataWriterHDF5DataBCMeshTet4::_numVertices = 6;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataBCMeshTet4::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 3 },
+pylith::meshio::DataWriterHDF5DataBCMeshTet4::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshTet4::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshTet4::_vertexFieldScalar[6*1] = {
+  2.1, 3.2, 4.3, 5.4, 6.5, 7.6,
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshTet4::_vertexFieldVector[6*3] = {
   1.1, 2.2, 3.3,
   4.4, 5.5, 6.6,
   7.7, 8.8, 9.9,
@@ -61,10 +64,15 @@
   13.3, 14.4, 15.5,
   16.6, 17.7, 18.8,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshTet4::_vertexField1[] = {
-  2.1, 3.2, 4.3, 5.4, 6.5, 7.6,
+const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshTet4::_vertexFieldTensor[6*6] = {
+  1.1, 1.2, 1.3, 1.4, 1.5, 1.6,
+  2.1, 2.2, 2.3, 2.4, 2.5, 2.6,
+  3.1, 3.2, 3.3, 3.4, 3.5, 3.6,
+  4.1, 4.2, 4.3, 4.4, 4.5, 4.6,
+  5.1, 5.2, 5.3, 5.4, 5.5, 5.6,
+  6.1, 6.2, 6.3, 6.4, 6.5, 6.6,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshTet4::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshTet4::_vertexFieldOther[6*2] = {
   1.2, 2.3,
   3.4, 4.5,
   5.6, 6.7,
@@ -73,26 +81,30 @@
   11.2, 12.3,
 };
 
-const int pylith::meshio::DataWriterHDF5DataBCMeshTet4::_numCellFields = 3;
 const int pylith::meshio::DataWriterHDF5DataBCMeshTet4::_numCells = 2;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataBCMeshTet4::_cellFields[] = {
+pylith::meshio::DataWriterHDF5DataBCMeshTet4::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 3 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 6 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
+  { "other", topology::FieldBase::OTHER, 4 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshTet4::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshTet4::_cellFieldScalar[2*1] = {
+  2.1, 3.2
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshTet4::_cellFieldVector[2*3] = {
   1.1, 2.2, 3.3,
   4.4, 5.5, 6.6,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshTet4::_cellField1[] = {
-  2.1, 3.2
-};
-const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshTet4::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshTet4::_cellFieldTensor[2*6] = {
   1.2, 2.3, 3.4, 4.5, 5.6, 6.7,
   7.8, 8.9, 9.0, 10.1, 11.2, 12.3,
 };
+const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshTet4::_cellFieldOther[2*4] = {
+  1.2, 2.3, 3.4, 4.5,
+  7.8, 8.9, 9.0, 10.1,
+};
 
 pylith::meshio::DataWriterHDF5DataBCMeshTet4::DataWriterHDF5DataBCMeshTet4(void)
 { // constructor
@@ -108,21 +120,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
-  assert(3 == numVertexFields);
   numVertices = _numVertices;
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
-  assert(3 == numCellFields);
   numCells = _numCells;
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterHDF5DataBCMeshTet4::~DataWriterHDF5DataBCMeshTet4(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataBCMeshTet4.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataBCMeshTet4.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataBCMeshTet4.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -58,9 +58,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -69,9 +70,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterHDF5DataBCMeshTet4

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataBCMeshTri3.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataBCMeshTri3.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataBCMeshTri3.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -44,45 +44,52 @@
 const char* pylith::meshio::DataWriterHDF5DataBCMeshTri3::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterHDF5DataBCMeshTri3::_numVertexFields = 3;
 const int pylith::meshio::DataWriterHDF5DataBCMeshTri3::_numVertices = 2;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataBCMeshTri3::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 2 },
+pylith::meshio::DataWriterHDF5DataBCMeshTri3::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 2 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshTri3::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshTri3::_vertexFieldScalar[2*1] = {
+  2.1, 3.2,
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshTri3::_vertexFieldVector[2*2] = {
   1.1, 2.2,
   3.3, 4.4,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshTri3::_vertexField1[] = {
-  2.1, 3.2,
+const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshTri3::_vertexFieldTensor[2*3] = {
+  1.1, 1.2, 1.3,
+  2.1, 2.2, 2.3,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshTri3::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshTri3::_vertexFieldOther[2*2] = {
   1.2, 2.3,
   3.4, 4.5,
 };
 
-const int pylith::meshio::DataWriterHDF5DataBCMeshTri3::_numCellFields = 3;
 const int pylith::meshio::DataWriterHDF5DataBCMeshTri3::_numCells = 1;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataBCMeshTri3::_cellFields[] = {
+pylith::meshio::DataWriterHDF5DataBCMeshTri3::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 2 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
+  { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshTri3::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshTri3::_cellFieldScalar[1*1] = {
+  2.1,
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshTri3::_cellFieldVector[1*2] = {
   1.1, 2.2,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshTri3::_cellField1[] = {
-  2.1,
-};
-const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshTri3::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshTri3::_cellFieldTensor[1*3] = {
   1.2, 2.3, 3.4,
 };
+const PylithScalar pylith::meshio::DataWriterHDF5DataBCMeshTri3::_cellFieldOther[1*2] = {
+  2.1, 2.2,
+};
 
 pylith::meshio::DataWriterHDF5DataBCMeshTri3::DataWriterHDF5DataBCMeshTri3(void)
 { // constructor
@@ -98,21 +105,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
   numVertices = _numVertices;
-  assert(3 == numVertexFields);
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
   numCells = _numCells;
-  assert(3 == numCellFields);
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterHDF5DataBCMeshTri3::~DataWriterHDF5DataBCMeshTri3(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataBCMeshTri3.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataBCMeshTri3.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataBCMeshTri3.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -58,9 +58,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -69,9 +70,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterHDF5DataBCMeshTri3

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataFaultMeshHex8.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataFaultMeshHex8.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataFaultMeshHex8.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -41,49 +41,58 @@
 const char* pylith::meshio::DataWriterHDF5DataFaultMeshHex8::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterHDF5DataFaultMeshHex8::_numVertexFields = 3;
 const int pylith::meshio::DataWriterHDF5DataFaultMeshHex8::_numVertices = 4;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataFaultMeshHex8::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 3 },
+pylith::meshio::DataWriterHDF5DataFaultMeshHex8::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshHex8::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshHex8::_vertexFieldScalar[4*1] = {
+  2.1, 3.2, 4.3, 5.4,
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshHex8::_vertexFieldVector[4*3] = {
   1.1, 2.2, 3.3,
   4.4, 5.5, 6.6,
   7.7, 8.8, 9.9,
   10.1, 11.2, 12.3,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshHex8::_vertexField1[] = {
-  2.1, 3.2, 4.3, 5.4,
+const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshHex8::_vertexFieldTensor[4*6] = {
+  1.1, 1.2, 1.3, 1.4, 1.5, 1.6,
+  2.1, 2.2, 2.3, 2.4, 2.5, 2.6,
+  3.1, 3.2, 3.3, 3.4, 3.5, 3.6,
+  4.1, 4.2, 4.3, 4.4, 4.5, 4.6,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshHex8::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshHex8::_vertexFieldOther[4*2] = {
   1.2, 2.3,
   3.4, 4.5,
   5.6, 6.7,
   7.8, 8.9,
 };
 
-const int pylith::meshio::DataWriterHDF5DataFaultMeshHex8::_numCellFields = 3;
 const int pylith::meshio::DataWriterHDF5DataFaultMeshHex8::_numCells = 1;
 
 const pylith::meshio::DataWriterData::FieldStruct
 pylith::meshio::DataWriterHDF5DataFaultMeshHex8::_cellFields[] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 3 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 6 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
+  { "other", topology::FieldBase::OTHER, 3 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshHex8::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshHex8::_cellFieldScalar[1*1] = {
+  2.1,
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshHex8::_cellFieldVector[1*3] = {
   1.1, 2.2, 3.3,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshHex8::_cellField1[] = {
-  2.1,
-};
-const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshHex8::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshHex8::_cellFieldTensor[1*6] = {
   1.2, 2.3, 3.4, 4.5, 5.6, 6.7,
 };
+const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshHex8::_cellFieldOther[1*3] = {
+  1.2, 2.3, 3.4,
+};
 
 pylith::meshio::DataWriterHDF5DataFaultMeshHex8::DataWriterHDF5DataFaultMeshHex8(void)
 { // constructor
@@ -98,21 +107,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
   numVertices = _numVertices;
-  assert(3 == numVertexFields);
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
   numCells = _numCells;
-  assert(3 == numCellFields);
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterHDF5DataFaultMeshHex8::~DataWriterHDF5DataFaultMeshHex8(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataFaultMeshHex8.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataFaultMeshHex8.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataFaultMeshHex8.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -57,9 +57,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -68,9 +69,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterHDF5DataFaultMeshHex8

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataFaultMeshQuad4.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataFaultMeshQuad4.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataFaultMeshQuad4.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -41,45 +41,52 @@
 const char* pylith::meshio::DataWriterHDF5DataFaultMeshQuad4::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterHDF5DataFaultMeshQuad4::_numVertexFields = 3;
 const int pylith::meshio::DataWriterHDF5DataFaultMeshQuad4::_numVertices = 2;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataFaultMeshQuad4::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 2 },
+pylith::meshio::DataWriterHDF5DataFaultMeshQuad4::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 2 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshQuad4::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshQuad4::_vertexFieldScalar[2*1] = {
+  2.1, 3.2,
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshQuad4::_vertexFieldVector[2*2] = {
   1.1, 2.2,
   3.3, 4.4,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshQuad4::_vertexField1[] = {
-  2.1, 3.2,
+const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshQuad4::_vertexFieldTensor[2*3] = {
+  1.2, 1.3, 1.4,
+  2.2, 2.3, 2.4,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshQuad4::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshQuad4::_vertexFieldOther[2*2] = {
   1.2, 2.3,
   3.4, 4.5,
 };
 
-const int pylith::meshio::DataWriterHDF5DataFaultMeshQuad4::_numCellFields = 3;
 const int pylith::meshio::DataWriterHDF5DataFaultMeshQuad4::_numCells = 1;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataFaultMeshQuad4::_cellFields[] = {
+pylith::meshio::DataWriterHDF5DataFaultMeshQuad4::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 2 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
+  { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshQuad4::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshQuad4::_cellFieldScalar[1*1] = {
+  2.1,
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshQuad4::_cellFieldVector[1*2] = {
   1.1, 2.2,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshQuad4::_cellField1[] = {
-  2.1,
-};
-const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshQuad4::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshQuad4::_cellFieldTensor[1*3] = {
   1.2, 2.3, 3.4,
 };
+const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshQuad4::_cellFieldOther[1*2] = {
+  1.2, 3.2,
+};
 
 pylith::meshio::DataWriterHDF5DataFaultMeshQuad4::DataWriterHDF5DataFaultMeshQuad4(void)
 { // constructor
@@ -94,21 +101,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
-  assert(3 == numVertexFields);
   numVertices = _numVertices;
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
-  assert(3 == numCellFields);
   numCells = _numCells;
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterHDF5DataFaultMeshQuad4::~DataWriterHDF5DataFaultMeshQuad4(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataFaultMeshQuad4.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataFaultMeshQuad4.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataFaultMeshQuad4.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -57,9 +57,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -68,9 +69,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterHDF5DataFaultMeshQuad4

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataFaultMeshTet4.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataFaultMeshTet4.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataFaultMeshTet4.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -41,47 +41,55 @@
 const char* pylith::meshio::DataWriterHDF5DataFaultMeshTet4::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterHDF5DataFaultMeshTet4::_numVertexFields = 3;
 const int pylith::meshio::DataWriterHDF5DataFaultMeshTet4::_numVertices = 3;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataFaultMeshTet4::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 3 },
+pylith::meshio::DataWriterHDF5DataFaultMeshTet4::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshTet4::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshTet4::_vertexFieldScalar[3*1] = {
+  2.1, 3.2, 4.3,
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshTet4::_vertexFieldVector[3*3] = {
   1.1, 2.2, 3.3,
   4.4, 5.5, 6.6,
   7.7, 8.8, 9.9,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshTet4::_vertexField1[] = {
-  2.1, 3.2, 4.3,
+const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshTet4::_vertexFieldTensor[3*6] = {
+  1.1, 1.2, 1.3, 1.4, 1.5, 1.6,
+  2.1, 2.2, 2.3, 2.4, 2.5, 2.6,
+  3.1, 3.2, 3.3, 3.4, 3.5, 3.6,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshTet4::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshTet4::_vertexFieldOther[3*2] = {
   1.2, 2.3,
   3.4, 4.5,
   5.6, 6.7,
 };
 
-const int pylith::meshio::DataWriterHDF5DataFaultMeshTet4::_numCellFields = 3;
 const int pylith::meshio::DataWriterHDF5DataFaultMeshTet4::_numCells = 1;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataFaultMeshTet4::_cellFields[] = {
+pylith::meshio::DataWriterHDF5DataFaultMeshTet4::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 3 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 6 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
+  { "other", topology::FieldBase::OTHER, 3 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshTet4::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshTet4::_cellFieldScalar[1*1] = {
+  2.1,
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshTet4::_cellFieldVector[1*3] = {
   1.1, 2.2, 3.3,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshTet4::_cellField1[] = {
-  2.1,
-};
-const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshTet4::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshTet4::_cellFieldTensor[1*6] = {
   1.2, 2.3, 3.4, 4.5, 5.6, 6.7,
 };
+const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshTet4::_cellFieldOther[1*3] = {
+  1.2, 2.3, 3.4,
+};
 
 pylith::meshio::DataWriterHDF5DataFaultMeshTet4::DataWriterHDF5DataFaultMeshTet4(void)
 { // constructor
@@ -96,21 +104,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
-  assert(3 == numVertexFields);
   numVertices = _numVertices;
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
-  assert(3 == numCellFields);
   numCells = _numCells;
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterHDF5DataFaultMeshTet4::~DataWriterHDF5DataFaultMeshTet4(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataFaultMeshTet4.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataFaultMeshTet4.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataFaultMeshTet4.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -57,9 +57,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -68,9 +69,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterHDF5DataFaultMeshTet4

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataFaultMeshTri3.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataFaultMeshTri3.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataFaultMeshTri3.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -41,45 +41,52 @@
 const char* pylith::meshio::DataWriterHDF5DataFaultMeshTri3::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterHDF5DataFaultMeshTri3::_numVertexFields = 3;
 const int pylith::meshio::DataWriterHDF5DataFaultMeshTri3::_numVertices = 2;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataFaultMeshTri3::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 2 },
+pylith::meshio::DataWriterHDF5DataFaultMeshTri3::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 2 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshTri3::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshTri3::_vertexFieldScalar[2*1] = {
+  2.1, 3.2,
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshTri3::_vertexFieldVector[2*2] = {
   1.1, 2.2,
   3.3, 4.4,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshTri3::_vertexField1[] = {
-  2.1, 3.2,
+const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshTri3::_vertexFieldTensor[2*3] = {
+  1.1, 1.2, 1.3,
+  2.1, 2.2, 2.3,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshTri3::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshTri3::_vertexFieldOther[2*2] = {
   1.2, 2.3,
   3.4, 4.5,
 };
 
-const int pylith::meshio::DataWriterHDF5DataFaultMeshTri3::_numCellFields = 3;
 const int pylith::meshio::DataWriterHDF5DataFaultMeshTri3::_numCells = 1;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataFaultMeshTri3::_cellFields[] = {
+pylith::meshio::DataWriterHDF5DataFaultMeshTri3::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 2 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
+  { "other", topology::FieldBase::OTHER, 4 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshTri3::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshTri3::_cellFieldScalar[1*1] = {
+  2.1,
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshTri3::_cellFieldVector[1*2] = {
   1.1, 2.2,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshTri3::_cellField1[] = {
-  2.1,
-};
-const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshTri3::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshTri3::_cellFieldTensor[1*3] = {
   1.2, 2.3, 3.4,
 };
+const PylithScalar pylith::meshio::DataWriterHDF5DataFaultMeshTri3::_cellFieldOther[1*4] = {
+  1.2, 2.3, 3.4, 4.5,
+};
 
 pylith::meshio::DataWriterHDF5DataFaultMeshTri3::DataWriterHDF5DataFaultMeshTri3(void)
 { // constructor
@@ -94,21 +101,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
   numVertices = _numVertices;
-  assert(3 == numVertexFields);
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
   numCells = _numCells;
-  assert(3 == numCellFields);
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterHDF5DataFaultMeshTri3::~DataWriterHDF5DataFaultMeshTri3(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataFaultMeshTri3.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataFaultMeshTri3.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataFaultMeshTri3.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -57,9 +57,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -68,9 +69,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterHDF5DataFaultMeshTri3

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshHex8.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshHex8.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshHex8.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -45,16 +45,21 @@
 const char* pylith::meshio::DataWriterHDF5DataMatMeshHex8::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterHDF5DataMatMeshHex8::_numVertexFields = 3;
 const int pylith::meshio::DataWriterHDF5DataMatMeshHex8::_numVertices = 20;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataMatMeshHex8::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 3 },
+pylith::meshio::DataWriterHDF5DataMatMeshHex8::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshHex8::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshHex8::_vertexFieldScalar[20*1] = {
+  2.1, 3.2, 4.3, 5.4, 6.5, 7.6, 8.7, 9.8,
+  10.0, 12.1, 11.1, 13.1, 14.1, 15.1, 16.1, 17.1,
+  18.1, 19.1, 20.1, 21.1
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshHex8::_vertexFieldVector[20*3] = {
   1.1, 2.2, 3.3,
   4.4, 5.5, 6.6,
   7.7, 8.8, 9.9,
@@ -76,12 +81,29 @@
   31.1, 32.2, 33.3,
   34.4, 35.5, 36.6
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshHex8::_vertexField1[] = {
-  2.1, 3.2, 4.3, 5.4, 6.5, 7.6, 8.7, 9.8,
-  10.0, 12.1, 11.1, 13.1, 14.1, 15.1, 16.1, 17.1,
-  18.1, 19.1, 20.1, 21.1
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshHex8::_vertexFieldTensor[20*6] = {
+  1.1, 1.2, 1.3, 1.4, 1.5, 1.6,
+  2.1, 2.2, 2.3, 2.4, 2.5, 2.6,
+  3.1, 3.2, 3.3, 3.4, 3.5, 3.6,
+  4.1, 4.2, 4.3, 4.4, 4.5, 4.6,
+  5.1, 5.2, 5.3, 5.4, 5.5, 5.6,
+  6.1, 6.2, 6.3, 6.4, 6.5, 6.6,
+  7.1, 7.2, 7.3, 7.4, 7.5, 7.6,
+  8.1, 8.2, 8.3, 8.4, 8.5, 8.6,
+  9.1, 9.2, 9.3, 9.4, 9.5, 9.6,
+  10.1, 10.2, 10.3, 10.4, 10.5, 10.6,
+  11.1, 11.2, 11.3, 11.4, 11.5, 11.6,
+  12.1, 12.2, 12.3, 12.4, 12.5, 12.6,
+  13.1, 13.2, 13.3, 13.4, 13.5, 13.6,
+  14.1, 14.2, 14.3, 14.4, 14.5, 14.6,
+  15.1, 15.2, 15.3, 15.4, 15.5, 15.6,
+  16.1, 16.2, 16.3, 16.4, 16.5, 16.6,
+  17.1, 17.2, 17.3, 17.4, 17.5, 17.6,
+  18.1, 18.2, 18.3, 18.4, 18.5, 18.6,
+  19.1, 19.2, 19.3, 19.4, 19.5, 19.6,
+  20.1, 20.2, 20.3, 20.4, 20.5, 20.6,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshHex8::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshHex8::_vertexFieldOther[20*2] = {
   1.2, 2.3,
   3.4, 4.5,
   5.6, 6.7,
@@ -104,24 +126,27 @@
   4.1, 4.2,
 };
 
-const int pylith::meshio::DataWriterHDF5DataMatMeshHex8::_numCellFields = 3;
 const int pylith::meshio::DataWriterHDF5DataMatMeshHex8::_numCells = 1;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataMatMeshHex8::_cellFields[] = {
+pylith::meshio::DataWriterHDF5DataMatMeshHex8::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 3 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 6 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
+  { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshHex8::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshHex8::_cellFieldScalar[1*1] = {
+  2.1,
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshHex8::_cellFieldVector[1*3] = {
   1.1, 2.2, 3.3,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshHex8::_cellField1[] = {
-  2.1,
-};
-const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshHex8::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshHex8::_cellFieldTensor[1*6] = {
   1.2, 2.3, 3.4, 4.5, 5.6, 6.7,
 };
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshHex8::_cellFieldOther[1*2] = {
+  1.2, 2.3,
+};
 
 pylith::meshio::DataWriterHDF5DataMatMeshHex8::DataWriterHDF5DataMatMeshHex8(void)
 { // constructor
@@ -138,21 +163,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
   numVertices = _numVertices;
-  assert(3 == numVertexFields);
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
   numCells = _numCells;
-  assert(3 == numCellFields);
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterHDF5DataMatMeshHex8::~DataWriterHDF5DataMatMeshHex8(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshHex8.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshHex8.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshHex8.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -59,9 +59,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -70,9 +71,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterHDF5DataMatMeshHex8

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshLine2.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshLine2.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshLine2.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -45,22 +45,25 @@
 const char* pylith::meshio::DataWriterHDF5DataMatMeshLine2::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterHDF5DataMatMeshLine2::_numVertexFields = 3;
 const int pylith::meshio::DataWriterHDF5DataMatMeshLine2::_numVertices = 5;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataMatMeshLine2::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 1 },
+pylith::meshio::DataWriterHDF5DataMatMeshLine2::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 1 },
+  { "stress", topology::FieldBase::TENSOR, 1 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshLine2::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshLine2::_vertexFieldScalar[5*1] = {
   1.1, 2.2, 3.3, 4.4, 5.5
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshLine2::_vertexField1[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshLine2::_vertexFieldVector[5*1] = {
   2.1, 3.2, 4.3, 5.4, 6.5
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshLine2::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshLine2::_vertexFieldTensor[5*1] = {
+  3.1, 4.2, 5.3, 6.4, 7.5
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshLine2::_vertexFieldOther[5*2] = {
   1.2, 2.3, 
   3.4, 4.5,
   5.6, 6.7,
@@ -68,24 +71,27 @@
   9.1, 10.2
 };
 
-const int pylith::meshio::DataWriterHDF5DataMatMeshLine2::_numCellFields = 3;
 const int pylith::meshio::DataWriterHDF5DataMatMeshLine2::_numCells = 1;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataMatMeshLine2::_cellFields[] = {
+pylith::meshio::DataWriterHDF5DataMatMeshLine2::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 1 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 1 },
+  { "stress", topology::FieldBase::TENSOR, 1 },
+  { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshLine2::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshLine2::_cellFieldScalar[1*1] = {
   1.1,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshLine2::_cellField1[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshLine2::_cellFieldVector[1*1] = {
   2.1,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshLine2::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshLine2::_cellFieldTensor[1*1] = {
   1.2,
 };
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshLine2::_cellFieldOther[1*2] = {
+  1.2, 2.3,
+};
 
 pylith::meshio::DataWriterHDF5DataMatMeshLine2::DataWriterHDF5DataMatMeshLine2(void)
 { // constructor
@@ -102,21 +108,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
   numVertices = _numVertices;
-  assert(3 == numVertexFields);
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
   numCells = _numCells;
-  assert(3 == numCellFields);
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterHDF5DataMatMeshLine2::~DataWriterHDF5DataMatMeshLine2(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshLine2.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshLine2.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshLine2.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -59,9 +59,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -70,9 +71,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterHDF5DataMatMeshLine2

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshQuad4.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshQuad4.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshQuad4.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -41,16 +41,19 @@
 const char* pylith::meshio::DataWriterHDF5DataMatMeshQuad4::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterHDF5DataMatMeshQuad4::_numVertexFields = 3;
 const int pylith::meshio::DataWriterHDF5DataMatMeshQuad4::_numVertices = 6;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataMatMeshQuad4::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 2 },
+pylith::meshio::DataWriterHDF5DataMatMeshQuad4::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 2 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshQuad4::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshQuad4::_vertexFieldScalar[6*1] = {
+  2.1, 3.2, 4.3, 5.4, 6.5, 7.6
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshQuad4::_vertexFieldVector[6*2] = {
   1.1, 2.2,
   3.3, 4.4,
   5.5, 6.6,
@@ -58,10 +61,15 @@
   9.9, 10.1,
   11.2, 12.3,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshQuad4::_vertexField1[] = {
-  2.1, 3.2, 4.3, 5.4, 6.5, 7.6
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshQuad4::_vertexFieldTensor[6*3] = {
+  1.1, 1.2, 1.3,
+  2.1, 2.2, 2.3,
+  3.1, 3.2, 3.3,
+  4.1, 4.2, 4.3,
+  5.1, 5.2, 5.3,
+  6.1, 6.2, 6.3,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshQuad4::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshQuad4::_vertexFieldOther[6*2] = {
   1.2, 2.3,
   3.4, 4.5,
   5.6, 6.7,
@@ -70,24 +78,27 @@
   6.5, 5.4
 };
 
-const int pylith::meshio::DataWriterHDF5DataMatMeshQuad4::_numCellFields = 3;
 const int pylith::meshio::DataWriterHDF5DataMatMeshQuad4::_numCells = 1;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataMatMeshQuad4::_cellFields[] = {
+pylith::meshio::DataWriterHDF5DataMatMeshQuad4::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 2 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
+  { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshQuad4::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshQuad4::_cellFieldScalar[1*1] = {
+  2.1,
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshQuad4::_cellFieldVector[1*2] = {
   1.1, 2.2,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshQuad4::_cellField1[] = {
-  2.1,
-};
-const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshQuad4::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshQuad4::_cellFieldTensor[1*3] = {
   1.2, 2.3, 3.4,
 };
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshQuad4::_cellFieldOther[1*2] = {
+  1.2, 2.3,
+};
 
 pylith::meshio::DataWriterHDF5DataMatMeshQuad4::DataWriterHDF5DataMatMeshQuad4(void)
 { // constructor
@@ -102,21 +113,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
-  assert(3 == numVertexFields);
   numVertices = _numVertices;
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
-  assert(3 == numCellFields);
   numCells = _numCells;
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterHDF5DataMatMeshQuad4::~DataWriterHDF5DataMatMeshQuad4(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshQuad4.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshQuad4.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshQuad4.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -57,9 +57,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -68,9 +69,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterHDF5DataMatMeshQuad4

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshTet4.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshTet4.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshTet4.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -45,16 +45,19 @@
 const char* pylith::meshio::DataWriterHDF5DataMatMeshTet4::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterHDF5DataMatMeshTet4::_numVertexFields = 3;
 const int pylith::meshio::DataWriterHDF5DataMatMeshTet4::_numVertices = 11;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataMatMeshTet4::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 3 },
+pylith::meshio::DataWriterHDF5DataMatMeshTet4::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshTet4::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshTet4::_vertexFieldScalar[11*1] = {
+  2.1, 3.2, 4.3, 5.4, 6.5, 7.6, 8.7, 9.8, 10.9, 11.0, 12.1
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshTet4::_vertexFieldVector[11*3] = {
   1.1, 2.2, 3.3,
   4.4, 5.5, 6.6,
   7.7, 8.8, 9.9,
@@ -67,10 +70,20 @@
   28.8, 29.9, 30.0,
   31.1, 32.2, 33.3,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshTet4::_vertexField1[] = {
-  2.1, 3.2, 4.3, 5.4, 6.5, 7.6, 8.7, 9.8, 10.9, 11.0, 12.1
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshTet4::_vertexFieldTensor[11*6] = {
+  1.1, 1.2, 1.3, 1.4, 1.5, 1.6,
+  2.1, 2.2, 2.3, 2.4, 2.5, 2.6,
+  3.1, 3.2, 3.3, 3.4, 3.5, 3.6,
+  4.1, 4.2, 4.3, 4.4, 4.5, 4.6,
+  5.1, 5.2, 5.3, 5.4, 5.5, 5.6,
+  6.1, 6.2, 6.3, 6.4, 6.5, 6.6,
+  7.1, 7.2, 7.3, 7.4, 7.5, 7.6,
+  8.1, 8.2, 8.3, 8.4, 8.5, 8.6,
+  9.1, 9.2, 9.3, 9.4, 9.5, 9.6,
+  10.1, 10.2, 10.3, 10.4, 10.5, 10.6,
+  11.1, 11.2, 11.3, 11.4, 11.5, 11.6,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshTet4::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshTet4::_vertexFieldOther[11*2] = {
   1.2, 2.3,
   3.4, 4.5,
   5.6, 6.7,
@@ -84,26 +97,30 @@
   21.2, 22.3
 };
 
-const int pylith::meshio::DataWriterHDF5DataMatMeshTet4::_numCellFields = 3;
 const int pylith::meshio::DataWriterHDF5DataMatMeshTet4::_numCells = 2;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataMatMeshTet4::_cellFields[] = {
+pylith::meshio::DataWriterHDF5DataMatMeshTet4::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 3 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 6 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
+  { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshTet4::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshTet4::_cellFieldScalar[2*1] = {
+  2.1, 3.2
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshTet4::_cellFieldVector[2*3] = {
   1.1, 2.2, 3.3,
   4.4, 5.5, 6.6,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshTet4::_cellField1[] = {
-  2.1, 3.2
-};
-const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshTet4::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshTet4::_cellFieldTensor[2*6] = {
   1.2, 2.3, 3.4, 4.5, 5.6, 6.7,
   7.8, 8.9, 9.0, 10.1, 11.2, 12.3,
 };
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshTet4::_cellFieldOther[2*2] = {
+  1.2, 2.3,
+  7.8, 8.9,
+};
 
 pylith::meshio::DataWriterHDF5DataMatMeshTet4::DataWriterHDF5DataMatMeshTet4(void)
 { // constructor
@@ -120,21 +137,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
-  assert(3 == numVertexFields);
   numVertices = _numVertices;
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
-  assert(3 == numCellFields);
   numCells = _numCells;
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterHDF5DataMatMeshTet4::~DataWriterHDF5DataMatMeshTet4(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshTet4.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshTet4.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshTet4.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -59,9 +59,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -70,9 +71,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterHDF5DataMatMeshTet4

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshTri3.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshTri3.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshTri3.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -45,16 +45,16 @@
 const char* pylith::meshio::DataWriterHDF5DataMatMeshTri3::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterHDF5DataMatMeshTri3::_numVertexFields = 3;
 const int pylith::meshio::DataWriterHDF5DataMatMeshTri3::_numVertices = 8;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataMatMeshTri3::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 2 },
+pylith::meshio::DataWriterHDF5DataMatMeshTri3::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 2 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshTri3::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshTri3::_vertexFieldVector[8*2] = {
   1.1, 2.2,
   3.3, 4.4,
   5.5, 6.6,
@@ -64,10 +64,20 @@
   13.3, 14.4,
   15.5, 16.6,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshTri3::_vertexField1[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshTri3::_vertexFieldScalar[8*1] = {
   2.1, 3.2, 4.3, 5.4, 6.5, 7.6, 8.7, 9.8
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshTri3::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshTri3::_vertexFieldTensor[8*3] = {
+  1.1, 1.2, 1.3,
+  2.1, 2.2, 3.3,
+  3.1, 3.2, 4.3,
+  4.1, 4.2, 5.3,
+  5.1, 5.2, 6.3,
+  6.1, 6.2, 7.3,
+  7.1, 7.2, 8.3,
+  8.1, 8.2, 9.3,
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshTri3::_vertexFieldOther[8*2] = {
   1.2, 2.3,
   3.4, 4.5,
   5.6, 6.7,
@@ -78,24 +88,27 @@
   15.6, 16.7
 };
 
-const int pylith::meshio::DataWriterHDF5DataMatMeshTri3::_numCellFields = 3;
 const int pylith::meshio::DataWriterHDF5DataMatMeshTri3::_numCells = 1;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataMatMeshTri3::_cellFields[] = {
+pylith::meshio::DataWriterHDF5DataMatMeshTri3::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 2 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
+  { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshTri3::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshTri3::_cellFieldScalar[1*1] = {
+  2.1,
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshTri3::_cellFieldVector[1*2] = {
   1.1, 2.2,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshTri3::_cellField1[] = {
-  2.1,
-};
-const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshTri3::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshTri3::_cellFieldTensor[1*3] = {
   1.2, 2.3, 3.4,
 };
+const PylithScalar pylith::meshio::DataWriterHDF5DataMatMeshTri3::_cellFieldOther[1*2] = {
+  1.2, 2.3,
+};
 
 pylith::meshio::DataWriterHDF5DataMatMeshTri3::DataWriterHDF5DataMatMeshTri3(void)
 { // constructor
@@ -112,21 +125,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
   numVertices = _numVertices;
-  assert(3 == numVertexFields);
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
   numCells = _numCells;
-  assert(3 == numCellFields);
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterHDF5DataMatMeshTri3::~DataWriterHDF5DataMatMeshTri3(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshTri3.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshTri3.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMatMeshTri3.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -59,9 +59,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -70,9 +71,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterHDF5DataMatMeshTri3

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshHex8.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshHex8.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshHex8.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -41,16 +41,21 @@
 const char* pylith::meshio::DataWriterHDF5DataMeshHex8::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterHDF5DataMeshHex8::_numVertexFields = 3;
 const int pylith::meshio::DataWriterHDF5DataMeshHex8::_numVertices = 20;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataMeshHex8::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 3 },
+pylith::meshio::DataWriterHDF5DataMeshHex8::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMeshHex8::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshHex8::_vertexFieldScalar[20*1] = {
+  2.1, 3.2, 4.3, 5.4, 6.5, 7.6, 8.7, 9.8,
+  10.0, 12.1, 11.1, 13.1, 14.1, 15.1, 16.1, 17.1,
+  18.1, 19.1, 20.1, 21.2
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshHex8::_vertexFieldVector[20*3] = {
   1.1, 2.2, 3.3,
   4.4, 5.5, 6.6,
   7.7, 8.8, 9.9,
@@ -72,12 +77,29 @@
   31.8, 32.9, 33.1,
   34.8, 35.9, 36.1,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMeshHex8::_vertexField1[] = {
-  2.1, 3.2, 4.3, 5.4, 6.5, 7.6, 8.7, 9.8,
-  10.0, 12.1, 11.1, 13.1, 14.1, 15.1, 16.1, 17.1,
-  18.1, 19.1, 20.1, 21.2
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshHex8::_vertexFieldTensor[20*6] = {
+  1.1, 1.2, 1.3, 1.4, 1.5, 1.6,
+  2.1, 2.2, 2.3, 2.4, 2.5, 2.6,
+  3.1, 3.2, 3.3, 3.4, 3.5, 3.6,
+  4.1, 4.2, 4.3, 4.4, 4.5, 4.6,
+  5.1, 5.2, 5.3, 5.4, 5.5, 5.6,
+  6.1, 6.2, 6.3, 6.4, 6.5, 6.6,
+  7.1, 7.2, 7.3, 7.4, 7.5, 7.6,
+  8.1, 8.2, 8.3, 8.4, 8.5, 8.6,
+  9.1, 9.2, 9.3, 9.4, 9.5, 9.6,
+  10.1, 10.2, 10.3, 10.4, 10.5, 10.6,
+  11.1, 11.2, 11.3, 11.4, 11.5, 11.6,
+  12.1, 12.2, 12.3, 12.4, 12.5, 12.6,
+  13.1, 13.2, 13.3, 13.4, 13.5, 13.6,
+  14.1, 14.2, 14.3, 14.4, 14.5, 14.6,
+  15.1, 15.2, 15.3, 15.4, 15.5, 15.6,
+  16.1, 16.2, 16.3, 16.4, 16.5, 16.6,
+  17.1, 17.2, 17.3, 17.4, 17.5, 17.6,
+  18.1, 18.2, 18.3, 18.4, 18.5, 18.6,
+  19.1, 19.2, 19.3, 19.4, 19.5, 19.6,
+  20.1, 20.2, 20.3, 20.4, 20.5, 20.6,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMeshHex8::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshHex8::_vertexFieldOther[20*2] = {
   1.2, 2.3,
   3.4, 4.5,
   5.6, 6.7,
@@ -100,28 +122,33 @@
   9.1, 10.1
 };
 
-const int pylith::meshio::DataWriterHDF5DataMeshHex8::_numCellFields = 3;
 const int pylith::meshio::DataWriterHDF5DataMeshHex8::_numCells = 3;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataMeshHex8::_cellFields[] = {
+pylith::meshio::DataWriterHDF5DataMeshHex8::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 3 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 6 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
+  { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMeshHex8::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshHex8::_cellFieldScalar[3*1] = {
+  2.1, 3.2, 4.3
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshHex8::_cellFieldVector[3*3] = {
   1.1, 2.2, 3.3,
   4.4, 5.5, 6.6,
   7.7, 8.8, 9.9
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMeshHex8::_cellField1[] = {
-  2.1, 3.2, 4.3
-};
-const PylithScalar pylith::meshio::DataWriterHDF5DataMeshHex8::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshHex8::_cellFieldTensor[3*6] = {
   1.2, 2.3, 3.4, 4.5, 5.6, 6.7,
   1.1, 2.2, 3.3, 4.4, 5.5, 6.6,
   1.3, 2.4, 3.5, 4.6, 5.7, 6.8
 };
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshHex8::_cellFieldOther[3*2] = {
+  1.2, 2.3,
+  1.1, 2.2,
+  1.3, 2.4,
+};
 
 pylith::meshio::DataWriterHDF5DataMeshHex8::DataWriterHDF5DataMeshHex8(void)
 { // constructor
@@ -136,21 +163,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
   numVertices = _numVertices;
-  assert(3 == numVertexFields);
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
   numCells = _numCells;
-  assert(3 == numCellFields);
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterHDF5DataMeshHex8::~DataWriterHDF5DataMeshHex8(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshHex8.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshHex8.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshHex8.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -57,9 +57,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -68,9 +69,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterHDF5DataMeshHex8

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshLine2.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshLine2.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshLine2.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -41,47 +41,55 @@
 const char* pylith::meshio::DataWriterHDF5DataMeshLine2::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterHDF5DataMeshLine2::_numVertexFields = 3;
 const int pylith::meshio::DataWriterHDF5DataMeshLine2::_numVertices = 5;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataMeshLine2::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 1 },
+pylith::meshio::DataWriterHDF5DataMeshLine2::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 1 },
+  { "stress", topology::FieldBase::TENSOR, 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::_vertexFieldScalar[5*1] = {
+  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::_vertexFieldVector[5*1] = {
+  2.1, 3.2, 4.3, 5.4, 6.5,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMeshLine2::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshLine2::_vertexFieldTensor[5*1] = {
+  1.2, 1.3, 1.4, 1.5, 1.6,
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshLine2::_vertexFieldOther[5*2] = {
   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;
 const int pylith::meshio::DataWriterHDF5DataMeshLine2::_numCells = 3;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataMeshLine2::_cellFields[] = {
+pylith::meshio::DataWriterHDF5DataMeshLine2::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 1 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 1 },
+  { "stress", topology::FieldBase::TENSOR, 1 },
+  { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMeshLine2::_cellField0[] = {
-  1.1, 2.2, 3.3
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshLine2::_cellFieldScalar[3*1] = {
+  1.1, 2.2, 3.3,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMeshLine2::_cellField1[] = {
-  2.1, 2.2, 2.3
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshLine2::_cellFieldVector[3*1] = {
+  2.1, 2.2, 2.3,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMeshLine2::_cellField2[] = {
-  1.2, 2.3, 3.4
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshLine2::_cellFieldTensor[3*1] = {
+  1.2, 2.3, 3.4,
 };
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshLine2::_cellFieldOther[3*2] = {
+  1.2, 2.3,
+  3.4, 2.2,
+  3.3, 4.4,
+};
 
 pylith::meshio::DataWriterHDF5DataMeshLine2::DataWriterHDF5DataMeshLine2(void)
 { // constructor
@@ -96,21 +104,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
   numVertices = _numVertices;
-  assert(3 == numVertexFields);
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
   numCells = _numCells;
-  assert(3 == numCellFields);
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterHDF5DataMeshLine2::~DataWriterHDF5DataMeshLine2(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshLine2.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshLine2.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshLine2.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -57,9 +57,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -68,9 +69,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterHDF5DataMeshLine2

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshQuad4.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshQuad4.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshQuad4.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -37,16 +37,19 @@
 const char* pylith::meshio::DataWriterHDF5DataMeshQuad4::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterHDF5DataMeshQuad4::_numVertexFields = 3;
 const int pylith::meshio::DataWriterHDF5DataMeshQuad4::_numVertices = 6;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataMeshQuad4::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 2 },
+pylith::meshio::DataWriterHDF5DataMeshQuad4::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 2 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMeshQuad4::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshQuad4::_vertexFieldScalar[6*1] = {
+  2.1, 3.2, 4.3, 5.4, 6.5, 7.6
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshQuad4::_vertexFieldVector[6*2] = {
   1.1, 2.2,
   3.3, 4.4,
   5.5, 6.6,
@@ -54,10 +57,15 @@
   9.9, 10.1,
   11.2, 12.3,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMeshQuad4::_vertexField1[] = {
-  2.1, 3.2, 4.3, 5.4, 6.5, 7.6
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshQuad4::_vertexFieldTensor[6*3] = {
+  1.1, 1.2, 1.3,
+  2.1, 2.2, 3.3,
+  3.1, 3.2, 4.3,
+  4.1, 4.2, 5.3,
+  5.1, 5.2, 6.3,
+  6.1, 6.2, 7.3,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMeshQuad4::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshQuad4::_vertexFieldOther[6*2] = {
   1.2, 2.3,
   3.4, 4.5,
   5.6, 6.7,
@@ -66,26 +74,30 @@
   6.5, 5.4
 };
 
-const int pylith::meshio::DataWriterHDF5DataMeshQuad4::_numCellFields = 3;
 const int pylith::meshio::DataWriterHDF5DataMeshQuad4::_numCells = 2;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataMeshQuad4::_cellFields[] = {
+pylith::meshio::DataWriterHDF5DataMeshQuad4::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 2 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
+  { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMeshQuad4::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshQuad4::_cellFieldScalar[2*1] = {
+  2.1, 2.2,
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshQuad4::_cellFieldVector[2*2] = {
   1.1, 2.2,
   3.3, 4.4
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMeshQuad4::_cellField1[] = {
-  2.1, 2.2,
-};
-const PylithScalar pylith::meshio::DataWriterHDF5DataMeshQuad4::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshQuad4::_cellFieldTensor[2*3] = {
   1.2, 2.3, 3.4,
   4.5, 5.6, 6.7,
 };
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshQuad4::_cellFieldOther[2*2] = {
+  1.2, 2.3,
+  4.5, 5.6,
+};
 
 pylith::meshio::DataWriterHDF5DataMeshQuad4::DataWriterHDF5DataMeshQuad4(void)
 { // constructor
@@ -98,21 +110,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
-  assert(3 == numVertexFields);
   numVertices = _numVertices;
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
-  assert(3 == numCellFields);
   numCells = _numCells;
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterHDF5DataMeshQuad4::~DataWriterHDF5DataMeshQuad4(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshQuad4.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshQuad4.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshQuad4.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -55,9 +55,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -66,9 +67,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterHDF5DataMeshQuad4

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshTet4.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshTet4.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshTet4.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -41,16 +41,19 @@
 const char* pylith::meshio::DataWriterHDF5DataMeshTet4::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterHDF5DataMeshTet4::_numVertexFields = 3;
 const int pylith::meshio::DataWriterHDF5DataMeshTet4::_numVertices = 11;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataMeshTet4::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 3 },
+pylith::meshio::DataWriterHDF5DataMeshTet4::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMeshTet4::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshTet4::_vertexFieldScalar[11*1] = {
+  2.1, 3.2, 4.3, 5.4, 6.5, 7.6, 8.7, 9.8, 10.9, 11.0, 12.1,
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshTet4::_vertexFieldVector[11*3] = {
   1.1, 2.2, 3.3,
   4.4, 5.5, 6.6,
   7.7, 8.8, 9.9,
@@ -63,10 +66,20 @@
   28.8, 29.9, 30.0,
   31.1, 32.2, 33.3,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMeshTet4::_vertexField1[] = {
-  2.1, 3.2, 4.3, 5.4, 6.5, 7.6, 8.7, 9.8, 10.9, 11.0, 12.1,
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshTet4::_vertexFieldTensor[11*6] = {
+  1.1, 1.2, 1.3, 1.4, 1.5, 1.6,
+  2.1, 2.2, 2.3, 2.4, 2.5, 2.6,
+  3.1, 3.2, 3.3, 3.4, 3.5, 3.6,
+  4.1, 4.2, 4.3, 4.4, 4.5, 4.6,
+  5.1, 5.2, 5.3, 5.4, 5.5, 5.6,
+  6.1, 6.2, 6.3, 6.4, 6.5, 6.6,
+  7.1, 7.2, 7.3, 7.4, 7.5, 7.6,
+  8.1, 8.2, 8.3, 8.4, 8.5, 8.6,
+  9.1, 9.2, 9.3, 9.4, 9.5, 9.6,
+  10.1, 10.2, 10.3, 10.4, 10.5, 10.6,
+  11.1, 11.2, 11.3, 11.4, 11.5, 11.6,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMeshTet4::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshTet4::_vertexFieldOther[11*2] = {
   1.2, 2.3,
   3.4, 4.5,
   5.6, 6.7,
@@ -80,28 +93,33 @@
   21.2, 22.3,
 };
 
-const int pylith::meshio::DataWriterHDF5DataMeshTet4::_numCellFields = 3;
 const int pylith::meshio::DataWriterHDF5DataMeshTet4::_numCells = 3;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataMeshTet4::_cellFields[] = {
+pylith::meshio::DataWriterHDF5DataMeshTet4::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 3 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 6 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
+  { "other", topology::FieldBase::OTHER, 4 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMeshTet4::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshTet4::_cellFieldScalar[3*1] = {
+  2.1, 3.2, 4.3
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshTet4::_cellFieldVector[3*3] = {
   1.1, 2.2, 3.3,
   4.4, 5.5, 6.6,
   7.7, 8.8, 9.9
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMeshTet4::_cellField1[] = {
-  2.1, 3.2, 4.3
-};
-const PylithScalar pylith::meshio::DataWriterHDF5DataMeshTet4::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshTet4::_cellFieldTensor[3*6] = {
   1.2, 2.3, 3.4, 4.5, 5.6, 6.7,
   7.8, 8.9, 9.0, 10.1, 11.2, 12.3,
   13.4, 14.5, 15.6, 16.7, 17.8, 18.9
 };
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshTet4::_cellFieldOther[3*4] = {
+  1.2, 2.3, 3.4, 4.5,
+  7.8, 8.9, 9.0, 10.1,
+  13.4, 14.5, 15.6, 16.7,
+};
 
 pylith::meshio::DataWriterHDF5DataMeshTet4::DataWriterHDF5DataMeshTet4(void)
 { // constructor
@@ -116,21 +134,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
-  assert(3 == numVertexFields);
   numVertices = _numVertices;
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
-  assert(3 == numCellFields);
   numCells = _numCells;
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterHDF5DataMeshTet4::~DataWriterHDF5DataMeshTet4(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshTet4.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshTet4.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshTet4.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -57,9 +57,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -68,9 +69,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterHDF5DataMeshTet4

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshTri3.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshTri3.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshTri3.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -41,59 +41,76 @@
 const char* pylith::meshio::DataWriterHDF5DataMeshTri3::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterHDF5DataMeshTri3::_numVertexFields = 3;
 const int pylith::meshio::DataWriterHDF5DataMeshTri3::_numVertices = 8;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataMeshTri3::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 2 },
+pylith::meshio::DataWriterHDF5DataMeshTri3::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 2 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMeshTri3::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshTri3::_vertexFieldScalar[8*1] = {
+  2.1, 3.2, 4.3, 5.4, 6.5, 7.6, 8.7, 9.8
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshTri3::_vertexFieldVector[8*2] = {
   1.1, 2.2,
   3.3, 4.4,
   5.5, 6.6,
   7.7, 8.8,
   9.9, 10.0,
   11.1, 12.2,
-  13.3, 14.4
+  13.3, 14.4,
+  23.3, 24.4,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMeshTri3::_vertexField1[] = {
-  2.1, 3.2, 4.3, 5.4, 6.5, 7.6, 8.7, 9.8
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshTri3::_vertexFieldTensor[8*3] = {
+  1.1, 1.2, 1.3,
+  2.1, 2.2, 2.3,
+  3.1, 3.2, 3.3,
+  4.1, 4.2, 4.3,
+  5.1, 5.2, 5.3,
+  6.1, 6.2, 6.3,
+  7.1, 7.2, 7.3,
+  8.1, 8.2, 8.3,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMeshTri3::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshTri3::_vertexFieldOther[8*2] = {
   1.2, 2.3,
   3.4, 4.5,
   5.6, 6.7,
   7.8, 8.9,
   9.0, 10.1,
   11.2, 12.3,
-  13.4, 14.5
+  13.4, 14.5,
+  15.4, 16.5,
 };
 
-const int pylith::meshio::DataWriterHDF5DataMeshTri3::_numCellFields = 3;
 const int pylith::meshio::DataWriterHDF5DataMeshTri3::_numCells = 3;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataMeshTri3::_cellFields[] = {
+pylith::meshio::DataWriterHDF5DataMeshTri3::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 2 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
+  { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMeshTri3::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshTri3::_cellFieldScalar[3*1] = {
+  2.1, 2.2, 2.3
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshTri3::_cellFieldVector[3*2] = {
   1.1, 2.2,
   3.3, 4.4,
   5.5, 6.6,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataMeshTri3::_cellField1[] = {
-  2.1, 2.2, 2.3
-};
-const PylithScalar pylith::meshio::DataWriterHDF5DataMeshTri3::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshTri3::_cellFieldTensor[3*3] = {
   1.2, 2.3, 3.4,
   4.5, 5.6, 6.7,
   7.8, 8.9, 9.0
 };
+const PylithScalar pylith::meshio::DataWriterHDF5DataMeshTri3::_cellFieldOther[3*2] = {
+  1.2, 2.3,
+  4.5, 5.6,
+  7.8, 8.9,
+};
 
 pylith::meshio::DataWriterHDF5DataMeshTri3::DataWriterHDF5DataMeshTri3(void)
 { // constructor
@@ -108,21 +125,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
   numVertices = _numVertices;
-  assert(3 == numVertexFields);
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
   numCells = _numCells;
-  assert(3 == numCellFields);
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterHDF5DataMeshTri3::~DataWriterHDF5DataMeshTri3(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshTri3.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshTri3.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataMeshTri3.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -57,9 +57,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -68,9 +69,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterHDF5DataMeshTri3

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshHex8.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshHex8.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshHex8.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -43,16 +43,19 @@
 const char* pylith::meshio::DataWriterHDF5DataSubMeshHex8::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterHDF5DataSubMeshHex8::_numVertexFields = 3;
 const int pylith::meshio::DataWriterHDF5DataSubMeshHex8::_numVertices = 12;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataSubMeshHex8::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 3 },
+pylith::meshio::DataWriterHDF5DataSubMeshHex8::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshHex8::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshHex8::_vertexFieldScalar[12*1] = {
+  2.1, 3.2, 4.3, 5.4, 6.5, 7.6, 8.7, 9.8, 10.9, 11.8, 12.7, 13.6
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshHex8::_vertexFieldVector[12*3] = {
   1.1, 2.2, 3.3,
   4.4, 5.5, 6.6,
   7.7, 8.8, 9.9,
@@ -66,10 +69,21 @@
   7.9, 8.1, 9.2,
   10.3, 11.4, 12.5,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshHex8::_vertexField1[] = {
-  2.1, 3.2, 4.3, 5.4, 6.5, 7.6, 8.7, 9.8, 10.9, 11.8, 12.7, 13.6
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshHex8::_vertexFieldTensor[12*6] = {
+  1.1, 1.2, 1.3, 1.4, 1.5, 1.6,
+  2.1, 2.2, 2.3, 2.4, 2.5, 2.6,
+  3.1, 3.2, 3.3, 3.4, 3.5, 3.6,
+  4.1, 4.2, 4.3, 4.4, 4.5, 4.6,
+  5.1, 5.2, 5.3, 5.4, 5.5, 5.6,
+  6.1, 6.2, 6.3, 6.4, 6.5, 6.6,
+  7.1, 7.2, 7.3, 7.4, 7.5, 7.6,
+  8.1, 8.2, 8.3, 8.4, 8.5, 8.6,
+  9.1, 9.2, 9.3, 9.4, 9.5, 9.6,
+  10.1, 10.2, 10.3, 10.4, 10.5, 10.6,
+  11.1, 11.2, 11.3, 11.4, 11.5, 11.6,
+  12.1, 12.2, 12.3, 12.4, 12.5, 12.6,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshHex8::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshHex8::_vertexFieldOther[12*2] = {
   1.2, 2.3,
   3.4, 4.5,
   5.6, 6.7,
@@ -84,26 +98,30 @@
   11.5, 11.6,
 };
 
-const int pylith::meshio::DataWriterHDF5DataSubMeshHex8::_numCellFields = 3;
 const int pylith::meshio::DataWriterHDF5DataSubMeshHex8::_numCells = 2;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataSubMeshHex8::_cellFields[] = {
+pylith::meshio::DataWriterHDF5DataSubMeshHex8::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 3 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 6 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
+  { "other", topology::FieldBase::OTHER, 3 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshHex8::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshHex8::_cellFieldScalar[2*1] = {
+  2.1, 3.2,
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshHex8::_cellFieldVector[2*3] = {
   1.1, 2.2, 3.3,
-  4.4, 5.5, 6.6
+  4.4, 5.5, 6.6,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshHex8::_cellField1[] = {
-  2.1, 3.2,
-};
-const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshHex8::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshHex8::_cellFieldTensor[2*6] = {
   1.2, 2.3, 3.4, 4.5, 5.6, 6.7,
-  7.8, 8.9, 9.0, 10.1, 11.2, 12.3
+  7.8, 8.9, 9.0, 10.1, 11.2, 12.3,
 };
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshHex8::_cellFieldOther[2*3] = {
+  1.2, 2.3, 3.4,
+  7.8, 8.9, 9.0,
+};
 
 pylith::meshio::DataWriterHDF5DataSubMeshHex8::DataWriterHDF5DataSubMeshHex8(void)
 { // constructor
@@ -119,21 +137,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
   numVertices = _numVertices;
-  assert(3 == numVertexFields);
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
   numCells = _numCells;
-  assert(3 == numCellFields);
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterHDF5DataSubMeshHex8::~DataWriterHDF5DataSubMeshHex8(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshHex8.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshHex8.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshHex8.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -58,9 +58,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -69,9 +70,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterHDF5DataSubMeshHex8

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshLine2.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshLine2.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshLine2.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -44,26 +44,25 @@
 const char* pylith::meshio::DataWriterHDF5DataSubMeshLine2::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterHDF5DataSubMeshLine2::_numVertexFields = 3;
 const int pylith::meshio::DataWriterHDF5DataSubMeshLine2::_numVertices = 5;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataSubMeshLine2::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 2 },
+pylith::meshio::DataWriterHDF5DataSubMeshLine2::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 1 },
+  { "stress", topology::FieldBase::TENSOR, 1 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshLine2::_vertexField0[] = {
-  1.1, 2.2,
-  3.3, 4.4,
-  5.5, 6.6,
-  7.7, 8.8,
-  9.9, 10.0,
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshLine2::_vertexFieldScalar[5*1] = {
+  1.1,  3.3,  5.5,  7.7,  9.9,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshLine2::_vertexField1[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshLine2::_vertexFieldVector[5*1] = {
   2.1, 3.2, 4.3, 5.4, 6.5,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshLine2::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshLine2::_vertexFieldTensor[5*1] = {
+  3.1, 4.2, 5.3, 6.4, 7.5,
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshLine2::_vertexFieldOther[5*2] = {
   1.2, 2.3,
   3.4, 4.5,
   5.6, 6.7,
@@ -71,22 +70,25 @@
   9.0, 10.1,
 };
 
-const int pylith::meshio::DataWriterHDF5DataSubMeshLine2::_numCellFields = 3;
 const int pylith::meshio::DataWriterHDF5DataSubMeshLine2::_numCells = 1;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataSubMeshLine2::_cellFields[] = {
-  { "traction", topology::FieldBase::VECTOR, 2 },
+pylith::meshio::DataWriterHDF5DataSubMeshLine2::_cellFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 3 },
+  { "traction", topology::FieldBase::VECTOR, 1 },
+  { "stress", topology::FieldBase::TENSOR, 1 },
+  { "other", topology::FieldBase::OTHER, 3 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshLine2::_cellField0[] = {
-  1.1, 2.2,
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshLine2::_cellFieldScalar[1*1] = {
+  1.1,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshLine2::_cellField1[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshLine2::_cellFieldVector[1*1] = {
   2.1,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshLine2::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshLine2::_cellFieldTensor[1*1] = {
+  3.1,
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshLine2::_cellFieldOther[1*3] = {
   1.2, 2.3, 3.4,
 };
 
@@ -104,21 +106,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
   numVertices = _numVertices;
-  assert(3 == numVertexFields);
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
   numCells = _numCells;
-  assert(3 == numCellFields);
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterHDF5DataSubMeshLine2::~DataWriterHDF5DataSubMeshLine2(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshLine2.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshLine2.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshLine2.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -58,9 +58,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -69,9 +70,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterHDF5DataSubMeshLine2

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshQuad4.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshQuad4.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshQuad4.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -40,16 +40,19 @@
 const char* pylith::meshio::DataWriterHDF5DataSubMeshQuad4::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterHDF5DataSubMeshQuad4::_numVertexFields = 3;
 const int pylith::meshio::DataWriterHDF5DataSubMeshQuad4::_numVertices = 6;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataSubMeshQuad4::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 2 },
+pylith::meshio::DataWriterHDF5DataSubMeshQuad4::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 2 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshQuad4::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshQuad4::_vertexFieldScalar[6*1] = {
+  2.1, 3.2, 4.3, 5.4, 6.5, 7.6,
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshQuad4::_vertexFieldVector[6*2] = {
   1.1, 2.2,
   3.3, 4.4,
   5.5, 6.6,
@@ -57,10 +60,15 @@
   9.9, 10.0,
   11.1, 12.2,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshQuad4::_vertexField1[] = {
-  2.1, 3.2, 4.3, 5.4, 6.5, 7.6,
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshQuad4::_vertexFieldTensor[6*3] = {
+  1.1, 1.2, 1.3,
+  2.1, 2.2, 2.3,
+  3.1, 3.2, 3.3,
+  4.1, 4.2, 4.3,
+  5.1, 5.2, 5.3,
+  6.1, 6.2, 6.3,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshQuad4::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshQuad4::_vertexFieldOther[6*3] = {
   1.2, 2.3,
   3.4, 4.5,
   5.6, 6.7,
@@ -69,26 +77,30 @@
   11.3, 12.4,
 };
 
-const int pylith::meshio::DataWriterHDF5DataSubMeshQuad4::_numCellFields = 3;
 const int pylith::meshio::DataWriterHDF5DataSubMeshQuad4::_numCells = 2;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataSubMeshQuad4::_cellFields[] = {
+pylith::meshio::DataWriterHDF5DataSubMeshQuad4::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 2 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
+  { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshQuad4::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshQuad4::_cellFieldScalar[2*1] = {
+  2.1, 3.2,
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshQuad4::_cellFieldVector[2*2] = {
   1.1, 2.2,
   3.3, 4.4,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshQuad4::_cellField1[] = {
-  2.1, 3.2,
-};
-const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshQuad4::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshQuad4::_cellFieldTensor[2*3] = {
   1.2, 2.3, 3.4,
   4.5, 5.6, 6.7,
 };
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshQuad4::_cellFieldOther[2*2] = {
+  1.2, 2.3,
+  4.5, 5.6,
+};
 
 pylith::meshio::DataWriterHDF5DataSubMeshQuad4::DataWriterHDF5DataSubMeshQuad4(void)
 { // constructor
@@ -102,21 +114,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
-  assert(3 == numVertexFields);
   numVertices = _numVertices;
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
-  assert(3 == numCellFields);
   numCells = _numCells;
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterHDF5DataSubMeshQuad4::~DataWriterHDF5DataSubMeshQuad4(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshQuad4.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshQuad4.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshQuad4.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -56,9 +56,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -67,9 +68,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterHDF5DataSubMeshQuad4

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshTet4.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshTet4.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshTet4.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -43,26 +43,33 @@
 const char* pylith::meshio::DataWriterHDF5DataSubMeshTet4::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterHDF5DataSubMeshTet4::_numVertexFields = 3;
 const int pylith::meshio::DataWriterHDF5DataSubMeshTet4::_numVertices = 5;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataSubMeshTet4::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 3 },
+pylith::meshio::DataWriterHDF5DataSubMeshTet4::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshTet4::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshTet4::_vertexFieldScalar[5*1] = {
+  2.1, 3.2, 4.3, 5.4, 6.5,
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshTet4::_vertexFieldVector[5*3] = {
   1.1, 2.2, 3.3,
   4.4, 5.5, 6.6,
   7.7, 8.8, 9.9,
   10.0, 11.1, 12.2,
   13.3, 14.4, 15.5,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshTet4::_vertexField1[] = {
-  2.1, 3.2, 4.3, 5.4, 6.5,
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshTet4::_vertexFieldTensor[5*6] = {
+  1.1, 1.2, 1.3, 1.4, 1.5, 1.6,
+  2.1, 2.2, 2.3, 2.4, 2.5, 2.6,
+  3.1, 3.2, 3.3, 3.4, 3.5, 3.6,
+  4.1, 4.2, 4.3, 4.4, 4.5, 4.6,
+  5.1, 5.2, 5.3, 5.4, 5.5, 5.6,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshTet4::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshTet4::_vertexFieldOther[5*2] = {
   1.2, 2.3,
   3.4, 4.5,
   5.6, 6.7,
@@ -70,26 +77,30 @@
   9.0, 10.1,
 };
 
-const int pylith::meshio::DataWriterHDF5DataSubMeshTet4::_numCellFields = 3;
 const int pylith::meshio::DataWriterHDF5DataSubMeshTet4::_numCells = 2;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataSubMeshTet4::_cellFields[] = {
+pylith::meshio::DataWriterHDF5DataSubMeshTet4::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 3 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 6 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
+  { "other", topology::FieldBase::OTHER, 4 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshTet4::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshTet4::_cellFieldScalar[2*1] = {
+  2.1, 3.2
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshTet4::_cellFieldVector[2*3] = {
   1.1, 2.2, 3.3,
   4.4, 5.5, 6.6,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshTet4::_cellField1[] = {
-  2.1, 3.2
-};
-const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshTet4::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshTet4::_cellFieldTensor[2*6] = {
   1.2, 2.3, 3.4, 4.5, 5.6, 6.7,
   7.8, 8.9, 9.0, 10.1, 11.2, 12.3,
 };
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshTet4::_cellFieldOther[2*4] = {
+  1.2, 2.3, 3.4, 4.5,
+  7.8, 8.9, 9.0, 10.1,
+};
 
 pylith::meshio::DataWriterHDF5DataSubMeshTet4::DataWriterHDF5DataSubMeshTet4(void)
 { // constructor
@@ -105,21 +116,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
-  assert(3 == numVertexFields);
   numVertices = _numVertices;
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
-  assert(3 == numCellFields);
   numCells = _numCells;
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterHDF5DataSubMeshTet4::~DataWriterHDF5DataSubMeshTet4(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshTet4.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshTet4.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshTet4.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -58,9 +58,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -69,9 +70,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterHDF5DataSubMeshTet4

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshTri3.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshTri3.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshTri3.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -44,16 +44,19 @@
 const char* pylith::meshio::DataWriterHDF5DataSubMeshTri3::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterHDF5DataSubMeshTri3::_numVertexFields = 3;
 const int pylith::meshio::DataWriterHDF5DataSubMeshTri3::_numVertices = 8;
 
 const pylith::meshio::DataWriterData::FieldStruct
 pylith::meshio::DataWriterHDF5DataSubMeshTri3::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 2 },
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 2 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshTri3::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshTri3::_vertexFieldScalar[8*1] = {
+  2.1, 3.2, 4.3, 5.4, 6.5, 7.6, 8.7, 9.8,
+};
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshTri3::_vertexFieldVector[8*2] = {
   1.1, 2.2,
   3.3, 4.4,
   5.5, 6.6,
@@ -63,10 +66,17 @@
   13.3, 14.4,
   15.5, 16.6,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshTri3::_vertexField1[] = {
-  2.1, 3.2, 4.3, 5.4, 6.5, 7.6, 8.7, 9.8,
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshTri3::_vertexFieldTensor[8*3] = {
+  1.1, 1.2, 1.3,
+  2.1, 2.2, 2.3,
+  3.1, 3.2, 3.3,
+  4.1, 4.2, 4.3,
+  5.1, 5.2, 5.3,
+  6.1, 6.2, 6.3,
+  7.1, 7.2, 7.3,
+  8.1, 8.2, 8.3,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshTri3::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshTri3::_vertexFieldOther[8*2] = {
   1.2, 2.3,
   3.4, 4.5,
   5.6, 6.7,
@@ -77,24 +87,27 @@
   15.6, 16.7,
 };
 
-const int pylith::meshio::DataWriterHDF5DataSubMeshTri3::_numCellFields = 3;
 const int pylith::meshio::DataWriterHDF5DataSubMeshTri3::_numCells = 1;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterHDF5DataSubMeshTri3::_cellFields[] = {
+pylith::meshio::DataWriterHDF5DataSubMeshTri3::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 2 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
+  { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshTri3::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshTri3::_cellFieldVector[1*2] = {
   1.1, 2.2,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshTri3::_cellField1[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshTri3::_cellFieldScalar[1*1] = {
   2.1,
 };
-const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshTri3::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshTri3::_cellFieldTensor[1*3] = {
   1.2, 2.3, 3.4,
 };
+const PylithScalar pylith::meshio::DataWriterHDF5DataSubMeshTri3::_cellFieldOther[1*2] = {
+  1.2, 2.3,
+};
 
 pylith::meshio::DataWriterHDF5DataSubMeshTri3::DataWriterHDF5DataSubMeshTri3(void)
 { // constructor
@@ -110,21 +123,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
   numVertices = _numVertices;
-  assert(3 == numVertexFields);
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
   numCells = _numCells;
-  assert(3 == numCellFields);
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterHDF5DataSubMeshTri3::~DataWriterHDF5DataSubMeshTri3(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshTri3.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshTri3.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterHDF5DataSubMeshTri3.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -58,9 +58,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -69,9 +70,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterHDF5DataSubMeshTri3

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshHex8.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshHex8.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshHex8.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -44,16 +44,19 @@
 const char* pylith::meshio::DataWriterVTKDataBCMeshHex8::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterVTKDataBCMeshHex8::_numVertexFields = 3;
 const int pylith::meshio::DataWriterVTKDataBCMeshHex8::_numVertices = 8;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataBCMeshHex8::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 3 },
+pylith::meshio::DataWriterVTKDataBCMeshHex8::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshHex8::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshHex8::_vertexFieldScalar[8*1] = {
+  2.1, 3.2, 4.3, 5.4, 6.5, 7.6, 8.7, 9.8,
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshHex8::_vertexFieldVector[8*3] = {
   1.1, 2.2, 3.3,
   4.4, 5.5, 6.6,
   7.7, 8.8, 9.9,
@@ -63,10 +66,17 @@
   7.8, 8.9, 9.0,
   10.2, 11.3, 12.4,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshHex8::_vertexField1[] = {
-  2.1, 3.2, 4.3, 5.4, 6.5, 7.6, 8.7, 9.8,
+const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshHex8::_vertexFieldTensor[8*6] = {
+  1.1, 1.2, 1.3, 1.4, 1.5, 1.6,
+  2.1, 2.2, 2.3, 2.4, 2.5, 2.6,
+  3.1, 3.2, 3.3, 3.4, 3.5, 3.6,
+  4.1, 4.2, 4.3, 4.4, 4.5, 4.6,
+  5.1, 5.2, 5.3, 5.4, 5.5, 5.6,
+  6.1, 6.2, 6.3, 6.4, 6.5, 6.6,
+  7.1, 7.2, 7.3, 7.4, 7.5, 7.6,
+  8.1, 8.2, 8.3, 8.4, 8.5, 8.6,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshHex8::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshHex8::_vertexFieldOther[8*2] = {
   1.2, 2.3,
   3.4, 4.5,
   5.6, 6.7,
@@ -77,26 +87,30 @@
   7.9, 8.0,
 };
 
-const int pylith::meshio::DataWriterVTKDataBCMeshHex8::_numCellFields = 3;
 const int pylith::meshio::DataWriterVTKDataBCMeshHex8::_numCells = 2;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataBCMeshHex8::_cellFields[] = {
+pylith::meshio::DataWriterVTKDataBCMeshHex8::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 3 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 6 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
+  { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshHex8::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshHex8::_cellFieldScalar[2*1] = {
+  2.1, 3.2,
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshHex8::_cellFieldVector[2*3] = {
   1.1, 2.2, 3.3,
-  4.4, 5.5, 6.6
+  4.4, 5.5, 6.6,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshHex8::_cellField1[] = {
-  2.1, 3.2,
-};
-const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshHex8::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshHex8::_cellFieldTensor[2*6] = {
   1.2, 2.3, 3.4, 4.5, 5.6, 6.7,
-  7.8, 8.9, 9.0, 10.1, 11.2, 12.3
+  7.8, 8.9, 9.0, 10.1, 11.2, 12.3,
 };
+const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshHex8::_cellFieldOther[2*2] = {
+  1.1, 2.2,
+  5.5, 6.6,
+};
 
 pylith::meshio::DataWriterVTKDataBCMeshHex8::DataWriterVTKDataBCMeshHex8(void)
 { // constructor
@@ -112,21 +126,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
   numVertices = _numVertices;
-  assert(3 == numVertexFields);
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
   numCells = _numCells;
-  assert(3 == numCellFields);
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterVTKDataBCMeshHex8::~DataWriterVTKDataBCMeshHex8(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshHex8.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshHex8.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshHex8.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -58,9 +58,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -69,9 +70,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterVTKDataBCMeshHex8

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshQuad4.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshQuad4.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshQuad4.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -40,46 +40,55 @@
 const char* pylith::meshio::DataWriterVTKDataBCMeshQuad4::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterVTKDataBCMeshQuad4::_numVertexFields = 3;
 const int pylith::meshio::DataWriterVTKDataBCMeshQuad4::_numVertices = 3;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataBCMeshQuad4::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 2 },
+pylith::meshio::DataWriterVTKDataBCMeshQuad4::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 2 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshQuad4::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshQuad4::_vertexFieldScalar[3*1] = {
+  2.1, 3.2, 4.3,
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshQuad4::_vertexFieldVector[3*2] = {
   1.1, 2.2,
   3.3, 4.4,
   5.5, 6.6,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshQuad4::_vertexField1[] = {
-  2.1, 3.2, 4.3,
+const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshQuad4::_vertexFieldTensor[3*3] = {
+  1.1, 1.2, 1.3,
+  2.1, 2.2, 2.3,
+  3.1, 3.2, 3.3,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshQuad4::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshQuad4::_vertexFieldOther[3*2] = {
   1.2, 2.3,
   3.4, 4.5,
   5.6, 6.7,
 };
 
-const int pylith::meshio::DataWriterVTKDataBCMeshQuad4::_numCellFields = 3;
 const int pylith::meshio::DataWriterVTKDataBCMeshQuad4::_numCells = 2;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataBCMeshQuad4::_cellFields[] = {
+pylith::meshio::DataWriterVTKDataBCMeshQuad4::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 2 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
+  { "other", topology::FieldBase::OTHER, 3 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshQuad4::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshQuad4::_cellFieldScalar[2*1] = {
+  2.1, 3.2,
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshQuad4::_cellFieldVector[2*2] = {
   1.1, 2.2,
   3.3, 4.4,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshQuad4::_cellField1[] = {
-  2.1, 3.2,
+const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshQuad4::_cellFieldTensor[2*3] = {
+  1.2, 1.3, 1.4,
+  2.2, 2.3, 2.4,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshQuad4::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshQuad4::_cellFieldOther[2*3] = {
   1.2, 2.3, 3.4,
   4.5, 5.6, 6.7,
 };
@@ -96,21 +105,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
-  assert(3 == numVertexFields);
   numVertices = _numVertices;
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
-  assert(3 == numCellFields);
   numCells = _numCells;
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterVTKDataBCMeshQuad4::~DataWriterVTKDataBCMeshQuad4(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshQuad4.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshQuad4.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshQuad4.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -56,9 +56,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -67,9 +68,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterVTKDataBCMeshQuad4

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshTet4.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshTet4.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshTet4.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -44,16 +44,19 @@
 const char* pylith::meshio::DataWriterVTKDataBCMeshTet4::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterVTKDataBCMeshTet4::_numVertexFields = 3;
 const int pylith::meshio::DataWriterVTKDataBCMeshTet4::_numVertices = 6;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataBCMeshTet4::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 3 },
+pylith::meshio::DataWriterVTKDataBCMeshTet4::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshTet4::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshTet4::_vertexFieldScalar[6*1] = {
+  2.1, 3.2, 4.3, 5.4, 6.5, 7.6,
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshTet4::_vertexFieldVector[6*3] = {
   1.1, 2.2, 3.3,
   4.4, 5.5, 6.6,
   7.7, 8.8, 9.9,
@@ -61,10 +64,15 @@
   13.3, 14.4, 15.5,
   16.6, 17.7, 18.8,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshTet4::_vertexField1[] = {
-  2.1, 3.2, 4.3, 5.4, 6.5, 7.6,
+const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshTet4::_vertexFieldTensor[6*6] = {
+  1.1, 1.2, 1.3, 1.4, 1.5, 1.6,
+  2.1, 2.2, 2.3, 2.4, 2.5, 2.6,
+  3.1, 3.2, 3.3, 3.4, 3.5, 3.6,
+  4.1, 4.2, 4.3, 4.4, 4.5, 4.6,
+  5.1, 5.2, 5.3, 5.4, 5.5, 5.6,
+  6.1, 6.2, 6.3, 6.4, 6.5, 6.6,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshTet4::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshTet4::_vertexFieldOther[6*2] = {
   1.2, 2.3,
   3.4, 4.5,
   5.6, 6.7,
@@ -73,26 +81,30 @@
   11.2, 12.3,
 };
 
-const int pylith::meshio::DataWriterVTKDataBCMeshTet4::_numCellFields = 3;
 const int pylith::meshio::DataWriterVTKDataBCMeshTet4::_numCells = 2;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataBCMeshTet4::_cellFields[] = {
+pylith::meshio::DataWriterVTKDataBCMeshTet4::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 3 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 6 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
+  { "other", topology::FieldBase::OTHER, 4 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshTet4::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshTet4::_cellFieldScalar[2*1] = {
+  2.1, 3.2
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshTet4::_cellFieldVector[2*3] = {
   1.1, 2.2, 3.3,
   4.4, 5.5, 6.6,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshTet4::_cellField1[] = {
-  2.1, 3.2
-};
-const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshTet4::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshTet4::_cellFieldTensor[2*6] = {
   1.2, 2.3, 3.4, 4.5, 5.6, 6.7,
   7.8, 8.9, 9.0, 10.1, 11.2, 12.3,
 };
+const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshTet4::_cellFieldOther[2*4] = {
+  1.2, 2.3, 3.4, 4.5,
+  7.8, 8.9, 9.0, 10.1,
+};
 
 pylith::meshio::DataWriterVTKDataBCMeshTet4::DataWriterVTKDataBCMeshTet4(void)
 { // constructor
@@ -108,21 +120,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
-  assert(3 == numVertexFields);
   numVertices = _numVertices;
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
-  assert(3 == numCellFields);
   numCells = _numCells;
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterVTKDataBCMeshTet4::~DataWriterVTKDataBCMeshTet4(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshTet4.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshTet4.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshTet4.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -58,9 +58,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -69,9 +70,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterVTKDataBCMeshTet4

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshTri3.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshTri3.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshTri3.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -44,45 +44,51 @@
 const char* pylith::meshio::DataWriterVTKDataBCMeshTri3::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterVTKDataBCMeshTri3::_numVertexFields = 3;
 const int pylith::meshio::DataWriterVTKDataBCMeshTri3::_numVertices = 2;
-
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataBCMeshTri3::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 2 },
+pylith::meshio::DataWriterVTKDataBCMeshTri3::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 2 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshTri3::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshTri3::_vertexFieldScalar[2*1] = {
+  2.1, 3.2,
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshTri3::_vertexFieldVector[2*2] = {
   1.1, 2.2,
   3.3, 4.4,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshTri3::_vertexField1[] = {
-  2.1, 3.2,
+const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshTri3::_vertexFieldTensor[2*3] = {
+  1.1, 1.2, 1.3,
+  2.1, 2.2, 2.3,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshTri3::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshTri3::_vertexFieldOther[2*2] = {
   1.2, 2.3,
   3.4, 4.5,
 };
 
-const int pylith::meshio::DataWriterVTKDataBCMeshTri3::_numCellFields = 3;
 const int pylith::meshio::DataWriterVTKDataBCMeshTri3::_numCells = 1;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataBCMeshTri3::_cellFields[] = {
+pylith::meshio::DataWriterVTKDataBCMeshTri3::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 2 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
+  { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshTri3::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshTri3::_cellFieldScalar[1*1] = {
+  2.1,
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshTri3::_cellFieldVector[1*2] = {
   1.1, 2.2,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshTri3::_cellField1[] = {
-  2.1,
-};
-const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshTri3::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshTri3::_cellFieldTensor[1*3] = {
   1.2, 2.3, 3.4,
 };
+const PylithScalar pylith::meshio::DataWriterVTKDataBCMeshTri3::_cellFieldOther[1*2] = {
+  2.1, 2.2,
+};
 
 pylith::meshio::DataWriterVTKDataBCMeshTri3::DataWriterVTKDataBCMeshTri3(void)
 { // constructor
@@ -98,21 +104,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
   numVertices = _numVertices;
-  assert(3 == numVertexFields);
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
   numCells = _numCells;
-  assert(3 == numCellFields);
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterVTKDataBCMeshTri3::~DataWriterVTKDataBCMeshTri3(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshTri3.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshTri3.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataBCMeshTri3.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -58,9 +58,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -69,9 +70,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterVTKDataBCMeshTri3

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshHex8.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshHex8.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshHex8.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -41,49 +41,58 @@
 const char* pylith::meshio::DataWriterVTKDataFaultMeshHex8::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterVTKDataFaultMeshHex8::_numVertexFields = 3;
 const int pylith::meshio::DataWriterVTKDataFaultMeshHex8::_numVertices = 4;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataFaultMeshHex8::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 3 },
+pylith::meshio::DataWriterVTKDataFaultMeshHex8::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshHex8::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshHex8::_vertexFieldScalar[4*1] = {
+  2.1, 3.2, 4.3, 5.4,
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshHex8::_vertexFieldVector[4*3] = {
   1.1, 2.2, 3.3,
   4.4, 5.5, 6.6,
   7.7, 8.8, 9.9,
   10.1, 11.2, 12.3,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshHex8::_vertexField1[] = {
-  2.1, 3.2, 4.3, 5.4,
+const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshHex8::_vertexFieldTensor[4*6] = {
+  1.1, 1.2, 1.3, 1.4, 1.5, 1.6,
+  2.1, 2.2, 2.3, 2.4, 2.5, 2.6,
+  3.1, 3.2, 3.3, 3.4, 3.5, 3.6,
+  4.1, 4.2, 4.3, 4.4, 4.5, 4.6,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshHex8::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshHex8::_vertexFieldOther[4*2] = {
   1.2, 2.3,
   3.4, 4.5,
   5.6, 6.7,
   7.8, 8.9,
 };
 
-const int pylith::meshio::DataWriterVTKDataFaultMeshHex8::_numCellFields = 3;
 const int pylith::meshio::DataWriterVTKDataFaultMeshHex8::_numCells = 1;
 
 const pylith::meshio::DataWriterData::FieldStruct
 pylith::meshio::DataWriterVTKDataFaultMeshHex8::_cellFields[] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 3 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 6 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
+  { "other", topology::FieldBase::OTHER, 3 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshHex8::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshHex8::_cellFieldScalar[1*1] = {
+  2.1,
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshHex8::_cellFieldVector[1*3] = {
   1.1, 2.2, 3.3,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshHex8::_cellField1[] = {
-  2.1,
-};
-const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshHex8::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshHex8::_cellFieldTensor[1*6] = {
   1.2, 2.3, 3.4, 4.5, 5.6, 6.7,
 };
+const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshHex8::_cellFieldOther[1*3] = {
+  1.2, 2.3, 3.4,
+};
 
 pylith::meshio::DataWriterVTKDataFaultMeshHex8::DataWriterVTKDataFaultMeshHex8(void)
 { // constructor
@@ -98,21 +107,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
   numVertices = _numVertices;
-  assert(3 == numVertexFields);
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
   numCells = _numCells;
-  assert(3 == numCellFields);
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterVTKDataFaultMeshHex8::~DataWriterVTKDataFaultMeshHex8(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshHex8.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshHex8.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshHex8.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -57,9 +57,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -68,9 +69,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterVTKDataFaultMeshHex8

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshQuad4.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshQuad4.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshQuad4.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -41,45 +41,52 @@
 const char* pylith::meshio::DataWriterVTKDataFaultMeshQuad4::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterVTKDataFaultMeshQuad4::_numVertexFields = 3;
 const int pylith::meshio::DataWriterVTKDataFaultMeshQuad4::_numVertices = 2;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataFaultMeshQuad4::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 2 },
+pylith::meshio::DataWriterVTKDataFaultMeshQuad4::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 2 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshQuad4::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshQuad4::_vertexFieldScalar[2*1] = {
+  2.1, 3.2,
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshQuad4::_vertexFieldVector[2*2] = {
   1.1, 2.2,
   3.3, 4.4,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshQuad4::_vertexField1[] = {
-  2.1, 3.2,
+const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshQuad4::_vertexFieldTensor[2*3] = {
+  1.2, 1.3, 1.4,
+  2.2, 2.3, 2.4,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshQuad4::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshQuad4::_vertexFieldOther[2*2] = {
   1.2, 2.3,
   3.4, 4.5,
 };
 
-const int pylith::meshio::DataWriterVTKDataFaultMeshQuad4::_numCellFields = 3;
 const int pylith::meshio::DataWriterVTKDataFaultMeshQuad4::_numCells = 1;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataFaultMeshQuad4::_cellFields[] = {
+pylith::meshio::DataWriterVTKDataFaultMeshQuad4::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 2 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
+  { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshQuad4::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshQuad4::_cellFieldScalar[1*1] = {
+  2.1,
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshQuad4::_cellFieldVector[1*2] = {
   1.1, 2.2,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshQuad4::_cellField1[] = {
-  2.1,
-};
-const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshQuad4::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshQuad4::_cellFieldTensor[1*3] = {
   1.2, 2.3, 3.4,
 };
+const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshQuad4::_cellFieldOther[1*2] = {
+  1.2, 3.2,
+};
 
 pylith::meshio::DataWriterVTKDataFaultMeshQuad4::DataWriterVTKDataFaultMeshQuad4(void)
 { // constructor
@@ -94,21 +101,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
-  assert(3 == numVertexFields);
   numVertices = _numVertices;
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
-  assert(3 == numCellFields);
   numCells = _numCells;
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterVTKDataFaultMeshQuad4::~DataWriterVTKDataFaultMeshQuad4(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshQuad4.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshQuad4.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshQuad4.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -57,9 +57,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -68,9 +69,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterVTKDataFaultMeshQuad4

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshTet4.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshTet4.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshTet4.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -41,47 +41,55 @@
 const char* pylith::meshio::DataWriterVTKDataFaultMeshTet4::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterVTKDataFaultMeshTet4::_numVertexFields = 3;
 const int pylith::meshio::DataWriterVTKDataFaultMeshTet4::_numVertices = 3;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataFaultMeshTet4::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 3 },
+pylith::meshio::DataWriterVTKDataFaultMeshTet4::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshTet4::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshTet4::_vertexFieldScalar[3*1] = {
+  2.1, 3.2, 4.3,
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshTet4::_vertexFieldVector[3*3] = {
   1.1, 2.2, 3.3,
   4.4, 5.5, 6.6,
   7.7, 8.8, 9.9,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshTet4::_vertexField1[] = {
-  2.1, 3.2, 4.3,
+const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshTet4::_vertexFieldTensor[3*6] = {
+  1.1, 1.2, 1.3, 1.4, 1.5, 1.6,
+  2.1, 2.2, 2.3, 2.4, 2.5, 2.6,
+  3.1, 3.2, 3.3, 3.4, 3.5, 3.6,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshTet4::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshTet4::_vertexFieldOther[3*2] = {
   1.2, 2.3,
   3.4, 4.5,
   5.6, 6.7,
 };
 
-const int pylith::meshio::DataWriterVTKDataFaultMeshTet4::_numCellFields = 3;
 const int pylith::meshio::DataWriterVTKDataFaultMeshTet4::_numCells = 1;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataFaultMeshTet4::_cellFields[] = {
+pylith::meshio::DataWriterVTKDataFaultMeshTet4::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 3 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 6 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
+  { "other", topology::FieldBase::OTHER, 3 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshTet4::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshTet4::_cellFieldScalar[1*1] = {
+  2.1,
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshTet4::_cellFieldVector[1*3] = {
   1.1, 2.2, 3.3,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshTet4::_cellField1[] = {
-  2.1,
-};
-const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshTet4::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshTet4::_cellFieldTensor[1*6] = {
   1.2, 2.3, 3.4, 4.5, 5.6, 6.7,
 };
+const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshTet4::_cellFieldOther[1*3] = {
+  1.2, 2.3, 3.4,
+};
 
 pylith::meshio::DataWriterVTKDataFaultMeshTet4::DataWriterVTKDataFaultMeshTet4(void)
 { // constructor
@@ -96,21 +104,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
-  assert(3 == numVertexFields);
   numVertices = _numVertices;
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
-  assert(3 == numCellFields);
   numCells = _numCells;
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterVTKDataFaultMeshTet4::~DataWriterVTKDataFaultMeshTet4(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshTet4.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshTet4.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshTet4.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -57,9 +57,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -68,9 +69,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterVTKDataFaultMeshTet4

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshTri3.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshTri3.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshTri3.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -41,45 +41,52 @@
 const char* pylith::meshio::DataWriterVTKDataFaultMeshTri3::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterVTKDataFaultMeshTri3::_numVertexFields = 3;
 const int pylith::meshio::DataWriterVTKDataFaultMeshTri3::_numVertices = 2;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataFaultMeshTri3::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 2 },
+pylith::meshio::DataWriterVTKDataFaultMeshTri3::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 2 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshTri3::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshTri3::_vertexFieldScalar[2*1] = {
+  2.1, 3.2,
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshTri3::_vertexFieldVector[2*2] = {
   1.1, 2.2,
   3.3, 4.4,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshTri3::_vertexField1[] = {
-  2.1, 3.2,
+const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshTri3::_vertexFieldTensor[2*3] = {
+  1.1, 1.2, 1.3,
+  2.1, 2.2, 2.3,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshTri3::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshTri3::_vertexFieldOther[2*2] = {
   1.2, 2.3,
   3.4, 4.5,
 };
 
-const int pylith::meshio::DataWriterVTKDataFaultMeshTri3::_numCellFields = 3;
 const int pylith::meshio::DataWriterVTKDataFaultMeshTri3::_numCells = 1;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataFaultMeshTri3::_cellFields[] = {
+pylith::meshio::DataWriterVTKDataFaultMeshTri3::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 2 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
+  { "other", topology::FieldBase::OTHER, 4 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshTri3::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshTri3::_cellFieldScalar[1*1] = {
+  2.1,
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshTri3::_cellFieldVector[1*2] = {
   1.1, 2.2,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshTri3::_cellField1[] = {
-  2.1,
-};
-const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshTri3::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshTri3::_cellFieldTensor[1*3] = {
   1.2, 2.3, 3.4,
 };
+const PylithScalar pylith::meshio::DataWriterVTKDataFaultMeshTri3::_cellFieldOther[1*4] = {
+  1.2, 2.3, 3.4, 4.5,
+};
 
 pylith::meshio::DataWriterVTKDataFaultMeshTri3::DataWriterVTKDataFaultMeshTri3(void)
 { // constructor
@@ -94,21 +101,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
   numVertices = _numVertices;
-  assert(3 == numVertexFields);
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
   numCells = _numCells;
-  assert(3 == numCellFields);
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterVTKDataFaultMeshTri3::~DataWriterVTKDataFaultMeshTri3(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshTri3.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshTri3.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataFaultMeshTri3.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -57,9 +57,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -68,9 +69,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterVTKDataFaultMeshTri3

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshHex8.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshHex8.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshHex8.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -45,16 +45,21 @@
 const char* pylith::meshio::DataWriterVTKDataMatMeshHex8::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterVTKDataMatMeshHex8::_numVertexFields = 3;
 const int pylith::meshio::DataWriterVTKDataMatMeshHex8::_numVertices = 20;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataMatMeshHex8::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 3 },
+pylith::meshio::DataWriterVTKDataMatMeshHex8::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshHex8::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshHex8::_vertexFieldScalar[20*1] = {
+  2.1, 3.2, 4.3, 5.4, 6.5, 7.6, 8.7, 9.8,
+  10.0, 12.1, 11.1, 13.1, 14.1, 15.1, 16.1, 17.1,
+  18.1, 19.1, 20.1, 21.1
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshHex8::_vertexFieldVector[20*3] = {
   1.1, 2.2, 3.3,
   4.4, 5.5, 6.6,
   7.7, 8.8, 9.9,
@@ -76,12 +81,29 @@
   31.1, 32.2, 33.3,
   34.4, 35.5, 36.6
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshHex8::_vertexField1[] = {
-  2.1, 3.2, 4.3, 5.4, 6.5, 7.6, 8.7, 9.8,
-  10.0, 12.1, 11.1, 13.1, 14.1, 15.1, 16.1, 17.1,
-  18.1, 19.1, 20.1, 21.1
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshHex8::_vertexFieldTensor[20*6] = {
+  1.1, 1.2, 1.3, 1.4, 1.5, 1.6,
+  2.1, 2.2, 2.3, 2.4, 2.5, 2.6,
+  3.1, 3.2, 3.3, 3.4, 3.5, 3.6,
+  4.1, 4.2, 4.3, 4.4, 4.5, 4.6,
+  5.1, 5.2, 5.3, 5.4, 5.5, 5.6,
+  6.1, 6.2, 6.3, 6.4, 6.5, 6.6,
+  7.1, 7.2, 7.3, 7.4, 7.5, 7.6,
+  8.1, 8.2, 8.3, 8.4, 8.5, 8.6,
+  9.1, 9.2, 9.3, 9.4, 9.5, 9.6,
+  10.1, 10.2, 10.3, 10.4, 10.5, 10.6,
+  11.1, 11.2, 11.3, 11.4, 11.5, 11.6,
+  12.1, 12.2, 12.3, 12.4, 12.5, 12.6,
+  13.1, 13.2, 13.3, 13.4, 13.5, 13.6,
+  14.1, 14.2, 14.3, 14.4, 14.5, 14.6,
+  15.1, 15.2, 15.3, 15.4, 15.5, 15.6,
+  16.1, 16.2, 16.3, 16.4, 16.5, 16.6,
+  17.1, 17.2, 17.3, 17.4, 17.5, 17.6,
+  18.1, 18.2, 18.3, 18.4, 18.5, 18.6,
+  19.1, 19.2, 19.3, 19.4, 19.5, 19.6,
+  20.1, 20.2, 20.3, 20.4, 20.5, 20.6,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshHex8::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshHex8::_vertexFieldOther[20*2] = {
   1.2, 2.3,
   3.4, 4.5,
   5.6, 6.7,
@@ -104,24 +126,27 @@
   4.1, 4.2,
 };
 
-const int pylith::meshio::DataWriterVTKDataMatMeshHex8::_numCellFields = 3;
 const int pylith::meshio::DataWriterVTKDataMatMeshHex8::_numCells = 1;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataMatMeshHex8::_cellFields[] = {
+pylith::meshio::DataWriterVTKDataMatMeshHex8::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 3 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 6 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
+  { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshHex8::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshHex8::_cellFieldScalar[1*1] = {
+  2.1,
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshHex8::_cellFieldVector[1*3] = {
   1.1, 2.2, 3.3,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshHex8::_cellField1[] = {
-  2.1,
-};
-const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshHex8::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshHex8::_cellFieldTensor[1*6] = {
   1.2, 2.3, 3.4, 4.5, 5.6, 6.7,
 };
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshHex8::_cellFieldOther[1*2] = {
+  1.2, 2.3,
+};
 
 pylith::meshio::DataWriterVTKDataMatMeshHex8::DataWriterVTKDataMatMeshHex8(void)
 { // constructor
@@ -138,21 +163,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
   numVertices = _numVertices;
-  assert(3 == numVertexFields);
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
   numCells = _numCells;
-  assert(3 == numCellFields);
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterVTKDataMatMeshHex8::~DataWriterVTKDataMatMeshHex8(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshHex8.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshHex8.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshHex8.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -59,9 +59,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -70,9 +71,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterVTKDataMatMeshHex8

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshLine2.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshLine2.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshLine2.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -45,22 +45,25 @@
 const char* pylith::meshio::DataWriterVTKDataMatMeshLine2::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterVTKDataMatMeshLine2::_numVertexFields = 3;
 const int pylith::meshio::DataWriterVTKDataMatMeshLine2::_numVertices = 5;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataMatMeshLine2::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 1 },
+pylith::meshio::DataWriterVTKDataMatMeshLine2::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 1 },
+  { "stress", topology::FieldBase::TENSOR, 1 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshLine2::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshLine2::_vertexFieldScalar[5*1] = {
   1.1, 2.2, 3.3, 4.4, 5.5
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshLine2::_vertexField1[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshLine2::_vertexFieldVector[5*1] = {
   2.1, 3.2, 4.3, 5.4, 6.5
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshLine2::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshLine2::_vertexFieldTensor[5*1] = {
+  3.1, 4.2, 5.3, 6.4, 7.5
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshLine2::_vertexFieldOther[5*2] = {
   1.2, 2.3, 
   3.4, 4.5,
   5.6, 6.7,
@@ -68,24 +71,27 @@
   9.1, 10.2
 };
 
-const int pylith::meshio::DataWriterVTKDataMatMeshLine2::_numCellFields = 3;
 const int pylith::meshio::DataWriterVTKDataMatMeshLine2::_numCells = 1;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataMatMeshLine2::_cellFields[] = {
+pylith::meshio::DataWriterVTKDataMatMeshLine2::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 1 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 1 },
+  { "stress", topology::FieldBase::TENSOR, 1 },
+  { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshLine2::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshLine2::_cellFieldScalar[1*1] = {
   1.1,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshLine2::_cellField1[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshLine2::_cellFieldVector[1*1] = {
   2.1,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshLine2::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshLine2::_cellFieldTensor[1*1] = {
   1.2,
 };
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshLine2::_cellFieldOther[1*2] = {
+  1.2, 2.3,
+};
 
 pylith::meshio::DataWriterVTKDataMatMeshLine2::DataWriterVTKDataMatMeshLine2(void)
 { // constructor
@@ -102,21 +108,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
   numVertices = _numVertices;
-  assert(3 == numVertexFields);
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
   numCells = _numCells;
-  assert(3 == numCellFields);
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterVTKDataMatMeshLine2::~DataWriterVTKDataMatMeshLine2(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshLine2.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshLine2.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshLine2.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -59,9 +59,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -70,9 +71,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterVTKDataMatMeshLine2

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshQuad4.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshQuad4.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshQuad4.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -41,16 +41,19 @@
 const char* pylith::meshio::DataWriterVTKDataMatMeshQuad4::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterVTKDataMatMeshQuad4::_numVertexFields = 3;
 const int pylith::meshio::DataWriterVTKDataMatMeshQuad4::_numVertices = 6;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataMatMeshQuad4::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 2 },
+pylith::meshio::DataWriterVTKDataMatMeshQuad4::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 2 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshQuad4::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshQuad4::_vertexFieldScalar[6*1] = {
+  2.1, 3.2, 4.3, 5.4, 6.5, 7.6
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshQuad4::_vertexFieldVector[6*2] = {
   1.1, 2.2,
   3.3, 4.4,
   5.5, 6.6,
@@ -58,10 +61,15 @@
   9.9, 10.1,
   11.2, 12.3,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshQuad4::_vertexField1[] = {
-  2.1, 3.2, 4.3, 5.4, 6.5, 7.6
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshQuad4::_vertexFieldTensor[6*3] = {
+  1.1, 1.2, 1.3,
+  2.1, 2.2, 2.3,
+  3.1, 3.2, 3.3,
+  4.1, 4.2, 4.3,
+  5.1, 5.2, 5.3,
+  6.1, 6.2, 6.3,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshQuad4::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshQuad4::_vertexFieldOther[6*2] = {
   1.2, 2.3,
   3.4, 4.5,
   5.6, 6.7,
@@ -70,24 +78,27 @@
   6.5, 5.4
 };
 
-const int pylith::meshio::DataWriterVTKDataMatMeshQuad4::_numCellFields = 3;
 const int pylith::meshio::DataWriterVTKDataMatMeshQuad4::_numCells = 1;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataMatMeshQuad4::_cellFields[] = {
+pylith::meshio::DataWriterVTKDataMatMeshQuad4::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 2 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
+  { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshQuad4::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshQuad4::_cellFieldScalar[1*1] = {
+  2.1,
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshQuad4::_cellFieldVector[1*2] = {
   1.1, 2.2,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshQuad4::_cellField1[] = {
-  2.1,
-};
-const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshQuad4::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshQuad4::_cellFieldTensor[1*3] = {
   1.2, 2.3, 3.4,
 };
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshQuad4::_cellFieldOther[1*2] = {
+  1.2, 2.3,
+};
 
 pylith::meshio::DataWriterVTKDataMatMeshQuad4::DataWriterVTKDataMatMeshQuad4(void)
 { // constructor
@@ -102,21 +113,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
-  assert(3 == numVertexFields);
   numVertices = _numVertices;
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
-  assert(3 == numCellFields);
   numCells = _numCells;
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterVTKDataMatMeshQuad4::~DataWriterVTKDataMatMeshQuad4(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshQuad4.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshQuad4.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshQuad4.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -57,9 +57,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -68,9 +69,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterVTKDataMatMeshQuad4

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshTet4.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshTet4.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshTet4.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -45,16 +45,19 @@
 const char* pylith::meshio::DataWriterVTKDataMatMeshTet4::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterVTKDataMatMeshTet4::_numVertexFields = 3;
 const int pylith::meshio::DataWriterVTKDataMatMeshTet4::_numVertices = 11;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataMatMeshTet4::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 3 },
+pylith::meshio::DataWriterVTKDataMatMeshTet4::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshTet4::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshTet4::_vertexFieldScalar[11*1] = {
+  2.1, 3.2, 4.3, 5.4, 6.5, 7.6, 8.7, 9.8, 10.9, 11.0, 12.1
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshTet4::_vertexFieldVector[11*3] = {
   1.1, 2.2, 3.3,
   4.4, 5.5, 6.6,
   7.7, 8.8, 9.9,
@@ -67,10 +70,20 @@
   28.8, 29.9, 30.0,
   31.1, 32.2, 33.3,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshTet4::_vertexField1[] = {
-  2.1, 3.2, 4.3, 5.4, 6.5, 7.6, 8.7, 9.8, 10.9, 11.0, 12.1
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshTet4::_vertexFieldTensor[11*6] = {
+  1.1, 1.2, 1.3, 1.4, 1.5, 1.6,
+  2.1, 2.2, 2.3, 2.4, 2.5, 2.6,
+  3.1, 3.2, 3.3, 3.4, 3.5, 3.6,
+  4.1, 4.2, 4.3, 4.4, 4.5, 4.6,
+  5.1, 5.2, 5.3, 5.4, 5.5, 5.6,
+  6.1, 6.2, 6.3, 6.4, 6.5, 6.6,
+  7.1, 7.2, 7.3, 7.4, 7.5, 7.6,
+  8.1, 8.2, 8.3, 8.4, 8.5, 8.6,
+  9.1, 9.2, 9.3, 9.4, 9.5, 9.6,
+  10.1, 10.2, 10.3, 10.4, 10.5, 10.6,
+  11.1, 11.2, 11.3, 11.4, 11.5, 11.6,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshTet4::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshTet4::_vertexFieldOther[11*2] = {
   1.2, 2.3,
   3.4, 4.5,
   5.6, 6.7,
@@ -84,26 +97,30 @@
   21.2, 22.3
 };
 
-const int pylith::meshio::DataWriterVTKDataMatMeshTet4::_numCellFields = 3;
 const int pylith::meshio::DataWriterVTKDataMatMeshTet4::_numCells = 2;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataMatMeshTet4::_cellFields[] = {
+pylith::meshio::DataWriterVTKDataMatMeshTet4::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 3 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 6 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
+  { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshTet4::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshTet4::_cellFieldScalar[2*1] = {
+  2.1, 3.2
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshTet4::_cellFieldVector[2*3] = {
   1.1, 2.2, 3.3,
   4.4, 5.5, 6.6,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshTet4::_cellField1[] = {
-  2.1, 3.2
-};
-const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshTet4::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshTet4::_cellFieldTensor[2*6] = {
   1.2, 2.3, 3.4, 4.5, 5.6, 6.7,
   7.8, 8.9, 9.0, 10.1, 11.2, 12.3,
 };
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshTet4::_cellFieldOther[2*2] = {
+  1.2, 2.3,
+  7.8, 8.9,
+};
 
 pylith::meshio::DataWriterVTKDataMatMeshTet4::DataWriterVTKDataMatMeshTet4(void)
 { // constructor
@@ -120,21 +137,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
-  assert(3 == numVertexFields);
   numVertices = _numVertices;
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
-  assert(3 == numCellFields);
   numCells = _numCells;
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterVTKDataMatMeshTet4::~DataWriterVTKDataMatMeshTet4(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshTet4.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshTet4.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshTet4.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -59,9 +59,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -70,9 +71,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterVTKDataMatMeshTet4

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshTri3.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshTri3.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshTri3.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -45,16 +45,19 @@
 const char* pylith::meshio::DataWriterVTKDataMatMeshTri3::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterVTKDataMatMeshTri3::_numVertexFields = 3;
 const int pylith::meshio::DataWriterVTKDataMatMeshTri3::_numVertices = 8;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataMatMeshTri3::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 2 },
+pylith::meshio::DataWriterVTKDataMatMeshTri3::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 2 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshTri3::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshTri3::_vertexFieldScalar[8*1] = {
+  2.1, 3.2, 4.3, 5.4, 6.5, 7.6, 8.7, 9.8
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshTri3::_vertexFieldVector[8*2] = {
   1.1, 2.2,
   3.3, 4.4,
   5.5, 6.6,
@@ -64,10 +67,17 @@
   13.3, 14.4,
   15.5, 16.6,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshTri3::_vertexField1[] = {
-  2.1, 3.2, 4.3, 5.4, 6.5, 7.6, 8.7, 9.8
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshTri3::_vertexFieldTensor[8*3] = {
+  1.1, 1.2, 1.3,
+  2.1, 2.2, 3.3,
+  3.1, 3.2, 4.3,
+  4.1, 4.2, 5.3,
+  5.1, 5.2, 6.3,
+  6.1, 6.2, 7.3,
+  7.1, 7.2, 8.3,
+  8.1, 8.2, 9.3,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshTri3::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshTri3::_vertexFieldOther[8*2] = {
   1.2, 2.3,
   3.4, 4.5,
   5.6, 6.7,
@@ -78,24 +88,27 @@
   15.6, 16.7
 };
 
-const int pylith::meshio::DataWriterVTKDataMatMeshTri3::_numCellFields = 3;
 const int pylith::meshio::DataWriterVTKDataMatMeshTri3::_numCells = 1;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataMatMeshTri3::_cellFields[] = {
+pylith::meshio::DataWriterVTKDataMatMeshTri3::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 2 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
+  { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshTri3::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshTri3::_cellFieldScalar[1*1] = {
+  2.1,
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshTri3::_cellFieldVector[1*2] = {
   1.1, 2.2,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshTri3::_cellField1[] = {
-  2.1,
-};
-const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshTri3::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshTri3::_cellFieldTensor[1*3] = {
   1.2, 2.3, 3.4,
 };
+const PylithScalar pylith::meshio::DataWriterVTKDataMatMeshTri3::_cellFieldOther[1*2] = {
+  1.2, 2.3,
+};
 
 pylith::meshio::DataWriterVTKDataMatMeshTri3::DataWriterVTKDataMatMeshTri3(void)
 { // constructor
@@ -112,21 +125,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
   numVertices = _numVertices;
-  assert(3 == numVertexFields);
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
   numCells = _numCells;
-  assert(3 == numCellFields);
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterVTKDataMatMeshTri3::~DataWriterVTKDataMatMeshTri3(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshTri3.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshTri3.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMatMeshTri3.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -59,9 +59,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -70,9 +71,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterVTKDataMatMeshTri3

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshHex8.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshHex8.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshHex8.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -41,16 +41,21 @@
 const char* pylith::meshio::DataWriterVTKDataMeshHex8::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterVTKDataMeshHex8::_numVertexFields = 3;
 const int pylith::meshio::DataWriterVTKDataMeshHex8::_numVertices = 20;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataMeshHex8::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 3 },
+pylith::meshio::DataWriterVTKDataMeshHex8::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMeshHex8::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshHex8::_vertexFieldScalar[20*1] = {
+  2.1, 3.2, 4.3, 5.4, 6.5, 7.6, 8.7, 9.8,
+  10.0, 12.1, 11.1, 13.1, 14.1, 15.1, 16.1, 17.1,
+  18.1, 19.1, 20.1, 21.2
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshHex8::_vertexFieldVector[20*3] = {
   1.1, 2.2, 3.3,
   4.4, 5.5, 6.6,
   7.7, 8.8, 9.9,
@@ -72,12 +77,29 @@
   31.8, 32.9, 33.1,
   34.8, 35.9, 36.1,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMeshHex8::_vertexField1[] = {
-  2.1, 3.2, 4.3, 5.4, 6.5, 7.6, 8.7, 9.8,
-  10.0, 12.1, 11.1, 13.1, 14.1, 15.1, 16.1, 17.1,
-  18.1, 19.1, 20.1, 21.2
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshHex8::_vertexFieldTensor[20*6] = {
+  1.1, 1.2, 1.3, 1.4, 1.5, 1.6,
+  2.1, 2.2, 2.3, 2.4, 2.5, 2.6,
+  3.1, 3.2, 3.3, 3.4, 3.5, 3.6,
+  4.1, 4.2, 4.3, 4.4, 4.5, 4.6,
+  5.1, 5.2, 5.3, 5.4, 5.5, 5.6,
+  6.1, 6.2, 6.3, 6.4, 6.5, 6.6,
+  7.1, 7.2, 7.3, 7.4, 7.5, 7.6,
+  8.1, 8.2, 8.3, 8.4, 8.5, 8.6,
+  9.1, 9.2, 9.3, 9.4, 9.5, 9.6,
+  10.1, 10.2, 10.3, 10.4, 10.5, 10.6,
+  11.1, 11.2, 11.3, 11.4, 11.5, 11.6,
+  12.1, 12.2, 12.3, 12.4, 12.5, 12.6,
+  13.1, 13.2, 13.3, 13.4, 13.5, 13.6,
+  14.1, 14.2, 14.3, 14.4, 14.5, 14.6,
+  15.1, 15.2, 15.3, 15.4, 15.5, 15.6,
+  16.1, 16.2, 16.3, 16.4, 16.5, 16.6,
+  17.1, 17.2, 17.3, 17.4, 17.5, 17.6,
+  18.1, 18.2, 18.3, 18.4, 18.5, 18.6,
+  19.1, 19.2, 19.3, 19.4, 19.5, 19.6,
+  20.1, 20.2, 20.3, 20.4, 20.5, 20.6,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMeshHex8::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshHex8::_vertexFieldOther[20*2] = {
   1.2, 2.3,
   3.4, 4.5,
   5.6, 6.7,
@@ -100,28 +122,33 @@
   9.1, 10.1
 };
 
-const int pylith::meshio::DataWriterVTKDataMeshHex8::_numCellFields = 3;
 const int pylith::meshio::DataWriterVTKDataMeshHex8::_numCells = 3;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataMeshHex8::_cellFields[] = {
+pylith::meshio::DataWriterVTKDataMeshHex8::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 3 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 6 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
+  { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMeshHex8::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshHex8::_cellFieldScalar[3*1] = {
+  2.1, 3.2, 4.3
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshHex8::_cellFieldVector[3*3] = {
   1.1, 2.2, 3.3,
   4.4, 5.5, 6.6,
   7.7, 8.8, 9.9
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMeshHex8::_cellField1[] = {
-  2.1, 3.2, 4.3
-};
-const PylithScalar pylith::meshio::DataWriterVTKDataMeshHex8::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshHex8::_cellFieldTensor[3*6] = {
   1.2, 2.3, 3.4, 4.5, 5.6, 6.7,
   1.1, 2.2, 3.3, 4.4, 5.5, 6.6,
   1.3, 2.4, 3.5, 4.6, 5.7, 6.8
 };
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshHex8::_cellFieldOther[3*2] = {
+  1.2, 2.3,
+  1.1, 2.2,
+  1.3, 2.4,
+};
 
 pylith::meshio::DataWriterVTKDataMeshHex8::DataWriterVTKDataMeshHex8(void)
 { // constructor
@@ -136,21 +163,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
   numVertices = _numVertices;
-  assert(3 == numVertexFields);
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
   numCells = _numCells;
-  assert(3 == numCellFields);
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterVTKDataMeshHex8::~DataWriterVTKDataMeshHex8(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshHex8.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshHex8.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshHex8.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -57,9 +57,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -68,9 +69,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterVTKDataMeshHex8

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshLine2.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshLine2.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshLine2.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -41,47 +41,55 @@
 const char* pylith::meshio::DataWriterVTKDataMeshLine2::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterVTKDataMeshLine2::_numVertexFields = 3;
 const int pylith::meshio::DataWriterVTKDataMeshLine2::_numVertices = 5;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataMeshLine2::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 1 },
+pylith::meshio::DataWriterVTKDataMeshLine2::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 1 },
+  { "stress", topology::FieldBase::TENSOR, 1 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMeshLine2::_vertexField0[] = {
-  1.1, 2.2, 3.3, 4.4, 5.5
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshLine2::_vertexFieldScalar[5*1] = {
+  1.1, 2.2, 3.3, 4.4, 5.5,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMeshLine2::_vertexField1[] = {
-  2.1, 3.2, 4.3, 5.4, 6.5
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshLine2::_vertexFieldVector[5*1] = {
+  2.1, 3.2, 4.3, 5.4, 6.5,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMeshLine2::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshLine2::_vertexFieldTensor[5*1] = {
+  1.2, 1.3, 1.4, 1.5, 1.6,
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshLine2::_vertexFieldOther[5*2] = {
   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::DataWriterVTKDataMeshLine2::_numCellFields = 3;
 const int pylith::meshio::DataWriterVTKDataMeshLine2::_numCells = 3;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataMeshLine2::_cellFields[] = {
+pylith::meshio::DataWriterVTKDataMeshLine2::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 1 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 1 },
+  { "stress", topology::FieldBase::TENSOR, 1 },
+  { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMeshLine2::_cellField0[] = {
-  1.1, 2.2, 3.3
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshLine2::_cellFieldScalar[3*1] = {
+  1.1, 2.2, 3.3,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMeshLine2::_cellField1[] = {
-  2.1, 2.2, 2.3
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshLine2::_cellFieldVector[3*1] = {
+  2.1, 2.2, 2.3,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMeshLine2::_cellField2[] = {
-  1.2, 2.3, 3.4
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshLine2::_cellFieldTensor[3*1] = {
+  1.2, 2.3, 3.4,
 };
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshLine2::_cellFieldOther[3*2] = {
+  1.2, 2.3,
+  3.4, 2.2,
+  3.3, 4.4,
+};
 
 pylith::meshio::DataWriterVTKDataMeshLine2::DataWriterVTKDataMeshLine2(void)
 { // constructor
@@ -96,21 +104,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
   numVertices = _numVertices;
-  assert(3 == numVertexFields);
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
   numCells = _numCells;
-  assert(3 == numCellFields);
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterVTKDataMeshLine2::~DataWriterVTKDataMeshLine2(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshLine2.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshLine2.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshLine2.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -57,9 +57,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -68,9 +69,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterVTKDataMeshLine2

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshQuad4.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshQuad4.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshQuad4.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -37,16 +37,19 @@
 const char* pylith::meshio::DataWriterVTKDataMeshQuad4::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterVTKDataMeshQuad4::_numVertexFields = 3;
 const int pylith::meshio::DataWriterVTKDataMeshQuad4::_numVertices = 6;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataMeshQuad4::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 2 },
+pylith::meshio::DataWriterVTKDataMeshQuad4::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 2 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMeshQuad4::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshQuad4::_vertexFieldScalar[6*1] = {
+  2.1, 3.2, 4.3, 5.4, 6.5, 7.6
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshQuad4::_vertexFieldVector[6*2] = {
   1.1, 2.2,
   3.3, 4.4,
   5.5, 6.6,
@@ -54,10 +57,15 @@
   9.9, 10.1,
   11.2, 12.3,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMeshQuad4::_vertexField1[] = {
-  2.1, 3.2, 4.3, 5.4, 6.5, 7.6
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshQuad4::_vertexFieldTensor[6*3] = {
+  1.1, 1.2, 1.3,
+  2.1, 2.2, 3.3,
+  3.1, 3.2, 4.3,
+  4.1, 4.2, 5.3,
+  5.1, 5.2, 6.3,
+  6.1, 6.2, 7.3,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMeshQuad4::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshQuad4::_vertexFieldOther[6*2] = {
   1.2, 2.3,
   3.4, 4.5,
   5.6, 6.7,
@@ -66,26 +74,30 @@
   6.5, 5.4
 };
 
-const int pylith::meshio::DataWriterVTKDataMeshQuad4::_numCellFields = 3;
 const int pylith::meshio::DataWriterVTKDataMeshQuad4::_numCells = 2;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataMeshQuad4::_cellFields[] = {
+pylith::meshio::DataWriterVTKDataMeshQuad4::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 2 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
+  { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMeshQuad4::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshQuad4::_cellFieldScalar[2*1] = {
+  2.1, 2.2,
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshQuad4::_cellFieldVector[2*2] = {
   1.1, 2.2,
   3.3, 4.4
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMeshQuad4::_cellField1[] = {
-  2.1, 2.2,
-};
-const PylithScalar pylith::meshio::DataWriterVTKDataMeshQuad4::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshQuad4::_cellFieldTensor[2*3] = {
   1.2, 2.3, 3.4,
   4.5, 5.6, 6.7,
 };
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshQuad4::_cellFieldOther[2*2] = {
+  1.2, 2.3,
+  4.5, 5.6,
+};
 
 pylith::meshio::DataWriterVTKDataMeshQuad4::DataWriterVTKDataMeshQuad4(void)
 { // constructor
@@ -98,21 +110,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
-  assert(3 == numVertexFields);
   numVertices = _numVertices;
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
-  assert(3 == numCellFields);
   numCells = _numCells;
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterVTKDataMeshQuad4::~DataWriterVTKDataMeshQuad4(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshQuad4.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshQuad4.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshQuad4.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -55,9 +55,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -66,9 +67,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterVTKDataMeshQuad4

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshTet4.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshTet4.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshTet4.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -41,16 +41,19 @@
 const char* pylith::meshio::DataWriterVTKDataMeshTet4::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterVTKDataMeshTet4::_numVertexFields = 3;
 const int pylith::meshio::DataWriterVTKDataMeshTet4::_numVertices = 11;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataMeshTet4::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 3 },
+pylith::meshio::DataWriterVTKDataMeshTet4::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMeshTet4::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshTet4::_vertexFieldScalar[11*1] = {
+  2.1, 3.2, 4.3, 5.4, 6.5, 7.6, 8.7, 9.8, 10.9, 11.0, 12.1,
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshTet4::_vertexFieldVector[11*3] = {
   1.1, 2.2, 3.3,
   4.4, 5.5, 6.6,
   7.7, 8.8, 9.9,
@@ -63,10 +66,20 @@
   28.8, 29.9, 30.0,
   31.1, 32.2, 33.3,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMeshTet4::_vertexField1[] = {
-  2.1, 3.2, 4.3, 5.4, 6.5, 7.6, 8.7, 9.8, 10.9, 11.0, 12.1,
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshTet4::_vertexFieldTensor[11*6] = {
+  1.1, 1.2, 1.3, 1.4, 1.5, 1.6,
+  2.1, 2.2, 2.3, 2.4, 2.5, 2.6,
+  3.1, 3.2, 3.3, 3.4, 3.5, 3.6,
+  4.1, 4.2, 4.3, 4.4, 4.5, 4.6,
+  5.1, 5.2, 5.3, 5.4, 5.5, 5.6,
+  6.1, 6.2, 6.3, 6.4, 6.5, 6.6,
+  7.1, 7.2, 7.3, 7.4, 7.5, 7.6,
+  8.1, 8.2, 8.3, 8.4, 8.5, 8.6,
+  9.1, 9.2, 9.3, 9.4, 9.5, 9.6,
+  10.1, 10.2, 10.3, 10.4, 10.5, 10.6,
+  11.1, 11.2, 11.3, 11.4, 11.5, 11.6,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMeshTet4::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshTet4::_vertexFieldOther[11*2] = {
   1.2, 2.3,
   3.4, 4.5,
   5.6, 6.7,
@@ -80,28 +93,33 @@
   21.2, 22.3,
 };
 
-const int pylith::meshio::DataWriterVTKDataMeshTet4::_numCellFields = 3;
 const int pylith::meshio::DataWriterVTKDataMeshTet4::_numCells = 3;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataMeshTet4::_cellFields[] = {
+pylith::meshio::DataWriterVTKDataMeshTet4::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 3 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 6 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
+  { "other", topology::FieldBase::OTHER, 4 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMeshTet4::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshTet4::_cellFieldScalar[3*1] = {
+  2.1, 3.2, 4.3
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshTet4::_cellFieldVector[3*3] = {
   1.1, 2.2, 3.3,
   4.4, 5.5, 6.6,
   7.7, 8.8, 9.9
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMeshTet4::_cellField1[] = {
-  2.1, 3.2, 4.3
-};
-const PylithScalar pylith::meshio::DataWriterVTKDataMeshTet4::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshTet4::_cellFieldTensor[3*6] = {
   1.2, 2.3, 3.4, 4.5, 5.6, 6.7,
   7.8, 8.9, 9.0, 10.1, 11.2, 12.3,
   13.4, 14.5, 15.6, 16.7, 17.8, 18.9
 };
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshTet4::_cellFieldOther[3*4] = {
+  1.2, 2.3, 3.4, 4.5,
+  7.8, 8.9, 9.0, 10.1,
+  13.4, 14.5, 15.6, 16.7,
+};
 
 pylith::meshio::DataWriterVTKDataMeshTet4::DataWriterVTKDataMeshTet4(void)
 { // constructor
@@ -116,21 +134,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
-  assert(3 == numVertexFields);
   numVertices = _numVertices;
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
-  assert(3 == numCellFields);
   numCells = _numCells;
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterVTKDataMeshTet4::~DataWriterVTKDataMeshTet4(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshTet4.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshTet4.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshTet4.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -57,9 +57,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -68,9 +69,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterVTKDataMeshTet4

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshTri3.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshTri3.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshTri3.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -41,61 +41,74 @@
 const char* pylith::meshio::DataWriterVTKDataMeshTri3::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterVTKDataMeshTri3::_numVertexFields = 3;
 const int pylith::meshio::DataWriterVTKDataMeshTri3::_numVertices = 8;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataMeshTri3::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 2 },
+pylith::meshio::DataWriterVTKDataMeshTri3::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 2 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMeshTri3::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshTri3::_vertexFieldScalar[8*1] = {
+  2.1, 3.2, 4.3, 5.4, 6.5, 7.6, 8.7, 9.8
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshTri3::_vertexFieldVector[8*2] = {
   1.1, 2.2,
   3.3, 4.4,
   5.5, 6.6,
   7.7, 8.8,
   9.9, 10.0,
   11.1, 12.2,
-  13.3, 14.4,
-  15.5, 16.6,
+  13.3, 14.4
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMeshTri3::_vertexField1[] = {
-  2.1, 3.2, 4.3, 5.4, 6.5, 7.6, 8.7, 9.8
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshTri3::_vertexFieldTensor[8*3] = {
+  1.1, 1.2, 1.3,
+  2.1, 2.2, 2.3,
+  3.1, 3.2, 3.3,
+  4.1, 4.2, 4.3,
+  5.1, 5.2, 5.3,
+  6.1, 6.2, 6.3,
+  7.1, 7.2, 7.3,
+  8.1, 8.2, 8.3,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMeshTri3::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshTri3::_vertexFieldOther[8*2] = {
   1.2, 2.3,
   3.4, 4.5,
   5.6, 6.7,
   7.8, 8.9,
   9.0, 10.1,
   11.2, 12.3,
-  13.4, 14.5,
-  15.6, 16.7,
+  13.4, 14.5
 };
 
-const int pylith::meshio::DataWriterVTKDataMeshTri3::_numCellFields = 3;
 const int pylith::meshio::DataWriterVTKDataMeshTri3::_numCells = 3;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataMeshTri3::_cellFields[] = {
+pylith::meshio::DataWriterVTKDataMeshTri3::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 2 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
+  { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMeshTri3::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshTri3::_cellFieldScalar[3*1] = {
+  2.1, 2.2, 2.3
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshTri3::_cellFieldVector[3*2] = {
   1.1, 2.2,
   3.3, 4.4,
   5.5, 6.6,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataMeshTri3::_cellField1[] = {
-  2.1, 2.2, 2.3
-};
-const PylithScalar pylith::meshio::DataWriterVTKDataMeshTri3::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshTri3::_cellFieldTensor[3*3] = {
   1.2, 2.3, 3.4,
   4.5, 5.6, 6.7,
   7.8, 8.9, 9.0
 };
+const PylithScalar pylith::meshio::DataWriterVTKDataMeshTri3::_cellFieldOther[3*2] = {
+  1.2, 2.3,
+  4.5, 5.6,
+  7.8, 8.9,
+};
 
 pylith::meshio::DataWriterVTKDataMeshTri3::DataWriterVTKDataMeshTri3(void)
 { // constructor
@@ -110,21 +123,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
   numVertices = _numVertices;
-  assert(3 == numVertexFields);
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
   numCells = _numCells;
-  assert(3 == numCellFields);
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterVTKDataMeshTri3::~DataWriterVTKDataMeshTri3(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshTri3.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshTri3.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataMeshTri3.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -57,9 +57,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -68,9 +69,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterVTKDataMeshTri3

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataPointsHex8.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataPointsHex8.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataPointsHex8.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -38,16 +38,38 @@
 const char* pylith::meshio::DataWriterVTKDataPointsHex8::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterVTKDataPointsHex8::_numVertexFields = 3;
 const int pylith::meshio::DataWriterVTKDataPointsHex8::_numVertices = 20;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataPointsHex8::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 3 },
+pylith::meshio::DataWriterVTKDataPointsHex8::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataPointsHex8::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataPointsHex8::_vertexFieldScalar[20*1] = {
+  2.1, // 0
+  3.2, // 1
+  4.3, // 2 
+  5.4, // 3
+  6.5, // 4
+  7.6, // 5
+  8.7, // 6
+  9.8, // 7
+  10.0, // 8
+  12.1, // 9
+  11.1, // 10
+  13.1, // 11
+  14.1, // 12
+  15.1, // 13
+  16.1, // 14
+  17.1, // 15
+  18.1, // 16
+  19.1, // 17
+  20.1, // 18
+  21.2, // 19
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataPointsHex8::_vertexFieldVector[20*3] = {
   1.1, 2.2, 3.3, // 0
   4.4, 5.5, 6.6, // 1
   7.7, 8.8, 9.9, // 2
@@ -69,29 +91,29 @@
   31.8, 32.9, 33.1, // 18
   34.8, 35.9, 36.1, // 19
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataPointsHex8::_vertexField1[] = {
-  2.1, // 0
-  3.2, // 1
-  4.3, // 2 
-  5.4, // 3
-  6.5, // 4
-  7.6, // 5
-  8.7, // 6
-  9.8, // 7
-  10.0, // 8
-  12.1, // 9
-  11.1, // 10
-  13.1, // 11
-  14.1, // 12
-  15.1, // 13
-  16.1, // 14
-  17.1, // 15
-  18.1, // 16
-  19.1, // 17
-  20.1, // 18
-  21.2, // 19
+const PylithScalar pylith::meshio::DataWriterVTKDataPointsHex8::_vertexFieldTensor[20*6] = {
+  1.1, 1.2, 1.3, 1.4, 1.5, 1.6,
+  2.1, 2.2, 2.3, 2.4, 2.5, 2.6,
+  3.1, 3.2, 3.3, 3.4, 3.5, 3.6,
+  4.1, 4.2, 4.3, 4.4, 4.5, 4.6,
+  5.1, 5.2, 5.3, 5.4, 5.5, 5.6,
+  6.1, 6.2, 6.3, 6.4, 6.5, 6.6,
+  7.1, 7.2, 7.3, 7.4, 7.5, 7.6,
+  8.1, 8.2, 8.3, 8.4, 8.5, 8.6,
+  9.1, 9.2, 9.3, 9.4, 9.5, 9.6,
+  10.1, 10.2, 10.3, 10.4, 10.5, 10.6,
+  11.1, 11.2, 11.3, 11.4, 11.5, 11.6,
+  12.1, 12.2, 12.3, 12.4, 12.5, 12.6,
+  13.1, 13.2, 13.3, 13.4, 13.5, 13.6,
+  14.1, 14.2, 14.3, 14.4, 14.5, 14.6,
+  15.1, 15.2, 15.3, 15.4, 15.5, 15.6,
+  16.1, 16.2, 16.3, 16.4, 16.5, 16.6,
+  17.1, 17.2, 17.3, 17.4, 17.5, 17.6,
+  18.1, 18.2, 18.3, 18.4, 18.5, 18.6,
+  19.1, 19.2, 19.3, 19.4, 19.5, 19.6,
+  20.1, 20.2, 20.3, 20.4, 20.5, 20.6,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataPointsHex8::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataPointsHex8::_vertexFieldOther[20*2] = {
   1.2, 2.3, // 0
   3.4, 4.5, // 1
   5.6, 6.7, // 2
@@ -116,7 +138,7 @@
 
 const int pylith::meshio::DataWriterVTKDataPointsHex8::_numPoints = 4;
 const int pylith::meshio::DataWriterVTKDataPointsHex8::_spaceDim = 3;
-const PylithScalar pylith::meshio::DataWriterVTKDataPointsHex8::_points[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataPointsHex8::_points[4*3] = {
   -0.5, 0.0, 0.5,
   -0.00000001, 0.0, 0.0,
   -0.00000001, 0.0, 0.99999999,
@@ -136,13 +158,13 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
   numVertices = _numVertices;
-  assert(3 == numVertexFields);
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
   numPoints = _numPoints;
   spaceDim = _spaceDim;

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataPointsHex8.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataPointsHex8.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataPointsHex8.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -56,9 +56,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Point information.
@@ -66,7 +67,7 @@
   static const int _numPoints; ///< Number of points.
   static const int _spaceDim; ///< Spatial dimension.
   static const PylithScalar _points[]; ///< Coordinates of points.
-  //@}  
+  //@}
 
 }; // DataWriterVTKDataPointsHex8
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataPointsQuad4.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataPointsQuad4.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataPointsQuad4.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -34,16 +34,24 @@
 const char* pylith::meshio::DataWriterVTKDataPointsQuad4::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterVTKDataPointsQuad4::_numVertexFields = 3;
 const int pylith::meshio::DataWriterVTKDataPointsQuad4::_numVertices = 6;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataPointsQuad4::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 2 },
+pylith::meshio::DataWriterVTKDataPointsQuad4::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 2 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataPointsQuad4::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataPointsQuad4::_vertexFieldScalar[6*1] = {
+  2.1, // 0
+  3.2, // 1
+  4.3, // 2
+  5.4, // 3
+  6.5, // 4
+  7.6, // 5
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataPointsQuad4::_vertexFieldVector[6*2] = {
   1.1, 2.2, // 0
   3.3, 4.4, // 1
   5.5, 6.6, // 2
@@ -51,15 +59,15 @@
   9.9, 10.1, // 4
   11.2, 12.3, // 5
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataPointsQuad4::_vertexField1[] = {
-  2.1, // 0
-  3.2, // 1
-  4.3, // 2
-  5.4, // 3
-  6.5, // 4
-  7.6, // 5
+const PylithScalar pylith::meshio::DataWriterVTKDataPointsQuad4::_vertexFieldTensor[6*3] = {
+  1.1, 1.2, 1.3,
+  2.1, 2.2, 2.3,
+  3.1, 3.2, 3.3,
+  4.1, 4.2, 4.3,
+  5.1, 5.2, 5.3,
+  6.1, 6.2, 6.3,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataPointsQuad4::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataPointsQuad4::_vertexFieldOther[6*2] = {
   1.2, 2.3, // 0
   3.4, 4.5, // 1
   5.6, 6.7, // 2
@@ -70,7 +78,7 @@
 
 const int pylith::meshio::DataWriterVTKDataPointsQuad4::_numPoints = 3;
 const int pylith::meshio::DataWriterVTKDataPointsQuad4::_spaceDim = 2;
-const PylithScalar pylith::meshio::DataWriterVTKDataPointsQuad4::_points[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataPointsQuad4::_points[3*2] = {
  -0.5, 0.0,
   0.00000001, 0.0,
   0.99999999, -0.99999999,
@@ -87,13 +95,13 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
   numVertices = _numVertices;
-  assert(3 == numVertexFields);
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
   numPoints = _numPoints;
   spaceDim = _spaceDim;

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataPointsQuad4.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataPointsQuad4.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataPointsQuad4.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -54,9 +54,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Point information.
@@ -64,7 +65,7 @@
   static const int _numPoints; ///< Number of points.
   static const int _spaceDim; ///< Spatial dimension.
   static const PylithScalar _points[]; ///< Coordinates of points.
-  //@}  
+  //@}
 
 }; // DataWriterVTKDataPointsQuad4
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataPointsTet4.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataPointsTet4.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataPointsTet4.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -38,16 +38,29 @@
 const char* pylith::meshio::DataWriterVTKDataPointsTet4::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterVTKDataPointsTet4::_numVertexFields = 3;
 const int pylith::meshio::DataWriterVTKDataPointsTet4::_numVertices = 11;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataPointsTet4::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 3 },
+pylith::meshio::DataWriterVTKDataPointsTet4::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataPointsTet4::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataPointsTet4::_vertexFieldScalar[11*1] = {
+  2.1, // 0
+  3.2, // 1
+  4.3, // 2
+  5.4, // 3
+  6.5, // 4
+  7.6, // 5
+  8.7, // 6
+  9.8,  // 7
+  10.9, // 8
+  11.0, // 9
+  12.1, // 10
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataPointsTet4::_vertexFieldVector[11*3] = {
   1.1, 2.2, 3.3, // 0
   4.4, 5.5, 6.6, // 1
   7.7, 8.8, 9.9, // 2
@@ -60,20 +73,20 @@
   28.8, 29.9, 30.0, // 9
   31.1, 32.2, 33.3, // 10
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataPointsTet4::_vertexField1[] = {
-  2.1, // 0
-  3.2, // 1
-  4.3, // 2
-  5.4, // 3
-  6.5, // 4
-  7.6, // 5
-  8.7, // 6
-  9.8,  // 7
-  10.9, // 8
-  11.0, // 9
-  12.1, // 10
+const PylithScalar pylith::meshio::DataWriterVTKDataPointsTet4::_vertexFieldTensor[11*6] = {
+  1.1, 1.2, 1.3, 1.4, 1.5, 1.6,
+  2.1, 2.2, 2.3, 2.4, 2.5, 2.6,
+  3.1, 3.2, 3.3, 3.4, 3.5, 3.6,
+  4.1, 4.2, 4.3, 4.4, 4.5, 4.6,
+  5.1, 5.2, 5.3, 5.4, 5.5, 5.6,
+  6.1, 6.2, 6.3, 6.4, 6.5, 6.6,
+  7.1, 7.2, 7.3, 7.4, 7.5, 7.6,
+  8.1, 8.2, 8.3, 8.4, 8.5, 8.6,
+  9.1, 9.2, 9.3, 9.4, 9.5, 9.6,
+  10.1, 10.2, 10.3, 10.4, 10.5, 10.6,
+  11.1, 11.2, 11.3, 11.4, 11.5, 11.6,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataPointsTet4::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataPointsTet4::_vertexFieldOther[11*2] = {
   1.2, 2.3, // 0
   3.4, 4.5, // 1
   5.6, 6.7, // 2
@@ -89,7 +102,7 @@
 
 const int pylith::meshio::DataWriterVTKDataPointsTet4::_numPoints = 4;
 const int pylith::meshio::DataWriterVTKDataPointsTet4::_spaceDim = 3;
-const PylithScalar pylith::meshio::DataWriterVTKDataPointsTet4::_points[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataPointsTet4::_points[4*3] = {
   -0.33333333, 0.0, 0.33333333,
   +0.00000001, 0.0, 0.33333333,
   +0.00000001, 0.0, 0.00000001,
@@ -109,13 +122,13 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
   numVertices = _numVertices;
-  assert(3 == numVertexFields);
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
   numPoints = _numPoints;
   spaceDim = _spaceDim;

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataPointsTet4.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataPointsTet4.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataPointsTet4.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -56,9 +56,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Point information.
@@ -66,7 +67,7 @@
   static const int _numPoints; ///< Number of points.
   static const int _spaceDim; ///< Spatial dimension.
   static const PylithScalar _points[]; ///< Coordinates of points.
-  //@}  
+  //@}
 
 }; // DataWriterVTKDataPointsTet4
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataPointsTri3.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataPointsTri3.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataPointsTri3.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -38,16 +38,26 @@
 const char* pylith::meshio::DataWriterVTKDataPointsTri3::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterVTKDataPointsTri3::_numVertexFields = 3;
 const int pylith::meshio::DataWriterVTKDataPointsTri3::_numVertices = 8;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataPointsTri3::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 2 },
+pylith::meshio::DataWriterVTKDataPointsTri3::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 2 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataPointsTri3::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataPointsTri3::_vertexFieldScalar[8*1] = {
+  2.1, // 0
+  3.2, // 1
+  4.3, // 2
+  5.4, // 3
+  6.5, // 4
+  7.6, // 5
+  8.7,
+  9.8
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataPointsTri3::_vertexFieldVector[8*2] = {
   1.1, 2.2, // 0
   3.3, 4.4, // 1
   5.5, 6.6, // 2
@@ -57,17 +67,17 @@
   13.3, 14.4,
   15.5, 16.6,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataPointsTri3::_vertexField1[] = {
-  2.1, // 0
-  3.2, // 1
-  4.3, // 2
-  5.4, // 3
-  6.5, // 4
-  7.6, // 5
-  8.7,
-  9.8
+const PylithScalar pylith::meshio::DataWriterVTKDataPointsTri3::_vertexFieldTensor[8*3] = {
+  1.1, 1.2, 1.3,
+  2.1, 2.2, 2.3,
+  3.1, 3.2, 3.3,
+  4.1, 4.2, 4.3,
+  5.1, 5.2, 5.3,
+  6.1, 6.2, 6.3,
+  7.1, 7.2, 7.3,
+  8.1, 8.2, 8.3,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataPointsTri3::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataPointsTri3::_vertexFieldOther[8*2] = {
   1.2, 2.3, // 0
   3.4, 4.5, // 1
   5.6, 6.7, // 2
@@ -80,7 +90,7 @@
 
 const int pylith::meshio::DataWriterVTKDataPointsTri3::_numPoints = 3;
 const int pylith::meshio::DataWriterVTKDataPointsTri3::_spaceDim = 2;
-const PylithScalar pylith::meshio::DataWriterVTKDataPointsTri3::_points[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataPointsTri3::_points[3*2] = {
  -0.3333333, 0.0,
   0.0000001, 0.0,
   0.9999999, 0.0,
@@ -99,13 +109,13 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
   numVertices = _numVertices;
-  assert(3 == numVertexFields);
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
   numPoints = _numPoints;
   spaceDim = _spaceDim;

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataPointsTri3.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataPointsTri3.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataPointsTri3.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -56,9 +56,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Point information.
@@ -66,7 +67,7 @@
   static const int _numPoints; ///< Number of points.
   static const int _spaceDim; ///< Spatial dimension.
   static const PylithScalar _points[]; ///< Coordinates of points.
-  //@}  
+  //@}
 
 }; // DataWriterVTKDataPointsTri3
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshHex8.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshHex8.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshHex8.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -43,16 +43,19 @@
 const char* pylith::meshio::DataWriterVTKDataSubMeshHex8::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterVTKDataSubMeshHex8::_numVertexFields = 3;
 const int pylith::meshio::DataWriterVTKDataSubMeshHex8::_numVertices = 12;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataSubMeshHex8::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 3 },
+pylith::meshio::DataWriterVTKDataSubMeshHex8::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshHex8::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshHex8::_vertexFieldScalar[12*1] = {
+  2.1, 3.2, 4.3, 5.4, 6.5, 7.6, 8.7, 9.8, 10.9, 11.8, 12.7, 13.6
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshHex8::_vertexFieldVector[12*3] = {
   1.1, 2.2, 3.3,
   4.4, 5.5, 6.6,
   7.7, 8.8, 9.9,
@@ -66,10 +69,21 @@
   7.9, 8.1, 9.2,
   10.3, 11.4, 12.5,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshHex8::_vertexField1[] = {
-  2.1, 3.2, 4.3, 5.4, 6.5, 7.6, 8.7, 9.8, 10.9, 11.8, 12.7, 13.6
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshHex8::_vertexFieldTensor[12*6] = {
+  1.1, 1.2, 1.3, 1.4, 1.5, 1.6,
+  2.1, 2.2, 2.3, 2.4, 2.5, 2.6,
+  3.1, 3.2, 3.3, 3.4, 3.5, 3.6,
+  4.1, 4.2, 4.3, 4.4, 4.5, 4.6,
+  5.1, 5.2, 5.3, 5.4, 5.5, 5.6,
+  6.1, 6.2, 6.3, 6.4, 6.5, 6.6,
+  7.1, 7.2, 7.3, 7.4, 7.5, 7.6,
+  8.1, 8.2, 8.3, 8.4, 8.5, 8.6,
+  9.1, 9.2, 9.3, 9.4, 9.5, 9.6,
+  10.1, 10.2, 10.3, 10.4, 10.5, 10.6,
+  11.1, 11.2, 11.3, 11.4, 11.5, 11.6,
+  12.1, 12.2, 12.3, 12.4, 12.5, 12.6,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshHex8::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshHex8::_vertexFieldOther[12*2] = {
   1.2, 2.3,
   3.4, 4.5,
   5.6, 6.7,
@@ -84,26 +98,30 @@
   11.5, 11.6,
 };
 
-const int pylith::meshio::DataWriterVTKDataSubMeshHex8::_numCellFields = 3;
 const int pylith::meshio::DataWriterVTKDataSubMeshHex8::_numCells = 2;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataSubMeshHex8::_cellFields[] = {
+pylith::meshio::DataWriterVTKDataSubMeshHex8::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 3 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 6 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
+  { "other", topology::FieldBase::TENSOR, 3 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshHex8::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshHex8::_cellFieldScalar[2*1] = {
+  2.1, 3.2,
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshHex8::_cellFieldVector[2*3] = {
   1.1, 2.2, 3.3,
-  4.4, 5.5, 6.6
+  4.4, 5.5, 6.6,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshHex8::_cellField1[] = {
-  2.1, 3.2,
-};
-const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshHex8::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshHex8::_cellFieldTensor[2*6] = {
   1.2, 2.3, 3.4, 4.5, 5.6, 6.7,
-  7.8, 8.9, 9.0, 10.1, 11.2, 12.3
+  7.8, 8.9, 9.0, 10.1, 11.2, 12.3,
 };
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshHex8::_cellFieldOther[2*3] = {
+  1.2, 2.3, 3.4,
+  7.8, 8.9, 9.0,
+};
 
 pylith::meshio::DataWriterVTKDataSubMeshHex8::DataWriterVTKDataSubMeshHex8(void)
 { // constructor
@@ -119,21 +137,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
   numVertices = _numVertices;
-  assert(3 == numVertexFields);
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
   numCells = _numCells;
-  assert(3 == numCellFields);
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterVTKDataSubMeshHex8::~DataWriterVTKDataSubMeshHex8(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshHex8.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshHex8.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshHex8.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -58,9 +58,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -69,9 +70,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterVTKDataSubMeshHex8

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshLine2.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshLine2.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshLine2.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -44,26 +44,25 @@
 const char* pylith::meshio::DataWriterVTKDataSubMeshLine2::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterVTKDataSubMeshLine2::_numVertexFields = 3;
 const int pylith::meshio::DataWriterVTKDataSubMeshLine2::_numVertices = 5;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataSubMeshLine2::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 2 },
+pylith::meshio::DataWriterVTKDataSubMeshLine2::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 1 },
+  { "stress", topology::FieldBase::TENSOR, 1 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshLine2::_vertexField0[] = {
-  1.1, 2.2,
-  3.3, 4.4,
-  5.5, 6.6,
-  7.7, 8.8,
-  9.9, 10.0,
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshLine2::_vertexFieldScalar[5*1] = {
+  1.1,  3.3,  5.5,  7.7,  9.9,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshLine2::_vertexField1[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshLine2::_vertexFieldVector[5*1] = {
   2.1, 3.2, 4.3, 5.4, 6.5,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshLine2::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshLine2::_vertexFieldTensor[5*1] = {
+  3.1, 4.2, 5.3, 6.4, 7.5,
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshLine2::_vertexFieldOther[5*2] = {
   1.2, 2.3,
   3.4, 4.5,
   5.6, 6.7,
@@ -71,22 +70,25 @@
   9.0, 10.1,
 };
 
-const int pylith::meshio::DataWriterVTKDataSubMeshLine2::_numCellFields = 3;
 const int pylith::meshio::DataWriterVTKDataSubMeshLine2::_numCells = 1;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataSubMeshLine2::_cellFields[] = {
-  { "traction", topology::FieldBase::VECTOR, 2 },
+pylith::meshio::DataWriterVTKDataSubMeshLine2::_cellFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 3 },
+  { "traction", topology::FieldBase::VECTOR, 1 },
+  { "stress", topology::FieldBase::TENSOR, 1 },
+  { "other", topology::FieldBase::OTHER, 3 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshLine2::_cellField0[] = {
-  1.1, 2.2,
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshLine2::_cellFieldScalar[1*1] = {
+  1.1,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshLine2::_cellField1[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshLine2::_cellFieldVector[1*1] = {
   2.1,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshLine2::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshLine2::_cellFieldTensor[1*1] = {
+  3.1,
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshLine2::_cellFieldOther[1*3] = {
   1.2, 2.3, 3.4,
 };
 
@@ -104,21 +106,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
   numVertices = _numVertices;
-  assert(3 == numVertexFields);
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
   numCells = _numCells;
-  assert(3 == numCellFields);
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterVTKDataSubMeshLine2::~DataWriterVTKDataSubMeshLine2(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshLine2.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshLine2.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshLine2.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -58,9 +58,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -69,9 +70,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterVTKDataSubMeshLine2

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshQuad4.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshQuad4.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshQuad4.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -40,16 +40,19 @@
 const char* pylith::meshio::DataWriterVTKDataSubMeshQuad4::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterVTKDataSubMeshQuad4::_numVertexFields = 3;
 const int pylith::meshio::DataWriterVTKDataSubMeshQuad4::_numVertices = 6;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataSubMeshQuad4::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 2 },
+pylith::meshio::DataWriterVTKDataSubMeshQuad4::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 2 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshQuad4::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshQuad4::_vertexFieldScalar[6*1] = {
+  2.1, 3.2, 4.3, 5.4, 6.5, 7.6,
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshQuad4::_vertexFieldVector[6*2] = {
   1.1, 2.2,
   3.3, 4.4,
   5.5, 6.6,
@@ -57,10 +60,15 @@
   9.9, 10.0,
   11.1, 12.2,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshQuad4::_vertexField1[] = {
-  2.1, 3.2, 4.3, 5.4, 6.5, 7.6,
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshQuad4::_vertexFieldTensor[6*3] = {
+  1.1, 1.2, 1.3,
+  2.1, 2.2, 2.3,
+  3.1, 3.2, 3.3,
+  4.1, 4.2, 4.3,
+  5.1, 5.2, 5.3,
+  6.1, 6.2, 6.3,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshQuad4::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshQuad4::_vertexFieldOther[6*3] = {
   1.2, 2.3,
   3.4, 4.5,
   5.6, 6.7,
@@ -69,26 +77,30 @@
   11.3, 12.4,
 };
 
-const int pylith::meshio::DataWriterVTKDataSubMeshQuad4::_numCellFields = 3;
 const int pylith::meshio::DataWriterVTKDataSubMeshQuad4::_numCells = 2;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataSubMeshQuad4::_cellFields[] = {
+pylith::meshio::DataWriterVTKDataSubMeshQuad4::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 2 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
+  { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshQuad4::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshQuad4::_cellFieldScalar[2*1] = {
+  2.1, 3.2,
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshQuad4::_cellFieldVector[2*2] = {
   1.1, 2.2,
   3.3, 4.4,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshQuad4::_cellField1[] = {
-  2.1, 3.2,
-};
-const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshQuad4::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshQuad4::_cellFieldTensor[2*3] = {
   1.2, 2.3, 3.4,
   4.5, 5.6, 6.7,
 };
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshQuad4::_cellFieldOther[2*2] = {
+  1.2, 2.3,
+  4.5, 5.6,
+};
 
 pylith::meshio::DataWriterVTKDataSubMeshQuad4::DataWriterVTKDataSubMeshQuad4(void)
 { // constructor
@@ -102,21 +114,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
-  assert(3 == numVertexFields);
   numVertices = _numVertices;
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
-  assert(3 == numCellFields);
   numCells = _numCells;
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterVTKDataSubMeshQuad4::~DataWriterVTKDataSubMeshQuad4(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshQuad4.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshQuad4.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshQuad4.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -56,9 +56,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -67,9 +68,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterVTKDataSubMeshQuad4

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshTet4.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshTet4.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshTet4.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -43,26 +43,33 @@
 const char* pylith::meshio::DataWriterVTKDataSubMeshTet4::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterVTKDataSubMeshTet4::_numVertexFields = 3;
 const int pylith::meshio::DataWriterVTKDataSubMeshTet4::_numVertices = 5;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataSubMeshTet4::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 3 },
+pylith::meshio::DataWriterVTKDataSubMeshTet4::_vertexFields[4] = {
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshTet4::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshTet4::_vertexFieldScalar[5*1] = {
+  2.1, 3.2, 4.3, 5.4, 6.5,
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshTet4::_vertexFieldVector[5*3] = {
   1.1, 2.2, 3.3,
   4.4, 5.5, 6.6,
   7.7, 8.8, 9.9,
   10.0, 11.1, 12.2,
   13.3, 14.4, 15.5,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshTet4::_vertexField1[] = {
-  2.1, 3.2, 4.3, 5.4, 6.5,
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshTet4::_vertexFieldTensor[5*6] = {
+  1.1, 1.2, 1.3, 1.4, 1.5, 1.6,
+  2.1, 2.2, 2.3, 2.4, 2.5, 2.6,
+  3.1, 3.2, 3.3, 3.4, 3.5, 3.6,
+  4.1, 4.2, 4.3, 4.4, 4.5, 4.6,
+  5.1, 5.2, 5.3, 5.4, 5.5, 5.6,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshTet4::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshTet4::_vertexFieldOther[5*2] = {
   1.2, 2.3,
   3.4, 4.5,
   5.6, 6.7,
@@ -70,26 +77,30 @@
   9.0, 10.1,
 };
 
-const int pylith::meshio::DataWriterVTKDataSubMeshTet4::_numCellFields = 3;
 const int pylith::meshio::DataWriterVTKDataSubMeshTet4::_numCells = 2;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataSubMeshTet4::_cellFields[] = {
+pylith::meshio::DataWriterVTKDataSubMeshTet4::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 3 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 6 },
+  { "stress", topology::FieldBase::TENSOR, 6 },
+  { "other", topology::FieldBase::OTHER, 4 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshTet4::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshTet4::_cellFieldScalar[2*1] = {
+  2.1, 3.2
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshTet4::_cellFieldVector[2*3] = {
   1.1, 2.2, 3.3,
   4.4, 5.5, 6.6,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshTet4::_cellField1[] = {
-  2.1, 3.2
-};
-const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshTet4::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshTet4::_cellFieldTensor[2*6] = {
   1.2, 2.3, 3.4, 4.5, 5.6, 6.7,
   7.8, 8.9, 9.0, 10.1, 11.2, 12.3,
 };
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshTet4::_cellFieldOther[2*4] = {
+  1.2, 2.3, 3.4, 4.5,
+  7.8, 8.9, 9.0, 10.1,
+};
 
 pylith::meshio::DataWriterVTKDataSubMeshTet4::DataWriterVTKDataSubMeshTet4(void)
 { // constructor
@@ -105,21 +116,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
-  assert(3 == numVertexFields);
   numVertices = _numVertices;
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
-  assert(3 == numCellFields);
   numCells = _numCells;
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterVTKDataSubMeshTet4::~DataWriterVTKDataSubMeshTet4(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshTet4.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshTet4.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshTet4.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -58,9 +58,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -69,9 +70,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterVTKDataSubMeshTet4

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshTri3.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshTri3.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshTri3.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -44,16 +44,19 @@
 const char* pylith::meshio::DataWriterVTKDataSubMeshTri3::_timeFormat = 
   "%3.1f";
 
-const int pylith::meshio::DataWriterVTKDataSubMeshTri3::_numVertexFields = 3;
 const int pylith::meshio::DataWriterVTKDataSubMeshTri3::_numVertices = 8;
 
 const pylith::meshio::DataWriterData::FieldStruct
 pylith::meshio::DataWriterVTKDataSubMeshTri3::_vertexFields[] = {
-  { "displacements", topology::FieldBase::VECTOR, 2 },
   { "pressure", topology::FieldBase::SCALAR, 1 },
+  { "displacement", topology::FieldBase::VECTOR, 2 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
   { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshTri3::_vertexField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshTri3::_vertexFieldScalar[8*1] = {
+  2.1, 3.2, 4.3, 5.4, 6.5, 7.6, 8.7, 9.8,
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshTri3::_vertexFieldVector[8*2] = {
   1.1, 2.2,
   3.3, 4.4,
   5.5, 6.6,
@@ -63,10 +66,17 @@
   13.3, 14.4,
   15.5, 16.6,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshTri3::_vertexField1[] = {
-  2.1, 3.2, 4.3, 5.4, 6.5, 7.6, 8.7, 9.8,
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshTri3::_vertexFieldTensor[8*3] = {
+  1.1, 1.2, 1.3,
+  2.1, 2.2, 2.3,
+  3.1, 3.2, 3.3,
+  4.1, 4.2, 4.3,
+  5.1, 5.2, 5.3,
+  6.1, 6.2, 6.3,
+  7.1, 7.2, 7.3,
+  8.1, 8.2, 8.3,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshTri3::_vertexField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshTri3::_vertexFieldOther[8*2] = {
   1.2, 2.3,
   3.4, 4.5,
   5.6, 6.7,
@@ -77,24 +87,27 @@
   15.6, 16.7,
 };
 
-const int pylith::meshio::DataWriterVTKDataSubMeshTri3::_numCellFields = 3;
 const int pylith::meshio::DataWriterVTKDataSubMeshTri3::_numCells = 1;
 
 const pylith::meshio::DataWriterData::FieldStruct
-pylith::meshio::DataWriterVTKDataSubMeshTri3::_cellFields[] = {
+pylith::meshio::DataWriterVTKDataSubMeshTri3::_cellFields[4] = {
+  { "pressure", topology::FieldBase::SCALAR, 1 },
   { "traction", topology::FieldBase::VECTOR, 2 },
-  { "pressure", topology::FieldBase::SCALAR, 1 },
-  { "other", topology::FieldBase::TENSOR, 3 },
+  { "stress", topology::FieldBase::TENSOR, 3 },
+  { "other", topology::FieldBase::OTHER, 2 },
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshTri3::_cellField0[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshTri3::_cellFieldScalar[1*1] = {
+  2.1,
+};
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshTri3::_cellFieldVector[1*2] = {
   1.1, 2.2,
 };
-const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshTri3::_cellField1[] = {
-  2.1,
-};
-const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshTri3::_cellField2[] = {
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshTri3::_cellFieldTensor[1*3] = {
   1.2, 2.3, 3.4,
 };
+const PylithScalar pylith::meshio::DataWriterVTKDataSubMeshTri3::_cellFieldOther[1*2] = {
+  1.2, 2.3,
+};
 
 pylith::meshio::DataWriterVTKDataSubMeshTri3::DataWriterVTKDataSubMeshTri3(void)
 { // constructor
@@ -110,21 +123,21 @@
   time = _time;
   timeFormat = const_cast<char*>(_timeFormat);
   
-  numVertexFields = _numVertexFields;
   numVertices = _numVertices;
-  assert(3 == numVertexFields);
+  assert(DataWriterData::numVertexFields == numVertexFields);
   vertexFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_vertexFields);
-  vertexFields[0] = const_cast<PylithScalar*>(_vertexField0);
-  vertexFields[1] = const_cast<PylithScalar*>(_vertexField1);
-  vertexFields[2] = const_cast<PylithScalar*>(_vertexField2);
+  vertexFields[0] = const_cast<PylithScalar*>(_vertexFieldScalar);
+  vertexFields[1] = const_cast<PylithScalar*>(_vertexFieldVector);
+  vertexFields[2] = const_cast<PylithScalar*>(_vertexFieldTensor);
+  vertexFields[3] = const_cast<PylithScalar*>(_vertexFieldOther);
 
-  numCellFields = _numCellFields;
   numCells = _numCells;
-  assert(3 == numCellFields);
+  assert(DataWriterData::numCellFields == numCellFields);
   cellFieldsInfo = const_cast<DataWriterData::FieldStruct*>(_cellFields);
-  cellFields[0] = const_cast<PylithScalar*>(_cellField0);
-  cellFields[1] = const_cast<PylithScalar*>(_cellField1);
-  cellFields[2] = const_cast<PylithScalar*>(_cellField2);
+  cellFields[0] = const_cast<PylithScalar*>(_cellFieldScalar);
+  cellFields[1] = const_cast<PylithScalar*>(_cellFieldVector);
+  cellFields[2] = const_cast<PylithScalar*>(_cellFieldTensor);
+  cellFields[3] = const_cast<PylithScalar*>(_cellFieldOther);
 } // constructor
 
 pylith::meshio::DataWriterVTKDataSubMeshTri3::~DataWriterVTKDataSubMeshTri3(void)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshTri3.hh
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshTri3.hh	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/DataWriterVTKDataSubMeshTri3.hh	2012-11-01 17:04:11 UTC (rev 20976)
@@ -58,9 +58,10 @@
   static const int _numVertices; ///< Number of vertices.
   static const FieldStruct _vertexFields[]; ///< Array of vertex fields.
 
-  static const PylithScalar _vertexField0[]; ///< Values for vertex field 0.
-  static const PylithScalar _vertexField1[]; ///< Values for vertex field 1.
-  static const PylithScalar _vertexField2[]; ///< Values for vertex field 2.
+  static const PylithScalar _vertexFieldScalar[]; ///< Values for scalar vertex field.
+  static const PylithScalar _vertexFieldVector[]; ///< Values for vector vertex field .
+  static const PylithScalar _vertexFieldTensor[]; ///< Values for tensor vertex field.
+  static const PylithScalar _vertexFieldOther[]; ///< Values for other vertex field.
   //@}
 
   /// @name Cell field information.
@@ -69,9 +70,10 @@
   static const int _numCells; ///< Number of cells.
   static const FieldStruct _cellFields[]; ///< Array of cell fields.
 
-  static const PylithScalar _cellField0[]; ///< Values for cell field 0.
-  static const PylithScalar _cellField1[]; ///< Values for cell field 1.
-  static const PylithScalar _cellField2[]; ///< Values for cell field 2.
+  static const PylithScalar _cellFieldScalar[]; ///< Values for scalar cell field.
+  static const PylithScalar _cellFieldVector[]; ///< Values for vector cell field.
+  static const PylithScalar _cellFieldTensor[]; ///< Values for tensor cell field.
+  static const PylithScalar _cellFieldOther[]; ///< Values for other cell field.
   //@}
 
 }; // DataWriterVTKDataSubMeshTri3

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/Makefile.am	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/Makefile.am	2012-11-01 17:04:11 UTC (rev 20976)
@@ -124,7 +124,9 @@
 	tri3_vertex.xmf \
 	quad4.h5 \
 	quad4_cell.h5 \
+	quad4_cell.xmf \
 	quad4_vertex.h5 \
+	quad4_vertex.xmf \
 	tet4.h5 \
 	tet4_cell.h5 \
 	tet4_cell.xmf \
@@ -132,7 +134,9 @@
 	tet4_vertex.xmf \
 	hex8.h5 \
 	hex8_cell.h5 \
+	hex8_cell.xmf \
 	hex8_vertex.h5 \
+	hex8_vertex.xmf \
 	line2_mat.h5 \
 	line2_mat_vertex.h5 \
 	line2_mat_cell.h5 \

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/OutputSolnPointsDataHex8.cc
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/OutputSolnPointsDataHex8.cc	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/OutputSolnPointsDataHex8.cc	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_bc_cell.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_bc_cell_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_bc_cell_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_bc_cell_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -18,14 +18,18 @@
 9
 9
 CELL_DATA 2
-VECTORS traction double
-1.100000e+00 2.200000e+00 3.300000e+00
-4.400000e+00 5.500000e+00 6.600000e+00
 SCALARS pressure double 1
 LOOKUP_TABLE default
 2.100000e+00
 3.200000e+00
-SCALARS other double 6
+VECTORS traction double
+1.100000e+00 2.200000e+00 3.300000e+00
+4.400000e+00 5.500000e+00 6.600000e+00
+SCALARS stress double 6
 LOOKUP_TABLE default
 1.200000e+00 2.300000e+00 3.400000e+00 4.500000e+00 5.600000e+00 6.700000e+00
 7.800000e+00 8.900000e+00 9.000000e+00 1.010000e+01 1.120000e+01 1.230000e+01
+SCALARS other double 2
+LOOKUP_TABLE default
+1.100000e+00 2.200000e+00
+5.500000e+00 6.600000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_bc_vertex.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_bc_vertex_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_bc_vertex_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_bc_vertex_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -18,15 +18,6 @@
 9
 9
 POINT_DATA 8
-VECTORS displacements double
-1.100000e+00 2.200000e+00 3.300000e+00
-4.400000e+00 5.500000e+00 6.600000e+00
-7.700000e+00 8.800000e+00 9.900000e+00
-1.010000e+01 1.120000e+01 1.230000e+01
-1.200000e+00 2.300000e+00 3.400000e+00
-4.500000e+00 5.600000e+00 6.700000e+00
-7.800000e+00 8.900000e+00 9.000000e+00
-1.020000e+01 1.130000e+01 1.240000e+01
 SCALARS pressure double 1
 LOOKUP_TABLE default
 2.100000e+00
@@ -37,6 +28,25 @@
 7.600000e+00
 8.700000e+00
 9.800000e+00
+VECTORS displacement double
+1.100000e+00 2.200000e+00 3.300000e+00
+4.400000e+00 5.500000e+00 6.600000e+00
+7.700000e+00 8.800000e+00 9.900000e+00
+1.010000e+01 1.120000e+01 1.230000e+01
+1.200000e+00 2.300000e+00 3.400000e+00
+4.500000e+00 5.600000e+00 6.700000e+00
+7.800000e+00 8.900000e+00 9.000000e+00
+1.020000e+01 1.130000e+01 1.240000e+01
+SCALARS stress double 6
+LOOKUP_TABLE default
+1.100000e+00 1.200000e+00 1.300000e+00 1.400000e+00 1.500000e+00 1.600000e+00
+2.100000e+00 2.200000e+00 2.300000e+00 2.400000e+00 2.500000e+00 2.600000e+00
+3.100000e+00 3.200000e+00 3.300000e+00 3.400000e+00 3.500000e+00 3.600000e+00
+4.100000e+00 4.200000e+00 4.300000e+00 4.400000e+00 4.500000e+00 4.600000e+00
+5.100000e+00 5.200000e+00 5.300000e+00 5.400000e+00 5.500000e+00 5.600000e+00
+6.100000e+00 6.200000e+00 6.300000e+00 6.400000e+00 6.500000e+00 6.600000e+00
+7.100000e+00 7.200000e+00 7.300000e+00 7.400000e+00 7.500000e+00 7.600000e+00
+8.100000e+00 8.200000e+00 8.300000e+00 8.400000e+00 8.500000e+00 8.600000e+00
 SCALARS other double 2
 LOOKUP_TABLE default
 1.200000e+00 2.300000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_cell.h5
===================================================================
(Binary files differ)

Copied: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_cell.xmf (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/meshio/data/hex8_cell.xmf)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_cell.xmf	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_cell.xmf	2012-11-01 17:04:11 UTC (rev 20976)
@@ -0,0 +1,256 @@
+<?xml version="1.0" ?>
+<!DOCTYPE Xdmf SYSTEM "Xdmf.dtd" [
+<!ENTITY HeavyData "hex8_cell.h5">
+]>
+
+<Xdmf>
+  <Domain Name="domain">
+    <DataItem Name="cells"
+	      ItemType="Uniform"
+	      Format="HDF"
+	      NumberType="Float" Precision="8"
+	      Dimensions="2 8">
+      &HeavyData;:/topology/cells
+    </DataItem>
+    <DataItem Name="vertices"
+	      Format="HDF"
+	      Dimensions="16 3">
+      &HeavyData;:/geometry/vertices
+    </DataItem>
+    <!-- ============================================================ -->
+    <Grid Name="domain" GridType="Uniform">
+	<Topology
+	   TopologyType="Hexahedron"
+	   NumberOfElements="2">
+	  <DataItem Reference="XML">
+	    /Xdmf/Domain/DataItem[@Name="cells"]
+	  </DataItem>
+	</Topology>
+	<Geometry GeometryType="XYZ">
+	  <DataItem Reference="XML">
+	    /Xdmf/Domain/DataItem[@Name="vertices"]
+	  </DataItem>
+	</Geometry>
+	<Attribute
+	   Name="other_0"
+	   Type="Scalar"
+	   Center="Cell">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 2 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 0
+              1 1 1
+              1 2 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 2 2"
+	       Format="HDF">
+	      &HeavyData;:/cell_fields/other
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="other_1"
+	   Type="Scalar"
+	   Center="Cell">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 2 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 1
+              1 1 1
+              1 2 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 2 2"
+	       Format="HDF">
+	      &HeavyData;:/cell_fields/other
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="pressure"
+	   Type="Scalar"
+	   Center="Cell">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 2 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 0
+              1 1 1
+              1 2 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 2 1"
+	       Format="HDF">
+	      &HeavyData;:/cell_fields/pressure
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="stress_xx"
+	   Type="Scalar"
+	   Center="Cell">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 2 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 0
+              1 1 1
+              1 2 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 2 6"
+	       Format="HDF">
+	      &HeavyData;:/cell_fields/stress
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="stress_yy"
+	   Type="Scalar"
+	   Center="Cell">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 2 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 1
+              1 1 1
+              1 2 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 2 6"
+	       Format="HDF">
+	      &HeavyData;:/cell_fields/stress
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="stress_zz"
+	   Type="Scalar"
+	   Center="Cell">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 2 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 2
+              1 1 1
+              1 2 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 2 6"
+	       Format="HDF">
+	      &HeavyData;:/cell_fields/stress
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="stress_xy"
+	   Type="Scalar"
+	   Center="Cell">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 2 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 3
+              1 1 1
+              1 2 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 2 6"
+	       Format="HDF">
+	      &HeavyData;:/cell_fields/stress
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="stress_yz"
+	   Type="Scalar"
+	   Center="Cell">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 2 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 4
+              1 1 1
+              1 2 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 2 6"
+	       Format="HDF">
+	      &HeavyData;:/cell_fields/stress
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="stress_xz"
+	   Type="Scalar"
+	   Center="Cell">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 2 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 5
+              1 1 1
+              1 2 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 2 6"
+	       Format="HDF">
+	      &HeavyData;:/cell_fields/stress
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="traction"
+	   Type="Vector"
+	   Center="Cell">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 2 3"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 0
+              1 1 1
+              1 2 3
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 2 3"
+	       Format="HDF">
+	      &HeavyData;:/cell_fields/traction
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+    </Grid>
+  </Domain>
+</Xdmf>

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_cell_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_cell_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_cell_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -26,14 +26,18 @@
 12
 12
 CELL_DATA 2
-VECTORS traction double
-1.100000e+00 2.200000e+00 3.300000e+00
-4.400000e+00 5.500000e+00 6.600000e+00
 SCALARS pressure double 1
 LOOKUP_TABLE default
 2.100000e+00
 3.200000e+00
-SCALARS other double 6
+VECTORS traction double
+1.100000e+00 2.200000e+00 3.300000e+00
+4.400000e+00 5.500000e+00 6.600000e+00
+SCALARS stress double 6
 LOOKUP_TABLE default
 1.200000e+00 2.300000e+00 3.400000e+00 4.500000e+00 5.600000e+00 6.700000e+00
 1.100000e+00 2.200000e+00 3.300000e+00 4.400000e+00 5.500000e+00 6.600000e+00
+SCALARS other double 2
+LOOKUP_TABLE default
+1.200000e+00 2.300000e+00
+1.100000e+00 2.200000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_fault_cell.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_fault_cell_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_fault_cell_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_fault_cell_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -12,11 +12,13 @@
 CELL_TYPES 1
 9
 CELL_DATA 1
-VECTORS traction double
-1.100000e+00 2.200000e+00 3.300000e+00
 SCALARS pressure double 1
 LOOKUP_TABLE default
 2.100000e+00
-SCALARS other double 6
+VECTORS traction double
+1.100000e+00 2.200000e+00 3.300000e+00
+SCALARS stress double 6
 LOOKUP_TABLE default
 1.200000e+00 2.300000e+00 3.400000e+00 4.500000e+00 5.600000e+00 6.700000e+00
+VECTORS other double
+1.200000e+00 2.300000e+00 3.400000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_fault_vertex.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_fault_vertex_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_fault_vertex_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_fault_vertex_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -12,17 +12,23 @@
 CELL_TYPES 1
 9
 POINT_DATA 4
-VECTORS displacements double
-1.100000e+00 2.200000e+00 3.300000e+00
-4.400000e+00 5.500000e+00 6.600000e+00
-7.700000e+00 8.800000e+00 9.900000e+00
-1.010000e+01 1.120000e+01 1.230000e+01
 SCALARS pressure double 1
 LOOKUP_TABLE default
 2.100000e+00
 3.200000e+00
 4.300000e+00
 5.400000e+00
+VECTORS displacement double
+1.100000e+00 2.200000e+00 3.300000e+00
+4.400000e+00 5.500000e+00 6.600000e+00
+7.700000e+00 8.800000e+00 9.900000e+00
+1.010000e+01 1.120000e+01 1.230000e+01
+SCALARS stress double 6
+LOOKUP_TABLE default
+1.100000e+00 1.200000e+00 1.300000e+00 1.400000e+00 1.500000e+00 1.600000e+00
+2.100000e+00 2.200000e+00 2.300000e+00 2.400000e+00 2.500000e+00 2.600000e+00
+3.100000e+00 3.200000e+00 3.300000e+00 3.400000e+00 3.500000e+00 3.600000e+00
+4.100000e+00 4.200000e+00 4.300000e+00 4.400000e+00 4.500000e+00 4.600000e+00
 SCALARS other double 2
 LOOKUP_TABLE default
 1.200000e+00 2.300000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_mat_cell.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_mat_cell_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_mat_cell_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_mat_cell_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -24,11 +24,14 @@
 CELL_TYPES 1
 12
 CELL_DATA 1
-VECTORS traction double
-1.100000e+00 2.200000e+00 3.300000e+00
 SCALARS pressure double 1
 LOOKUP_TABLE default
 2.100000e+00
-SCALARS other double 6
+VECTORS traction double
+1.100000e+00 2.200000e+00 3.300000e+00
+SCALARS stress double 6
 LOOKUP_TABLE default
 1.200000e+00 2.300000e+00 3.400000e+00 4.500000e+00 5.600000e+00 6.700000e+00
+SCALARS other double 2
+LOOKUP_TABLE default
+1.200000e+00 2.300000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_mat_vertex.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_mat_vertex_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_mat_vertex_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_mat_vertex_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -24,23 +24,6 @@
 CELL_TYPES 1
 12
 POINT_DATA 16
-VECTORS displacements double
-1.100000e+00 2.200000e+00 3.300000e+00
-4.400000e+00 5.500000e+00 6.600000e+00
-7.700000e+00 8.800000e+00 9.900000e+00
-1.010000e+01 1.120000e+01 1.230000e+01
-1.200000e+00 2.300000e+00 3.400000e+00
-4.500000e+00 5.600000e+00 6.700000e+00
-7.800000e+00 8.900000e+00 9.000000e+00
-1.020000e+01 1.130000e+01 1.240000e+01
-1.300000e+00 2.400000e+00 3.500000e+00
-4.600000e+00 5.700000e+00 6.800000e+00
-7.900000e+00 8.000000e+00 9.100000e+00
-1.020000e+01 1.130000e+01 1.240000e+01
-1.350000e+01 1.460000e+01 1.570000e+01
-1.680000e+01 1.790000e+01 1.810000e+01
-1.920000e+01 2.030000e+01 2.140000e+01
-2.250000e+01 2.360000e+01 2.470000e+01
 SCALARS pressure double 1
 LOOKUP_TABLE default
 2.100000e+00
@@ -59,6 +42,41 @@
 1.510000e+01
 1.610000e+01
 1.710000e+01
+VECTORS displacement double
+1.100000e+00 2.200000e+00 3.300000e+00
+4.400000e+00 5.500000e+00 6.600000e+00
+7.700000e+00 8.800000e+00 9.900000e+00
+1.010000e+01 1.120000e+01 1.230000e+01
+1.200000e+00 2.300000e+00 3.400000e+00
+4.500000e+00 5.600000e+00 6.700000e+00
+7.800000e+00 8.900000e+00 9.000000e+00
+1.020000e+01 1.130000e+01 1.240000e+01
+1.300000e+00 2.400000e+00 3.500000e+00
+4.600000e+00 5.700000e+00 6.800000e+00
+7.900000e+00 8.000000e+00 9.100000e+00
+1.020000e+01 1.130000e+01 1.240000e+01
+1.350000e+01 1.460000e+01 1.570000e+01
+1.680000e+01 1.790000e+01 1.810000e+01
+1.920000e+01 2.030000e+01 2.140000e+01
+2.250000e+01 2.360000e+01 2.470000e+01
+SCALARS stress double 6
+LOOKUP_TABLE default
+1.100000e+00 1.200000e+00 1.300000e+00 1.400000e+00 1.500000e+00 1.600000e+00
+2.100000e+00 2.200000e+00 2.300000e+00 2.400000e+00 2.500000e+00 2.600000e+00
+3.100000e+00 3.200000e+00 3.300000e+00 3.400000e+00 3.500000e+00 3.600000e+00
+4.100000e+00 4.200000e+00 4.300000e+00 4.400000e+00 4.500000e+00 4.600000e+00
+5.100000e+00 5.200000e+00 5.300000e+00 5.400000e+00 5.500000e+00 5.600000e+00
+6.100000e+00 6.200000e+00 6.300000e+00 6.400000e+00 6.500000e+00 6.600000e+00
+7.100000e+00 7.200000e+00 7.300000e+00 7.400000e+00 7.500000e+00 7.600000e+00
+8.100000e+00 8.200000e+00 8.300000e+00 8.400000e+00 8.500000e+00 8.600000e+00
+9.100000e+00 9.200000e+00 9.300000e+00 9.400000e+00 9.500000e+00 9.600000e+00
+1.010000e+01 1.020000e+01 1.030000e+01 1.040000e+01 1.050000e+01 1.060000e+01
+1.110000e+01 1.120000e+01 1.130000e+01 1.140000e+01 1.150000e+01 1.160000e+01
+1.210000e+01 1.220000e+01 1.230000e+01 1.240000e+01 1.250000e+01 1.260000e+01
+1.310000e+01 1.320000e+01 1.330000e+01 1.340000e+01 1.350000e+01 1.360000e+01
+1.410000e+01 1.420000e+01 1.430000e+01 1.440000e+01 1.450000e+01 1.460000e+01
+1.510000e+01 1.520000e+01 1.530000e+01 1.540000e+01 1.550000e+01 1.560000e+01
+1.610000e+01 1.620000e+01 1.630000e+01 1.640000e+01 1.650000e+01 1.660000e+01
 SCALARS other double 2
 LOOKUP_TABLE default
 1.200000e+00 2.300000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_points_vertex_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_points_vertex_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_points_vertex_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -18,17 +18,23 @@
 1
 1
 POINT_DATA 4
-VECTORS displacements double
-5.937500e+00 7.037500e+00 7.950000e+00
-5.925000e+00 7.025000e+00 8.125000e+00
-2.950000e+00 4.050000e+00 5.150000e+00
-4.500000e+00 5.600000e+00 6.700000e+00
 SCALARS pressure double 1
 LOOKUP_TABLE default
 8.550000e+00
 7.950000e+00
 1.105000e+01
 7.600000e+00
+VECTORS displacement double
+5.937500e+00 7.037500e+00 7.950000e+00
+5.925000e+00 7.025000e+00 8.125000e+00
+2.950000e+00 4.050000e+00 5.150000e+00
+4.500000e+00 5.600000e+00 6.700000e+00
+SCALARS stress double 6
+LOOKUP_TABLE default
+7.100000e+00 7.200000e+00 7.300000e+00 7.400000e+00 7.500000e+00 7.600000e+00
+6.600000e+00 6.700000e+00 6.800000e+00 6.900000e+00 7.000000e+00 7.100000e+00
+9.600000e+00 9.700000e+00 9.800000e+00 9.900000e+00 1.000000e+01 1.010000e+01
+6.100000e+00 6.200000e+00 6.300000e+00 6.400000e+00 6.500000e+00 6.600000e+00
 SCALARS other double 2
 LOOKUP_TABLE default
 4.575000e+00 5.487500e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_surf_cell.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_surf_cell_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_surf_cell_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_surf_cell_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -16,14 +16,17 @@
 9
 9
 CELL_DATA 2
-VECTORS traction double
-1.100000e+00 2.200000e+00 3.300000e+00
-4.400000e+00 5.500000e+00 6.600000e+00
 SCALARS pressure double 1
 LOOKUP_TABLE default
 2.100000e+00
 3.200000e+00
-SCALARS other double 6
+VECTORS traction double
+1.100000e+00 2.200000e+00 3.300000e+00
+4.400000e+00 5.500000e+00 6.600000e+00
+SCALARS stress double 6
 LOOKUP_TABLE default
 1.200000e+00 2.300000e+00 3.400000e+00 4.500000e+00 5.600000e+00 6.700000e+00
 7.800000e+00 8.900000e+00 9.000000e+00 1.010000e+01 1.120000e+01 1.230000e+01
+VECTORS other double
+1.200000e+00 2.300000e+00 3.400000e+00
+7.800000e+00 8.900000e+00 9.000000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_surf_vertex.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_surf_vertex_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_surf_vertex_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_surf_vertex_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -16,13 +16,6 @@
 9
 9
 POINT_DATA 6
-VECTORS displacements double
-7.800000e+00 8.900000e+00 9.000000e+00
-1.020000e+01 1.130000e+01 1.240000e+01
-1.300000e+00 2.400000e+00 3.500000e+00
-4.600000e+00 5.700000e+00 6.800000e+00
-7.900000e+00 8.100000e+00 9.200000e+00
-1.030000e+01 1.140000e+01 1.250000e+01
 SCALARS pressure double 1
 LOOKUP_TABLE default
 8.700000e+00
@@ -31,6 +24,21 @@
 1.180000e+01
 1.270000e+01
 1.360000e+01
+VECTORS displacement double
+7.800000e+00 8.900000e+00 9.000000e+00
+1.020000e+01 1.130000e+01 1.240000e+01
+1.300000e+00 2.400000e+00 3.500000e+00
+4.600000e+00 5.700000e+00 6.800000e+00
+7.900000e+00 8.100000e+00 9.200000e+00
+1.030000e+01 1.140000e+01 1.250000e+01
+SCALARS stress double 6
+LOOKUP_TABLE default
+7.100000e+00 7.200000e+00 7.300000e+00 7.400000e+00 7.500000e+00 7.600000e+00
+8.100000e+00 8.200000e+00 8.300000e+00 8.400000e+00 8.500000e+00 8.600000e+00
+9.100000e+00 9.200000e+00 9.300000e+00 9.400000e+00 9.500000e+00 9.600000e+00
+1.010000e+01 1.020000e+01 1.030000e+01 1.040000e+01 1.050000e+01 1.060000e+01
+1.110000e+01 1.120000e+01 1.130000e+01 1.140000e+01 1.150000e+01 1.160000e+01
+1.210000e+01 1.220000e+01 1.230000e+01 1.240000e+01 1.250000e+01 1.260000e+01
 SCALARS other double 2
 LOOKUP_TABLE default
 5.700000e+00 6.800000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_vertex.h5
===================================================================
(Binary files differ)

Copied: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_vertex.xmf (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/meshio/data/hex8_vertex.xmf)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_vertex.xmf	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_vertex.xmf	2012-11-01 17:04:11 UTC (rev 20976)
@@ -0,0 +1,256 @@
+<?xml version="1.0" ?>
+<!DOCTYPE Xdmf SYSTEM "Xdmf.dtd" [
+<!ENTITY HeavyData "hex8_vertex.h5">
+]>
+
+<Xdmf>
+  <Domain Name="domain">
+    <DataItem Name="cells"
+	      ItemType="Uniform"
+	      Format="HDF"
+	      NumberType="Float" Precision="8"
+	      Dimensions="2 8">
+      &HeavyData;:/topology/cells
+    </DataItem>
+    <DataItem Name="vertices"
+	      Format="HDF"
+	      Dimensions="16 3">
+      &HeavyData;:/geometry/vertices
+    </DataItem>
+    <!-- ============================================================ -->
+    <Grid Name="domain" GridType="Uniform">
+	<Topology
+	   TopologyType="Hexahedron"
+	   NumberOfElements="2">
+	  <DataItem Reference="XML">
+	    /Xdmf/Domain/DataItem[@Name="cells"]
+	  </DataItem>
+	</Topology>
+	<Geometry GeometryType="XYZ">
+	  <DataItem Reference="XML">
+	    /Xdmf/Domain/DataItem[@Name="vertices"]
+	  </DataItem>
+	</Geometry>
+	<Attribute
+	   Name="displacement"
+	   Type="Vector"
+	   Center="Node">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 16 3"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 0
+              1 1 1
+              1 16 3
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 16 3"
+	       Format="HDF">
+	      &HeavyData;:/vertex_fields/displacement
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="other_0"
+	   Type="Scalar"
+	   Center="Node">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 16 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 0
+              1 1 1
+              1 16 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 16 2"
+	       Format="HDF">
+	      &HeavyData;:/vertex_fields/other
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="other_1"
+	   Type="Scalar"
+	   Center="Node">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 16 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 1
+              1 1 1
+              1 16 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 16 2"
+	       Format="HDF">
+	      &HeavyData;:/vertex_fields/other
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="pressure"
+	   Type="Scalar"
+	   Center="Node">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 16 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 0
+              1 1 1
+              1 16 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 16 1"
+	       Format="HDF">
+	      &HeavyData;:/vertex_fields/pressure
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="stress_xx"
+	   Type="Scalar"
+	   Center="Node">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 16 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 0
+              1 1 1
+              1 16 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 16 6"
+	       Format="HDF">
+	      &HeavyData;:/vertex_fields/stress
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="stress_yy"
+	   Type="Scalar"
+	   Center="Node">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 16 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 1
+              1 1 1
+              1 16 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 16 6"
+	       Format="HDF">
+	      &HeavyData;:/vertex_fields/stress
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="stress_zz"
+	   Type="Scalar"
+	   Center="Node">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 16 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 2
+              1 1 1
+              1 16 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 16 6"
+	       Format="HDF">
+	      &HeavyData;:/vertex_fields/stress
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="stress_xy"
+	   Type="Scalar"
+	   Center="Node">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 16 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 3
+              1 1 1
+              1 16 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 16 6"
+	       Format="HDF">
+	      &HeavyData;:/vertex_fields/stress
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="stress_yz"
+	   Type="Scalar"
+	   Center="Node">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 16 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 4
+              1 1 1
+              1 16 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 16 6"
+	       Format="HDF">
+	      &HeavyData;:/vertex_fields/stress
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="stress_xz"
+	   Type="Scalar"
+	   Center="Node">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 16 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 5
+              1 1 1
+              1 16 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 16 6"
+	       Format="HDF">
+	      &HeavyData;:/vertex_fields/stress
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+    </Grid>
+  </Domain>
+</Xdmf>

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_vertex_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_vertex_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/hex8_vertex_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -26,23 +26,6 @@
 12
 12
 POINT_DATA 16
-VECTORS displacements double
-1.100000e+00 2.200000e+00 3.300000e+00
-4.400000e+00 5.500000e+00 6.600000e+00
-7.700000e+00 8.800000e+00 9.900000e+00
-1.010000e+01 1.120000e+01 1.230000e+01
-1.200000e+00 2.300000e+00 3.400000e+00
-4.500000e+00 5.600000e+00 6.700000e+00
-7.800000e+00 8.900000e+00 9.000000e+00
-1.020000e+01 1.130000e+01 1.240000e+01
-1.300000e+00 2.400000e+00 3.500000e+00
-4.600000e+00 5.700000e+00 6.800000e+00
-7.900000e+00 8.000000e+00 9.100000e+00
-1.020000e+01 1.130000e+01 1.240000e+01
-1.350000e+01 1.460000e+01 1.570000e+01
-1.680000e+01 1.790000e+01 1.810000e+01
-1.920000e+01 2.030000e+01 2.140000e+01
-2.250000e+01 2.360000e+01 2.470000e+01
 SCALARS pressure double 1
 LOOKUP_TABLE default
 2.100000e+00
@@ -61,6 +44,41 @@
 1.510000e+01
 1.610000e+01
 1.710000e+01
+VECTORS displacement double
+1.100000e+00 2.200000e+00 3.300000e+00
+4.400000e+00 5.500000e+00 6.600000e+00
+7.700000e+00 8.800000e+00 9.900000e+00
+1.010000e+01 1.120000e+01 1.230000e+01
+1.200000e+00 2.300000e+00 3.400000e+00
+4.500000e+00 5.600000e+00 6.700000e+00
+7.800000e+00 8.900000e+00 9.000000e+00
+1.020000e+01 1.130000e+01 1.240000e+01
+1.300000e+00 2.400000e+00 3.500000e+00
+4.600000e+00 5.700000e+00 6.800000e+00
+7.900000e+00 8.000000e+00 9.100000e+00
+1.020000e+01 1.130000e+01 1.240000e+01
+1.350000e+01 1.460000e+01 1.570000e+01
+1.680000e+01 1.790000e+01 1.810000e+01
+1.920000e+01 2.030000e+01 2.140000e+01
+2.250000e+01 2.360000e+01 2.470000e+01
+SCALARS stress double 6
+LOOKUP_TABLE default
+1.100000e+00 1.200000e+00 1.300000e+00 1.400000e+00 1.500000e+00 1.600000e+00
+2.100000e+00 2.200000e+00 2.300000e+00 2.400000e+00 2.500000e+00 2.600000e+00
+3.100000e+00 3.200000e+00 3.300000e+00 3.400000e+00 3.500000e+00 3.600000e+00
+4.100000e+00 4.200000e+00 4.300000e+00 4.400000e+00 4.500000e+00 4.600000e+00
+5.100000e+00 5.200000e+00 5.300000e+00 5.400000e+00 5.500000e+00 5.600000e+00
+6.100000e+00 6.200000e+00 6.300000e+00 6.400000e+00 6.500000e+00 6.600000e+00
+7.100000e+00 7.200000e+00 7.300000e+00 7.400000e+00 7.500000e+00 7.600000e+00
+8.100000e+00 8.200000e+00 8.300000e+00 8.400000e+00 8.500000e+00 8.600000e+00
+9.100000e+00 9.200000e+00 9.300000e+00 9.400000e+00 9.500000e+00 9.600000e+00
+1.010000e+01 1.020000e+01 1.030000e+01 1.040000e+01 1.050000e+01 1.060000e+01
+1.110000e+01 1.120000e+01 1.130000e+01 1.140000e+01 1.150000e+01 1.160000e+01
+1.210000e+01 1.220000e+01 1.230000e+01 1.240000e+01 1.250000e+01 1.260000e+01
+1.310000e+01 1.320000e+01 1.330000e+01 1.340000e+01 1.350000e+01 1.360000e+01
+1.410000e+01 1.420000e+01 1.430000e+01 1.440000e+01 1.450000e+01 1.460000e+01
+1.510000e+01 1.520000e+01 1.530000e+01 1.540000e+01 1.550000e+01 1.560000e+01
+1.610000e+01 1.620000e+01 1.630000e+01 1.640000e+01 1.650000e+01 1.660000e+01
 SCALARS other double 2
 LOOKUP_TABLE default
 1.200000e+00 2.300000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/line2_cell.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/line2_cell_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/line2_cell_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/line2_cell_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -14,14 +14,18 @@
 3
 3
 CELL_DATA 2
-VECTORS traction double
-1.100000e+00 0.0 0.0
-2.200000e+00 0.0 0.0
 SCALARS pressure double 1
 LOOKUP_TABLE default
-2.100000e+00
+1.100000e+00
 2.200000e+00
-SCALARS other double 1
+VECTORS traction double
+2.100000e+00 0.0 0.0
+2.200000e+00 0.0 0.0
+SCALARS stress double 1
 LOOKUP_TABLE default
 1.200000e+00
 2.300000e+00
+SCALARS other double 2
+LOOKUP_TABLE default
+1.200000e+00 2.300000e+00
+3.400000e+00 2.200000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/line2_mat_cell.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/line2_mat_cell_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/line2_mat_cell_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/line2_mat_cell_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -12,11 +12,14 @@
 CELL_TYPES 1
 3
 CELL_DATA 1
-VECTORS traction double
-1.100000e+00 0.0 0.0
 SCALARS pressure double 1
 LOOKUP_TABLE default
-2.100000e+00
-SCALARS other double 1
+1.100000e+00
+VECTORS traction double
+2.100000e+00 0.0 0.0
+SCALARS stress double 1
 LOOKUP_TABLE default
 1.200000e+00
+SCALARS other double 2
+LOOKUP_TABLE default
+1.200000e+00 2.300000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/line2_mat_vertex.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/line2_mat_vertex_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/line2_mat_vertex_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/line2_mat_vertex_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -12,17 +12,23 @@
 CELL_TYPES 1
 3
 POINT_DATA 4
-VECTORS displacements double
-1.100000e+00 0.0 0.0
-2.200000e+00 0.0 0.0
-3.300000e+00 0.0 0.0
-4.400000e+00 0.0 0.0
 SCALARS pressure double 1
 LOOKUP_TABLE default
-2.100000e+00
-3.200000e+00
-4.300000e+00
-5.400000e+00
+1.100000e+00
+2.200000e+00
+3.300000e+00
+4.400000e+00
+VECTORS displacement double
+2.100000e+00 0.0 0.0
+3.200000e+00 0.0 0.0
+4.300000e+00 0.0 0.0
+5.400000e+00 0.0 0.0
+SCALARS stress double 1
+LOOKUP_TABLE default
+3.100000e+00
+4.200000e+00
+5.300000e+00
+6.400000e+00
 SCALARS other double 2
 LOOKUP_TABLE default
 1.200000e+00 2.300000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/line2_surf_cell.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/line2_surf_cell_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/line2_surf_cell_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/line2_surf_cell_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -9,10 +9,13 @@
 CELL_TYPES 1
 1
 CELL_DATA 1
-VECTORS traction double
-1.100000e+00 2.200000e+00 0.0
 SCALARS pressure double 1
 LOOKUP_TABLE default
-2.100000e+00
+1.100000e+00
+VECTORS traction double
+2.100000e+00 0.0 0.0
+SCALARS stress double 1
+LOOKUP_TABLE default
+3.100000e+00
 VECTORS other double
 1.200000e+00 2.300000e+00 3.400000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/line2_surf_vertex.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/line2_surf_vertex_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/line2_surf_vertex_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/line2_surf_vertex_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -9,11 +9,14 @@
 CELL_TYPES 1
 1
 POINT_DATA 1
-VECTORS displacements double
-1.100000e+00 2.200000e+00 0.0
 SCALARS pressure double 1
 LOOKUP_TABLE default
-2.100000e+00
+1.100000e+00
+VECTORS displacement double
+2.100000e+00 0.0 0.0
+SCALARS stress double 1
+LOOKUP_TABLE default
+3.100000e+00
 SCALARS other double 2
 LOOKUP_TABLE default
 1.200000e+00 2.300000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/line2_vertex.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/line2_vertex_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/line2_vertex_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/line2_vertex_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -14,17 +14,23 @@
 3
 3
 POINT_DATA 4
-VECTORS displacements double
-1.100000e+00 0.0 0.0
-2.200000e+00 0.0 0.0
-3.300000e+00 0.0 0.0
-4.400000e+00 0.0 0.0
 SCALARS pressure double 1
 LOOKUP_TABLE default
-2.100000e+00
-3.200000e+00
-4.300000e+00
-5.400000e+00
+1.100000e+00
+2.200000e+00
+3.300000e+00
+4.400000e+00
+VECTORS displacement double
+2.100000e+00 0.0 0.0
+3.200000e+00 0.0 0.0
+4.300000e+00 0.0 0.0
+5.400000e+00 0.0 0.0
+SCALARS stress double 1
+LOOKUP_TABLE default
+1.200000e+00
+1.300000e+00
+1.400000e+00
+1.500000e+00
 SCALARS other double 2
 LOOKUP_TABLE default
 1.200000e+00 2.300000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_bc_cell.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_bc_cell_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_bc_cell_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_bc_cell_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -13,13 +13,16 @@
 3
 3
 CELL_DATA 2
-VECTORS traction double
-1.100000e+00 2.200000e+00 0.0
-3.300000e+00 4.400000e+00 0.0
 SCALARS pressure double 1
 LOOKUP_TABLE default
 2.100000e+00
 3.200000e+00
+VECTORS traction double
+1.100000e+00 2.200000e+00 0.0
+3.300000e+00 4.400000e+00 0.0
+VECTORS stress double
+1.200000e+00 1.300000e+00 1.400000e+00
+2.200000e+00 2.300000e+00 2.400000e+00
 VECTORS other double
 1.200000e+00 2.300000e+00 3.400000e+00
 4.500000e+00 5.600000e+00 6.700000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_bc_vertex.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_bc_vertex_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_bc_vertex_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_bc_vertex_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -13,15 +13,19 @@
 3
 3
 POINT_DATA 3
-VECTORS displacements double
-1.100000e+00 2.200000e+00 0.0
-3.300000e+00 4.400000e+00 0.0
-5.500000e+00 6.600000e+00 0.0
 SCALARS pressure double 1
 LOOKUP_TABLE default
 2.100000e+00
 3.200000e+00
 4.300000e+00
+VECTORS displacement double
+1.100000e+00 2.200000e+00 0.0
+3.300000e+00 4.400000e+00 0.0
+5.500000e+00 6.600000e+00 0.0
+VECTORS stress double
+1.100000e+00 1.200000e+00 1.300000e+00
+2.100000e+00 2.200000e+00 2.300000e+00
+3.100000e+00 3.200000e+00 3.300000e+00
 SCALARS other double 2
 LOOKUP_TABLE default
 1.200000e+00 2.300000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_cell.h5
===================================================================
(Binary files differ)

Copied: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_cell.xmf (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/meshio/data/quad4_cell.xmf)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_cell.xmf	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_cell.xmf	2012-11-01 17:04:11 UTC (rev 20976)
@@ -0,0 +1,212 @@
+<?xml version="1.0" ?>
+<!DOCTYPE Xdmf SYSTEM "Xdmf.dtd" [
+<!ENTITY HeavyData "quad4_cell.h5">
+]>
+
+<Xdmf>
+  <Domain Name="domain">
+    <DataItem Name="cells"
+	      ItemType="Uniform"
+	      Format="HDF"
+	      NumberType="Float" Precision="8"
+	      Dimensions="2 4">
+      &HeavyData;:/topology/cells
+    </DataItem>
+    <DataItem Name="vertices"
+	      Format="HDF"
+	      Dimensions="6 2">
+      &HeavyData;:/geometry/vertices
+    </DataItem>
+    <!-- ============================================================ -->
+    <Grid Name="domain" GridType="Uniform">
+	<Topology
+	   TopologyType="Quadrilateral"
+	   NumberOfElements="2">
+	  <DataItem Reference="XML">
+	    /Xdmf/Domain/DataItem[@Name="cells"]
+	  </DataItem>
+	</Topology>
+	<Geometry GeometryType="XY">
+	  <DataItem Reference="XML">
+	    /Xdmf/Domain/DataItem[@Name="vertices"]
+	  </DataItem>
+	</Geometry>
+	<Attribute
+	   Name="other_0"
+	   Type="Scalar"
+	   Center="Cell">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 2 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 0
+              1 1 1
+              1 2 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 2 2"
+	       Format="HDF">
+	      &HeavyData;:/cell_fields/other
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="other_1"
+	   Type="Scalar"
+	   Center="Cell">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 2 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 1
+              1 1 1
+              1 2 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 2 2"
+	       Format="HDF">
+	      &HeavyData;:/cell_fields/other
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="pressure"
+	   Type="Scalar"
+	   Center="Cell">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 2 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 0
+              1 1 1
+              1 2 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 2 1"
+	       Format="HDF">
+	      &HeavyData;:/cell_fields/pressure
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="stress_xx"
+	   Type="Scalar"
+	   Center="Cell">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 2 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 0
+              1 1 1
+              1 2 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 2 3"
+	       Format="HDF">
+	      &HeavyData;:/cell_fields/stress
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="stress_yy"
+	   Type="Scalar"
+	   Center="Cell">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 2 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 1
+              1 1 1
+              1 2 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 2 3"
+	       Format="HDF">
+	      &HeavyData;:/cell_fields/stress
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="stress_xy"
+	   Type="Scalar"
+	   Center="Cell">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 2 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 2
+              1 1 1
+              1 2 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 2 3"
+	       Format="HDF">
+	      &HeavyData;:/cell_fields/stress
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="traction_x"
+	   Type="Scalar"
+	   Center="Cell">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 2 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 0
+              1 1 1
+              1 2 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 2 2"
+	       Format="HDF">
+	      &HeavyData;:/cell_fields/traction
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="traction_y"
+	   Type="Scalar"
+	   Center="Cell">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 2 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 1
+              1 1 1
+              1 2 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 2 2"
+	       Format="HDF">
+	      &HeavyData;:/cell_fields/traction
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+    </Grid>
+  </Domain>
+</Xdmf>

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_cell_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_cell_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_cell_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -16,13 +16,17 @@
 9
 9
 CELL_DATA 2
-VECTORS traction double
-1.100000e+00 2.200000e+00 0.0
-3.300000e+00 4.400000e+00 0.0
 SCALARS pressure double 1
 LOOKUP_TABLE default
 2.100000e+00
 2.200000e+00
-VECTORS other double
+VECTORS traction double
+1.100000e+00 2.200000e+00 0.0
+3.300000e+00 4.400000e+00 0.0
+VECTORS stress double
 1.200000e+00 2.300000e+00 3.400000e+00
 4.500000e+00 5.600000e+00 6.700000e+00
+SCALARS other double 2
+LOOKUP_TABLE default
+1.200000e+00 2.300000e+00
+4.500000e+00 5.600000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_fault_cell.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_fault_cell_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_fault_cell_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_fault_cell_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -10,10 +10,13 @@
 CELL_TYPES 1
 3
 CELL_DATA 1
-VECTORS traction double
-1.100000e+00 2.200000e+00 0.0
 SCALARS pressure double 1
 LOOKUP_TABLE default
 2.100000e+00
-VECTORS other double
+VECTORS traction double
+1.100000e+00 2.200000e+00 0.0
+VECTORS stress double
 1.200000e+00 2.300000e+00 3.400000e+00
+SCALARS other double 2
+LOOKUP_TABLE default
+1.200000e+00 3.200000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_fault_vertex.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_fault_vertex_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_fault_vertex_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_fault_vertex_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -10,13 +10,16 @@
 CELL_TYPES 1
 3
 POINT_DATA 2
-VECTORS displacements double
-1.100000e+00 2.200000e+00 0.0
-3.300000e+00 4.400000e+00 0.0
 SCALARS pressure double 1
 LOOKUP_TABLE default
 2.100000e+00
 3.200000e+00
+VECTORS displacement double
+1.100000e+00 2.200000e+00 0.0
+3.300000e+00 4.400000e+00 0.0
+VECTORS stress double
+1.200000e+00 1.300000e+00 1.400000e+00
+2.200000e+00 2.300000e+00 2.400000e+00
 SCALARS other double 2
 LOOKUP_TABLE default
 1.200000e+00 2.300000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_mat_cell.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_mat_cell_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_mat_cell_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_mat_cell_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -14,10 +14,13 @@
 CELL_TYPES 1
 9
 CELL_DATA 1
-VECTORS traction double
-1.100000e+00 2.200000e+00 0.0
 SCALARS pressure double 1
 LOOKUP_TABLE default
 2.100000e+00
-VECTORS other double
+VECTORS traction double
+1.100000e+00 2.200000e+00 0.0
+VECTORS stress double
 1.200000e+00 2.300000e+00 3.400000e+00
+SCALARS other double 2
+LOOKUP_TABLE default
+1.200000e+00 2.300000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_mat_vertex.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_mat_vertex_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_mat_vertex_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_mat_vertex_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -14,13 +14,6 @@
 CELL_TYPES 1
 9
 POINT_DATA 6
-VECTORS displacements double
-1.100000e+00 2.200000e+00 0.0
-3.300000e+00 4.400000e+00 0.0
-5.500000e+00 6.600000e+00 0.0
-7.700000e+00 8.800000e+00 0.0
-9.900000e+00 1.010000e+01 0.0
-1.120000e+01 1.230000e+01 0.0
 SCALARS pressure double 1
 LOOKUP_TABLE default
 2.100000e+00
@@ -29,6 +22,20 @@
 5.400000e+00
 6.500000e+00
 7.600000e+00
+VECTORS displacement double
+1.100000e+00 2.200000e+00 0.0
+3.300000e+00 4.400000e+00 0.0
+5.500000e+00 6.600000e+00 0.0
+7.700000e+00 8.800000e+00 0.0
+9.900000e+00 1.010000e+01 0.0
+1.120000e+01 1.230000e+01 0.0
+VECTORS stress double
+1.100000e+00 1.200000e+00 1.300000e+00
+2.100000e+00 2.200000e+00 2.300000e+00
+3.100000e+00 3.200000e+00 3.300000e+00
+4.100000e+00 4.200000e+00 4.300000e+00
+5.100000e+00 5.200000e+00 5.300000e+00
+6.100000e+00 6.200000e+00 6.300000e+00
 SCALARS other double 2
 LOOKUP_TABLE default
 1.200000e+00 2.300000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_points_vertex_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_points_vertex_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_points_vertex_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -15,15 +15,19 @@
 1
 1
 POINT_DATA 3
-VECTORS displacements double
-4.400000e+00 5.500000e+00 0.0
-6.600000e+00 7.700000e+00 0.0
-9.900000e+00 1.010000e+01 0.0
 SCALARS pressure double 1
 LOOKUP_TABLE default
 3.750000e+00
 4.850000e+00
 6.500000e+00
+VECTORS displacement double
+4.400000e+00 5.500000e+00 0.0
+6.600000e+00 7.700000e+00 0.0
+9.900000e+00 1.010000e+01 0.0
+VECTORS stress double
+2.600000e+00 2.700000e+00 2.800000e+00
+3.600000e+00 3.700000e+00 3.800000e+00
+5.100000e+00 5.200000e+00 5.300000e+00
 SCALARS other double 2
 LOOKUP_TABLE default
 4.500000e+00 5.600000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_surf_cell.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_surf_cell_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_surf_cell_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_surf_cell_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -13,13 +13,17 @@
 3
 3
 CELL_DATA 2
-VECTORS traction double
-1.100000e+00 2.200000e+00 0.0
-3.300000e+00 4.400000e+00 0.0
 SCALARS pressure double 1
 LOOKUP_TABLE default
 2.100000e+00
 3.200000e+00
-VECTORS other double
+VECTORS traction double
+1.100000e+00 2.200000e+00 0.0
+3.300000e+00 4.400000e+00 0.0
+VECTORS stress double
 1.200000e+00 2.300000e+00 3.400000e+00
 4.500000e+00 5.600000e+00 6.700000e+00
+SCALARS other double 2
+LOOKUP_TABLE default
+1.200000e+00 2.300000e+00
+4.500000e+00 5.600000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_surf_vertex.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_surf_vertex_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_surf_vertex_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_surf_vertex_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -13,15 +13,19 @@
 3
 3
 POINT_DATA 3
-VECTORS displacements double
-1.100000e+00 2.200000e+00 0.0
-5.500000e+00 6.600000e+00 0.0
-9.900000e+00 1.000000e+01 0.0
 SCALARS pressure double 1
 LOOKUP_TABLE default
 2.100000e+00
 4.300000e+00
 6.500000e+00
+VECTORS displacement double
+1.100000e+00 2.200000e+00 0.0
+5.500000e+00 6.600000e+00 0.0
+9.900000e+00 1.000000e+01 0.0
+VECTORS stress double
+1.100000e+00 1.200000e+00 1.300000e+00
+3.100000e+00 3.200000e+00 3.300000e+00
+5.100000e+00 5.200000e+00 5.300000e+00
 SCALARS other double 2
 LOOKUP_TABLE default
 1.200000e+00 2.300000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_vertex.h5
===================================================================
(Binary files differ)

Copied: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_vertex.xmf (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/unittests/libtests/meshio/data/quad4_vertex.xmf)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_vertex.xmf	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_vertex.xmf	2012-11-01 17:04:11 UTC (rev 20976)
@@ -0,0 +1,212 @@
+<?xml version="1.0" ?>
+<!DOCTYPE Xdmf SYSTEM "Xdmf.dtd" [
+<!ENTITY HeavyData "quad4_vertex.h5">
+]>
+
+<Xdmf>
+  <Domain Name="domain">
+    <DataItem Name="cells"
+	      ItemType="Uniform"
+	      Format="HDF"
+	      NumberType="Float" Precision="8"
+	      Dimensions="2 4">
+      &HeavyData;:/topology/cells
+    </DataItem>
+    <DataItem Name="vertices"
+	      Format="HDF"
+	      Dimensions="6 2">
+      &HeavyData;:/geometry/vertices
+    </DataItem>
+    <!-- ============================================================ -->
+    <Grid Name="domain" GridType="Uniform">
+	<Topology
+	   TopologyType="Quadrilateral"
+	   NumberOfElements="2">
+	  <DataItem Reference="XML">
+	    /Xdmf/Domain/DataItem[@Name="cells"]
+	  </DataItem>
+	</Topology>
+	<Geometry GeometryType="XY">
+	  <DataItem Reference="XML">
+	    /Xdmf/Domain/DataItem[@Name="vertices"]
+	  </DataItem>
+	</Geometry>
+	<Attribute
+	   Name="displacement_x"
+	   Type="Scalar"
+	   Center="Node">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 6 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 0
+              1 1 1
+              1 6 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 6 2"
+	       Format="HDF">
+	      &HeavyData;:/vertex_fields/displacement
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="displacement_y"
+	   Type="Scalar"
+	   Center="Node">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 6 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 1
+              1 1 1
+              1 6 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 6 2"
+	       Format="HDF">
+	      &HeavyData;:/vertex_fields/displacement
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="other_0"
+	   Type="Scalar"
+	   Center="Node">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 6 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 0
+              1 1 1
+              1 6 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 6 2"
+	       Format="HDF">
+	      &HeavyData;:/vertex_fields/other
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="other_1"
+	   Type="Scalar"
+	   Center="Node">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 6 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 1
+              1 1 1
+              1 6 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 6 2"
+	       Format="HDF">
+	      &HeavyData;:/vertex_fields/other
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="pressure"
+	   Type="Scalar"
+	   Center="Node">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 6 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 0
+              1 1 1
+              1 6 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 6 1"
+	       Format="HDF">
+	      &HeavyData;:/vertex_fields/pressure
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="stress_xx"
+	   Type="Scalar"
+	   Center="Node">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 6 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 0
+              1 1 1
+              1 6 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 6 3"
+	       Format="HDF">
+	      &HeavyData;:/vertex_fields/stress
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="stress_yy"
+	   Type="Scalar"
+	   Center="Node">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 6 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 1
+              1 1 1
+              1 6 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 6 3"
+	       Format="HDF">
+	      &HeavyData;:/vertex_fields/stress
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="stress_xy"
+	   Type="Scalar"
+	   Center="Node">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 6 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 2
+              1 1 1
+              1 6 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 6 3"
+	       Format="HDF">
+	      &HeavyData;:/vertex_fields/stress
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+    </Grid>
+  </Domain>
+</Xdmf>

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_vertex_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_vertex_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/quad4_vertex_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -16,13 +16,6 @@
 9
 9
 POINT_DATA 6
-VECTORS displacements double
-1.100000e+00 2.200000e+00 0.0
-3.300000e+00 4.400000e+00 0.0
-5.500000e+00 6.600000e+00 0.0
-7.700000e+00 8.800000e+00 0.0
-9.900000e+00 1.010000e+01 0.0
-1.120000e+01 1.230000e+01 0.0
 SCALARS pressure double 1
 LOOKUP_TABLE default
 2.100000e+00
@@ -31,6 +24,20 @@
 5.400000e+00
 6.500000e+00
 7.600000e+00
+VECTORS displacement double
+1.100000e+00 2.200000e+00 0.0
+3.300000e+00 4.400000e+00 0.0
+5.500000e+00 6.600000e+00 0.0
+7.700000e+00 8.800000e+00 0.0
+9.900000e+00 1.010000e+01 0.0
+1.120000e+01 1.230000e+01 0.0
+VECTORS stress double
+1.100000e+00 1.200000e+00 1.300000e+00
+2.100000e+00 2.200000e+00 3.300000e+00
+3.100000e+00 3.200000e+00 4.300000e+00
+4.100000e+00 4.200000e+00 5.300000e+00
+5.100000e+00 5.200000e+00 6.300000e+00
+6.100000e+00 6.200000e+00 7.300000e+00
 SCALARS other double 2
 LOOKUP_TABLE default
 1.200000e+00 2.300000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_bc_cell.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_bc_cell_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_bc_cell_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_bc_cell_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -16,14 +16,18 @@
 5
 5
 CELL_DATA 2
-VECTORS traction double
-1.100000e+00 2.200000e+00 3.300000e+00
-4.400000e+00 5.500000e+00 6.600000e+00
 SCALARS pressure double 1
 LOOKUP_TABLE default
 2.100000e+00
 3.200000e+00
-SCALARS other double 6
+VECTORS traction double
+1.100000e+00 2.200000e+00 3.300000e+00
+4.400000e+00 5.500000e+00 6.600000e+00
+SCALARS stress double 6
 LOOKUP_TABLE default
 1.200000e+00 2.300000e+00 3.400000e+00 4.500000e+00 5.600000e+00 6.700000e+00
 7.800000e+00 8.900000e+00 9.000000e+00 1.010000e+01 1.120000e+01 1.230000e+01
+SCALARS other double 4
+LOOKUP_TABLE default
+1.200000e+00 2.300000e+00 3.400000e+00 4.500000e+00
+7.800000e+00 8.900000e+00 9.000000e+00 1.010000e+01

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_bc_vertex.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_bc_vertex_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_bc_vertex_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_bc_vertex_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -16,13 +16,6 @@
 5
 5
 POINT_DATA 6
-VECTORS displacements double
-1.100000e+00 2.200000e+00 3.300000e+00
-4.400000e+00 5.500000e+00 6.600000e+00
-7.700000e+00 8.800000e+00 9.900000e+00
-1.000000e+01 1.110000e+01 1.220000e+01
-1.330000e+01 1.440000e+01 1.550000e+01
-1.660000e+01 1.770000e+01 1.880000e+01
 SCALARS pressure double 1
 LOOKUP_TABLE default
 2.100000e+00
@@ -31,6 +24,21 @@
 5.400000e+00
 6.500000e+00
 7.600000e+00
+VECTORS displacement double
+1.100000e+00 2.200000e+00 3.300000e+00
+4.400000e+00 5.500000e+00 6.600000e+00
+7.700000e+00 8.800000e+00 9.900000e+00
+1.000000e+01 1.110000e+01 1.220000e+01
+1.330000e+01 1.440000e+01 1.550000e+01
+1.660000e+01 1.770000e+01 1.880000e+01
+SCALARS stress double 6
+LOOKUP_TABLE default
+1.100000e+00 1.200000e+00 1.300000e+00 1.400000e+00 1.500000e+00 1.600000e+00
+2.100000e+00 2.200000e+00 2.300000e+00 2.400000e+00 2.500000e+00 2.600000e+00
+3.100000e+00 3.200000e+00 3.300000e+00 3.400000e+00 3.500000e+00 3.600000e+00
+4.100000e+00 4.200000e+00 4.300000e+00 4.400000e+00 4.500000e+00 4.600000e+00
+5.100000e+00 5.200000e+00 5.300000e+00 5.400000e+00 5.500000e+00 5.600000e+00
+6.100000e+00 6.200000e+00 6.300000e+00 6.400000e+00 6.500000e+00 6.600000e+00
 SCALARS other double 2
 LOOKUP_TABLE default
 1.200000e+00 2.300000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_cell.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_cell.xmf
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_cell.xmf	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_cell.xmf	2012-11-01 17:04:11 UTC (rev 20976)
@@ -32,28 +32,94 @@
 	  </DataItem>
 	</Geometry>
 	<Attribute
-	   Name="other"
-	   Type="Tensor6"
+	   Name="other_0"
+	   Type="Scalar"
 	   Center="Cell">
           <DataItem ItemType="HyperSlab"
-		    Dimensions="1 2 6"
+		    Dimensions="1 2 1"
 		    Type="HyperSlab">
             <DataItem
 	       Dimensions="3 3"
 	       Format="XML">
               0 0 0
               1 1 1
-              1 2 6
+              1 2 1
 	    </DataItem>
 	    <DataItem
 	       DataType="Float" Precision="8"
-	       Dimensions="1 2 6"
+	       Dimensions="1 2 4"
 	       Format="HDF">
 	      &HeavyData;:/cell_fields/other
 	    </DataItem>
 	  </DataItem>
 	</Attribute>
 	<Attribute
+	   Name="other_1"
+	   Type="Scalar"
+	   Center="Cell">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 2 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 1
+              1 1 1
+              1 2 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 2 4"
+	       Format="HDF">
+	      &HeavyData;:/cell_fields/other
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="other_2"
+	   Type="Scalar"
+	   Center="Cell">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 2 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 2
+              1 1 1
+              1 2 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 2 4"
+	       Format="HDF">
+	      &HeavyData;:/cell_fields/other
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="other_3"
+	   Type="Scalar"
+	   Center="Cell">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 2 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 3
+              1 1 1
+              1 2 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 2 4"
+	       Format="HDF">
+	      &HeavyData;:/cell_fields/other
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
 	   Name="pressure"
 	   Type="Scalar"
 	   Center="Cell">
@@ -76,6 +142,138 @@
 	  </DataItem>
 	</Attribute>
 	<Attribute
+	   Name="stress_xx"
+	   Type="Scalar"
+	   Center="Cell">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 2 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 0
+              1 1 1
+              1 2 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 2 6"
+	       Format="HDF">
+	      &HeavyData;:/cell_fields/stress
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="stress_yy"
+	   Type="Scalar"
+	   Center="Cell">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 2 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 1
+              1 1 1
+              1 2 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 2 6"
+	       Format="HDF">
+	      &HeavyData;:/cell_fields/stress
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="stress_zz"
+	   Type="Scalar"
+	   Center="Cell">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 2 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 2
+              1 1 1
+              1 2 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 2 6"
+	       Format="HDF">
+	      &HeavyData;:/cell_fields/stress
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="stress_xy"
+	   Type="Scalar"
+	   Center="Cell">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 2 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 3
+              1 1 1
+              1 2 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 2 6"
+	       Format="HDF">
+	      &HeavyData;:/cell_fields/stress
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="stress_yz"
+	   Type="Scalar"
+	   Center="Cell">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 2 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 4
+              1 1 1
+              1 2 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 2 6"
+	       Format="HDF">
+	      &HeavyData;:/cell_fields/stress
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="stress_xz"
+	   Type="Scalar"
+	   Center="Cell">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 2 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 5
+              1 1 1
+              1 2 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 2 6"
+	       Format="HDF">
+	      &HeavyData;:/cell_fields/stress
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
 	   Name="traction"
 	   Type="Vector"
 	   Center="Cell">

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_cell_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_cell_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_cell_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -18,14 +18,18 @@
 10
 10
 CELL_DATA 2
-VECTORS traction double
-1.100000e+00 2.200000e+00 3.300000e+00
-4.400000e+00 5.500000e+00 6.600000e+00
 SCALARS pressure double 1
 LOOKUP_TABLE default
 2.100000e+00
 3.200000e+00
-SCALARS other double 6
+VECTORS traction double
+1.100000e+00 2.200000e+00 3.300000e+00
+4.400000e+00 5.500000e+00 6.600000e+00
+SCALARS stress double 6
 LOOKUP_TABLE default
 1.200000e+00 2.300000e+00 3.400000e+00 4.500000e+00 5.600000e+00 6.700000e+00
 7.800000e+00 8.900000e+00 9.000000e+00 1.010000e+01 1.120000e+01 1.230000e+01
+SCALARS other double 4
+LOOKUP_TABLE default
+1.200000e+00 2.300000e+00 3.400000e+00 4.500000e+00
+7.800000e+00 8.900000e+00 9.000000e+00 1.010000e+01

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_fault_cell.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_fault_cell_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_fault_cell_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_fault_cell_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -11,11 +11,13 @@
 CELL_TYPES 1
 5
 CELL_DATA 1
-VECTORS traction double
-1.100000e+00 2.200000e+00 3.300000e+00
 SCALARS pressure double 1
 LOOKUP_TABLE default
 2.100000e+00
-SCALARS other double 6
+VECTORS traction double
+1.100000e+00 2.200000e+00 3.300000e+00
+SCALARS stress double 6
 LOOKUP_TABLE default
 1.200000e+00 2.300000e+00 3.400000e+00 4.500000e+00 5.600000e+00 6.700000e+00
+VECTORS other double
+1.200000e+00 2.300000e+00 3.400000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_fault_vertex.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_fault_vertex_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_fault_vertex_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_fault_vertex_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -11,15 +11,20 @@
 CELL_TYPES 1
 5
 POINT_DATA 3
-VECTORS displacements double
-1.100000e+00 2.200000e+00 3.300000e+00
-4.400000e+00 5.500000e+00 6.600000e+00
-7.700000e+00 8.800000e+00 9.900000e+00
 SCALARS pressure double 1
 LOOKUP_TABLE default
 2.100000e+00
 3.200000e+00
 4.300000e+00
+VECTORS displacement double
+1.100000e+00 2.200000e+00 3.300000e+00
+4.400000e+00 5.500000e+00 6.600000e+00
+7.700000e+00 8.800000e+00 9.900000e+00
+SCALARS stress double 6
+LOOKUP_TABLE default
+1.100000e+00 1.200000e+00 1.300000e+00 1.400000e+00 1.500000e+00 1.600000e+00
+2.100000e+00 2.200000e+00 2.300000e+00 2.400000e+00 2.500000e+00 2.600000e+00
+3.100000e+00 3.200000e+00 3.300000e+00 3.400000e+00 3.500000e+00 3.600000e+00
 SCALARS other double 2
 LOOKUP_TABLE default
 1.200000e+00 2.300000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_mat_cell.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_mat_cell_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_mat_cell_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_mat_cell_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -18,14 +18,18 @@
 10
 10
 CELL_DATA 2
-VECTORS traction double
-1.100000e+00 2.200000e+00 3.300000e+00
-4.400000e+00 5.500000e+00 6.600000e+00
 SCALARS pressure double 1
 LOOKUP_TABLE default
 2.100000e+00
 3.200000e+00
-SCALARS other double 6
+VECTORS traction double
+1.100000e+00 2.200000e+00 3.300000e+00
+4.400000e+00 5.500000e+00 6.600000e+00
+SCALARS stress double 6
 LOOKUP_TABLE default
 1.200000e+00 2.300000e+00 3.400000e+00 4.500000e+00 5.600000e+00 6.700000e+00
 7.800000e+00 8.900000e+00 9.000000e+00 1.010000e+01 1.120000e+01 1.230000e+01
+SCALARS other double 2
+LOOKUP_TABLE default
+1.200000e+00 2.300000e+00
+7.800000e+00 8.900000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_mat_vertex.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_mat_vertex_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_mat_vertex_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_mat_vertex_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -18,15 +18,6 @@
 10
 10
 POINT_DATA 8
-VECTORS displacements double
-1.100000e+00 2.200000e+00 3.300000e+00
-4.400000e+00 5.500000e+00 6.600000e+00
-7.700000e+00 8.800000e+00 9.900000e+00
-1.000000e+01 1.110000e+01 1.220000e+01
-1.330000e+01 1.440000e+01 1.550000e+01
-1.660000e+01 1.770000e+01 1.880000e+01
-1.990000e+01 2.000000e+01 2.110000e+01
-2.220000e+01 2.330000e+01 2.440000e+01
 SCALARS pressure double 1
 LOOKUP_TABLE default
 2.100000e+00
@@ -37,6 +28,25 @@
 7.600000e+00
 8.700000e+00
 9.800000e+00
+VECTORS displacement double
+1.100000e+00 2.200000e+00 3.300000e+00
+4.400000e+00 5.500000e+00 6.600000e+00
+7.700000e+00 8.800000e+00 9.900000e+00
+1.000000e+01 1.110000e+01 1.220000e+01
+1.330000e+01 1.440000e+01 1.550000e+01
+1.660000e+01 1.770000e+01 1.880000e+01
+1.990000e+01 2.000000e+01 2.110000e+01
+2.220000e+01 2.330000e+01 2.440000e+01
+SCALARS stress double 6
+LOOKUP_TABLE default
+1.100000e+00 1.200000e+00 1.300000e+00 1.400000e+00 1.500000e+00 1.600000e+00
+2.100000e+00 2.200000e+00 2.300000e+00 2.400000e+00 2.500000e+00 2.600000e+00
+3.100000e+00 3.200000e+00 3.300000e+00 3.400000e+00 3.500000e+00 3.600000e+00
+4.100000e+00 4.200000e+00 4.300000e+00 4.400000e+00 4.500000e+00 4.600000e+00
+5.100000e+00 5.200000e+00 5.300000e+00 5.400000e+00 5.500000e+00 5.600000e+00
+6.100000e+00 6.200000e+00 6.300000e+00 6.400000e+00 6.500000e+00 6.600000e+00
+7.100000e+00 7.200000e+00 7.300000e+00 7.400000e+00 7.500000e+00 7.600000e+00
+8.100000e+00 8.200000e+00 8.300000e+00 8.400000e+00 8.500000e+00 8.600000e+00
 SCALARS other double 2
 LOOKUP_TABLE default
 1.200000e+00 2.300000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_points_vertex_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_points_vertex_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_points_vertex_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -18,17 +18,23 @@
 1
 1
 POINT_DATA 4
-VECTORS displacements double
-1.346667e+01 1.423333e+01 1.533333e+01
-7.366667e+00 8.466667e+00 9.566667e+00
-7.200000e+00 8.300000e+00 9.400000e+00
-1.660000e+01 1.770000e+01 1.880000e+01
 SCALARS pressure double 1
 LOOKUP_TABLE default
 6.500000e+00
 4.300000e+00
 4.300000e+00
 7.600000e+00
+VECTORS displacement double
+1.346667e+01 1.423333e+01 1.533333e+01
+7.366667e+00 8.466667e+00 9.566667e+00
+7.200000e+00 8.300000e+00 9.400000e+00
+1.660000e+01 1.770000e+01 1.880000e+01
+SCALARS stress double 6
+LOOKUP_TABLE default
+5.100000e+00 5.200000e+00 5.300000e+00 5.400000e+00 5.500000e+00 5.600000e+00
+3.100000e+00 3.200000e+00 3.300000e+00 3.400000e+00 3.500000e+00 3.600000e+00
+3.100000e+00 3.200000e+00 3.300000e+00 3.400000e+00 3.500000e+00 3.600000e+00
+6.100000e+00 6.200000e+00 6.300000e+00 6.400000e+00 6.500000e+00 6.600000e+00
 SCALARS other double 2
 LOOKUP_TABLE default
 9.333333e+00 1.043333e+01

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_surf_cell.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_surf_cell_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_surf_cell_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_surf_cell_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -14,14 +14,18 @@
 5
 5
 CELL_DATA 2
-VECTORS traction double
-1.100000e+00 2.200000e+00 3.300000e+00
-4.400000e+00 5.500000e+00 6.600000e+00
 SCALARS pressure double 1
 LOOKUP_TABLE default
 2.100000e+00
 3.200000e+00
-SCALARS other double 6
+VECTORS traction double
+1.100000e+00 2.200000e+00 3.300000e+00
+4.400000e+00 5.500000e+00 6.600000e+00
+SCALARS stress double 6
 LOOKUP_TABLE default
 1.200000e+00 2.300000e+00 3.400000e+00 4.500000e+00 5.600000e+00 6.700000e+00
 7.800000e+00 8.900000e+00 9.000000e+00 1.010000e+01 1.120000e+01 1.230000e+01
+SCALARS other double 4
+LOOKUP_TABLE default
+1.200000e+00 2.300000e+00 3.400000e+00 4.500000e+00
+7.800000e+00 8.900000e+00 9.000000e+00 1.010000e+01

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_surf_vertex.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_surf_vertex_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_surf_vertex_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_surf_vertex_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -14,17 +14,23 @@
 5
 5
 POINT_DATA 4
-VECTORS displacements double
-1.100000e+00 2.200000e+00 3.300000e+00
-4.400000e+00 5.500000e+00 6.600000e+00
-1.000000e+01 1.110000e+01 1.220000e+01
-1.330000e+01 1.440000e+01 1.550000e+01
 SCALARS pressure double 1
 LOOKUP_TABLE default
 2.100000e+00
 3.200000e+00
 5.400000e+00
 6.500000e+00
+VECTORS displacement double
+1.100000e+00 2.200000e+00 3.300000e+00
+4.400000e+00 5.500000e+00 6.600000e+00
+1.000000e+01 1.110000e+01 1.220000e+01
+1.330000e+01 1.440000e+01 1.550000e+01
+SCALARS stress double 6
+LOOKUP_TABLE default
+1.100000e+00 1.200000e+00 1.300000e+00 1.400000e+00 1.500000e+00 1.600000e+00
+2.100000e+00 2.200000e+00 2.300000e+00 2.400000e+00 2.500000e+00 2.600000e+00
+4.100000e+00 4.200000e+00 4.300000e+00 4.400000e+00 4.500000e+00 4.600000e+00
+5.100000e+00 5.200000e+00 5.300000e+00 5.400000e+00 5.500000e+00 5.600000e+00
 SCALARS other double 2
 LOOKUP_TABLE default
 1.200000e+00 2.300000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_vertex.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_vertex.xmf
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_vertex.xmf	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_vertex.xmf	2012-11-01 17:04:11 UTC (rev 20976)
@@ -32,7 +32,7 @@
 	  </DataItem>
 	</Geometry>
 	<Attribute
-	   Name="displacements"
+	   Name="displacement"
 	   Type="Vector"
 	   Center="Node">
           <DataItem ItemType="HyperSlab"
@@ -49,23 +49,23 @@
 	       DataType="Float" Precision="8"
 	       Dimensions="1 8 3"
 	       Format="HDF">
-	      &HeavyData;:/vertex_fields/displacements
+	      &HeavyData;:/vertex_fields/displacement
 	    </DataItem>
 	  </DataItem>
 	</Attribute>
 	<Attribute
-	   Name="other"
-	   Type="Matrix"
+	   Name="other_0"
+	   Type="Scalar"
 	   Center="Node">
           <DataItem ItemType="HyperSlab"
-		    Dimensions="1 8 2"
+		    Dimensions="1 8 1"
 		    Type="HyperSlab">
             <DataItem
 	       Dimensions="3 3"
 	       Format="XML">
               0 0 0
               1 1 1
-              1 8 2
+              1 8 1
 	    </DataItem>
 	    <DataItem
 	       DataType="Float" Precision="8"
@@ -76,6 +76,28 @@
 	  </DataItem>
 	</Attribute>
 	<Attribute
+	   Name="other_1"
+	   Type="Scalar"
+	   Center="Node">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 8 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 1
+              1 1 1
+              1 8 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 8 2"
+	       Format="HDF">
+	      &HeavyData;:/vertex_fields/other
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
 	   Name="pressure"
 	   Type="Scalar"
 	   Center="Node">
@@ -97,6 +119,138 @@
 	    </DataItem>
 	  </DataItem>
 	</Attribute>
+	<Attribute
+	   Name="stress_xx"
+	   Type="Scalar"
+	   Center="Node">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 8 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 0
+              1 1 1
+              1 8 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 8 6"
+	       Format="HDF">
+	      &HeavyData;:/vertex_fields/stress
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="stress_yy"
+	   Type="Scalar"
+	   Center="Node">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 8 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 1
+              1 1 1
+              1 8 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 8 6"
+	       Format="HDF">
+	      &HeavyData;:/vertex_fields/stress
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="stress_zz"
+	   Type="Scalar"
+	   Center="Node">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 8 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 2
+              1 1 1
+              1 8 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 8 6"
+	       Format="HDF">
+	      &HeavyData;:/vertex_fields/stress
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="stress_xy"
+	   Type="Scalar"
+	   Center="Node">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 8 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 3
+              1 1 1
+              1 8 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 8 6"
+	       Format="HDF">
+	      &HeavyData;:/vertex_fields/stress
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="stress_yz"
+	   Type="Scalar"
+	   Center="Node">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 8 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 4
+              1 1 1
+              1 8 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 8 6"
+	       Format="HDF">
+	      &HeavyData;:/vertex_fields/stress
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="stress_xz"
+	   Type="Scalar"
+	   Center="Node">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 8 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 5
+              1 1 1
+              1 8 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 8 6"
+	       Format="HDF">
+	      &HeavyData;:/vertex_fields/stress
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
     </Grid>
   </Domain>
 </Xdmf>

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_vertex_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_vertex_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tet4_vertex_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -18,15 +18,6 @@
 10
 10
 POINT_DATA 8
-VECTORS displacements double
-1.100000e+00 2.200000e+00 3.300000e+00
-4.400000e+00 5.500000e+00 6.600000e+00
-7.700000e+00 8.800000e+00 9.900000e+00
-1.000000e+01 1.110000e+01 1.220000e+01
-1.330000e+01 1.440000e+01 1.550000e+01
-1.660000e+01 1.770000e+01 1.880000e+01
-1.990000e+01 2.000000e+01 2.110000e+01
-2.220000e+01 2.330000e+01 2.440000e+01
 SCALARS pressure double 1
 LOOKUP_TABLE default
 2.100000e+00
@@ -37,6 +28,25 @@
 7.600000e+00
 8.700000e+00
 9.800000e+00
+VECTORS displacement double
+1.100000e+00 2.200000e+00 3.300000e+00
+4.400000e+00 5.500000e+00 6.600000e+00
+7.700000e+00 8.800000e+00 9.900000e+00
+1.000000e+01 1.110000e+01 1.220000e+01
+1.330000e+01 1.440000e+01 1.550000e+01
+1.660000e+01 1.770000e+01 1.880000e+01
+1.990000e+01 2.000000e+01 2.110000e+01
+2.220000e+01 2.330000e+01 2.440000e+01
+SCALARS stress double 6
+LOOKUP_TABLE default
+1.100000e+00 1.200000e+00 1.300000e+00 1.400000e+00 1.500000e+00 1.600000e+00
+2.100000e+00 2.200000e+00 2.300000e+00 2.400000e+00 2.500000e+00 2.600000e+00
+3.100000e+00 3.200000e+00 3.300000e+00 3.400000e+00 3.500000e+00 3.600000e+00
+4.100000e+00 4.200000e+00 4.300000e+00 4.400000e+00 4.500000e+00 4.600000e+00
+5.100000e+00 5.200000e+00 5.300000e+00 5.400000e+00 5.500000e+00 5.600000e+00
+6.100000e+00 6.200000e+00 6.300000e+00 6.400000e+00 6.500000e+00 6.600000e+00
+7.100000e+00 7.200000e+00 7.300000e+00 7.400000e+00 7.500000e+00 7.600000e+00
+8.100000e+00 8.200000e+00 8.300000e+00 8.400000e+00 8.500000e+00 8.600000e+00
 SCALARS other double 2
 LOOKUP_TABLE default
 1.200000e+00 2.300000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_bc_cell.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_bc_cell_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_bc_cell_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_bc_cell_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -10,10 +10,13 @@
 CELL_TYPES 1
 3
 CELL_DATA 1
-VECTORS traction double
-1.100000e+00 2.200000e+00 0.0
 SCALARS pressure double 1
 LOOKUP_TABLE default
 2.100000e+00
-VECTORS other double
+VECTORS traction double
+1.100000e+00 2.200000e+00 0.0
+VECTORS stress double
 1.200000e+00 2.300000e+00 3.400000e+00
+SCALARS other double 2
+LOOKUP_TABLE default
+2.100000e+00 2.200000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_bc_vertex.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_bc_vertex_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_bc_vertex_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_bc_vertex_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -10,13 +10,16 @@
 CELL_TYPES 1
 3
 POINT_DATA 2
-VECTORS displacements double
-1.100000e+00 2.200000e+00 0.0
-3.300000e+00 4.400000e+00 0.0
 SCALARS pressure double 1
 LOOKUP_TABLE default
 2.100000e+00
 3.200000e+00
+VECTORS displacement double
+1.100000e+00 2.200000e+00 0.0
+3.300000e+00 4.400000e+00 0.0
+VECTORS stress double
+1.100000e+00 1.200000e+00 1.300000e+00
+2.100000e+00 2.200000e+00 2.300000e+00
 SCALARS other double 2
 LOOKUP_TABLE default
 1.200000e+00 2.300000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_cell.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_cell.xmf
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_cell.xmf	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_cell.xmf	2012-11-01 17:04:11 UTC (rev 20976)
@@ -32,7 +32,7 @@
 	  </DataItem>
 	</Geometry>
 	<Attribute
-	   Name="other_xx"
+	   Name="other_0"
 	   Type="Scalar"
 	   Center="Cell">
           <DataItem ItemType="HyperSlab"
@@ -47,14 +47,14 @@
 	    </DataItem>
 	    <DataItem
 	       DataType="Float" Precision="8"
-	       Dimensions="1 2 3"
+	       Dimensions="1 2 2"
 	       Format="HDF">
 	      &HeavyData;:/cell_fields/other
 	    </DataItem>
 	  </DataItem>
 	</Attribute>
 	<Attribute
-	   Name="other_yy"
+	   Name="other_1"
 	   Type="Scalar"
 	   Center="Cell">
           <DataItem ItemType="HyperSlab"
@@ -69,14 +69,14 @@
 	    </DataItem>
 	    <DataItem
 	       DataType="Float" Precision="8"
-	       Dimensions="1 2 3"
+	       Dimensions="1 2 2"
 	       Format="HDF">
 	      &HeavyData;:/cell_fields/other
 	    </DataItem>
 	  </DataItem>
 	</Attribute>
 	<Attribute
-	   Name="other_xy"
+	   Name="pressure"
 	   Type="Scalar"
 	   Center="Cell">
           <DataItem ItemType="HyperSlab"
@@ -85,20 +85,20 @@
             <DataItem
 	       Dimensions="3 3"
 	       Format="XML">
-              0 0 2
+              0 0 0
               1 1 1
               1 2 1
 	    </DataItem>
 	    <DataItem
 	       DataType="Float" Precision="8"
-	       Dimensions="1 2 3"
+	       Dimensions="1 2 1"
 	       Format="HDF">
-	      &HeavyData;:/cell_fields/other
+	      &HeavyData;:/cell_fields/pressure
 	    </DataItem>
 	  </DataItem>
 	</Attribute>
 	<Attribute
-	   Name="pressure"
+	   Name="stress_xx"
 	   Type="Scalar"
 	   Center="Cell">
           <DataItem ItemType="HyperSlab"
@@ -113,13 +113,57 @@
 	    </DataItem>
 	    <DataItem
 	       DataType="Float" Precision="8"
-	       Dimensions="1 2 1"
+	       Dimensions="1 2 3"
 	       Format="HDF">
-	      &HeavyData;:/cell_fields/pressure
+	      &HeavyData;:/cell_fields/stress
 	    </DataItem>
 	  </DataItem>
 	</Attribute>
 	<Attribute
+	   Name="stress_yy"
+	   Type="Scalar"
+	   Center="Cell">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 2 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 1
+              1 1 1
+              1 2 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 2 3"
+	       Format="HDF">
+	      &HeavyData;:/cell_fields/stress
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="stress_xy"
+	   Type="Scalar"
+	   Center="Cell">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 2 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 2
+              1 1 1
+              1 2 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 2 3"
+	       Format="HDF">
+	      &HeavyData;:/cell_fields/stress
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
 	   Name="traction_x"
 	   Type="Scalar"
 	   Center="Cell">

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_cell_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_cell_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_cell_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -16,13 +16,17 @@
 5
 5
 CELL_DATA 2
-VECTORS traction double
-1.100000e+00 2.200000e+00 0.0
-3.300000e+00 4.400000e+00 0.0
 SCALARS pressure double 1
 LOOKUP_TABLE default
 2.100000e+00
 2.200000e+00
-VECTORS other double
+VECTORS traction double
+1.100000e+00 2.200000e+00 0.0
+3.300000e+00 4.400000e+00 0.0
+VECTORS stress double
 1.200000e+00 2.300000e+00 3.400000e+00
 4.500000e+00 5.600000e+00 6.700000e+00
+SCALARS other double 2
+LOOKUP_TABLE default
+1.200000e+00 2.300000e+00
+4.500000e+00 5.600000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_fault_cell.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_fault_cell_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_fault_cell_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_fault_cell_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -10,10 +10,13 @@
 CELL_TYPES 1
 3
 CELL_DATA 1
-VECTORS traction double
-1.100000e+00 2.200000e+00 0.0
 SCALARS pressure double 1
 LOOKUP_TABLE default
 2.100000e+00
-VECTORS other double
+VECTORS traction double
+1.100000e+00 2.200000e+00 0.0
+VECTORS stress double
 1.200000e+00 2.300000e+00 3.400000e+00
+SCALARS other double 4
+LOOKUP_TABLE default
+1.200000e+00 2.300000e+00 3.400000e+00 4.500000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_fault_vertex.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_fault_vertex_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_fault_vertex_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_fault_vertex_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -10,13 +10,16 @@
 CELL_TYPES 1
 3
 POINT_DATA 2
-VECTORS displacements double
-1.100000e+00 2.200000e+00 0.0
-3.300000e+00 4.400000e+00 0.0
 SCALARS pressure double 1
 LOOKUP_TABLE default
 2.100000e+00
 3.200000e+00
+VECTORS displacement double
+1.100000e+00 2.200000e+00 0.0
+3.300000e+00 4.400000e+00 0.0
+VECTORS stress double
+1.100000e+00 1.200000e+00 1.300000e+00
+2.100000e+00 2.200000e+00 2.300000e+00
 SCALARS other double 2
 LOOKUP_TABLE default
 1.200000e+00 2.300000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_mat_cell.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_mat_cell_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_mat_cell_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_mat_cell_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -14,10 +14,13 @@
 CELL_TYPES 1
 5
 CELL_DATA 1
-VECTORS traction double
-1.100000e+00 2.200000e+00 0.0
 SCALARS pressure double 1
 LOOKUP_TABLE default
 2.100000e+00
-VECTORS other double
+VECTORS traction double
+1.100000e+00 2.200000e+00 0.0
+VECTORS stress double
 1.200000e+00 2.300000e+00 3.400000e+00
+SCALARS other double 2
+LOOKUP_TABLE default
+1.200000e+00 2.300000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_mat_vertex.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_mat_vertex_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_mat_vertex_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_mat_vertex_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -14,13 +14,6 @@
 CELL_TYPES 1
 5
 POINT_DATA 6
-VECTORS displacements double
-1.100000e+00 2.200000e+00 0.0
-3.300000e+00 4.400000e+00 0.0
-5.500000e+00 6.600000e+00 0.0
-7.700000e+00 8.800000e+00 0.0
-9.900000e+00 1.000000e+01 0.0
-1.110000e+01 1.220000e+01 0.0
 SCALARS pressure double 1
 LOOKUP_TABLE default
 2.100000e+00
@@ -29,6 +22,20 @@
 5.400000e+00
 6.500000e+00
 7.600000e+00
+VECTORS displacement double
+1.100000e+00 2.200000e+00 0.0
+3.300000e+00 4.400000e+00 0.0
+5.500000e+00 6.600000e+00 0.0
+7.700000e+00 8.800000e+00 0.0
+9.900000e+00 1.000000e+01 0.0
+1.110000e+01 1.220000e+01 0.0
+VECTORS stress double
+1.100000e+00 1.200000e+00 1.300000e+00
+2.100000e+00 2.200000e+00 3.300000e+00
+3.100000e+00 3.200000e+00 4.300000e+00
+4.100000e+00 4.200000e+00 5.300000e+00
+5.100000e+00 5.200000e+00 6.300000e+00
+6.100000e+00 6.200000e+00 7.300000e+00
 SCALARS other double 2
 LOOKUP_TABLE default
 1.200000e+00 2.300000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_points_vertex_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_points_vertex_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_points_vertex_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -15,15 +15,19 @@
 1
 1
 POINT_DATA 3
-VECTORS displacements double
-7.366667e+00 8.133334e+00 0.0
-4.400000e+00 5.500000e+00 0.0
-7.700000e+00 8.800000e+00 0.0
 SCALARS pressure double 1
 LOOKUP_TABLE default
 5.400000e+00
 3.750000e+00
 5.400000e+00
+VECTORS displacement double
+7.366667e+00 8.133334e+00 0.0
+4.400000e+00 5.500000e+00 0.0
+7.700000e+00 8.800000e+00 0.0
+VECTORS stress double
+4.100000e+00 4.200000e+00 4.300000e+00
+2.600000e+00 2.700000e+00 2.800000e+00
+4.100000e+00 4.200000e+00 4.300000e+00
 SCALARS other double 2
 LOOKUP_TABLE default
 7.133334e+00 8.233334e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_surf_cell.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_surf_cell_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_surf_cell_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_surf_cell_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -10,10 +10,13 @@
 CELL_TYPES 1
 3
 CELL_DATA 1
-VECTORS traction double
-1.100000e+00 2.200000e+00 0.0
 SCALARS pressure double 1
 LOOKUP_TABLE default
 2.100000e+00
-VECTORS other double
+VECTORS traction double
+1.100000e+00 2.200000e+00 0.0
+VECTORS stress double
 1.200000e+00 2.300000e+00 3.400000e+00
+SCALARS other double 2
+LOOKUP_TABLE default
+1.200000e+00 2.300000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_surf_vertex.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_surf_vertex_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_surf_vertex_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_surf_vertex_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -10,13 +10,16 @@
 CELL_TYPES 1
 3
 POINT_DATA 2
-VECTORS displacements double
-3.300000e+00 4.400000e+00 0.0
-7.700000e+00 8.800000e+00 0.0
 SCALARS pressure double 1
 LOOKUP_TABLE default
 3.200000e+00
 5.400000e+00
+VECTORS displacement double
+3.300000e+00 4.400000e+00 0.0
+7.700000e+00 8.800000e+00 0.0
+VECTORS stress double
+2.100000e+00 2.200000e+00 2.300000e+00
+4.100000e+00 4.200000e+00 4.300000e+00
 SCALARS other double 2
 LOOKUP_TABLE default
 3.400000e+00 4.500000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_vertex.h5
===================================================================
(Binary files differ)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_vertex.xmf
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_vertex.xmf	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_vertex.xmf	2012-11-01 17:04:11 UTC (rev 20976)
@@ -32,7 +32,7 @@
 	  </DataItem>
 	</Geometry>
 	<Attribute
-	   Name="displacements_x"
+	   Name="displacement_x"
 	   Type="Scalar"
 	   Center="Node">
           <DataItem ItemType="HyperSlab"
@@ -49,12 +49,12 @@
 	       DataType="Float" Precision="8"
 	       Dimensions="1 6 2"
 	       Format="HDF">
-	      &HeavyData;:/vertex_fields/displacements
+	      &HeavyData;:/vertex_fields/displacement
 	    </DataItem>
 	  </DataItem>
 	</Attribute>
 	<Attribute
-	   Name="displacements_y"
+	   Name="displacement_y"
 	   Type="Scalar"
 	   Center="Node">
           <DataItem ItemType="HyperSlab"
@@ -71,7 +71,7 @@
 	       DataType="Float" Precision="8"
 	       Dimensions="1 6 2"
 	       Format="HDF">
-	      &HeavyData;:/vertex_fields/displacements
+	      &HeavyData;:/vertex_fields/displacement
 	    </DataItem>
 	  </DataItem>
 	</Attribute>
@@ -141,6 +141,72 @@
 	    </DataItem>
 	  </DataItem>
 	</Attribute>
+	<Attribute
+	   Name="stress_xx"
+	   Type="Scalar"
+	   Center="Node">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 6 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 0
+              1 1 1
+              1 6 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 6 3"
+	       Format="HDF">
+	      &HeavyData;:/vertex_fields/stress
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="stress_yy"
+	   Type="Scalar"
+	   Center="Node">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 6 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 1
+              1 1 1
+              1 6 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 6 3"
+	       Format="HDF">
+	      &HeavyData;:/vertex_fields/stress
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
+	<Attribute
+	   Name="stress_xy"
+	   Type="Scalar"
+	   Center="Node">
+          <DataItem ItemType="HyperSlab"
+		    Dimensions="1 6 1"
+		    Type="HyperSlab">
+            <DataItem
+	       Dimensions="3 3"
+	       Format="XML">
+              0 0 2
+              1 1 1
+              1 6 1
+	    </DataItem>
+	    <DataItem
+	       DataType="Float" Precision="8"
+	       Dimensions="1 6 3"
+	       Format="HDF">
+	      &HeavyData;:/vertex_fields/stress
+	    </DataItem>
+	  </DataItem>
+	</Attribute>
     </Grid>
   </Domain>
 </Xdmf>

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_vertex_t10.vtk
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_vertex_t10.vtk	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/libtests/meshio/data/tri3_vertex_t10.vtk	2012-11-01 17:04:11 UTC (rev 20976)
@@ -16,13 +16,6 @@
 5
 5
 POINT_DATA 6
-VECTORS displacements double
-1.100000e+00 2.200000e+00 0.0
-3.300000e+00 4.400000e+00 0.0
-5.500000e+00 6.600000e+00 0.0
-7.700000e+00 8.800000e+00 0.0
-9.900000e+00 1.000000e+01 0.0
-1.110000e+01 1.220000e+01 0.0
 SCALARS pressure double 1
 LOOKUP_TABLE default
 2.100000e+00
@@ -31,6 +24,20 @@
 5.400000e+00
 6.500000e+00
 7.600000e+00
+VECTORS displacement double
+1.100000e+00 2.200000e+00 0.0
+3.300000e+00 4.400000e+00 0.0
+5.500000e+00 6.600000e+00 0.0
+7.700000e+00 8.800000e+00 0.0
+9.900000e+00 1.000000e+01 0.0
+1.110000e+01 1.220000e+01 0.0
+VECTORS stress double
+1.100000e+00 1.200000e+00 1.300000e+00
+2.100000e+00 2.200000e+00 2.300000e+00
+3.100000e+00 3.200000e+00 3.300000e+00
+4.100000e+00 4.200000e+00 4.300000e+00
+5.100000e+00 5.200000e+00 5.300000e+00
+6.100000e+00 6.200000e+00 6.300000e+00
 SCALARS other double 2
 LOOKUP_TABLE default
 1.200000e+00 2.300000e+00

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/faults/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/faults/Makefile.am	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/faults/Makefile.am	2012-11-01 17:04:11 UTC (rev 20976)
@@ -32,6 +32,7 @@
 	TestEqKinSrc.py \
 	TestFaultCohesiveKin.py \
 	TestFaultCohesiveDyn.py \
+	TestTractPerturbation.py \
 	TestFaultCohesiveImpulses.py \
 	TestLiuCosSlipFn.py \
 	TestSingleRupture.py \

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/feassemble/TestElasticityExplicit.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/feassemble/TestElasticityExplicit.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/feassemble/TestElasticityExplicit.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -121,8 +121,14 @@
     (mesh, integrator) = self._preinitialize()
     fields = self._initialize(mesh, integrator)
 
-    from pylith.utils.utils import maxscalar
-    self.assertAlmostEqual(1.0, integrator.stableTimeStep(mesh)/maxscalar(), 7)
+    b = 2**0.5
+    a = 2**0.5
+    c = 2.0
+    k = 0.5 * (a + b + c)
+    r = (k*(k-a)*(k-b)*(k-c))**0.5 / k
+    dtStable = 3*r/6000.0
+
+    self.assertAlmostEqual(1.0, integrator.stableTimeStep(mesh)/dtStable, 7)
     return
 
 
@@ -185,9 +191,12 @@
     (mesh, integrator) = self._preinitialize()
     fields = self._initialize(mesh, integrator)
 
-    from pylith.topology.Jacobian import Jacobian
-    jacobian = Jacobian(fields.solution())
+    from pylith.topology.Field import MeshField
+    jacobian = MeshField(mesh)
+    jacobian.newSection(jacobian.VERTICES_FIELD, mesh.coordsys().spaceDim())
+    jacobian.allocate()
     jacobian.zero()
+
     t = 7.3
     self.assertEqual(True, integrator.needNewJacobian())
     integrator.integrateJacobian(jacobian, t, fields)

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/feassemble/TestElasticityExplicitLgDeform.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/feassemble/TestElasticityExplicitLgDeform.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/feassemble/TestElasticityExplicitLgDeform.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -185,9 +185,12 @@
     (mesh, integrator) = self._preinitialize()
     fields = self._initialize(mesh, integrator)
 
-    from pylith.topology.Jacobian import Jacobian
-    jacobian = Jacobian(fields.solution())
+    from pylith.topology.Field import MeshField
+    jacobian = MeshField(mesh)
+    jacobian.newSection(jacobian.VERTICES_FIELD, mesh.coordsys().spaceDim())
+    jacobian.allocate()
     jacobian.zero()
+
     t = 7.3
     self.assertEqual(True, integrator.needNewJacobian())
     integrator.integrateJacobian(jacobian, t, fields)
@@ -309,6 +312,7 @@
     fields.add("disp(t+dt)", "displacement")
     fields.add("disp(t)", "displacement")
     fields.add("disp(t-dt)", "displacement")
+    fields.add("velocity(t)", "velocity")
     fields.add("acceleration(t)", "acceleration")
     fields.solutionName("disp(t+dt)")
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/friction/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/friction/Makefile.am	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/friction/Makefile.am	2012-11-01 17:04:11 UTC (rev 20976)
@@ -30,6 +30,7 @@
 	TestFrictionModel.py \
 	TestStaticFriction.py \
 	TestSlipWeakening.py \
+	TestSlipWeakeningTime.py \
 	TestRateStateAgeing.py \
 	TestTimeWeakening.py
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/materials/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/materials/Makefile.am	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/materials/Makefile.am	2012-11-01 17:04:11 UTC (rev 20976)
@@ -41,6 +41,7 @@
 	TestGenMaxwellPlaneStrain.py \
 	TestGenMaxwellQpQsIsotropic3D.py \
 	TestPowerLaw3D.py \
+	TestPowerLawPlaneStrain.py \
 	TestDruckerPrager3D.py \
 	TestDruckerPragerPlaneStrain.py
 

Copied: short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/materials/TestPowerLawPlaneStrain.py (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/unittests/pytests/materials/TestPowerLawPlaneStrain.py)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/materials/TestPowerLawPlaneStrain.py	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/materials/TestPowerLawPlaneStrain.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/unittests/pytests/materials/testmaterials.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/materials/testmaterials.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/materials/testmaterials.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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/branches/pylith-scecdynrup/unittests/pytests/mpi/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/mpi/Makefile.am	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/mpi/Makefile.am	2012-11-01 17:04:11 UTC (rev 20976)
@@ -25,7 +25,8 @@
 TESTS_ENVIRONMENT = $(PYTHON)
 
 noinst_PYTHON = \
-	TestCommunicator.py
+	TestCommunicator.py \
+	TestReduce.py
 
 
 # End of file 

Copied: short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/mpi/TestReduce.py (from rev 20973, short/3D/PyLith/branches/v1.7-trunk/unittests/pytests/mpi/TestReduce.py)
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/mpi/TestReduce.py	                        (rev 0)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/mpi/TestReduce.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -0,0 +1,66 @@
+#!/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/utils/TestReduce.py
+
+## @brief Unit testing of MPI reduce functions.
+
+import unittest
+
+import pylith.mpi.mpi as mpi
+
+# ----------------------------------------------------------------------
+class TestReduce(unittest.TestCase):
+  """
+  Unit testing of MPI reduce functions.
+  """
+  
+
+  def test_allreduce_scalar_double(self):
+    """
+    Test allreduce_double().
+    """
+    value = 2.0
+    result = mpi.allreduce_scalar_double(value, mpi.mpi_sum(), mpi.petsc_comm_world())
+    self.assertEqual(value, result)
+
+    result = mpi.allreduce_scalar_double(value, mpi.mpi_min(), mpi.petsc_comm_self())
+    self.assertEqual(value, result)
+
+    result = mpi.allreduce_scalar_double(value, mpi.mpi_max(), mpi.petsc_comm_world())
+    self.assertEqual(value, result)
+    return
+
+
+  def test_allreduce_scalar_int(self):
+    """
+    Test allreduce_int().
+    """
+    value = 3
+    result = mpi.allreduce_scalar_int(value, mpi.mpi_sum(), mpi.petsc_comm_world())
+    self.assertEqual(value, result)
+
+    result = mpi.allreduce_scalar_int(value, mpi.mpi_min(), mpi.petsc_comm_self())
+    self.assertEqual(value, result)
+
+    result = mpi.allreduce_scalar_int(value, mpi.mpi_max(), mpi.petsc_comm_world())
+    self.assertEqual(value, result)
+    return
+
+
+# End of file 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/mpi/testmpi.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/mpi/testmpi.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/mpi/testmpi.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -65,6 +65,9 @@
     from TestCommunicator import TestCommunicator
     suite.addTest(unittest.makeSuite(TestCommunicator))
 
+    from TestReduce import TestReduce
+    suite.addTest(unittest.makeSuite(TestReduce))
+
     return suite
 
 

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/problems/TestTimeStepAdapt.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/problems/TestTimeStepAdapt.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/problems/TestTimeStepAdapt.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -91,8 +91,12 @@
     tstep.adaptSkip = 2
     integrators = [Integrator(2.0),
                    Integrator(0.5)]
-    mesh = None
 
+    from pylith.topology.Mesh import Mesh
+    from pylith.mpi.Communicator import petsc_comm_world
+    mesh = Mesh()
+    mesh.setComm(petsc_comm_world())
+
     # Set time step
     dt = 0.5 / 2.0
     self.assertEqual(dt, tstep.timeStep(mesh, integrators))
@@ -145,7 +149,12 @@
     
     integrators = [Integrator(3.0),
                    Integrator(2.4)]
-    mesh = None
+
+    from pylith.topology.Mesh import Mesh
+    from pylith.mpi.Communicator import petsc_comm_world
+    mesh = Mesh()
+    mesh.setComm(petsc_comm_world())
+
     dt = 2.4 / 2.0
     tstep.timeStep(mesh, integrators)
     self.assertEqual(dt, tstep.currentStep())

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/problems/TestTimeStepUniform.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/problems/TestTimeStepUniform.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/problems/TestTimeStepUniform.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -83,8 +83,12 @@
 
     integrators = [Integrator(4.0),
                    Integrator(8.0)]
-    mesh = None
 
+    from pylith.topology.Mesh import Mesh
+    from pylith.mpi.Communicator import petsc_comm_world
+    mesh = Mesh()
+    mesh.setComm(petsc_comm_world())
+
     self.assertEqual(1.0, tstep.timeStep(mesh, integrators))
 
     tstep.dtN = 0.5

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/problems/TestTimeStepUser.py
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/problems/TestTimeStepUser.py	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/problems/TestTimeStepUser.py	2012-11-01 17:04:11 UTC (rev 20976)
@@ -108,8 +108,12 @@
 
     integrators = [Integrator(40.0),
                    Integrator(80.0)]
-    mesh = None
 
+    from pylith.topology.Mesh import Mesh
+    from pylith.mpi.Communicator import petsc_comm_world
+    mesh = Mesh()
+    #mesh.setComm(petsc_comm_world())
+
     self.assertEqual(step1, tstep.timeStep(mesh, integrators))
     self.assertEqual(step2, tstep.timeStep(mesh, integrators))
     self.assertEqual(step3, tstep.timeStep(mesh, integrators))
@@ -144,8 +148,12 @@
 
     integrators = [Integrator(4.0),
                    Integrator(8.0)]
-    mesh = None
 
+    from pylith.topology.Mesh import Mesh
+    from pylith.mpi.Communicator import petsc_comm_world
+    mesh = Mesh()
+    #mesh.setComm(petsc_comm_world())
+
     tstep.timeStep(mesh, integrators)
     stepE = 1.0 / 0.5 # Nondimensionalize
     self.assertEqual(stepE, tstep.currentStep())

Modified: short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/utils/Makefile.am
===================================================================
--- short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/utils/Makefile.am	2012-11-01 02:16:40 UTC (rev 20975)
+++ short/3D/PyLith/branches/pylith-scecdynrup/unittests/pytests/utils/Makefile.am	2012-11-01 17:04:11 UTC (rev 20976)
@@ -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