[cig-commits] r15078 - in short/3D/PyLith/trunk: . pylith/perf tests/1d tests/1d/line2 tests/1d/line3

brad at geodynamics.org brad at geodynamics.org
Thu May 28 14:22:26 PDT 2009


Author: brad
Date: 2009-05-28 14:22:24 -0700 (Thu, 28 May 2009)
New Revision: 15078

Added:
   short/3D/PyLith/trunk/tests/1d/line3/TestLine3.py
   short/3D/PyLith/trunk/tests/1d/line3/finalslip.spatialdb
   short/3D/PyLith/trunk/tests/1d/line3/sliptime.spatialdb
Removed:
   short/3D/PyLith/trunk/tests/1d/line3/dislocation_disp.spatialdb
   short/3D/PyLith/trunk/tests/1d/line3/dislocation_slip.spatialdb
   short/3D/PyLith/trunk/tests/1d/line3/dislocation_sliprate.spatialdb
   short/3D/PyLith/trunk/tests/1d/line3/dislocation_sliptime.spatialdb
Modified:
   short/3D/PyLith/trunk/TODO
   short/3D/PyLith/trunk/configure.ac
   short/3D/PyLith/trunk/pylith/perf/Mesh.py
   short/3D/PyLith/trunk/tests/1d/Makefile.am
   short/3D/PyLith/trunk/tests/1d/line2/Makefile.am
   short/3D/PyLith/trunk/tests/1d/line2/TestLine2.py
   short/3D/PyLith/trunk/tests/1d/line2/axialextension.cfg
   short/3D/PyLith/trunk/tests/1d/line2/dislocation.cfg
   short/3D/PyLith/trunk/tests/1d/line3/Makefile.am
   short/3D/PyLith/trunk/tests/1d/line3/TestAxial.py
   short/3D/PyLith/trunk/tests/1d/line3/TestDislocation.py
   short/3D/PyLith/trunk/tests/1d/line3/axialextension.cfg
   short/3D/PyLith/trunk/tests/1d/line3/bar.mesh
   short/3D/PyLith/trunk/tests/1d/line3/dislocation.cfg
   short/3D/PyLith/trunk/tests/1d/line3/matprops.spatialdb
   short/3D/PyLith/trunk/tests/1d/line3/testpylith.py
Log:
Added line3 full-scale tests.

Modified: short/3D/PyLith/trunk/TODO
===================================================================
--- short/3D/PyLith/trunk/TODO	2009-05-28 20:39:35 UTC (rev 15077)
+++ short/3D/PyLith/trunk/TODO	2009-05-28 21:22:24 UTC (rev 15078)
@@ -8,7 +8,7 @@
 
 Brad
   Questions for Matt:
-    How to set symmetric matrix flag?
+    How to use symmetric matrix (updateOperator)?
   cleanup
   full-scale testing
   test uniform refinement

Modified: short/3D/PyLith/trunk/configure.ac
===================================================================
--- short/3D/PyLith/trunk/configure.ac	2009-05-28 20:39:35 UTC (rev 15077)
+++ short/3D/PyLith/trunk/configure.ac	2009-05-28 21:22:24 UTC (rev 15078)
@@ -267,6 +267,7 @@
 		tests/petsc/Makefile
 		tests/1d/Makefile
 		tests/1d/line2/Makefile
+		tests/1d/line3/Makefile
 		tests/2d/Makefile
 		tests/2d/tri3/Makefile
 		tests/2d/quad4/Makefile

