[cig-commits] r7689 - in short/3D/PyLith/trunk/pylith: . bc
brad at geodynamics.org
brad at geodynamics.org
Tue Jul 17 17:20:31 PDT 2007
Author: brad
Date: 2007-07-17 17:20:30 -0700 (Tue, 17 Jul 2007)
New Revision: 7689
Added:
short/3D/PyLith/trunk/pylith/bc/AbsorbingDampers.py
Modified:
short/3D/PyLith/trunk/pylith/Makefile.am
short/3D/PyLith/trunk/pylith/bc/__init__.py
Log:
Started work on simple absorbing boundary condition.
Modified: short/3D/PyLith/trunk/pylith/Makefile.am
===================================================================
--- short/3D/PyLith/trunk/pylith/Makefile.am 2007-07-18 00:13:24 UTC (rev 7688)
+++ short/3D/PyLith/trunk/pylith/Makefile.am 2007-07-18 00:20:30 UTC (rev 7689)
@@ -14,6 +14,7 @@
PyLithApp.py \
__init__.py \
bc/__init__.py \
+ bc/AbsorbingDampers.py \
bc/BCIntegrator.py \
bc/BoundaryCondition.py \
bc/Dirichlet.py \
Added: short/3D/PyLith/trunk/pylith/bc/AbsorbingDampers.py
===================================================================
--- short/3D/PyLith/trunk/pylith/bc/AbsorbingDampers.py 2007-07-18 00:13:24 UTC (rev 7688)
+++ short/3D/PyLith/trunk/pylith/bc/AbsorbingDampers.py 2007-07-18 00:20:30 UTC (rev 7689)
@@ -0,0 +1,108 @@
+#!/usr/bin/env python
+#
+# ----------------------------------------------------------------------
+#
+# Brad T. Aagaard
+# U.S. Geological Survey
+#
+# <LicenseText>
+#
+# ----------------------------------------------------------------------
+#
+
+## @file pylith/bc/AbsorbingDampers.py
+##
+## @brief Python object for managing absorbing boundary condition
+## using simple dashpots.
+##
+## Factory: boundary_condition
+
+from BoundaryCondition import BoundaryCondition
+from pylith.feassemble.Integrator import Integrator
+
+# AbsorbingDampers class
+class AbsorbingDampers(BoundaryCondition, Integrator):
+ """
+ Python object for managing absorbing boundary condition using simple
+ dashpots.
+
+ Factory: boundary_condition
+ """
+
+ # INVENTORY //////////////////////////////////////////////////////////
+
+ class Inventory(BoundaryCondition.Inventory):
+ """
+ Python object for managing BoundaryCondition facilities and properties.
+ """
+
+ ## @class Inventory
+ ## Python object for managing BoundaryCondition facilities and properties.
+ ##
+ ## \b Properties
+ ## @li None
+ ##
+ ## \b Facilities
+ ## @li None
+
+ import pyre.inventory
+
+
+ # PUBLIC METHODS /////////////////////////////////////////////////////
+
+ def __init__(self, name="absorbingdampers"):
+ """
+ Constructor.
+ """
+ BoundaryCondition.__init__(self, name)
+ Integrator.__init__(self)
+ return
+
+
+ def preinitialize(self, mesh):
+ """
+ Do pre-initialization setup.
+ """
+ BoundaryCondition.preinitialize(self, mesh)
+ return
+
+
+ def initialize(self):
+ """
+ Initialize AbsorbingDampers boundary condition.
+ """
+ BoundaryCondition.initialize(self)
+ return
+
+
+ # PRIVATE METHODS ////////////////////////////////////////////////////
+
+ def _configure(self):
+ """
+ Setup members using inventory.
+ """
+ BoundaryCondition._configure(self)
+ self.fixedDOF = self.inventory.fixedDOF
+ return
+
+
+ def _createCppHandle(self):
+ """
+ Create handle to corresponding C++ object.
+ """
+ if None == self.cppHandle:
+ import pylith.bc.bc as bindings
+ self.cppHandle = bindings.AbsorbingDampers()
+ return
+
+
+# FACTORIES ////////////////////////////////////////////////////////////
+
+def boundary_condition():
+ """
+ Factory associated with AbsorbingDampers.
+ """
+ return AbsorbingDampers()
+
+
+# End of file
Modified: short/3D/PyLith/trunk/pylith/bc/__init__.py
===================================================================
--- short/3D/PyLith/trunk/pylith/bc/__init__.py 2007-07-18 00:13:24 UTC (rev 7688)
+++ short/3D/PyLith/trunk/pylith/bc/__init__.py 2007-07-18 00:20:30 UTC (rev 7689)
@@ -14,7 +14,8 @@
##
## @brief Python PyLith boundary condition module initialization
-__all__ = ['BCFourSides',
+__all__ = ['AbsorbingDampers',
+ 'BCFourSides',
'BCSingle',
'BCSixSides',
'BCTwoSides',
More information about the cig-commits
mailing list