[cig-commits] r13510 - in cs/cigma/trunk: src tests/libcigma
luis at geodynamics.org
luis at geodynamics.org
Tue Dec 9 18:12:55 PST 2008
Author: luis
Date: 2008-12-09 18:12:55 -0800 (Tue, 09 Dec 2008)
New Revision: 13510
Modified:
cs/cigma/trunk/src/core_readers.cpp
cs/cigma/trunk/src/core_readers.h
cs/cigma/trunk/tests/libcigma/DofHandlerTest.cpp
cs/cigma/trunk/tests/libcigma/DofHandlerTest.h
cs/cigma/trunk/tests/libcigma/ElementBlockTest.cpp
cs/cigma/trunk/tests/libcigma/ElementBlockTest.h
cs/cigma/trunk/tests/libcigma/MeshPartTest.cpp
cs/cigma/trunk/tests/libcigma/MeshPartTest.h
cs/cigma/trunk/tests/libcigma/NodeCoordinatesTest.cpp
Log:
Updated core_readers.{h,cpp} & tests
Modified: cs/cigma/trunk/src/core_readers.cpp
===================================================================
--- cs/cigma/trunk/src/core_readers.cpp 2008-12-10 02:12:54 UTC (rev 13509)
+++ cs/cigma/trunk/src/core_readers.cpp 2008-12-10 02:12:55 UTC (rev 13510)
@@ -1,31 +1,78 @@
#include "core_readers.h"
-#include "Exception.h"
-#include "io_file_reader.h"
+#include "core_array.h"
#include "nc_array.h"
#include "eb_array.h"
+#include "AnnLocator.h"
#include <string>
-#include "DataPath.h"
using namespace std;
using namespace cigma;
using boost::shared_ptr;
+// ----------------------------------------------------------------------------
+DataPath MeshInfo::get_nc_path() const
+{
+ // XXX: combine p_mesh w/ p_nc override
+ return p_nc;
+}
+
+DataPath MeshInfo::get_eb_path() const
+{
+ // XXX: combine p_mesh w/ p_eb override
+ return p_eb;
+}
+
// ----------------------------------------------------------------------------
-/*
- * Read a NodeCoordinates object on a given data path.
- *
- */
+
+static cigma::array<double>* ReadArray(const DataPath& array_path)
+{
+ cigma::array<double>* a = 0;
+
+ string filename = array_path.filename();
+ shared_ptr<FileReader> reader = FileReader::New(filename, "r");
+ const FileReader::ReaderType rt = reader->getReaderType();
+ if (rt == FileReader::HDF5_FILE_READER)
+ {
+ int status;
+ throw cigma::Exception("ReadArray", "Error in HDF5 reader");
+ }
+ else if (rt == FileReader::VTK_FILE_READER)
+ {
+ int status;
+ throw cigma::Exception("ReadNodeCoordinates", "Error in VTK reader");
+ }
+ else if (rt == FileReader::TEXT_FILE_READER)
+ {
+ a = new cigma::array<double>();
+ int status = reader->getDataset(0, &(a->_data), &(a->npts), &(a->ndim));
+ if (status < 0)
+ {
+ delete a;
+ throw cigma::Exception("ReadArray", "error in text reader");
+ }
+ return a;
+ }
+ else
+ {
+ throw cigma::Exception("ReadArray", "could not load data path");
+ }
+
+ return a;
+}
+
+// ----------------------------------------------------------------------------
+
+
shared_ptr<NodeCoordinates> cigma::ReadNodeCoordinates(const DataPath &nc_path)
{
shared_ptr<NodeCoordinates> nc_ptr;
-
string filename = nc_path.filename();
string location = nc_path.location();
- shared_ptr<FileReader> reader = FileReader::New(filename, "r");
/* dispatch on reader type */
+ shared_ptr<FileReader> reader = FileReader::New(filename, "r");
const FileReader::ReaderType rt = reader->getReaderType();
if (rt == FileReader::HDF5_FILE_READER)
{
@@ -62,12 +109,11 @@
shared_ptr<ElementBlock> cigma::ReadElementBlock(const DataPath& eb_path)
{
shared_ptr<ElementBlock> eb_ptr;
-
string filename = eb_path.filename();
string location = eb_path.location();
- shared_ptr<FileReader> reader = FileReader::New(filename, "r");
/* dispatch on reader type */
+ shared_ptr<FileReader> reader = FileReader::New(filename, "r");
const FileReader::ReaderType rt = reader->getReaderType();
if (rt == FileReader::HDF5_FILE_READER)
{
@@ -89,6 +135,10 @@
}
eb_ptr = eb;
}
+ else
+ {
+ throw cigma::Exception("ReadElementBlock", "could not load data path");
+ }
return eb_ptr;
}
@@ -97,15 +147,174 @@
// ----------------------------------------------------------------------------
+shared_ptr<MeshPart> cigma::ReadMeshPart(const MeshInfo& mesh_info)
+{
+ shared_ptr<MeshPart> mesh_ptr;
+ shared_ptr<NodeCoordinates> nc_ptr;
+ shared_ptr<ElementBlock> eb_ptr;
+ shared_ptr<AnnLocator> loc_ptr;
+ Cell::type cell_type = Cell::NONE;
+
+ // load coordinates
+ DataPath nc_path = mesh_info.get_nc_path();
+ nc_ptr = ReadNodeCoordinates(nc_path);
+
+ // load elements
+ DataPath eb_path = mesh_info.get_eb_path();
+ eb_ptr = ReadElementBlock(eb_path);
+
+ // load cell type from name
+ cell_type = Cell::string2type(mesh_info.cell_type_name);
+
+ // initialize mesh
+ mesh_ptr = shared_ptr<MeshPart>(new MeshPart);
+ mesh_ptr->setCellType(cell_type);
+ mesh_ptr->setNodeCoordinates(nc_ptr);
+ mesh_ptr->setElementBlock(eb_ptr);
+ if (mesh_info.use_locator)
+ {
+ // XXX: is there a better way to initialize? inheritance on MeshPart perhaps?
+ loc_ptr = shared_ptr<AnnLocator>(new AnnLocator);
+ loc_ptr->init(*mesh_ptr);
+ mesh_ptr->setLocator(loc_ptr);
+ }
+
+ return mesh_ptr;
+}
+
+
+
+// ----------------------------------------------------------------------------
+
+
+shared_ptr<Quadrature> cigma::ReadQuadrature(const QuadratureInfo& quadrature_info)
+{
+ shared_ptr<Quadrature> q_ptr(new Quadrature);
+
+ Cell::type cell_type = Cell::NONE;
+ if (quadrature_info.cell_type_name != "")
+ {
+ cell_type = Cell::string2type(quadrature_info.cell_type_name);
+ }
+
+ if (quadrature_info.p_quadrature.empty() &&
+ quadrature_info.p_weights.empty() &&
+ quadrature_info.p_points.empty())
+ {
+ if (cell_type != Cell::NONE)
+ {
+ q_ptr = Quadrature::default_rule(cell_type);
+ }
+ else
+ {
+ throw cigma::Exception("ReadQuadrature", "");
+ }
+ }
+ else if (quadrature_info.p_quadrature.empty())
+ {
+ if (quadrature_info.p_weights.empty())
+ {
+ throw cigma::Exception("ReadQuadrature", "");
+ }
+
+ if (quadrature_info.p_points.empty())
+ {
+ throw cigma::Exception("ReadQuadrature", "");
+ }
+
+ // load weights
+ cigma::array<double> *wts = ReadArray(quadrature_info.p_weights);
+ if (wts == 0)
+ {
+ throw cigma::Exception("ReadQuadrature", "");
+ }
+ q_ptr->weights = wts->_data;
+ wts->_data = 0;
+ delete wts;
+
+ // load points
+ cigma::array<double> *pts = ReadArray(quadrature_info.p_points);
+ if (pts == 0)
+ {
+ throw cigma::Exception("ReadQuadrature", "");
+ }
+ q_ptr->points = pts->_data;
+ pts->_data = 0;
+ delete pts;
+ }
+ else
+ {
+ if (!quadrature_info.p_weights.empty())
+ {
+ throw cigma::Exception("ReadQuadrature", "");
+ }
+
+ if (!quadrature_info.p_points.empty())
+ {
+ throw cigma::Exception("ReadQuadrature", "");
+ }
+
+ // load weights & points simultaneously
+ cigma::array<double> *wx = ReadArray(quadrature_info.p_quadrature);
+ const int npts = wx->n_points();
+ const int ndim = -1 + wx->n_dim();
+ q_ptr->reinit(npts, ndim);
+ for (int q = 0; q < npts; q++)
+ {
+ q_ptr->setWeight(q, wx->data(q, 0));
+ for (int j = 0; j < ndim; j++)
+ {
+ q_ptr->setPoint(q, j, wx->data(q, 1+j));
+ }
+ }
+ delete wx;
+ }
+
+ return q_ptr;
+}
+
+
+// ----------------------------------------------------------------------------
+
+
+shared_ptr<FE> cigma::ReadFE(const FE_Info& fe_info)
+{
+ assert(fe_info.q_info.cell_type_name != "");
+
+ shared_ptr<FE> fe_ptr;
+ shared_ptr<Quadrature> q_ptr;
+
+ // load quadrature
+ q_ptr = ReadQuadrature(fe_info.q_info);
+
+ // initialize fe
+ fe_ptr = shared_ptr<FE>(new FE);
+ fe_ptr->init(q_ptr);
+ if (fe_info.p_fe_basis.empty())
+ {
+ fe_ptr->init_basis();
+ }
+ else
+ {
+ // XXX: copy basis tabulation from fe_info.p_fe_basis (needed for FIAT)
+ fe_ptr->init_basis();
+ }
+
+ return fe_ptr;
+}
+
+
+// ----------------------------------------------------------------------------
+
+
shared_ptr<DofHandler> cigma::ReadDofHandler(const DataPath& dofs_path)
{
shared_ptr<DofHandler> dofs_ptr;
-
string filename = dofs_path.filename();
string location = dofs_path.location();
- shared_ptr<FileReader> reader = FileReader::New(location, "r");
/* dispatch on reader type */
+ shared_ptr<FileReader> reader = FileReader::New(filename, "r");
const FileReader::ReaderType rt = reader->getReaderType();
if (rt == FileReader::HDF5_FILE_READER)
{
@@ -119,51 +328,48 @@
}
else if (rt == FileReader::TEXT_FILE_READER)
{
+ dofs_ptr = shared_ptr<DofHandler>(new DofHandler);
int status = reader->getDataset(0, &(dofs_ptr->dofs), &(dofs_ptr->nno), &(dofs_ptr->rank));
if (status < 0)
{
throw cigma::Exception("ReadDofHandler", "Error in text reader");
}
}
+ else
+ {
+ throw cigma::Exception("ReadDofHandler", "could not load data path");
+ }
return dofs_ptr;
}
+
// ----------------------------------------------------------------------------
-
-/*
-shared_ptr<Quadrature> cigma::ReadQuadrature(const DataPath& quadrature, Cell::type cell)
+shared_ptr<Field> cigma::ReadField(const FieldInfo& field_info)
{
- shared_ptr<Quadrature> q_ptr;
- shared_ptr<FileReader> reader;
- reader = FileReader::New(quadrature.filename(), "r");
- return q_ptr;
-}
-
-shared_ptr<FE> cigma::ReadFE(const DataPath& fe)
-{
+ shared_ptr<Field> field_ptr;
+ shared_ptr<MeshPart> mesh_ptr;
shared_ptr<FE> fe_ptr;
- shared_ptr<FileReader> reader;
- reader = FileReader::New(fe.filename(), "r");
- return fe_ptr;
-}
+ shared_ptr<DofHandler> dofs_ptr;
-shared_ptr<MeshPart> cigma::ReadMeshPart(const DataPath& mesh)
-{
- shared_ptr<MeshPart> mesh_ptr;
- shared_ptr<FileReader> reader;
- reader = FileReader::New(mesh.filename(), "r");
- return mesh_ptr;
-}
+ // load mesh
+ mesh_ptr = ReadMeshPart(field_info.mesh_info);
-shared_ptr<Field> cigma::ReadField(const DataPath& field)
-{
- shared_ptr<Field> field_ptr;
- shared_ptr<FileReader> reader;
- reader = FileReader::New(field.filename(), "r");
+ // load FE
+ fe_ptr = ReadFE(field_info.fe_info);
+
+ // load DofHandler
+ dofs_ptr = ReadDofHandler(field_info.p_field);
+
+ // initialize Field
+ field_ptr = shared_ptr<Field>(new Field);
+ field_ptr->setMesh(mesh_ptr);
+ field_ptr->setFE(fe_ptr);
+ field_ptr->setDofHandler(dofs_ptr);
+
return field_ptr;
}
-*/
+// ----------------------------------------------------------------------------
Modified: cs/cigma/trunk/src/core_readers.h
===================================================================
--- cs/cigma/trunk/src/core_readers.h 2008-12-10 02:12:54 UTC (rev 13509)
+++ cs/cigma/trunk/src/core_readers.h 2008-12-10 02:12:55 UTC (rev 13510)
@@ -11,27 +11,133 @@
#include "Field.h"
#include "Cell.h"
#include "DataPath.h"
+#include "io_file_reader.h"
+#include "Exception.h"
+
namespace cigma
{
+
+ struct MeshInfo
+ {
+ DataPath p_mesh;
+ DataPath p_nc;
+ DataPath p_eb;
+ bool use_locator;
+ std::string cell_type_name;
+
+ MeshInfo() : use_locator(false) {}
+ ~MeshInfo() {}
+ MeshInfo(const MeshInfo& other)
+ {
+ p_mesh = other.p_mesh;
+ p_nc = other.p_nc;
+ p_eb = other.p_eb;
+ use_locator = other.use_locator;
+ cell_type_name = other.cell_type_name;
+ }
+ MeshInfo& operator=(const MeshInfo& other)
+ {
+ p_mesh = other.p_mesh;
+ p_nc = other.p_nc;
+ p_eb = other.p_eb;
+ use_locator = other.use_locator;
+ cell_type_name = other.cell_type_name;
+ }
+ //bool single_file() const;
+ DataPath get_nc_path() const;
+ DataPath get_eb_path() const;
+ //FileReader::ReaderType get_nc_reader_type() const;
+ //FileReader::ReaderType get_eb_reader_type() const;
+ };
+
+ struct QuadratureInfo
+ {
+ DataPath p_quadrature;
+ DataPath p_weights;
+ DataPath p_points;
+ std::string cell_type_name;
+
+ QuadratureInfo() {}
+ ~QuadratureInfo() {}
+ QuadratureInfo(const QuadratureInfo& other)
+ {
+ p_quadrature = other.p_quadrature;
+ p_weights = other.p_weights;
+ p_points = other.p_points;
+ cell_type_name = other.cell_type_name;
+ }
+ QuadratureInfo& operator=(const QuadratureInfo& other)
+ {
+ p_quadrature = other.p_quadrature;
+ p_weights = other.p_weights;
+ p_points = other.p_points;
+ cell_type_name = other.cell_type_name;
+ }
+ //bool single_file() const;
+ //DataPath get_weights_path() const;
+ //DataPath get_points_path() const;
+ //FileReader::ReaderType get_weights_reader_type() const;
+ //FileReader::ReaderType get_points_reader_type() const;
+ };
+
+ struct FE_Info
+ {
+ QuadratureInfo q_info;
+ DataPath p_fe_basis;
+ DataPath p_fe_basis_jet;
+
+ FE_Info() {}
+ ~FE_Info() {}
+ FE_Info(const FE_Info& other)
+ {
+ q_info = other.q_info;
+ p_fe_basis = other.p_fe_basis;
+ p_fe_basis_jet = other.p_fe_basis_jet;
+ }
+ FE_Info& operator=(const FE_Info& other)
+ {
+ q_info = other.q_info;
+ p_fe_basis = other.p_fe_basis;
+ p_fe_basis_jet = other.p_fe_basis_jet;
+ }
+ };
+
+ struct FieldInfo
+ {
+ DataPath p_field;
+ FE_Info fe_info;
+ MeshInfo mesh_info;
+
+ FieldInfo() {}
+ ~FieldInfo() {}
+ FieldInfo(const FieldInfo& other)
+ {
+ p_field = other.p_field;
+ fe_info = other.fe_info;
+ mesh_info = other.mesh_info;
+ }
+ FieldInfo& operator=(const FieldInfo& other)
+ {
+ p_field = other.p_field;
+ fe_info = other.fe_info;
+ mesh_info = other.mesh_info;
+ }
+ };
+
boost::shared_ptr<NodeCoordinates> ReadNodeCoordinates(const DataPath& nc_path);
+
boost::shared_ptr<ElementBlock> ReadElementBlock(const DataPath& eb_path);
- boost::shared_ptr<DofHandler> ReadDofHandler(const DataPath& dofs_path);
- /*
- boost::shared_ptr<Quadrature> ReadQuadrature(const DataPath& quadrature, cigma::Cell::type cell);
- boost::shared_ptr<FE> ReadFE(const DataPath& fe, cigma::Cell::type cell);
+ boost::shared_ptr<MeshPart> ReadMeshPart(const MeshInfo& mesh_info);
- boost::shared_ptr<MeshPart> ReadMeshPart(const DataPath& mesh,
- const DataPath& nc,
- const DataPath& eb);
+ boost::shared_ptr<Quadrature> ReadQuadrature(const QuadratureInfo& quadrature_info);
- boost::shared_ptr<Field> ReadField(const DataPath& field,
- const DataPath& dofs,
- const DataPath& mesh,
- const DataPath& nc,
- const DataPath& eb);
- */
+ boost::shared_ptr<FE> ReadFE(const FE_Info& fe_info);
+
+ boost::shared_ptr<DofHandler> ReadDofHandler(const DataPath& dofs_path);
+
+ boost::shared_ptr<Field> ReadField(const FieldInfo& field_info);
}
#endif
Modified: cs/cigma/trunk/tests/libcigma/DofHandlerTest.cpp
===================================================================
--- cs/cigma/trunk/tests/libcigma/DofHandlerTest.cpp 2008-12-10 02:12:54 UTC (rev 13509)
+++ cs/cigma/trunk/tests/libcigma/DofHandlerTest.cpp 2008-12-10 02:12:55 UTC (rev 13510)
@@ -2,8 +2,12 @@
using namespace libcigma;
#include "DofHandler.h"
+#include "core_readers.h"
using namespace cigma;
+#include <boost/shared_ptr.hpp>
+using boost::shared_ptr;
+
const double delta = 1e-8;
static void test_getData(int nno, int rank, double *dofs,
@@ -86,4 +90,11 @@
test_getData(nno, 6, dofs6, cellnno, nodeIds, ans6);
}
-
+void DofHandlerTest::test_text_reader()
+{
+ DataPath dofs_path("tests/data/brick1/brick1_coords.dat"); // load coords as dofs
+ shared_ptr<DofHandler> dofs = ReadDofHandler(dofs_path);
+ CPPUNIT_ASSERT(dofs);
+ CPPUNIT_ASSERT_EQUAL(27, dofs->n_nodes());
+ CPPUNIT_ASSERT_EQUAL(3, dofs->n_rank());
+}
Modified: cs/cigma/trunk/tests/libcigma/DofHandlerTest.h
===================================================================
--- cs/cigma/trunk/tests/libcigma/DofHandlerTest.h 2008-12-10 02:12:54 UTC (rev 13509)
+++ cs/cigma/trunk/tests/libcigma/DofHandlerTest.h 2008-12-10 02:12:55 UTC (rev 13510)
@@ -11,12 +11,14 @@
{
CPPUNIT_TEST_SUITE(DofHandlerTest);
CPPUNIT_TEST(test_get_data);
+ CPPUNIT_TEST(test_text_reader);
CPPUNIT_TEST_SUITE_END();
public:
DofHandlerTest() {}
~DofHandlerTest() {}
void test_get_data();
+ void test_text_reader();
};
};
Modified: cs/cigma/trunk/tests/libcigma/ElementBlockTest.cpp
===================================================================
--- cs/cigma/trunk/tests/libcigma/ElementBlockTest.cpp 2008-12-10 02:12:54 UTC (rev 13509)
+++ cs/cigma/trunk/tests/libcigma/ElementBlockTest.cpp 2008-12-10 02:12:55 UTC (rev 13510)
@@ -6,6 +6,7 @@
#include "ElementBlock.h"
#include "eb_array.h"
+#include "core_readers.h"
using namespace cigma;
const double delta = 1e-8;
@@ -39,3 +40,12 @@
}
}
}
+
+void ElementBlockTest::test_text_reader()
+{
+ DataPath eb_path("tests/data/brick1/brick1_connect.dat");
+ shared_ptr<ElementBlock> eb = ReadElementBlock(eb_path);
+ CPPUNIT_ASSERT(eb);
+ CPPUNIT_ASSERT_EQUAL(8, eb->n_cells());
+ CPPUNIT_ASSERT_EQUAL(8, eb->n_dofs());
+}
Modified: cs/cigma/trunk/tests/libcigma/ElementBlockTest.h
===================================================================
--- cs/cigma/trunk/tests/libcigma/ElementBlockTest.h 2008-12-10 02:12:54 UTC (rev 13509)
+++ cs/cigma/trunk/tests/libcigma/ElementBlockTest.h 2008-12-10 02:12:55 UTC (rev 13510)
@@ -11,6 +11,7 @@
{
CPPUNIT_TEST_SUITE(ElementBlockTest);
CPPUNIT_TEST(test_eb_array);
+ CPPUNIT_TEST(test_text_reader);
CPPUNIT_TEST_SUITE_END();
public:
@@ -18,6 +19,7 @@
~ElementBlockTest() {}
void test_eb_array();
+ void test_text_reader();
};
};
Modified: cs/cigma/trunk/tests/libcigma/MeshPartTest.cpp
===================================================================
--- cs/cigma/trunk/tests/libcigma/MeshPartTest.cpp 2008-12-10 02:12:54 UTC (rev 13509)
+++ cs/cigma/trunk/tests/libcigma/MeshPartTest.cpp 2008-12-10 02:12:55 UTC (rev 13510)
@@ -6,6 +6,7 @@
#include "nc_array.h"
#include "eb_array.h"
#include "MeshPart.h"
+#include "core_readers.h"
using namespace cigma;
#include <boost/shared_ptr.hpp>
@@ -46,9 +47,6 @@
shared_ptr<eb_array> eb(new eb_array(5,4));
eb->setConnectivity(connect);
mesh->setElementBlock(eb);
-
- //shared_ptr<Cell> cell(new tet4);
- //mesh->setCell(cell);
mesh->setCellType(Cell::TET4);
@@ -84,3 +82,19 @@
}
}
+void MeshPartTest::test_text_reader()
+{
+ MeshInfo mesh_info;
+ mesh_info.p_nc = DataPath("tests/data/brick1/brick1_coords.dat");
+ mesh_info.p_eb = DataPath("tests/data/brick1/brick1_connect.dat");
+ mesh_info.use_locator = false;
+ mesh_info.cell_type_name = "hex8";
+
+ shared_ptr<MeshPart> mesh = ReadMeshPart(mesh_info);
+ CPPUNIT_ASSERT(mesh);
+ CPPUNIT_ASSERT(mesh->coords);
+ CPPUNIT_ASSERT(mesh->connect);
+ CPPUNIT_ASSERT_EQUAL(27, mesh->coords->n_points());
+ CPPUNIT_ASSERT_EQUAL(8, mesh->n_cells());
+ CPPUNIT_ASSERT_EQUAL(Cell::HEX8, mesh->cell_type);
+}
Modified: cs/cigma/trunk/tests/libcigma/MeshPartTest.h
===================================================================
--- cs/cigma/trunk/tests/libcigma/MeshPartTest.h 2008-12-10 02:12:54 UTC (rev 13509)
+++ cs/cigma/trunk/tests/libcigma/MeshPartTest.h 2008-12-10 02:12:55 UTC (rev 13510)
@@ -11,12 +11,14 @@
{
CPPUNIT_TEST_SUITE(MeshPartTest);
CPPUNIT_TEST(test_something);
+ CPPUNIT_TEST(test_text_reader);
CPPUNIT_TEST_SUITE_END();
public:
MeshPartTest() {}
~MeshPartTest() {}
void test_something();
+ void test_text_reader();
};
};
Modified: cs/cigma/trunk/tests/libcigma/NodeCoordinatesTest.cpp
===================================================================
--- cs/cigma/trunk/tests/libcigma/NodeCoordinatesTest.cpp 2008-12-10 02:12:54 UTC (rev 13509)
+++ cs/cigma/trunk/tests/libcigma/NodeCoordinatesTest.cpp 2008-12-10 02:12:55 UTC (rev 13510)
@@ -69,9 +69,8 @@
void NodeCoordinatesTest::test_text_reader()
{
- shared_ptr<NodeCoordinates> nc;
- DataPath p("tests/data/brick1/brick1_coords.dat");
- nc = ReadNodeCoordinates(p);
+ DataPath nc_path("tests/data/brick1/brick1_coords.dat");
+ shared_ptr<NodeCoordinates> nc = ReadNodeCoordinates(nc_path);
CPPUNIT_ASSERT(nc);
CPPUNIT_ASSERT_EQUAL(27, nc->n_points());
CPPUNIT_ASSERT_EQUAL(3, nc->n_dim());
More information about the CIG-COMMITS
mailing list