[cig-commits] r5852 - in short/3D/PyLith/trunk: libsrc/feassemble modulesrc/feassemble unittests/libtests/feassemble

brad at geodynamics.org brad at geodynamics.org
Sat Jan 20 11:30:36 PST 2007


Author: brad
Date: 2007-01-20 11:30:36 -0800 (Sat, 20 Jan 2007)
New Revision: 5852

Modified:
   short/3D/PyLith/trunk/libsrc/feassemble/Integrator.cc
   short/3D/PyLith/trunk/libsrc/feassemble/IntegratorElasticity3D.cc
   short/3D/PyLith/trunk/modulesrc/feassemble/feassemble.pyxe
   short/3D/PyLith/trunk/unittests/libtests/feassemble/TestIntegrator.cc
   short/3D/PyLith/trunk/unittests/libtests/feassemble/TestIntegratorInertia.cc
Log:
Fixed compilation errors in feassemble module. Still have errors in integrator testing (need to update when cleaning up integrator).

Modified: short/3D/PyLith/trunk/libsrc/feassemble/Integrator.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/Integrator.cc	2007-01-20 04:40:44 UTC (rev 5851)
+++ short/3D/PyLith/trunk/libsrc/feassemble/Integrator.cc	2007-01-20 19:30:36 UTC (rev 5852)
@@ -17,6 +17,8 @@
 #include "Quadrature.hh"
 #include "spatialdata/spatialdb/SpatialDB.hh"
 
+#include <assert.h> // USES assert()
+
 // ----------------------------------------------------------------------
 // Constructor
 pylith::feassemble::Integrator::Integrator(void) :

Modified: short/3D/PyLith/trunk/libsrc/feassemble/IntegratorElasticity3D.cc
===================================================================
--- short/3D/PyLith/trunk/libsrc/feassemble/IntegratorElasticity3D.cc	2007-01-20 04:40:44 UTC (rev 5851)
+++ short/3D/PyLith/trunk/libsrc/feassemble/IntegratorElasticity3D.cc	2007-01-20 19:30:36 UTC (rev 5852)
@@ -55,5 +55,15 @@
 { // integrate
 } // integrate
 
+// ----------------------------------------------------------------------
+// Compute matrix associated with operator.
+void
+pylith::feassemble::IntegratorElasticity3D::initialize(
+				      ALE::Obj<ALE::Mesh>& mesh,
+				      spatialdata::geocoords::CoordSys* cs,
+				      spatialdata::spatialdb::SpatialDB* db)
+{ // initialize
+} // initialize
 
+
 // End of file 

Modified: short/3D/PyLith/trunk/modulesrc/feassemble/feassemble.pyxe
===================================================================
--- short/3D/PyLith/trunk/modulesrc/feassemble/feassemble.pyxe	2007-01-20 04:40:44 UTC (rev 5851)
+++ short/3D/PyLith/trunk/modulesrc/feassemble/feassemble.pyxe	2007-01-20 19:30:36 UTC (rev 5852)
@@ -294,12 +294,12 @@
     """
     # create shim for method 'initialize'
     #embed{ void Integrator_initialize(void* pObj, void* meshObj, void* csObj, void* dbObj)
-    ALE::Obj<ALE::Mesh>* mesh = (ALE::Obj<ALE::Mesh*>) meshObj;
+    ALE::Obj<ALE::Mesh>* mesh = (ALE::Obj<ALE::Mesh>*) meshObj;
     spatialdata::geocoords::CoordSys* cs =
       (spatialdata::geocoords::CoordSys*) csObj;
     spatialdata::spatialdb::SpatialDB* db =
       (spatialdata::spatialdb::SpatialDB*) dbObj;
-    ((pylith::feassemble::Integrator*) pObj)->initialize(mesh, cs, db);
+    ((pylith::feassemble::Integrator*) pObj)->initialize(*mesh, cs, db);
     #}embed
 
     if not mesh.name == "pylith_topology_Mesh":
@@ -314,6 +314,7 @@
       raise TypeError, \
             "Argument must be extension module type " \
             "'spatialdata::spatialdb::SpatialDB'."
+    cdef void* meshObj
     meshObj = <void*> PyCObject_AsVoidPtr(mesh)
     Integrator_initialize(self.thisptr, meshObj,
                           ptrFromHandle(cs), ptrFromHandle(db))

Modified: short/3D/PyLith/trunk/unittests/libtests/feassemble/TestIntegrator.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/feassemble/TestIntegrator.cc	2007-01-20 04:40:44 UTC (rev 5851)
+++ short/3D/PyLith/trunk/unittests/libtests/feassemble/TestIntegrator.cc	2007-01-20 19:30:36 UTC (rev 5852)
@@ -90,6 +90,9 @@
 pylith::feassemble::TestIntegrator::_testIntegrateAction(Integrator* integrator,
 					   const IntegratorData& data) const
 { // _testIntegrateAction
+  CPPUNIT_ASSERT(false);
+
+#if 0
   typedef ALE::Mesh::real_section_type real_section_type;
   typedef ALE::Mesh::topology_type topology_type;
 
@@ -142,6 +145,7 @@
     for (int iDim=0; iDim < fiberDim; ++iDim)
       CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, vals[iDim]/valsE[iDim], tolerance);
   } // for
+#endif
 } // _testIntegrateAction
 
 // ----------------------------------------------------------------------
@@ -150,6 +154,9 @@
 pylith::feassemble::TestIntegrator::_testIntegrate(Integrator* integrator,
 					  const IntegratorData& data) const
 { // _testIntegrate
+  CPPUNIT_ASSERT(false);
+
+#if 0
   typedef ALE::Mesh::real_section_type real_section_type;
   typedef ALE::Mesh::topology_type topology_type;
 
@@ -253,6 +260,7 @@
     std::cerr << err << std::endl;
     throw;
   } // try/catch
+#endif
 } // _testIntegrate
 
 // ----------------------------------------------------------------------

Modified: short/3D/PyLith/trunk/unittests/libtests/feassemble/TestIntegratorInertia.cc
===================================================================
--- short/3D/PyLith/trunk/unittests/libtests/feassemble/TestIntegratorInertia.cc	2007-01-20 04:40:44 UTC (rev 5851)
+++ short/3D/PyLith/trunk/unittests/libtests/feassemble/TestIntegratorInertia.cc	2007-01-20 19:30:36 UTC (rev 5852)
@@ -44,6 +44,10 @@
 					   IntegratorInertia* integrator,
 					   const IntegratorData& data) const
 { // _testIntegrateLumped
+
+  CPPUNIT_ASSERT(false);
+
+#if 0
   typedef ALE::Mesh::real_section_type real_section_type;
   typedef ALE::Mesh::topology_type topology_type;
 
@@ -64,7 +68,8 @@
   const ALE::Obj<real_section_type>& density =
     mesh->getRealSection("density");
   density->setName("density");
-  density->setFiberDimensionByDepth(patch, 0, _quadrature->numQuadPts());
+  density->setFiberDimensionByDepth(patch, 0, 
+				    integrator->_quadrature->numQuadPts());
   density->allocate();
   integrator->setDensity(density);
 
@@ -92,6 +97,7 @@
     for (int iDim=0; iDim < fiberDim; ++iDim)
       CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, vals[iDim]/valsE[iDim], tolerance);
   } // for
+#endif
 } // _testIntegrateLumped
 
 



More information about the cig-commits mailing list