From 6c045b924894ef053e0933d71d35d97cbedd5dd1 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 9 Aug 2019 14:22:29 -0600 Subject: [PATCH] Initialize particle locations with invalid numbers. --- source/particles/particle.cc | 6 ++++-- tests/particles/particle_01.cc | 2 -- tests/particles/particle_01.output | 2 -- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/source/particles/particle.cc b/source/particles/particle.cc index 070ba49fd4..b08f23983c 100644 --- a/source/particles/particle.cc +++ b/source/particles/particle.cc @@ -13,6 +13,8 @@ // // --------------------------------------------------------------------- +#include + #include DEAL_II_NAMESPACE_OPEN @@ -21,8 +23,8 @@ namespace Particles { template Particle::Particle() - : location() - , reference_location() + : location(numbers::signaling_nan>()) + , reference_location(numbers::signaling_nan>()) , id(0) , property_pool(nullptr) , properties(PropertyPool::invalid_handle) diff --git a/tests/particles/particle_01.cc b/tests/particles/particle_01.cc index 406b1e21ec..0d0e5335da 100644 --- a/tests/particles/particle_01.cc +++ b/tests/particles/particle_01.cc @@ -29,8 +29,6 @@ test() { Particles::Particle particle; - deallog << "Particle location: " << particle.get_location() << std::endl; - Point position; position(0) = 1.0; particle.set_location(position); diff --git a/tests/particles/particle_01.output b/tests/particles/particle_01.output index cbfa261dee..b466e15e4a 100644 --- a/tests/particles/particle_01.output +++ b/tests/particles/particle_01.output @@ -1,7 +1,5 @@ -DEAL::Particle location: 0.00000 0.00000 DEAL::Particle location: 1.00000 0.00000 DEAL::OK -DEAL::Particle location: 0.00000 0.00000 0.00000 DEAL::Particle location: 1.00000 0.00000 0.00000 DEAL::OK -- 2.39.5