Skip to content
Snippets Groups Projects
Commit b7bc12d2 authored by Pietro Incardona's avatar Pietro Incardona
Browse files

Merge branch 'develop' of ssh://git.mpi-cbg.de/openfpm/openfpm_numerics into develop

parents 6c181abd 62fbcada
No related branches found
No related tags found
No related merge requests found
......@@ -99,9 +99,10 @@ public:
openfpm::vector<size_t> pair = {id_source, id_mirror};
key_map_source_mirror.add(pair);
}
// No vd.map() here, because we want to keep the source and the mirror particles on the same processor!
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// No vd.map() since this would change the IDs of the particles and then we wouldn't know which source and
// which mirror belong to each other
vd.template ghost_get();
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Mirror.update();
pid_mirror = Mirror.getIds();
......
......@@ -121,7 +121,7 @@ BOOST_AUTO_TEST_SUITE(MethodOfImagesTestSuite)
Particles.map();
Particles.ghost_get<NORMAL,IS_SOURCE>();
//We write the particles to check if the initialization is correct.
Particles.write("Init");
// Particles.write("Init");
//Here Mirror Particle and do method of Images and check if it matches property 0 mirroring (x+y+z of the mirror).
......@@ -179,11 +179,12 @@ BOOST_AUTO_TEST_SUITE(MethodOfImagesTestSuite)
BOOST_CHECK(number_of_source_particles == number_of_border_particles);
BOOST_CHECK(number_of_mirror_particles == number_of_source_particles);
for (int i = 0; i < keys_source.size(); ++i)
for (int i = 0; i < NBCs.key_map_source_mirror.size(); ++i)
{
auto key_source = keys_source.get<0>(i); // Get key of one source particle
auto key_mirror = NBCs.pid_mirror.get<0>(i); // Get key of corresponding mirror particle to that source
// particle
openfpm::vector<size_t> row = NBCs.key_map_source_mirror.get(i);
vect_dist_key_dx key_source, key_mirror;
key_source.setKey(row.get(0));
key_mirror.setKey(row.get(1));
BOOST_CHECK(Particles.template getProp<CONCENTRATION>(key_mirror) == Particles.template getProp<CONCENTRATION>(key_source));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment