8 #define BOOST_TEST_DYN_LINK 
    9 #include <boost/test/unit_test.hpp> 
   10 #include "Space/Shape/Box.hpp" 
   12 #include "Vector/map_vector.hpp" 
   13 #include "Decomposition/shift_vect_converter.hpp" 
   15 BOOST_AUTO_TEST_SUITE( shift_vect_converter_tests_suite )
 
   17 BOOST_AUTO_TEST_CASE( shift_vect_converter_tests_use )
 
   22     size_t bc[3] = {PERIODIC,PERIODIC,PERIODIC};
 
   26     svc.generateShiftVectors(domain,bc,sv);
 
   28     BOOST_REQUIRE_EQUAL(sv.
size(),27ul);
 
   35     size_t i = svc.linId(cmb1);
 
   37     BOOST_REQUIRE_EQUAL(sv.get<0>(i)[0],-1.0);
 
   38     BOOST_REQUIRE_EQUAL(sv.get<0>(i)[1],1.0);
 
   39     BOOST_REQUIRE_EQUAL(sv.get<0>(i)[2],1.0);
 
   43     BOOST_REQUIRE_EQUAL(sv.get<0>(i)[0],-1.0);
 
   44     BOOST_REQUIRE_EQUAL(sv.get<0>(i)[1],0.0);
 
   45     BOOST_REQUIRE_EQUAL(sv.get<0>(i)[2],1.0);
 
   49     BOOST_REQUIRE_EQUAL(sv.get<0>(i)[0],-1.0);
 
   50     BOOST_REQUIRE_EQUAL(sv.get<0>(i)[1],0.0);
 
   51     BOOST_REQUIRE_EQUAL(sv.get<0>(i)[2],0.0);
 
   60     for (
size_t i = 0 ; i < 50 ; i++)
 
   75     BOOST_REQUIRE_EQUAL(sv.
size(),27ul);
 
   94     size_t i = svc.
linId(cmb1);
 
   96     BOOST_REQUIRE_EQUAL(sv.get<0>(i)[5],-1.0);
 
   97     BOOST_REQUIRE_EQUAL(sv.get<0>(i)[6],0.0);
 
   98     BOOST_REQUIRE_EQUAL(sv.get<0>(i)[17],1.0);
 
   99     BOOST_REQUIRE_EQUAL(sv.get<0>(i)[23],1.0);
 
  100     BOOST_REQUIRE_EQUAL(sv.get<0>(i)[24],0.0);
 
  104     BOOST_REQUIRE_EQUAL(sv.get<0>(i)[5],-1.0);
 
  105     BOOST_REQUIRE_EQUAL(sv.get<0>(i)[6],0.0);
 
  106     BOOST_REQUIRE_EQUAL(sv.get<0>(i)[17],0.0);
 
  107     BOOST_REQUIRE_EQUAL(sv.get<0>(i)[23],1.0);
 
  108     BOOST_REQUIRE_EQUAL(sv.get<0>(i)[24],0.0);
 
  112     BOOST_REQUIRE_EQUAL(sv.get<0>(i)[5],-1.0);
 
  113     BOOST_REQUIRE_EQUAL(sv.get<0>(i)[6],0.0);
 
  114     BOOST_REQUIRE_EQUAL(sv.get<0>(i)[17],0.0);
 
  115     BOOST_REQUIRE_EQUAL(sv.get<0>(i)[23],0.0);
 
  116     BOOST_REQUIRE_EQUAL(sv.get<0>(i)[24],0.0);
 
  122 BOOST_AUTO_TEST_SUITE_END()
 
size_t linId(const comb< dim > &cmb)
linearize the combination in case of high dimensions 
 
Position of the element of dimension d in the hyper-cube of dimension dim. 
 
void setHigh(int i, T val)
set the high interval of the box 
 
void generateShiftVectors(const Box< dim, T > &domain, size_t(&bc)[dim], openfpm::vector< Point< dim, T >> &shifts)
Here we generare the shift vectors for the low dimension case. 
 
void setLow(int i, T val)
set the low interval of the box 
 
This class represent an N-dimensional box. 
 
in case of high dimensions shift vector converter 
 
Implementation of 1-D std::vector like structure. 
 
char c[dim]
Array that store the combination.