Modified: short/3D/PyLith/trunk/pylith/perf/Mesh.py
===================================================================
--- short/3D/PyLith/trunk/pylith/perf/Mesh.py	2009-05-28 20:39:35 UTC (rev 15077)
+++ short/3D/PyLith/trunk/pylith/perf/Mesh.py	2009-05-28 21:22:24 UTC (rev 15078)
@@ -4,6 +4,7 @@
 
 class Mesh(Memory):
   cellTypes = {(1,2): 'line2',
+               (1,3): 'line3',
                (2,3): 'tri3',
                (2,4): 'quad4',
                (3,4): 'tet4',

Modified: short/3D/PyLith/trunk/tests/1d/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/tests/1d/Makefile.am	2009-05-28 20:39:35 UTC (rev 15077)
+++ short/3D/PyLith/trunk/tests/1d/Makefile.am	2009-05-28 21:22:24 UTC (rev 15078)
@@ -11,7 +11,8 @@
 #
 
 SUBDIRS = \
-	line2
+	line2 \
+	line3
 
 
 # End of file 

Modified: short/3D/PyLith/trunk/tests/1d/line2/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line2/Makefile.am	2009-05-28 20:39:35 UTC (rev 15077)
+++ short/3D/PyLith/trunk/tests/1d/line2/Makefile.am	2009-05-28 21:22:24 UTC (rev 15078)
@@ -14,12 +14,12 @@
 
 check_SCRIPTS = testpylith.py
 
-noinst_PYTHON = \
+dist_noinst_PYTHON = \
 	TestLine2.py \
 	TestAxial.py \
 	TestDislocation.py
 
-noinst_DATA = \
+dist_noinst_DATA = \
 	bar.mesh \
 	matprops.spatialdb \
 	axialextension.cfg \
@@ -30,12 +30,12 @@
 
 noinst_TMP = \
 	axialextension_t0000000.vtk \
-	axialextension-statevars-elastic_info.vtk \
-	axialextension-statevars-elastic_t0000000.vtk \
+	axialextension-elastic_info.vtk \
+	axialextension-elastic_t0000000.vtk \
 	dislocation-fault_info.vtk \
 	dislocation-fault_t0000000.vtk \
-	dislocation-statevars-elastic_info.vtk \
-	dislocation-statevars-elastic_t0000000.vtk \
+	dislocation-elastic_info.vtk \
+	dislocation-elastic_t0000000.vtk \
 	dislocation_t0000000.vtk
 
 TESTS_ENVIRONMENT = $(PYTHON)
@@ -43,15 +43,14 @@
 
 # 'export' the input files by performing a mock install
 export_datadir = $(top_builddir)/tests/1d/line2
-export-data: $(noinst_PYTHON) $(noinst_DATA)
-	for f in $(noinst_PYTHON) $(noinst_DATA); do $(install_sh_DATA) $(srcdir)/$$f $(export_datadir); done
+export-data: $(dist_noinst_PYTHON) $(dist_noinst_DATA)
+	for f in $(dist_noinst_PYTHON) $(dist_noinst_DATA); do $(install_sh_DATA) $(srcdir)/$$f $(export_datadir); done
 
+clean-data:
+	if [ "X$(top_srcdir)" != "X$(top_builddir)" ]; then for f in $(dist_noinst_PYTHON) $(dist_noinst_DATA) $(noinst_TMP); do $(RM) $(RM_FLAGS) $(export_datadir)/$$f; done; fi
+
 BUILT_SOURCES = export-data
+clean-local: clean-data
 
-CLEANFILES = \
-	$(export_datadir)/$(noinst_PYTHON) \
-	$(export_datadir)/$(noinst_DATA) \
-	$(export_datadir)/$(noinst_TMP)
 
-
 # End of file 

Modified: short/3D/PyLith/trunk/tests/1d/line2/TestLine2.py
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line2/TestLine2.py	2009-05-28 20:39:35 UTC (rev 15077)
+++ short/3D/PyLith/trunk/tests/1d/line2/TestLine2.py	2009-05-28 21:22:24 UTC (rev 15078)
@@ -46,7 +46,7 @@
 
     ncells= self.mesh['ncells']
 
-    filename = "%s-statevars-elastic_info.vtk" % self.outputRoot
+    filename = "%s-elastic_info.vtk" % self.outputRoot
     m = self.density*self.vs**2
     l = self.density*self.vp**2 - 2*m
 
@@ -85,7 +85,7 @@
     if self.reader is None:
       return
 
-    filename = "%s-statevars-elastic_t0000000.vtk" % self.outputRoot
+    filename = "%s-elastic_t0000000.vtk" % self.outputRoot
 
     from pylith.tests.StateVariables import check_state_variables
     stateVars = ["total_strain", "stress"]

Modified: short/3D/PyLith/trunk/tests/1d/line2/axialextension.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line2/axialextension.cfg	2009-05-28 20:39:35 UTC (rev 15077)
+++ short/3D/PyLith/trunk/tests/1d/line2/axialextension.cfg	2009-05-28 21:22:24 UTC (rev 15078)
@@ -1,8 +1,8 @@
 # -*- Python -*-
 [axialextension]
 
-[axialextension.launcher]
-command = mpiexec -n ${nodes}
+[axialextension.launcher] # WARNING: THIS IS NOT PORTABLE
+command = mpirun -np ${nodes}
 
 # ----------------------------------------------------------------------
 # journal
@@ -85,4 +85,4 @@
 
 [axialextension.timedependent.materials.elastic.output]
 cell_filter = pylith.meshio.CellFilterAvgMesh
-writer.filename = axialextension-statevars-elastic.vtk
+writer.filename = axialextension-elastic.vtk

Modified: short/3D/PyLith/trunk/tests/1d/line2/dislocation.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line2/dislocation.cfg	2009-05-28 20:39:35 UTC (rev 15077)
+++ short/3D/PyLith/trunk/tests/1d/line2/dislocation.cfg	2009-05-28 21:22:24 UTC (rev 15078)
@@ -1,8 +1,8 @@
 # -*- Python -*-
 [dislocation]
 
-[dislocation.launcher]
-command = mpiexec -n ${nodes}
+[dislocation.launcher] # WARNING: THIS IS NOT PORTABLE
+command = mpirun -np ${nodes}
 
 # ----------------------------------------------------------------------
 # journal
@@ -12,10 +12,11 @@
 #implicit = 1
 #petsc = 1
 #solverlinear = 1
-#meshiocubit = 1
+#meshioascii = 1
 #implicitelasticity = 1
 #quadrature = 1
 #fiatsimplex = 1
+#faultcohesivekin = 1
 
 # ----------------------------------------------------------------------
 # mesh_generator
@@ -67,11 +68,8 @@
 # faults
 # ----------------------------------------------------------------------
 [dislocation.timedependent.interfaces]
-# Set the type of fault interface condition.
 fault = pylith.faults.FaultCohesiveKin
 
-# Set the parameters for the fault interface condition.
-
 [dislocation.timedependent.interfaces.fault]
 label = fault
 quadrature.cell.shape = point
@@ -104,7 +102,7 @@
 
 [dislocation.timedependent.materials.elastic.output]
 cell_filter = pylith.meshio.CellFilterAvgMesh
-writer.filename = dislocation-statevars-elastic.vtk
+writer.filename = dislocation-elastic.vtk
 
 [dislocation.timedependent.interfaces.fault.output.writer]
 filename = dislocation-fault.vtk

Modified: short/3D/PyLith/trunk/tests/1d/line3/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line3/Makefile.am	2009-05-28 20:39:35 UTC (rev 15077)
+++ short/3D/PyLith/trunk/tests/1d/line3/Makefile.am	2009-05-28 21:22:24 UTC (rev 15078)
@@ -14,26 +14,29 @@
 
 check_SCRIPTS = testpylith.py
 
-noinst_PYTHON = \
+dist_noinst_PYTHON = \
+	TestLine3.py \
 	TestAxial.py \
 	TestDislocation.py
 
-noinst_DATA = \
+dist_noinst_DATA = \
 	bar.mesh \
+	matprops.spatialdb \
 	axialextension.cfg \
 	axialextension_disp.spatialdb \
 	dislocation.cfg \
-	dislocation_disp.spatialdb \
-	dislocation_slip.spatialdb \
-	dislocation_sliprate.spatialdb \
-	dislocation_sliptime.spatialdb \
-	matprops.spatialdb
+	finalslip.spatialdb \
+	sliptime.spatialdb
 
 noinst_TMP = \
-	axialextension_t0.vtk \
-	axialextension_t1.vtk \
-	dislocation_t0.vtk \
-	dislocation_t1.vtk
+	axialextension_t0000000.vtk \
+	axialextension-elastic_info.vtk \
+	axialextension-elastic_t0000000.vtk \
+	dislocation-fault_info.vtk \
+	dislocation-fault_t0000000.vtk \
+	dislocation-elastic_info.vtk \
+	dislocation-elastic_t0000000.vtk \
+	dislocation_t0000000.vtk
 
 
 TESTS_ENVIRONMENT = $(PYTHON)
@@ -41,14 +44,14 @@
 
 # 'export' the input files by performing a mock install
 export_datadir = $(top_builddir)/tests/1d/line3
-export-data: $(noinst_DATA)
-	for f in $(noinst_DATA); do $(install_sh_DATA) $(srcdir)/$$f $(export_datadir); done
+export-data: $(dist_noinst_PYTHON) $(dist_noinst_DATA)
+	for f in $(dist_noinst_PYTHON) $(dist_noinst_DATA); do $(install_sh_DATA) $(srcdir)/$$f $(export_datadir); done
 
+clean-data:
+	if [ "X$(top_srcdir)" != "X$(top_builddir)" ]; then for f in $(dist_noinst_PYTHON) $(dist_noinst_DATA) $(noinst_TMP); do $(RM) $(RM_FLAGS) $(export_datadir)/$$f; done; fi
+
 BUILT_SOURCES = export-data
+clean-local: clean-data
 
-CLEANFILES = \
-	$(export_datadir)/$(noinst_DATA) \
-	$(export_datadir)/$(noinst_TMP)
 
-
 # End of file 

Modified: short/3D/PyLith/trunk/tests/1d/line3/TestAxial.py
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line3/TestAxial.py	2009-05-28 20:39:35 UTC (rev 15077)
+++ short/3D/PyLith/trunk/tests/1d/line3/TestAxial.py	2009-05-28 21:22:24 UTC (rev 15078)
@@ -14,23 +14,33 @@
 ##
 ## @brief Test suite for testing pylith with 1-D axial extension.
 
-import unittest
 import numpy
-import tables
+from TestLine3 import TestLine3
+from pylith.utils.VTKDataReader import has_vtk
+from pylith.utils.VTKDataReader import VTKDataReader
 
+
+# Local version of PyLithApp
+from pylith.apps.PyLithApp import PyLithApp
+class AxialApp(PyLithApp):
+  def __init__(self):
+    PyLithApp.__init__(self, name="axialextension")
+    return
+
+
+# Helper function to run PyLith
 def run_pylith():
   """
   Run pylith.
   """
   if not "done" in dir(run_pylith):
-    from pylith.PyLithApp import PyLithApp
-    app = PyLithApp("axialextension")
+    app = AxialApp()
     app.run()
     run_pylith.done = True
   return
 
 
-class TestAxial(unittest.TestCase):
+class TestAxial(TestLine3):
   """
   Test suite for testing pylith with 1-D axial extension.
   """
@@ -39,15 +49,48 @@
     """
     Setup for test.
     """
+    TestLine3.setUp(self)
     run_pylith()
+    self.outputRoot = "axialextension"
+    if has_vtk():
+      self.reader = VTKDataReader()
+    else:
+      self.reader = None
     return
 
 
-  def test_disp(self):
+  def calcDisplacements(self, vertices):
     """
-    Check displacement field.
+    Calculate displacement field given coordinates of vertices.
     """
-    return
+    nvertices = self.mesh['nvertices']
+    spaceDim = self.mesh['spaceDim']    
+    disp = numpy.zeros( (nvertices, spaceDim), dtype=numpy.float64)
+    disp[:,0] = -0.2 + 0.1 * vertices[:,0]
 
+    return disp
 
+
+  def calcStateVar(self, name, vertices, cells):
+    """
+    Calculate state variable.
+    """
+    exx = 0.1
+
+    ncells = self.mesh['ncells']
+    tensorSize = self.mesh['tensorSize']
+
+    if name == "total_strain":
+      stateVar = exx*numpy.ones( (ncells, tensorSize), dtype=numpy.float64)
+    
+    elif name == "stress":
+      lp2m = self.density*self.vp**2
+      stateVar = lp2m*exx * numpy.ones( (ncells, tensorSize), 
+                                       dtype=numpy.float64)
+    else:
+      raise ValueError("Unknown state variable '%s'." % name)
+
+    return stateVar
+
+
 # End of file 

Modified: short/3D/PyLith/trunk/tests/1d/line3/TestDislocation.py
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line3/TestDislocation.py	2009-05-28 20:39:35 UTC (rev 15077)
+++ short/3D/PyLith/trunk/tests/1d/line3/TestDislocation.py	2009-05-28 21:22:24 UTC (rev 15078)
@@ -12,42 +12,169 @@
 
 ## @file tests/1d/line3/TestDislocation.py
 ##
-## @brief Test suite for testing pylith with dislocation in 1-D mesh.
+## @brief Test suite for testing pylith with 1-D axial extension.
 
-import unittest
 import numpy
-import tables
+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
+from pylith.apps.PyLithApp import PyLithApp
+class DislocationApp(PyLithApp):
+  def __init__(self):
+    PyLithApp.__init__(self, name="dislocation")
+    return
+
+
+# Helper function to run PyLith
 def run_pylith():
   """
   Run pylith.
   """
   if not "done" in dir(run_pylith):
-    from pylith.PyLithApp import PyLithApp
-    app = PyLithApp("dislocationextension")
+    app = DislocationApp()
     app.run()
     run_pylith.done = True
   return
 
 
-class TestDislocation(unittest.TestCase):
+class TestDislocation(TestLine3):
   """
-  Test suite for testing pylith with dislocation in 1-D mesh.
+  Test suite for testing pylith with 1-D axial extension.
   """
 
   def setUp(self):
     """
     Setup for test.
     """
+    TestLine3.setUp(self)
+    self.mesh['nvertices'] = 6
+    self.nverticesO = 5
+
+    self.faultMesh = {'nvertices': 1,
+                      'spaceDim': 3,
+                      'ncells': 1,
+                      'ncorners': 1}
+
     run_pylith()
+    self.outputRoot = "dislocation"
+    if has_vtk():
+      self.reader = VTKDataReader()
+    else:
+      self.reader = None
     return
 
 
-  def test_disp(self):
+  def test_fault_info(self):
     """
-    Check displacement field.
+    Check fault information.
     """
+    if self.reader is None:
+      return
+
+    filename = "%s-fault_info.vtk" % self.outputRoot
+    fields = ["normal_dir", "final_slip", "slip_time"]
+    check_vertex_fields(self, filename, self.faultMesh, fields)
+
     return
 
 
+  def test_fault_data(self):
+    """
+    Check fault information.
+    """
+    if self.reader is None:
+      return
+
+    filename = "%s-fault_t0000000.vtk" % self.outputRoot
+    fields = ["cumulative_slip", "traction_change"]
+    check_vertex_fields(self, filename, self.faultMesh, fields)
+
+    return
+
+
+  def calcDisplacements(self, vertices):
+    """
+    Calculate displacement field given coordinates of vertices.
+    """
+    nvertices = self.mesh['nvertices']
+    spaceDim = self.mesh['spaceDim']    
+    nverticesO = self.nverticesO
+
+    disp = numpy.zeros( (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] = \
+        maskN*(-0.20 - 0.025*vertices[:,0]) + \
+        maskP*(+0.30 - 0.025*vertices[:,0])
+
+    return disp
+
+
+  def calcStateVar(self, name, vertices, cells):
+    """
+    Calculate state variable.
+    """
+    exx = -0.025
+
+    ncells = self.mesh['ncells']
+    tensorSize = self.mesh['tensorSize']
+
+    if name == "total_strain":
+      stateVar = exx*numpy.ones( (ncells, tensorSize), dtype=numpy.float64)
+    
+    elif name == "stress":
+      lp2m = self.density*self.vp**2
+      stateVar = lp2m*exx * numpy.ones( (ncells, tensorSize), 
+                                       dtype=numpy.float64)
+    else:
+      raise ValueError("Unknown state variable '%s'." % name)
+
+    return stateVar
+
+
+  def calcFaultField(self, name, vertices):
+    """
+    Calculate fault info.
+    """
+
+    normalDir = 1.0
+    finalSlip = -0.5
+    slipTime = 0.0
+
+    slip = 1.0
+    exx = -0.025
+    lp2m = self.density*self.vp**2
+    traction = -exx*lp2m
+
+    nvertices = self.faultMesh['nvertices']
+
+    if name == "normal_dir":
+      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
+      field[:,0] = normalDir
+
+    elif name == "final_slip":
+      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
+      field[:,0] = finalSlip
+      
+    elif name == "slip_time":
+      field = slipTime*numpy.ones( (nvertices, 1), dtype=numpy.float64)
+      
+    elif name == "cumulative_slip":
+      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
+      field[:,0] = finalSlip
+
+    elif name == "traction_change":
+      field = numpy.zeros( (nvertices, 3), dtype=numpy.float64)
+      field[:,0] = traction
+      
+    else:
+      raise ValueError("Unknown fault field '%s'." % name)
+
+    return field
+
+
 # End of file 

Added: short/3D/PyLith/trunk/tests/1d/line3/TestLine3.py
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line3/TestLine3.py	                        (rev 0)
+++ short/3D/PyLith/trunk/tests/1d/line3/TestLine3.py	2009-05-28 21:22:24 UTC (rev 15078)
@@ -0,0 +1,97 @@
+#!/usr/bin/env python
+#
+# ----------------------------------------------------------------------
+#
+#                           Brad T. Aagaard
+#                        U.S. Geological Survey
+#
+# <LicenseText>
+#
+# ----------------------------------------------------------------------
+#
+
+## @file tests/1d/line2/TestLine3.py
+##
+## @brief Generic tests for problems using 1-D bar mesh.
+
+import unittest
+import numpy
+
+class TestLine3(unittest.TestCase):
+  """
+  Generic tests for problems using 1-D bar mesh.
+  """
+
+  def setUp(self):
+    """
+    Setup for tests.
+    """
+    self.mesh = {'ncells': 2,
+                 'ncorners': 3,
+                 'nvertices': 5,
+                 'spaceDim': 3,
+                 'tensorSize': 1}
+    self.vs = 3000.0
+    self.vp = 5291.502622129181
+    self.density = 2500.0
+    return
+
+
+  def test_elastic_info(self):
+    """
+    Check elastic info.
+    """
+    if self.reader is None:
+      return
+
+    ncells= self.mesh['ncells']
+
+    filename = "%s-elastic_info.vtk" % 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)
+
+    properties = {'mu': propMu,
+                  'lambda': propLambda,
+                  'density': propDensity}
+
+    from pylith.tests.PhysicalProperties import check_properties
+    check_properties(self, filename, self.mesh, properties)
+
+    return
+
+
+  def test_soln(self):
+    """
+    Check solution (displacement) field.
+    """
+    if self.reader is None:
+      return
+
+    filename = "%s_t0000000.vtk" % self.outputRoot
+    from pylith.tests.Solution import check_displacements
+    check_displacements(self, filename, self.mesh)
+
+    return
+
+
+  def test_elastic_statevars(self):
+    """
+    Check elastic state variables.
+    """
+    if self.reader is None:
+      return
+
+    filename = "%s-elastic_t0000000.vtk" % self.outputRoot
+
+    from pylith.tests.StateVariables import check_state_variables
+    stateVars = ["total_strain", "stress"]
+    check_state_variables(self, filename, self.mesh, stateVars)
+
+    return
+
+
+# End of file

Modified: short/3D/PyLith/trunk/tests/1d/line3/axialextension.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line3/axialextension.cfg	2009-05-28 20:39:35 UTC (rev 15077)
+++ short/3D/PyLith/trunk/tests/1d/line3/axialextension.cfg	2009-05-28 21:22:24 UTC (rev 15078)
@@ -1,73 +1,89 @@
 # -*- Python -*-
-[pylithapp]
+[axialextension]
 
+[axialextension.launcher] # WARNING: THIS IS NOT PORTABLE
+command = mpirun -np ${nodes}
+
 # ----------------------------------------------------------------------
 # journal
 # ----------------------------------------------------------------------
-[pylithapp.journal.info]
-timedependent = 1
-explicit = 1
-implicit = 1
-petsc = 1
-solverlinear = 1
-meshioascii = 1
-homogeneous = 1
-explicitelasticity = 1
-quadrature1d = 1
-fiatsimplex = 1
+[axialextension.journal.info]
+#timedependent = 1
+#explicit = 1
+#implicit = 1
+#petsc = 1
+#solverlinear = 1
+#meshioascii = 1
+#homogeneous = 1
+#explicitelasticity = 1
+#quadrature1d = 1
+#fiatsimplex = 1
 
 # ----------------------------------------------------------------------
 # mesh_generator
 # ----------------------------------------------------------------------
-[pylithapp.mesh_generator]
+[axialextension.mesh_generator]
 debug = 1
 
-[pylithapp.mesh_generator.importer]
+[axialextension.mesh_generator.reader]
 filename = bar.mesh
 coordsys.space_dim = 1
 
 # ----------------------------------------------------------------------
 # problem
 # ----------------------------------------------------------------------
-[pylithapp.timedependent]
-total_time = 0.0*s
-default_dt = 1.0*s
+[axialextension.timedependent]
 dimension = 1
-formulation = pylith.problems.Implicit
-bc = pylith.bc.BCSingle
+bc = [bc]
 
+[axialextension.timedependent.formulation.time_step]
+total_time = 0.0*s
+
 # ----------------------------------------------------------------------
 # materials
 # ----------------------------------------------------------------------
-[pylithapp.timedependent.materials]
-material = pylith.materials.ElasticStrain1D
+[axialextension.timedependent]
+materials = [elastic]
+materials.elastic = pylith.materials.ElasticStrain1D
 
-[pylithapp.timedependent.materials.material]
-label = elastic material
+[axialextension.timedependent.materials.elastic]
+label = Elastic material
 id = 1
-db.iohandler.filename = matprops.spatialdb
-quadrature = pylith.feassemble.quadrature.Quadrature1D
+properties_db.iohandler.filename = matprops.spatialdb
 quadrature.cell.shape = line
 quadrature.cell.degree = 2
 
 # ----------------------------------------------------------------------
 # boundary conditions
 # ----------------------------------------------------------------------
-[pylithapp.timedependent.bc.bc]
+[axialextension.timedependent.bc.bc]
 fixed_dof = [0]
-id = 10
 label = end points
+db = spatialdata.spatialdb.SimpleDB
 db.label = Dirichlet BC
 db.iohandler.filename = axialextension_disp.spatialdb
 
 # ----------------------------------------------------------------------
 # PETSc
 # ----------------------------------------------------------------------
-[pylithapp.petsc]
-pc_type = jacobi
+[axialextension.petsc]
+ksp_rtol = 1.0e-8
+pc_type = asm
+ksp_max_it = 100
+ksp_gmres_restart = 50
+#ksp_monitor = true
+#ksp_view = true
+#log_summary = true
+#start_in_debugger = true
+#snes_monitor = true
+#snes_view = true
 
 # ----------------------------------------------------------------------
 # output
 # ----------------------------------------------------------------------
-[pylithapp.problem.formulation.output.output.writer]
+[axialextension.problem.formulation.output.output.writer]
 filename = axialextension.vtk
+
+[axialextension.timedependent.materials.elastic.output]
+cell_filter = pylith.meshio.CellFilterAvgMesh
+writer.filename = axialextension-elastic.vtk

Modified: short/3D/PyLith/trunk/tests/1d/line3/bar.mesh
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line3/bar.mesh	2009-05-28 20:39:35 UTC (rev 15077)
+++ short/3D/PyLith/trunk/tests/1d/line3/bar.mesh	2009-05-28 21:22:24 UTC (rev 15078)
@@ -2,19 +2,21 @@
   dimension = 1
   vertices = {
     dimension = 1
-    count = 3
+    count = 5
     coordinates = {
       0   0.0
-      1   2.0
-      2   4.0
+      1   1.0
+      2   2.0
+      3   3.0
+      4   4.0
     }
   }
   cells = {
-    num-corners = 2
+    num-corners = 3
     count = 2
     simplices = {
-      0    0  1
-      1    1  2
+      0    0  2  1
+      1    2  4  3
     }
     material-ids = {
       0   1
@@ -27,7 +29,7 @@
     count = 2
     indices = {
       0
-      2
+      4
     }
   }
   group = {
@@ -35,7 +37,7 @@
     type = vertices
     count = 1
     indices = {
-      1
+      2
     }
   }
 }

Modified: short/3D/PyLith/trunk/tests/1d/line3/dislocation.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line3/dislocation.cfg	2009-05-28 20:39:35 UTC (rev 15077)
+++ short/3D/PyLith/trunk/tests/1d/line3/dislocation.cfg	2009-05-28 21:22:24 UTC (rev 15078)
@@ -1,93 +1,106 @@
 # -*- Python -*-
-[pylithapp]
+[dislocation]
 
+[dislocation.launcher] # WARNING: THIS IS NOT PORTABLE
+command = mpirun -np ${nodes}
+
 # ----------------------------------------------------------------------
 # journal
 # ----------------------------------------------------------------------
-[pylithapp.journal.info]
-timedependent = 1
-explicit = 1
-implicit = 1
-petsc = 1
-solverlinear = 1
-meshioascii = 1
-homogeneous = 1
-implicitelasticity = 1
-quadrature1d = 1
-fiatsimplex = 1
-faultcohesivekin = 1
+[dislocation.journal.info]
+#timedependent = 1
+#implicit = 1
+#petsc = 1
+#solverlinear = 1
+#meshioascii = 1
+#implicitelasticity = 1
+#quadrature = 1
+#fiatsimplex = 1
+#faultcohesivekin = 1
 
 # ----------------------------------------------------------------------
 # mesh_generator
 # ----------------------------------------------------------------------
-[pylithapp.mesh_generator]
-debug = 1
+[dislocation.mesh_generator]
+#debug = 1
 
-[pylithapp.mesh_generator.importer]
+[dislocation.mesh_generator.reader]
 filename = bar.mesh
 coordsys.space_dim = 1
 
 # ----------------------------------------------------------------------
 # problem
 # ----------------------------------------------------------------------
-[pylithapp.timedependent]
-total_time = 0.0*s
-default_dt = 1.0*s
+[dislocation.timedependent]
 dimension = 1
-formulation = pylith.problems.Implicit
-bc = pylith.bc.BCSingle
-interfaces = pylith.faults.SingleFault
+bc = [bc]
+interfaces = [fault]
 
+[dislocation.timedependent.formulation.time_step]
+total_time = 0.0*s
+
 # ----------------------------------------------------------------------
 # materials
 # ----------------------------------------------------------------------
-[pylithapp.timedependent.materials]
-material = pylith.materials.ElasticStrain1D
+[dislocation.timedependent]
+materials = [elastic]
+materials.elastic = pylith.materials.ElasticStrain1D
 
-[pylithapp.timedependent.materials.material]
-label = elastic material
+[dislocation.timedependent.materials.elastic]
+label = Elastic material
 id = 1
-db.iohandler.filename = matprops.spatialdb
-quadrature = pylith.feassemble.quadrature.Quadrature1D
+properties_db.iohandler.filename = matprops.spatialdb
 quadrature.cell.shape = line
 quadrature.cell.degree = 2
 
 # ----------------------------------------------------------------------
 # boundary conditions
 # ----------------------------------------------------------------------
-[pylithapp.timedependent.bc.bc]
+[dislocation.timedependent.bc.bc]
 fixed_dof = [0]
-id = 10
 label = end points
+db = spatialdata.spatialdb.SimpleDB
 db.label = Dirichlet BC
-db.iohandler.filename = dislocation_disp.spatialdb
+db.iohandler.filename = axialextension_disp.spatialdb
 
 # ----------------------------------------------------------------------
 # faults
 # ----------------------------------------------------------------------
-[pylithapp.timedependent.interfaces]
+[dislocation.timedependent.interfaces]
 fault = pylith.faults.FaultCohesiveKin
 
-[pylithapp.timedependent.interfaces.fault]
-id = 20
+[dislocation.timedependent.interfaces.fault]
 label = fault
-quadrature = pylith.feassemble.quadrature.Quadrature0D
 quadrature.cell.shape = point
 
-[pylithapp.timedependent.interfaces.fault.eq_src.slip_function]
-slip.iohandler.filename = dislocation_slip.spatialdb
-slip_rate.iohandler.filename = dislocation_sliprate.spatialdb
-slip_time.iohandler.filename = dislocation_sliptime.spatialdb
+[dislocation.timedependent.interfaces.fault.eq_srcs.rupture.slip_function]
+slip.iohandler.filename = finalslip.spatialdb
+slip_time.iohandler.filename = sliptime.spatialdb
 
-
 # ----------------------------------------------------------------------
 # PETSc
 # ----------------------------------------------------------------------
-[pylithapp.petsc]
-pc_type = jacobi
+[dislocation.petsc]
+ksp_rtol = 1.0e-8
+pc_type = asm
+ksp_max_it = 100
+ksp_gmres_restart = 50
+#ksp_monitor = true
+#ksp_view = true
+#log_summary = true
+#start_in_debugger = true
+#snes_monitor = true
+#snes_view = true
 
 # ----------------------------------------------------------------------
 # output
 # ----------------------------------------------------------------------
-[pylithapp.problem.formulation.output.output.writer]
+[dislocation.problem.formulation.output.output.writer]
 filename = dislocation.vtk
+
+[dislocation.timedependent.materials.elastic.output]
+cell_filter = pylith.meshio.CellFilterAvgMesh
+writer.filename = dislocation-elastic.vtk
+
+[dislocation.timedependent.interfaces.fault.output.writer]
+filename = dislocation-fault.vtk

Deleted: short/3D/PyLith/trunk/tests/1d/line3/dislocation_disp.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line3/dislocation_disp.spatialdb	2009-05-28 20:39:35 UTC (rev 15077)
+++ short/3D/PyLith/trunk/tests/1d/line3/dislocation_disp.spatialdb	2009-05-28 21:22:24 UTC (rev 15078)
@@ -1,14 +0,0 @@
-#SPATIAL.ascii 1
-SimpleDB {
-  num-values = 1
-  value-names =  dof-0
-  value-units =  m
-  num-locs = 1
-  data-dim = 0
-  space-dim = 1
-  cs-data = cartesian {
-    to-meters = 1.0
-    space-dim = 1
-  }
-}
-0.0   0.0

Deleted: short/3D/PyLith/trunk/tests/1d/line3/dislocation_slip.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line3/dislocation_slip.spatialdb	2009-05-28 20:39:35 UTC (rev 15077)
+++ short/3D/PyLith/trunk/tests/1d/line3/dislocation_slip.spatialdb	2009-05-28 21:22:24 UTC (rev 15078)
@@ -1,14 +0,0 @@
-#SPATIAL.ascii 1
-SimpleDB {
-  num-values = 1
-  value-names =  fault-opening
-  value-units =  m
-  num-locs = 1
-  data-dim = 0
-  space-dim = 1
-  cs-data = cartesian {
-    to-meters = 1.0
-    space-dim = 1
-  }
-}
-0.0   1.0

Deleted: short/3D/PyLith/trunk/tests/1d/line3/dislocation_sliprate.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line3/dislocation_sliprate.spatialdb	2009-05-28 20:39:35 UTC (rev 15077)
+++ short/3D/PyLith/trunk/tests/1d/line3/dislocation_sliprate.spatialdb	2009-05-28 21:22:24 UTC (rev 15078)
@@ -1,14 +0,0 @@
-#SPATIAL.ascii 1
-SimpleDB {
-  num-values = 1
-  value-names =  slip-rate
-  value-units =  m/s
-  num-locs = 1
-  data-dim = 0
-  space-dim = 1
-  cs-data = cartesian {
-    to-meters = 1.0
-    space-dim = 1
-  }
-}
-0.0   1.0e+6

Deleted: short/3D/PyLith/trunk/tests/1d/line3/dislocation_sliptime.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line3/dislocation_sliptime.spatialdb	2009-05-28 20:39:35 UTC (rev 15077)
+++ short/3D/PyLith/trunk/tests/1d/line3/dislocation_sliptime.spatialdb	2009-05-28 21:22:24 UTC (rev 15078)
@@ -1,14 +0,0 @@
-#SPATIAL.ascii 1
-SimpleDB {
-  num-values = 1
-  value-names =  slip-time
-  value-units =  s
-  num-locs = 1
-  data-dim = 0
-  space-dim = 1
-  cs-data = cartesian {
-    to-meters = 1.0
-    space-dim = 1
-  }
-}
-0.0   -1.0

Added: short/3D/PyLith/trunk/tests/1d/line3/finalslip.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line3/finalslip.spatialdb	                        (rev 0)
+++ short/3D/PyLith/trunk/tests/1d/line3/finalslip.spatialdb	2009-05-28 21:22:24 UTC (rev 15078)
@@ -0,0 +1,15 @@
+// -*- C++ -*-
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 1
+  value-names =  fault-opening
+  value-units =  m
+  num-locs = 1
+  data-dim = 0
+  space-dim = 1
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 1
+  }
+}
+0.0    -0.50

