From: Wolfgang Bangerth Date: Wed, 18 Dec 2024 04:51:20 +0000 (-0700) Subject: Avoid infinities in another place. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=223be871e727cf0ec05fe94b8836e66b6d8b0732;p=dealii.git Avoid infinities in another place. --- diff --git a/source/particles/particle_handler.cc b/source/particles/particle_handler.cc index 149dfc699b..a73bb65abc 100644 --- a/source/particles/particle_handler.cc +++ b/source/particles/particle_handler.cc @@ -12,6 +12,8 @@ // // ------------------------------------------------------------------------ +#include + #include #include @@ -1324,12 +1326,8 @@ namespace Particles // Reuse these vectors below, but only with a single element. // Avoid resizing for every particle. - Point invalid_reference_point; - Point invalid_point; - invalid_reference_point[0] = std::numeric_limits::infinity(); - invalid_point[0] = std::numeric_limits::infinity(); - reference_locations.resize(1, invalid_reference_point); - real_locations.resize(1, invalid_point); + reference_locations.resize(1, numbers::signaling_nan>()); + real_locations.resize(1, numbers::signaling_nan>()); // Find the cells that the particles moved to. for (auto &out_particle : particles_out_of_cell)