7 #define BOOST_TEST_DYN_LINK
8 #define BOOST_TEST_MODULE "Tests mesh octtree"
10 #include <boost/test/unit_test.hpp>
11 #include <boost/assign/list_of.hpp>
12 #include <boost/assign/std/vector.hpp>
25 using namespace boost;
65 boost::shared_ptr< MeshGenerator >
mesh_generator = build_component_abstract_type<MeshGenerator>(
"cf3.mesh.SimpleMeshGenerator",
"mesh_generator");
66 Core::instance().root().add_component(mesh_generator);
67 mesh_generator->options().set(
"mesh",Core::instance().
root().
uri()/
"mesh");
68 mesh_generator->options().set(
"lengths",std::vector<Real>(2,10.));
69 mesh_generator->options().set(
"nb_cells",std::vector<Uint>(2,5));
70 mesh_generator->options().set(
"bdry",
false);
71 Mesh&
mesh = mesh_generator->generate();
75 stencil_computer->
options().
set(
"dict", dict );
78 std::vector<SpaceElem> stencil;
80 stencil_computer->options().set(
"nb_rings", 1u );
81 stencil_computer->compute_stencil(space_elem, stencil);
82 BOOST_CHECK_EQUAL(stencil.size(), 9u);
84 stencil_computer->options().set(
"nb_rings", 2u );
85 stencil_computer->compute_stencil(space_elem, stencil);
86 BOOST_CHECK_EQUAL(stencil.size(), 20u);
88 stencil_computer->options().set(
"nb_rings", 3u );
89 stencil_computer->compute_stencil(space_elem, stencil);
90 BOOST_CHECK_EQUAL(stencil.size(), 25u);
96 BOOST_AUTO_TEST_SUITE_END()
Safe pointer to an object. This is the supported method for referring to components.
const std::vector< Handle< Entities > > & elements() const
external boost library namespace
BOOST_AUTO_TEST_CASE(StencilComputerRings_creation)
common::URI uri(ComponentWrapper &self)
Basic Classes for Mesh applications used by COOLFluiD.
Compute the stencil around an element, consisting of rings of neighboring cells.
Top-level namespace for coolfluid.
~StencilComputerRings_Fixture()
common tear-down for each test case
StencilComputerRings_Fixture()
common setup for each test case
Handle< Component > handle()
Get a handle to the component.
Dictionary & geometry_fields() const
void set(const std::string &pname, const boost::any &val)
Most basic kernel library.