[cig-commits] r7367 - in short/3D/PyLith/trunk: . examples
examples/3d examples/3d/hex8 libsrc unittests/libtests/bc/data
brad at geodynamics.org
brad at geodynamics.org
Thu Jun 21 18:02:53 PDT 2007
Author: brad
Date: 2007-06-21 18:02:53 -0700 (Thu, 21 Jun 2007)
New Revision: 7367
Added:
short/3D/PyLith/trunk/examples/3d/
short/3D/PyLith/trunk/examples/3d/hex8/
short/3D/PyLith/trunk/examples/3d/hex8/box_hex8_1000m.exo
short/3D/PyLith/trunk/examples/3d/hex8/dislocation.cfg
short/3D/PyLith/trunk/examples/3d/hex8/finalslip.spatialdb
short/3D/PyLith/trunk/examples/3d/hex8/fixeddisp_shear.spatialdb
short/3D/PyLith/trunk/examples/3d/hex8/fixeddisp_zero.spatialdb
short/3D/PyLith/trunk/examples/3d/hex8/fourmaterials.odb
short/3D/PyLith/trunk/examples/3d/hex8/geometry.jou
short/3D/PyLith/trunk/examples/3d/hex8/mat_elastic.spatialdb
short/3D/PyLith/trunk/examples/3d/hex8/mesh_hex8_1000m.cub
short/3D/PyLith/trunk/examples/3d/hex8/mesh_hex8_1000m.jou
short/3D/PyLith/trunk/examples/3d/hex8/sliprate.spatialdb
short/3D/PyLith/trunk/examples/3d/hex8/sliptime.spatialdb
short/3D/PyLith/trunk/examples/3d/tet4/
Modified:
short/3D/PyLith/trunk/TODO
short/3D/PyLith/trunk/libsrc/Makefile.am
short/3D/PyLith/trunk/unittests/libtests/bc/data/line2.mesh
Log:
Started setting up hex8 CUBIT example.
Modified: short/3D/PyLith/trunk/TODO
===================================================================
--- short/3D/PyLith/trunk/TODO 2007-06-21 23:31:57 UTC (rev 7366)
+++ short/3D/PyLith/trunk/TODO 2007-06-22 01:02:53 UTC (rev 7367)
@@ -6,9 +6,6 @@
2. Add unit test for reading MeshIOAscii file with comments.
- 4. Need PETSc settings for absolute convergence (i.e., don't want to
- max out iterations when there is no increment in displacement).
-
----------------------------------------------------------------------
List of missing features (EqSim/PyLith 0.8) and new features.
@@ -20,6 +17,8 @@
Output of surface/fault information
PyLith 0.8
Traction boundary conditions
+ Viscoelastic material models (several)
+ Output of stress/strain information
New features
EqSim
@@ -37,11 +36,9 @@
MAIN PRIORITIES (Brad)
======================================================================
-Add check to make sure every material supplied by user exists in the
-mesh.
-
-check test routines that create mesh to make sure they clear factory
-(*mesh)->getFactory()->clear();
+Create 6x6x4 meshes for examples.
+ CUBIT
+ LaGriT
Create meshes for benchmarks
@@ -73,6 +70,12 @@
a. FaultCohesive
i. Add checking of faultMesh [not currently used]
+Add check to make sure every material supplied by user exists in the
+mesh.
+
+check test routines that create mesh to make sure they clear factory
+(*mesh)->getFactory()->clear(); necessary?
+
1. Allow use of all elasticity constants (9 for 2-D, 36 for 3-D).
a. Materials C++ code
b. Integrator C++ code
Added: short/3D/PyLith/trunk/examples/3d/hex8/box_hex8_1000m.exo
===================================================================
(Binary files differ)
Property changes on: short/3D/PyLith/trunk/examples/3d/hex8/box_hex8_1000m.exo
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: short/3D/PyLith/trunk/examples/3d/hex8/dislocation.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/dislocation.cfg 2007-06-21 23:31:57 UTC (rev 7366)
+++ short/3D/PyLith/trunk/examples/3d/hex8/dislocation.cfg 2007-06-22 01:02:53 UTC (rev 7367)
@@ -0,0 +1,135 @@
+# -*- Python -*-
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# journal
+# ----------------------------------------------------------------------
+[pylithapp.journal.info]
+timedependent = 1
+implicit = 1
+petsc = 1
+solverlinear = 1
+meshiocubit = 1
+implicitelasticity = 1
+quadrature3d = 1
+fiatlagrange = 1
+faultcohesivekin = 1
+
+# ----------------------------------------------------------------------
+# mesh_generator
+# ----------------------------------------------------------------------
+[pylithapp.mesh_generator]
+debug = 0
+importer = pylith.meshio.MeshIOCubit
+
+[pylithapp.mesh_generator.importer]
+filename = box_hex8_1000m.exo
+coordsys.space_dim = 3
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+total_time = 0.0*s
+default_dt = 1.0*s
+dimension = 3
+formulation = pylith.problems.Implicit
+bc = pylith.bc.BCSixSides
+#interfaces = pylith.faults.SingleFault
+materials = fourmaterials
+
+# ----------------------------------------------------------------------
+# materials
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.materials]
+# TEMPORARY
+viscoelastic_neg = pylith.materials.ElasticIsotropic3D
+viscoelastic_pos = pylith.materials.ElasticIsotropic3D
+
+[pylithapp.timedependent.materials.elastic_pos]
+label = Elastic material +x
+id = 1
+db.iohandler.filename = mat_elastic.spatialdb
+quadrature = pylith.feassemble.quadrature.Quadrature3D
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 3
+quadrature.cell.quad_order = 2
+
+[pylithapp.timedependent.materials.elastic_neg]
+label = Elastic material -x
+id = 2
+db.iohandler.filename = mat_elastic.spatialdb
+quadrature = pylith.feassemble.quadrature.Quadrature3D
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 3
+quadrature.cell.quad_order = 2
+
+[pylithapp.timedependent.materials.viscoelastic_pos]
+label = Viscoelastic material +x
+id = 3
+db.iohandler.filename = mat_elastic.spatialdb
+quadrature = pylith.feassemble.quadrature.Quadrature3D
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 3
+quadrature.cell.quad_order = 2
+
+[pylithapp.timedependent.materials.viscoelastic_neg]
+label = Viscoelastic material -x
+id = 4
+db.iohandler.filename = mat_elastic.spatialdb
+quadrature = pylith.feassemble.quadrature.Quadrature3D
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 3
+quadrature.cell.quad_order = 2
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.bc.x_pos]
+fixed_dof = [0, 1, 2]
+label = 11
+db.label = Dirichlet BC on +x
+db.iohandler.filename = fixeddisp_shear.spatialdb
+
+[pylithapp.timedependent.bc.x_neg]
+fixed_dof = [0, 1, 2]
+label = 12
+db.label = Dirichlet BC on -x
+db.iohandler.filename = fixeddisp_shear.spatialdb
+
+# ----------------------------------------------------------------------
+# faults
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.interfaces]
+#fault = pylith.faults.FaultCohesiveKin
+
+[pylithapp.timedependent.interfaces.fault]
+label = 10
+quadrature = pylith.feassemble.quadrature.Quadrature2Din3D
+quadrature.cell = pylith.feassemble.FIATLagrange
+quadrature.cell.dimension = 2
+quadrature.cell.quad_order = 2
+mat_db.iohandler.filename = mat_elastic.spatialdb
+
+[pylithapp.timedependent.interfaces.fault.eq_src.slip_function]
+slip.iohandler.filename = finalslip.spatialdb
+slip_rate.iohandler.filename = sliprate.spatialdb
+slip_time.iohandler.filename = sliptime.spatialdb
+
+
+# ----------------------------------------------------------------------
+# PETSc
+# ----------------------------------------------------------------------
+[pylithapp.petsc]
+pc_type = jacobi
+ksp_monitor = true
+ksp_view = true
+log_summary = true
+ksp_max_it = 500
+ksp_gmres_restart = 5000
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+[pylithapp.problem.formulation.output.output]
+filename = dislocation_hex8_1000m.vtk
Added: short/3D/PyLith/trunk/examples/3d/hex8/finalslip.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/finalslip.spatialdb 2007-06-21 23:31:57 UTC (rev 7366)
+++ short/3D/PyLith/trunk/examples/3d/hex8/finalslip.spatialdb 2007-06-22 01:02:53 UTC (rev 7367)
@@ -0,0 +1,16 @@
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 3
+ value-names = left-lateral-slip reverse-slip fault-opening
+ value-units = m m m
+ num-locs = 3
+ data-dim = 1
+ space-dim = 3
+ cs-data = cartesian {
+ to-meters = 1.0e+3
+ space-dim = 3
+ } // cs-data
+} // SimpleDB
+0.0 0.0 0.0 -2.00 0.25 0.00
+0.0 0.0 -2.0 -2.00 0.00 0.00
+0.0 0.0 -4.0 0.00 0.00 0.00
Added: short/3D/PyLith/trunk/examples/3d/hex8/fixeddisp_shear.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/fixeddisp_shear.spatialdb 2007-06-21 23:31:57 UTC (rev 7366)
+++ short/3D/PyLith/trunk/examples/3d/hex8/fixeddisp_shear.spatialdb 2007-06-22 01:02:53 UTC (rev 7367)
@@ -0,0 +1,15 @@
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 3
+ value-names = dof-0 dof-1 dof-2
+ value-units = m m m
+ num-locs = 2
+ data-dim = 1
+ space-dim = 3
+ cs-data = cartesian {
+ to-meters = 1.0e+3
+ space-dim = 3
+ }
+}
+-3.0 0.0 0.0 0.0 -1.0 0.0
++3.0 0.0 0.0 0.0 +1.0 0.0
Added: short/3D/PyLith/trunk/examples/3d/hex8/fixeddisp_zero.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/fixeddisp_zero.spatialdb 2007-06-21 23:31:57 UTC (rev 7366)
+++ short/3D/PyLith/trunk/examples/3d/hex8/fixeddisp_zero.spatialdb 2007-06-22 01:02:53 UTC (rev 7367)
@@ -0,0 +1,14 @@
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 3
+ value-names = dof-0 dof-1 dof-2
+ value-units = m m m
+ num-locs = 1
+ data-dim = 0
+ space-dim = 3
+ cs-data = cartesian {
+ to-meters = 1.0
+ space-dim = 3
+ }
+}
+0.0 0.0 0.0 0.0 0.0 0.0
Added: short/3D/PyLith/trunk/examples/3d/hex8/fourmaterials.odb
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/fourmaterials.odb 2007-06-21 23:31:57 UTC (rev 7366)
+++ short/3D/PyLith/trunk/examples/3d/hex8/fourmaterials.odb 2007-06-22 01:02:53 UTC (rev 7367)
@@ -0,0 +1,90 @@
+#!/usr/bin/env python
+#
+# ----------------------------------------------------------------------
+#
+# Brad T. Aagaard
+# U.S. Geological Survey
+#
+# <LicenseText>
+#
+# ----------------------------------------------------------------------
+#
+
+## Container of four materials.
+
+# Parent class
+from pylith.utils.ObjectBin import ObjectBin
+
+class MyMatBin(ObjectBin):
+ """
+ User-defined materials container.
+
+ Factory: object_bin
+ """
+
+ # INVENTORY //////////////////////////////////////////////////////////
+
+ class Inventory(ObjectBin.Inventory):
+ """
+ Python object for managing MyBC facilities and properties.
+ """
+
+ import pyre.inventory
+
+ from pylith.materials.ElasticIsotropic3D import ElasticIsotropic3D
+ from pylith.materials.MaxwellIsotropic3D import MaxwellIsotropic3D
+
+ elasticNeg = pyre.inventory.facility("elastic_neg", family="material",
+ factory=ElasticIsotropic3D)
+ elasticNeg.meta['tip'] = "Elastic material on -x side of the fault."
+
+ elasticPos = pyre.inventory.facility("elastic_pos", family="material",
+ factory=ElasticIsotropic3D)
+ elasticPos.meta['tip'] = "Elastic material on +x side of the fault."
+
+ viscoelasticNeg = pyre.inventory.facility("viscoelastic_neg",
+ family="material",
+ factory=MaxwellIsotropic3D)
+ viscoelasticNeg.meta['tip'] = "Viscoelastic material on -x side of the fault."
+
+ viscoelasticPos = pyre.inventory.facility("viscoelastic_pos",
+ family="material",
+ factory=MaxwellIsotropic3D)
+ viscoelasticPos.meta['tip'] = "Viscoelastic material on +x side of the fault."
+
+
+ # PUBLIC METHODS /////////////////////////////////////////////////////
+
+ def __init__(self, name="mymatbin"):
+ """
+ Constructor.
+ """
+ ObjectBin.__init__(self, name)
+ return
+
+
+ # PRIVATE METHODS ////////////////////////////////////////////////////
+
+ def _configure(self):
+ """
+ Set attributes from inventory.
+ """
+ ObjectBin._configure(self)
+
+ self.bin = [self.inventory.elasticNeg,
+ self.inventory.elasticPos,
+ self.inventory.viscoelasticNeg,
+ self.inventory.viscoelasticPos]
+ return
+
+
+# FACTORIES ////////////////////////////////////////////////////////////
+
+def object_bin():
+ """
+ Factory associated with MyMatBin.
+ """
+ return MyMatBin()
+
+
+# End of file
Added: short/3D/PyLith/trunk/examples/3d/hex8/geometry.jou
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/geometry.jou 2007-06-21 23:31:57 UTC (rev 7366)
+++ short/3D/PyLith/trunk/examples/3d/hex8/geometry.jou 2007-06-22 01:02:53 UTC (rev 7367)
@@ -0,0 +1,47 @@
+## /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 block
+# ----------------------------------------------------------------------
+
+# Block is 6 km x 6 km x 4 km
+# -3 km <= x <= 3 km
+# -3 km <= y <= 3 km
+# -4 km <= z <= 0 km
+reset
+brick x 6000 y 6000 z 4000
+
+# Translate block so the top is at z=0
+volume 1 move x 0 y 0 z -2000
+
+# ----------------------------------------------------------------------
+# Create interface surfaces
+# ----------------------------------------------------------------------
+create planar surface with plane xplane offset 0
+surface 7 name "fault_surface"
+create planar surface with plane zplane offset -2000
+surface 8 name "material_interface"
+
+# ----------------------------------------------------------------------
+# Divide volumes using interface surfaces
+# ----------------------------------------------------------------------
+webcut volume 1 with plane surface fault_surface
+webcut volume 1 with plane surface material_interface
+webcut volume 4 with plane surface material_interface
+volume 1 name "elastic_xpos"
+volume 4 name "elastic_xneg"
+volume 5 name "visco_xpos"
+volume 6 name "visco_xneg"
+
+# ----------------------------------------------------------------------
+# Imprint all volumes, merging surfaces
+# ----------------------------------------------------------------------
+imprint volume all with volume all
+merge volume all
Added: short/3D/PyLith/trunk/examples/3d/hex8/mat_elastic.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/mat_elastic.spatialdb 2007-06-21 23:31:57 UTC (rev 7366)
+++ short/3D/PyLith/trunk/examples/3d/hex8/mat_elastic.spatialdb 2007-06-22 01:02:53 UTC (rev 7367)
@@ -0,0 +1,14 @@
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 3
+ value-names = density vs vp
+ value-units = kg/m^3 m/s m/s
+ num-locs = 1
+ data-dim = 0
+ space-dim = 3
+ cs-data = cartesian {
+ to-meters = 1.0
+ space-dim = 3
+ }
+}
+0.0 0.0 0.0 2500.0 3000.0 5291.502622129181
Added: short/3D/PyLith/trunk/examples/3d/hex8/mesh_hex8_1000m.cub
===================================================================
(Binary files differ)
Property changes on: short/3D/PyLith/trunk/examples/3d/hex8/mesh_hex8_1000m.cub
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: short/3D/PyLith/trunk/examples/3d/hex8/mesh_hex8_1000m.jou
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/mesh_hex8_1000m.jou 2007-06-21 23:31:57 UTC (rev 7366)
+++ short/3D/PyLith/trunk/examples/3d/hex8/mesh_hex8_1000m.jou 2007-06-22 01:02:53 UTC (rev 7367)
@@ -0,0 +1,76 @@
+## /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
+# ----------------------------------------------------------------------
+volume all size 1000
+
+# ----------------------------------------------------------------------
+# Generate the mesh
+# ----------------------------------------------------------------------
+mesh volume all
+
+# ----------------------------------------------------------------------
+# Create blocks for materials
+# ----------------------------------------------------------------------
+block 1 volume 1
+block 1 name "elastic x_pos"
+block 2 volume 4
+block 2 name "elastic x_neg"
+block 3 volume 5
+block 3 name "viscoelastic x_pos"
+block 4 volume 6
+block 4 name "viscoelastic x_neg"
+
+# ----------------------------------------------------------------------
+# Create nodeset for fault
+# ----------------------------------------------------------------------
+nodeset 10 surface fault_surface fault_surface at A
+nodeset 10 name "fault surface"
+
+# ----------------------------------------------------------------------
+# Create nodeset for +x face
+# ----------------------------------------------------------------------
+nodeset 11 surface 20 28
+nodeset 11 name "face xpos"
+
+# ----------------------------------------------------------------------
+# Create nodeset for -x face
+# ----------------------------------------------------------------------
+nodeset 12 surface 30 38
+nodeset 12 name "face xneg"
+
+# ----------------------------------------------------------------------
+# Create nodeset for +y face
+# ----------------------------------------------------------------------
+nodeset 13 surface 21 27 33 35
+nodeset 13 name "face ypos"
+
+# ----------------------------------------------------------------------
+# Create nodeset for -y face
+# ----------------------------------------------------------------------
+nodeset 14 surface 23 25 31 37
+nodeset 14 name "face yneg"
+
+# ----------------------------------------------------------------------
+# Create nodeset for -z face
+# ----------------------------------------------------------------------
+nodeset 15 surface 12 16
+nodeset 15 name "face -z"
+
+# ----------------------------------------------------------------------
+# Export exodus file
+# ----------------------------------------------------------------------
+export mesh "box_hex8_1000m.exo" dimension 3 overwrite
Added: short/3D/PyLith/trunk/examples/3d/hex8/sliprate.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/sliprate.spatialdb 2007-06-21 23:31:57 UTC (rev 7366)
+++ short/3D/PyLith/trunk/examples/3d/hex8/sliprate.spatialdb 2007-06-22 01:02:53 UTC (rev 7367)
@@ -0,0 +1,14 @@
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 1
+ value-names = slip-rate
+ value-units = m/s
+ num-locs = 1
+ data-dim = 0
+ space-dim = 3
+ cs-data = cartesian {
+ to-meters = 1.0
+ space-dim = 3
+ }
+}
+0.0 0.0 0.0 1.0e+6
Added: short/3D/PyLith/trunk/examples/3d/hex8/sliptime.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/sliptime.spatialdb 2007-06-21 23:31:57 UTC (rev 7366)
+++ short/3D/PyLith/trunk/examples/3d/hex8/sliptime.spatialdb 2007-06-22 01:02:53 UTC (rev 7367)
@@ -0,0 +1,14 @@
+#SPATIAL.ascii 1
+SimpleDB {
+ num-values = 1
+ value-names = slip-time
+ value-units = s
+ num-locs = 1
+ data-dim = 0
+ space-dim = 3
+ cs-data = cartesian {
+ to-meters = 1.0
+ space-dim = 3
+ }
+}
+0.0 0.0 0.0 -1.0
Modified: short/3D/PyLith/trunk/libsrc/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/libsrc/Makefile.am 2007-06-21 23:31:57 UTC (rev 7366)
+++ short/3D/PyLith/trunk/libsrc/Makefile.am 2007-06-22 01:02:53 UTC (rev 7367)
@@ -80,7 +80,6 @@
meshio/SolutionIOVTK.cc \
topology/FieldsManager.cc
-#libpylith_la_LDFLAGS = $(PYTHON_LA_LDFLAGS)
libpylith_la_LDFLAGS = -no-undefined $(PYTHON_LA_LDFLAGS)
libpylith_la_LIBADD = \
-lspatialdata \
Modified: short/3D/PyLith/trunk/unittests/libtests/bc/data/line2.mesh
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/bc/data/line2.mesh 2007-06-21 23:31:57 UTC (rev 7366)
+++ short/3D/PyLith/trunk/unittests/libtests/bc/data/line2.mesh 2007-06-22 01:02:53 UTC (rev 7367)
@@ -1,55 +1,33 @@
-// This is a comment
-mesh = { // more commetns
-// another
- dimension = 1 // here
+mesh = {
+ dimension = 1
use-index-zero = true
-// there
-
vertices = {
-// yes
dimension = 1
count = 3
- // no
coordinates = {
0 -1.0
- // maybe
1 0.0
- 2 1.0 // yes
- // nod
- } // do
- } // au
- // di
-// df
+ 2 1.0
+ }
+ }
cells = {
- // jdf
-// dsf
count = 2
num-corners = 2
- simplices = { // sdf
- // sdf
+ simplices = {
0 0 1
- // sdf
1 1 2
-// dfj
}
material-ids = {
- 0 0 // sdfjdsf
- // sdfdskf
+ 0 0
1 0
}
}
-// sdfsd
group = {
name = bc0
-// sdfs
- type = vertices // sdfjsf
- count = 2 // sfsdfk
-// sdfjsdf
-// sdjflsdjf
+ type = vertices
+ count = 2
indices = {
0 2
}
-// sjflskdf
}
-// sjdfs
}
More information about the cig-commits
mailing list