7 #define BOOST_TEST_DYN_LINK
8 #define BOOST_TEST_MODULE "Test module for cf3::mesh::BoundingBox"
10 #include <boost/test/unit_test.hpp>
26 using namespace boost;
38 m_argc = boost::unit_test::framework::master_test_suite().argc;
39 m_argv = boost::unit_test::framework::master_test_suite().argv;
63 Core::instance().initiate(m_argc,m_argv);
64 PE::Comm::instance().init(m_argc,m_argv);
65 Core::instance().environment().options().set(
"log_level",3u);
76 boost::shared_ptr< MeshGenerator > generate_mesh = build_component_abstract_type<MeshGenerator>(
"cf3.mesh.SimpleMeshGenerator",
"meshgenerator");
77 generate_mesh->
options().
set(
"nb_cells",std::vector<Uint>(dim,10));
78 generate_mesh->options().set(
"lengths",std::vector<Real>(dim,10.));
79 generate_mesh->options().set(
"mesh",mesh->
uri());
80 generate_mesh->execute();
84 BOOST_CHECK_NO_THROW(bounding_box->build(*mesh));
87 switch (PE::Comm::instance().rank())
90 BOOST_CHECK_EQUAL(bounding_box->
min()[
XX] , 0.);
91 BOOST_CHECK_EQUAL(bounding_box->
min()[
YY] , 0.);
92 BOOST_CHECK_EQUAL(bounding_box->
max()[
XX] , 10.);
93 BOOST_CHECK_EQUAL(bounding_box->
max()[
YY] , 5.);
97 BOOST_CHECK_EQUAL(bounding_box->
min()[
XX] , 0.);
98 BOOST_CHECK_EQUAL(bounding_box->
min()[
YY] , 5.);
99 BOOST_CHECK_EQUAL(bounding_box->
max()[
XX] , 10.);
100 BOOST_CHECK_EQUAL(bounding_box->
max()[
YY] , 10.);
106 BOOST_CHECK_EQUAL(bounding_box->
min()[
XX] , 0.);
107 BOOST_CHECK_EQUAL(bounding_box->
min()[
YY] , 0.);
108 BOOST_CHECK_EQUAL(bounding_box->
max()[
XX] , 10.);
109 BOOST_CHECK_EQUAL(bounding_box->
max()[
YY] , 10.);
116 PE::Comm::instance().finalize();
117 Core::instance().terminate();
122 BOOST_AUTO_TEST_SUITE_END()
const RealVector & min() const
minimum coordinates, defining one corner of the bounding box
external boost library namespace
BOOST_AUTO_TEST_CASE(init_mpi)
int m_argc
possibly common functions used on the tests below
const RealVector & max() const
maximum coordinates, defining one corner of the bounding box
URI uri() const
Construct the full path.
void make_global()
Expand bounding box to encompass all processors.
~boundingboxMPITests_Fixture()
common tear-down for each test case
Basic Classes for Mesh applications used by COOLFluiD.
Top-level namespace for coolfluid.
boundingboxMPITests_Fixture()
common setup for each test case
unsigned int Uint
typedef for unsigned int
Bounding box defined by minimum and maximum coordinates.
void set(const std::string &pname, const boost::any &val)
Handle< Component > create_component(const std::string &name, const std::string &builder)
Build a (sub)component of this component using the extended type_name of the component.
Most basic kernel library.