[cig-commits] r22263 - in short/3D/PyLith/trunk: . libsrc/pylith/faults libsrc/pylith/materials pylith/bc pylith/meshio share tests/2d tests/2d/nonplanar unittests/pytests/bc unittests/pytests/meshio

brad at geodynamics.org brad at geodynamics.org
Thu Jun 13 15:08:47 PDT 2013


Author: brad
Date: 2013-06-13 15:08:47 -0700 (Thu, 13 Jun 2013)
New Revision: 22263

Added:
   short/3D/PyLith/trunk/tests/2d/nonplanar/
   short/3D/PyLith/trunk/tests/2d/nonplanar/bc.jou
   short/3D/PyLith/trunk/tests/2d/nonplanar/geometry.jou
   short/3D/PyLith/trunk/tests/2d/nonplanar/mesh.jou
   short/3D/PyLith/trunk/tests/2d/nonplanar/pylithapp.cfg
Modified:
   short/3D/PyLith/trunk/README
   short/3D/PyLith/trunk/configure.ac
   short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveImpulses.cc
   short/3D/PyLith/trunk/libsrc/pylith/materials/ElasticPlaneStrain.cc
   short/3D/PyLith/trunk/pylith/bc/DirichletBC.py
   short/3D/PyLith/trunk/pylith/meshio/PointsList.py
   short/3D/PyLith/trunk/share/valgrind-python.supp
   short/3D/PyLith/trunk/unittests/pytests/bc/TestDirichletBC.py
   short/3D/PyLith/trunk/unittests/pytests/meshio/TestOutputSolnPoints.py
Log:
Manual patches from reviewing v1.7-trunk commits.

Modified: short/3D/PyLith/trunk/README
===================================================================
--- short/3D/PyLith/trunk/README	2013-06-13 22:07:49 UTC (rev 22262)
+++ short/3D/PyLith/trunk/README	2013-06-13 22:08:47 UTC (rev 22263)
@@ -43,6 +43,37 @@
 
 
 ======================================================================
+MIGRATING FROM VERSION 1.8 TO 2.0
+======================================================================
+
+----------------------------------------------------------------------
+Version 2.0.0
+----------------------------------------------------------------------
+
+* Bug fixes
+
+  - Fixed two MPI related bugs in computing Green's functions in
+    parallel. The number of impulses corresponded to only those on
+    process 0.
+
+  - Corrected computation of fault tractions (Lagrange multipliers) on
+    process boundaries for prescribed slip with explicit time stepping.
+
+  - Fixed bug when reading in list of output points with just one
+    point.
+
+  - Adjusted autoconf Python setup macro to remove temporary
+    sysconfig.pyc file.
+
+  - Added check to make sure degree of freedom specified in Dirichlet
+    BC is consistent with spatial dimension of problem.
+
+  - Corrected two typos in the manual related to fault opening and
+    tractions in examples/3d/hex8/step20 and updating to the use of
+    cell.dimension for the quadrature scheme with tets.
+
+
+======================================================================
 MIGRATING FROM VERSION 1.7 TO 1.8
 ======================================================================
 

Modified: short/3D/PyLith/trunk/configure.ac
===================================================================
--- short/3D/PyLith/trunk/configure.ac	2013-06-13 22:07:49 UTC (rev 22262)
+++ short/3D/PyLith/trunk/configure.ac	2013-06-13 22:08:47 UTC (rev 22263)
@@ -212,6 +212,21 @@
   CIT_HDF5_LIB_PARALLEL
 fi
 
+# Full-scale testing with h5py
+if test "$enable_full_testing" = yes ; then
+  AM_PATH_PYTHON
+   AC_MSG_CHECKING(for python module h5py for full scale testing)
+  $PYTHON -c "import h5py" 2>/dev/null   
+  if test $? == 0; then
+    AC_MSG_RESULT([found h5py, enabling full scale testing])
+    enable_full_testing=yes
+  else
+    AC_MSG_RESULT([not found, disabling full scale testing])
+    enable_full_testing=no
+  fi
+fi
+AM_CONDITIONAL([ENABLE_FULL_TESTING], [test "$enable_full_testing" = yes])
+
 # CUDA
 if test "$enable_cuda" = "yes" ; then
   CIT_CUDA_INCDIR

