From: Daniel Arndt Date: Thu, 12 Dec 2019 20:15:55 +0000 (-0500) Subject: Fix narrowing conversions in tests X-Git-Tag: v9.2.0-rc1~787^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F9166%2Fhead;p=dealii.git Fix narrowing conversions in tests --- diff --git a/tests/hp/p_adaptivity_flags.cc b/tests/hp/p_adaptivity_flags.cc index ab65ac8d98..d074e7b371 100644 --- a/tests/hp/p_adaptivity_flags.cc +++ b/tests/hp/p_adaptivity_flags.cc @@ -126,8 +126,8 @@ test() unsigned int n_active = tria.n_active_cells(); std::vector p_flags(n_active, false); - std::fill(p_flags.begin(), p_flags.begin() + .25 * n_active, true); - std::fill(p_flags.end() - .25 * n_active, p_flags.end(), true); + std::fill(p_flags.begin(), p_flags.begin() + n_active / 4, true); + std::fill(p_flags.end() - n_active / 4, p_flags.end(), true); hp::Refinement::p_adaptivity_from_flags(dh, p_flags); diff --git a/tests/particles/particle_handler_11.cc b/tests/particles/particle_handler_11.cc index c942d2d67a..a868719fd3 100644 --- a/tests/particles/particle_handler_11.cc +++ b/tests/particles/particle_handler_11.cc @@ -63,7 +63,7 @@ test() Utilities::MPI::all_gather(MPI_COMM_WORLD, my_bounding_box); std::vector> points(n_points); - std::vector> properties(n_points, {my_cpu}); + std::vector> properties(n_points, {1. * my_cpu}); for (auto &p : points) p = random_point(); diff --git a/tests/particles/particle_handler_12.cc b/tests/particles/particle_handler_12.cc index 9f5cfabcf7..08df8ebd24 100644 --- a/tests/particles/particle_handler_12.cc +++ b/tests/particles/particle_handler_12.cc @@ -64,7 +64,7 @@ test() Utilities::MPI::all_gather(MPI_COMM_WORLD, my_bounding_box); std::vector> points(n_points); - std::vector> properties(n_points, {my_cpu}); + std::vector> properties(n_points, {1. * my_cpu}); for (auto &p : points) p = random_point(0, 0.1);