7 #define BOOST_TEST_DYN_LINK
8 #define BOOST_TEST_MODULE "Tests mesh::actions::Rotate"
10 #include <boost/test/unit_test.hpp>
11 #include <boost/assign/list_of.hpp>
41 m_argc = boost::unit_test::framework::master_test_suite().argc;
42 m_argv = boost::unit_test::framework::master_test_suite().argv;
80 mesh_generator->
options().
set(
"lengths",std::vector<Real>(2,10.));
81 std::vector<Uint> nb_cells = list_of(10)(5);
82 mesh_generator->
options().
set(
"nb_cells",nb_cells);
86 std::vector<Real> axis_point = list_of(5.)(5.);
87 rotate->
options().
set(
"axis_point",axis_point);
88 rotate->options().set(
"angle",90.);
89 rotate->transform(mesh);
100 mesh_generator->
options().
set(
"lengths",std::vector<Real>(3,10.));
101 std::vector<Uint> nb_cells = list_of(10)(5)(2);
102 mesh_generator->
options().
set(
"nb_cells",nb_cells);
106 std::vector<Real> axis_direction = list_of(1)(1)(1);
107 std::vector<Real> axis_point = list_of(5.)(5.)(5.);
108 rotate->
options().
set(
"axis_direction",axis_direction);
109 rotate->options().set(
"axis_point",axis_point);
110 rotate->options().set(
"angle",90.);
111 rotate->transform(mesh);
122 boost::shared_ptr<MeshTransformer> translate = boost::dynamic_pointer_cast<
MeshTransformer>(
build_component(
"cf3.mesh.actions.Translate",
"translate"));
123 std::vector<Real> tvec = list_of(-5)(-5);
125 translate->transform(mesh);
137 boost::shared_ptr<MeshTransformer> translate = boost::dynamic_pointer_cast<
MeshTransformer>(
build_component(
"cf3.mesh.actions.Translate",
"translate"));
138 std::vector<Real> tvec = list_of(-5)(-5)(-5);
140 translate->transform(mesh);
155 BOOST_AUTO_TEST_SUITE_END()
void write_mesh(const common::URI &file, const std::vector< common::URI > fields=std::vector< common::URI >())
int m_argc
possibly common functions used on the tests below
~TestRotate_Fixture()
common tear-down for each test case
boost::shared_ptr< Component > build_component(const std::string &builder_name, const std::string &name, const std::string &factory_type_name)
common::URI uri(ComponentWrapper &self)
Generate a simple carthesian P1 mesh without grading.
Mesh & generate()
generate, wraps execute() and returns the mesh reference
static Handle< Mesh > mesh
common values accessed by all tests goes here
Basic Classes for Mesh applications used by COOLFluiD.
TestRotate_Fixture()
common setup for each test case
Handle< Component > get_child(const std::string &name)
void initiate(int argc, char **argv)
Top-level namespace for coolfluid.
common::Component & root() const
Gives the default root component.
Action derived classes for mesh manipulations.
Classes offering a MPI interface for COOLFluiD.
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.
BOOST_AUTO_TEST_CASE(Init)