]> https://gitweb.dealii.org/ - dealii.git/commitdiff
revert particles
authorBruno Blais <blais.bruno@gmail.com>
Mon, 24 Jan 2022 13:45:56 +0000 (08:45 -0500)
committerBruno Blais <blais.bruno@gmail.com>
Mon, 24 Jan 2022 15:19:56 +0000 (10:19 -0500)
source/particles/particle_handler.cc

index 01a9eea2dd2ba0dc7dccfafb4d88c6bf616b3609..1d7a9b703d77c79b1ae6873f517a9b9e534baa68 100644 (file)
@@ -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<double>::infinity() ||
-                !GeometryInfo<dim>::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<dim>::is_inside_unit_cell(p_unit))
-                  particles_out_of_cell.push_back(particle);
-              }
+                !GeometryInfo<dim>::is_inside_unit_cell(p_unit))
+              particles_out_of_cell.push_back(particle);
             else
               particle->set_reference_location(p_unit);
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.