[cig-commits] r13492 - cs/cigma/trunk/tests/libcigma

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


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

Modified:
   cs/cigma/trunk/tests/libcigma/LocatorTest.cpp
Log:
In Locator test, use separate readers for each file

Modified: cs/cigma/trunk/tests/libcigma/LocatorTest.cpp
===================================================================
--- cs/cigma/trunk/tests/libcigma/LocatorTest.cpp	2008-12-10 02:12:28 UTC (rev 13491)
+++ cs/cigma/trunk/tests/libcigma/LocatorTest.cpp	2008-12-10 02:12:29 UTC (rev 13492)
@@ -10,6 +10,7 @@
 using namespace cigma;
 
 #include <string>
+#include <iostream>
 using namespace std;
 
 #include <boost/shared_ptr.hpp>
@@ -27,13 +28,14 @@
     string coordfile = prefix + "brick1_coords.dat";
     string connfile = prefix + "brick1_connect.dat";
 
-    TextReader reader;
 
-    reader.getCoordinates(coordfile.c_str(), &(nc->coords), &(nc->nno), &(nc->nsd));
-    reader.close();
+    TextReader coord_reader;
+    coord_reader.open(coordfile.c_str());
+    coord_reader.getCoordinates(0, &(nc->coords), &(nc->nno), &(nc->nsd));
 
-    reader.getConnectivity(connfile.c_str(), &(eb->connect), &(eb->nel), &(eb->ndofs));
-    reader.close();
+    TextReader conn_reader;
+    conn_reader.open(connfile.c_str());
+    conn_reader.getConnectivity(0, &(eb->connect), &(eb->nel), &(eb->ndofs));
 
     //
     // Assign nc/eb arrays to a meshpart object
@@ -61,10 +63,10 @@
     //
     bool found = false;
     double point[3] = {0.1, 0.1, 0.1};
-    double uvw[3];
+    //double uvw[3];
     int cellIndex = -1;
     
-    found = mesh->findCell(point, uvw, &cellIndex);
+    found = mesh->findCell(point, &cellIndex);
     //CPPUNIT_ASSERT(0 <= cellIndex);
     //CPPUNIT_ASSERT(cellIndex < eb->n_cells());
     CPPUNIT_ASSERT_EQUAL(6, cellIndex);



More information about the CIG-COMMITS mailing list