[cig-commits] r16477 - in short/3D/PyLith/trunk/modulesrc: bc faults feassemble friction materials meshio problems topology utils

brad at geodynamics.org brad at geodynamics.org
Wed Mar 31 14:25:07 PDT 2010


Author: brad
Date: 2010-03-31 14:25:06 -0700 (Wed, 31 Mar 2010)
New Revision: 16477

Modified:
   short/3D/PyLith/trunk/modulesrc/bc/bc.i
   short/3D/PyLith/trunk/modulesrc/faults/faults.i
   short/3D/PyLith/trunk/modulesrc/feassemble/ElasticityExplicit.i
   short/3D/PyLith/trunk/modulesrc/feassemble/ElasticityExplicitLgDeform.i
   short/3D/PyLith/trunk/modulesrc/feassemble/ElasticityExplicitTet4.i
   short/3D/PyLith/trunk/modulesrc/feassemble/feassemble.i
   short/3D/PyLith/trunk/modulesrc/friction/friction.i
   short/3D/PyLith/trunk/modulesrc/materials/materials.i
   short/3D/PyLith/trunk/modulesrc/meshio/meshio.i
   short/3D/PyLith/trunk/modulesrc/problems/problems.i
   short/3D/PyLith/trunk/modulesrc/topology/topology.i
   short/3D/PyLith/trunk/modulesrc/utils/utils.i
Log:
Added trapping of Sieve exceptions.

Modified: short/3D/PyLith/trunk/modulesrc/bc/bc.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/bc/bc.i	2010-03-31 19:25:49 UTC (rev 16476)
+++ short/3D/PyLith/trunk/modulesrc/bc/bc.i	2010-03-31 21:25:06 UTC (rev 16477)
@@ -31,6 +31,8 @@
 %exception {
   try {
     $action
+  } catch (const ALE::Exception& err) {
+    SWIG_exception(SWIG_RuntimeError, err.message());
   } catch (const std::exception& err) {
     SWIG_exception(SWIG_RuntimeError, err.what());
   } // try/catch

Modified: short/3D/PyLith/trunk/modulesrc/faults/faults.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/faults/faults.i	2010-03-31 19:25:49 UTC (rev 16476)
+++ short/3D/PyLith/trunk/modulesrc/faults/faults.i	2010-03-31 21:25:06 UTC (rev 16477)
@@ -38,6 +38,8 @@
 %exception {
   try {
     $action
+  } catch (const ALE::Exception& err) {
+    SWIG_exception(SWIG_RuntimeError, err.message());
   } catch (const std::exception& err) {
     SWIG_exception(SWIG_RuntimeError, err.what());
   } // try/catch

Modified: short/3D/PyLith/trunk/modulesrc/feassemble/ElasticityExplicit.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/feassemble/ElasticityExplicit.i	2010-03-31 19:25:49 UTC (rev 16476)
+++ short/3D/PyLith/trunk/modulesrc/feassemble/ElasticityExplicit.i	2010-03-31 21:25:06 UTC (rev 16477)
@@ -56,6 +56,16 @@
 			     const double t,
 			     pylith::topology::SolutionFields* const fields);
       
+      /** Integrate contributions to residual term (r) for operator.
+       *
+       * @param residual Field containing values for residual
+       * @param t Current time
+       * @param fields Solution fields
+       */
+      void integrateResidualLumped(const pylith::topology::Field<pylith::topology::Mesh>& residual,
+				   const double t,
+				   pylith::topology::SolutionFields* const fields);
+
       /** Integrate contributions to Jacobian matrix (A) associated with
        * operator.
        *

Modified: short/3D/PyLith/trunk/modulesrc/feassemble/ElasticityExplicitLgDeform.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/feassemble/ElasticityExplicitLgDeform.i	2010-03-31 19:25:49 UTC (rev 16476)
+++ short/3D/PyLith/trunk/modulesrc/feassemble/ElasticityExplicitLgDeform.i	2010-03-31 21:25:06 UTC (rev 16477)
@@ -56,6 +56,16 @@
 			     const double t,
 			     pylith::topology::SolutionFields* const fields);
 
+      /** Integrate contributions to residual term (r) for operator.
+       *
+       * @param residual Field containing values for residual
+       * @param t Current time
+       * @param fields Solution fields
+       */
+      void integrateResidualLumped(const pylith::topology::Field<pylith::topology::Mesh>& residual,
+				   const double t,
+				   pylith::topology::SolutionFields* const fields);
+
       /** Integrate contributions to Jacobian matrix (A) associated with
        * operator.
        *

Modified: short/3D/PyLith/trunk/modulesrc/feassemble/ElasticityExplicitTet4.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/feassemble/ElasticityExplicitTet4.i	2010-03-31 19:25:49 UTC (rev 16476)
+++ short/3D/PyLith/trunk/modulesrc/feassemble/ElasticityExplicitTet4.i	2010-03-31 21:25:06 UTC (rev 16477)
@@ -56,6 +56,16 @@
 			     const double t,
 			     pylith::topology::SolutionFields* const fields);
       
+      /** Integrate contributions to residual term (r) for operator.
+       *
+       * @param residual Field containing values for residual
+       * @param t Current time
+       * @param fields Solution fields
+       */
+      void integrateResidualLumped(const pylith::topology::Field<pylith::topology::Mesh>& residual,
+				   const double t,
+				   pylith::topology::SolutionFields* const fields);
+
       /** Integrate contributions to Jacobian matrix (A) associated with
        * operator.
        *

Modified: short/3D/PyLith/trunk/modulesrc/feassemble/feassemble.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/feassemble/feassemble.i	2010-03-31 19:25:49 UTC (rev 16476)
+++ short/3D/PyLith/trunk/modulesrc/feassemble/feassemble.i	2010-03-31 21:25:06 UTC (rev 16477)
@@ -45,6 +45,8 @@
 %exception {
   try {
     $action
+  } catch (const ALE::Exception& err) {
+    SWIG_exception(SWIG_RuntimeError, err.message());
   } catch (const std::exception& err) {
     SWIG_exception(SWIG_RuntimeError, err.what());
   } // try/catch

Modified: short/3D/PyLith/trunk/modulesrc/friction/friction.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/friction/friction.i	2010-03-31 19:25:49 UTC (rev 16476)
+++ short/3D/PyLith/trunk/modulesrc/friction/friction.i	2010-03-31 21:25:06 UTC (rev 16477)
@@ -26,12 +26,15 @@
 #include "pylith/friction/RateStateAgeing.hh"
 
 #include "pylith/utils/arrayfwd.hh"
+#include "pylith/utils/sievetypes.hh"
 %}
 
 %include "exception.i"
 %exception {
   try {
     $action
+  } catch (const ALE::Exception& err) {
+    SWIG_exception(SWIG_RuntimeError, err.message());
   } catch (const std::exception& err) {
     SWIG_exception(SWIG_RuntimeError, err.what());
   } // try/catch

Modified: short/3D/PyLith/trunk/modulesrc/materials/materials.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/materials/materials.i	2010-03-31 19:25:49 UTC (rev 16476)
+++ short/3D/PyLith/trunk/modulesrc/materials/materials.i	2010-03-31 21:25:06 UTC (rev 16477)
@@ -32,12 +32,15 @@
 #include "pylith/materials/PowerLaw3D.hh"
 
 #include "pylith/utils/arrayfwd.hh"
+#include "pylith/utils/sievetypes.hh"
 %}
 
 %include "exception.i"
 %exception {
   try {
     $action
+  } catch (const ALE::Exception& err) {
+    SWIG_exception(SWIG_RuntimeError, err.message());
   } catch (const std::exception& err) {
     SWIG_exception(SWIG_RuntimeError, err.what());
   } // try/catch

Modified: short/3D/PyLith/trunk/modulesrc/meshio/meshio.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/meshio/meshio.i	2010-03-31 19:25:49 UTC (rev 16476)
+++ short/3D/PyLith/trunk/modulesrc/meshio/meshio.i	2010-03-31 21:25:06 UTC (rev 16477)
@@ -39,6 +39,8 @@
 %exception {
   try {
     $action
+  } catch (const ALE::Exception& err) {
+    SWIG_exception(SWIG_RuntimeError, err.message());
   } catch (const std::exception& err) {
     SWIG_exception(SWIG_RuntimeError, err.what());
   } // try/catch

Modified: short/3D/PyLith/trunk/modulesrc/problems/problems.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/problems/problems.i	2010-03-31 19:25:49 UTC (rev 16476)
+++ short/3D/PyLith/trunk/modulesrc/problems/problems.i	2010-03-31 21:25:06 UTC (rev 16477)
@@ -28,12 +28,15 @@
 #include "pylith/problems/SolverNonlinear.hh"
 #include "pylith/problems/SolverLumped.hh"
 
+#include "pylith/utils/sievetypes.hh"
 %}
 
 %include "exception.i"
 %exception {
   try {
     $action
+  } catch (const ALE::Exception& err) {
+    SWIG_exception(SWIG_RuntimeError, err.message());
   } catch (const std::exception& err) {
     SWIG_exception(SWIG_RuntimeError, err.what());
   } // try/catch

Modified: short/3D/PyLith/trunk/modulesrc/topology/topology.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/topology/topology.i	2010-03-31 19:25:49 UTC (rev 16476)
+++ short/3D/PyLith/trunk/modulesrc/topology/topology.i	2010-03-31 21:25:06 UTC (rev 16477)
@@ -32,6 +32,8 @@
 %exception {
   try {
     $action
+  } catch (const ALE::Exception& err) {
+    SWIG_exception(SWIG_RuntimeError, err.message());
   } catch (const std::exception& err) {
     SWIG_exception(SWIG_RuntimeError, err.what());
   } // try/catch

Modified: short/3D/PyLith/trunk/modulesrc/utils/utils.i
===================================================================
--- short/3D/PyLith/trunk/modulesrc/utils/utils.i	2010-03-31 19:25:49 UTC (rev 16476)
+++ short/3D/PyLith/trunk/modulesrc/utils/utils.i	2010-03-31 21:25:06 UTC (rev 16477)
@@ -20,12 +20,15 @@
 
 #include <petsclog.h> // USES PetscLogEventBegin/End() in inline methods
 #include "pylith/utils/arrayfwd.hh" // USES double_array
+#include "pylith/utils/sievetypes.hh"
 %}
 
 %include "exception.i"
 %exception {
   try {
     $action
+  } catch (const ALE::Exception& err) {
+    SWIG_exception(SWIG_RuntimeError, err.message());
   } catch (const std::exception& err) {
     SWIG_exception(SWIG_RuntimeError, err.what());
   } // try/catch



More information about the CIG-COMMITS mailing list