8 #ifndef SRC_DECOMPOSITION_DOMAIN_NN_CALCULATOR_CART_UNIT_TEST_CPP_ 9 #define SRC_DECOMPOSITION_DOMAIN_NN_CALCULATOR_CART_UNIT_TEST_CPP_ 11 #include "VCluster/VCluster.hpp" 12 #include "Domain_NN_calculator_cart.hpp" 13 #include "NN/CellList/CellList.hpp" 15 BOOST_AUTO_TEST_SUITE (Domain_NN_cart_unit_test)
17 BOOST_AUTO_TEST_CASE( Domain_NN_cart_unit_test_usage )
28 sz[0] = pbox.
getHigh(0) - pbox.getLow(0) + 1;
29 sz[1] = pbox.getHigh(1) - pbox.getLow(1) + 1;
30 sz[2] = pbox.getHigh(2) - pbox.getLow(2) + 1;
46 for (
size_t i = 0 ; i < loc_box.size() ; i++)
49 BOOST_REQUIRE_EQUAL(cd.
size(),tot_cl);
53 size_t dom_cell = (box0.getHigh(0) - box0.getLow(0)) *
54 (box0.getHigh(1) - box0.getLow(1)) *
55 (box0.getHigh(2) - box0.getLow(2) + 1);
63 BOOST_REQUIRE_EQUAL(cdCSRdom.
size(),dom_cell);
65 size_t anom_cell = 2*(box0.getHigh(0) - box0.getLow(0) + 1) * ((box0.getHigh(2) - box0.getLow(2)) + 1);
68 anom_cell += 2*(box0.getHigh(1) - box0.getLow(1) + 1) * ((box0.getHigh(2) - box0.getLow(2)) + 1);
71 BOOST_REQUIRE_EQUAL(cdCSRanom.
size(),anom_cell);
74 BOOST_AUTO_TEST_SUITE_END()
openfpm::vector< subsub_lin< dim > > & getCRSAnomDomainCells()
Get the domain anomalous cells.
void setParameters(const Box< dim, long int > &proc_box)
Set parameters to calculate the cell neighborhood.
grid_key_dx is the key to access any element in the grid
void setNNParameters(openfpm::vector<::Box< dim, size_t >> &loc_box, const grid_key_dx< dim > &shift, const grid_sm< dim, void > &gs)
Set parameters to calculate the cell neighborhood.
__device__ __host__ T getLow(int i) const
get the i-coordinate of the low bound interval of the box
openfpm::vector< size_t > & getCRSDomainCells()
Get the domain Cells.
openfpm::vector< size_t > & getDomainCells()
Get the domain Cells.
This class represent an N-dimensional box.
This class calculate processor domains and neighborhood of each processor domain.
Implementation of 1-D std::vector like structure.
__device__ __host__ T getHigh(int i) const
get the high interval of the box