Modified: short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveImpulses.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveImpulses.cc	2013-06-13 22:07:49 UTC (rev 22262)
+++ short/3D/PyLith/trunk/libsrc/pylith/faults/FaultCohesiveImpulses.cc	2013-06-13 22:08:47 UTC (rev 22263)
@@ -412,7 +412,7 @@
   err = MPI_Comm_size(comm, &commSize);PYLITH_CHECK_ERROR(err);
   err = MPI_Comm_rank(comm, &commRank);PYLITH_CHECK_ERROR(err);
   int_array numImpulsesAll(commSize);
-  err = MPI_Allgather((void*) &numImpulsesLocal, 1, MPI_INT, (void*) &numImpulsesAll[0], 1, MPI_INT, comm);PYLITH_CHECK_ERROR(err);
+  err = MPI_Allgather(&numImpulsesLocal, 1, MPI_INT, &numImpulsesAll[0], 1, MPI_INT, comm);PYLITH_CHECK_ERROR(err);
   
   int localOffset = 0;
   for (int i=0; i < commRank; ++i) {

Modified: short/3D/PyLith/trunk/libsrc/pylith/materials/ElasticPlaneStrain.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/pylith/materials/ElasticPlaneStrain.cc	2013-06-13 22:07:49 UTC (rev 22262)
+++ short/3D/PyLith/trunk/libsrc/pylith/materials/ElasticPlaneStrain.cc	2013-06-13 22:08:47 UTC (rev 22263)
@@ -262,19 +262,18 @@
 // ----------------------------------------------------------------------
 // Compute elastic constants at location from properties.
 void
-pylith::materials::ElasticPlaneStrain::_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)
+pylith::materials::ElasticPlaneStrain::_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)
 { // calcElasticConsts
   assert(0 != elasticConsts);
   assert(_ElasticPlaneStrain::numElasticConsts == numElasticConsts);
@@ -319,11 +318,10 @@
 // ----------------------------------------------------------------------
 // Get stable time step for implicit time integration.
 PylithScalar
-pylith::materials::ElasticPlaneStrain::_stableTimeStepImplicit(
-				     const PylithScalar* properties,
-				     const int numProperties,
-				     const PylithScalar* stateVars,
-				     const int numStateVars) const
+pylith::materials::ElasticPlaneStrain::_stableTimeStepImplicit(const PylithScalar* properties,
+							       const int numProperties,
+							       const PylithScalar* stateVars,
+							       const int numStateVars) const
 { // _stableTimeStepImplicit
   return pylith::PYLITH_MAXSCALAR;
 } // _stableTimeStepImplicit

Modified: short/3D/PyLith/trunk/pylith/bc/DirichletBC.py
===================================================================
--- short/3D/PyLith/trunk/pylith/bc/DirichletBC.py	2013-06-13 22:07:49 UTC (rev 22262)
+++ short/3D/PyLith/trunk/pylith/bc/DirichletBC.py	2013-06-13 22:08:47 UTC (rev 22263)
@@ -79,7 +79,12 @@
     logEvent = "%sverify" % self._loggingPrefix
     self._eventLogger.eventBegin(logEvent)
 
-    BoundaryCondition.verifyConfiguration(self, self.mesh())
+    BoundaryCondition.verifyConfiguration(self, self.mesh)
+    spaceDim = self.mesh.coordsys().spaceDim()
+    for d in self.bcDOF:
+      if d < 0 or d >= spaceDim:
+        raise ValueError("Attempting to constrain DOF (%d) that doesn't exist. Space dimension is %d." % \
+                         (d, spaceDim))
 
     self._eventLogger.eventEnd(logEvent)
     return

Modified: short/3D/PyLith/trunk/pylith/meshio/PointsList.py
===================================================================
--- short/3D/PyLith/trunk/pylith/meshio/PointsList.py	2013-06-13 22:07:49 UTC (rev 22262)
+++ short/3D/PyLith/trunk/pylith/meshio/PointsList.py	2013-06-13 22:08:47 UTC (rev 22263)
@@ -89,6 +89,10 @@
       points = numpy.loadtxt(self.filename,
                              comments=self.commentDelimiter, 
                              delimiter=self.valueDelimiter)
+    ndims = len(points.shape)
+    if ndims == 1:
+      spaceDim = points.shape[0]
+      points = points.reshape((1,spaceDim))
     return points
   
 

Modified: short/3D/PyLith/trunk/share/valgrind-python.supp
===================================================================
--- short/3D/PyLith/trunk/share/valgrind-python.supp	2013-06-13 22:07:49 UTC (rev 22262)
+++ short/3D/PyLith/trunk/share/valgrind-python.supp	2013-06-13 22:08:47 UTC (rev 22263)
@@ -20,41 +20,70 @@
    ADDRESS_IN_RANGE/Invalid read of size 4
    Memcheck:Addr4
    fun:PyObject_Free
+   ...
 }
 
 {
    ADDRESS_IN_RANGE/Invalid read of size 4
-   Memcheck:Addr4
-   fun:PyObject_Realloc
+   Memcheck:Value4
+   fun:PyObject_Free
+   ...
 }
 
 {
    ADDRESS_IN_RANGE/Use of uninitialised value of size 8
    Memcheck:Value8
    fun:PyObject_Free
+   ...
 }
 
 {
-   ADDRESS_IN_RANGE/Use of uninitialised value of size 8
-   Memcheck:Value8
+   ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value(s)
+   Memcheck:Cond
+   fun:PyObject_Free
+   ...
+}
+
+{
+   ADDRESS_IN_RANGE/Invalid read of size 4
+   Memcheck:Addr4
    fun:PyObject_Realloc
+   ...
 }
 
 {
-   ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value(s)
-   Memcheck:Cond
-   fun:PyObject_Free
+   ADDRESS_IN_RANGE/Invalid read of size 4
+   Memcheck:Value4
+   fun:PyObject_Realloc
+   ...
 }
 
 {
+   ADDRESS_IN_RANGE/Use of uninitialised value of size 8
+   Memcheck:Value8
+   fun:PyObject_Realloc
+   ...
+}
+
+{
    ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value(s)
    Memcheck:Cond
    fun:PyObject_Realloc
+   ...
 }
 
 {
    ADDRESS_IN_RANGE/Conditional jump or move depends on uninitialised value(s)
    Memcheck:Cond
    fun:__strcpy_chk
+   ...
 }
 
