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>
28 using namespace boost;
40 m_argc = boost::unit_test::framework::master_test_suite().argc;
41 m_argv = boost::unit_test::framework::master_test_suite().argv;
65 PE::Comm::instance().init(m_argc,m_argv);
73 boost::shared_ptr< MeshGenerator > meshgenerator = build_component_abstract_type<MeshGenerator>(
"cf3.mesh.SimpleMeshGenerator",
"1Dgenerator");
75 meshgenerator->options().set(
"mesh",
URI(
"//line"));
76 meshgenerator->options().set(
"nb_cells",std::vector<Uint>(1,10));
77 meshgenerator->options().set(
"lengths",std::vector<Real>(1,10.));
78 Mesh&
mesh = meshgenerator->generate();
86 boost::shared_ptr< MeshWriter > gmsh_writer = build_component_abstract_type<MeshWriter>(
"cf3.mesh.gmsh.Writer",
"meshwriter");
87 gmsh_writer->write_from_to(mesh,
"line.msh");
110 boost::shared_ptr< MeshGenerator > meshgenerator = build_component_abstract_type<MeshGenerator>(
"cf3.mesh.SimpleMeshGenerator",
"2Dgenerator");
112 meshgenerator->options().set(
"mesh",
URI(
"//rect"));
113 meshgenerator->options().set(
"nb_cells",std::vector<Uint>(2,2));
114 meshgenerator->options().set(
"lengths",std::vector<Real>(2,2.));
115 Mesh&
mesh = meshgenerator->generate();
123 boost::shared_ptr< MeshWriter > gmsh_writer = build_component_abstract_type<MeshWriter>(
"cf3.mesh.gmsh.Writer",
"meshwriter");
124 gmsh_writer->write_from_to(mesh,
"rect.msh");
147 boost::shared_ptr< MeshGenerator > meshgenerator = build_component_abstract_type<MeshGenerator>(
"cf3.mesh.SimpleMeshGenerator",
"3Dgenerator");
149 meshgenerator->options().set(
"mesh",
URI(
"//box"));
150 meshgenerator->options().set(
"nb_cells",std::vector<Uint>(3,6));
151 meshgenerator->options().set(
"lengths",std::vector<Real>(3,2.));
152 Mesh&
mesh = meshgenerator->generate();
159 boost::shared_ptr< MeshWriter > gmsh_writer = build_component_abstract_type<MeshWriter>(
"cf3.mesh.gmsh.Writer",
"meshwriter");
160 gmsh_writer->write_from_to(mesh,
"box.msh");
182 PE::Comm::instance().finalize();
187 BOOST_AUTO_TEST_SUITE_END()
#define CFinfo
these are always defined
Uint recursive_elements_count(bool include_ghost_elems) const
external boost library namespace
BOOST_AUTO_TEST_CASE(init_mpi)
boost::proto::terminal< SFOp< NodesOp > >::type const nodes
SimpleMeshGeneratorTests_Fixture()
common setup for each test case
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
unsigned int Uint
typedef for unsigned int
bool is_ghost(const Uint idx) const
Check if a field row is owned by this rank.
Region & topology() const
~SimpleMeshGeneratorTests_Fixture()
common tear-down for each test case
Dictionary & geometry_fields() const
Uint size() const
Number of rows of contained fields.
Most basic kernel library.
Uint recursive_nodes_count()
int m_argc
possibly common functions used on the tests below