Commit 3bbb86eb authored by Pietro Incardona's avatar Pietro Incardona

Fixing duplicate particles in periodic boundary conditions

parent 8aaf2009
openfpm_data @ 29df8079
Subproject commit f57dd8c910a9c05a321237721b147d7331f175ba
Subproject commit 29df8079fec8f6735f18bdf5ec50497f43be154e
......@@ -1062,12 +1062,6 @@ p1[0]<-----+ +----> p2[0]
for (size_t i = 0 ; i < dim ; i++)
{
if (pt.get(0) < -0.1)
{
int debug = 0;
debug++;
}
if (bc[i] == PERIODIC)
pt.get(i) = openfpm::math::periodic_l(p[i],domain.getHigh(i),domain.getLow(i));
}
......
......@@ -1103,7 +1103,7 @@ void Test3D_decit(const Box<3,float> & domain, long int k)
big_step = (big_step == 0)?1:big_step;
long int small_step = 21;
print_test( "Testing grid iterator from decomposition k<=",k);
print_test( "Testing grid iterator from decomposition subset k<=",k);
// 3D test
for ( ; k >= 2 ; k-= (k > 2*big_step)?big_step:small_step )
......
......@@ -1037,22 +1037,20 @@ BOOST_AUTO_TEST_CASE( vector_dist_periodic_test_interacting_particles )
BOOST_AUTO_TEST_CASE( vector_dist_cell_verlet_test )
{
size_t k = 64*64*64*global_v_cluster->getProcessingUnits();
long int k = 64*64*64*global_v_cluster->getProcessingUnits();
k = std::pow(k, 1/3.);
long int big_step = k / 30;
big_step = (big_step == 0)?1:big_step;
long int small_step = 21;
print_test( "Vector cell and verlet list test k<=",k);
print_test( "Testing cell and verlet list k<=",k);
// 3D test
for ( ; k >= 2 ; k-= (k > 2*big_step)?big_step:small_step )
for ( ; k > 8*big_step ; k-= (k > 2*big_step)?big_step:small_step )
{
typedef Point<3,float> s;
print_test( "Vector cell and verlet list test k<=",k);
Vcluster & v_cl = *global_v_cluster;
const size_t Ng = k;
......@@ -1119,14 +1117,6 @@ BOOST_AUTO_TEST_CASE( vector_dist_cell_verlet_test )
vd.getVerlet(verlet,third_dist);
//
if (v_cl.getProcessUnitID() == 0)
{
Point<3,float> p1 = vd.template getPos<0>(verlet.get(0).get(4));
Point<3,float> p2 = vd.template getPos<0>(verlet.get(0).get(5));
std::cout << "Point 1: " << p1.toString() << "\n Point 2: " << p2.toString() << "\n";
}
bool correct = true;
// for each particle
......
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