+{
+   ADDRESS_IN_RANGE/blocks are still reachable in loss
+   Memcheck:Leak
+   ...
+   fun:Py_InitializeEx
+   fun:_ZN11spatialdata5units6ParserC1Ev
+   ...
+}
\ No newline at end of file

Added: short/3D/PyLith/trunk/tests/2d/nonplanar/bc.jou
===================================================================
--- short/3D/PyLith/trunk/tests/2d/nonplanar/bc.jou	                        (rev 0)
+++ short/3D/PyLith/trunk/tests/2d/nonplanar/bc.jou	2013-06-13 22:08:47 UTC (rev 22263)
@@ -0,0 +1,66 @@
+# -*- Python -*- (syntax highlighting)
+# ----------------------------------------------------------------------
+#
+# 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.
+#
+# ----------------------------------------------------------------------
+#
+# CUBIT journal file for creating blocks and nodesets associated with
+# materials and boundary conditions.
+#
+# NOTE: We remove the overlap between groups associated with 
+# Dirichlet BC and groups associated with faults because PyLith
+# does not allow Dirichlet BC to be applied to nodes adjacent to the fault.
+#
+# ----------------------------------------------------------------------
+# Create blocks for materials
+# ----------------------------------------------------------------------
+block 1 surface surf_inner
+block 1 name "inner"
+
+block 2 surface surf_outer
+block 2 name "outer"
+
+# ----------------------------------------------------------------------
+# Create nodeset for boundaries
+# ----------------------------------------------------------------------
+group "bndry_south" add node in curve 6
+group "bndry_south" add node in curve 7
+nodeset 11 group bndry_south
+nodeset 11 name "bndry_south"
+
+group "bndry_north" add node in curve 9
+group "bndry_north" add node in curve 8
+nodeset 12 group bndry_north
+nodeset 12 name "bndry_north"
+
+group "bndry_west" add node in curve 4
+nodeset 13 group bndry_west
+nodeset 13 name "bndry_west"
+
+group "bndry_east" add node in curve 2
+nodeset 14 group bndry_east
+nodeset 14 name "bndry_east"
+
+# ----------------------------------------------------------------------
+# Create nodeset for fault interfaces
+# ----------------------------------------------------------------------
+group "fault" add node in curve 5
+group "fault" remove node in bndry_north
+group "fault" remove node in bndry_south
+nodeset 20 group fault
+nodeset 20 name "fault"
+
+# End of file
+
+
+

