[cig-commits] r13499 - cs/cigma/trunk/tests/libcigma
luis at geodynamics.org
luis at geodynamics.org
Tue Dec 9 18:12:40 PST 2008
Author: luis
Date: 2008-12-09 18:12:39 -0800 (Tue, 09 Dec 2008)
New Revision: 13499
Modified:
cs/cigma/trunk/tests/libcigma/LocatorTest.cpp
Log:
Use core reader functions in Locator test
Modified: cs/cigma/trunk/tests/libcigma/LocatorTest.cpp
===================================================================
--- cs/cigma/trunk/tests/libcigma/LocatorTest.cpp 2008-12-10 02:12:38 UTC (rev 13498)
+++ cs/cigma/trunk/tests/libcigma/LocatorTest.cpp 2008-12-10 02:12:39 UTC (rev 13499)
@@ -7,6 +7,7 @@
#include "eb_array.h"
#include "Cell.h"
#include "io_text_reader.h"
+#include "core_readers.h"
using namespace cigma;
#include <string>
@@ -18,25 +19,16 @@
void LocatorTest::test_something()
{
- //
- // Read an node and element data
- //
- shared_ptr<nc_array> nc(new nc_array);
- shared_ptr<eb_array> eb(new eb_array);
-
string prefix = "tests/data/brick1/";
string coordfile = prefix + "brick1_coords.dat";
string connfile = prefix + "brick1_connect.dat";
+ //
+ // Load node and element data
+ //
+ shared_ptr<NodeCoordinates> nc = ReadNodeCoordinates(DataPath(coordfile));
+ shared_ptr<ElementBlock> eb = ReadElementBlock(DataPath(connfile));
- TextReader coord_reader;
- coord_reader.open(coordfile.c_str());
- coord_reader.getCoordinates(0, &(nc->coords), &(nc->nno), &(nc->nsd));
-
- 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
//
More information about the CIG-COMMITS
mailing list