[cig-commits] r7061 - in short/3D/PyLith/trunk: .
examples/twocells/twotri3 pylith pylith/faults
pylith/materials pylith/problems tests/1d/line2
tests/1d/line3 tests/2d/quad4 tests/2d/tri3
unittests/pytests/materials
brad at geodynamics.org
brad at geodynamics.org
Mon Jun 4 13:57:10 PDT 2007
Author: brad
Date: 2007-06-04 13:57:09 -0700 (Mon, 04 Jun 2007)
New Revision: 7061
Added:
short/3D/PyLith/trunk/unittests/pytests/materials/TestHomogeneous.py
Removed:
short/3D/PyLith/trunk/pylith/faults/FaultsBin.py
short/3D/PyLith/trunk/pylith/materials/MaterialsBin.py
short/3D/PyLith/trunk/pylith/problems/BoundaryConditions.py
Modified:
short/3D/PyLith/trunk/TODO
short/3D/PyLith/trunk/examples/twocells/twotri3/bcsingle.odb
short/3D/PyLith/trunk/pylith/Makefile.am
short/3D/PyLith/trunk/pylith/faults/SingleFault.py
short/3D/PyLith/trunk/pylith/faults/__init__.py
short/3D/PyLith/trunk/pylith/materials/Homogeneous.py
short/3D/PyLith/trunk/pylith/materials/__init__.py
short/3D/PyLith/trunk/pylith/problems/BCPrism.py
short/3D/PyLith/trunk/pylith/problems/BCQuadrilateral.py
short/3D/PyLith/trunk/pylith/problems/Formulation.py
short/3D/PyLith/trunk/pylith/problems/Implicit.py
short/3D/PyLith/trunk/pylith/problems/Problem.py
short/3D/PyLith/trunk/pylith/problems/__init__.py
short/3D/PyLith/trunk/tests/1d/line2/bcsingle.odb
short/3D/PyLith/trunk/tests/1d/line3/bcsingle.odb
short/3D/PyLith/trunk/tests/2d/quad4/bcbox.odb
short/3D/PyLith/trunk/tests/2d/tri3/bcbox.odb
short/3D/PyLith/trunk/unittests/pytests/materials/testmaterials.py
Log:
Removed MaterialsBin, BoundaryCOnditions, and FaultBin containers. Switched to using more general ObjectBin container.
Modified: short/3D/PyLith/trunk/TODO
===================================================================
--- short/3D/PyLith/trunk/TODO 2007-06-04 20:44:55 UTC (rev 7060)
+++ short/3D/PyLith/trunk/TODO 2007-06-04 20:57:09 UTC (rev 7061)
@@ -2,8 +2,6 @@
MAIN PRIORITIES (Brad)
======================================================================
-Replace specific object bins with ObjectBin.
-
Update Dirichlet BC to allow mixing different Dirichlet BC for the
same points.
Modified: short/3D/PyLith/trunk/examples/twocells/twotri3/bcsingle.odb
===================================================================
--- short/3D/PyLith/trunk/examples/twocells/twotri3/bcsingle.odb 2007-06-04 20:44:55 UTC (rev 7060)
+++ short/3D/PyLith/trunk/examples/twocells/twotri3/bcsingle.odb 2007-06-04 20:57:09 UTC (rev 7061)
@@ -10,10 +10,10 @@
# ----------------------------------------------------------------------
#
-from pylith.problems.BoundaryConditions import BoundaryConditions
+from pylith.utils.ObjectBin import ObjectBin
# BCSingle class
-class BCSingle(BoundaryConditions):
+class BCSingle(ObjectBin):
"""
Python boundary conditions container for a single boundary condition.
@@ -22,7 +22,7 @@
# INVENTORY //////////////////////////////////////////////////////////
- class Inventory(BoundaryConditions.Inventory):
+ class Inventory(ObjectBin.Inventory):
"""
Python object for managing BCSingle facilities and properties.
"""
@@ -51,7 +51,7 @@
"""
Constructor.
"""
- BoundaryConditions.__init__(self, name)
+ ObjectBin.__init__(self, name)
return
@@ -61,14 +61,14 @@
"""
Set attributes from inventory.
"""
- BoundaryConditions._configure(self)
- self.bc = [self.inventory.bc]
+ ObjectBin._configure(self)
+ self.bin = [self.inventory.bc]
return
# FACTORIES ////////////////////////////////////////////////////////////
-def boundary_conditions():
+def object_bin():
"""
Factory associated with BCSingle.
"""
Modified: short/3D/PyLith/trunk/pylith/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/pylith/Makefile.am 2007-06-04 20:44:55 UTC (rev 7060)
+++ short/3D/PyLith/trunk/pylith/Makefile.am 2007-06-04 20:57:09 UTC (rev 7061)
@@ -20,7 +20,6 @@
faults/__init__.py \
faults/BruneSlipFn.py \
faults/EqKinSrc.py \
- faults/FaultsBin.py \
faults/Fault.py \
faults/FaultCohesive.py \
faults/FaultCohesiveKin.py \
@@ -52,7 +51,6 @@
materials/ElasticStress1D.py \
materials/Homogeneous.py \
materials/Material.py \
- materials/MaterialsBin.py \
materials/MaxwellIsotropic3D.py \
meshio/__init__.py \
meshio/MeshIO.py \
@@ -65,7 +63,6 @@
problems/__init__.py \
problems/BCPrism.py \
problems/BCQuadrilateral.py \
- problems/BoundaryConditions.py \
problems/Explicit.py \
problems/Formulation.py \
problems/Implicit.py \
Deleted: short/3D/PyLith/trunk/pylith/faults/FaultsBin.py
===================================================================
--- short/3D/PyLith/trunk/pylith/faults/FaultsBin.py 2007-06-04 20:44:55 UTC (rev 7060)
+++ short/3D/PyLith/trunk/pylith/faults/FaultsBin.py 2007-06-04 20:57:09 UTC (rev 7061)
@@ -1,40 +0,0 @@
-#!/usr/bin/env python
-#
-# ----------------------------------------------------------------------
-#
-# Brad T. Aagaard
-# U.S. Geological Survey
-#
-# <LicenseText>
-#
-# ----------------------------------------------------------------------
-#
-
-## @file pylith/faults/FaultsBin.py
-##
-## @brief Python container for faults.
-##
-## Factory: interfaces_bin
-
-from pyre.components.Component import Component
-
-# FaultsBin class
-class FaultsBin(Component):
- """
- Python container for faults.
-
- Factory: interfaces_bin
- """
-
- # PUBLIC METHODS /////////////////////////////////////////////////////
-
- def __init__(self, name="faultsbin"):
- """
- Constructor.
- """
- Component.__init__(self, name, facility="faults_bin")
- self.ic = []
- return
-
-
-# End of file
Modified: short/3D/PyLith/trunk/pylith/faults/SingleFault.py
===================================================================
--- short/3D/PyLith/trunk/pylith/faults/SingleFault.py 2007-06-04 20:44:55 UTC (rev 7060)
+++ short/3D/PyLith/trunk/pylith/faults/SingleFault.py 2007-06-04 20:57:09 UTC (rev 7061)
@@ -14,21 +14,21 @@
##
## @brief Python faults container with one fault.
##
-## Factory: interfaces_bin
+## Factory: object_bin
-from FaultsBin import FaultsBin
+from pylith.utils.ObjectBin import ObjectBin
# SingleFault class
-class SingleFault(FaultsBin):
+class SingleFault(ObjectBin):
"""
Python faults container with one material.
- Factory: interfaces_bin
+ Factory: object_bin
"""
# INVENTORY //////////////////////////////////////////////////////////
- class Inventory(FaultsBin.Inventory):
+ class Inventory(ObjectBin.Inventory):
"""
Python object for managing SingleFault facilities and properties.
"""
@@ -55,7 +55,7 @@
"""
Constructor.
"""
- FaultsBin.__init__(self, name)
+ ObjectBin.__init__(self, name)
return
@@ -65,14 +65,14 @@
"""
Set attributes from inventory.
"""
- FaultsBin._configure(self)
- self.ic = [self.inventory.fault]
+ ObjectBin._configure(self)
+ self.bin = [self.inventory.fault]
return
# FACTORIES ////////////////////////////////////////////////////////////
-def interfaces_bin():
+def object_bin():
"""
Factory associated with SingleFault.
"""
Modified: short/3D/PyLith/trunk/pylith/faults/__init__.py
===================================================================
--- short/3D/PyLith/trunk/pylith/faults/__init__.py 2007-06-04 20:44:55 UTC (rev 7060)
+++ short/3D/PyLith/trunk/pylith/faults/__init__.py 2007-06-04 20:57:09 UTC (rev 7061)
@@ -15,7 +15,6 @@
## @brief Python PyLith faults module initialization
__all__ = ['EqKinSrc',
- 'FaultsBin',
'Fault',
'FaultCohesive',
'FaultCohesiveKin',
Modified: short/3D/PyLith/trunk/pylith/materials/Homogeneous.py
===================================================================
--- short/3D/PyLith/trunk/pylith/materials/Homogeneous.py 2007-06-04 20:44:55 UTC (rev 7060)
+++ short/3D/PyLith/trunk/pylith/materials/Homogeneous.py 2007-06-04 20:57:09 UTC (rev 7061)
@@ -14,21 +14,21 @@
##
## @brief Python materials container with one material.
##
-## Factory: materials_bin
+## Factory: object_bin
-from MaterialsBin import MaterialsBin
+from pylith.utils.ObjectBin import ObjectBin
# Homogeneous class
-class Homogeneous(MaterialsBin):
+class Homogeneous(ObjectBin):
"""
Python materials container with one material.
- Factory: materials_bin
+ Factory: object_bin
"""
# INVENTORY //////////////////////////////////////////////////////////
- class Inventory(MaterialsBin.Inventory):
+ class Inventory(ObjectBin.Inventory):
"""
Python object for managing Homogeneous facilities and properties.
"""
@@ -56,7 +56,7 @@
"""
Constructor.
"""
- MaterialsBin.__init__(self, name)
+ ObjectBin.__init__(self, name)
return
@@ -66,8 +66,8 @@
"""
Set attributes from inventory.
"""
- MaterialsBin._configure(self)
- self.materials = [self.inventory.material]
+ ObjectBin._configure(self)
+ self.bin = [self.inventory.material]
return
Deleted: short/3D/PyLith/trunk/pylith/materials/MaterialsBin.py
===================================================================
--- short/3D/PyLith/trunk/pylith/materials/MaterialsBin.py 2007-06-04 20:44:55 UTC (rev 7060)
+++ short/3D/PyLith/trunk/pylith/materials/MaterialsBin.py 2007-06-04 20:57:09 UTC (rev 7061)
@@ -1,40 +0,0 @@
-#!/usr/bin/env python
-#
-# ----------------------------------------------------------------------
-#
-# Brad T. Aagaard
-# U.S. Geological Survey
-#
-# <LicenseText>
-#
-# ----------------------------------------------------------------------
-#
-
-## @file pylith/materials/MaterialsBin.py
-##
-## @brief Python container for materials.
-##
-## Factory: materials_bin
-
-from pyre.components.Component import Component
-
-# MaterialsBin class
-class MaterialsBin(Component):
- """
- Python container for materials.
-
- Factory: materials_bin
- """
-
- # PUBLIC METHODS /////////////////////////////////////////////////////
-
- def __init__(self, name="materialsbin"):
- """
- Constructor.
- """
- Component.__init__(self, name, facility="materials_bin")
- self.materials = []
- return
-
-
-# End of file
Modified: short/3D/PyLith/trunk/pylith/materials/__init__.py
===================================================================
--- short/3D/PyLith/trunk/pylith/materials/__init__.py 2007-06-04 20:44:55 UTC (rev 7060)
+++ short/3D/PyLith/trunk/pylith/materials/__init__.py 2007-06-04 20:57:09 UTC (rev 7061)
@@ -22,7 +22,6 @@
'ElasticStress1D',
'Homogeneous',
'Material',
- 'MaterialsBin',
'MaxwellIsotropic3D']
Modified: short/3D/PyLith/trunk/pylith/problems/BCPrism.py
===================================================================
--- short/3D/PyLith/trunk/pylith/problems/BCPrism.py 2007-06-04 20:44:55 UTC (rev 7060)
+++ short/3D/PyLith/trunk/pylith/problems/BCPrism.py 2007-06-04 20:57:09 UTC (rev 7061)
@@ -16,23 +16,23 @@
##
## Boundary conditions can be applied to any of the six faces.
##
-## Factory: boundary_conditions
+## Factory: object_bin
-from BoundaryConditions import BoundaryConditions
+from pylith.utils.ObjectBin import ObjectBin
# BCPrism class
-class BCPrism(BoundaryConditions):
+class BCPrism(ObjectBin):
"""
Python boundary conditions container for a 3-D prism.
Boundary conditions can be applied to any of the six faces.
- Factory: boundary_conditions
+ Factory: object_bin
"""
# INVENTORY //////////////////////////////////////////////////////////
- class Inventory(BoundaryConditions.Inventory):
+ class Inventory(ObjectBin.Inventory):
"""
Python object for managing BCPrism facilities and properties.
"""
@@ -87,7 +87,7 @@
"""
Constructor.
"""
- BoundaryConditions.__init__(self, name)
+ ObjectBin.__init__(self, name)
return
@@ -97,7 +97,7 @@
"""
Set attributes from inventory.
"""
- BoundaryConditions._configure(self)
+ ObjectBin._configure(self)
self.bc = [self.inventory.xPos,
self.inventory.xNeg,
self.inventory.yPos,
@@ -109,7 +109,7 @@
# FACTORIES ////////////////////////////////////////////////////////////
-def boundary_conditions():
+def object_bin():
"""
Factory associated with BCPrism.
"""
Modified: short/3D/PyLith/trunk/pylith/problems/BCQuadrilateral.py
===================================================================
--- short/3D/PyLith/trunk/pylith/problems/BCQuadrilateral.py 2007-06-04 20:44:55 UTC (rev 7060)
+++ short/3D/PyLith/trunk/pylith/problems/BCQuadrilateral.py 2007-06-04 20:57:09 UTC (rev 7061)
@@ -16,23 +16,23 @@
##
## Boundary conditions can be applied to any of the four edges.
##
-## Factory: boundary_conditions
+## Factory: object_bin
-from BoundaryConditions import BoundaryConditions
+from pylith.utils.ObjectBin import ObjectBin
# BCQuadrilateral class
-class BCQuadrilateral(BoundaryConditions):
+class BCQuadrilateral(ObjectBin):
"""
Python boundary conditions container for a 2-D quadrilateral.
Boundary conditions can be applied to any of the four edges.
- Factory: boundary_conditions
+ Factory: object_bin
"""
# INVENTORY //////////////////////////////////////////////////////////
- class Inventory(BoundaryConditions.Inventory):
+ class Inventory(ObjectBin.Inventory):
"""
Python object for managing BCQuadrilateral facilities and properties.
"""
@@ -77,7 +77,7 @@
"""
Constructor.
"""
- BoundaryConditions.__init__(self, name)
+ ObjectBin.__init__(self, name)
return
@@ -87,7 +87,7 @@
"""
Set attributes from inventory.
"""
- BoundaryConditions._configure(self)
+ ObjectBin._configure(self)
self.bc = [self.inventory.xPos,
self.inventory.xNeg,
self.inventory.yPos,
@@ -97,7 +97,7 @@
# FACTORIES ////////////////////////////////////////////////////////////
-def boundary_conditions():
+def object_bin():
"""
Factory associated with BCQuadrilateral.
"""
Deleted: short/3D/PyLith/trunk/pylith/problems/BoundaryConditions.py
===================================================================
--- short/3D/PyLith/trunk/pylith/problems/BoundaryConditions.py 2007-06-04 20:44:55 UTC (rev 7060)
+++ short/3D/PyLith/trunk/pylith/problems/BoundaryConditions.py 2007-06-04 20:57:09 UTC (rev 7061)
@@ -1,40 +0,0 @@
-#!/usr/bin/env python
-#
-# ----------------------------------------------------------------------
-#
-# Brad T. Aagaard
-# U.S. Geological Survey
-#
-# <LicenseText>
-#
-# ----------------------------------------------------------------------
-#
-
-## @file pylith/problem/BoundaryConditions.py
-##
-## @brief Python container for boundary conditions.
-##
-## Factory: boundary_conditions
-
-from pyre.components.Component import Component
-
-# BoundaryConditions class
-class BoundaryConditions(Component):
- """
- Python container for boundary conditions.
-
- Factory: boundary_conditions
- """
-
- # PUBLIC METHODS /////////////////////////////////////////////////////
-
- def __init__(self, name="boundaryconditions"):
- """
- Constructor.
- """
- Component.__init__(self, name, facility="boundary_conditions")
- self.bc = []
- return
-
-
-# End of file
Modified: short/3D/PyLith/trunk/pylith/problems/Formulation.py
===================================================================
--- short/3D/PyLith/trunk/pylith/problems/Formulation.py 2007-06-04 20:44:55 UTC (rev 7060)
+++ short/3D/PyLith/trunk/pylith/problems/Formulation.py 2007-06-04 20:57:09 UTC (rev 7061)
@@ -86,7 +86,7 @@
self.constraints = []
self._info.log("Initializing materials.")
- for material in materials.materials:
+ for material in materials.bin:
if material.quadrature.spaceDim != dimension:
raise ValueError, \
"Spatial dimension of problem is '%d' but quadrature " \
@@ -103,7 +103,7 @@
self.integrators.append(integrator)
self._info.log("Initializing boundary conditions.")
- for bc in boundaryConditions.bc:
+ for bc in boundaryConditions.bin:
bc.initialize(mesh)
if implementsIntegrator(bc):
self.integrators.append(bc)
@@ -115,7 +115,7 @@
"integrator or a constraint." % bc.name
self._info.log("Initializing interior interfaces.")
- for ic in interfaceConditions.ic:
+ for ic in interfaceConditions.bin:
ic.initialize(mesh)
if implementsIntegrator(ic):
self.integrators.append(ic)
Modified: short/3D/PyLith/trunk/pylith/problems/Implicit.py
===================================================================
--- short/3D/PyLith/trunk/pylith/problems/Implicit.py 2007-06-04 20:44:55 UTC (rev 7060)
+++ short/3D/PyLith/trunk/pylith/problems/Implicit.py 2007-06-04 20:57:09 UTC (rev 7061)
@@ -201,7 +201,7 @@
"""
self._info.log("Computing elastic solution.")
- for material in materials.materials:
+ for material in materials.bin:
material.useElasticBehavior(True)
self._info.log("Setting constraints.")
Modified: short/3D/PyLith/trunk/pylith/problems/Problem.py
===================================================================
--- short/3D/PyLith/trunk/pylith/problems/Problem.py 2007-06-04 20:44:55 UTC (rev 7060)
+++ short/3D/PyLith/trunk/pylith/problems/Problem.py 2007-06-04 20:57:09 UTC (rev 7061)
@@ -46,24 +46,22 @@
## constitutive models.
import pyre.inventory
+ from pylith.utils.ObjectBin import ObjectBin
from pylith.materials.Homogeneous import Homogeneous
materials = pyre.inventory.facility("materials", family="materials",
factory=Homogeneous)
materials.meta['tip'] = "Materials in problem."
- from BoundaryConditions import BoundaryConditions
- bc = pyre.inventory.facility("bc", family="boundary_conditions",
- factory=BoundaryConditions)
+ bc = pyre.inventory.facility("bc", family="object_bin", factory=ObjectBin)
bc.meta['tip'] = "Boundary conditions."
-
- from pylith.faults.FaultsBin import FaultsBin
- interfaces = pyre.inventory.facility("interfaces", family="interfaces_bin",
- factory=FaultsBin)
+ interfaces = pyre.inventory.facility("interfaces", family="object_bin",
+ factory=ObjectBin)
interfaces.meta['tip'] = "Interior surfaces with constraints or " \
"constitutive models."
+
# PUBLIC METHODS /////////////////////////////////////////////////////
def __init__(self, name="problem"):
Modified: short/3D/PyLith/trunk/pylith/problems/__init__.py
===================================================================
--- short/3D/PyLith/trunk/pylith/problems/__init__.py 2007-06-04 20:44:55 UTC (rev 7060)
+++ short/3D/PyLith/trunk/pylith/problems/__init__.py 2007-06-04 20:57:09 UTC (rev 7061)
@@ -16,7 +16,6 @@
__all__ = ['BCPrism',
'BCQuadrilateral',
- 'BoundaryConditions',
'EqDeformation',
'Explicit',
'Implicit',
Modified: short/3D/PyLith/trunk/tests/1d/line2/bcsingle.odb
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line2/bcsingle.odb 2007-06-04 20:44:55 UTC (rev 7060)
+++ short/3D/PyLith/trunk/tests/1d/line2/bcsingle.odb 2007-06-04 20:57:09 UTC (rev 7061)
@@ -10,10 +10,10 @@
# ----------------------------------------------------------------------
#
-from pylith.problems.BoundaryConditions import BoundaryConditions
+from pylith.utils.ObjectBin import ObjectBin
# BCSingle class
-class BCSingle(BoundaryConditions):
+class BCSingle(ObjectBin):
"""
Python boundary conditions container for a single boundary condition.
@@ -22,7 +22,7 @@
# INVENTORY //////////////////////////////////////////////////////////
- class Inventory(BoundaryConditions.Inventory):
+ class Inventory(ObjectBin.Inventory):
"""
Python object for managing BCSingle facilities and properties.
"""
@@ -51,7 +51,7 @@
"""
Constructor.
"""
- BoundaryConditions.__init__(self, name)
+ ObjectBin.__init__(self, name)
return
@@ -61,14 +61,14 @@
"""
Set attributes from inventory.
"""
- BoundaryConditions._configure(self)
- self.bc = [self.inventory.bc]
+ ObjectBin._configure(self)
+ self.bin = [self.inventory.bc]
return
# FACTORIES ////////////////////////////////////////////////////////////
-def boundary_conditions():
+def object_bin():
"""
Factory associated with BCSingle.
"""
Modified: short/3D/PyLith/trunk/tests/1d/line3/bcsingle.odb
===================================================================
--- short/3D/PyLith/trunk/tests/1d/line3/bcsingle.odb 2007-06-04 20:44:55 UTC (rev 7060)
+++ short/3D/PyLith/trunk/tests/1d/line3/bcsingle.odb 2007-06-04 20:57:09 UTC (rev 7061)
@@ -10,10 +10,10 @@
# ----------------------------------------------------------------------
#
-from pylith.problems.BoundaryConditions import BoundaryConditions
+from pylith.utils.ObjectBin import ObjectBin
# BCSingle class
-class BCSingle(BoundaryConditions):
+class BCSingle(ObjectBin):
"""
Python boundary conditions container for a single boundary condition.
@@ -22,7 +22,7 @@
# INVENTORY //////////////////////////////////////////////////////////
- class Inventory(BoundaryConditions.Inventory):
+ class Inventory(ObjectBin.Inventory):
"""
Python object for managing BCSingle facilities and properties.
"""
@@ -51,7 +51,7 @@
"""
Constructor.
"""
- BoundaryConditions.__init__(self, name)
+ ObjectBin.__init__(self, name)
return
@@ -61,14 +61,14 @@
"""
Set attributes from inventory.
"""
- BoundaryConditions._configure(self)
- self.bc = [self.inventory.bc]
+ ObjectBin._configure(self)
+ self.bin = [self.inventory.bc]
return
# FACTORIES ////////////////////////////////////////////////////////////
-def boundary_conditions():
+def object_bin():
"""
Factory associated with BCSingle.
"""
Modified: short/3D/PyLith/trunk/tests/2d/quad4/bcbox.odb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/quad4/bcbox.odb 2007-06-04 20:44:55 UTC (rev 7060)
+++ short/3D/PyLith/trunk/tests/2d/quad4/bcbox.odb 2007-06-04 20:57:09 UTC (rev 7061)
@@ -10,10 +10,10 @@
# ----------------------------------------------------------------------
#
-from pylith.problems.BoundaryConditions import BoundaryConditions
+from pylith.utils.ObjectBin import ObjectBin
# BCBox class
-class BCBox(BoundaryConditions):
+class BCBox(ObjectBin):
"""
Python boundary conditions container for box with four boundary conditions.
@@ -22,7 +22,7 @@
# INVENTORY //////////////////////////////////////////////////////////
- class Inventory(BoundaryConditions.Inventory):
+ class Inventory(ObjectBin.Inventory):
"""
Python object for managing BCBox facilities and properties.
"""
@@ -63,7 +63,7 @@
"""
Constructor.
"""
- BoundaryConditions.__init__(self, name)
+ ObjectBin.__init__(self, name)
return
@@ -73,17 +73,17 @@
"""
Set attributes from inventory.
"""
- BoundaryConditions._configure(self)
- self.bc = [self.inventory.xm,
- self.inventory.xp,
- self.inventory.ym,
- self.inventory.yp]
+ ObjectBin._configure(self)
+ self.bin = [self.inventory.xm,
+ self.inventory.xp,
+ self.inventory.ym,
+ self.inventory.yp]
return
# FACTORIES ////////////////////////////////////////////////////////////
-def boundary_conditions():
+def object_bin():
"""
Factory associated with BCBox.
"""
Modified: short/3D/PyLith/trunk/tests/2d/tri3/bcbox.odb
===================================================================
--- short/3D/PyLith/trunk/tests/2d/tri3/bcbox.odb 2007-06-04 20:44:55 UTC (rev 7060)
+++ short/3D/PyLith/trunk/tests/2d/tri3/bcbox.odb 2007-06-04 20:57:09 UTC (rev 7061)
@@ -10,10 +10,10 @@
# ----------------------------------------------------------------------
#
-from pylith.problems.BoundaryConditions import BoundaryConditions
+from pylith.utils.ObjectBin import ObjectBin
# BCBox class
-class BCBox(BoundaryConditions):
+class BCBox(ObjectBin):
"""
Python boundary conditions container for box with four boundary conditions.
@@ -22,7 +22,7 @@
# INVENTORY //////////////////////////////////////////////////////////
- class Inventory(BoundaryConditions.Inventory):
+ class Inventory(ObjectBin.Inventory):
"""
Python object for managing BCBox facilities and properties.
"""
@@ -63,7 +63,7 @@
"""
Constructor.
"""
- BoundaryConditions.__init__(self, name)
+ ObjectBin.__init__(self, name)
return
@@ -73,17 +73,17 @@
"""
Set attributes from inventory.
"""
- BoundaryConditions._configure(self)
- self.bc = [self.inventory.xm,
- self.inventory.xp,
- self.inventory.ym,
- self.inventory.yp]
+ ObjectBin._configure(self)
+ self.bin = [self.inventory.xm,
+ self.inventory.xp,
+ self.inventory.ym,
+ self.inventory.yp]
return
# FACTORIES ////////////////////////////////////////////////////////////
-def boundary_conditions():
+def object_bin():
"""
Factory associated with BCBox.
"""
Added: short/3D/PyLith/trunk/unittests/pytests/materials/TestHomogeneous.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/materials/TestHomogeneous.py 2007-06-04 20:44:55 UTC (rev 7060)
+++ short/3D/PyLith/trunk/unittests/pytests/materials/TestHomogeneous.py 2007-06-04 20:57:09 UTC (rev 7061)
@@ -0,0 +1,34 @@
+#!/usr/bin/env python
+#
+# ======================================================================
+#
+# Brad T. Aagaard
+# U.S. Geological Survey
+#
+# {LicenseText}
+#
+# ======================================================================
+#
+
+## @file unittests/pytests/materials/TestHomogeneous.py
+
+## @brief Unit testing of Homogenous object.
+
+import unittest
+
+# ----------------------------------------------------------------------
+class TestHomogeneous(unittest.TestCase):
+ """
+ Unit testing of Material object.
+ """
+
+ def test_constructor(self):
+ """
+ Test constructor.
+ """
+ from pylith.materials.Homogeneous import Homogeneous
+ materials = Homogeneous()
+ return
+
+
+# End of file
Modified: short/3D/PyLith/trunk/unittests/pytests/materials/testmaterials.py
===================================================================
--- short/3D/PyLith/trunk/unittests/pytests/materials/testmaterials.py 2007-06-04 20:44:55 UTC (rev 7060)
+++ short/3D/PyLith/trunk/unittests/pytests/materials/testmaterials.py 2007-06-04 20:57:09 UTC (rev 7061)
@@ -74,6 +74,9 @@
from TestElasticStress1D import TestElasticStress1D
suite.addTest(unittest.makeSuite(TestElasticStress1D))
+ from TestHomogeneous import TestHomogeneous
+ suite.addTest(unittest.makeSuite(TestHomogeneous))
+
return suite
More information about the cig-commits
mailing list