[cig-commits] r20116 - in short/3D/PyLith/branches/v1.7-trunk/pylith: . materials

willic3 at geodynamics.org willic3 at geodynamics.org
Mon May 14 15:28:07 PDT 2012


Author: willic3
Date: 2012-05-14 15:28:06 -0700 (Mon, 14 May 2012)
New Revision: 20116

Added:
   short/3D/PyLith/branches/v1.7-trunk/pylith/materials/PowerLawPlaneStrain.py
Modified:
   short/3D/PyLith/branches/v1.7-trunk/pylith/Makefile.am
   short/3D/PyLith/branches/v1.7-trunk/pylith/materials/GenMaxwellIsotropic3D.py
   short/3D/PyLith/branches/v1.7-trunk/pylith/materials/GenMaxwellPlaneStrain.py
   short/3D/PyLith/branches/v1.7-trunk/pylith/materials/GenMaxwellQpQsIsotropic3D.py
   short/3D/PyLith/branches/v1.7-trunk/pylith/materials/MaxwellPlaneStrain.py
   short/3D/PyLith/branches/v1.7-trunk/pylith/materials/__init__.py
Log:
Added Python files for PowerLawPlaneStrain, and cleaned up some of the
other materials.



Modified: short/3D/PyLith/branches/v1.7-trunk/pylith/Makefile.am
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/pylith/Makefile.am	2012-05-14 22:27:28 UTC (rev 20115)
+++ short/3D/PyLith/branches/v1.7-trunk/pylith/Makefile.am	2012-05-14 22:28:06 UTC (rev 20116)
@@ -87,6 +87,7 @@
 	materials/MaxwellIsotropic3D.py \
 	materials/MaxwellPlaneStrain.py \
 	materials/PowerLaw3D.py \
+	materials/PowerLawPlaneStrain.py \
 	materials/DruckerPrager3D.py \
 	materials/DruckerPragerPlaneStrain.py \
 	meshio/__init__.py \

Modified: short/3D/PyLith/branches/v1.7-trunk/pylith/materials/GenMaxwellIsotropic3D.py
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/pylith/materials/GenMaxwellIsotropic3D.py	2012-05-14 22:27:28 UTC (rev 20115)
+++ short/3D/PyLith/branches/v1.7-trunk/pylith/materials/GenMaxwellIsotropic3D.py	2012-05-14 22:28:06 UTC (rev 20116)
@@ -54,7 +54,7 @@
                      "viscous_strain_2", 
                      "viscous_strain_3",
                      ]}}
-    self._loggingPrefix = "MaMx3D "
+    self._loggingPrefix = "MaGM3D "
     return
 
 

Modified: short/3D/PyLith/branches/v1.7-trunk/pylith/materials/GenMaxwellPlaneStrain.py
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/pylith/materials/GenMaxwellPlaneStrain.py	2012-05-14 22:27:28 UTC (rev 20115)
+++ short/3D/PyLith/branches/v1.7-trunk/pylith/materials/GenMaxwellPlaneStrain.py	2012-05-14 22:28:06 UTC (rev 20116)
@@ -55,7 +55,7 @@
                      "viscous_strain_2", 
                      "viscous_strain_3",
                      ]}}
-    self._loggingPrefix = "MaMx2D "
+    self._loggingPrefix = "MaGM2D "
     return
 
 

Modified: short/3D/PyLith/branches/v1.7-trunk/pylith/materials/GenMaxwellQpQsIsotropic3D.py
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/pylith/materials/GenMaxwellQpQsIsotropic3D.py	2012-05-14 22:27:28 UTC (rev 20115)
+++ short/3D/PyLith/branches/v1.7-trunk/pylith/materials/GenMaxwellQpQsIsotropic3D.py	2012-05-14 22:28:06 UTC (rev 20116)
@@ -56,7 +56,7 @@
                      "viscous_deviatoric_strain", 
                      "viscous_mean_strain", 
                      ]}}
-    self._loggingPrefix = "MaMx3D "
+    self._loggingPrefix = "MaGQ3D "
     return
 
 

