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"
15BOOST_AUTO_TEST_SUITE (Domain_NN_cart_unit_test)
17BOOST_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);
63 BOOST_REQUIRE_EQUAL(cdCSRdom.
size(),dom_cell);
71 BOOST_REQUIRE_EQUAL(cdCSRanom.
size(),anom_cell);
74BOOST_AUTO_TEST_SUITE_END()
This class represent an N-dimensional box.
__device__ __host__ T getLow(int i) const
get the i-coordinate of the low bound interval of the box
__device__ __host__ T getHigh(int i) const
get the high interval of the box
T getVolumeKey() const
Get the volume spanned by the Box P1 and P2 interpreted as grid key.
This class calculate processor domains and neighborhood of each processor domain.
openfpm::vector< size_t > & getCRSDomainCells()
Get the domain Cells.
openfpm::vector< subsub_lin< dim > > & getCRSAnomDomainCells()
Get the domain anomalous cells.
openfpm::vector< size_t > & getDomainCells()
Get the domain Cells.
void setParameters(const Box< dim, long int > &proc_box)
Set parameters to calculate the cell neighborhood.
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.
grid_key_dx is the key to access any element in the grid
Implementation of 1-D std::vector like structure.