[cig-commits] r7036 - short/3D/PyLith/trunk/modulesrc/materials

willic3 at geodynamics.org willic3 at geodynamics.org
Fri Jun 1 13:41:07 PDT 2007


Author: willic3
Date: 2007-06-01 13:41:07 -0700 (Fri, 01 Jun 2007)
New Revision: 7036

Modified:
   short/3D/PyLith/trunk/modulesrc/materials/materials.pyxe.src
Log:
Added MaxwellIsotropic3d.


Modified: short/3D/PyLith/trunk/modulesrc/materials/materials.pyxe.src
===================================================================
--- short/3D/PyLith/trunk/modulesrc/materials/materials.pyxe.src	2007-06-01 20:29:40 UTC (rev 7035)
+++ short/3D/PyLith/trunk/modulesrc/materials/materials.pyxe.src	2007-06-01 20:41:07 UTC (rev 7036)
@@ -18,6 +18,7 @@
 #include "pylith/materials/ElasticIsotropic3D.hh"
 #include "pylith/materials/ElasticPlaneStrain.hh"
 #include "pylith/materials/ElasticPlaneStress.hh"
+#include "pylith/materials/MaxwellIsotropic3D.hh"
 
 #include <assert.h>
 #include <stdexcept>
@@ -412,4 +413,32 @@
     return
 
 
+# ----------------------------------------------------------------------
+cdef class MaxwellIsotropic3D(ElasticMaterial):
+
+  def __init__(self):
+    """
+    Constructor.
+    """
+    # create shim for constructor
+    #embed{ void* MaxwellIsotropic3D_constructor()
+    void* result = 0;
+    try {
+      result = (void*)(new pylith::materials::MaxwellIsotropic3D);
+      assert(0 != result);
+    } catch (const std::exception& err) {
+      PyErr_SetString(PyExc_RuntimeError,
+                      const_cast<char*>(err.what()));
+    } catch (...) {
+      PyErr_SetString(PyExc_RuntimeError,
+                      "Caught unknown C++ exception.");
+    } // try/catch
+    return result;
+    #}embed
+
+    ElasticMaterial.__init__(self)
+    self.thisptr = MaxwellIsotropic3D_constructor()
+    self.handle = self._createHandle()
+    return
+
 # End of file 



More information about the cig-commits mailing list