[cig-commits] r7348 - short/3D/PyLith/trunk/examples/twocells/twotri3

willic3 at geodynamics.org willic3 at geodynamics.org
Thu Jun 21 13:21:23 PDT 2007


Author: willic3
Date: 2007-06-21 13:21:22 -0700 (Thu, 21 Jun 2007)
New Revision: 7348

Modified:
   short/3D/PyLith/trunk/examples/twocells/twotri3/implicit.cfg
   short/3D/PyLith/trunk/examples/twocells/twotri3/matprops.spatialdb
   short/3D/PyLith/trunk/examples/twocells/twotri3/pylithapp.cfg
   short/3D/PyLith/trunk/examples/twocells/twotri3/twotri3.mesh
Log:
Partially-finished example problems with comments in the files.



Modified: short/3D/PyLith/trunk/examples/twocells/twotri3/implicit.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twotri3/implicit.cfg	2007-06-21 19:10:11 UTC (rev 7347)
+++ short/3D/PyLith/trunk/examples/twocells/twotri3/implicit.cfg	2007-06-21 20:21:22 UTC (rev 7348)
@@ -1,19 +1,49 @@
 # -*- Python -*-
+
+# The settings in this file (implicit.cfg) will be read if it is
+# specified on the command line:
+# 'pylith implicit.cfg'
+
+# If this file is given, the settings in this file will override all
+# others except for parameters specified directly on the command line.
+
+# These setting define an implicit problem with Dirichlet (displacement)
+# boundary conditions.
+
 [pylithapp]
 
 # ----------------------------------------------------------------------
 # problem
+# Specify the problem settings.
+# This is a time-dependent problem so we use that facility.
 # ----------------------------------------------------------------------
 [pylithapp.timedependent]
+
+# We want an implicit formulation.
 formulation = pylith.problems.Implicit
+
+# This is a container for a boundary condition specified at a point.
 bc = pylith.bc.BCSingle
 
 # ----------------------------------------------------------------------
 # boundary conditions
+# Provide information on the boundary conditions.
 # ----------------------------------------------------------------------
 [pylithapp.timedependent.bc.bc]
+
+# We are fixing the 0 (x) and 1 (y) degrees of freedom.
 fixed_dof = [0, 1]
+
+# Give an ID of 10 to this boundary condition.
 id = 10
+
+# The nodes associated with this boundary condition have the name
+# 'end points' in the mesh file.
 label = end points
+
+# We are assigning the label 'Dirichlet BC' to the database.
 db.label = Dirichlet BC
+
+# The name of the file containing the spatial database for the BC
+# specification.
 db.iohandler.filename = dispbc.spatialdb

Modified: short/3D/PyLith/trunk/examples/twocells/twotri3/matprops.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twotri3/matprops.spatialdb	2007-06-21 19:10:11 UTC (rev 7347)
+++ short/3D/PyLith/trunk/examples/twocells/twotri3/matprops.spatialdb	2007-06-21 20:21:22 UTC (rev 7348)
@@ -11,4 +11,4 @@
     space-dim = 2
   }
 }
-0.0  0.0   2500.0  3000.0  6705.0
+0.0  0.0   2700.0  3333.333333333333  5773.502691896258

Modified: short/3D/PyLith/trunk/examples/twocells/twotri3/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twotri3/pylithapp.cfg	2007-06-21 19:10:11 UTC (rev 7347)
+++ short/3D/PyLith/trunk/examples/twocells/twotri3/pylithapp.cfg	2007-06-21 20:21:22 UTC (rev 7348)
@@ -1,8 +1,21 @@
 # -*- Python -*-
+
+# The settings in this file (pylithapp.cfg) will be read automatically
+# by pylith, as long as the file is placed in the run directory.
+
+# The settings in this file will override any settings in:
+# PREFIX/etc/pylithapp.cfg
+# $HOME/.pyre/pylithapp/pylithapp.cfg
+
+# The settings in this file will be overridden by any .cfg file given
+# on the command line or by any command line settings.
+
 [pylithapp]
 
 # ----------------------------------------------------------------------
 # journal
+# The settings below turn on journal info for the specified components.
+# If you want less output to stdout, you can turn these off.
 # ----------------------------------------------------------------------
 [pylithapp.journal.info]
 timedependent = 1
@@ -12,43 +25,73 @@
 solverlinear = 1
 meshioascii = 1
 homogeneous = 1