Modified: short/3D/PyLith/trunk/tests/1d/line3/matprops.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line3/matprops.spatialdb	2009-05-28 20:39:35 UTC (rev 15077)
+++ short/3D/PyLith/trunk/tests/1d/line3/matprops.spatialdb	2009-05-28 21:22:24 UTC (rev 15078)
@@ -2,7 +2,7 @@
 SimpleDB {
   num-values = 3
   value-names =  density vs vp
-  value-units =  kg/m^3  m/s  m/s
+  value-units =  kg/m**3  m/s  m/s
   num-locs = 1
   data-dim = 0
   space-dim = 1

Added: short/3D/PyLith/trunk/tests/1d/line3/sliptime.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line3/sliptime.spatialdb	                        (rev 0)
+++ short/3D/PyLith/trunk/tests/1d/line3/sliptime.spatialdb	2009-05-28 21:22:24 UTC (rev 15078)
@@ -0,0 +1,15 @@
+// -*- C++ -*-
+#SPATIAL.ascii 1
+SimpleDB {
+  num-values = 1
+  value-names =  slip-time
+  value-units =  s
+  num-locs = 1
+  data-dim = 0
+  space-dim = 1
+  cs-data = cartesian {
+    to-meters = 1.0
+    space-dim = 1
+  }
+}
+0.0    0.0

Modified: short/3D/PyLith/trunk/tests/1d/line3/testpylith.py
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line3/testpylith.py	2009-05-28 20:39:35 UTC (rev 15077)
+++ short/3D/PyLith/trunk/tests/1d/line3/testpylith.py	2009-05-28 21:22:24 UTC (rev 15078)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env nemesis
 #
 # ======================================================================
 #



More information about the CIG-COMMITS mailing list