Commit d833e5ec authored by incardon's avatar incardon
Browse files

Removed cuda configuration from the script

parent e56c64d9
......@@ -59,12 +59,14 @@ template<unsigned int dim, typename T, typename CellS> void Test_cell_s()
{
// Add 2 particles on each cell
// particle one
Point<dim,T> key = g_it.get();
key = key * spacing + offset[0];
cl1.add(key,id);
++id;
// particle two
key = g_it.get();
key = key * spacing + offset[1];
......@@ -74,7 +76,7 @@ template<unsigned int dim, typename T, typename CellS> void Test_cell_s()
++g_it;
}
// check the cell are correctly filled
// check the cells are correctly filled
// reset iterator
g_it.reset();
......@@ -177,152 +179,6 @@ BOOST_AUTO_TEST_CASE( CellList_use)
std::cout << "End cell list" << "\n";
//Space where is living the Cell list
/* SpaceBox<3,double> box({0.0f,0.0f,0.0f},{1.0f,1.0f,1.0f});
// Subdivisions
size_t div[3] = {16,16,16};
// grid info
grid_sm<3,void> g_info(div);
// Origin
Point<3,double> org({0.0,0.0,0.0});
// id Cell list
CellList<3,double> cl1(box,div,org);
// Create a grid iterator
grid_key_dx_iterator<3> g_it(g_info);
// Iterate through each element
// Add 1 element for each cell
// Usefull definition of points
Point<3,double> end = box.getP2();
Point<3,double> middle = end / div / 2.0;
Point<3,double> spacing = end / div;
Point<3,double> offset[3] = {middle,middle,middle};
// Create offset shift vectors
offset[0].get(0) += (1.0 / div[0]) / 8.0;
offset[1].get(1) += (1.0 / div[1]) / 8.0;
offset[2].get(2) += (1.0 / div[2]) / 8.0;
size_t id = 0;
while (g_it.isNext())
{
// Add 2 particles on each cell
Point<3,double> key = g_it.get();
key = key * spacing + offset[0];
cl1.add(key,id);
++id;
key = g_it.get();
key = key * spacing + offset[1];
cl1.add(key,id);
++id;
++g_it;
}
// check the cell are correctly filled
// reset iterator
g_it.reset();
while (g_it.isNext())
{
// Add 2 particles on each cell
Point<3,double> key = g_it.get();
key = key * spacing + offset[2];
size_t cell = cl1.getCell(key);
size_t n_ele = cl1.getNelements(cell);
BOOST_REQUIRE_EQUAL(n_ele,2);
BOOST_REQUIRE_EQUAL(cl1.get(cell,1) - cl1.get(cell,0),1);
++g_it;
}
// reset itarator
g_it.reset();
// remove one particle from each cell
while (g_it.isNext())
{
// remove 1 particle on each cell
Point<3,double> key = g_it.get();
key = key * spacing + offset[0];
auto cell = cl1.getCell(key);
// Remove the first particle in the cell
cl1.remove(cell,0);
++g_it;
}
// Check we have 1 object per cell
g_it.reset();
while (g_it.isNext())
{
// remove 1 particle on each cell
Point<3,double> key = g_it.get();
key = key * spacing + offset[0];
auto cell = cl1.getCell(key);
size_t n_ele = cl1.getNelements(cell);
BOOST_REQUIRE_EQUAL(n_ele,1);
++g_it;
}
// Check the neighborhood iterator on the internal grid (They do not wotk on external grid)
// Check we have 1 object per cell
// Create a grid iterator
grid_key_dx<3> p1(1,1,1);
grid_key_dx<3> p2(div[0]-1,div[1]-1,div[2]-1);
grid_key_dx_iterator_sub<3> g_it_s(g_info,p1,p2);
while (g_it_s.isNext())
{
// remove 1 particle on each cell
Point<3,double> key = g_it_s.get();
key = key * spacing + offset[0];
auto NN = cl1.template getNNIterator<NO_CHECK>(cl1.getCell(key));
size_t total = 0;
while(NN.isNext())
{
size_t id = NN.get();
// total
total++;
++NN;
}
BOOST_REQUIRE_EQUAL(total,openfpm::math::pow(3,3));
++g_it;
}*/
// Test the cell list
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment