8 #ifndef SRC_GRID_STAGGERED_GRID_DIST_UNIT_TEST_HPP_
9 #define SRC_GRID_STAGGERED_GRID_DIST_UNIT_TEST_HPP_
11 #include "staggered_dist_grid.hpp"
12 #include "Point_test.hpp"
14 BOOST_AUTO_TEST_SUITE( staggered_grid_dist_id_test )
17 BOOST_AUTO_TEST_CASE( staggered_grid_dist_unit_test)
31 sg.setDefaultStagPosition();
37 BOOST_REQUIRE_EQUAL(cmbs[0].size(),1ul);
38 BOOST_REQUIRE_EQUAL(cmbs[1].size(),1ul);
39 BOOST_REQUIRE_EQUAL(cmbs[2].size(),1ul);
40 BOOST_REQUIRE_EQUAL(cmbs[3].size(),1ul);
41 BOOST_REQUIRE_EQUAL(cmbs[4].size(),2ul);
42 BOOST_REQUIRE_EQUAL(cmbs[5].size(),4ul);
44 BOOST_REQUIRE(cmbs[0].
get(0) ==
comb<2>({0,0}));
45 BOOST_REQUIRE(cmbs[1].
get(0) ==
comb<2>({0,0}));
46 BOOST_REQUIRE(cmbs[2].
get(0) ==
comb<2>({0,0}));
47 BOOST_REQUIRE(cmbs[3].
get(0) ==
comb<2>({0,0}));
48 BOOST_REQUIRE(cmbs[4].
get(0) ==
comb<2>({0,-1}));
49 BOOST_REQUIRE(cmbs[4].
get(1) ==
comb<2>({-1,0}));
50 BOOST_REQUIRE(cmbs[5].
get(0) ==
comb<2>({0,0}));
51 BOOST_REQUIRE(cmbs[5].
get(1) ==
comb<2>({-1,-1}));
52 BOOST_REQUIRE(cmbs[5].
get(2) ==
comb<2>({-1,-1}));
53 BOOST_REQUIRE(cmbs[5].
get(3) ==
comb<2>({0,0}));
56 BOOST_AUTO_TEST_SUITE_END()
Position of the element of dimension d in the hyper-cube of dimension dim.
This class decompose a space into sub-sub-domains and distribute them across processors.
Implementation of the staggered grid.
This class represent an N-dimensional box.
Implementation of 1-D std::vector like structure.