[cig-commits] r13501 - in cs/cigma/trunk: src tests/libcigma

luis at geodynamics.org luis at geodynamics.org
Tue Dec 9 18:12:43 PST 2008


Author: luis
Date: 2008-12-09 18:12:43 -0800 (Tue, 09 Dec 2008)
New Revision: 13501

Modified:
   cs/cigma/trunk/src/MeshPart.cpp
   cs/cigma/trunk/tests/libcigma/LocatorTest.cpp
Log:
Updated Locator test

Modified: cs/cigma/trunk/src/MeshPart.cpp
===================================================================
--- cs/cigma/trunk/src/MeshPart.cpp	2008-12-10 02:12:41 UTC (rev 13500)
+++ cs/cigma/trunk/src/MeshPart.cpp	2008-12-10 02:12:43 UTC (rev 13501)
@@ -29,6 +29,7 @@
 
 void MeshPart::setLocator(const shared_ptr<Locator>& loc)
 {
+    assert(loc);
     assert(loc->n_dim() > 0);
     this->locator = loc;
 }

Modified: cs/cigma/trunk/tests/libcigma/LocatorTest.cpp
===================================================================
--- cs/cigma/trunk/tests/libcigma/LocatorTest.cpp	2008-12-10 02:12:41 UTC (rev 13500)
+++ cs/cigma/trunk/tests/libcigma/LocatorTest.cpp	2008-12-10 02:12:43 UTC (rev 13501)
@@ -38,7 +38,7 @@
     mesh->setCell(Cell::New("hex8"));
 
     //
-    // Locator
+    // Initialize Locator
     //
     shared_ptr<AnnLocator> locator(new AnnLocator);
     locator->init(*mesh);
@@ -59,26 +59,12 @@
     int cellIndex = -1;
     
     found = mesh->findCell(point, &cellIndex);
-    //CPPUNIT_ASSERT(0 <= cellIndex);
-    //CPPUNIT_ASSERT(cellIndex < eb->n_cells());
+    CPPUNIT_ASSERT((0 <= cellIndex) && (cellIndex < eb->n_cells()));
     CPPUNIT_ASSERT_EQUAL(6, cellIndex);
 
     mesh->selectCell(6);
     //CPPUNIT_ASSERT_EQUAL(true, mesh->cell->interior(uvw));
     CPPUNIT_ASSERT_EQUAL(true, mesh->cell->global_interior(point));
 
-    /*
-    cout << "+++++++++++++\n";
-    for (int i = 0; i < 8; i++)
-    {
-        for (int j = 0; j < 3; j++)
-        {
-            cout << mesh->cell->globverts[3*i+j] << " ";
-        }
-        cout << endl;
-    }
-    cout << "++++++++++++++\n";
-    // */
-
 }
 



More information about the CIG-COMMITS mailing list