Modified: short/3D/PyLith/branches/v1.7-trunk/pylith/materials/MaxwellPlaneStrain.py
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/pylith/materials/MaxwellPlaneStrain.py	2012-05-14 22:27:28 UTC (rev 20115)
+++ short/3D/PyLith/branches/v1.7-trunk/pylith/materials/MaxwellPlaneStrain.py	2012-05-14 22:28:06 UTC (rev 20116)
@@ -48,7 +48,8 @@
             'data': []},
          'cell': \
            {'info': ["mu", "lambda", "density", "maxwell_time"],
-            'data': ["total_strain", "viscous_strain", "stress"]}}
+            'data': ["total_strain", "stress",
+                     "stress_zz_initial", "viscous_strain"]}}
     self._loggingPrefix = "MaMx2D "
     return
 

Added: short/3D/PyLith/branches/v1.7-trunk/pylith/materials/PowerLawPlaneStrain.py
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/pylith/materials/PowerLawPlaneStrain.py	                        (rev 0)
+++ short/3D/PyLith/branches/v1.7-trunk/pylith/materials/PowerLawPlaneStrain.py	2012-05-14 22:28:06 UTC (rev 20116)
@@ -0,0 +1,77 @@
+#!/usr/bin/env python
+#
+# ----------------------------------------------------------------------
+#
+# Brad T. Aagaard, U.S. Geological Survey
+# Charles A. Williams, GNS Science
+# Matthew G. Knepley, University of Chicago
+#
+# This code was developed as part of the Computational Infrastructure
+# for Geodynamics (http://geodynamics.org).
+#
+# Copyright (c) 2010-2012 University of California, Davis
+#
+# See COPYING for license information.
+#
+# ----------------------------------------------------------------------
+#
+
+## @file pylith/materials/PowerLawPlaneStrain.py
+##
+## @brief Python object implementing 2-D plane strain power-law
+## viscoelastic material.
+##
+## Factory: material.
+
+from ElasticMaterial import ElasticMaterial
+from materials import PowerLawPlaneStrain as ModulePowerLawPlaneStrain
+
+# PowerLawPlaneStrain class
+class PowerLawPlaneStrain(ElasticMaterial, ModulePowerLawPlaneStrain):
+  """
+  Python object implementing 2-D plane strain power-law viscoelastic material.
+
+  Factory: material.
+  """
+
+  # PUBLIC METHODS /////////////////////////////////////////////////////
+
+  def __init__(self, name="powerlawplanestrain"):
+    """
+    Constructor.
+    """
+    ElasticMaterial.__init__(self, name)
+    self.availableFields = \
+        {'vertex': \
+           {'info': [],
+            'data': []},
+         'cell': \
+           {'info': ["mu", "lambda", "density", 
+                     "reference_strain_rate", "reference_stress",
+                     "power_law_exponent"],
+            'data': ["total_strain", "stress",
+                     "stress_zz_initial", "stress4", "viscous_strain"]}}
+    self._loggingPrefix = "MaPL2D "
+    return
+
+
+  # PRIVATE METHODS ////////////////////////////////////////////////////
+
+  def _createModuleObj(self):
+    """
+    Call constructor for module object for access to C++ object.
+    """
+    ModulePowerLawPlaneStrain.__init__(self)
+    return
+  
+
+# FACTORIES ////////////////////////////////////////////////////////////
+
+def material():
+  """
+  Factory associated with PowerLawPlaneStrain.
+  """
+  return PowerLawPlaneStrain()
+
+
+# End of file 

Modified: short/3D/PyLith/branches/v1.7-trunk/pylith/materials/__init__.py
===================================================================
--- short/3D/PyLith/branches/v1.7-trunk/pylith/materials/__init__.py	2012-05-14 22:27:28 UTC (rev 20115)
+++ short/3D/PyLith/branches/v1.7-trunk/pylith/materials/__init__.py	2012-05-14 22:28:06 UTC (rev 20116)
@@ -32,6 +32,7 @@
            'Material',
            'MaxwellIsotropic3D',
            'PowerLaw3D',
+           'PowerLawPlaneStrain',
            'DruckerPrager3D',
            ]
 



More information about the CIG-COMMITS mailing list