From 223be871e727cf0ec05fe94b8836e66b6d8b0732 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 17 Dec 2024 21:51:20 -0700 Subject: [PATCH] Avoid infinities in another place. --- source/particles/particle_handler.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) 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) -- 2.39.5