[cig-commits] r11274 - in short/3D/PyLith/trunk: . examples examples/3d/hex8 examples/3d/tet4 examples/twocells/twohex8 examples/twocells/twoquad4 examples/twocells/twotet4 examples/twocells/twotet4-geoproj examples/twocells/twotri3 examples/twofaults examples/twofaults/2d pylith pylith/bc pylith/faults pylith/feassemble pylith/materials pylith/meshio pylith/problems pylith/topology pylith/utils unittests/pytests/bc unittests/pytests/faults unittests/pytests/materials
brad at geodynamics.org
brad at geodynamics.org
Wed Feb 27 13:14:37 PST 2008
Author: brad
Date: 2008-02-27 13:14:37 -0800 (Wed, 27 Feb 2008)
New Revision: 11274
Removed:
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/tet4/fixeddisp_zero.spatialdb
short/3D/PyLith/trunk/examples/3d/tet4/fourmaterials.odb
short/3D/PyLith/trunk/examples/templates/
short/3D/PyLith/trunk/examples/twofaults/2d/displacement.spatialdb
short/3D/PyLith/trunk/examples/twofaults/2d/faults.odb
short/3D/PyLith/trunk/examples/twofaults/2d/twofaults.odb
short/3D/PyLith/trunk/examples/twofaults/2d/twomaterials.odb
short/3D/PyLith/trunk/examples/twofaults/3d/
short/3D/PyLith/trunk/pylith/bc/BCFourSides.py
short/3D/PyLith/trunk/pylith/bc/BCSingle.py
short/3D/PyLith/trunk/pylith/bc/BCSixSides.py
short/3D/PyLith/trunk/pylith/bc/BCTwoSides.py
short/3D/PyLith/trunk/pylith/faults/SingleFault.py
short/3D/PyLith/trunk/pylith/materials/BiMaterial.py
short/3D/PyLith/trunk/pylith/meshio/DoubleOutput.py
short/3D/PyLith/trunk/unittests/pytests/bc/TestBCFourSides.py
short/3D/PyLith/trunk/unittests/pytests/bc/TestBCSingle.py
short/3D/PyLith/trunk/unittests/pytests/bc/TestBCSixSides.py
short/3D/PyLith/trunk/unittests/pytests/bc/TestBCTwoSides.py
short/3D/PyLith/trunk/unittests/pytests/faults/TestSingleFault.py
short/3D/PyLith/trunk/unittests/pytests/materials/TestBiMaterial.py
Modified:
short/3D/PyLith/trunk/TODO
short/3D/PyLith/trunk/examples/3d/hex8/README
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/mesh_hex8_1000m.jou
short/3D/PyLith/trunk/examples/3d/hex8/pylithapp.cfg
short/3D/PyLith/trunk/examples/3d/hex8/shearxy.cfg
short/3D/PyLith/trunk/examples/3d/tet4/README
short/3D/PyLith/trunk/examples/3d/tet4/dislocation.cfg
short/3D/PyLith/trunk/examples/3d/tet4/pylithapp.cfg
short/3D/PyLith/trunk/examples/3d/tet4/shearxy.cfg
short/3D/PyLith/trunk/examples/twocells/twohex8/axialdisp.cfg
short/3D/PyLith/trunk/examples/twocells/twohex8/dislocation.cfg
short/3D/PyLith/trunk/examples/twocells/twohex8/pylithapp.cfg
short/3D/PyLith/trunk/examples/twocells/twohex8/sheardisp.cfg
short/3D/PyLith/trunk/examples/twocells/twoquad4/axialdisp.cfg
short/3D/PyLith/trunk/examples/twocells/twoquad4/axialtract.cfg
short/3D/PyLith/trunk/examples/twocells/twoquad4/dislocation.cfg
short/3D/PyLith/trunk/examples/twocells/twoquad4/sheardisp.cfg
short/3D/PyLith/trunk/examples/twocells/twotet4-geoproj/dislocation.cfg
short/3D/PyLith/trunk/examples/twocells/twotet4-geoproj/pylithapp.cfg
short/3D/PyLith/trunk/examples/twocells/twotet4/axialdisp.cfg
short/3D/PyLith/trunk/examples/twocells/twotet4/dislocation.cfg
short/3D/PyLith/trunk/examples/twocells/twotri3/axialdisp.cfg
short/3D/PyLith/trunk/examples/twocells/twotri3/dislocation.cfg
short/3D/PyLith/trunk/examples/twocells/twotri3/sheardisp.cfg
short/3D/PyLith/trunk/examples/twofaults/2d/dislocation_1fault.cfg
short/3D/PyLith/trunk/examples/twofaults/2d/dislocation_2faults.cfg
short/3D/PyLith/trunk/examples/twofaults/2d/pylithapp.cfg
short/3D/PyLith/trunk/pylith/Makefile.am
short/3D/PyLith/trunk/pylith/PyLithApp.py
short/3D/PyLith/trunk/pylith/bc/__init__.py
short/3D/PyLith/trunk/pylith/faults/__init__.py
short/3D/PyLith/trunk/pylith/feassemble/__init__.py
short/3D/PyLith/trunk/pylith/materials/__init__.py
short/3D/PyLith/trunk/pylith/meshio/__init__.py
short/3D/PyLith/trunk/pylith/problems/Formulation.py
short/3D/PyLith/trunk/pylith/problems/Problem.py
short/3D/PyLith/trunk/pylith/topology/__init__.py
short/3D/PyLith/trunk/pylith/utils/ObjectBin.py
short/3D/PyLith/trunk/setup.py
short/3D/PyLith/trunk/unittests/pytests/bc/testbc.py
short/3D/PyLith/trunk/unittests/pytests/faults/testfaults.py
short/3D/PyLith/trunk/unittests/pytests/materials/testmaterials.py
Log:
Replace use of containers with facility arrays (new Pyre feature). Propagated changes through unit tests and examples. Updated output settings for some additional examples.
Modified: short/3D/PyLith/trunk/TODO
===================================================================
--- short/3D/PyLith/trunk/TODO 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/TODO 2008-02-27 21:14:37 UTC (rev 11274)
@@ -1,75 +1,106 @@
======================================================================
+KNOWN DEFICIENCIES
+======================================================================
+
+ Can't use block Jacobi preconditioner when Dirichlet BC overlap with
+ fault BC's, because we end up with a DOF associated with a Lagrange
+ multiplier that is "free". Not sure if this is okay, when the fault
+ is at an angle to the boundary.
+
+ Might be able to fix this problem by examining constraints
+ relative to orientation and if orientation coincides with
+ preexisting constraint, then constrain Lagrange multiplier DOF.
+
+ Need better error trapping when using LineParser. State of
+ ifstream is insufficient. Need state of istringstream buffer, but it
+ is often !good() at eof(). Test of !good() and !eof()?
+
+======================================================================
CURRENT ISSUES
======================================================================
Release 1.1
- 2. Reimplement SolutionIO [BRAD & MATT]
- e. Implement output of solution subset (ground surface).
- i. OutputSubdomain
+ 1. OutputManager [BRAD]
f. VertexFilterChangeCS
i. OutputFilter for writing vertex coordinates in another
coordinate system.
- g. DataWriterHDF5
- Use Cases
+ 2. Check performance of current distribution.
- HDF5 files
+ 3. Add more error checking.
- Would prefer to include multiple materials
+ a. Add check to make sure every material in mesh has a material model.
- Datasets contain entire time histories (makes it possible to
- slice along time or space)
+ Add check for overlapping of material ids for bulk and
+ cohesive cells.
- Lower dimension information (surface/line mesh specified by set
- of vertices)
+ b. When importing mesh, add check to make sure all cells have same
+ number of vertices (especially CUBIT).
- Solution field (time histories)
+ Benchmarks
- Spontaneous (dynamic) fault rupture
+ 1. Strike-slip benchmark.
+ a. Update meshes to use 2 materials.
+ b. Update parameters with output controls.
+ c. Rerun benchmarks.
+ d. Tabulate results.
+ e. Test scaling (1,2,4,8 processors) for 500m hex8 case
- Slip and change in tractions (time histories)
+ 2. Reverse-slip benchmark.
+ a. Create BC for CUBIT mesh.
+ b. Create LaGriT mesh (based on old LaGriT script).
+ c. Create BC for LaGriT mesh.
+ d. Run benchmarks.
+ e. Generate analytic solutions.
+ f. Tabulate results.
- Fault constitutive values (time histories)
+ Examples
- Orientation , Fault constitutive parameters (diagnostic)
+ 1. Test and update settings.
+ a. Use pyre.facilityArray
+ b. Update output settings (materials, faults, solution).
+ twoquad4-geoproj
+ twofaults
+ c. Updated examples/3d to use 2 materials.
- Point locations (arbitrary location such as instrument site)
+ d. Remove twoquad4-tractions (have twoquad4/axialtract.cfg)
+ If we want these as tests, move them to tests.
- Interpolate solution to desired location
+ 2. Add some simple kinematic rupture examples.
+ a. 2-D bar (tri3, quad4)
+ b. 3-D bar (tet4, hex8)
+ c. simple strike-slip propagating rupture (500m resolution)
- Solution field (time history)
+ Manual
- 3. Optimization [BRAD]
- a. Fault?
- b. Absorbing BC?
- c. Neumann BC?
+ 1. Need to add explanation of output and output parameters
+ (especially fault information).
-General
+ Fault information is in fault coordinate system. Add example of
+ how to convert it to global coordinates using orientation
+ information.
- 1. Need to add explanation of output and output parameters to
- manual (especially fault information).
+ 2. 3 kinds of spatial databases
+ UniformDB
+ SimpleDB
+ SCECCVMHDB
- Fault information is in fault coordinate system. Add example of
- how to convert it to global coordinates using orientation
- information.
+ 2. Add dependency diagram.
- 2. Add dependency diagram to manual.
+ 3. Add benchmarks.
- 3. Fix memory imbalance associated with distribution.
+ 4. Update cover figure with current result.
- 4. Add check to make sure every material in mesh has a material model.
+ 5. Remove discussion of containers.
+ Use facility array. Include defaults for items.
- Add check for overlapping of material ids for bulk and cohesive
- cells.
+ 6. DirichletPoints/DirichletBoundary
+ FixedDOFDB (special case of UniformDB).
- 5. Install cases
+ 7. Add twotet4-geoproj to tutorials.
- 3 kinds of spatial databases
- UniformDB
- SimpleDB
- SCECCVMHDB
-
+----------------------------------------------------------------------
Release 1.2
1. Dynamic fault interface conditions.
@@ -94,23 +125,31 @@
Loop over eq sources, if time is greater than time of rupture, use it
Would allow Savage-Prescott benchmark.
-======================================================================
-KNOWN DEFICIENCIES
-======================================================================
+ 7. Additional output
- Can't use block Jacobi preconditioner when Dirichlet BC overlap with
- fault BC's, because we end up with a DOF associated with a Lagrange
- multiplier that is "free". Not sure if this is okay, when the fault
- is at an angle to the boundary.
+ Use Cases
- Might be able to fix this problem by examining constraints
- relative to orientation and if orientation coincides with
- preexisting constraint, then constrain Lagrange multiplier DOF.
+ HDF5 files
- Need better error trapping when using LineParser. State of
- ifstream is insufficient. Need state of istringstream buffer, but it
- is often !good() at eof(). Test of !good() and !eof()?
+ Would prefer to include multiple materials
+ Datasets contain entire time histories (makes it possible to
+ slice along time or space)
+
+ Spontaneous (dynamic) fault rupture
+
+ Slip and change in tractions (time histories)
+
+ Fault constitutive values (time histories)
+
+ Orientation , Fault constitutive parameters (diagnostic)
+
+ Point locations (arbitrary location such as instrument site)
+
+ Interpolate solution to desired location
+
+ Solution field (time history)
+
======================================================================
MISC PRIORITIES (Brad)
======================================================================
Modified: short/3D/PyLith/trunk/examples/3d/hex8/README
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/README 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/examples/3d/hex8/README 2008-02-27 21:14:37 UTC (rev 11274)
@@ -40,12 +40,6 @@
the displacement field in the Dirichlet (prescribed displacement)
boundary conditions for the shear problem
-fixeddisp_zero.spatialdb - Spatial database for spatial variation of
-the displacement field in the Dirichlet (prescribed displacement)
-boundary conditions for fault slip problem
-
-fourmaterials.odb - Material container with four materials
-
geometry.jou - CUBIT journal file (script) to generate solid model geometry
mat_elastic.spatialdb - Spatial database for spatial variation of the
Modified: short/3D/PyLith/trunk/examples/3d/hex8/box_hex8_1000m.exo
===================================================================
(Binary files differ)
Modified: short/3D/PyLith/trunk/examples/3d/hex8/dislocation.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/dislocation.cfg 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/examples/3d/hex8/dislocation.cfg 2008-02-27 21:14:37 UTC (rev 11274)
@@ -16,14 +16,20 @@
total_time = 0.0*s ; total time of simulation
default_dt = 1.0*s ; time step
-# Set the containers for the boundary conditions and faults.
+# Set bc to an array of 3 boundary conditions: 'x_pos', 'x_neg', and 'z_neg'.
+bc = [x_pos,x_neg,z_neg]
-# Use the predefined 6 item BC container
-bc = pylith.bc.BCSixSides
+# Set interfaces to an array of 1 fault: 'fault'.
+interfaces = [fault]
-# Use the prefined 1 item faults container
-interfaces = pylith.faults.SingleFault
+[pylithapp.timedependent.implicit]
+# Set the output to an array of 2 output managers.
+# We will output the solution over the domain and the ground surface.
+output = [domain,subdomain]
+# Set subdomain component to OutputSolnSubset (subset of domain).
+output.subdomain = pylith.meshio.OutputSolnSubset
+
# ----------------------------------------------------------------------
# boundary conditions
# ----------------------------------------------------------------------
@@ -82,10 +88,25 @@
# ----------------------------------------------------------------------
# output
# ----------------------------------------------------------------------
-# Set the root name for output.
-[pylithapp.problem.formulation.output.output.writer]
+# Give basename for VTK domain output of solution over domain.
+[pylithapp.problem.formulation.output.domain.writer]
filename = dislocation.vtk
+# Give basename for VTK domain output of solution over ground surface.
+[pylithapp.problem.formulation.output.subdomain]
+label = 17 ; nodeset for subdomain
+writer.filename = dislocation-groundsurf.vtk
+
# Give basename for vtk fault output.
[pylithapp.timedependent.interfaces.fault.output.writer]
filename = dislocation-fault.vtk
+
+# Give basename for VTK output of state variables.
+[pylithapp.timedependent.materials.elastic_upper.output]
+cell_filter = pylith.meshio.CellFilterAvg
+writer.filename = dislocation-statevars-upper.vtk
+
+[pylithapp.timedependent.materials.elastic_lower.output]
+cell_filter = pylith.meshio.CellFilterAvg
+writer.filename = dislocation-statevars-lower.vtk
+
Deleted: short/3D/PyLith/trunk/examples/3d/hex8/fixeddisp_zero.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/fixeddisp_zero.spatialdb 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/examples/3d/hex8/fixeddisp_zero.spatialdb 2008-02-27 21:14:37 UTC (rev 11274)
@@ -1,31 +0,0 @@
-// -*- C++ -*- (tell Emacs to use C++ mode for syntax highlighting)
-//
-// This spatial database specifies the distribution of the
-// displacement field for Dirichlet boundary conditions associated
-// with no motion.
-//
-// dof-0: Ux = 0
-// dof-1: Uy = 0
-// dof-2: Uz = 0
-//
-#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 // data is uniform
- space-dim = 3
- cs-data = cartesian {
- to-meters = 1.0
- space-dim = 3
- }
-}
-// Columns are
-// (1) x coordinate (km)
-// (2) y coordinate (km)
-// (3) z coordinate (km)
-// (4) Ux (m)
-// (5) Uy (m)
-// (6) Uz (m)
-0.0 0.0 0.0 0.0 0.0 0.0
Deleted: short/3D/PyLith/trunk/examples/3d/hex8/fourmaterials.odb
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/fourmaterials.odb 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/examples/3d/hex8/fourmaterials.odb 2008-02-27 21:14:37 UTC (rev 11274)
@@ -1,93 +0,0 @@
-#!/usr/bin/env python
-#
-# ----------------------------------------------------------------------
-#
-# Brad T. Aagaard
-# U.S. Geological Survey
-#
-# <LicenseText>
-#
-# ----------------------------------------------------------------------
-#
-
-## Container of four materials.
-##
-## See examples/templates/materials.odb for a template file with a
-## detailed explanation.
-
-# 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
Modified: short/3D/PyLith/trunk/examples/3d/hex8/mesh_hex8_1000m.jou
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/mesh_hex8_1000m.jou 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/examples/3d/hex8/mesh_hex8_1000m.jou 2008-02-27 21:14:37 UTC (rev 11274)
@@ -25,14 +25,10 @@
# ----------------------------------------------------------------------
# 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"
+block 1 volume 1 4
+block 1 name "elastic"
+block 2 volume 5 6
+block 2 name "viscoelastic"
# ----------------------------------------------------------------------
# Create nodeset for fault
@@ -95,6 +91,14 @@
nodeset 16 name "face zneg nofault"
# ----------------------------------------------------------------------
+# Create nodeset for +z face
+# ----------------------------------------------------------------------
+group "face_zpos" add node in surface 10
+group "face_zpos" add node in surface 17
+nodeset 17 group face_zpos
+nodeset 17 name "face zpos"
+
+# ----------------------------------------------------------------------
# Export exodus file
# ----------------------------------------------------------------------
export mesh "box_hex8_1000m.exo" dimension 3 overwrite
Modified: short/3D/PyLith/trunk/examples/3d/hex8/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/pylithapp.cfg 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/examples/3d/hex8/pylithapp.cfg 2008-02-27 21:14:37 UTC (rev 11274)
@@ -35,50 +35,26 @@
# materials
# ----------------------------------------------------------------------
[pylithapp.timedependent]
-# Use the local (user-defined) 4 item materials container
-materials = fourmaterials
+# Set materials to an array of 2 materials:
+# 'elastic_upper' and 'elastic_lower'
+materials = [elastic_upper,elastic_lower]
-[pylithapp.timedependent.materials]
-# Change the default material properties for the viscoelatic materials
-# to elastic materials
-viscoelastic_neg = pylith.materials.ElasticIsotropic3D
-viscoelastic_pos = pylith.materials.ElasticIsotropic3D
-
-# The lines below set the parameters for each material in the
-# materials container.
-
-[pylithapp.timedependent.materials.elastic_pos]
-label = Elastic material +x
+[pylithapp.timedependent.materials.elastic_upper]
+label = Upper elastic material
id = 1
db.iohandler.filename = mat_elastic.spatialdb
quadrature = pylith.feassemble.quadrature.Quadrature3D
quadrature.cell = pylith.feassemble.FIATLagrange
quadrature.cell.dimension = 3
-[pylithapp.timedependent.materials.elastic_neg]
-label = Elastic material -x
+[pylithapp.timedependent.materials.elastic_lower]
+label = Lower elastic material
id = 2
db.iohandler.filename = mat_elastic.spatialdb
quadrature = pylith.feassemble.quadrature.Quadrature3D
quadrature.cell = pylith.feassemble.FIATLagrange
quadrature.cell.dimension = 3
-[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
-
-[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
-
# ----------------------------------------------------------------------
# PETSc
# ----------------------------------------------------------------------
Modified: short/3D/PyLith/trunk/examples/3d/hex8/shearxy.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/hex8/shearxy.cfg 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/examples/3d/hex8/shearxy.cfg 2008-02-27 21:14:37 UTC (rev 11274)
@@ -17,9 +17,17 @@
total_time = 0.0*s ; total time of simulation
default_dt = 1.0*s ; time step
-# Use the predefined 6 item BC container
-bc = pylith.bc.BCSixSides
+# Set bc to an array of 3 boundary conditions: 'x_pos', 'x_neg', and 'z_neg'.
+bc = [x_pos,x_neg,z_neg]
+[pylithapp.timedependent.implicit]
+# Set the output to an array of 2 output managers.
+# We will output the solution over the domain and the ground surface.
+output = [domain,subdomain]
+
+# Set subdomain component to OutputSolnSubset (subset of domain).
+output.subdomain = pylith.meshio.OutputSolnSubset
+
# ----------------------------------------------------------------------
# boundary conditions
# ----------------------------------------------------------------------
@@ -60,7 +68,20 @@
# ----------------------------------------------------------------------
# output
# ----------------------------------------------------------------------
-# Set the root name for output.
+# Give basename for VTK domain output of solution over domain.
+[pylithapp.problem.formulation.output.domain.writer]
+filename = shearxy.vtk
-[pylithapp.problem.formulation.output.output.writer]
-filename = shear.vtk
+# Give basename for VTK domain output of solution over ground surface.
+[pylithapp.problem.formulation.output.subdomain]
+label = 17 ; nodeset for subdomain
+writer.filename = shearxy-groundsurf.vtk
+
+# Give basename for VTK output of state variables.
+[pylithapp.timedependent.materials.elastic_upper.output]
+cell_filter = pylith.meshio.CellFilterAvg
+writer.filename = shearxy-statevars-upper.vtk
+
+[pylithapp.timedependent.materials.elastic_lower.output]
+cell_filter = pylith.meshio.CellFilterAvg
+writer.filename = shearxy-statevars-lower.vtk
Modified: short/3D/PyLith/trunk/examples/3d/tet4/README
===================================================================
--- short/3D/PyLith/trunk/examples/3d/tet4/README 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/examples/3d/tet4/README 2008-02-27 21:14:37 UTC (rev 11274)
@@ -28,12 +28,6 @@
the displacement field in the Dirichlet (prescribed displacement)
boundary conditions for the shear problem
-fixeddisp_zero.spatialdb - Spatial database for spatial variation of
-the displacement field in the Dirichlet (prescribed displacement)
-boundary conditions for fault slip problem
-
-fourmaterials.odb - Material container with four materials
-
mat_elastic.spatialdb - Spatial database for spatial variation of the
elastic material properties
Modified: short/3D/PyLith/trunk/examples/3d/tet4/dislocation.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/tet4/dislocation.cfg 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/examples/3d/tet4/dislocation.cfg 2008-02-27 21:14:37 UTC (rev 11274)
@@ -16,14 +16,20 @@
total_time = 0.0*s ; total time of simulation
default_dt = 1.0*s ; time step
-# Set the containers for the boundary conditions and faults.
+# Set the BC to an array with 2 boundary conditions.
+bc = x_pos,x_neg
-# Use the predefined 6 item BC container
-bc = pylith.bc.BCSixSides
+# Set the interfaces to an array with 1 fault.
+interfaces = fault
-# Use the prefined 1 item faults container
-interfaces = pylith.faults.SingleFault
+[pylithapp.timedependent.implicit]
+# Set the output to an array of 2 output managers.
+# We will output the solution over the domain and the ground surface.
+output = [domain,subdomain]
+# Set subdomain component to OutputSolnSubset (subset of domain).
+output.subdomain = pylith.meshio.OutputSolnSubset
+
# ----------------------------------------------------------------------
# boundary conditions
# ----------------------------------------------------------------------
@@ -78,9 +84,31 @@
# output
# ----------------------------------------------------------------------
# Set the root name for output.
-[pylithapp.problem.formulation.output.output.writer]
+[pylithapp.problem.formulation.output.domain.writer]
filename = dislocation.vtk
+# Give basename for VTK domain output of solution over ground surface.
+[pylithapp.problem.formulation.output.subdomain]
+label = boundary_zp
+writer.filename = dislocation-groundsurf.vtk
+
# Give basename for vtk fault output.
[pylithapp.timedependent.interfaces.fault.output.writer]
filename = dislocation-fault.vtk
+
+# Give basename for VTK output of state variables.
+[pylithapp.timedependent.materials.elastic_neg1.output]
+cell_filter = pylith.meshio.CellFilterAvg
+writer.filename = dislocation-statevars-neg1.vtk
+
+[pylithapp.timedependent.materials.elastic_pos1.output]
+cell_filter = pylith.meshio.CellFilterAvg
+writer.filename = dislocation-statevars-pos1.vtk
+
+[pylithapp.timedependent.materials.elastic_neg2.output]
+cell_filter = pylith.meshio.CellFilterAvg
+writer.filename = dislocation-statevars-pos2.vtk
+
+[pylithapp.timedependent.materials.elastic_pos2.output]
+cell_filter = pylith.meshio.CellFilterAvg
+writer.filename = dislocation-statevars-neg2.vtk
Deleted: short/3D/PyLith/trunk/examples/3d/tet4/fixeddisp_zero.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/3d/tet4/fixeddisp_zero.spatialdb 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/examples/3d/tet4/fixeddisp_zero.spatialdb 2008-02-27 21:14:37 UTC (rev 11274)
@@ -1,31 +0,0 @@
-// -*- C++ -*- (tell Emacs to use C++ mode for syntax highlighting)
-//
-// This spatial database specifies the distribution of the
-// displacement field for Dirichlet boundary conditions associated
-// with no motion.
-//
-// dof-0: Ux = 0
-// dof-1: Uy = 0
-// dof-2: Uz = 0
-//
-#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 // data is uniform
- space-dim = 3
- cs-data = cartesian {
- to-meters = 1.0
- space-dim = 3
- }
-}
-// Columns are
-// (1) x coordinate (km)
-// (2) y coordinate (km)
-// (3) z coordinate (km)
-// (4) Ux (m)
-// (5) Uy (m)
-// (6) Uz (m)
-0.0 0.0 0.0 0.0 0.0 0.0
Deleted: short/3D/PyLith/trunk/examples/3d/tet4/fourmaterials.odb
===================================================================
--- short/3D/PyLith/trunk/examples/3d/tet4/fourmaterials.odb 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/examples/3d/tet4/fourmaterials.odb 2008-02-27 21:14:37 UTC (rev 11274)
@@ -1,93 +0,0 @@
-#!/usr/bin/env python
-#
-# ----------------------------------------------------------------------
-#
-# Brad T. Aagaard
-# U.S. Geological Survey
-#
-# <LicenseText>
-#
-# ----------------------------------------------------------------------
-#
-
-## Container of four materials.
-##
-## See examples/templates/materials.odb for a template file with a
-## detailed explanation.
-
-# 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
Modified: short/3D/PyLith/trunk/examples/3d/tet4/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/tet4/pylithapp.cfg 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/examples/3d/tet4/pylithapp.cfg 2008-02-27 21:14:37 UTC (rev 11274)
@@ -43,44 +43,38 @@
# materials
# ----------------------------------------------------------------------
[pylithapp.timedependent]
-# Use the local (user-defined) container with 4 materials.
-materials = fourmaterials
+# Set materials to an array of 4 elastic isotropic 3-D (default) materials.
+materials = elastic_neg1,elastic_neg2,elastic_pos1,elastic_pos2
-[pylithapp.timedependent.materials]
-# Change the default material properties for the viscoelatic materials
-# to elastic materials
-viscoelastic_neg = pylith.materials.ElasticIsotropic3D
-viscoelastic_pos = pylith.materials.ElasticIsotropic3D
-
# The lines below set the parameters for each material in the
-# materials container.
+# materials array.
-[pylithapp.timedependent.materials.elastic_pos]
-label = Elastic material +x
+[pylithapp.timedependent.materials.elastic_pos1]
+label = Elastic material +x (upper)
id = 1
db.iohandler.filename = mat_elastic.spatialdb
quadrature = pylith.feassemble.quadrature.Quadrature3D
quadrature.cell = pylith.feassemble.FIATSimplex
quadrature.cell.shape = tetrahedron
-[pylithapp.timedependent.materials.elastic_neg]
-label = Elastic material -x
+[pylithapp.timedependent.materials.elastic_neg1]
+label = Elastic material -x (upper)
id = 2
db.iohandler.filename = mat_elastic.spatialdb
quadrature = pylith.feassemble.quadrature.Quadrature3D
quadrature.cell = pylith.feassemble.FIATSimplex
quadrature.cell.shape = tetrahedron
-[pylithapp.timedependent.materials.viscoelastic_pos]
-label = Viscoelastic material +x
+[pylithapp.timedependent.materials.elastic_pos2]
+label = Elastic material +x (lower)
id = 3
db.iohandler.filename = mat_elastic.spatialdb
quadrature = pylith.feassemble.quadrature.Quadrature3D
quadrature.cell = pylith.feassemble.FIATSimplex
quadrature.cell.shape = tetrahedron
-[pylithapp.timedependent.materials.viscoelastic_neg]
-label = Viscoelastic material -x
+[pylithapp.timedependent.materials.elastic_neg2]
+label = Elastic material -x (lower)
id = 4
db.iohandler.filename = mat_elastic.spatialdb
quadrature = pylith.feassemble.quadrature.Quadrature3D
Modified: short/3D/PyLith/trunk/examples/3d/tet4/shearxy.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/3d/tet4/shearxy.cfg 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/examples/3d/tet4/shearxy.cfg 2008-02-27 21:14:37 UTC (rev 11274)
@@ -16,14 +16,17 @@
total_time = 0.0*s ; total time of simulation
default_dt = 1.0*s ; time step
-# Select a boundary condition container with 6 BCs.
-bc = pylith.bc.BCSixSides
+# Set the BC to an array with 3 boundary conditions.
+bc = x_pos,x_neg,z_neg
[pylithapp.timedependent.implicit]
-# Select an output condition container with 2 output managers.
+# Set the output to an array of 2 output managers.
# We will output the solution over the domain and the ground surface.
-output = pylith.meshio.DoubleOutput
+output = [domain,subdomain]
+# Set subdomain component to OutputSolnSubset (subset of domain).
+output.subdomain = pylith.meshio.OutputSolnSubset
+
# ----------------------------------------------------------------------
# boundary conditions
# ----------------------------------------------------------------------
@@ -66,9 +69,26 @@
# ----------------------------------------------------------------------
# Give basename for VTK domain output of solution over domain.
[pylithapp.problem.formulation.output.domain.writer]
-filename = shear.vtk
+filename = shearxy.vtk
# Give basename for VTK domain output of solution over ground surface.
[pylithapp.problem.formulation.output.subdomain]
label = boundary_zp
-writer.filename = shear-groundsurf.vtk
+writer.filename = shearxy-groundsurf.vtk
+
+# Give basename for VTK output of state variables.
+[pylithapp.timedependent.materials.elastic_neg1.output]
+cell_filter = pylith.meshio.CellFilterAvg
+writer.filename = shearxy-statevars-neg1.vtk
+
+[pylithapp.timedependent.materials.elastic_pos1.output]
+cell_filter = pylith.meshio.CellFilterAvg
+writer.filename = shearxy-statevars-pos1.vtk
+
+[pylithapp.timedependent.materials.elastic_neg2.output]
+cell_filter = pylith.meshio.CellFilterAvg
+writer.filename = shearxy-statevars-pos2.vtk
+
+[pylithapp.timedependent.materials.elastic_pos2.output]
+cell_filter = pylith.meshio.CellFilterAvg
+writer.filename = shearxy-statevars-neg2.vtk
Modified: short/3D/PyLith/trunk/examples/twocells/twohex8/axialdisp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twohex8/axialdisp.cfg 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/examples/twocells/twohex8/axialdisp.cfg 2008-02-27 21:14:37 UTC (rev 11274)
@@ -22,13 +22,11 @@
# We want an implicit formulation.
formulation = pylith.problems.Implicit
-# This is a container for a boundary condition specified on six sides
-# of a rectangular solid domain.
-bc = pylith.bc.BCSixSides
+# Set bc to an array of 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.
@@ -78,7 +76,14 @@
# ----------------------------------------------------------------------
# output
-# Give basename for vtk output.
# ----------------------------------------------------------------------
+# Give basename for VTK output of solution over domain.
[pylithapp.problem.formulation.output.output.writer]
filename = axialdisp.vtk
+time_format = %010.1f
+
+# Give basename for VTK output of state variables.
+[pylithapp.timedependent.materials.material.output]
+cell_filter = pylith.meshio.CellFilterAvg
+writer.filename = axialdisp-statevars.vtk
+writer.time_format = %010.1f
Modified: short/3D/PyLith/trunk/examples/twocells/twohex8/dislocation.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twohex8/dislocation.cfg 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/examples/twocells/twohex8/dislocation.cfg 2008-02-27 21:14:37 UTC (rev 11274)
@@ -22,20 +22,17 @@
# ----------------------------------------------------------------------
# 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 on six sides
-# of a rectangular solid domain.
-bc = pylith.bc.BCSixSides
+# Set bc to an array of 2 boundary conditions: 'x_neg' and 'x_pos'.
+bc = [x_neg,x_pos]
-# This is a container for a single fault.
-interfaces = pylith.faults.SingleFault
+# Set interfaces to an array of 1 fault: 'fault'.
+interfaces = [fault]
# ----------------------------------------------------------------------
# boundary conditions
@@ -129,3 +126,9 @@
[pylithapp.timedependent.interfaces.fault.output.writer]
filename = dislocation-fault.vtk
time_format = %010.1f
+
+# Give basename for VTK output of state variables.
+[pylithapp.timedependent.materials.material.output]
+cell_filter = pylith.meshio.CellFilterAvg
+writer.filename = dislocation-statevars.vtk
+writer.time_format = %010.1f
Modified: short/3D/PyLith/trunk/examples/twocells/twohex8/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twohex8/pylithapp.cfg 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/examples/twocells/twohex8/pylithapp.cfg 2008-02-27 21:14:37 UTC (rev 11274)
@@ -61,14 +61,14 @@
# materials
# Specify the material information for the problem.
# ----------------------------------------------------------------------
-# The material type is isotropic elastic formulated for plane strain.
+# Change the material type to linear Maxwell viscoelastic.
[pylithapp.timedependent.materials]
material = pylith.materials.MaxwellIsotropic3D
[pylithapp.timedependent.materials.material]
-# We give a label of 'elastic material' to this material.
-label = elastic material
+# We give a label of 'viscoelastic material' to this material.
+label = viscoelastic material
# The cells associated with this material are given a material ID of 1
# in the mesh file.
Modified: short/3D/PyLith/trunk/examples/twocells/twohex8/sheardisp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twohex8/sheardisp.cfg 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/examples/twocells/twohex8/sheardisp.cfg 2008-02-27 21:14:37 UTC (rev 11274)
@@ -22,13 +22,11 @@
# We want an implicit formulation.
formulation = pylith.problems.Implicit
-# This is a container for a boundary condition specified on six sides
-# of a rectangular solid domain.
-bc = pylith.bc.BCSixSides
+# Set bc to an array of 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.
@@ -81,3 +79,10 @@
# ----------------------------------------------------------------------
[pylithapp.problem.formulation.output.output.writer]
filename = sheardisp.vtk
+time_format = %010.1f
+
+# Give basename for VTK output of state variables.
+[pylithapp.timedependent.materials.material.output]
+cell_filter = pylith.meshio.CellFilterAvg
+writer.filename = sheardisp-statevars.vtk
+writer.time_format = %010.1f
Modified: short/3D/PyLith/trunk/examples/twocells/twoquad4/axialdisp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twoquad4/axialdisp.cfg 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/examples/twocells/twoquad4/axialdisp.cfg 2008-02-27 21:14:37 UTC (rev 11274)
@@ -29,8 +29,8 @@
# We want an implicit formulation.
formulation = pylith.problems.Implicit
-# Select a boundary condition container with 4 BCs.
-bc = pylith.bc.BCFourSides
+# Set bc to an array with 3 boundary conditions: 'x_neg', 'x_pos', 'y_neg'.
+bc = [x_neg,x_pos,y_neg]
# ----------------------------------------------------------------------
# boundary conditions
@@ -39,7 +39,7 @@
# BC for the left (-x) side of the domain.
[pylithapp.timedependent.bc.x_neg]
-# We are fixing the 0 (x) degree of freedom.
+# Fix the 0 (x) degree of freedom.
fixed_dof = [0]
# The group of vertices in the mesh file associated with this boundary
@@ -51,7 +51,7 @@
# (which uses a data file to specify a spatial variation).
db = spatialdata.spatialdb.SimpleDB
-# We are assigning the label 'Dirichlet BC -x edge' to the database.
+# Assign the label 'Dirichlet BC -x edge' to the database.
db.label = Dirichlet BC -x edge
# The name of the file containing the spatial database for the BC
@@ -63,7 +63,7 @@
# Boundary conditions to be applied to the positive x-side of the mesh.
[pylithapp.timedependent.bc.x_pos]
-# We are fixing the 0 (x) degree of freedom.
+# Fix the 0 (x) degree of freedom.
fixed_dof = [0]
# The group of vertices in the mesh file associated with this boundary
@@ -75,7 +75,7 @@
# (which uses a data file to specify a spatial variation).
db = spatialdata.spatialdb.SimpleDB
-# We are assigning the label 'Dirichlet BC +x edge' to the database.
+# Assign the label 'Dirichlet BC +x edge' to the database.
db.label = Dirichlet BC +x edge
# The name of the file containing the spatial database for the BC
@@ -99,7 +99,7 @@
# to specify a spatial variation).
db = spatialdata.spatialdb.SimpleDB
-# We are assigning the label 'Dirichlet BC -y corners' to the database.
+# Assign the label 'Dirichlet BC -y corners' to the database.
db.label = Dirichlet BC -y edge
# The name of the file containing the spatial database for the BC
Modified: short/3D/PyLith/trunk/examples/twocells/twoquad4/axialtract.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twoquad4/axialtract.cfg 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/examples/twocells/twoquad4/axialtract.cfg 2008-02-27 21:14:37 UTC (rev 11274)
@@ -30,9 +30,8 @@
# We want an implicit formulation.
formulation = pylith.problems.Implicit
-# Select a boundary condition container with 4 BCs. The default BC for
-# each side is a Dirichlet (prescribed displacement) BC.
-bc = pylith.bc.BCFourSides
+# Set bc to an array with 3 boundary conditions: 'x_neg', 'x_pos', 'y_neg'.
+bc = [x_neg,x_pos,y_neg]
# Change the BC on the +x side of the domain to a Neumann (traction) BC.
bc.x_pos = pylith.bc.Neumann
Modified: short/3D/PyLith/trunk/examples/twocells/twoquad4/dislocation.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twoquad4/dislocation.cfg 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/examples/twocells/twoquad4/dislocation.cfg 2008-02-27 21:14:37 UTC (rev 11274)
@@ -30,11 +30,11 @@
# We want an implicit formulation.
formulation = pylith.problems.Implicit
-# Select a boundary condition container with 4 BCs.
-bc = pylith.bc.BCFourSides
+# Set bc to an array with 2 boundary conditions: 'x_neg' and 'x_pos'.
+bc = [x_neg,x_pos]
-# This is a container for a single fault.
-interfaces = pylith.faults.SingleFault
+# Set interfaces to an array with 1 fault: 'fault'.
+interfaces = [fault]
# ----------------------------------------------------------------------
# boundary conditions
Modified: short/3D/PyLith/trunk/examples/twocells/twoquad4/sheardisp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twoquad4/sheardisp.cfg 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/examples/twocells/twoquad4/sheardisp.cfg 2008-02-27 21:14:37 UTC (rev 11274)
@@ -21,9 +21,8 @@
# We want an implicit formulation.
formulation = pylith.problems.Implicit
-# This is a container for a boundary condition specified on four sides
-# of a rectangular domain.
-bc = pylith.bc.BCFourSides
+# Set bc to an array with 2 boundary conditions: 'x_neg' and 'x_pos'.
+bc = [x_neg,x_pos]
# ----------------------------------------------------------------------
# boundary conditions
Modified: short/3D/PyLith/trunk/examples/twocells/twotet4/axialdisp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twotet4/axialdisp.cfg 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/examples/twocells/twotet4/axialdisp.cfg 2008-02-27 21:14:37 UTC (rev 11274)
@@ -22,8 +22,8 @@
# 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
+# Set bc to an array of 1 boundary condition: 'bc'.
+bc = [bc]
# ----------------------------------------------------------------------
# boundary conditions
@@ -55,6 +55,11 @@
# ----------------------------------------------------------------------
# output
# ----------------------------------------------------------------------
-# Give basename for vtk output.
+# Give basename for VTK output of solution over domain.
[pylithapp.problem.formulation.output.output.writer]
filename = axialdisp.vtk
+
+# Give basename for VTK output of state variables.
+[pylithapp.timedependent.materials.material.output]
+cell_filter = pylith.meshio.CellFilterAvg
+writer.filename = axialdisp-statevars.vtk
Modified: short/3D/PyLith/trunk/examples/twocells/twotet4/dislocation.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twotet4/dislocation.cfg 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/examples/twocells/twotet4/dislocation.cfg 2008-02-27 21:14:37 UTC (rev 11274)
@@ -30,11 +30,11 @@
# We want an implicit formulation.
formulation = pylith.problems.Implicit
-# This is a container for uniform boundary conditions.
-bc = pylith.bc.BCSingle
+# Set bc to an array of 1 boundary condition: 'bc'.
+bc = [bc]
-# This is a container for a single fault.
-interfaces = pylith.faults.SingleFault
+# Set interfaces to an array of 1 fault: 'fault'.
+interfaces = [fault]
# ----------------------------------------------------------------------
# boundary conditions
@@ -101,10 +101,14 @@
# ----------------------------------------------------------------------
# output
# ----------------------------------------------------------------------
-# Give basename for vtk output.
+# Give basename for VTK domain output of solution over domain.
[pylithapp.problem.formulation.output.output.writer]
filename = dislocation.vtk
-# Give basename for vtk fault output.
+# Give basename for VTK fault output.
[pylithapp.timedependent.interfaces.fault.output.writer]
filename = dislocation-fault.vtk
+
+# Give basename for VTK output of state variables.
+[pylithapp.timedependent.materials.material.output.writer]
+filename = dislocation-statevars.vtk
Modified: short/3D/PyLith/trunk/examples/twocells/twotet4-geoproj/dislocation.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twotet4-geoproj/dislocation.cfg 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/examples/twocells/twotet4-geoproj/dislocation.cfg 2008-02-27 21:14:37 UTC (rev 11274)
@@ -30,11 +30,11 @@
# We want an implicit formulation.
formulation = pylith.problems.Implicit
-# This is a container for uniform boundary conditions.
-bc = pylith.bc.BCSingle
+# Set bc to an array of 1 boundary condition: 'bc'.
+bc = [bc]
-# This is a container for a single fault.
-interfaces = pylith.faults.SingleFault
+# Set interfaces to an array of 1 fault: 'fault'.
+interfaces = [fault]
# ----------------------------------------------------------------------
# boundary conditions
@@ -49,13 +49,6 @@
# '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 = dislocation_disp.spatialdb
-
# ----------------------------------------------------------------------
# faults
# ----------------------------------------------------------------------
@@ -105,3 +98,11 @@
# Give basename for vtk output.
[pylithapp.problem.formulation.output.output.writer]
filename = dislocation.vtk
+
+# Give basename for VTK fault output.
+[pylithapp.timedependent.interfaces.fault.output.writer]
+filename = dislocation-fault.vtk
+
+# Give basename for VTK output of state variables.
+[pylithapp.timedependent.materials.material.output.writer]
+filename = dislocation-statevars.vtk
Modified: short/3D/PyLith/trunk/examples/twocells/twotet4-geoproj/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twotet4-geoproj/pylithapp.cfg 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/examples/twocells/twotet4-geoproj/pylithapp.cfg 2008-02-27 21:14:37 UTC (rev 11274)
@@ -43,6 +43,8 @@
filename = twotet4.mesh
coordsys.space_dim = 3
+# Specify the information defining the geographic projected coordinate
+# system for the mesh.
[pylithapp.mesh_generator.importer.coordsys]
datum_horiz = NAD27
datum_vert = mean sea level
@@ -55,11 +57,6 @@
# ----------------------------------------------------------------------
# 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]
@@ -86,7 +83,7 @@
# The properties for this material are obtained from the SCEC CVM-H.
db = spatialdata.spatialdb.SCECCVMH
-db.data_dir = /Users/brad/data/sceccvm-h/vx52/bin
+db.data_dir = /home/brad/data/sceccvm-h/vx53/bin
# We are doing 3D quadrature for a tetrahedron.
quadrature = pylith.feassemble.quadrature.Quadrature3D
@@ -96,10 +93,6 @@
# ----------------------------------------------------------------------
# PETSc
# ----------------------------------------------------------------------
-# We are using all of the default settings for PETSc except for specifying
-# the block Jacobi preconditioner.
-# Additional PETSc command-line arguments may be found in the PETSc
-# documentation.
[pylithapp.petsc]
pc_type = jacobi
ksp_rtol = 1.0e-8
@@ -109,4 +102,4 @@
ksp_max_it = 2000
ksp_gmres_restart = 100
#start_in_debugger = true
-debugger_timeout = 100
+#debugger_timeout = 100
Modified: short/3D/PyLith/trunk/examples/twocells/twotri3/axialdisp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twotri3/axialdisp.cfg 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/examples/twocells/twotri3/axialdisp.cfg 2008-02-27 21:14:37 UTC (rev 11274)
@@ -30,8 +30,8 @@
# We want an implicit formulation.
formulation = pylith.problems.Implicit
-# Select a boundary condition container with 1 BC.
-bc = pylith.bc.BCSingle
+# Set BC to array with 1 boundary condition called 'bc'.
+bc = [bc]
# ----------------------------------------------------------------------
# boundary conditions
Modified: short/3D/PyLith/trunk/examples/twocells/twotri3/dislocation.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twotri3/dislocation.cfg 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/examples/twocells/twotri3/dislocation.cfg 2008-02-27 21:14:37 UTC (rev 11274)
@@ -36,11 +36,11 @@
# We want an implicit formulation.
formulation = pylith.problems.Implicit
-# Select a boundary condition container with 1 BC.
-bc = pylith.bc.BCSingle
+# Set bc to an array with 1 boundary condition called 'bc'.
+bc = [bc]
-# Select a fault container with 1 fault.
-interfaces = pylith.faults.SingleFault
+# Set interfaces to an array with 1 fault called 'fault'.
+interfaces = [fault]
# ----------------------------------------------------------------------
# boundary conditions
Modified: short/3D/PyLith/trunk/examples/twocells/twotri3/sheardisp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twotri3/sheardisp.cfg 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/examples/twocells/twotri3/sheardisp.cfg 2008-02-27 21:14:37 UTC (rev 11274)
@@ -34,10 +34,9 @@
# We want an implicit formulation.
formulation = pylith.problems.Implicit
-formulation.solver = pylith.solver.SolverLinear
-# Select a boundary condition container with 4 BCs.
-bc = pylith.bc.BCFourSides
+# Set BC to array with 2 boundary conditions: 'x_neg' and 'x_pos'.
+bc = [x_neg,x_pos]
# ----------------------------------------------------------------------
# boundary conditions
Modified: short/3D/PyLith/trunk/examples/twofaults/2d/dislocation_1fault.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twofaults/2d/dislocation_1fault.cfg 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/examples/twofaults/2d/dislocation_1fault.cfg 2008-02-27 21:14:37 UTC (rev 11274)
@@ -30,11 +30,11 @@
# We want an implicit formulation.
formulation = pylith.problems.Implicit
-# This is a container for a boundary condition specified at a point.
-bc = pylith.bc.BCFourSides
+# Set bc to an array of 1 boundary condition: 'bc'.
+bc = [bc]
-# This is a container for two faults
-interfaces = pylith.faults.SingleFault
+# Set interfaces to an array of 1 fault: 'fault'.
+interfaces = [fault]
# ----------------------------------------------------------------------
# boundary conditions
@@ -42,11 +42,9 @@
# Provide information on the boundary conditions.
# Boundary conditions to be applied to the negative x-side of the mesh.
-[pylithapp.timedependent.bc.x_neg]
+[pylithapp.timedependent.bc.bc]
fixed_dof = [0, 1]
label = x_neg
-db.label = Dirichlet BC -x edge
-db.iohandler.filename = displacement.spatialdb
# ----------------------------------------------------------------------
# faults
@@ -60,6 +58,7 @@
mat_db.iohandler.filename = matprops.spatialdb
quadrature = pylith.feassemble.quadrature.Quadrature1Din2D
quadrature.cell.shape = line
+
[pylithapp.timedependent.interfaces.fault.eq_src.slip_function]
slip.iohandler.filename = fault_1_slip.spatialdb
slip.query_type = nearest
@@ -71,4 +70,17 @@
# ----------------------------------------------------------------------
# Give basename for vtk output.
[pylithapp.problem.formulation.output.output.writer]
-filename = onefault2d.vtk
+filename = onefault.vtk
+
+# Give basename for VTK fault output.
+[pylithapp.timedependent.interfaces.fault.output.writer]
+filename = onefault-fault.vtk
+
+# Give basename for VTK output of state variables.
+[pylithapp.timedependent.materials.material_1.output]
+cell_filter = pylith.meshio.CellFilterAvg
+writer.filename = onefault-statevars-mat1.vtk
+
+[pylithapp.timedependent.materials.material_2.output]
+cell_filter = pylith.meshio.CellFilterAvg
+writer.filename = onefault-statevars-mat2.vtk
Modified: short/3D/PyLith/trunk/examples/twofaults/2d/dislocation_2faults.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twofaults/2d/dislocation_2faults.cfg 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/examples/twofaults/2d/dislocation_2faults.cfg 2008-02-27 21:14:37 UTC (rev 11274)
@@ -30,11 +30,11 @@
# We want an implicit formulation.
formulation = pylith.problems.Implicit
-# This is a container for a boundary condition specified at a point.
-bc = pylith.bc.BCFourSides
+# Set bc to an array of 1 boundary condition: 'bc'.
+bc = [bc]
-# This is a container for two faults
-interfaces = twofaults
+# Set interfaces to an array of 2 faults: 'fault_1' and 'fault_2'.
+interfaces = [fault_1,fault_2]
# ----------------------------------------------------------------------
# boundary conditions
@@ -42,11 +42,9 @@
# Provide information on the boundary conditions.
# Boundary conditions to be applied to the negative x-side of the mesh.
-[pylithapp.timedependent.bc.x_neg]
+[pylithapp.timedependent.bc.bc]
fixed_dof = [0, 1]
label = x_neg
-db.label = Dirichlet BC -x edge
-db.iohandler.filename = displacement.spatialdb
# ----------------------------------------------------------------------
# faults
@@ -54,24 +52,26 @@
# Provide information on the fault (interface).
[pylithapp.timedependent.interfaces]
-# Define fault 1 properties.
+# Define parameters for fault_1.
[pylithapp.timedependent.interfaces.fault_1]
label = fault_1
mat_db.iohandler.filename = matprops.spatialdb
quadrature = pylith.feassemble.quadrature.Quadrature1Din2D
quadrature.cell.shape = line
+
[pylithapp.timedependent.interfaces.fault_1.eq_src.slip_function]
slip.iohandler.filename = fault_1_slip.spatialdb
slip.query_type = nearest
slip_rate.iohandler.filename = dislocation_sliprate.spatialdb
slip_time.iohandler.filename = dislocation_sliptime.spatialdb
-# Define fault 2 properties.
+# Define parameters for fault_2.
[pylithapp.timedependent.interfaces.fault_2]
label = fault_2
mat_db.iohandler.filename = matprops.spatialdb
quadrature = pylith.feassemble.quadrature.Quadrature1Din2D
quadrature.cell.shape = line
+
[pylithapp.timedependent.interfaces.fault_2.eq_src.slip_function]
slip.iohandler.filename = fault_2_slip.spatialdb
slip.query_type = nearest
@@ -83,4 +83,21 @@
# ----------------------------------------------------------------------
# Give basename for vtk output.
[pylithapp.problem.formulation.output.output.writer]
-filename = twofaults2d.vtk
+filename = twofaults.vtk
+
+# Give basename for VTK fault output.
+[pylithapp.timedependent.interfaces.fault_1.output.writer]
+filename = twofaults-fault1.vtk
+
+# Give basename for VTK fault output.
+[pylithapp.timedependent.interfaces.fault_2.output.writer]
+filename = twofaults-fault2.vtk
+
+# Give basename for VTK output of state variables.
+[pylithapp.timedependent.materials.material_1.output]
+cell_filter = pylith.meshio.CellFilterAvg
+writer.filename = twofaults-statevars-mat1.vtk
+
+[pylithapp.timedependent.materials.material_2.output]
+cell_filter = pylith.meshio.CellFilterAvg
+writer.filename = twofaults-statevars-mat2.vtk
Deleted: short/3D/PyLith/trunk/examples/twofaults/2d/displacement.spatialdb
===================================================================
--- short/3D/PyLith/trunk/examples/twofaults/2d/displacement.spatialdb 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/examples/twofaults/2d/displacement.spatialdb 2008-02-27 21:14:37 UTC (rev 11274)
@@ -1,43 +0,0 @@
-#SPATIAL.ascii 1
-
-// This database is used to specify the boundary conditions for the
-// dislocation (kinematic fault) example.
-
-// This follows the format for a Simple DB (the only type presently available).
-SimpleDB {
-
- // There are two values specified in the database, corresponding to the
- // constraint values for the x (dof-0) and y (dof-1) degrees of freedom.
- num-values = 2
- value-names = dof-0 dof-1
-
- // The constraint values (displacements) have units of meters.
- value-units = m m
-
- // The values are specified at one spatial location.
- num-locs = 1
-
- // The dimension of the spatial distribution is 0, since the data
- // is specified at a single point.
- 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.
-// As described in dislocation.cfg, this database will be used to specify
-// data along an edge (pylith.bc.BCFourSides).
-// The entries are:
-// X-coord, Y-coord, dof-0 (x constraint), dof-1 (y constraint).
- 0.0 0.0 0.0 0.0
Deleted: short/3D/PyLith/trunk/examples/twofaults/2d/faults.odb
===================================================================
--- short/3D/PyLith/trunk/examples/twofaults/2d/faults.odb 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/examples/twofaults/2d/faults.odb 2008-02-27 21:14:37 UTC (rev 11274)
@@ -1,131 +0,0 @@
-#!/usr/bin/env python
-#
-# ----------------------------------------------------------------------
-#
-# Brad T. Aagaard
-# U.S. Geological Survey
-#
-# <LicenseText>
-#
-# ----------------------------------------------------------------------
-#
-
-## Template for user-defined faults container.
-##
-## Copy this file to your working directory and rename it as
-## appropriate. Note: the extension MUST rename ".odb" for PyLith to
-## find it.
-##
-## To use this container, in your .cfg file, bind this component to
-## the interfaces facility of the problem:
-##
-## [pylithapp.timedependent]
-## interfaces = MyFaults
-##
-## You can then set the properties of the facilities in this container
-## just as you would any other Pyre component.
-##
-## For example:
-##
-## [pylithapp.timedependent.interfaces.san_andreas]
-## label = San Andreas Fault
-## id = 2
-
-# Parent class
-from pylith.utils.ObjectBin import ObjectBin
-
-# Define new faults container class
-#
-# You can change the name of this class, but the name here MUST match
-# the one in the object_bin() function at the bottom of this file.
-class MyFaults(ObjectBin):
- """
- User-defined boundary conditions container.
-
- Factory: object_bin
- """
-
- # INVENTORY //////////////////////////////////////////////////////////
-
- class Inventory(ObjectBin.Inventory):
- """
- Python object for managing MyBC facilities and properties.
- """
-
- # Define the facilities in this faults container.
- #
- # You must import any Python objects that are bound to the
- # facilities.
- #
- # Synopsis:
- #
- # facilityName = pyre.inventory.facility("facility_name",
- # family="fault", factory=ClassNameOfComponent)
- #
- # where ClassNameOfComponent is the class name of the default
- # component to bind to the facility 'facility_name'.
-
- import pyre.inventory
-
- from pylith.faults.FaultCohesiveKin import FaultCohesiveKin
-
- sanandreas = pyre.inventory.facility("san_andreas", family="fault",
- factory=FaultCohesiveKin)
- sanandreas.meta['tip'] = "San Andreas fault."
-
- sanjacinto = pyre.inventory.facility("san_jacinto", family="fault",
- factory=FaultCohesiveKin)
- sanjacinto.meta['tip'] = "San Jacinto fault."
-
-
- # PUBLIC METHODS /////////////////////////////////////////////////////
-
- # The 'name' argument on the next line defines the default name used
- # to configure this component. Generally, we use the class name in
- # lowercase.
- def __init__(self, name="myfaults"):
- """
- Constructor.
- """
- ObjectBin.__init__(self, name)
- return
-
-
- # PRIVATE METHODS ////////////////////////////////////////////////////
-
- def _configure(self):
- """
- Set attributes from inventory.
- """
- ObjectBin._configure(self)
-
- # Define how the components are ordered in the container.
- #
- # Synopsis:
- #
- # self.bin = [self.inventory.facilityName1,
- # self.inventory.facilityName2]
- #
- # Replace the names of the facilities as desired. The names MUST
- # match the VARIABLES in the inventory, as opposed to the names
- # used to bind the components to the facilities, which is the
- # first arugment in the calls to pyre.inventory.facility()).
- #
- # DO NOT change the name 'self.bin'.
- self.bin = [self.inventory.sanjacinto,
- self.inventory.sanandreas]
- return
-
-
-# FACTORIES ////////////////////////////////////////////////////////////
-
-def object_bin():
- """
- Factory associated with MyFaults.
- """
- # The class name for the container used above MUST match the name
- # used on the next line.
- return MyFaults()
-
-
-# End of file
Modified: short/3D/PyLith/trunk/examples/twofaults/2d/pylithapp.cfg
===================================================================
--- short/3D/PyLith/trunk/examples/twofaults/2d/pylithapp.cfg 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/examples/twofaults/2d/pylithapp.cfg 2008-02-27 21:14:37 UTC (rev 11274)
@@ -47,17 +47,12 @@
# ----------------------------------------------------------------------
# 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 = 0.0*s
default_dt = 1.0*s
-dimension = 2
+dimension = 2 ; spatial dimension of problem
formulation = pylith.problems.Implicit
# ----------------------------------------------------------------------
@@ -66,7 +61,7 @@
# Specify the material information for the problem.
# The material type is isotropic elastic formulated for plane strain.
[pylithapp.timedependent]
-materials = twomaterials
+materials = [material_1,material_2]
[pylithapp.timedependent.materials]
material_1 = pylith.materials.ElasticPlaneStrain
Deleted: short/3D/PyLith/trunk/examples/twofaults/2d/twofaults.odb
===================================================================
--- short/3D/PyLith/trunk/examples/twofaults/2d/twofaults.odb 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/examples/twofaults/2d/twofaults.odb 2008-02-27 21:14:37 UTC (rev 11274)
@@ -1,131 +0,0 @@
-#!/usr/bin/env python
-#
-# ----------------------------------------------------------------------
-#
-# Brad T. Aagaard
-# U.S. Geological Survey
-#
-# <LicenseText>
-#
-# ----------------------------------------------------------------------
-#
-
-## Template for user-defined faults container.
-##
-## Copy this file to your working directory and rename it as
-## appropriate. Note: the extension MUST rename ".odb" for PyLith to
-## find it.
-##
-## To use this container, in your .cfg file, bind this component to
-## the interfaces facility of the problem:
-##
-## [pylithapp.timedependent]
-## interfaces = MyFaults
-##
-## You can then set the properties of the facilities in this container
-## just as you would any other Pyre component.
-##
-## For example:
-##
-## [pylithapp.timedependent.interfaces.san_andreas]
-## label = San Andreas Fault
-## id = 2
-
-# Parent class
-from pylith.utils.ObjectBin import ObjectBin
-
-# Define new faults container class
-#
-# You can change the name of this class, but the name here MUST match
-# the one in the object_bin() function at the bottom of this file.
-class TwoFaults(ObjectBin):
- """
- User-defined boundary conditions container.
-
- Factory: object_bin
- """
-
- # INVENTORY //////////////////////////////////////////////////////////
-
- class Inventory(ObjectBin.Inventory):
- """
- Python object for managing MyBC facilities and properties.
- """
-
- # Define the facilities in this faults container.
- #
- # You must import any Python objects that are bound to the
- # facilities.
- #
- # Synopsis:
- #
- # facilityName = pyre.inventory.facility("facility_name",
- # family="fault", factory=ClassNameOfComponent)
- #
- # where ClassNameOfComponent is the class name of the default
- # component to bind to the facility 'facility_name'.
-
- import pyre.inventory
-
- from pylith.faults.FaultCohesiveKin import FaultCohesiveKin
-
- fault1 = pyre.inventory.facility("fault_1", family="fault",
- factory=FaultCohesiveKin)
- fault1.meta['tip'] = "First fault."
-
- fault2 = pyre.inventory.facility("fault_2", family="fault",
- factory=FaultCohesiveKin)
- fault2.meta['tip'] = "Second fault."
-
-
- # PUBLIC METHODS /////////////////////////////////////////////////////
-
- # The 'name' argument on the next line defines the default name used
- # to configure this component. Generally, we use the class name in
- # lowercase.
- def __init__(self, name="twofaults"):
- """
- Constructor.
- """
- ObjectBin.__init__(self, name)
- return
-
-
- # PRIVATE METHODS ////////////////////////////////////////////////////
-
- def _configure(self):
- """
- Set attributes from inventory.
- """
- ObjectBin._configure(self)
-
- # Define how the components are ordered in the container.
- #
- # Synopsis:
- #
- # self.bin = [self.inventory.facilityName1,
- # self.inventory.facilityName2]
- #
- # Replace the names of the facilities as desired. The names MUST
- # match the VARIABLES in the inventory, as opposed to the names
- # used to bind the components to the facilities, which is the
- # first arugment in the calls to pyre.inventory.facility()).
- #
- # DO NOT change the name 'self.bin'.
- self.bin = [self.inventory.fault1,
- self.inventory.fault2]
- return
-
-
-# FACTORIES ////////////////////////////////////////////////////////////
-
-def object_bin():
- """
- Factory associated with MyFaults.
- """
- # The class name for the container used above MUST match the name
- # used on the next line.
- return TwoFaults()
-
-
-# End of file
Deleted: short/3D/PyLith/trunk/examples/twofaults/2d/twomaterials.odb
===================================================================
--- short/3D/PyLith/trunk/examples/twofaults/2d/twomaterials.odb 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/examples/twofaults/2d/twomaterials.odb 2008-02-27 21:14:37 UTC (rev 11274)
@@ -1,131 +0,0 @@
-#!/usr/bin/env python
-#
-# ----------------------------------------------------------------------
-#
-# Brad T. Aagaard
-# U.S. Geological Survey
-#
-# <LicenseText>
-#
-# ----------------------------------------------------------------------
-#
-
-## Template for user-defined physical property container.
-##
-## Copy this file to your working directory and rename it as
-## appropriate. Note: the extension MUST rename ".odb" for PyLith to
-## find it.
-##
-## To use this container, in your .cfg file, bind this component to
-## the materials facility of the problem:
-##
-## [pylithapp.timedependent]
-## materials = MyMatBin
-##
-## You can then set the properties of the facilities in this container
-## just as you would any other Pyre component.
-##
-## For example:
-##
-## [pylithapp.timedepedent.materials.materialA]
-## label = elastic material
-## id = 1
-
-# Parent class
-from pylith.utils.ObjectBin import ObjectBin
-
-# Define new material container class
-#
-# You can change the name of this class, but the name here MUST match
-# the one in the object_bin() function at the bottom of this file.
-class MyMatBin(ObjectBin):
- """
- User-defined materials container.
-
- Factory: object_bin
- """
-
- # INVENTORY //////////////////////////////////////////////////////////
-
- class Inventory(ObjectBin.Inventory):
- """
- Python object for managing MyBC facilities and properties.
- """
-
- # Define the facilities in this material container.
- #
- # You must import any Python objects that are bound to the
- # facilities.
- #
- # Synopsis:
- #
- # facilityName = pyre.inventory.facility("facility_name",
- # family="material", factory=ClassNameOfComponent)
- #
- # where ClassNameOfComponent is the class name of the default
- # component to bind to the facility 'facility_name'.
-
- import pyre.inventory
-
- from pylith.materials.ElasticIsotropic3D import ElasticIsotropic3D
-
- material1 = pyre.inventory.facility("material_1", family="material",
- factory=ElasticIsotropic3D)
- material1.meta['tip'] = "Elastic material 1."
-
- material2 = pyre.inventory.facility("material_2", family="material",
- factory=ElasticIsotropic3D)
- material2.meta['tip'] = "Elastic material 2."
-
-
- # PUBLIC METHODS /////////////////////////////////////////////////////
-
- # The 'name' argument on the next line defines the default name used
- # to configure this component. Generally, we use the class name in
- # lowercase.
- def __init__(self, name="mymatbin"):
- """
- Constructor.
- """
- ObjectBin.__init__(self, name)
- return
-
-
- # PRIVATE METHODS ////////////////////////////////////////////////////
-
- def _configure(self):
- """
- Set attributes from inventory.
- """
- ObjectBin._configure(self)
-
- # Define how the components are ordered in the container.
- #
- # Synopsis:
- #
- # self.bin = [self.inventory.facilityName1,
- # self.inventory.facilityName2]
- #
- # Replace the names of the facilities as desired. The names MUST
- # match the VARIABLES in the inventory, as opposed to the names
- # used to bind the components to the facilities, which is the
- # first arugment in the calls to pyre.inventory.facility()).
- #
- # DO NOT change the name 'self.bin'.
- self.bin = [self.inventory.material1,
- self.inventory.material2]
- return
-
-
-# FACTORIES ////////////////////////////////////////////////////////////
-
-def object_bin():
- """
- Factory associated with MyMatBin.
- """
- # The class name for the container used above MUST match the name
- # used on the next line.
- return MyMatBin()
-
-
-# End of file
Modified: short/3D/PyLith/trunk/pylith/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/pylith/Makefile.am 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/pylith/Makefile.am 2008-02-27 21:14:37 UTC (rev 11274)
@@ -19,10 +19,6 @@
bc/DirichletPoints.py \
bc/DirichletBoundary.py \
bc/FixedDOFDB.py \
- bc/BCSingle.py \
- bc/BCTwoSides.py \
- bc/BCFourSides.py \
- bc/BCSixSides.py \
bc/Neumann.py \
faults/__init__.py \
faults/BruneSlipFn.py \
@@ -30,7 +26,6 @@
faults/Fault.py \
faults/FaultCohesive.py \
faults/FaultCohesiveKin.py \
- faults/SingleFault.py \
faults/SlipTimeFn.py \
feassemble/__init__.py \
feassemble/Constraint.py \
@@ -65,7 +60,6 @@
feassemble/geometry/GeometryTet3D.py \
feassemble/geometry/GeometryHex3D.py \
materials/__init__.py \
- materials/BiMaterial.py \
materials/ElasticMaterial.py \
materials/ElasticIsotropic3D.py \
materials/ElasticPlaneStrain.py \
@@ -81,7 +75,6 @@
meshio/CellFilterAvg.py \
meshio/DataWriter.py \
meshio/DataWriterVTK.py \
- meshio/DoubleOutput.py \
meshio/MeshIO.py \
meshio/MeshIOAscii.py \
meshio/MeshIOCubit.py \
Modified: short/3D/PyLith/trunk/pylith/PyLithApp.py
===================================================================
--- short/3D/PyLith/trunk/pylith/PyLithApp.py 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/pylith/PyLithApp.py 2008-02-27 21:14:37 UTC (rev 11274)
@@ -86,7 +86,7 @@
# Create mesh (adjust to account for interfaces (faults) if necessary)
interfaces = None
if "interfaces" in dir(self.problem):
- interfaces = self.problem.interfaces.bin
+ interfaces = self.problem.interfaces.components()
mesh = self.mesher.create(interfaces)
self._debug.log(resourceUsageString())
Deleted: short/3D/PyLith/trunk/pylith/bc/BCFourSides.py
===================================================================
--- short/3D/PyLith/trunk/pylith/bc/BCFourSides.py 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/pylith/bc/BCFourSides.py 2008-02-27 21:14:37 UTC (rev 11274)
@@ -1,106 +0,0 @@
-#!/usr/bin/env python
-#
-# ----------------------------------------------------------------------
-#
-# Brad T. Aagaard
-# U.S. Geological Survey
-#
-# <LicenseText>
-#
-# ----------------------------------------------------------------------
-#
-
-## @file pylith/bc/BCFourSides.py
-##
-## @brief Python boundary conditions container for a 2-D quadrilateral.
-##
-## Boundary conditions can be applied to any of the four edges.
-##
-## Factory: object_bin
-
-from pylith.utils.ObjectBin import ObjectBin
-
-# BCFourSides class
-class BCFourSides(ObjectBin):
- """
- Python boundary conditions container for a 2-D quadrilateral.
-
- Boundary conditions can be applied to any of the four edges.
-
- Factory: object_bin
- """
-
- # INVENTORY //////////////////////////////////////////////////////////
-
- class Inventory(ObjectBin.Inventory):
- """
- Python object for managing BCFourSides facilities and properties.
- """
-
- ## @class Inventory
- ## Python object for managing BCFourSides facilities and properties.
- ##
- ## \b Properties
- ## @li None
- ##
- ## \b Facilities
- ## @li \b x_pos Boundary condition on +x face of 2-D box.
- ## @li \b x_neg Boundary condition on -x face of 2-D box.
- ## @li \b y_pos Boundary condition on +y face of 2-D box.
- ## @li \b y_neg Boundary condition on -y face of 2-D box.
-
- import pyre.inventory
-
- from pylith.bc.DirichletPoints import DirichletPoints
-
- xPos = pyre.inventory.facility("x_pos", family="boundary_condition",
- factory=DirichletPoints)
- xPos.meta['tip'] = "Boundary condition on +x face of 2-D box."
-
- xNeg = pyre.inventory.facility("x_neg", family="boundary_condition",
- factory=DirichletPoints)
- xNeg.meta['tip'] = "Boundary condition on -x face of 2-D box."
-
- yPos = pyre.inventory.facility("y_pos", family="boundary_condition",
- factory=DirichletPoints)
- yPos.meta['tip'] = "Boundary condition on +y face of 2-D box."
-
- yNeg = pyre.inventory.facility("y_neg", family="boundary_condition",
- factory=DirichletPoints)
- yNeg.meta['tip'] = "Boundary condition on -y face of 2-D box."
-
-
- # PUBLIC METHODS /////////////////////////////////////////////////////
-
- def __init__(self, name="bcfoursides"):
- """
- Constructor.
- """
- ObjectBin.__init__(self, name)
- return
-
-
- # PRIVATE METHODS ////////////////////////////////////////////////////
-
- def _configure(self):
- """
- Set attributes from inventory.
- """
- ObjectBin._configure(self)
- self.bin = [self.inventory.xPos,
- self.inventory.xNeg,
- self.inventory.yPos,
- self.inventory.yNeg]
- return
-
-
-# FACTORIES ////////////////////////////////////////////////////////////
-
-def object_bin():
- """
- Factory associated with BCFourSides.
- """
- return BCFourSides()
-
-
-# End of file
Deleted: short/3D/PyLith/trunk/pylith/bc/BCSingle.py
===================================================================
--- short/3D/PyLith/trunk/pylith/bc/BCSingle.py 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/pylith/bc/BCSingle.py 2008-02-27 21:14:37 UTC (rev 11274)
@@ -1,84 +0,0 @@
-#!/usr/bin/env python
-#
-# ----------------------------------------------------------------------
-#
-# Brad T. Aagaard
-# U.S. Geological Survey
-#
-# <LicenseText>
-#
-# ----------------------------------------------------------------------
-#
-
-## @file pylith/bc/BCSingle.py
-##
-## @brief Python boundary conditions container for one boundary condition.
-##
-## Factory: object_bin
-
-from pylith.utils.ObjectBin import ObjectBin
-
-# BCSingle class
-class BCSingle(ObjectBin):
- """
- Python boundary conditions container for one boundary condition.
-
- Factory: object_bin
- """
-
- # INVENTORY //////////////////////////////////////////////////////////
-
- class Inventory(ObjectBin.Inventory):
- """
- Python object for managing BCSingle facilities and properties.
- """
-
- ## @class Inventory
- ## Python object for managing BCSingle facilities and properties.
- ##
- ## \b Properties
- ## @li None
- ##
- ## \b Facilities
- ## @li \b bc Boundary condition.
-
- import pyre.inventory
-
- from pylith.bc.DirichletPoints import DirichletPoints
-
- bc = pyre.inventory.facility("bc", family="boundary_condition",
- factory=DirichletPoints)
- bc.meta['tip'] = "Boundary condition."
-
-
- # PUBLIC METHODS /////////////////////////////////////////////////////
-
- def __init__(self, name="bcsingle"):
- """
- Constructor.
- """
- ObjectBin.__init__(self, name)
- return
-
-
- # PRIVATE METHODS ////////////////////////////////////////////////////
-
- def _configure(self):
- """
- Set attributes from inventory.
- """
- ObjectBin._configure(self)
- self.bin = [self.inventory.bc]
- return
-
-
-# FACTORIES ////////////////////////////////////////////////////////////
-
-def object_bin():
- """
- Factory associated with BCSingle.
- """
- return BCSingle()
-
-
-# End of file
Deleted: short/3D/PyLith/trunk/pylith/bc/BCSixSides.py
===================================================================
--- short/3D/PyLith/trunk/pylith/bc/BCSixSides.py 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/pylith/bc/BCSixSides.py 2008-02-27 21:14:37 UTC (rev 11274)
@@ -1,118 +0,0 @@
-#!/usr/bin/env python
-#
-# ----------------------------------------------------------------------
-#
-# Brad T. Aagaard
-# U.S. Geological Survey
-#
-# <LicenseText>
-#
-# ----------------------------------------------------------------------
-#
-
-## @file pylith/bc/BCSixSides.py
-##
-## @brief Python boundary conditions container for a 3-D box.
-##
-## Boundary conditions can be applied to any of the six faces.
-##
-## Factory: object_bin
-
-from pylith.utils.ObjectBin import ObjectBin
-
-# BCSixSides class
-class BCSixSides(ObjectBin):
- """
- Python boundary conditions container for a 3-D box.
-
- Boundary conditions can be applied to any of the six faces.
-
- Factory: object_bin
- """
-
- # INVENTORY //////////////////////////////////////////////////////////
-
- class Inventory(ObjectBin.Inventory):
- """
- Python object for managing BCSixSides facilities and properties.
- """
-
- ## @class Inventory
- ## Python object for managing BCSixSides facilities and properties.
- ##
- ## \b Properties
- ## @li None
- ##
- ## \b Facilities
- ## @li \b x_pos Boundary condition on +x face of 3-D box.
- ## @li \b x_neg Boundary condition on -x face of 3-D box.
- ## @li \b y_pos Boundary condition on +y face of 3-D box.
- ## @li \b y_neg Boundary condition on -y face of 3-D box.
- ## @li \b z_pos Boundary condition on +z face of 3-D box.
- ## @li \b z_neg Boundary condition on -z face of 3-D box.
-
- import pyre.inventory
-
- from pylith.bc.DirichletPoints import DirichletPoints
-
- xPos = pyre.inventory.facility("x_pos", family="boundary_condition",
- factory=DirichletPoints)
- xPos.meta['tip'] = "Boundary condition on +x face of 3-D box."
-
- xNeg = pyre.inventory.facility("x_neg", family="boundary_condition",
- factory=DirichletPoints)
- xNeg.meta['tip'] = "Boundary condition on -x face of 3-D box."
-
- yPos = pyre.inventory.facility("y_pos", family="boundary_condition",
- factory=DirichletPoints)
- yPos.meta['tip'] = "Boundary condition on +y face of 3-D box."
-
- yNeg = pyre.inventory.facility("y_neg", family="boundary_condition",
- factory=DirichletPoints)
- yNeg.meta['tip'] = "Boundary condition on -y face of 3-D box."
-
- zPos = pyre.inventory.facility("z_pos", family="boundary_condition",
- factory=DirichletPoints)
- zPos.meta['tip'] = "Boundary condition on +z face of 3-D box."
-
- zNeg = pyre.inventory.facility("z_neg", family="boundary_condition",
- factory=DirichletPoints)
- zNeg.meta['tip'] = "Boundary condition on -z face of 3-D box."
-
-
- # PUBLIC METHODS /////////////////////////////////////////////////////
-
- def __init__(self, name="bcsixsides"):
- """
- Constructor.
- """
- ObjectBin.__init__(self, name)
- return
-
-
- # PRIVATE METHODS ////////////////////////////////////////////////////
-
- def _configure(self):
- """
- Set attributes from inventory.
- """
- ObjectBin._configure(self)
- self.bin = [self.inventory.xPos,
- self.inventory.xNeg,
- self.inventory.yPos,
- self.inventory.yNeg,
- self.inventory.zPos,
- self.inventory.zNeg]
- return
-
-
-# FACTORIES ////////////////////////////////////////////////////////////
-
-def object_bin():
- """
- Factory associated with BCSixSides.
- """
- return BCSixSides()
-
-
-# End of file
Deleted: short/3D/PyLith/trunk/pylith/bc/BCTwoSides.py
===================================================================
--- short/3D/PyLith/trunk/pylith/bc/BCTwoSides.py 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/pylith/bc/BCTwoSides.py 2008-02-27 21:14:37 UTC (rev 11274)
@@ -1,94 +0,0 @@
-#!/usr/bin/env python
-#
-# ----------------------------------------------------------------------
-#
-# Brad T. Aagaard
-# U.S. Geological Survey
-#
-# <LicenseText>
-#
-# ----------------------------------------------------------------------
-#
-
-## @file pylith/bc/BCTwoSides.py
-##
-## @brief Python boundary conditions container for a 1-D box.
-##
-## Boundary conditions can be applied to any two points.
-##
-## Factory: object_bin
-
-from pylith.utils.ObjectBin import ObjectBin
-
-# BCTwoSides class
-class BCTwoSides(ObjectBin):
- """
- Python boundary conditions container for a 1-D box.
-
- Boundary conditions can be applied to any two points.
-
- Factory: object_bin
- """
-
- # INVENTORY //////////////////////////////////////////////////////////
-
- class Inventory(ObjectBin.Inventory):
- """
- Python object for managing BCTwoSides facilities and properties.
- """
-
- ## @class Inventory
- ## Python object for managing BCTwoSides facilities and properties.
- ##
- ## \b Properties
- ## @li None
- ##
- ## \b Facilities
- ## @li \b pos Boundary condition on +x face of 1-D box.
- ## @li \b neg Boundary condition on -x face of 1-D box.
-
- import pyre.inventory
-
- from pylith.bc.DirichletPoints import DirichletPoints
-
- pos = pyre.inventory.facility("pos", family="boundary_condition",
- factory=DirichletPoints)
- pos.meta['tip'] = "Boundary condition on positive face of 1-D box."
-
- neg = pyre.inventory.facility("neg", family="boundary_condition",
- factory=DirichletPoints)
- neg.meta['tip'] = "Boundary condition on negative face of 1-D box."
-
-
- # PUBLIC METHODS /////////////////////////////////////////////////////
-
- def __init__(self, name="bctwosides"):
- """
- Constructor.
- """
- ObjectBin.__init__(self, name)
- return
-
-
- # PRIVATE METHODS ////////////////////////////////////////////////////
-
- def _configure(self):
- """
- Set attributes from inventory.
- """
- ObjectBin._configure(self)
- self.bin = [self.inventory.pos,
- self.inventory.neg]
- return
-
-
-# FACTORIES ////////////////////////////////////////////////////////////
-
-def object_bin():
- """
- Factory associated with BCTwoSides.
- """
- return BCTwoSides()
-
-
-# End of file
Modified: short/3D/PyLith/trunk/pylith/bc/__init__.py
===================================================================
--- short/3D/PyLith/trunk/pylith/bc/__init__.py 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/pylith/bc/__init__.py 2008-02-27 21:14:37 UTC (rev 11274)
@@ -15,12 +15,12 @@
## @brief Python PyLith boundary condition module initialization
__all__ = ['AbsorbingDampers',
- 'BCFourSides',
- 'BCSingle',
- 'BCSixSides',
- 'BCTwoSides',
'BoundaryCondition',
- 'DirichletPoints']
+ 'DirichletBoundary',
+ 'DirichletPoints',
+ 'FixedDOFDB',
+ 'Neumann',
+ ]
# End of file
Deleted: short/3D/PyLith/trunk/pylith/faults/SingleFault.py
===================================================================
--- short/3D/PyLith/trunk/pylith/faults/SingleFault.py 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/pylith/faults/SingleFault.py 2008-02-27 21:14:37 UTC (rev 11274)
@@ -1,83 +0,0 @@
-#!/usr/bin/env python
-#
-# ----------------------------------------------------------------------
-#
-# Brad T. Aagaard
-# U.S. Geological Survey
-#
-# <LicenseText>
-#
-# ----------------------------------------------------------------------
-#
-
-## @file pylith/faults/SingleFault.py
-##
-## @brief Python faults container with one fault.
-##
-## Factory: object_bin
-
-from pylith.utils.ObjectBin import ObjectBin
-
-# SingleFault class
-class SingleFault(ObjectBin):
- """
- Python faults container with one material.
-
- Factory: object_bin
- """
-
- # INVENTORY //////////////////////////////////////////////////////////
-
- class Inventory(ObjectBin.Inventory):
- """
- Python object for managing SingleFault facilities and properties.
- """
-
- ## @class Inventory
- ## Python object for managing SingleFault facilities and properties.
- ##
- ## \b Properties
- ## @li None
- ##
- ## \b Facilities
- ## @li \b fault Fault in problem
-
- import pyre.inventory
-
- from FaultCohesiveKin import FaultCohesiveKin
- fault = pyre.inventory.facility("fault", family="fault",
- factory=FaultCohesiveKin)
- fault.meta['tip'] = "Fault in problem."
-
-
- # PUBLIC METHODS /////////////////////////////////////////////////////
-
- def __init__(self, name="fault"):
- """
- Constructor.
- """
- ObjectBin.__init__(self, name)
- return
-
-
- # PRIVATE METHODS ////////////////////////////////////////////////////
-
- def _configure(self):
- """
- Set attributes from inventory.
- """
- ObjectBin._configure(self)
- self.bin = [self.inventory.fault]
- return
-
-
-# FACTORIES ////////////////////////////////////////////////////////////
-
-def object_bin():
- """
- Factory associated with SingleFault.
- """
- return SingleFault()
-
-
-# End of file
Modified: short/3D/PyLith/trunk/pylith/faults/__init__.py
===================================================================
--- short/3D/PyLith/trunk/pylith/faults/__init__.py 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/pylith/faults/__init__.py 2008-02-27 21:14:37 UTC (rev 11274)
@@ -14,12 +14,13 @@
##
## @brief Python PyLith faults module initialization
-__all__ = ['EqKinSrc',
+__all__ = ['BruneSlipFn',
+ 'EqKinSrc',
+ 'FaultCohesiveKin',
+ 'FaultCohesive',
'Fault',
- 'FaultCohesive',
- 'FaultCohesiveKin',
- 'SlipTimeFn',
- 'BruneSlipFn']
+ 'SlipTimeFn',
+ ]
# End of file
Modified: short/3D/PyLith/trunk/pylith/feassemble/__init__.py
===================================================================
--- short/3D/PyLith/trunk/pylith/feassemble/__init__.py 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/pylith/feassemble/__init__.py 2008-02-27 21:14:37 UTC (rev 11274)
@@ -14,13 +14,16 @@
##
## @brief Python PyLith finite-element assembler module initialization
-__all__ = ['ElasticityExplicit',
+__all__ = ['Constraint',
+ 'ElasticityExplicit',
'ElasticityImplicit',
'FIATLagrange',
'FIATSimplex',
+ 'IntegratorElasticity',
'Integrator',
'ReferenceCell',
- 'quadrature']
+ 'quadrature'
+ ]
# End of file
Deleted: short/3D/PyLith/trunk/pylith/materials/BiMaterial.py
===================================================================
--- short/3D/PyLith/trunk/pylith/materials/BiMaterial.py 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/pylith/materials/BiMaterial.py 2008-02-27 21:14:37 UTC (rev 11274)
@@ -1,90 +0,0 @@
-#!/usr/bin/env python
-#
-# ----------------------------------------------------------------------
-#
-# Brad T. Aagaard
-# U.S. Geological Survey
-#
-# <LicenseText>
-#
-# ----------------------------------------------------------------------
-#
-
-## @file pylith/materials/BiMaterial.py
-##
-## @brief Python materials container with one material.
-##
-## Factory: object_bin
-
-from pylith.utils.ObjectBin import ObjectBin
-
-# BiMaterial class
-class BiMaterial(ObjectBin):
- """
- Python materials container with two materials.
-
- Factory: object_bin
- """
-
- # INVENTORY //////////////////////////////////////////////////////////
-
- class Inventory(ObjectBin.Inventory):
- """
- Python object for managing BiMaterial facilities and properties.
- """
-
- ## @class Inventory
- ## Python object for managing BiMaterial facilities and properties.
- ##
- ## \b Properties
- ## @li None
- ##
- ## \b Facilities
- ## @li \b one One material in problem
- ## @li \b two Other material in problem.
-
- import pyre.inventory
-
- from ElasticIsotropic3D import ElasticIsotropic3D
-
- one = pyre.inventory.facility("one", family="material",
- factory=ElasticIsotropic3D)
- one.meta['tip'] = "One material in problem."
-
- two = pyre.inventory.facility("two", family="material",
- factory=ElasticIsotropic3D)
- two.meta['tip'] = "Other material in problem."
-
-
- # PUBLIC METHODS /////////////////////////////////////////////////////
-
- def __init__(self, name="homogeneous"):
- """
- Constructor.
- """
- ObjectBin.__init__(self, name)
- return
-
-
- # PRIVATE METHODS ////////////////////////////////////////////////////
-
- def _configure(self):
- """
- Set attributes from inventory.
- """
- ObjectBin._configure(self)
- self.bin = [self.inventory.one,
- self.inventory.two]
- return
-
-
-# FACTORIES ////////////////////////////////////////////////////////////
-
-def object_bin():
- """
- Factory associated with BiMaterial.
- """
- return BiMaterial()
-
-
-# End of file
Modified: short/3D/PyLith/trunk/pylith/materials/__init__.py
===================================================================
--- short/3D/PyLith/trunk/pylith/materials/__init__.py 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/pylith/materials/__init__.py 2008-02-27 21:14:37 UTC (rev 11274)
@@ -14,17 +14,17 @@
## @brief Python PyLith materials module initialization
-__all__ = ['BiMaterial',
- 'ElasticMaterial',
+__all__ = ['ElasticMaterial',
'ElasticIsotropic3D',
'ElasticPlaneStrain',
'ElasticPlaneStress',
'ElasticStrain1D',
'ElasticStress1D',
+ 'GenMaxwellIsotropic3D',
'Homogeneous',
'Material',
'MaxwellIsotropic3D',
- 'GenMaxwellIsotropic3D']
+ ]
# End of file
Deleted: short/3D/PyLith/trunk/pylith/meshio/DoubleOutput.py
===================================================================
--- short/3D/PyLith/trunk/pylith/meshio/DoubleOutput.py 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/pylith/meshio/DoubleOutput.py 2008-02-27 21:14:37 UTC (rev 11274)
@@ -1,90 +0,0 @@
-#!/usr/bin/env python
-#
-# ----------------------------------------------------------------------
-#
-# Brad T. Aagaard
-# U.S. Geological Survey
-#
-# <LicenseText>
-#
-# ----------------------------------------------------------------------
-#
-
-## @file pylith/meshio/DoubleOutput.py
-##
-## @brief Python container with two output managers.
-##
-## Factory: object_bin
-
-from pylith.utils.ObjectBin import ObjectBin
-
-# DoubleOutput class
-class DoubleOutput(ObjectBin):
- """
- Python container with two output managers.
-
- Factory: object_bin
- """
-
- # INVENTORY //////////////////////////////////////////////////////////
-
- class Inventory(ObjectBin.Inventory):
- """
- Python object for managing DoubleOutput facilities and properties.
- """
-
- ## @class Inventory
- ## Python object for managing DoubleOutput facilities and properties.
- ##
- ## \b Properties
- ## @li None
- ##
- ## \b Facilities
- ## @li \b domain Output manager for domain.
- ## @li \b subdomain Output manager for subdomain.
-
- import pyre.inventory
-
- from OutputSoln import OutputSoln
- domain = pyre.inventory.facility("domain", family="output_manager",
- factory=OutputSoln)
- domain.meta['tip'] = "Output manager for domain."
-
- from OutputSolnSubset import OutputSolnSubset
- subdomain = pyre.inventory.facility("subdomain", family="output_manager",
- factory=OutputSolnSubset)
- subdomain.meta['tip'] = "Output manager for subdomain."
-
-
- # PUBLIC METHODS /////////////////////////////////////////////////////
-
- def __init__(self, name="doubleoutput"):
- """
- Constructor.
- """
- ObjectBin.__init__(self, name)
- return
-
-
- # PRIVATE METHODS ////////////////////////////////////////////////////
-
- def _configure(self):
- """
- Set attributes from inventory.
- """
- ObjectBin._configure(self)
- self.bin = [self.inventory.domain,
- self.inventory.subdomain]
- return
-
-
-# FACTORIES ////////////////////////////////////////////////////////////
-
-def object_bin():
- """
- Factory associated with DoubleOutput.
- """
- return DoubleOutput()
-
-
-# End of file
Modified: short/3D/PyLith/trunk/pylith/meshio/__init__.py
===================================================================
--- short/3D/PyLith/trunk/pylith/meshio/__init__.py 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/pylith/meshio/__init__.py 2008-02-27 21:14:37 UTC (rev 11274)
@@ -18,17 +18,16 @@
'CellFilterAvg',
'DataWriter',
'DataWriterVTK',
- 'DoubleOutput',
'MeshIO',
'MeshIOAscii',
'MeshIOCubit',
'MeshIOLagrit',
'OutputDirichlet',
- 'OutputManager',
- 'OutputSoln',
'OutputFaultKin',
+ 'OutputManager',
'OutputMatElastic',
'OutputNeumann'
+ 'OutputSoln',
'OutputSolnSubset',
'SingleOutput',
'VertexFilter']
Modified: short/3D/PyLith/trunk/pylith/problems/Formulation.py
===================================================================
--- short/3D/PyLith/trunk/pylith/problems/Formulation.py 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/pylith/problems/Formulation.py 2008-02-27 21:14:37 UTC (rev 11274)
@@ -20,6 +20,17 @@
from pylith.utils.profiling import resourceUsageString
+# ITEM FACTORIES ///////////////////////////////////////////////////////
+
+def outputFactory(name):
+ """
+ Factory for material items.
+ """
+ from pyre.inventory import facility
+ from pylith.meshio.OutputSoln import OutputSoln
+ return facility(name, family="output_manager", factory=OutputSoln)
+
+
# Formulation class
class Formulation(Component):
"""
@@ -56,8 +67,9 @@
solver.meta['tip'] = "Algebraic solver."
from pylith.meshio.SingleOutput import SingleOutput
- output = pyre.inventory.facility("output", family="object_bin",
- factory=SingleOutput)
+ output = pyre.inventory.facilityArray("output",
+ itemFactory=outputFactory,
+ factory=SingleOutput)
output.meta['tip'] = "Output managers associated with solution."
@@ -101,7 +113,7 @@
self._setupInterfaces(interfaceConditions)
self._info.log("Pre-initializing output.")
- for output in self.output.bin:
+ for output in self.output.components():
output.preinitialize()
self._logger.eventEnd(logEvent)
@@ -119,7 +131,7 @@
integrator.verifyConfiguration()
for constraint in self.constraints:
constraint.verifyConfiguration()
- for output in self.output.bin:
+ for output in self.output.components():
output.verifyConfiguration()
self._logger.eventEnd(logEvent)
@@ -150,7 +162,7 @@
self._debug.log(resourceUsageString())
self._info.log("Setting up solution output.")
- for output in self.output.bin:
+ for output in self.output.components():
output.initialize(self.mesh)
output.writeInfo()
output.open(totalTime, numTimeSteps)
@@ -217,7 +229,7 @@
self._logger.eventBegin(logEvent)
self._info.log("Writing solution fields.")
- for output in self.output.bin:
+ for output in self.output.components():
output.writeData(t+dt, self.fields)
for integrator in self.integrators:
integrator.poststep(t, dt, totalTime, self.fields)
@@ -241,7 +253,7 @@
integrator.finalize()
for constraint in self.constraints:
constraint.finalize()
- for output in self.output.bin:
+ for output in self.output.components():
output.close()
self._debug.log(resourceUsageString())
@@ -272,7 +284,7 @@
self._info.log("Pre-initializing materials.")
self._debug.log(resourceUsageString())
- for material in materials.bin:
+ for material in materials.components():
integrator = self.elasticityIntegrator()
if not implementsIntegrator(integrator):
raise TypeError, \
@@ -296,7 +308,7 @@
self._info.log("Pre-initializing boundary conditions.")
self._debug.log(resourceUsageString())
- for bc in boundaryConditions.bin:
+ for bc in boundaryConditions.components():
bc.preinitialize(self.mesh)
foundType = False
if implementsIntegrator(bc):
@@ -325,7 +337,7 @@
from pylith.feassemble.Constraint import implementsConstraint
self._info.log("Pre-initializing interior interfaces.")
- for ic in interfaceConditions.bin:
+ for ic in interfaceConditions.components():
ic.preinitialize(self.mesh)
foundType = False
if implementsIntegrator(ic):
Modified: short/3D/PyLith/trunk/pylith/problems/Problem.py
===================================================================
--- short/3D/PyLith/trunk/pylith/problems/Problem.py 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/pylith/problems/Problem.py 2008-02-27 21:14:37 UTC (rev 11274)
@@ -18,6 +18,35 @@
from pyre.components.Component import Component
+# ITEM FACTORIES ///////////////////////////////////////////////////////
+
+def materialFactory(name):
+ """
+ Factory for material items.
+ """
+ from pyre.inventory import facility
+ from pylith.materials.ElasticIsotropic3D import ElasticIsotropic3D
+ return facility(name, family="material", factory=ElasticIsotropic3D)
+
+
+def bcFactory(name):
+ """
+ Factory for boundary condition items.
+ """
+ from pyre.inventory import facility
+ from pylith.bc.DirichletPoints import DirichletPoints
+ return facility(name, family="boundary_condition", factory=DirichletPoints)
+
+
+def faultFactory(name):
+ """
+ Factory for fault items.
+ """
+ from pyre.inventory import facility
+ from pylith.faults.FaultCohesiveKin import FaultCohesiveKin
+ return facility(name, family="fault", factory=FaultCohesiveKin)
+
+
# Problem class
class Problem(Component):
"""
@@ -53,15 +82,19 @@
dimension.meta['tip'] = "Spatial dimension of problem space."
from pylith.materials.Homogeneous import Homogeneous
- materials = pyre.inventory.facility("materials", family="object_bin",
- factory=Homogeneous)
+ materials = pyre.inventory.facilityArray("materials",
+ itemFactory=materialFactory,
+ factory=Homogeneous)
materials.meta['tip'] = "Materials in problem."
- bc = pyre.inventory.facility("bc", family="object_bin", factory=ObjectBin)
+ bc = pyre.inventory.facilityArray("bc",
+ itemFactory=bcFactory,
+ factory=ObjectBin)
bc.meta['tip'] = "Boundary conditions."
- interfaces = pyre.inventory.facility("interfaces", family="object_bin",
- factory=ObjectBin)
+ interfaces = pyre.inventory.facilityArray("interfaces",
+ itemFactory=faultFactory,
+ factory=ObjectBin)
interfaces.meta['tip'] = "Interior surfaces with constraints or " \
"constitutive models."
@@ -100,7 +133,7 @@
"for spatial dimension '%d'." % \
(self.dimension, mesh.dimension)
- for material in self.materials.bin:
+ for material in self.materials.components():
if material.quadrature.spaceDim != self.dimension:
raise ValueError, \
"Spatial dimension of problem is '%d' but quadrature " \
@@ -190,5 +223,4 @@
"""
return Problem()
-
# End of file
Modified: short/3D/PyLith/trunk/pylith/topology/__init__.py
===================================================================
--- short/3D/PyLith/trunk/pylith/topology/__init__.py 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/pylith/topology/__init__.py 2008-02-27 21:14:37 UTC (rev 11274)
@@ -17,9 +17,10 @@
__all__ = ['Distributor',
'FieldsManager',
'Mesh',
- 'MeshDistributor',
+ 'MeshGenSimple',
'MeshGenerator',
- 'MeshImporter']
+ 'MeshImporter',
+ ]
# End of file
Modified: short/3D/PyLith/trunk/pylith/utils/ObjectBin.py
===================================================================
--- short/3D/PyLith/trunk/pylith/utils/ObjectBin.py 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/pylith/utils/ObjectBin.py 2008-02-27 21:14:37 UTC (rev 11274)
@@ -33,7 +33,6 @@
Constructor.
"""
Component.__init__(self, name, facility="object_bin")
- self.bin = []
return
Modified: short/3D/PyLith/trunk/setup.py
===================================================================
--- short/3D/PyLith/trunk/setup.py 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/setup.py 2008-02-27 21:14:37 UTC (rev 11274)
@@ -14,7 +14,7 @@
install_requires = [
'spatialdata',
- 'pythia[mpi] >= 0.8.1.4, < 0.8.2a',
+ 'pythia[mpi] >= 0.8.1.5, < 0.8.2a',
],
author = 'Brad Aagaard, Charles A. Williams, and Matt Knepley',
Deleted: short/3D/PyLith/trunk/unittests/pytests/bc/TestBCFourSides.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/bc/TestBCFourSides.py 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/unittests/pytests/bc/TestBCFourSides.py 2008-02-27 21:14:37 UTC (rev 11274)
@@ -1,50 +0,0 @@
-#!/usr/bin/env python
-#
-# ======================================================================
-#
-# Brad T. Aagaard
-# U.S. Geological Survey
-#
-# {LicenseText}
-#
-# ======================================================================
-#
-
-## @file unittests/pytests/bc/TestBCFourSides.py
-
-## @brief Unit testing of BCFourSides object.
-
-import unittest
-
-# ----------------------------------------------------------------------
-class TestBCFourSides(unittest.TestCase):
- """
- Unit testing of BCFourSides object.
- """
-
- def test_constructor(self):
- """
- Test constructor.
- """
- from pylith.bc.BCFourSides import BCFourSides
- bc = BCFourSides()
- return
-
-
- def test_configure(self):
- """
- Test _configure().
- """
- from pylith.bc.BCFourSides import BCFourSides
- bc = BCFourSides()
- from pylith.bc.DirichletPoints import DirichletPoints
- bc.inventory.xNeg = DirichletPoints()
- bc.inventory.xPos = DirichletPoints()
- bc.inventory.yNeg = DirichletPoints()
- bc.inventory.yPos = DirichletPoints()
- bc._configure()
- self.assertEqual(4, len(bc.bin))
- return
-
-
-# End of file
Deleted: short/3D/PyLith/trunk/unittests/pytests/bc/TestBCSingle.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/bc/TestBCSingle.py 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/unittests/pytests/bc/TestBCSingle.py 2008-02-27 21:14:37 UTC (rev 11274)
@@ -1,47 +0,0 @@
-#!/usr/bin/env python
-#
-# ======================================================================
-#
-# Brad T. Aagaard
-# U.S. Geological Survey
-#
-# {LicenseText}
-#
-# ======================================================================
-#
-
-## @file unittests/pytests/bc/TestBCSingle.py
-
-## @brief Unit testing of BCSingle object.
-
-import unittest
-
-# ----------------------------------------------------------------------
-class TestBCSingle(unittest.TestCase):
- """
- Unit testing of BCSingle object.
- """
-
- def test_constructor(self):
- """
- Test constructor.
- """
- from pylith.bc.BCSingle import BCSingle
- bc = BCSingle()
- return
-
-
- def test_configure(self):
- """
- Test _configure().
- """
- from pylith.bc.BCSingle import BCSingle
- bc = BCSingle()
- from pylith.bc.DirichletPoints import DirichletPoints
- bc.inventory.bc = DirichletPoints()
- bc._configure()
- self.assertEqual(1, len(bc.bin))
- return
-
-
-# End of file
Deleted: short/3D/PyLith/trunk/unittests/pytests/bc/TestBCSixSides.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/bc/TestBCSixSides.py 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/unittests/pytests/bc/TestBCSixSides.py 2008-02-27 21:14:37 UTC (rev 11274)
@@ -1,52 +0,0 @@
-#!/usr/bin/env python
-#
-# ======================================================================
-#
-# Brad T. Aagaard
-# U.S. Geological Survey
-#
-# {LicenseText}
-#
-# ======================================================================
-#
-
-## @file unittests/pytests/bc/TestBCSixSides.py
-
-## @brief Unit testing of BCSixSides object.
-
-import unittest
-
-# ----------------------------------------------------------------------
-class TestBCSixSides(unittest.TestCase):
- """
- Unit testing of BCSixSides object.
- """
-
- def test_constructor(self):
- """
- Test constructor.
- """
- from pylith.bc.BCSixSides import BCSixSides
- bc = BCSixSides()
- return
-
-
- def test_configure(self):
- """
- Test _configure().
- """
- from pylith.bc.BCSixSides import BCSixSides
- bc = BCSixSides()
- from pylith.bc.DirichletPoints import DirichletPoints
- bc.inventory.xNeg = DirichletPoints()
- bc.inventory.xPos = DirichletPoints()
- bc.inventory.yNeg = DirichletPoints()
- bc.inventory.yPos = DirichletPoints()
- bc.inventory.zNeg = DirichletPoints()
- bc.inventory.zPos = DirichletPoints()
- bc._configure()
- self.assertEqual(6, len(bc.bin))
- return
-
-
-# End of file
Deleted: short/3D/PyLith/trunk/unittests/pytests/bc/TestBCTwoSides.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/bc/TestBCTwoSides.py 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/unittests/pytests/bc/TestBCTwoSides.py 2008-02-27 21:14:37 UTC (rev 11274)
@@ -1,48 +0,0 @@
-#!/usr/bin/env python
-#
-# ======================================================================
-#
-# Brad T. Aagaard
-# U.S. Geological Survey
-#
-# {LicenseText}
-#
-# ======================================================================
-#
-
-## @file unittests/pytests/bc/TestBCTwoSides.py
-
-## @brief Unit testing of BCTwoSides object.
-
-import unittest
-
-# ----------------------------------------------------------------------
-class TestBCTwoSides(unittest.TestCase):
- """
- Unit testing of BCTwoSides object.
- """
-
- def test_constructor(self):
- """
- Test constructor.
- """
- from pylith.bc.BCTwoSides import BCTwoSides
- bc = BCTwoSides()
- return
-
-
- def test_configure(self):
- """
- Test _configure().
- """
- from pylith.bc.BCTwoSides import BCTwoSides
- bc = BCTwoSides()
- from pylith.bc.DirichletPoints import DirichletPoints
- bc.inventory.neg = DirichletPoints()
- bc.inventory.pos = DirichletPoints()
- bc._configure()
- self.assertEqual(2, len(bc.bin))
- return
-
-
-# End of file
Modified: short/3D/PyLith/trunk/unittests/pytests/bc/testbc.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/bc/testbc.py 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/unittests/pytests/bc/testbc.py 2008-02-27 21:14:37 UTC (rev 11274)
@@ -65,18 +65,6 @@
from TestAbsorbingDampers import TestAbsorbingDampers
suite.addTest(unittest.makeSuite(TestAbsorbingDampers))
- from TestBCSingle import TestBCSingle
- suite.addTest(unittest.makeSuite(TestBCSingle))
-
- from TestBCTwoSides import TestBCTwoSides
- suite.addTest(unittest.makeSuite(TestBCTwoSides))
-
- from TestBCFourSides import TestBCFourSides
- suite.addTest(unittest.makeSuite(TestBCFourSides))
-
- from TestBCSixSides import TestBCSixSides
- suite.addTest(unittest.makeSuite(TestBCSixSides))
-
from TestNeumann import TestNeumann
suite.addTest(unittest.makeSuite(TestNeumann))
Deleted: short/3D/PyLith/trunk/unittests/pytests/faults/TestSingleFault.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/faults/TestSingleFault.py 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/unittests/pytests/faults/TestSingleFault.py 2008-02-27 21:14:37 UTC (rev 11274)
@@ -1,47 +0,0 @@
-#!/usr/bin/env python
-#
-# ======================================================================
-#
-# Brad T. Aagaard
-# U.S. Geological Survey
-#
-# {LicenseText}
-#
-# ======================================================================
-#
-
-## @file unittests/pytests/materials/TestSingleFault.py
-
-## @brief Unit testing of SingleFault object.
-
-import unittest
-
-# ----------------------------------------------------------------------
-class TestSingleFault(unittest.TestCase):
- """
- Unit testing of SingleFault object.
- """
-
- def test_constructor(self):
- """
- Test constructor.
- """
- from pylith.faults.SingleFault import SingleFault
- faults = SingleFault()
- return
-
-
- def test_configure(self):
- """
- Test _configure().
- """
- from pylith.faults.SingleFault import SingleFault
- faults = SingleFault()
- from pylith.faults.Fault import Fault
- faults.inventory.fault = Fault()
- faults._configure()
- self.assertEqual(1, len(faults.bin))
- return
-
-
-# End of file
Modified: short/3D/PyLith/trunk/unittests/pytests/faults/testfaults.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/faults/testfaults.py 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/unittests/pytests/faults/testfaults.py 2008-02-27 21:14:37 UTC (rev 11274)
@@ -71,9 +71,6 @@
from TestFaultCohesiveKin import TestFaultCohesiveKin
suite.addTest(unittest.makeSuite(TestFaultCohesiveKin))
- from TestSingleFault import TestSingleFault
- suite.addTest(unittest.makeSuite(TestSingleFault))
-
return suite
Deleted: short/3D/PyLith/trunk/unittests/pytests/materials/TestBiMaterial.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/materials/TestBiMaterial.py 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/unittests/pytests/materials/TestBiMaterial.py 2008-02-27 21:14:37 UTC (rev 11274)
@@ -1,48 +0,0 @@
-#!/usr/bin/env python
-#
-# ======================================================================
-#
-# Brad T. Aagaard
-# U.S. Geological Survey
-#
-# {LicenseText}
-#
-# ======================================================================
-#
-
-## @file unittests/pytests/materials/TestBiMaterial.py
-
-## @brief Unit testing of BiMaterial object.
-
-import unittest
-
-# ----------------------------------------------------------------------
-class TestBiMaterial(unittest.TestCase):
- """
- Unit testing of BiMaterial object.
- """
-
- def test_constructor(self):
- """
- Test constructor.
- """
- from pylith.materials.BiMaterial import BiMaterial
- materials = BiMaterial()
- return
-
-
- def test_configure(self):
- """
- Test _configure().
- """
- from pylith.materials.BiMaterial import BiMaterial
- materials = BiMaterial()
- from pylith.materials.ElasticIsotropic3D import ElasticIsotropic3D
- materials.inventory.one = ElasticIsotropic3D()
- materials.inventory.two = ElasticIsotropic3D()
- materials._configure()
- self.assertEqual(2, len(materials.bin))
- return
-
-
-# End of file
Modified: short/3D/PyLith/trunk/unittests/pytests/materials/testmaterials.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/materials/testmaterials.py 2008-02-27 21:11:10 UTC (rev 11273)
+++ short/3D/PyLith/trunk/unittests/pytests/materials/testmaterials.py 2008-02-27 21:14:37 UTC (rev 11274)
@@ -83,9 +83,6 @@
from TestHomogeneous import TestHomogeneous
suite.addTest(unittest.makeSuite(TestHomogeneous))
- from TestBiMaterial import TestBiMaterial
- suite.addTest(unittest.makeSuite(TestBiMaterial))
-
return suite
More information about the cig-commits
mailing list