7 #define BOOST_TEST_DYN_LINK
8 #define BOOST_TEST_MODULE "Tests cf3::mesh::UnifiedData<T>"
10 #include <boost/test/unit_test.hpp>
23 using namespace boost;
60 boost::shared_ptr<UnifiedData> unified_elems = allocate_component<UnifiedData>(
"unified_elems");
61 BOOST_CHECK_EQUAL(unified_elems->name(),
"unified_elems");
70 boost::shared_ptr< MeshReader > meshreader = build_component_abstract_type<MeshReader>(
"cf3.mesh.neu.Reader",
"meshreader");
74 Mesh&
mesh = *Core::instance().root().create_component<
Mesh>(
"mesh");
75 meshreader->read_mesh_into(
"../../resources/quadtriag.neu",mesh);
79 boost::shared_ptr<UnifiedData> unified_elems = allocate_component<UnifiedData>(
"unified_elems");
83 unified_elems->add(elements);
92 BOOST_CHECK_EQUAL( unified_elems->size() , 28u );
93 tie(elements,elem_idx) = unified_elems->location(25);
95 for (
Uint i=0; i<unified_elems->size(); ++i)
97 tie(elements,elem_idx) = unified_elems->location(i);
101 boost::shared_ptr<UnifiedData> unified_nodes = allocate_component<UnifiedData>(
"unified_nodes");
103 unified_nodes->add(nodes);
108 BOOST_CHECK_EQUAL( unified_nodes->size() , 16u );
111 for (
Uint i=0; i<unified_nodes->size(); ++i)
113 tie(nodes,node_idx) = unified_nodes->location(i);
121 BOOST_AUTO_TEST_SUITE_END()
#define CFinfo
these are always defined
Safe pointer to an object. This is the supported method for referring to components.
external boost library namespace
URI uri() const
Construct the full path.
std::string type_name(const boost::python::api::object &python_object)
#define boost_foreach
lowercase version of BOOST_FOREACH
boost::proto::terminal< SFOp< NodesOp > >::type const nodes
UnifiedData_Fixture()
common setup for each test case
Basic Classes for Mesh applications used by COOLFluiD.
Top-level namespace for coolfluid.
~UnifiedData_Fixture()
common tear-down for each test case
unsigned int Uint
typedef for unsigned int
BOOST_AUTO_TEST_CASE(Constructors)
Most basic kernel library.