[cig-commits] r16599 - in short/3D/PyLith/trunk/playpen: . reordering

brad at geodynamics.org brad at geodynamics.org
Wed Apr 28 21:04:17 PDT 2010


Author: brad
Date: 2010-04-28 21:04:17 -0700 (Wed, 28 Apr 2010)
New Revision: 16599

Added:
   short/3D/PyLith/trunk/playpen/reordering/
   short/3D/PyLith/trunk/playpen/reordering/matprops.spatialdb
   short/3D/PyLith/trunk/playpen/reordering/pylithapp.cfg
   short/3D/PyLith/trunk/playpen/reordering/tri3.mesh
Log:
Added mesh reordering test case.

Added: short/3D/PyLith/trunk/playpen/reordering/matprops.spatialdb
===================================================================
--- short/3D/PyLith/trunk/playpen/reordering/matprops.spatialdb	                        (rev 0)
+++ short/3D/PyLith/trunk/playpen/reordering/matprops.spatialdb	2010-04-29 04:04:17 UTC (rev 16599)
@@ -0,0 +1,46 @@
+#SPATIAL.ascii 1
+
+// This database is used to specify the material properties for all of the
+// examples in this directory.
+
+// This follows the format for a Simple DB (the only type presently available).
+SimpleDB {
+
+  // There are 3 values specified in the database, corresponding to density,
+  // S-velocity, and P-velocity (values for shear modulus and Lame's constant
+  // are computed from these values.
+  num-values = 3
+  value-names =  density vs vp
+
+  // These are the units used to specify density, vs, and vp.
+  value-units =  kg/m**3  m/s  m/s
+
+  // Values are only specified at a single point since they are constant
+  // throughout the mesh.
+  num-locs = 1
+
+  // The dimension of the spatial distribution is 0, since it is constant
+  // throughout the mesh.
+  data-dim = 0
+
+  // The spatial dimension of the database is 2.
+  space-dim = 2
+
+  // We are specifying the data in a Cartesian coordinate system.
+  cs-data = cartesian {
+
+    // Our units are already in meters, so we can just multiply by one.
+    to-meters = 1.0
+
+    // We are using a 2D Cartesian coordinate system.
+    space-dim = 2
+  }
+}
+// This is where the data is specified.
+// We only need to specify a single point, since the properties are uniform.
+// The values given here will give a shear modulus and Lame's constant both
+// equal to 30 GPa (Poisson's ratio = 0.25).
+// The entries are:
+// X-coord, Y-coord, density, Vs, Vp.
+
+0.0  0.0   2700.0  3333.333333333333  5773.502691896258

Added: short/3D/PyLith/trunk/playpen/reordering/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/playpen/reordering/pylithapp.cfg	                        (rev 0)
+++ short/3D/PyLith/trunk/playpen/reordering/pylithapp.cfg	2010-04-29 04:04:17 UTC (rev 16599)
@@ -0,0 +1,92 @@
+# -*- Python -*-
+
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# journal
+# ----------------------------------------------------------------------
+[pylithapp.journal.info]
+timedependent = 1
+implicit = 1
+petsc = 1
+solverlinear = 1
+meshioascii = 1
+elasticityimplicit = 1
+fiatsimplex = 1
+
+# ----------------------------------------------------------------------
+# mesh_generator
+# ----------------------------------------------------------------------
+[pylithapp.mesh_generator.reader]
+filename = tri3.mesh
+coordsys.space_dim = 2
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+[pylithapp.timedependent]
+dimension = 2
+normalizer.length_scale = 1.0*m
+
+bc = [negative,positive]
+
+[pylithapp.timedependent.formulation.time_step]
+total_time = 0.0*s
+dt = 1.0*s
+
+# ----------------------------------------------------------------------
+# materials
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.materials]
+material = pylith.materials.ElasticPlaneStrain
+
+[pylithapp.timedependent.materials.material]
+
+label = elastic material
+id = 1
+db_properties.iohandler.filename = matprops.spatialdb
+quadrature.cell.shape = triangle
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+[pylithapp.timedependent.bc.negative]
+
+bc_dof = [0, 1]
+label = edge negative
+db_initial.label = Dirichlet BC (negative edge)
+
+[pylithapp.timedependent.bc.positive]
+
+bc_dof = [0, 1]
+label = edge positive
+db_initial.label = Dirichlet BC (positive edge)
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+[pylithapp.problem.formulation.output.output.writer]
+filename = test.vtk
+
+[pylithapp.timedependent.materials.material.output.writer]
+filename = test-statevars.vtk
+
+# ----------------------------------------------------------------------
+# PETSc
+# ----------------------------------------------------------------------
+[pylithapp.petsc]
+pc_type = asm
+
+sub_pc_factor_shift_type = nonzero
+
+ksp_rtol = 1.0e-8
+ksp_atol = 1.0e-15
+ksp_max_it = 50
+ksp_gmres_restart = 50
+
+ksp_monitor = true
+ksp_view = true
+ksp_converged_reason = true
+
+# log_summary = true
+# start_in_debugger = true

Added: short/3D/PyLith/trunk/playpen/reordering/tri3.mesh
===================================================================
--- short/3D/PyLith/trunk/playpen/reordering/tri3.mesh	                        (rev 0)
+++ short/3D/PyLith/trunk/playpen/reordering/tri3.mesh	2010-04-29 04:04:17 UTC (rev 16599)
@@ -0,0 +1,79 @@
+mesh = {
+  dimension = 2
+  vertices = {
+    dimension = 2
+    count = 10
+    coordinates = {
+      0  -1.0  -1.0
+      1  +1.0  +1.0
+      2  -2.0  +1.0
+      3  +1.0  -1.0
+      4  -1.0  +1.0
+      5   0.0  -1.0
+      6  -2.0   0.0
+      7   0.0  +1.0
+      8  -1.0   0.0
+      9   0.0   0.0
+    }
+  }
+  
+  cells = {
+    num-corners = 3
+    count = 9
+    simplices = {
+      0   9  3  1
+      1   2  6  4
+      2   0  9  8
+      3   4  9  7
+      4   5  3  9
+      5   6  8  4
+      6   9  1  7
+      7   0  5  9
+      8   8  9  4
+    }
+
+    material-ids = {
+      0   1
+      1   1
+      2   1
+      3   1
+      4   1
+      5   1
+      6   1
+      7   1
+      8   1
+    }
+  }
+
+  group = {
+    type = vertices
+    name = fault
+    count = 3
+    indices = {
+      0
+      9
+      7
+    }
+  }
+
+  group = {
+    type = vertices
+    name = edge positive
+    count = 2
+    indices = {
+      1
+      3
+    }
+  }
+
+  group = {
+    type = vertices
+    name = edge negative
+    count = 2
+    indices = {
+      2
+      6
+    }
+  }
+
+}



More information about the CIG-COMMITS mailing list