Commit 812ef4ea authored by tonynsyde's avatar tonynsyde

Prey and Predators fixes

parent 5e916b35
openfpm_devices @ e79687e8
Subproject commit 669b60068daa79b454b32b3db50158cff1b49bc4
Subproject commit e79687e8594b0761330a34a0f3eecf514f9f9290
openfpm_vcluster @ 104ee3d6
Subproject commit b9c14fadf0d9f5c5f53b4a9e57f29499f50652d9
Subproject commit 104ee3d6f6992d8fad992f3405b5b2514a1cd25c
......@@ -669,7 +669,7 @@ BOOST_AUTO_TEST_CASE( Parmetis_distribution_test_prey_and_predators )
float r_cut = 0.01 / factor;
// ghost
Ghost<2,float> ghost(0.01 / factor);
Ghost<2,float> ghost(r_cut);
// Distributed vector
vector_dist<2,float, animal, CartDecomposition<2, float, HeapMemory, ParMetisDistribution<2, float>>> vd(k,box,bc,ghost);
......@@ -746,7 +746,7 @@ BOOST_AUTO_TEST_CASE( Parmetis_distribution_test_prey_and_predators )
bool error = false;
auto NN = vd.getCellList(0.01 / factor);
auto NN = vd.getCellList(0.01 / factor);
// iterate across the domain particle
......@@ -785,10 +785,10 @@ BOOST_AUTO_TEST_CASE( Parmetis_distribution_test_prey_and_predators )
vd.getProp<animal::status>(q) = DEAD;
vd.getProp<animal::time_a>(q) = TIME_A;
}
else if (gp == PREY && sp == DEAD)
else if (gp == PREY && gq == PREY && sq != DEAD)
{
//animal n;
//n.template get<animal::status>() = DEAD;
vd.add();
vd.getLastProp<animal::genre>() = 0;
}
}
......
......@@ -447,6 +447,8 @@ public:
Mg.itr = new real_t[1];
Mg.itr[0] = 1000.0;
Mg.objval = new idx_t[1];
//! init tpwgts to have balanced vertices and ubvec
Mg.tpwgts = new real_t[Mg.nparts[0]];
......
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