-explicitelasticity = 1
+implicitelasticity = 1
 quadrature2d = 1
 fiatsimplex = 1
 
 # ----------------------------------------------------------------------
 # mesh_generator
+# The settings below control the mesh generation (importing mesh info).
 # ----------------------------------------------------------------------
+# Turn on debugging output for mesh generation.
 [pylithapp.mesh_generator]
 debug = 1
 
+# This component specification means we are using PyLith ASCII format,
+# and we then specify the filename and number of space dimensions for
+# the mesh.
 [pylithapp.mesh_generator.importer]
 filename = twotri3.mesh
 coordsys.space_dim = 2
 
 # ----------------------------------------------------------------------
 # problem
+# Specify the problem settings.
+# This is a time-dependent problem, so we select this as our problem type.
+# We select a total time of 1 sec, and a time step size of 1 sec, so we
+# are performing a single time step.
+# The spatial dimension for this problem is 2.
+# For an implicit formulation (using implicit.cfg), we will perform 1
+# implicit time step from t = -1.0 to t = 0.0 (elastic solution step).
 # ----------------------------------------------------------------------
 [pylithapp.timedependent]
-total_time = 2.0*s
+total_time = 0.0*s
 default_dt = 1.0*s
 dimension = 2
 
 # ----------------------------------------------------------------------
 # materials
+# Specify the material information for the problem.
 # ----------------------------------------------------------------------
+# The material type is isotropic elastic formulated for plane strain.
 [pylithapp.timedependent.materials]
 material = pylith.materials.ElasticPlaneStrain
 
 [pylithapp.timedependent.materials.material]
+
+# We give a label of 'elastic material' to this material.
 label = elastic material
+
+# The cells associated with this material are given a material ID of 1
+# in the mesh file.
 id = 1
+
+# The properties for this material are given in the spatial database file
+# 'matprops.spatialdb'.
 db.iohandler.filename = matprops.spatialdb
+
+# We are doing 2D quadrature for a triangle.
 quadrature = pylith.feassemble.quadrature.Quadrature2D
 quadrature.cell.shape = triangle
 
 # ----------------------------------------------------------------------
 # PETSc
+# We are using all of the default settings for PETSc except for specifying
+# the Jacobi preconditioner.
+# Additional PETSc command-line arguments may be found in the PETSc
+# documentation.
 # ----------------------------------------------------------------------
 [pylithapp.petsc]
 pc_type = jacobi
+# start_in_debugger = true
+# debugger_timeout = 100

Modified: short/3D/PyLith/trunk/examples/twocells/twotri3/twotri3.mesh
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twotri3/twotri3.mesh	2007-06-21 19:10:11 UTC (rev 7347)
+++ short/3D/PyLith/trunk/examples/twocells/twotri3/twotri3.mesh	2007-06-21 20:21:22 UTC (rev 7348)
@@ -1,8 +1,19 @@
+// Global mesh object.
 mesh = {
+
+  // This is a two-dimensional mesh.
   dimension = 2
+
+  // Describe the vertices (nodes) defining the mesh.
   vertices = {
+
+    // The vertices are defined in a 2D coordinate system.
     dimension = 2
+
+    // There are 4 vertices.
     count = 4
+
+    // List node number (starting from 0), x-coord, and y-coord.
     coordinates = {
       0  -1.0   0.0
       1   0.0   1.0
@@ -10,30 +21,49 @@
       3   1.0   0.0
     }
   }
+  
+  // Describe the cells (elements) composing the mesh.
   cells = {
+
+    // These are linear triangular cells, so there are 3 corners per cell.
     num-corners = 3
+
+    // There are 2 cells
     count = 2
+
+    // List cell number, and then vertices moving counter-clockwise around the cell.
     simplices = {
       0   0  2  1
       1   1  2  3
     }
+
+    // List the material ID's associated with each cell (both have an ID of 1).
     material-ids = {
       0   1
       1   1
     }
   }
+
+
+  // This group of vertices may be used to define a fault.
   group = {
     type = vertices
     name = fault
+
+    // There are 2 vertices corresponding to indices 1 and 2.
     count = 2
     indices = {
       1
       2
     }
   }
+
+  // This group of vertices may be used to specify boundary conditions.
   group = {
     type = vertices
     name = end points
+
+    // There are 2 vertices corresponding to indices 0 and 3.
     count = 2
     indices = {
       0



More information about the cig-commits mailing list