8#define BOOST_TEST_DYN_LINK
9#include <boost/test/unit_test.hpp>
11#include "Grid/staggered_dist_grid.hpp"
12#include "Point_test.hpp"
14BOOST_AUTO_TEST_SUITE( staggered_grid_dist_id_test )
17BOOST_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>({(char)0,(
char)0}));
45 BOOST_REQUIRE(cmbs[1].get(0) ==
comb<2>({(char)0,(
char)0}));
46 BOOST_REQUIRE(cmbs[2].get(0) ==
comb<2>({(char)0,(
char)0}));
47 BOOST_REQUIRE(cmbs[3].get(0) ==
comb<2>({(char)0,(
char)0}));
48 BOOST_REQUIRE(cmbs[4].get(0) ==
comb<2>({(char)0,(
char)-1}));
49 BOOST_REQUIRE(cmbs[4].get(1) ==
comb<2>({(char)-1,(
char)0}));
50 BOOST_REQUIRE(cmbs[5].get(0) ==
comb<2>({(char)0,(
char)0}));
51 BOOST_REQUIRE(cmbs[5].get(1) ==
comb<2>({(char)-1,(
char)-1}));
52 BOOST_REQUIRE(cmbs[5].get(2) ==
comb<2>({(char)-1,(
char)-1}));
53 BOOST_REQUIRE(cmbs[5].get(3) ==
comb<2>({(char)0,(
char)0}));
56BOOST_AUTO_TEST_SUITE_END()
This class represent an N-dimensional box.
This class decompose a space into sub-sub-domains and distribute them across processors.
Implementation of 1-D std::vector like structure.
Implementation of the staggered grid.
Position of the element of dimension d in the hyper-cube of dimension dim.