From: Bruno Blais Date: Mon, 24 Jan 2022 13:45:56 +0000 (-0500) Subject: revert particles X-Git-Tag: v9.4.0-rc1~565^2~3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=849633c473f80dd01dff97f01c2ce16ef9525343;p=dealii.git revert particles --- diff --git a/source/particles/particle_handler.cc b/source/particles/particle_handler.cc index 01a9eea2dd..1d7a9b703d 100644 --- a/source/particles/particle_handler.cc +++ b/source/particles/particle_handler.cc @@ -1250,18 +1250,11 @@ namespace Particles reference_locations); auto particle = pic.begin(); - for (unsigned int p = 0; p < reference_locations.size(); ++p) + for (const auto &p_unit : reference_locations) { - auto &p_unit = reference_locations[p]; if (p_unit[0] == std::numeric_limits::infinity() || - !GeometryInfo::is_inside_unit_cell(reference_locations[p])) - { - // Try to find the reference location again for this particle - p_unit = - mapping->transform_real_to_unit_cell(cell, real_locations[p]); - if (!GeometryInfo::is_inside_unit_cell(p_unit)) - particles_out_of_cell.push_back(particle); - } + !GeometryInfo::is_inside_unit_cell(p_unit)) + particles_out_of_cell.push_back(particle); else particle->set_reference_location(p_unit);