Added: short/3D/PyLith/trunk/tests/2d/nonplanar/geometry.jou
===================================================================
--- short/3D/PyLith/trunk/tests/2d/nonplanar/geometry.jou	                        (rev 0)
+++ short/3D/PyLith/trunk/tests/2d/nonplanar/geometry.jou	2013-06-13 22:08:47 UTC (rev 22263)
@@ -0,0 +1,76 @@
+# -*- Python -*- (syntax highlighting)
+# ----------------------------------------------------------------------
+#
+# 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.
+#
+# ----------------------------------------------------------------------
+#
+# CUBIT journal file with geometry for 2-D nonplanar fault.
+#
+# ----------------------------------------------------------------------
+# Set units to SI.
+# ----------------------------------------------------------------------
+# {Units('si')}
+#
+# ----------------------------------------------------------------------
+# Reset geometry.
+# ----------------------------------------------------------------------
+reset
+
+# Make sure undo is off to prevent errors in stitching volumes.
+undo off
+
+# ----------------------------------------------------------------------
+# Create points and curves.
+# ----------------------------------------------------------------------
+# Domain
+create vertex x { -18.0*km} y {-18.0*km}
+create vertex x { +18.0*km} y {-18.0*km}
+create vertex x { +18.0*km} y {+18.0*km}
+create vertex x { -18.0*km} y {+18.0*km}
+
+create curve vertex 1 vertex 2
+create curve vertex 2 vertex 3
+create curve vertex 3 vertex 4
+create curve vertex 4 vertex 1
+
+# Arc for fault
+create vertex x { -6.0*km} y {-18.0*km}
+create vertex x {0*km} y {0*km}
+create vertex x { -6.0*km} y {+18.0*km}
+
+create curve arc three vertex 9 10 11
+
+# ----------------------------------------------------------------------
+# Split curves to form bounding curves for surfaces
+# ----------------------------------------------------------------------
+split curve 1 at vertex 9
+split curve 3 at vertex 11
+
+# ----------------------------------------------------------------------
+# Create surfaces using bounding curves
+# ----------------------------------------------------------------------
+create surface curve 4 5 6 9
+surface {Id("surface")} name "surf_inner"
+
+create surface curve 2 5 7 8
+surface {Id("surface")} name "surf_outer"
+
+# ----------------------------------------------------------------------
+# Imprint/merge
+# ----------------------------------------------------------------------
+delete vertex all
+imprint all
+merge all
+
+# End of file
+

Added: short/3D/PyLith/trunk/tests/2d/nonplanar/mesh.jou
===================================================================
--- short/3D/PyLith/trunk/tests/2d/nonplanar/mesh.jou	                        (rev 0)
+++ short/3D/PyLith/trunk/tests/2d/nonplanar/mesh.jou	2013-06-13 22:08:47 UTC (rev 22263)
@@ -0,0 +1,57 @@
+# -*- Python -*- (syntax highlighting)
+# ----------------------------------------------------------------------
+#
+# 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.
+#
+# ----------------------------------------------------------------------
+#
+# CUBIT journal file for generating a 2-D finite-element mesh with
+# triangular cells.
+#
+# ----------------------------------------------------------------------
+# Generate geometry
+# ----------------------------------------------------------------------
+playback 'geometry.jou'
+
+# ----------------------------------------------------------------------
+# Set discretization size and scheme
+# ----------------------------------------------------------------------
+surface all scheme trimesh
+curve all scheme default
+#{dx=600.0*m}
+surface all size {600*m}
+
+# ----------------------------------------------------------------------
+# Generate the mesh
+# ----------------------------------------------------------------------
+mesh surface all
+
+# ----------------------------------------------------------------------
+# Smooth mesh to improve quality (if nec)
+# ----------------------------------------------------------------------
+surface all smooth scheme condition number beta 1.2 cpu 10
+smooth surface all
+
+# ----------------------------------------------------------------------
+# Setup boundary conditions.
+# ----------------------------------------------------------------------
+playback 'bc.jou'
+
+# ----------------------------------------------------------------------
+# Export exodus file
+# ----------------------------------------------------------------------
+export mesh "mesh.exo" dimension 2 overwrite
+
+# End of file
+
+
+

Added: short/3D/PyLith/trunk/tests/2d/nonplanar/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/nonplanar/pylithapp.cfg	                        (rev 0)
+++ short/3D/PyLith/trunk/tests/2d/nonplanar/pylithapp.cfg	2013-06-13 22:08:47 UTC (rev 22263)
@@ -0,0 +1,208 @@
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# PROBLEM DESCRIPTION
+# ----------------------------------------------------------------------
+
+# Spontaneous rupture on a curved fault. Rupture occurs simultaneously
+# across entire fault.
+
+# ----------------------------------------------------------------------
+# RUNNING THE SIMULATION
+# ----------------------------------------------------------------------
+
+# This is a self-contained simulation configuration file.
+#
+# To run the simulation:
+# pylith
+
+# ----------------------------------------------------------------------
+# journal
+# ----------------------------------------------------------------------
+[pylithapp.journal.info]
+timedependent = 1
+explicit = 1
+meshiocubit = 1
+meshimporter = 1
+elasticityexplicit = 1
+faultcohesivedyn = 1
+
+# ----------------------------------------------------------------------
+# mesh_generator
+# ----------------------------------------------------------------------
+[pylithapp.mesh_generator]
+reader = pylith.meshio.MeshIOCubit
+
+[pylithapp.mesh_generator.reader]
+filename = mesh.exo
+coordsys.space_dim = 2
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+dimension = 2
+
+formulation = pylith.problems.ExplicitTri3
+
+normalizer = spatialdata.units.NondimElasticDynamic
+
+[pylithapp.timedependent.formulation.time_step]
+total_time = 4.0*s
+dt = 0.05*s
+
+# ----------------------------------------------------------------------
+# materials
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+materials = [inner,outer]
+materials.inner = pylith.materials.ElasticPlaneStrain
+materials.outer = pylith.materials.ElasticPlaneStrain
+
+[pylithapp.timedependent.materials.inner]
+label = Elastic material
+id = 1
+
+db_properties = spatialdata.spatialdb.UniformDB
+db_properties.label = Elastic properties
+db_properties.values = [vp, vs, density]
+db_properties.data = [5196.0*m/s, 3000.0*m/s, 2500.0*m/2]
+
+quadrature.cell = pylith.feassemble.FIATSimplex
+quadrature.cell.dimension = 2
+quadrature.cell.quad_order = 1
+
+[pylithapp.timedependent.materials.outer]
+label = Elastic material
+id = 2
+
+db_properties = spatialdata.spatialdb.UniformDB
+db_properties.label = Elastic properties
+db_properties.values = [vp, vs, density]
+db_properties.data = [5196.0*m/s, 3000.0*m/s, 2500.0*m/2]
+
+quadrature.cell = pylith.feassemble.FIATSimplex
+quadrature.cell.dimension = 2
+quadrature.cell.quad_order = 1
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+bc = [north,south,east,west]
+bc.north = pylith.bc.AbsorbingDampers
+bc.south = pylith.bc.AbsorbingDampers
+bc.east = pylith.bc.AbsorbingDampers
+bc.west = pylith.bc.AbsorbingDampers
+
+[pylithapp.timedependent.bc.north]
+label = bndry_north
+
+db = spatialdata.spatialdb.UniformDB
+db.label = Elastic properties
+db.values = [vp, vs, density]
+db.data = [5196.0*m/s, 3000.0*m/s, 2500.0*m/2]
+
+quadrature.cell = pylith.feassemble.FIATSimplex
+quadrature.cell.dimension = 1
+quadrature.cell.quad_order = 2
+
+[pylithapp.timedependent.bc.south]
+label = bndry_south
+
+db = spatialdata.spatialdb.UniformDB
+db.label = Elastic properties
+db.values = [vp, vs, density]
+db.data = [5196.0*m/s, 3000.0*m/s, 2500.0*m/2]
+
+quadrature.cell = pylith.feassemble.FIATSimplex
+quadrature.cell.dimension = 1
+quadrature.cell.quad_order = 2
+
+[pylithapp.timedependent.bc.east]
+label = bndry_east
+
+db = spatialdata.spatialdb.UniformDB
+db.label = Elastic properties
+db.values = [vp, vs, density]
+db.data = [5196.0*m/s, 3000.0*m/s, 2500.0*m/2]
+
+quadrature.cell = pylith.feassemble.FIATSimplex
+quadrature.cell.dimension = 1
+quadrature.cell.quad_order = 2
+
+[pylithapp.timedependent.bc.west]
+label = bndry_west
+
+db = spatialdata.spatialdb.UniformDB
+db.label = Elastic properties
+db.values = [vp, vs, density]
+db.data = [5196.0*m/s, 3000.0*m/s, 2500.0*m/2]
+
+quadrature.cell = pylith.feassemble.FIATSimplex
+quadrature.cell.dimension = 1
+quadrature.cell.quad_order = 2
+
+# ----------------------------------------------------------------------
+# faults
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+interfaces = [fault]
+interfaces.fault = pylith.faults.FaultCohesiveDyn
+
+[pylithapp.timedependent.interfaces.fault]
+id = 100
+label = fault
+
+quadrature.cell = pylith.feassemble.FIATSimplex
+quadrature.cell.dimension = 1
+quadrature.cell.quad_order = 2
+
+friction = pylith.friction.SlipWeakening
+friction.label = Slip weakening
+
+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.2,0.2*m,0.0*Pa]
+
+traction_perturbation = pylith.faults.TractPerturbation
+
+[pylithapp.timedependent.interfaces.fault.traction_perturbation]
+db_initial = spatialdata.spatialdb.UniformDB
+db_initial.label = Initial fault tractions
+db_initial.values = [traction-shear,traction-normal]
+db_initial.data = [-0.61*MPa, -1.0*MPa]
+
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+[pylithapp.problem.formulation.output.output]
+vertex_data_fields = [displacement,velocity]
+skip = 2
+writer = pylith.meshio.DataWriterHDF5
+writer.filename = output/nonplanar.h5
+
+[pylithapp.timedependent.interfaces.fault.output]
+vertex_info_fields=[traction_initial_value]
+vertex_data_fields=[slip,slip_rate,traction]
+skip = 2
+writer = pylith.meshio.DataWriterHDF5
+writer.filename = output/nonplanar-fault.h5
+
+[pylithapp.timedependent.materials.inner.output]
+cell_info_fields = []
+cell_data_fields = []
+cell_filter = pylith.meshio.CellFilterAvg
+writer = pylith.meshio.DataWriterHDF5
+writer.filename = output/nonplanar-inner.h5
+
+[pylithapp.timedependent.materials.inner.output]
+cell_info_fields = []
+cell_data_fields = []
+cell_filter = pylith.meshio.CellFilterAvg
+writer = pylith.meshio.DataWriterHDF5
+writer.filename = output/nonplanar-outer.h5
+
+# End of file

Modified: short/3D/PyLith/trunk/unittests/pytests/bc/TestDirichletBC.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/bc/TestDirichletBC.py	2013-06-13 22:07:49 UTC (rev 22262)
+++ short/3D/PyLith/trunk/unittests/pytests/bc/TestDirichletBC.py	2013-06-13 22:08:47 UTC (rev 22263)
@@ -99,6 +99,22 @@
     return
 
 
+  def test_verifyConfiguration(self):
+    """
+    Test verifyConfiguration().
+
+    WARNING: This is not a rigorous test of verifyConfiguration() because we
+    don't verify the results.
+    """
+
+    (mesh, bc, field) = self._initialize()
+    bc.verifyConfiguration()
+
+    # We should really add something here to check to make sure things
+    # actually initialized correctly    
+    return
+
+
   def test_setConstraintSizes(self):
     """
     Test setConstraintSizes().
@@ -183,7 +199,6 @@
     neither set the input fields or verify the results.
     """
     (mesh, bc, field) = self._initialize()
-    field.allocate()
     bc.finalize()
 
     # We should really add something here to check to make sure things
@@ -243,7 +258,10 @@
     from pylith.topology.Field import Field
     field = Field(mesh)
     field.newSection(field.VERTICES_FIELD, cs.spaceDim())
+    field.allocate()
 
+    field.zero()
+    
     return (mesh, bc, field)
 
 

Modified: short/3D/PyLith/trunk/unittests/pytests/meshio/TestOutputSolnPoints.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/meshio/TestOutputSolnPoints.py	2013-06-13 22:07:49 UTC (rev 22262)
+++ short/3D/PyLith/trunk/unittests/pytests/meshio/TestOutputSolnPoints.py	2013-06-13 22:08:47 UTC (rev 22263)
@@ -102,6 +102,22 @@
     return
   
   
+  def test_initialize2(self):
+    """
+    Test initialize().
+    """
+    output = OutputSolnPoints()
+    output.inventory.reader.inventory.filename = "data/point.txt"
+    output.inventory.reader._configure()
+    output.inventory.writer.inventory.filename = "test.vtk"
+    output.inventory.writer._configure()
+    output._configure()
+
+    output.preinitialize()
+    output.initialize(self.mesh, self.normalizer)
+    return
+
+
   def test_initialize(self):
     """
     Test initialize().



More information about the CIG-COMMITS mailing list