[cig-commits] r13117 - short/3D/PyLith/trunk/tests/2d/tri3
brad at geodynamics.org
brad at geodynamics.org
Tue Oct 21 15:51:13 PDT 2008
Author: brad
Date: 2008-10-21 15:51:13 -0700 (Tue, 21 Oct 2008)
New Revision: 13117
Added:
short/3D/PyLith/trunk/tests/2d/tri3/box_tri3_100m.exo
short/3D/PyLith/trunk/tests/2d/tri3/geometry.jou
short/3D/PyLith/trunk/tests/2d/tri3/mesh_tri3_100m.jou
Removed:
short/3D/PyLith/trunk/tests/2d/tri3/axialx.spatialdb
short/3D/PyLith/trunk/tests/2d/tri3/axialy.spatialdb
short/3D/PyLith/trunk/tests/2d/tri3/box.cub
short/3D/PyLith/trunk/tests/2d/tri3/box.exo
short/3D/PyLith/trunk/tests/2d/tri3/explicit.cfg
short/3D/PyLith/trunk/tests/2d/tri3/twocells.mesh
Modified:
short/3D/PyLith/trunk/tests/2d/tri3/Makefile.am
short/3D/PyLith/trunk/tests/2d/tri3/README
short/3D/PyLith/trunk/tests/2d/tri3/TestAxialPlaneStrain.py
short/3D/PyLith/trunk/tests/2d/tri3/TestDislocation.py
short/3D/PyLith/trunk/tests/2d/tri3/axialplanestrain.cfg
short/3D/PyLith/trunk/tests/2d/tri3/testpylith.py
Log:
Started setting up full-scale testing.
Modified: short/3D/PyLith/trunk/tests/2d/tri3/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/Makefile.am 2008-10-21 22:44:04 UTC (rev 13116)
+++ short/3D/PyLith/trunk/tests/2d/tri3/Makefile.am 2008-10-21 22:51:13 UTC (rev 13117)
@@ -20,8 +20,7 @@
TestDislocation.py
noinst_DATA = \
- box.exo \
- twocells.mesh \
+ box_tri3_100m.exo \
matprops.spatialdb \
axialplanestrain.cfg \
axialx.spatialdb \
@@ -32,16 +31,12 @@
dislocation_disp.spatialdb \
dislocation_sliprate.spatialdb \
dislocation_slip.spatialdb \
- dislocation_sliptime.spatialdb \
- explicit.cfg
+ dislocation_sliptime.spatialdb
noinst_TMP = \
- axialplanestrain_t0.vtk \
- axialplanestrain_t1.vtk \
- shearplanestrain_t0.vtk \
- shearplanestrain_t1.vtk \
- dislocation_t0.vtk \
- dislocation_t1.vtk
+ axialplanestrain_t0000000.vtk \
+ axialplanestrain-statevars-elastic_info.vtk \
+ axialplanestrain-statevars-elastic_t0000000.vtk
TESTS_ENVIRONMENT = $(PYTHON)
@@ -49,14 +44,16 @@
# 'export' the input files by performing a mock install
export_datadir = $(top_builddir)/tests/2d/tri3
-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/tri3/README
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/README 2008-10-21 22:44:04 UTC (rev 13116)
+++ short/3D/PyLith/trunk/tests/2d/tri3/README 2008-10-21 22:51:13 UTC (rev 13117)
@@ -1,13 +1,18 @@
======================================================================
-AXIAL COMPRESSION
+DOMAIN
======================================================================
-2-D axial compression test with linear triangular cells.
-
-250 <= x <= +250
-250 <= y <= +250
+Mesh is tri3 cells with nominal 100m discretization size.
+======================================================================
+AXIAL COMPRESSION
+======================================================================
+
+2-D axial compression test with linear triangular cells.
+
y=-1.0 m
----------
| |
@@ -33,10 +38,7 @@
2-D shear test with linear triangular cells.
--250 <= x <= +250
--250 <= y <= +250
-
----------
| |
y=-1.0 m | | y=+1.0m
Modified: short/3D/PyLith/trunk/tests/2d/tri3/TestAxialPlaneStrain.py
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/TestAxialPlaneStrain.py 2008-10-21 22:44:04 UTC (rev 13116)
+++ short/3D/PyLith/trunk/tests/2d/tri3/TestAxialPlaneStrain.py 2008-10-21 22:51:13 UTC (rev 13117)
@@ -16,16 +16,22 @@
## y-direction for 2-D box.
import unittest
-import numpy
-import tables
+# 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
Modified: short/3D/PyLith/trunk/tests/2d/tri3/TestDislocation.py
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/TestDislocation.py 2008-10-21 22:44:04 UTC (rev 13116)
+++ short/3D/PyLith/trunk/tests/2d/tri3/TestDislocation.py 2008-10-21 22:51:13 UTC (rev 13117)
@@ -16,16 +16,23 @@
## box.
import unittest
-import numpy
-import tables
+# Local application
+from pylith.PyLithApp import PyLithApp
+class DislocationApp(PyLithApp):
+
+ def __init__(self, name="dislocation"):
+ PyLithApp.__init__(self, name)
+ 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("dislocation")
+ app = DislocationApp()
app.run()
run_pylith.done = True
return
Modified: short/3D/PyLith/trunk/tests/2d/tri3/axialplanestrain.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/axialplanestrain.cfg 2008-10-21 22:44:04 UTC (rev 13116)
+++ short/3D/PyLith/trunk/tests/2d/tri3/axialplanestrain.cfg 2008-10-21 22:51:13 UTC (rev 13117)
@@ -1,50 +1,49 @@
# -*- Python -*-
-[pylithapp]
+[axialplanestrain]
# ----------------------------------------------------------------------
# journal
# ----------------------------------------------------------------------
-[pylithapp.journal.info]
-timedependent = 1
-explicit = 1
-implicit = 1
-petsc = 1
-solverlinear = 1
-meshioascii = 1
-homogeneous = 1
-implicitelasticity = 1
-quadrature2d = 1
-fiatsimplex = 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_tri3_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
@@ -53,42 +52,54 @@
# ----------------------------------------------------------------------
# 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
-[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
-[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.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.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]
+# 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
Deleted: short/3D/PyLith/trunk/tests/2d/tri3/axialx.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/axialx.spatialdb 2008-10-21 22:44:04 UTC (rev 13116)
+++ short/3D/PyLith/trunk/tests/2d/tri3/axialx.spatialdb 2008-10-21 22:51:13 UTC (rev 13117)
@@ -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/tri3/axialy.spatialdb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/axialy.spatialdb 2008-10-21 22:44:04 UTC (rev 13116)
+++ short/3D/PyLith/trunk/tests/2d/tri3/axialy.spatialdb 2008-10-21 22:51:13 UTC (rev 13117)
@@ -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/tri3/box.cub
===================================================================
(Binary files differ)
Deleted: short/3D/PyLith/trunk/tests/2d/tri3/box.exo
===================================================================
(Binary files differ)
Added: short/3D/PyLith/trunk/tests/2d/tri3/box_tri3_100m.exo
===================================================================
(Binary files differ)
Property changes on: short/3D/PyLith/trunk/tests/2d/tri3/box_tri3_100m.exo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: short/3D/PyLith/trunk/tests/2d/tri3/explicit.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/explicit.cfg 2008-10-21 22:44:04 UTC (rev 13116)
+++ short/3D/PyLith/trunk/tests/2d/tri3/explicit.cfg 2008-10-21 22:51:13 UTC (rev 13117)
@@ -1,59 +0,0 @@
-# -*- Python -*-
-[pylithapp]
-
-# ----------------------------------------------------------------------
-# journal
-# ----------------------------------------------------------------------
-[pylithapp.journal.info]
-timedependent = 1
-explicit = 1
-implicit = 1
-petsc = 1
-solverlinear = 1
-meshioascii = 1
-homogeneous = 1
-implicitelasticity = 1
-quadrature2d = 1
-fiatsimplex = 1
-
-# ----------------------------------------------------------------------
-# mesh_generator
-# ----------------------------------------------------------------------
-[pylithapp.mesh_generator]
-debug = 1
-
-[pylithapp.mesh_generator.importer]
-filename = twocells.mesh
-coordsys.space_dim = 2
-
-# ----------------------------------------------------------------------
-# problem
-# ----------------------------------------------------------------------
-[pylithapp.timedependent]
-formulation = pylith.problems.Explicit
-total_time = 3.0*s
-default_dt = 1.0*s
-dimension = 2
-
-# ----------------------------------------------------------------------
-# materials
-# ----------------------------------------------------------------------
-[pylithapp.timedependent.materials]
-material = pylith.materials.ElasticPlaneStrain
-
-[pylithapp.timedependent.materials.material]
-label = elastic material
-id = 1
-db.iohandler.filename = matprops.spatialdb
-
-# We are doing 2D quadrature for a triangle.
-quadrature = pylith.feassemble.quadrature.Quadrature2D
-quadrature.cell.shape = triangle
-
-# ----------------------------------------------------------------------
-# PETSc
-# ----------------------------------------------------------------------
-[pylithapp.petsc]
-pc_type = jacobi
-# start_in_debugger = true
-# debugger_timeout = 100
Added: short/3D/PyLith/trunk/tests/2d/tri3/geometry.jou
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/geometry.jou (rev 0)
+++ short/3D/PyLith/trunk/tests/2d/tri3/geometry.jou 2008-10-21 22:51:13 UTC (rev 13117)
@@ -0,0 +1,34 @@
+## /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
+# ----------------------------------------------------------------------
+
+# 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/tri3/mesh_tri3_100m.jou
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/mesh_tri3_100m.jou (rev 0)
+++ short/3D/PyLith/trunk/tests/2d/tri3/mesh_tri3_100m.jou 2008-10-21 22:51:13 UTC (rev 13117)
@@ -0,0 +1,78 @@
+## /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
+# ----------------------------------------------------------------------
+playback 'geometry.jou'
+
+# ----------------------------------------------------------------------
+# Set discretization size
+# ----------------------------------------------------------------------
+surface all size 100
+
+# ----------------------------------------------------------------------
+# Generate the mesh
+# ----------------------------------------------------------------------
+surface all scheme tridelaunay
+mesh surface all
+
+# ----------------------------------------------------------------------
+# Improve triangle quality with smoothing
+# ----------------------------------------------------------------------
+surface all smooth scheme condition number beta 1.05 cpu 2
+smooth 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_tri3_100m.exo" dimension 2 overwrite
Modified: short/3D/PyLith/trunk/tests/2d/tri3/testpylith.py
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/testpylith.py 2008-10-21 22:44:04 UTC (rev 13116)
+++ short/3D/PyLith/trunk/tests/2d/tri3/testpylith.py 2008-10-21 22:51:13 UTC (rev 13117)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env nemesis
#
# ======================================================================
#
@@ -10,10 +10,10 @@
# ======================================================================
#
+import unittest
+
__requires__ = "PyLith"
-import unittest
-
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
Deleted: short/3D/PyLith/trunk/tests/2d/tri3/twocells.mesh
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/twocells.mesh 2008-10-21 22:44:04 UTC (rev 13116)
+++ short/3D/PyLith/trunk/tests/2d/tri3/twocells.mesh 2008-10-21 22:51:13 UTC (rev 13117)
@@ -1,43 +0,0 @@
-mesh = {
- dimension = 2
- vertices = {
- dimension = 2
- count = 4
- coordinates = {
- 0 -1.0 0.0
- 1 0.0 1.0
- 2 0.0 -1.0
- 3 1.0 0.0
- }
- }
- cells = {
- num-corners = 3
- count = 2
- simplices = {
- 0 0 2 1
- 1 1 2 3
- }
- material-ids = {
- 0 1
- 1 1
- }
- }
- group = {
- type = vertices
- name = fault
- count = 2
- indices = {
- 1
- 2
- }
- }
- group = {
- type = vertices
- name = end points
- count = 2
- indices = {
- 0
- 3
- }
- }
-}
More information about the CIG-COMMITS
mailing list