From 25fb9572da4038c61914eaaa43bcb4d5dff874d9 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Thu, 12 Dec 2019 15:15:55 -0500 Subject: [PATCH] Fix narrowing conversions in tests --- tests/hp/p_adaptivity_flags.cc | 4 ++-- tests/particles/particle_handler_11.cc | 2 +- tests/particles/particle_handler_12.cc | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) 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); -- 2.39.5