[cig-commits] r9156 - short/3D/PyLith/trunk/pylith/bc

brad at geodynamics.org brad at geodynamics.org
Mon Jan 28 17:50:18 PST 2008


Author: brad
Date: 2008-01-28 17:50:18 -0800 (Mon, 28 Jan 2008)
New Revision: 9156

Added:
   short/3D/PyLith/trunk/pylith/bc/FixedDOFDB.py
Log:
Added rate of change to DirichletPoints. Still need to update unit tests to validate rate of change works.

Added: short/3D/PyLith/trunk/pylith/bc/FixedDOFDB.py
===================================================================
--- short/3D/PyLith/trunk/pylith/bc/FixedDOFDB.py	                        (rev 0)
+++ short/3D/PyLith/trunk/pylith/bc/FixedDOFDB.py	2008-01-29 01:50:18 UTC (rev 9156)
@@ -0,0 +1,82 @@
+#!/usr/bin/env python
+#
+# ----------------------------------------------------------------------
+#
+#                           Brad T. Aagaard
+#                        U.S. Geological Survey
+#
+# <LicenseText>
+#
+# ----------------------------------------------------------------------
+#
+
+## @file pylith/bc/FixedDOFDB.py
+##
+## @brief Python object for spatial database with uniform zero values
+## for degrees of freedom.
+##
+## Factory: spatial_database
+
+from spatialdata.spatialdb.UniformDB import UniformDB
+
+# FixedDOFDB class
+class FixedDOFDB(UniformDB):
+  """
+  Python object for spatial database with uniform zero values for
+  degrees of freedom.
+
+  Factory: spatial_database
+  """
+
+  # INVENTORY //////////////////////////////////////////////////////////
+
+  class Inventory(UniformDB.Inventory):
+    """
+    Python object for managing FixedDOFDB facilities and properties.
+    """
+
+    ## @class Inventory
+    ## Python object for managing FixedDOFDB facilities and properties.
+    ##
+    ## \b Properties
+    ## @li None
+    ##
+    ## \b Facilities
+    ## @li none
+
+    import pyre.inventory
+
+    values = ["dof-0", "dof-1", "dof-2"]
+    data = [0.0, 0.0, 0.0]
+
+
+  # PUBLIC METHODS /////////////////////////////////////////////////////
+
+  def __init__(self, name="fixeddofdb"):
+    """
+    Constructor.
+    """
+    UniformDB.__init__(self, name)
+    return
+
+
+  # PRIVATE METHODS ////////////////////////////////////////////////////
+
+  def _configure(self):
+    """
+    Set members based on inventory.
+    """
+    UniformDB._configure(self)
+    return
+
+
+# FACTORIES ////////////////////////////////////////////////////////////
+
+def spatial_database():
+  """
+  Factory associated with FixedDOFDB.
+  """
+  return FixedDOFDB()
+
+
+# End of file 



More information about the cig-commits mailing list