7 #define BOOST_TEST_DYN_LINK
8 #define BOOST_TEST_MODULE "Tests mesh::actions::BuildFaces"
10 #include <boost/test/unit_test.hpp>
11 #include <boost/assign/list_of.hpp>
49 m_argc = boost::unit_test::framework::master_test_suite().argc;
50 m_argv = boost::unit_test::framework::master_test_suite().argv;
77 Core::instance().initiate(m_argc,m_argv);
78 PE::Comm::instance().init(m_argc,m_argv);
79 Core::instance().environment().options().set(
"log_level",(
Uint)
DEBUG);
80 Core::instance().environment().options().set(
"only_cpu0_writes",
false);
87 boost::shared_ptr<MeshReader> meshreader = build_component_abstract_type<MeshReader>(
"cf3.mesh.neu.Reader",
"meshreader");
88 meshreader->read_mesh_into(
"../../../resources/quadtriag.neu",*
mesh);
101 boost::shared_ptr<BuildFaces> facebuilder = allocate_component<BuildFaces>(
"facebuilder");
103 facebuilder->set_mesh(
mesh);
104 facebuilder->execute();
107 std::cout <<
"checking rank " <<
PERank << std::endl;
108 BOOST_CHECK(
is_not_null(Core::instance().
root().access_component(
"mesh/topology/inlet")) );
109 BOOST_CHECK(
is_not_null(Core::instance().
root().access_component(
"mesh/topology/outlet")) );
110 BOOST_CHECK(
is_not_null(Core::instance().
root().access_component(
"mesh/topology/wall")) );
111 BOOST_CHECK(
is_not_null(Core::instance().
root().access_component(
"mesh/topology/liquid")) );
112 BOOST_CHECK(
is_not_null(Core::instance().
root().access_component(
"mesh/topology/liquid/cells")) );
113 BOOST_CHECK(
is_not_null(Core::instance().
root().access_component(
"mesh/topology/liquid/inner_faces")) );
115 BOOST_CHECK(
is_not_null(Core::instance().
root().access_component(
"mesh/topology/gas")) );
116 BOOST_CHECK(
is_not_null(Core::instance().
root().access_component(
"mesh/topology/gas/cells")) );
117 BOOST_CHECK(
is_not_null(Core::instance().
root().access_component(
"mesh/topology/gas/inner_faces")) );
120 std::cout <<
"glb_idx = " << *
mesh->topology().access_component(
"gas/inner_faces/Line/global_indices")->handle<
List<Uint> >() << std::endl;
121 std::cout <<
"rank = " << *
mesh->topology().access_component(
"gas/inner_faces/Line/rank")->handle<
List<Uint> >() << std::endl;
135 boost::shared_ptr<MeshWriter> tecwriter = build_component_abstract_type<MeshWriter>(
"cf3.mesh.tecplot.Writer",
"meshwriter");
136 tecwriter->write_from_to(*
mesh,
URI(
"file:quadtriag-faces.plt"));
138 boost::shared_ptr<MeshWriter> gmshwriter = build_component_abstract_type<MeshWriter>(
"cf3.mesh.gmsh.Writer",
"meshwriter");
139 gmshwriter->write_from_to(*
mesh,
URI(
"file:quadtriag-faces.msh"));
147 Core::instance().terminate();
148 PE::Comm::instance().finalize();
152 BOOST_AUTO_TEST_SUITE_END()
int m_argc
possibly common functions used on the tests below
static Handle< Mesh > mesh
common values accessed by all tests goes here
Basic Classes for Mesh applications used by COOLFluiD.
Top-level namespace for coolfluid.
unsigned int Uint
typedef for unsigned int
Action derived classes for mesh manipulations.
BOOST_AUTO_TEST_CASE(init_mpi)
~TestBuildFaces_Fixture()
common tear-down for each test case
TestBuildFaces_Fixture()
common setup for each test case
Most basic kernel library.
bool is_not_null(T ptr)
predicate for comparison to nullptr
#define PEProcessSortedExecute(irank, expression)