[cig-commits] r15810 - in short/3D/PyLith/trunk/tests/2d: . maxwell
willic3 at geodynamics.org
willic3 at geodynamics.org
Wed Oct 14 15:47:37 PDT 2009
Author: willic3
Date: 2009-10-14 15:47:37 -0700 (Wed, 14 Oct 2009)
New Revision: 15810
Added:
short/3D/PyLith/trunk/tests/2d/maxwell/
short/3D/PyLith/trunk/tests/2d/maxwell/README
short/3D/PyLith/trunk/tests/2d/maxwell/axialdisp2d.cfg
short/3D/PyLith/trunk/tests/2d/maxwell/axialdisp3d.cfg
short/3D/PyLith/trunk/tests/2d/maxwell/planestrain2d.cfg
short/3D/PyLith/trunk/tests/2d/maxwell/planestrain3d.cfg
short/3D/PyLith/trunk/tests/2d/maxwell/pylithapp.cfg
short/3D/PyLith/trunk/tests/2d/maxwell/sheardisp2d.cfg
short/3D/PyLith/trunk/tests/2d/maxwell/sheardisp3d.cfg
short/3D/PyLith/trunk/tests/2d/maxwell/twohex8.mesh
short/3D/PyLith/trunk/tests/2d/maxwell/twoquad4.mesh
Log:
Added test problems to allow comparison between a true plane strain
Maxwell viscoelastic model and a 3D simulated plane strain model.
Added: short/3D/PyLith/trunk/tests/2d/maxwell/README
===================================================================
--- short/3D/PyLith/trunk/tests/2d/maxwell/README (rev 0)
+++ short/3D/PyLith/trunk/tests/2d/maxwell/README 2009-10-14 22:47:37 UTC (rev 15810)
@@ -0,0 +1,18 @@
+This is a simple test of the MaxwellPlaneStrain viscoelastic model. The
+results may be compared against the results from a 3D model with the
+z-displacements constrained to zero. There are four models:
+
+Plane strain axial displacement problem:
+pylith planestrain2d.cfg axialdisp2d.cfg
+
+Plane strain shear displacement problem:
+pylith planestrain2d.cfg sheardisp2d.cfg
+
+3D simulated plane strain axial displacement problem:
+pylith planestrain3d.cfg axialdisp3d.cfg
+
+3D simulated plane strain shear displacement problem:
+pylith planestrain3d.cfg sheardisp3d.cfg
+
+The 2D and 3D problems should yield the same displacements, strains,
+stresses, and viscous strains when the appropriate components are compared.
Added: short/3D/PyLith/trunk/tests/2d/maxwell/axialdisp2d.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/maxwell/axialdisp2d.cfg (rev 0)
+++ short/3D/PyLith/trunk/tests/2d/maxwell/axialdisp2d.cfg 2009-10-14 22:47:37 UTC (rev 15810)
@@ -0,0 +1,104 @@
+# -*- Python -*-
+
+# To run this problem, type "pylith planestrain2d.cfg axialdisp2d.cfg".
+# The settings in pylithapp.cfg will be read by default. See the README for
+# how to run other problems in this directory.
+#
+#
+# <- ----------------------- ->
+# | |
+# <- | | ->
+# | |
+# <- | | ->
+# | |
+# <- ----------------------- ->
+# ^ ^ ^
+#
+# Axial tension is applied by pulling on the left and right boundaries
+# in the horizontal direction.
+# Bottom boundary is pinned in the vertical direction.
+
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+# Specify the problem settings.
+[pylithapp.timedependent]
+# Set bc to an array with 3 boundary conditions: 'x_neg', 'x_pos', 'y_neg'.
+bc = [x_neg,x_pos,y_neg]
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+
+# BC for the left (-x) side of the domain.
+[pylithapp.timedependent.bc.x_neg]
+
+# Fix the 0 (x) degree of freedom.
+bc_dof = [0]
+
+# The group of vertices in the mesh file associated with this boundary
+# condition have the name 'x_neg'.
+label = x_neg
+
+# Change the spatial database for the Dirichlet BC initial values from
+# ZeroDispDB (which has a uniform zero spatial distribution) to UniformDB.
+db_initial = spatialdata.spatialdb.UniformDB
+
+# Assign the label 'Dirichlet BC -x edge' to the database.
+db_initial.label = Dirichlet BC -x edge
+
+# Assign the displacement BC values
+db_initial.values = [displacement-x]
+db_initial.data = [-1.0*cm]
+
+# Boundary conditions to be applied to the positive x-side of the mesh.
+[pylithapp.timedependent.bc.x_pos]
+
+# Fix the 0 (x) degree of freedom.
+bc_dof = [0]
+
+# The group of vertices in the mesh file associated with this boundary
+# condition have the name 'x_pos'.
+label = x_pos
+
+# Change the spatial database for the Dirichlet BC initial values from
+# ZeroDispDB (which has a uniform spatial distribution) to UniformDB
+db_initial = spatialdata.spatialdb.UniformDB
+
+# Assign the label 'Dirichlet BC +x edge' to the database.
+db_initial.label = Dirichlet BC +x edge
+
+# Assign the displacement BC values
+db_initial.values = [displacement-x]
+db_initial.data = [1.0*cm]
+
+# Boundary conditions to be applied to the bottom boundary of the mesh.
+[pylithapp.timedependent.bc.y_neg]
+
+# We are fixing the 1 (y) degree of freedom.
+bc_dof = [1]
+
+# The group of vertices in the mesh file associated with this boundary
+# condition have the name 'y_neg'.
+label = y_neg
+
+# Assign the label 'Dirichlet BC -y corners' to the database.
+db_initial.label = Dirichlet BC -y edge
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+# Give basename for VTK output of solution over domain.
+[pylithapp.problem.formulation.output.output.writer]
+filename = axialdisp2d.vtk
+time_format = %04.0f
+time_constant = 1.0*year
+
+# Give basename for VTK output of state variables.
+[pylithapp.timedependent.materials.material.output]
+cell_filter = pylith.meshio.CellFilterAvgMesh
+writer.filename = axialdisp2d-statevars.vtk
+writer.time_format = %04.0f
+writer.time_constant = 1.0*year
Added: short/3D/PyLith/trunk/tests/2d/maxwell/axialdisp3d.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/maxwell/axialdisp3d.cfg (rev 0)
+++ short/3D/PyLith/trunk/tests/2d/maxwell/axialdisp3d.cfg 2009-10-14 22:47:37 UTC (rev 15810)
@@ -0,0 +1,133 @@
+# -*- Python -*-
+
+# To run this problem, type "pylith planestrain.cfg axialdisp3d.cfg".
+# The settings in pylithapp.cfg will be read by default. See the README for
+# how to run other problems in this directory.
+#
+#
+# <- ----------------------- ->
+# | |
+# <- | | ->
+# | |
+# <- | | ->
+# | |
+# <- ----------------------- ->
+# ^ ^ ^
+#
+# Axial tension is applied by pulling on the left and right boundaries
+# in the horizontal direction.
+# Bottom boundary is pinned in the vertical direction.
+# In this problem, we are simulating plane strain, so all z-displacements
+# are fixed.
+
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+# Specify the problem settings.
+[pylithapp.timedependent]
+# Set bc to an array with 5 boundary conditions: 'x_neg', 'x_pos', 'y_neg',
+# 'z_neg', 'z_pos'.
+bc = [x_neg,x_pos,y_neg,z_neg,z_pos]
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+
+# BC for the left (-x) side of the domain.
+[pylithapp.timedependent.bc.x_neg]
+
+# Fix the 0 (x) degree of freedom.
+bc_dof = [0]
+
+# The group of vertices in the mesh file associated with this boundary
+# condition have the name 'x_neg'.
+label = x_neg
+
+# Change the spatial database for the Dirichlet BC initial values from
+# ZeroDispDB (which has a uniform zero spatial distribution) to UniformDB.
+db_initial = spatialdata.spatialdb.UniformDB
+
+# Assign the label 'Dirichlet BC -x edge' to the database.
+db_initial.label = Dirichlet BC -x edge
+
+# Assign the displacement BC values
+db_initial.values = [displacement-x]
+db_initial.data = [-1.0*cm]
+
+# Boundary conditions to be applied to the positive x-side of the mesh.
+[pylithapp.timedependent.bc.x_pos]
+
+# Fix the 0 (x) degree of freedom.
+bc_dof = [0]
+
+# The group of vertices in the mesh file associated with this boundary
+# condition have the name 'x_pos'.
+label = x_pos
+
+# Change the spatial database for the Dirichlet BC initial values from
+# ZeroDispDB (which has a uniform spatial distribution) to UniformDB
+db_initial = spatialdata.spatialdb.UniformDB
+
+# Assign the label 'Dirichlet BC +x edge' to the database.
+db_initial.label = Dirichlet BC +x edge
+
+# Assign the displacement BC values
+db_initial.values = [displacement-x]
+db_initial.data = [1.0*cm]
+
+# Boundary conditions to be applied to the bottom boundary of the mesh.
+[pylithapp.timedependent.bc.y_neg]
+
+# We are fixing the 1 (y) degree of freedom.
+bc_dof = [1]
+
+# The group of vertices in the mesh file associated with this boundary
+# condition have the name 'y_neg'.
+label = y_neg
+
+# Assign the label 'Dirichlet BC -y corners' to the database.
+db_initial.label = Dirichlet BC -y edge
+
+# Boundary conditions to be applied to the front of the mesh.
+[pylithapp.timedependent.bc.z_pos]
+
+# We are fixing the 2 (z) degree of freedom.
+bc_dof = [2]
+
+# The group of vertices in the mesh file associated with this boundary
+# condition have the name 'z_pos'.
+label = z_pos
+
+# Assign the label 'Dirichlet BC +z corners' to the database.
+db_initial.label = Dirichlet BC +z edge
+
+# Boundary conditions to be applied to the back of the mesh.
+[pylithapp.timedependent.bc.z_neg]
+
+# We are fixing the 2 (z) degree of freedom.
+bc_dof = [2]
+
+# The group of vertices in the mesh file associated with this boundary
+# condition have the name 'z_neg'.
+label = z_neg
+
+# Assign the label 'Dirichlet BC -z corners' to the database.
+db_initial.label = Dirichlet BC -z edge
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+# Give basename for VTK output of solution over domain.
+[pylithapp.problem.formulation.output.output.writer]
+filename = axialdisp3d.vtk
+time_format = %04.0f
+time_constant = 1.0*year
+
+# Give basename for VTK output of state variables.
+[pylithapp.timedependent.materials.material.output]
+cell_filter = pylith.meshio.CellFilterAvgMesh
+writer.filename = axialdisp3d-statevars.vtk
+writer.time_format = %04.0f
+writer.time_constant = 1.0*year
Added: short/3D/PyLith/trunk/tests/2d/maxwell/planestrain2d.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/maxwell/planestrain2d.cfg (rev 0)
+++ short/3D/PyLith/trunk/tests/2d/maxwell/planestrain2d.cfg 2009-10-14 22:47:37 UTC (rev 15810)
@@ -0,0 +1,34 @@
+# -*- Python -*-
+
+# The settings in this file define the setting specific to a 2D
+# (plane strain) problem.
+
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# mesh_generator
+# ----------------------------------------------------------------------
+# 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.reader]
+filename = twoquad4.mesh
+coordsys.space_dim = 2
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+# We define this as a 2D problem.
+# All other problem settings are in pylithapp.cfg.
+[pylithapp.timedependent]
+dimension = 2
+
+# ----------------------------------------------------------------------
+# materials
+# ----------------------------------------------------------------------
+# Define a single material that is MaxwellPlaneStrain.
+# Other material settings are defined in pylithapp.cfg.
+[pylithapp.timedependent.materials]
+material = pylith.materials.MaxwellPlaneStrain
+# The cell dimension for this material is 2.
+material.quadrature.cell.dimension = 2
Added: short/3D/PyLith/trunk/tests/2d/maxwell/planestrain3d.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/maxwell/planestrain3d.cfg (rev 0)
+++ short/3D/PyLith/trunk/tests/2d/maxwell/planestrain3d.cfg 2009-10-14 22:47:37 UTC (rev 15810)
@@ -0,0 +1,34 @@
+# -*- Python -*-
+
+# The settings in this file define the setting specific to a 3D
+# problem simulating plane strain.
+
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# mesh_generator
+# ----------------------------------------------------------------------
+# 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.reader]
+filename = twohex8.mesh
+coordsys.space_dim = 3
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+# We define this as a 3D problem.
+# All other problem settings are in pylithapp.cfg.
+[pylithapp.timedependent]
+dimension = 3
+
+# ----------------------------------------------------------------------
+# materials
+# ----------------------------------------------------------------------
+# Define a single material that is MaxwellIsotropic3D.
+# Other material settings are defined in pylithapp.cfg.
+[pylithapp.timedependent.materials]
+material = pylith.materials.MaxwellIsotropic3D
+# The cell dimension for this material is 3.
+material.quadrature.cell.dimension = 3
Added: short/3D/PyLith/trunk/tests/2d/maxwell/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/maxwell/pylithapp.cfg (rev 0)
+++ short/3D/PyLith/trunk/tests/2d/maxwell/pylithapp.cfg 2009-10-14 22:47:37 UTC (rev 15810)
@@ -0,0 +1,100 @@
+# -*- 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
+implicit = 1
+petsc = 1
+solverlinear = 1
+meshioascii = 1
+homogeneous = 1
+elasticityimplicit = 1
+fiatlagrange = 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
+
+# ----------------------------------------------------------------------
+# 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 year, and a time step size of 0.1 year.
+[pylithapp.timedependent]
+normalizer.length_scale = 1.0*m
+
+[pylithapp.timedependent.formulation.time_step]
+total_time = 100.0*year
+dt = 10.0*year
+
+# ----------------------------------------------------------------------
+# materials
+# ----------------------------------------------------------------------
+# Specify the material information for the problem.
+[pylithapp.timedependent.materials.material]
+
+# We give a label of 'Maxwell material' to this material.
+label = Maxwell material
+
+# The cells associated with this material are given a material ID of 0
+# in the mesh file.
+id = 0
+
+# We specify a uniform DB and give the properties in this file.
+db_properties = spatialdata.spatialdb.UniformDB
+db_properties.values = [vp,vs,density,viscosity]
+db_properties.data = [5291.502622129181*m/s,3000.0*m/s,2700.0*kg/m**3,7.10046e19*Pa*s]
+
+
+# Set cell type to FIAT Lagrange.
+quadrature.cell = pylith.feassemble.FIATLagrange
+
+# Set cell info and output fields
+output.cell_info_fields = [density,mu,lambda,maxwell_time]
+output.cell_data_fields = [total_strain,viscous_strain,stress]
+
+# ----------------------------------------------------------------------
+# PETSc
+# ----------------------------------------------------------------------
+[pylithapp.petsc]
+ksp_rtol = 1.0e-8
+pc_type = asm
+
+# Change the preconditioner settings (must turn off
+# shift_positive_definite and turn on shift_nonzero).
+sub_pc_factor_shift_positive_definite = 0
+sub_pc_factor_shift_nonzero =
+
+ksp_monitor = true
+ksp_view = true
+log_summary = true
+ksp_max_it = 100
+ksp_gmres_restart = 50
+
+# start_in_debugger = true
+
+snes_monitor = true
+snes_view = true
+ksp_converged_reason = true
+snes_converged_reason = true
Added: short/3D/PyLith/trunk/tests/2d/maxwell/sheardisp2d.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/maxwell/sheardisp2d.cfg (rev 0)
+++ short/3D/PyLith/trunk/tests/2d/maxwell/sheardisp2d.cfg 2009-10-14 22:47:37 UTC (rev 15810)
@@ -0,0 +1,80 @@
+# -*- Python -*-
+
+# To run this problem, type "pylith planestrain2d.cfg sheardisp2d.cfg".
+# The settings in pylithapp.cfg will be read by default. See the README for
+# how to run other problems in this directory.
+
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+# Specify the problem settings.
+[pylithapp.timedependent]
+
+# Set bc to an array with 2 boundary conditions: 'x_neg' and 'x_pos'.
+bc = [x_neg,x_pos]
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+# Provide information on the boundary conditions.
+
+# Boundary conditions to be applied to the negative x-side of the mesh.
+[pylithapp.timedependent.bc.x_neg]
+
+# We are fixing the 0 (x) and 1 (y) degrees of freedom.
+bc_dof = [0, 1]
+
+# The nodes associated with this boundary condition have the name
+# 'x_neg' in the mesh file.
+label = x_neg
+
+# Change spatial database for initial value from ZeroDispDB (which has
+# a uniform zero spatial distribution) to UniformDB.
+db_initial = spatialdata.spatialdb.UniformDB
+
+# We are assigning the label 'Dirichlet BC -x edge' to the database.
+db_initial.label = Dirichlet BC -x edge
+
+# Assign the displacement BC values.
+db_initial.values = [displacement-x,displacement-y]
+db_initial.data = [0.0*cm,-1.0*cm]
+
+
+# Boundary conditions to be applied to the positive x-side of the mesh.
+[pylithapp.timedependent.bc.x_pos]
+
+# We are fixing the 0 (x) and 1 (y) degrees of freedom.
+bc_dof = [0, 1]
+
+# The nodes associated with this boundary condition have the name
+# 'x_pos' in the mesh file.
+label = x_pos
+
+# Change spatial database for initial value from ZeroDispDB (which has
+# a uniform zero spatial distribution) to UniformDB.
+db_initial = spatialdata.spatialdb.UniformDB
+
+# We are assigning the label 'Dirichlet BC +x edge' to the database.
+db_initial.label = Dirichlet BC +x edge
+
+# Assign the displacement BC values.
+db_initial.values = [displacement-x,displacement-y]
+db_initial.data = [0.0*cm,1.0*cm]
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+# Give basename for VTK output of solution over domain.
+[pylithapp.problem.formulation.output.output.writer]
+filename = sheardisp2d.vtk
+time_format = %04.0f
+time_constant = 1.0*year
+
+# Give basename for VTK output of state variables.
+[pylithapp.timedependent.materials.material.output]
+cell_filter = pylith.meshio.CellFilterAvgMesh
+writer.filename = sheardisp2d-statevars.vtk
+writer.time_format = %04.0f
+writer.time_constant = 1.0*year
Added: short/3D/PyLith/trunk/tests/2d/maxwell/sheardisp3d.cfg
===================================================================
--- short/3D/PyLith/trunk/tests/2d/maxwell/sheardisp3d.cfg (rev 0)
+++ short/3D/PyLith/trunk/tests/2d/maxwell/sheardisp3d.cfg 2009-10-14 22:47:37 UTC (rev 15810)
@@ -0,0 +1,107 @@
+# -*- Python -*-
+
+# To run this problem, type "pylith planestrain3d.cfg sheardisp3d.cfg".
+# The settings in pylithapp.cfg will be read by default. See the README for
+# how to run other problems in this directory.
+
+[pylithapp]
+
+# ----------------------------------------------------------------------
+# problem
+# ----------------------------------------------------------------------
+# Specify the problem settings.
+[pylithapp.timedependent]
+
+# Set bc to an array with 4 boundary conditions: 'x_neg', 'x_pos', 'z_neg'
+# and 'z_pos'.
+bc = [x_neg,x_pos,z_neg,z_pos]
+
+# ----------------------------------------------------------------------
+# boundary conditions
+# ----------------------------------------------------------------------
+# Provide information on the boundary conditions.
+
+# Boundary conditions to be applied to the negative x-side of the mesh.
+[pylithapp.timedependent.bc.x_neg]
+
+# We are fixing the 0 (x) and 1 (y) degrees of freedom.
+bc_dof = [0, 1]
+
+# The nodes associated with this boundary condition have the name
+# 'x_neg' in the mesh file.
+label = x_neg
+
+# Change spatial database for initial value from ZeroDispDB (which has
+# a uniform zero spatial distribution) to UniformDB.
+db_initial = spatialdata.spatialdb.UniformDB
+
+# We are assigning the label 'Dirichlet BC -x edge' to the database.
+db_initial.label = Dirichlet BC -x edge
+
+# Assign the displacement BC values.
+db_initial.values = [displacement-x,displacement-y]
+db_initial.data = [0.0*cm,-1.0*cm]
+
+
+# Boundary conditions to be applied to the positive x-side of the mesh.
+[pylithapp.timedependent.bc.x_pos]
+
+# We are fixing the 0 (x) and 1 (y) degrees of freedom.
+bc_dof = [0, 1]
+
+# The nodes associated with this boundary condition have the name
+# 'x_pos' in the mesh file.
+label = x_pos
+
+# Change spatial database for initial value from ZeroDispDB (which has
+# a uniform zero spatial distribution) to UniformDB.
+db_initial = spatialdata.spatialdb.UniformDB
+
+# We are assigning the label 'Dirichlet BC +x edge' to the database.
+db_initial.label = Dirichlet BC +x edge
+
+# Assign the displacement BC values.
+db_initial.values = [displacement-x,displacement-y]
+db_initial.data = [0.0*cm,1.0*cm]
+
+# Boundary conditions to be applied to the front of the mesh.
+[pylithapp.timedependent.bc.z_pos]
+
+# We are fixing the 2 (z) degree of freedom.
+bc_dof = [2]
+
+# The group of vertices in the mesh file associated with this boundary
+# condition have the name 'z_pos'.
+label = z_pos
+
+# Assign the label 'Dirichlet BC +z corners' to the database.
+db_initial.label = Dirichlet BC +z edge
+
+# Boundary conditions to be applied to the back of the mesh.
+[pylithapp.timedependent.bc.z_neg]
+
+# We are fixing the 2 (z) degree of freedom.
+bc_dof = [2]
+
+# The group of vertices in the mesh file associated with this boundary
+# condition have the name 'z_neg'.
+label = z_neg
+
+# Assign the label 'Dirichlet BC -z corners' to the database.
+db_initial.label = Dirichlet BC -z edge
+
+# ----------------------------------------------------------------------
+# output
+# ----------------------------------------------------------------------
+# Give basename for VTK output of solution over domain.
+[pylithapp.problem.formulation.output.output.writer]
+filename = sheardisp3d.vtk
+time_format = %04.0f
+time_constant = 1.0*year
+
+# Give basename for VTK output of state variables.
+[pylithapp.timedependent.materials.material.output]
+cell_filter = pylith.meshio.CellFilterAvgMesh
+writer.filename = sheardisp3d-statevars.vtk
+writer.time_format = %04.0f
+writer.time_constant = 1.0*year
Added: short/3D/PyLith/trunk/tests/2d/maxwell/twohex8.mesh
===================================================================
--- short/3D/PyLith/trunk/tests/2d/maxwell/twohex8.mesh (rev 0)
+++ short/3D/PyLith/trunk/tests/2d/maxwell/twohex8.mesh 2009-10-14 22:47:37 UTC (rev 15810)
@@ -0,0 +1,188 @@
+// Finite-element mesh with two hex8 cells.
+//
+//
+// 1 ----- 3 ----- 5
+// | | |
+// | | |
+// | | |
+// 0 ----- 2 ----- 4
+//
+// The layer behind (in the z-direction) is numbered similarly, with vertex
+// numbers beginning with 6.
+//
+// Each edge has a length of 2.0.
+//
+mesh = {
+
+ // Dimension associated with topology of mesh.
+ dimension = 3
+
+ // We are using zero-based indexing (default, C style) rather than
+ // one-based (Fortran style) indexing.
+ use-index-zero = true
+
+ // Vertices in the mesh.
+ vertices = {
+
+ // Dimension of coordinate system for vertices.
+ dimension = 3
+
+ // Number of vertices in mesh.
+ count = 12
+
+ // Coordinates are listed as:
+ // Vertex number (starting from zero), x-coord, y-coord, z-coord
+ // Use coordinate units that are consistent with the other units used.
+ coordinates = {
+ 0 -2.0 -1.0 -1.0
+ 1 -2.0 1.0 -1.0
+ 2 0.0 -1.0 -1.0
+ 3 0.0 1.0 -1.0
+ 4 2.0 -1.0 -1.0
+ 5 2.0 1.0 -1.0
+ 6 -2.0 -1.0 1.0
+ 7 -2.0 1.0 1.0
+ 8 0.0 -1.0 1.0
+ 9 0.0 1.0 1.0
+ 10 2.0 -1.0 1.0
+ 11 2.0 1.0 1.0
+ }
+ }
+
+ // Finite-element cells in the mesh.
+ cells = {
+
+ // There are 2 cells.
+ count = 2
+
+ // These are trilinear hexahedral cells, so there are 8 corners per cell.
+ num-corners = 8
+
+ // List the vertices composing each cell, moving counter-clockwise
+ // around the cell.
+ // List the information as:
+ // Cell number (starting from zero), vertex 0, vertex 1, vertex 2, vertex 3
+ simplices = {
+ 0 0 2 3 1 6 8 9 7
+ 1 2 4 5 3 8 10 11 9
+ }
+
+ // List the material ID's associated with each cell.
+ // Different ID's may be used to specify a different material type, or
+ // to use a different spatial database for each material ID.
+ // In this example, cells 0 and 1 both are associated with material ID 0.
+ material-ids = {
+ 0 0
+ 1 0
+ }
+ }
+
+ // Here we list different groups (cells or vertices) that we want to
+ // associate with a particular name.
+
+ // This group of vertices may be used to define a fault.
+ // There are 4 vertices corresponding to indices 2, 8, 9 and 3.
+ group = {
+ name = fault
+ type = vertices
+ count = 4
+ indices = {
+ 2
+ 3
+ 8
+ 9
+ }
+ }
+
+ // This group of vertices may be used to specify boundary conditions.
+ // There are 4 vertices corresponding to indices 0, 1, 6, and 7.
+ group = {
+ name = x_neg
+ type = vertices
+ count = 4
+ indices = {
+ 0
+ 1
+ 6
+ 7
+ }
+ }
+
+ // This group of vertices may be used to specify boundary conditions.
+ // There are 4 vertices corresponding to indices 4, 5, 10, and 11.
+ group = {
+ name = x_pos
+ type = vertices
+ count = 4
+ indices = {
+ 4
+ 5
+ 10
+ 11
+ }
+ }
+
+ // This group of vertices may be used to specify boundary conditions.
+ // There are 6 vertices corresponding to indices 0, 2, 4, 6, 8, and 10.
+ group = {
+ name = y_neg
+ type = vertices
+ count = 6
+ indices = {
+ 0
+ 2
+ 4
+ 6
+ 8
+ 10
+ }
+ }
+
+ // This group of vertices may be used to specify boundary conditions.
+ // There are 6 vertices corresponding to indices 1, 3, 5, 7, 9, and 11.
+ group = {
+ name = y_pos
+ type = vertices
+ count = 6
+ indices = {
+ 1
+ 3
+ 5
+ 7
+ 9
+ 11
+ }
+ }
+
+ // This group of vertices may be used to specify boundary conditions.
+ // There are 6 vertices, corresponding to indices 6, 7, 8, 9, 10, and 11.
+ group = {
+ name = z_neg
+ type = vertices
+ count = 6
+ indices = {
+ 6
+ 7
+ 8
+ 9
+ 10
+ 11
+ }
+ }
+
+ // This group of vertices may be used to specify boundary conditions.
+ // There are 6 vertices, corresponding to indices 0, 1, 2, 3, 4, and 5.
+ group = {
+ name = z_pos
+ type = vertices
+ count = 6
+ indices = {
+ 0
+ 1
+ 2
+ 3
+ 4
+ 5
+ }
+ }
+}
Added: short/3D/PyLith/trunk/tests/2d/maxwell/twoquad4.mesh
===================================================================
--- short/3D/PyLith/trunk/tests/2d/maxwell/twoquad4.mesh (rev 0)
+++ short/3D/PyLith/trunk/tests/2d/maxwell/twoquad4.mesh 2009-10-14 22:47:37 UTC (rev 15810)
@@ -0,0 +1,133 @@
+// Finite-element mesh with two quad4 cells.
+//
+//
+// 1 ----- 3 ----- 5
+// | | |
+// | | |
+// | | |
+// 0 ----- 2 ----- 4
+//
+// Each edge has a length of 2.0.
+//
+mesh = {
+
+ // Dimenion associated with topology of mesh.
+ dimension = 2
+
+ // We are using zero-based indexing (default, C style) rather than
+ // one-based (Fortran style) indexing.
+ use-index-zero = true
+
+ // Vertices in the mesh.
+ vertices = {
+
+ // Dimension of coordinate system for vertices.
+ dimension = 2
+
+ // Number of vertices in mesh.
+ count = 6
+
+ // Coordinates are listed as:
+ // Vertex number (starting from zero), x-coord, y-coord
+ // Use coordinate units that are consistent with the other units used.
+ 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
+ }
+ }
+
+ // Finite-element cells in the mesh.
+ cells = {
+
+ // There are 2 cells.
+ count = 2
+
+ // These are bilinear quadrilateral cells, so there are 4 corners per cell.
+ num-corners = 4
+
+ // List the vertices composing each cell, moving counter-clockwise
+ // around the cell.
+ // List the information as:
+ // Cell number (starting from zero), vertex 0, vertex 1, vertex 2, vertex 3
+ simplices = {
+ 0 0 2 3 1
+ 1 4 5 3 2
+ }
+
+ // List the material ID's associated with each cell.
+ // Different ID's may be used to specify a different material type, or
+ // to use a different spatial database for each material ID.
+ // In this example, cells 0 and 1 both are associated with material ID 0.
+ material-ids = {
+ 0 0
+ 1 0
+ }
+ }
+
+ // Here we list different groups (cells or vertices) that we want to
+ // associate with a particular name.
+
+ // This group of vertices may be used to define a fault.
+ // There are 2 vertices corresponding to indices 2 and 3.
+ group = {
+ name = fault
+ type = vertices
+ count = 2
+ indices = {
+ 2
+ 3
+ }
+ }
+
+ // This group of vertices may be used to specify boundary conditions.
+ // There are 3 vertices corresponding to indices 0, 2, and 4.
+ group = {
+ name = y_neg
+ type = vertices
+ count = 3
+ indices = {
+ 0
+ 2
+ 4
+ }
+ }
+
+ // This group of vertices may be used to specify boundary conditions.
+ // There are 2 vertices corresponding to indices 0 and 1.
+ group = {
+ name = x_neg
+ type = vertices
+ count = 2
+ indices = {
+ 0
+ 1
+ }
+ }
+
+ // This group of vertices may be used to specify boundary conditions.
+ // There are 2 vertices corresponding to indices 4 and 5.
+ group = {
+ name = x_pos
+ type = vertices
+ count = 2
+ indices = {
+ 4
+ 5
+ }
+ }
+
+ // This group of vertices may be used to specify boundary conditions.
+ // There is 1 vertex corresponding to index 3.
+ group = {
+ name = y_pos
+ type = vertices
+ count = 1
+ indices = {
+ 3
+ }
+ }
+}
More information about the CIG-COMMITS
mailing list