7 #define BOOST_TEST_DYN_LINK
8 #define BOOST_TEST_MODULE "Test module for cf3::mesh::neu::Reader"
10 #include <boost/test/unit_test.hpp>
31 using namespace boost;
43 m_argc = boost::unit_test::framework::master_test_suite().argc;
44 m_argv = boost::unit_test::framework::master_test_suite().argv;
68 PE::Comm::instance().init(m_argc,m_argv);
76 boost::shared_ptr< MeshReader > meshreader = build_component_abstract_type<MeshReader>(
"cf3.mesh.neu.Reader",
"meshreader");
78 meshreader->options().set(
"read_groups",
true);
81 Mesh&
mesh = *Core::instance().root().create_component<
Mesh>(
"quadtriag");
83 meshreader->read_mesh_into(
"../../resources/quadtriag.neu",mesh);
86 CFinfo <<
"elements count = " << find_component<Region>(
mesh).recursive_elements_count(
true) <<
CFendl;
87 CFinfo <<
"nodes count = " << find_component<Region>(
mesh).recursive_nodes_count() <<
CFendl;
91 boost::shared_ptr< MeshWriter > gmsh_writer = build_component_abstract_type<MeshWriter>(
"cf3.mesh.gmsh.Writer",
"meshwriter");
92 gmsh_writer->write_from_to(mesh,
"quadtriag.msh");
118 boost::shared_ptr< MeshReader > meshreader = build_component_abstract_type<MeshReader>(
"cf3.mesh.neu.Reader",
"meshreader");
120 meshreader->options().set(
"read_groups",
true);
123 Mesh&
mesh = *Core::instance().root().create_component<
Mesh>(
"hextet");
125 meshreader->read_mesh_into(
"../../resources/hextet.neu",mesh);
127 CFinfo <<
"elements count = " << find_component<Region>(
mesh).recursive_elements_count(
true) <<
CFendl;
128 CFinfo <<
"nodes count = " << find_component<Region>(
mesh).recursive_nodes_count() <<
CFendl;
130 boost::shared_ptr< MeshWriter > gmsh_writer = build_component_abstract_type<MeshWriter>(
"cf3.mesh.gmsh.Writer",
"meshwriter");
131 gmsh_writer->write_from_to(mesh,
"hextet.msh");
135 boost::shared_ptr< MeshWriter > neu_writer = build_component_abstract_type<MeshWriter>(
"cf3.mesh.neu.Writer",
"meshwriter");
136 neu_writer->write_from_to(mesh,
"hextet_write.neu");
188 PE::Comm::instance().finalize();
191 Core::instance().environment().
options().
set(
"log_level",4);
193 Core::instance().terminate();
196 Core::instance().event_handler().raise_event(
"ping", frame);
202 BOOST_AUTO_TEST_SUITE_END()
#define CFinfo
these are always defined
external boost library namespace
~neuReaderMPITests_Fixture()
common tear-down for each test case
boost::proto::terminal< SFOp< NodesOp > >::type const nodes
BOOST_AUTO_TEST_CASE(init_mpi)
Basic Classes for Mesh applications used by COOLFluiD.
Top-level namespace for coolfluid.
std::string tree(bool basic_mode=false, Uint depth=0, Uint recursion_level=0) const
SignalOptions & options(const std::string &name=std::string())
unsigned int Uint
typedef for unsigned int
int m_argc
possibly common functions used on the tests below
bool is_ghost(const Uint idx) const
Check if a field row is owned by this rank.
void set(const std::string &pname, const boost::any &val)
Uint size() const
Number of rows of contained fields.
Most basic kernel library.
neuReaderMPITests_Fixture()
common setup for each test case