[cig-commits] r13352 - in short/3D/PyLith/trunk/tests/2d: . quad4 tri3
brad at geodynamics.org
brad at geodynamics.org
Wed Nov 19 16:29:25 PST 2008
Author: brad
Date: 2008-11-19 16:29:25 -0800 (Wed, 19 Nov 2008)
New Revision: 13352
Added:
short/3D/PyLith/trunk/tests/2d/quad4/box_quad4_100m.exo
short/3D/PyLith/trunk/tests/2d/quad4/geometry.jou
short/3D/PyLith/trunk/tests/2d/quad4/mesh_quad4_100m.jou
Removed:
short/3D/PyLith/trunk/tests/2d/bar_quad4/
short/3D/PyLith/trunk/tests/2d/bar_tri3/
short/3D/PyLith/trunk/tests/2d/quad4/axialx.spatialdb
short/3D/PyLith/trunk/tests/2d/quad4/axialy.spatialdb
short/3D/PyLith/trunk/tests/2d/quad4/box.cub
short/3D/PyLith/trunk/tests/2d/quad4/box.exo
short/3D/PyLith/trunk/tests/2d/quad4/dislocation_disp.spatialdb
short/3D/PyLith/trunk/tests/2d/quad4/dislocation_sliprate.spatialdb
short/3D/PyLith/trunk/tests/2d/quad4/fourcells.mesh
short/3D/PyLith/trunk/tests/2d/quad4/shearplanestrain_free.cfg
short/3D/PyLith/trunk/tests/2d/quad4/shearplanestrain_xfixed.cfg
short/3D/PyLith/trunk/tests/2d/quad4/shearxy.spatialdb
short/3D/PyLith/trunk/tests/2d/quad4/shortfault.cfg
short/3D/PyLith/trunk/tests/2d/quad4/test.py
short/3D/PyLith/trunk/tests/2d/quad4/threequad4.mesh
short/3D/PyLith/trunk/tests/2d/quad4/threequad4_shear.cfg
short/3D/PyLith/trunk/tests/2d/quad4/threequad4_shear.spatialdb
short/3D/PyLith/trunk/tests/2d/quad4/twocells.mesh
Modified:
short/3D/PyLith/trunk/tests/2d/quad4/Makefile.am
short/3D/PyLith/trunk/tests/2d/quad4/README
short/3D/PyLith/trunk/tests/2d/quad4/TestAxialPlaneStrain.py
short/3D/PyLith/trunk/tests/2d/quad4/TestDislocation.py
short/3D/PyLith/trunk/tests/2d/quad4/TestShearPlaneStrain.py
short/3D/PyLith/trunk/tests/2d/quad4/axialplanestrain.cfg
short/3D/PyLith/trunk/tests/2d/quad4/dislocation.cfg
short/3D/PyLith/trunk/tests/2d/quad4/dislocation_slip.spatialdb
short/3D/PyLith/trunk/tests/2d/quad4/dislocation_sliptime.spatialdb
short/3D/PyLith/trunk/tests/2d/quad4/shearplanestrain.cfg
short/3D/PyLith/trunk/tests/2d/tri3/README
short/3D/PyLith/trunk/tests/2d/tri3/axialplanestrain.cfg
short/3D/PyLith/trunk/tests/2d/tri3/geometry.jou
short/3D/PyLith/trunk/tests/2d/tri3/mesh_tri3_100m.jou
short/3D/PyLith/trunk/tests/2d/tri3/testpylith.py
Log:
Worked on 2-D full scale tests.
Modified: short/3D/PyLith/trunk/tests/2d/quad4/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/Makefile.am 2008-11-19 23:25:48 UTC (rev 13351)
+++ short/3D/PyLith/trunk/tests/2d/quad4/Makefile.am 2008-11-20 00:29:25 UTC (rev 13352)
@@ -20,27 +20,26 @@
TestDislocation.py
noinst_DATA = \
- box.exo \
- twocells.mesh \
+ box_quad4_100m.exo \
matprops.spatialdb \
axialplanestrain.cfg \
- axialx.spatialdb \
- axialy.spatialdb \
shearplanestrain.cfg \
- shearplanestrain_free.cfg \
- shearplanestrain_xfixed.cfg \
- shearxy.spatialdb \
dislocation.cfg \
- dislocation_disp.spatialdb \
- dislocation_sliprate.spatialdb \
dislocation_slip.spatialdb \
dislocation_sliptime.spatialdb
noinst_TMP = \
- axialplanestrain_t0.vtk \
- axialplanestrain_t1.vtk \
- shearplanestrain_t0.vtk \
- shearplanestrain_t1.vtk
+ axialplanestrain_t0000000.vtk \
+ axialplanestrain-statevars-elastic_info.vtk \
+ axialplanestrain-statevars-elastic_t0000000.vtk \
+ shearplanestrain_t0000000.vtk \
+ shearplanestrain-statevars-elastic_info.vtk \
+ shearplanestrain-statevars-elastic_t0000000.vtk \
+ dislocation_t0000000.vtk \
+ dislocation-statevars-elastic_info.vtk \
+ dislocation-statevars-elastic_t0000000.vtk \
+ dislocation-fault_info.vtk \
+ dislocation-fault_t0000000.vtk
TESTS_ENVIRONMENT = $(PYTHON)
@@ -48,14 +47,16 @@
# 'export' the input files by performing a mock install
export_datadir = $(top_builddir)/tests/2d/quad4
-export-data: $(noinst_DATA)
- for f in $(noinst_DATA); do $(install_sh_DATA) $(srcdir)/$$f $(export_datadir); done
+export-data: $(noinst_PYTHON) $(noinst_DATA)
+ for f in $(noinst_PYTHON) $(noinst_DATA); do $(install_sh_DATA) $(srcdir)/$$f $(export_datadir); done
BUILT_SOURCES = export-data
CLEANFILES = \
+ $(export_datadir)/$(noinst_PYTHON) \
$(export_datadir)/$(noinst_DATA) \
- $(export_datadir)/$(noinst_TMP)
+ $(export_datadir)/$(noinst_TMP) \
+ *.pyc
# End of file
Modified: short/3D/PyLith/trunk/tests/2d/quad4/README
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/README 2008-11-19 23:25:48 UTC (rev 13351)
+++ short/3D/PyLith/trunk/tests/2d/quad4/README 2008-11-20 00:29:25 UTC (rev 13352)
@@ -1,13 +1,18 @@
======================================================================
-AXIAL COMPRESSION
+DOMAIN
======================================================================
-2-D axial compression test with linear quadrilateral cells.
-
-250 <= x <= +250
-250 <= y <= +250
+Mesh is quad4 cells with nominal 100m discretization size.
+======================================================================
+AXIAL COMPRESSION
+======================================================================
+
+2-D axial compression test with linear quadrilateral cells.
+
y=-1.0 m
----------
| |
@@ -33,10 +38,7 @@
2-D shear test with linear quadrilateral cells.
--250 <= x <= +250
--250 <= y <= +250
-
----------
| |
y=-1.0 m | | y=+1.0m
@@ -54,3 +56,29 @@
Analytical solution
Ux(x,y) = 0
Uy(x,y) = -0.004 * x
+
+
+======================================================================
+DISLOCATION
+======================================================================
+
+2-D dislocation test with linear quadrilateral cells.
+
+
+ ----------
+ | | |
+y=-0.5 m | | | y=+0.5m
+ | | |
+ | | |
+ ----------
+
+
+Dirichlet boundary conditions
+ Ux( 0,y) = 0.0
+ Uy( 0,y) = -0.5 m
+ Ux(+250,y) = 0.0
+ Uy(+250,y) = +0.5 m
+
+Analytical solution
+ Ux(x<0,y) = -0.5
+ Ux(x>0,y) = +0.5
Modified: short/3D/PyLith/trunk/tests/2d/quad4/TestAxialPlaneStrain.py
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/TestAxialPlaneStrain.py 2008-11-19 23:25:48 UTC (rev 13351)
+++ short/3D/PyLith/trunk/tests/2d/quad4/TestAxialPlaneStrain.py 2008-11-20 00:29:25 UTC (rev 13352)
@@ -17,15 +17,24 @@
import unittest
import numpy
-import tables
+from pylith.utils.VTKDataReader import has_vtk
+from pylith.utils.VTKDataReader import VTKDataReader
+# Local version of PyLithApp
+from pylith.PyLithApp import PyLithApp
+class AxialPlaneStrainApp(PyLithApp):
+ def __init__(self):
+ PyLithApp.__init__(self, name="axialplanestrain")
+ 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("axialplanestrain")
+ app = AxialPlaneStrainApp()
app.run()
run_pylith.done = True
return
@@ -42,14 +51,129 @@
Setup for test.
"""
run_pylith()
+ if has_vtk():
+ self.reader = VTKDataReader()
+ else:
+ self.reader = None
return
+
+ def test_elastic_info(self):
+ """
+ Check elastic info.
+ """
+ if self.reader is None:
+ return
- def test_disp(self):
+ data = self.reader.read("axialplanestrain-statevars-elastic_info.vtk")
+
+ # Check cells
+ ncellsE = 30
+ ncornersE = 4
+ (ncells, ncorners) = data['cells'].shape
+ self.assertEqual(ncellsE, ncells)
+ self.assertEqual(ncornersE, ncorners)
+
+ # Check vertices
+ nverticesE = 42
+ spaceDimE = 3
+ (nvertices, spaceDim) = data['vertices'].shape
+ self.assertEqual(nverticesE, nvertices)
+ self.assertEqual(spaceDimE, spaceDim)
+
+ # Check physical properties
+ tolerance = 1.0e-5
+ vsE = 3000.0
+ vpE = 5291.502622129181
+ densityE = 2500.0
+
+ # Lame's constant mu (shear modulus)
+ muE = densityE*vsE**2
+ diff = numpy.abs(1.0 - data['cell_fields']['mu']/muE)
+ okay = diff < tolerance
+ if numpy.sum(okay) != ncells:
+ print "Lame's constant mu: ",data['cell_fields']['mu']
+ self.assertEqual(ncells, numpy.sum(okay))
+
+ # Lame's constant lambda
+ lambdaE = densityE*vpE**2 - 2*muE
+ diff = numpy.abs(1.0 - data['cell_fields']['lambda']/lambdaE)
+ okay = diff < tolerance
+ if numpy.sum(okay) != ncells:
+ print "Lame's constant lambda: ",data['cell_fields']['lambda']
+ self.assertEqual(ncells, numpy.sum(okay))
+
+ # Density
+ diff = numpy.abs(1.0 - data['cell_fields']['density']/densityE)
+ okay = diff < tolerance
+ if numpy.sum(okay) != ncells:
+ print "Density: ",data['cell_fields']['density']
+ self.assertEqual(ncells, numpy.sum(okay))
+ return
+
+
+ def test_soln(self):
"""
- Check displacement field.
+ Check solution (displacement) field.
"""
+ if self.reader is None:
+ return
+
+ data = self.reader.read("axialplanestrain_t0000000.vtk")
+
+ # Check cells
+ ncellsE = 30
+ ncornersE = 4
+ (ncells, ncorners) = data['cells'].shape
+ self.assertEqual(ncellsE, ncells)
+ self.assertEqual(ncornersE, ncorners)
+
+ # Check vertices
+ nverticesE = 42
+ spaceDimE = 3
+ vertices = data['vertices']
+ (nvertices, spaceDim) = vertices.shape
+ self.assertEqual(nverticesE, nvertices)
+ self.assertEqual(spaceDimE, spaceDim)
+
+ # Check displacement solution
+ tolerance = 1.0e-5
+ dispE = numpy.zeros( (nvertices, spaceDim), dtype=numpy.float64)
+ dispE[:,1] = -0.004 * vertices[:,1]
+
+ disp = data['vertex_fields']['displacements']
+
+ # Check x displacements
+ diff = numpy.abs(disp[:,0] - dispE[:,0])
+ okay = diff < tolerance
+ if numpy.sum(okay) != nvertices:
+ print "Displacement field: ",disp
+ self.assertEqual(nvertices, numpy.sum(okay))
+
+ # Check y displacements
+ mask = dispE[:,1] > 0.0
+ diff = mask * numpy.abs(1.0 - disp[:,1] / dispE[:,1]) + \
+ ~mask * numpy.abs(disp[:,1] - dispE[:,1])
+ okay = diff < tolerance
+ if numpy.sum(okay) != nvertices:
+ print "Displacement field: ",disp
+ self.assertEqual(nvertices, numpy.sum(okay))
+
+ # Check z displacements
+ diff = numpy.abs(disp[:,2] - dispE[:,2])
+ okay = diff < tolerance
+ if numpy.sum(okay) != nvertices:
+ print "Displacement field: ",disp
+ self.assertEqual(nvertices, numpy.sum(okay))
+
return
+ def test_elastic_statevars(self):
+ """
+ Check elastic state variables.
+ """
+ return
+
+
# End of file
Modified: short/3D/PyLith/trunk/tests/2d/quad4/TestDislocation.py
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/TestDislocation.py 2008-11-19 23:25:48 UTC (rev 13351)
+++ short/3D/PyLith/trunk/tests/2d/quad4/TestDislocation.py 2008-11-20 00:29:25 UTC (rev 13352)
@@ -16,16 +16,22 @@
## box.
import unittest
-import numpy
-import tables
+# Local application
+from pylith.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("shearplanestrain")
+ app = DislocationApp()
app.run()
run_pylith.done = True
return
Modified: short/3D/PyLith/trunk/tests/2d/quad4/TestShearPlaneStrain.py
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/TestShearPlaneStrain.py 2008-11-19 23:25:48 UTC (rev 13351)
+++ short/3D/PyLith/trunk/tests/2d/quad4/TestShearPlaneStrain.py 2008-11-20 00:29:25 UTC (rev 13352)
@@ -16,16 +16,24 @@
## 2-D box.
import unittest
-import numpy
-import tables
+from pylith.utils.VTKDataReader import has_vtk
+from pylith.utils.VTKDataReader import VTKDataReader
+# Local version of PyLithApp
+from pylith.PyLithApp import PyLithApp
+class ShearPlaneStrainApp(PyLithApp):
+ def __init__(self):
+ PyLithApp.__init__(self, name="shearplanestrain")
+ 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("shearplanestrain")
+ app = ShearPlaneStrainApp()
app.run()
run_pylith.done = True
return
@@ -41,14 +49,36 @@
Setup for test.
"""
run_pylith()
+ if has_vtk():
+ self.reader = VTKDataReader()
+ else:
+ self.reader = None
return
- def test_disp(self):
+ def test_elastic_info(self):
"""
- Check displacement field.
+ Check elastic info.
"""
+ if self.reader is None:
+ return
+
+ data = self.reader.read("axialplanestrain-statevars-elastic_info.vtk")
return
+ def test_soln(self):
+ """
+ Check solution (displacement) field.
+ """
+ return
+
+
+ def test_elastic_statevars(self):
+ """
+ Check elastic state variables.
+ """
+ return
+
+
# End of file
Modified: short/3D/PyLith/trunk/tests/2d/quad4/axialplanestrain.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/axialplanestrain.cfg 2008-11-19 23:25:48 UTC (rev 13351)
+++ short/3D/PyLith/trunk/tests/2d/quad4/axialplanestrain.cfg 2008-11-20 00:29:25 UTC (rev 13352)
@@ -1,99 +1,105 @@
# -*- Python -*-
-[pylithapp]
+[axialplanestrain]
# ----------------------------------------------------------------------
# journal
# ----------------------------------------------------------------------
-[pylithapp.journal.info]
-timedependent = 1
-explicit = 1
-implicit = 1
-petsc = 1
-solverlinear = 1
-meshioascii = 1
-homogeneous = 1
-explicitelasticity = 1
-quadrature2d = 1
-fiatlagrange = 1
+[axialplanestrain.journal.info]
+#timedependent = 1
+#implicit = 1
+#petsc = 1
+#solverlinear = 1
+#meshiocubit = 1
+#implicitelasticity = 1
+#quadrature2d = 1
+#fiatsimplex = 1
# ----------------------------------------------------------------------
# mesh_generator
# ----------------------------------------------------------------------
-[pylithapp.mesh_generator]
-debug = 1
+[axialplanestrain.mesh_generator]
+#debug = 1
importer = pylith.meshio.MeshIOCubit
-[pylithapp.mesh_generator.importer]
-filename = box.exo
+[axialplanestrain.mesh_generator.importer]
+filename = box_quad4_100m.exo
coordsys.space_dim = 2
# ----------------------------------------------------------------------
# problem
# ----------------------------------------------------------------------
-[pylithapp.timedependent]
-total_time = 0.0*s
-default_dt = 1.0*s
+[axialplanestrain.timedependent]
dimension = 2
-formulation = pylith.problems.Implicit
-bc = pylith.bc.BCFourSides
+bc = [x_neg,x_pos,y_neg,y_pos]
+[axialplanestrain.timedependent.formulation.time_step]
+total_time = 0.0*s
+
# ----------------------------------------------------------------------
# materials
# ----------------------------------------------------------------------
-[pylithapp.timedependent.materials]
-material = pylith.materials.ElasticPlaneStrain
+[axialplanestrain.timedependent]
+materials = [elastic]
+materials.elastic = pylith.materials.ElasticPlaneStrain
-[pylithapp.timedependent.materials.material]
-label = elastic material
+[axialplanestrain.timedependent.materials.elastic]
+label = Elastic material
id = 1
db.iohandler.filename = matprops.spatialdb
quadrature = pylith.feassemble.quadrature.Quadrature2D
quadrature.cell = pylith.feassemble.FIATLagrange
quadrature.cell.dimension = 2
+quadrature.cell.quad_order = 2
# ----------------------------------------------------------------------
# boundary conditions
# ----------------------------------------------------------------------
-[pylithapp.timedependent.bc.x_neg]
+[axialplanestrain.timedependent.bc.x_neg]
fixed_dof = [0]
-id = 10
-label = 10
+label = 11
db.label = Dirichlet BC -x edge
-db.iohandler.filename = axialx.spatialdb
-db.query_type = linear
-[pylithapp.timedependent.bc.x_pos]
+[axialplanestrain.timedependent.bc.x_pos]
fixed_dof = [0]
-id = 11
-label = 11
+label = 12
db.label = Dirichlet BC +x edge
-db.iohandler.filename = axialx.spatialdb
-db.query_type = linear
-[pylithapp.timedependent.bc.y_pos]
+[axialplanestrain.timedependent.bc.y_pos]
fixed_dof = [1]
-id = 12
-label = 12
+label = 13
+db = spatialdata.spatialdb.UniformDB
db.label = Dirichlet BC +y edge
-db.iohandler.filename = axialy.spatialdb
-db.query_type = linear
+db.values = [dof-1]
+db.data = [-1.0]
-[pylithapp.timedependent.bc.y_neg]
+[axialplanestrain.timedependent.bc.y_neg]
fixed_dof = [1]
-id = 13
-label = 13
+label = 14
+db = spatialdata.spatialdb.UniformDB
db.label = Dirichlet BC -y edge
-db.iohandler.filename = axialy.spatialdb
-db.query_type = linear
+db.values = [dof-1]
+db.data = [+1.0]
# ----------------------------------------------------------------------
# PETSc
# ----------------------------------------------------------------------
-[pylithapp.petsc]
-pc_type = jacobi
+[axialplanestrain.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
+
# ----------------------------------------------------------------------
# output
# ----------------------------------------------------------------------
-[pylithapp.problem.formulation.output.output.writer]
+[axialplanestrain.problem.formulation.output.output.writer]
filename = axialplanestrain.vtk
+
+[axialplanestrain.timedependent.materials.elastic.output]
+cell_filter = pylith.meshio.CellFilterAvg
+writer.filename = axialplanestrain-statevars-elastic.vtk
Deleted: short/3D/PyLith/trunk/tests/2d/quad4/axialx.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/axialx.spatialdb 2008-11-19 23:25:48 UTC (rev 13351)
+++ short/3D/PyLith/trunk/tests/2d/quad4/axialx.spatialdb 2008-11-20 00:29:25 UTC (rev 13352)
@@ -1,15 +0,0 @@
-#SPATIAL.ascii 1
-SimpleDB {
- num-values = 1
- value-names = dof-0
- value-units = m
- num-locs = 2
- data-dim = 1
- space-dim = 2
- cs-data = cartesian {
- to-meters = 1.0
- space-dim = 2
- }
-}
--200.0 0.0 +1.0
-+200.0 0.0 -1.0
Deleted: short/3D/PyLith/trunk/tests/2d/quad4/axialy.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/axialy.spatialdb 2008-11-19 23:25:48 UTC (rev 13351)
+++ short/3D/PyLith/trunk/tests/2d/quad4/axialy.spatialdb 2008-11-20 00:29:25 UTC (rev 13352)
@@ -1,15 +0,0 @@
-#SPATIAL.ascii 1
-SimpleDB {
- num-values = 1
- value-names = dof-1
- value-units = m
- num-locs = 2
- data-dim = 1
- space-dim = 2
- cs-data = cartesian {
- to-meters = 1.0
- space-dim = 2
- }
-}
-0.0 -200.0 0.0
-0.0 +200.0 0.0
Deleted: short/3D/PyLith/trunk/tests/2d/quad4/box.cub
===================================================================
(Binary files differ)
Deleted: short/3D/PyLith/trunk/tests/2d/quad4/box.exo
===================================================================
(Binary files differ)
Added: short/3D/PyLith/trunk/tests/2d/quad4/box_quad4_100m.exo
===================================================================
(Binary files differ)
Property changes on: short/3D/PyLith/trunk/tests/2d/quad4/box_quad4_100m.exo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: short/3D/PyLith/trunk/tests/2d/quad4/dislocation.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/dislocation.cfg 2008-11-19 23:25:48 UTC (rev 13351)
+++ short/3D/PyLith/trunk/tests/2d/quad4/dislocation.cfg 2008-11-20 00:29:25 UTC (rev 13352)
@@ -1,96 +1,92 @@
# -*- Python -*-
-[pylithapp]
+[dislocation]
# ----------------------------------------------------------------------
# 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
+#meshiocubit = 1
+#implicitelasticity = 1
+#quadrature2d = 1
+#fiatsimplex = 1
# ----------------------------------------------------------------------
# mesh_generator
# ----------------------------------------------------------------------
-[pylithapp.mesh_generator]
-debug = 1
+[dislocation.mesh_generator]
+#debug = 1
+importer = pylith.meshio.MeshIOCubit
-[pylithapp.mesh_generator.importer]
-filename = twocells.mesh
+[dislocation.mesh_generator.importer]
+filename = box_quad4_100m.exo
coordsys.space_dim = 2
# ----------------------------------------------------------------------
# problem
# ----------------------------------------------------------------------
-[pylithapp.timedependent]
-total_time = 0.0*s
-default_dt = 1.0*s
+[dislocation.timedependent]
dimension = 2
-formulation = pylith.problems.Implicit
-bc = pylith.bc.BCFourSides
-interfaces = pylith.faults.SingleFault
+bc = [x_neg,x_pos]
+interfaces = [fault]
+[dislocation.timedependent.formulation.time_step]
+total_time = 0.0*s
+
# ----------------------------------------------------------------------
# materials
# ----------------------------------------------------------------------
-[pylithapp.timedependent.materials]
-material = pylith.materials.ElasticPlaneStrain
+[dislocation.timedependent]
+materials = [elastic]
+materials.elastic = pylith.materials.ElasticPlaneStrain
-[pylithapp.timedependent.materials.material]
-label = elastic material
-id = 0
+[dislocation.timedependent.materials.elastic]
+label = Elastic material
+id = 1
db.iohandler.filename = matprops.spatialdb
quadrature = pylith.feassemble.quadrature.Quadrature2D
quadrature.cell = pylith.feassemble.FIATLagrange
quadrature.cell.dimension = 2
+quadrature.cell.quad_order = 2
# ----------------------------------------------------------------------
# boundary conditions
# ----------------------------------------------------------------------
-[pylithapp.timedependent.bc.x_neg]
+[dislocation.timedependent.bc.x_neg]
fixed_dof = [0, 1]
-label = x_neg
+label = 12
+db = spatialdata.spatialdb.UniformDB
db.label = Dirichlet BC -x edge
-db.iohandler.filename = dislocation_disp.spatialdb
-db.query_type = linear
+db.values = [dof-0,dof-1]
+db.data = [0.0,-0.5]
-[pylithapp.timedependent.bc.x_pos]
+[dislocation.timedependent.bc.x_pos]
fixed_dof = [0, 1]
-label = x_pos
+label = 11
+db = spatialdata.spatialdb.UniformDB
db.label = Dirichlet BC +x edge
-db.iohandler.filename = dislocation_disp.spatialdb
-db.query_type = linear
+db.values = [dof-0,dof-1]
+db.data = [0.0,+0.5]
-[pylithapp.timedependent.bc.y_pos]
-fixed_dof = [0]
-label = y_pos
-db.label = Dirichlet BC +y edge
-db.iohandler.filename = dislocation_disp.spatialdb
-db.query_type = linear
-
-
# ----------------------------------------------------------------------
# faults
# ----------------------------------------------------------------------
-[pylithapp.timedependent.interfaces]
+[dislocation.timedependent.interfaces]
fault = pylith.faults.FaultCohesiveKin
-[pylithapp.timedependent.interfaces.fault]
+[dislocation.timedependent.interfaces.fault]
id = 20
-label = fault
+label = 10
quadrature = pylith.feassemble.quadrature.Quadrature1Din2D
-quadrature.cell.shape = line
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 1
+quadrature.cell.quad_order = 2
mat_db.iohandler.filename = matprops.spatialdb
-[pylithapp.timedependent.interfaces.fault.eq_src.slip_function]
+[dislocation.timedependent.interfaces.fault.eq_srcs.rupture.slip_function]
slip.iohandler.filename = dislocation_slip.spatialdb
slip_time.iohandler.filename = dislocation_sliptime.spatialdb
@@ -98,11 +94,27 @@
# ----------------------------------------------------------------------
# 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
# ----------------------------------------------------------------------
# output
# ----------------------------------------------------------------------
-[pylithapp.problem.formulation.output.output.writer]
+# Give basename for VTK domain output of solution over domain.
+[dislocation.problem.formulation.output.output.writer]
filename = dislocation.vtk
+
+# Give basename for VTK output of state variables.
+[dislocation.timedependent.materials.elastic.output]
+cell_filter = pylith.meshio.CellFilterAvg
+writer.filename = dislocation-statevars-elastic.vtk
+
+[dislocation.timedependent.interfaces.fault.output.writer]
+filename = dislocation-fault.vtk
Deleted: short/3D/PyLith/trunk/tests/2d/quad4/dislocation_disp.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/dislocation_disp.spatialdb 2008-11-19 23:25:48 UTC (rev 13351)
+++ short/3D/PyLith/trunk/tests/2d/quad4/dislocation_disp.spatialdb 2008-11-20 00:29:25 UTC (rev 13352)
@@ -1,14 +0,0 @@
-#SPATIAL.ascii 1
-SimpleDB {
- num-values = 2
- value-names = dof-0 dof-1
- value-units = m m
- num-locs = 1
- data-dim = 0
- space-dim = 2
- cs-data = cartesian {
- to-meters = 1.0
- space-dim = 2
- }
-}
-0.0 0.0 0.0 0.0
Modified: short/3D/PyLith/trunk/tests/2d/quad4/dislocation_slip.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/dislocation_slip.spatialdb 2008-11-19 23:25:48 UTC (rev 13351)
+++ short/3D/PyLith/trunk/tests/2d/quad4/dislocation_slip.spatialdb 2008-11-20 00:29:25 UTC (rev 13352)
@@ -11,4 +11,4 @@
space-dim = 2
}
}
-0.0 0.0 1.0 0.5
+0.0 0.0 1.0 0.0
Deleted: short/3D/PyLith/trunk/tests/2d/quad4/dislocation_sliprate.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/dislocation_sliprate.spatialdb 2008-11-19 23:25:48 UTC (rev 13351)
+++ short/3D/PyLith/trunk/tests/2d/quad4/dislocation_sliprate.spatialdb 2008-11-20 00:29:25 UTC (rev 13352)
@@ -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 = 2
- cs-data = cartesian {
- to-meters = 1.0
- space-dim = 2
- }
-}
-0.0 0.0 1.0e+6
Modified: short/3D/PyLith/trunk/tests/2d/quad4/dislocation_sliptime.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/dislocation_sliptime.spatialdb 2008-11-19 23:25:48 UTC (rev 13351)
+++ short/3D/PyLith/trunk/tests/2d/quad4/dislocation_sliptime.spatialdb 2008-11-20 00:29:25 UTC (rev 13352)
@@ -11,4 +11,4 @@
space-dim = 2
}
}
-0.0 0.0 0.0
+0.0 0.0 -1.0
Deleted: short/3D/PyLith/trunk/tests/2d/quad4/fourcells.mesh
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/fourcells.mesh 2008-11-19 23:25:48 UTC (rev 13351)
+++ short/3D/PyLith/trunk/tests/2d/quad4/fourcells.mesh 2008-11-20 00:29:25 UTC (rev 13352)
@@ -1,106 +0,0 @@
-// 2 x 2 four cell mesh with fault between 2 cells.
-//
-// Mesh without cohesive cells (vertices numbered from )
-//
-// 2 ----- 5 ----- 8
-// | | |
-// | 1 | 3 |
-// | | |
-// 1 ----- 4 ----- 7
-// | | |
-// | 0 | 2 |
-// | | |
-// 0 ----- 3 ----- 6
-//
-// Mesh without cohesive cells (Sieve numbering)
-//
-// 6 ----- 9-----12
-// | | |
-// | 1 | 3 |
-// | | |
-// 5 ----- 8-----11
-// | | |
-// | 0 | 2 |
-// | | |
-// 4 ----- 7 ----10
-//
-// Fault is along edge 8-9
-//
-// Mesh with cohesive cells (Sieve numbering)
-//
-// 6 ----- 9-16-14---12
-// | | | |
-// | 1 | | 3 |
-// | | | |
-// 5 ----- 8-15-13---11
-// | | |
-// | 0 | 2 |
-// | | |
-// 4 ----- 7 --------10
-//
-// Cohesive cell is 9 8 14 13 16 15
-
-mesh = {
- dimension = 2
- use-index-zero = true
- vertices = {
- dimension = 2
- count = 9
- coordinates = {
- 0 -2.0 -2.0
- 1 -2.0 0.0
- 2 -2.0 2.0
- 3 0.0 -2.0
- 4 0.0 0.0
- 5 0.0 2.0
- 6 2.0 -2.0
- 7 2.0 0.0
- 8 2.0 2.0
- }
- }
- cells = {
- count = 4
- num-corners = 4
- simplices = {
- 0 0 3 4 1
- 1 1 4 5 2
- 2 3 6 7 4
- 3 4 7 8 5
- }
- material-ids = {
- 0 0
- 1 0
- 2 0
- 3 0
- }
- }
- group = {
- name = fault
- type = vertices
- count = 2
- indices = {
- 4
- 5
- }
- }
- group = {
- name = x_neg
- type = vertices
- count = 3
- indices = {
- 0
- 1
- 2
- }
- }
- group = {
- name = x_pos
- type = vertices
- count = 3
- indices = {
- 6
- 7
- 8
- }
- }
-}
Added: short/3D/PyLith/trunk/tests/2d/quad4/geometry.jou
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/geometry.jou (rev 0)
+++ short/3D/PyLith/trunk/tests/2d/quad4/geometry.jou 2008-11-20 00:29:25 UTC (rev 13352)
@@ -0,0 +1,25 @@
+# ----------------------------------------------------------------------
+# Create surface using vertices
+# ----------------------------------------------------------------------
+
+# Block is 500m x 500m
+# -250 m <= x <= 250 km
+# -250 km <= y <= 250 km
+reset
+create vertex -250.0 -250.0 0.0
+create vertex -250.0 +250.0 0.0
+create vertex +250.0 +250.0 0.0
+create vertex +250.0 -250.0 0.0
+create surface vertex 1 2 3 4
+delete vertex all
+
+# ----------------------------------------------------------------------
+# Create interface surfaces
+# ----------------------------------------------------------------------
+create vertex 0.0 -250.0 0.0
+create vertex 0.0 +250.0 0.0
+split surface 1 across location vertex 9 location vertex 10
+curve 5 name "fault_edge"
+delete vertex all
+surface 2 name "block_neg"
+surface 3 name "block_pos"
Added: short/3D/PyLith/trunk/tests/2d/quad4/mesh_quad4_100m.jou
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/mesh_quad4_100m.jou (rev 0)
+++ short/3D/PyLith/trunk/tests/2d/quad4/mesh_quad4_100m.jou 2008-11-20 00:29:25 UTC (rev 13352)
@@ -0,0 +1,63 @@
+# ----------------------------------------------------------------------
+# Generate geometry
+# ----------------------------------------------------------------------
+playback 'geometry.jou'
+
+# ----------------------------------------------------------------------
+# Set discretization size
+# ----------------------------------------------------------------------
+surface all size 100
+
+# ----------------------------------------------------------------------
+# Generate the mesh
+# ----------------------------------------------------------------------
+surface all scheme submap
+mesh surface all
+
+# ----------------------------------------------------------------------
+# Create blocks for materials
+# ----------------------------------------------------------------------
+block 1 surface 2 3
+block 1 name "elastic"
+
+# ----------------------------------------------------------------------
+# Create nodeset for fault
+# ----------------------------------------------------------------------
+group "fault" add node in fault_edge
+nodeset 10 group fault
+nodeset 10 name "fault"
+
+# ----------------------------------------------------------------------
+# Create nodeset for +x edge
+# ----------------------------------------------------------------------
+group "edge_xpos" add node in curve 3
+nodeset 11 group edge_xpos
+nodeset 11 name "edge xpos"
+
+# ----------------------------------------------------------------------
+# Create nodeset for -x edge
+# ----------------------------------------------------------------------
+group "edge_xneg" add node in curve 1
+nodeset 12 group edge_xneg
+nodeset 12 name "edge xneg"
+
+# ----------------------------------------------------------------------
+# Create nodeset for +y edge
+# ----------------------------------------------------------------------
+group "edge_ypos" add node in curve 7
+group "edge_ypos" add node in curve 8
+nodeset 13 group edge_ypos
+nodeset 13 name "edge ypos"
+
+# ----------------------------------------------------------------------
+# Create nodeset for -y edge
+# ----------------------------------------------------------------------
+group "edge_yneg" add node in curve 6
+group "edge_yneg" add node in curve 9
+nodeset 14 group edge_yneg
+nodeset 14 name "edge yneg"
+
+# ----------------------------------------------------------------------
+# Export exodus file
+# ----------------------------------------------------------------------
+export mesh "box_quad4_100m.exo" dimension 2 overwrite
Modified: short/3D/PyLith/trunk/tests/2d/quad4/shearplanestrain.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/shearplanestrain.cfg 2008-11-19 23:25:48 UTC (rev 13351)
+++ short/3D/PyLith/trunk/tests/2d/quad4/shearplanestrain.cfg 2008-11-20 00:29:25 UTC (rev 13352)
@@ -1,81 +1,96 @@
# -*- Python -*-
-[pylithapp]
+[shearplanestrain]
# ----------------------------------------------------------------------
# journal
# ----------------------------------------------------------------------
-[pylithapp.journal.info]
-timedependent = 1
-explicit = 1
-implicit = 1
-petsc = 1
-solverlinear = 1
-meshioascii = 1
-homogeneous = 1
-explicitelasticity = 1
-quadrature2d = 1
-fiatlagrange = 1
+[shearplanestrain.journal.info]
+#timedependent = 1
+#implicit = 1
+#petsc = 1
+#solverlinear = 1
+#meshiocubit = 1
+#implicitelasticity = 1
+#quadrature2d = 1
+#fiatsimplex = 1
# ----------------------------------------------------------------------
# mesh_generator
# ----------------------------------------------------------------------
-[pylithapp.mesh_generator]
-debug = 1
+[shearplanestrain.mesh_generator]
+#debug = 1
importer = pylith.meshio.MeshIOCubit
-[pylithapp.mesh_generator.importer]
-filename = box.exo
+[shearplanestrain.mesh_generator.importer]
+filename = box_quad4_100m.exo
coordsys.space_dim = 2
# ----------------------------------------------------------------------
# problem
# ----------------------------------------------------------------------
-[pylithapp.timedependent]
-total_time = 0.0*s
-default_dt = 1.0*s
+[shearplanestrain.timedependent]
dimension = 2
-formulation = pylith.problems.Implicit
-bc = pylith.bc.BCFourSides
+bc = [y_neg,y_pos]
+[shearplanestrain.timedependent.formulation.time_step]
+total_time = 0.0*s
+
# ----------------------------------------------------------------------
# materials
# ----------------------------------------------------------------------
-[pylithapp.timedependent.materials]
-material = pylith.materials.ElasticPlaneStrain
+[shearplanestrain.timedependent]
+materials = [elastic]
+materials.elastic = pylith.materials.ElasticPlaneStrain
-[pylithapp.timedependent.materials.material]
-label = elastic material
+[shearplanestrain.timedependent.materials.elastic]
+label = Elastic material
id = 1
db.iohandler.filename = matprops.spatialdb
quadrature = pylith.feassemble.quadrature.Quadrature2D
quadrature.cell = pylith.feassemble.FIATLagrange
quadrature.cell.dimension = 2
+quadrature.cell.quad_order = 2
# ----------------------------------------------------------------------
# boundary conditions
# ----------------------------------------------------------------------
-[pylithapp.timedependent.bc.x_neg]
+[shearplanestrain.timedependent.bc.y_neg]
fixed_dof = [0, 1]
-id = 10
-label = 10
-db.label = Dirichlet BC -x edge
-db.iohandler.filename = shearxy.spatialdb
+label = 14
+db = spatialdata.spatialdb.UniformDB
+db.label = Dirichlet BC -y edge
+db.values = [dof-0,dof-1]
+db.data = [-1.0,0.0]
-[pylithapp.timedependent.bc.x_pos]
+[shearplanestrain.timedependent.bc.y_pos]
fixed_dof = [0, 1]
-id = 11
-label = 11
-db.label = Dirichlet BC +x edge
-db.iohandler.filename = shearxy.spatialdb
+label = 13
+db = spatialdata.spatialdb.UniformDB
+db.label = Dirichlet BC +y edge
+db.values = [dof-0,dof-1]
+db.data = [+1.0,0.0]
# ----------------------------------------------------------------------
# PETSc
# ----------------------------------------------------------------------
-[pylithapp.petsc]
-pc_type = jacobi
+[shearplanestrain.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
# ----------------------------------------------------------------------
# output
# ----------------------------------------------------------------------
-[pylithapp.problem.formulation.output.output.writer]
+# Give basename for VTK domain output of solution over domain.
+[shearplanestrain.problem.formulation.output.output.writer]
filename = shearplanestrain.vtk
+
+# Give basename for VTK output of state variables.
+[shearplanestrain.timedependent.materials.elastic.output]
+cell_filter = pylith.meshio.CellFilterAvg
+writer.filename = shearplanestrain-statevars-elastic.vtk
Deleted: short/3D/PyLith/trunk/tests/2d/quad4/shearplanestrain_free.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/shearplanestrain_free.cfg 2008-11-19 23:25:48 UTC (rev 13351)
+++ short/3D/PyLith/trunk/tests/2d/quad4/shearplanestrain_free.cfg 2008-11-20 00:29:25 UTC (rev 13352)
@@ -1,81 +0,0 @@
-# -*- Python -*-
-[pylithapp]
-
-# ----------------------------------------------------------------------
-# journal
-# ----------------------------------------------------------------------
-[pylithapp.journal.info]
-timedependent = 1
-explicit = 1
-implicit = 1
-petsc = 1
-solverlinear = 1
-meshioascii = 1
-homogeneous = 1
-explicitelasticity = 1
-quadrature2d = 1
-fiatlagrange = 1
-
-# ----------------------------------------------------------------------
-# mesh_generator
-# ----------------------------------------------------------------------
-[pylithapp.mesh_generator]
-debug = 1
-importer = pylith.meshio.MeshIOCubit
-
-[pylithapp.mesh_generator.importer]
-filename = box.exo
-coordsys.space_dim = 2
-
-# ----------------------------------------------------------------------
-# problem
-# ----------------------------------------------------------------------
-[pylithapp.timedependent]
-total_time = 0.0*s
-default_dt = 1.0*s
-dimension = 2
-formulation = pylith.problems.Implicit
-bc = pylith.bc.BCFourSides
-
-# ----------------------------------------------------------------------
-# materials
-# ----------------------------------------------------------------------
-[pylithapp.timedependent.materials]
-material = pylith.materials.ElasticPlaneStrain
-
-[pylithapp.timedependent.materials.material]
-label = elastic material
-id = 1
-db.iohandler.filename = matprops.spatialdb
-quadrature = pylith.feassemble.quadrature.Quadrature2D
-quadrature.cell = pylith.feassemble.FIATLagrange
-quadrature.cell.dimension = 2
-
-# ----------------------------------------------------------------------
-# boundary conditions
-# ----------------------------------------------------------------------
-[pylithapp.timedependent.bc.x_neg]
-fixed_dof = [0, 1]
-id = 10
-label = 10
-db.label = Dirichlet BC -x edge
-db.iohandler.filename = shearxy.spatialdb
-
-[pylithapp.timedependent.bc.x_pos]
-fixed_dof = [0, 1]
-id = 11
-label = 11
-db.label = Dirichlet BC +x edge
-db.iohandler.filename = shearxy.spatialdb
-
-# ----------------------------------------------------------------------
-# PETSc
-# ----------------------------------------------------------------------
-[pylithapp.petsc]
-pc_type = jacobi
-
-# ----------------------------------------------------------------------
-# output
-# ----------------------------------------------------------------------
-[pylithapp.problem.formulation.output.output.writer]
-filename = shearplanestrain_free.vtk
Deleted: short/3D/PyLith/trunk/tests/2d/quad4/shearplanestrain_xfixed.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/shearplanestrain_xfixed.cfg 2008-11-19 23:25:48 UTC (rev 13351)
+++ short/3D/PyLith/trunk/tests/2d/quad4/shearplanestrain_xfixed.cfg 2008-11-20 00:29:25 UTC (rev 13352)
@@ -1,97 +0,0 @@
-# -*- Python -*-
-[pylithapp]
-
-# ----------------------------------------------------------------------
-# journal
-# ----------------------------------------------------------------------
-[pylithapp.journal.info]
-timedependent = 1
-explicit = 1
-implicit = 1
-petsc = 1
-solverlinear = 1
-meshioascii = 1
-homogeneous = 1
-explicitelasticity = 1
-quadrature2d = 1
-fiatlagrange = 1
-
-# ----------------------------------------------------------------------
-# mesh_generator
-# ----------------------------------------------------------------------
-[pylithapp.mesh_generator]
-debug = 1
-importer = pylith.meshio.MeshIOCubit
-
-[pylithapp.mesh_generator.importer]
-filename = box.exo
-coordsys.space_dim = 2
-
-# ----------------------------------------------------------------------
-# problem
-# ----------------------------------------------------------------------
-[pylithapp.timedependent]
-total_time = 0.0*s
-default_dt = 1.0*s
-dimension = 2
-formulation = pylith.problems.Implicit
-bc = pylith.bc.BCFourSides
-
-# ----------------------------------------------------------------------
-# materials
-# ----------------------------------------------------------------------
-[pylithapp.timedependent.materials]
-material = pylith.materials.ElasticPlaneStrain
-
-[pylithapp.timedependent.materials.material]
-label = elastic material
-id = 1
-db.iohandler.filename = matprops.spatialdb
-quadrature = pylith.feassemble.quadrature.Quadrature2D
-quadrature.cell = pylith.feassemble.FIATLagrange
-quadrature.cell.dimension = 2
-
-# ----------------------------------------------------------------------
-# boundary conditions
-# ----------------------------------------------------------------------
-[pylithapp.timedependent.bc.x_neg]
-fixed_dof = [0, 1]
-id = 10
-label = 10
-db.label = Dirichlet BC -x edge
-db.iohandler.filename = shearxy.spatialdb
-
-[pylithapp.timedependent.bc.x_pos]
-fixed_dof = [0, 1]
-id = 11
-label = 11
-db.label = Dirichlet BC +x edge
-db.iohandler.filename = shearxy.spatialdb
-
-[pylithapp.timedependent.bc.y_pos]
-fixed_dof = [0]
-id = 12
-label = 12
-db.label = Dirichlet BC +y edge
-db.iohandler.filename = shearxy.spatialdb
-db.query_type = linear
-
-[pylithapp.timedependent.bc.y_neg]
-fixed_dof = [0]
-id = 13
-label = 13
-db.label = Dirichlet BC -y edge
-db.iohandler.filename = shearxy.spatialdb
-db.query_type = linear
-
-# ----------------------------------------------------------------------
-# PETSc
-# ----------------------------------------------------------------------
-[pylithapp.petsc]
-pc_type = jacobi
-
-# ----------------------------------------------------------------------
-# output
-# ----------------------------------------------------------------------
-[pylithapp.problem.formulation.output.output.writer]
-filename = shearplanestrain_xfixed.vtk
Deleted: short/3D/PyLith/trunk/tests/2d/quad4/shearxy.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/shearxy.spatialdb 2008-11-19 23:25:48 UTC (rev 13351)
+++ short/3D/PyLith/trunk/tests/2d/quad4/shearxy.spatialdb 2008-11-20 00:29:25 UTC (rev 13352)
@@ -1,15 +0,0 @@
-#SPATIAL.ascii 1
-SimpleDB {
- num-values = 2
- value-names = dof-0 dof-1
- value-units = m m
- num-locs = 2
- data-dim = 1
- space-dim = 2
- cs-data = cartesian {
- to-meters = 1.0
- space-dim = 2
- }
-}
--200.0 0.0 0.0 -1.0
-+200.0 0.0 0.0 +1.0
Deleted: short/3D/PyLith/trunk/tests/2d/quad4/shortfault.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/shortfault.cfg 2008-11-19 23:25:48 UTC (rev 13351)
+++ short/3D/PyLith/trunk/tests/2d/quad4/shortfault.cfg 2008-11-20 00:29:25 UTC (rev 13352)
@@ -1,94 +0,0 @@
-# -*- Python -*-
-[pylithapp]
-
-# ----------------------------------------------------------------------
-# 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
-
-# ----------------------------------------------------------------------
-# mesh_generator
-# ----------------------------------------------------------------------
-[pylithapp.mesh_generator]
-debug = 1
-
-[pylithapp.mesh_generator.importer]
-filename = fourcells.mesh
-coordsys.space_dim = 2
-
-# ----------------------------------------------------------------------
-# problem
-# ----------------------------------------------------------------------
-[pylithapp.timedependent]
-total_time = 0.0*s
-default_dt = 1.0*s
-dimension = 2
-formulation = pylith.problems.Implicit
-bc = [x_neg,x_pos]
-interfaces = [fault]
-
-# ----------------------------------------------------------------------
-# materials
-# ----------------------------------------------------------------------
-[pylithapp.timedependent.materials]
-material = pylith.materials.ElasticPlaneStrain
-
-[pylithapp.timedependent.materials.material]
-label = elastic material
-id = 0
-db.iohandler.filename = matprops.spatialdb
-quadrature = pylith.feassemble.quadrature.Quadrature2D
-quadrature.cell = pylith.feassemble.FIATLagrange
-quadrature.cell.dimension = 2
-
-# ----------------------------------------------------------------------
-# boundary conditions
-# ----------------------------------------------------------------------
-[pylithapp.timedependent.bc.x_neg]
-fixed_dof = [0, 1]
-label = x_neg
-
-[pylithapp.timedependent.bc.x_pos]
-fixed_dof = [0, 1]
-label = x_pos
-
-# ----------------------------------------------------------------------
-# faults
-# ----------------------------------------------------------------------
-[pylithapp.timedependent.interfaces]
-fault = pylith.faults.FaultCohesiveKin
-
-[pylithapp.timedependent.interfaces.fault]
-id = 20
-label = fault
-quadrature = pylith.feassemble.quadrature.Quadrature1Din2D
-quadrature.cell.shape = line
-mat_db.iohandler.filename = matprops.spatialdb
-
-[pylithapp.timedependent.interfaces.fault.eq_srcs.rupture.slip_function]
-slip.iohandler.filename = dislocation_slip.spatialdb
-slip_time.iohandler.filename = dislocation_sliptime.spatialdb
-
-
-# ----------------------------------------------------------------------
-# PETSc
-# ----------------------------------------------------------------------
-[pylithapp.petsc]
-pc_type = asm
-
-# ----------------------------------------------------------------------
-# output
-# ----------------------------------------------------------------------
-[pylithapp.problem.formulation.output.output.writer]
-filename = dislocation.vtk
Deleted: short/3D/PyLith/trunk/tests/2d/quad4/test.py
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/test.py 2008-11-19 23:25:48 UTC (rev 13351)
+++ short/3D/PyLith/trunk/tests/2d/quad4/test.py 2008-11-20 00:29:25 UTC (rev 13352)
@@ -1,42 +0,0 @@
-import numpy
-j = numpy.zeros( (4,4), dtype=numpy.float64)
-
-j[0,0] = +2.41071e+10 +2.41071e+10
-j[0,1] = +6.42857e+09
-j[0,2] = -1.84821e+10 -1.84821e+10
-j[0,3] = -1.20536e+10
-
-j[1,0] = +6.42857e+09
-j[1,1] = +2.41071e+10 +2.41071e+10
-j[1,2] = -1.20536e+10
-j[1,3] = -1.84821e+10 -1.84821e+10
-
-j[2,0] = -1.84821e+10 -1.84821e+10
-j[2,1] = -1.20536e+10
-j[2,2] = +2.41071e+10 +2.41071e+10
-j[2,3] = +6.42857e+09
-
-j[3,0] = -1.20536e+10
-j[3,1] = -1.84821e+10 -1.84821e+10
-j[3,2] = +6.42857e+09
-j[3,3] = +2.41071e+10 +2.41071e+10
-
-print "jacobian:\n",j
-
-
-r = numpy.zeros( (4,1), dtype=numpy.float64)
-
-r[0,0] = -3*6.42857e+9 - 3*-1.20536e+10
-r[1,0] = +3*6.42857e+9 + 3*-1.20536e+10
-r[2,0] = -3*6.42857e+9 - 3*-1.20536e+10
-r[3,0] = +3*6.42857e+9 + 3*-1.20536e+10
-print "residual:\n",r
-
-#r[0,0] = 1.6875e+10
-#r[1,0] = 1.6875e+10
-#r[2,0] = -1.6875e+10
-#r[3,0] = -1.6875e+10
-
-
-u = numpy.dot(numpy.linalg.inv(j), r)
-print "dispIncr:\n",u
Deleted: short/3D/PyLith/trunk/tests/2d/quad4/threequad4.mesh
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/threequad4.mesh 2008-11-19 23:25:48 UTC (rev 13351)
+++ short/3D/PyLith/trunk/tests/2d/quad4/threequad4.mesh 2008-11-20 00:29:25 UTC (rev 13352)
@@ -1,68 +0,0 @@
-mesh = {
- dimension = 2
- use-index-zero = true
- vertices = {
- dimension = 2
- count = 8
- coordinates = {
- 0 -3.0 -1.0
- 1 -1.0 -1.0
- 2 1.0 -1.0
- 3 3.0 -1.0
- 4 -3.0 1.0
- 5 -1.0 1.0
- 6 1.0 1.0
- 7 3.0 1.0
- }
- }
- cells = {
- count = 3
- num-corners = 4
- simplices = {
- 0 0 1 5 4
- 1 1 2 6 5
- 2 2 3 7 6
- }
- material-ids = {
- 0 0
- 1 0
- 2 0
- }
- }
- group = {
- name = x_neg
- type = vertices
- count = 2
- indices = {
- 0
- 4
- }
- }
- group = {
- name = x_pos
- type = vertices
- count = 2
- indices = {
- 3
- 7
- }
- }
- group = {
- name = y_neg
- type = vertices
- count = 2
- indices = {
- 1
- 2
- }
- }
- group = {
- name = y_pos
- type = vertices
- count = 2
- indices = {
- 5
- 6
- }
- }
-}
Deleted: short/3D/PyLith/trunk/tests/2d/quad4/threequad4_shear.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/threequad4_shear.cfg 2008-11-19 23:25:48 UTC (rev 13351)
+++ short/3D/PyLith/trunk/tests/2d/quad4/threequad4_shear.cfg 2008-11-20 00:29:25 UTC (rev 13352)
@@ -1,98 +0,0 @@
-# -*- Python -*-
-[pylithapp]
-
-# ----------------------------------------------------------------------
-# journal
-# ----------------------------------------------------------------------
-[pylithapp.journal.info]
-timedependent = 1
-explicit = 1
-implicit = 1
-petsc = 1
-solverlinear = 1
-meshioascii = 1
-homogeneous = 1
-explicitelasticity = 1
-quadrature2d = 1
-fiatlagrange = 1
-
-# ----------------------------------------------------------------------
-# mesh_generator
-# ----------------------------------------------------------------------
-[pylithapp.mesh_generator]
-debug = 1
-
-[pylithapp.mesh_generator.importer]
-filename = threequad4.mesh
-coordsys.space_dim = 2
-
-# ----------------------------------------------------------------------
-# problem
-# ----------------------------------------------------------------------
-[pylithapp.timedependent]
-total_time = 0.0*s
-default_dt = 1.0*s
-dimension = 2
-formulation = pylith.problems.Implicit
-bc = pylith.bc.BCFourSides
-
-# ----------------------------------------------------------------------
-# materials
-# ----------------------------------------------------------------------
-[pylithapp.timedependent.materials]
-material = pylith.materials.ElasticPlaneStress
-
-[pylithapp.timedependent.materials.material]
-label = elastic material
-id = 0
-db.iohandler.filename = matprops.spatialdb
-quadrature = pylith.feassemble.quadrature.Quadrature2D
-quadrature.cell = pylith.feassemble.FIATLagrange
-quadrature.cell.dimension = 2
-
-# ----------------------------------------------------------------------
-# boundary conditions
-# ----------------------------------------------------------------------
-[pylithapp.timedependent.bc.x_neg]
-fixed_dof = [0, 1]
-id = 10
-label = x_neg
-db.label = Dirichlet BC -x edge
-db.iohandler.filename = threequad4_shear.spatialdb
-db.query_type = linear
-
-[pylithapp.timedependent.bc.x_pos]
-fixed_dof = [0, 1]
-id = 11
-label = x_pos
-db.label = Dirichlet BC +x edge
-db.iohandler.filename = threequad4_shear.spatialdb
-db.query_type = linear
-
-[pylithapp.timedependent.bc.y_pos]
-fixed_dof = [0]
-id = 12
-label = y_pos
-db.label = Dirichlet BC +y edge
-db.iohandler.filename = threequad4_shear.spatialdb
-db.query_type = linear
-
-[pylithapp.timedependent.bc.y_neg]
-fixed_dof = [0]
-id = 13
-label = y_neg
-db.label = Dirichlet BC -y edge
-db.iohandler.filename = threequad4_shear.spatialdb
-db.query_type = linear
-
-# ----------------------------------------------------------------------
-# PETSc
-# ----------------------------------------------------------------------
-[pylithapp.petsc]
-pc_type = jacobi
-
-# ----------------------------------------------------------------------
-# output
-# ----------------------------------------------------------------------
-[pylithapp.problem.formulation.output.output.writer]
-filename = threequad4_shear.vtk
Deleted: short/3D/PyLith/trunk/tests/2d/quad4/threequad4_shear.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/threequad4_shear.spatialdb 2008-11-19 23:25:48 UTC (rev 13351)
+++ short/3D/PyLith/trunk/tests/2d/quad4/threequad4_shear.spatialdb 2008-11-20 00:29:25 UTC (rev 13352)
@@ -1,15 +0,0 @@
-#SPATIAL.ascii 1
-SimpleDB {
- num-values = 2
- value-names = dof-0 dof-1
- value-units = m m
- num-locs = 2
- data-dim = 1
- space-dim = 2
- cs-data = cartesian {
- to-meters = 1.0
- space-dim = 2
- }
-}
--3.0 0.0 0.0 -3.0
-+3.0 0.0 0.0 +3.0
Deleted: short/3D/PyLith/trunk/tests/2d/quad4/twocells.mesh
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/twocells.mesh 2008-11-19 23:25:48 UTC (rev 13351)
+++ short/3D/PyLith/trunk/tests/2d/quad4/twocells.mesh 2008-11-20 00:29:25 UTC (rev 13352)
@@ -1,63 +0,0 @@
-mesh = {
- dimension = 2
- use-index-zero = true
- vertices = {
- dimension = 2
- count = 6
- coordinates = {
- 0 -2.0 -1.0
- 1 -2.0 1.0
- 2 0.0 -1.0
- 3 0.0 1.0
- 4 2.0 -1.0
- 5 2.0 1.0
- }
- }
- cells = {
- count = 2
- num-corners = 4
- simplices = {
- 0 0 2 3 1
- 1 4 5 3 2
- }
- material-ids = {
- 0 0
- 1 0
- }
- }
- group = {
- name = fault
- type = vertices
- count = 2
- indices = {
- 2
- 3
- }
- }
- group = {
- name = x_neg
- type = vertices
- count = 2
- indices = {
- 0
- 1
- }
- }
- group = {
- name = x_pos
- type = vertices
- count = 2
- indices = {
- 4
- 5
- }
- }
- group = {
- name = y_pos
- type = vertices
- count = 1
- indices = {
- 3
- }
- }
-}
Modified: short/3D/PyLith/trunk/tests/2d/tri3/README
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/README 2008-11-19 23:25:48 UTC (rev 13351)
+++ short/3D/PyLith/trunk/tests/2d/tri3/README 2008-11-20 00:29:25 UTC (rev 13352)
@@ -57,3 +57,28 @@
Ux(x,y) = 0
Uy(x,y) = -0.004 * x
+
+======================================================================
+DISLOCATION
+======================================================================
+
+2-D dislocation test with linear triangular cells.
+
+
+ ----------
+ | | |
+y=-0.5 m | | | y=+0.5m
+ | | |
+ | | |
+ ----------
+
+
+Dirichlet boundary conditions
+ Ux( 0,y) = 0.0
+ Uy( 0,y) = -0.5 m
+ Ux(+250,y) = 0.0
+ Uy(+250,y) = +0.5 m
+
+Analytical solution
+ Ux(x<0,y) = -0.5
+ Ux(x>0,y) = +0.5
Modified: short/3D/PyLith/trunk/tests/2d/tri3/axialplanestrain.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/axialplanestrain.cfg 2008-11-19 23:25:48 UTC (rev 13351)
+++ short/3D/PyLith/trunk/tests/2d/tri3/axialplanestrain.cfg 2008-11-20 00:29:25 UTC (rev 13352)
@@ -95,11 +95,9 @@
# ----------------------------------------------------------------------
# output
# ----------------------------------------------------------------------
-# Give basename for VTK domain output of solution over domain.
[axialplanestrain.problem.formulation.output.output.writer]
filename = axialplanestrain.vtk
-# Give basename for VTK output of state variables.
[axialplanestrain.timedependent.materials.elastic.output]
cell_filter = pylith.meshio.CellFilterAvg
writer.filename = axialplanestrain-statevars-elastic.vtk
Modified: short/3D/PyLith/trunk/tests/2d/tri3/geometry.jou
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/geometry.jou 2008-11-19 23:25:48 UTC (rev 13351)
+++ short/3D/PyLith/trunk/tests/2d/tri3/geometry.jou 2008-11-20 00:29:25 UTC (rev 13352)
@@ -1,12 +1,3 @@
-## /tools/common/cubit-10.2/bin/clarox
-## Cubit Version 10.2
-## Cubit Build 24
-## Revised 12/15/2006 16:09:40 MST
-## Running 06/18/2007 10:26:50 AM
-## Command Options:
-## -warning = On
-## -information = On
-
# ----------------------------------------------------------------------
# Create surface using vertices
# ----------------------------------------------------------------------
Modified: short/3D/PyLith/trunk/tests/2d/tri3/mesh_tri3_100m.jou
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/mesh_tri3_100m.jou 2008-11-19 23:25:48 UTC (rev 13351)
+++ short/3D/PyLith/trunk/tests/2d/tri3/mesh_tri3_100m.jou 2008-11-20 00:29:25 UTC (rev 13352)
@@ -1,12 +1,3 @@
-## /tools/common/cubit-10.2/bin/clarox
-## Cubit Version 10.2
-## Cubit Build 24
-## Revised 12/15/2006 16:09:40 MST
-## Running 06/18/2007 10:26:50 AM
-## Command Options:
-## -warning = On
-## -information = On
-
# ----------------------------------------------------------------------
# Generate geometry
# ----------------------------------------------------------------------
Modified: short/3D/PyLith/trunk/tests/2d/tri3/testpylith.py
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/testpylith.py 2008-11-19 23:25:48 UTC (rev 13351)
+++ short/3D/PyLith/trunk/tests/2d/tri3/testpylith.py 2008-11-20 00:29:25 UTC (rev 13352)
@@ -10,10 +10,10 @@
# ======================================================================
#
+__requires__ = "PyLith"
+
import unittest
-__requires__ = "PyLith"
-
def suite():
"""
Create test suite.
@@ -23,11 +23,11 @@
from TestAxialPlaneStrain import TestAxialPlaneStrain
suite.addTest(unittest.makeSuite(TestAxialPlaneStrain))
- #from TestShearPlaneStrain import TestShearPlaneStrain
- #suite.addTest(unittest.makeSuite(TestShearPlaneStrain))
+ from TestShearPlaneStrain import TestShearPlaneStrain
+ suite.addTest(unittest.makeSuite(TestShearPlaneStrain))
- #from TestDislocation import TestDislocation
- #suite.addTest(unittest.makeSuite(TestDislocation))
+ from TestDislocation import TestDislocation
+ suite.addTest(unittest.makeSuite(TestDislocation))
return suite
More information about the CIG-COMMITS
mailing list