From: Wolfgang Bangerth Date: Fri, 9 Aug 2019 20:22:29 +0000 (-0600) Subject: Initialize particle locations with invalid numbers. X-Git-Tag: v9.2.0-rc1~1268^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c045b924894ef053e0933d71d35d97cbedd5dd1;p=dealii.git Initialize particle locations with invalid numbers. --- 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