]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix narrowing conversions in tests 9166/head
authorDaniel Arndt <arndtd@ornl.gov>
Thu, 12 Dec 2019 20:15:55 +0000 (15:15 -0500)
committerDaniel Arndt <arndtd@ornl.gov>
Thu, 12 Dec 2019 20:21:53 +0000 (15:21 -0500)
tests/hp/p_adaptivity_flags.cc
tests/particles/particle_handler_11.cc
tests/particles/particle_handler_12.cc

index ab65ac8d98cf0505ef71d5c23742f50d933f7b4a..d074e7b37190fd745ac9c960e477a1e941858c94 100644 (file)
@@ -126,8 +126,8 @@ test()
     unsigned int      n_active = tria.n_active_cells();
     std::vector<bool> 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);
 
index c942d2d67a399ab2b93f2bcb03c0e307e53daeed..a868719fd3f8cbe6817647743f0afb8032945f1c 100644 (file)
@@ -63,7 +63,7 @@ test()
     Utilities::MPI::all_gather(MPI_COMM_WORLD, my_bounding_box);
 
   std::vector<Point<spacedim>>     points(n_points);
-  std::vector<std::vector<double>> properties(n_points, {my_cpu});
+  std::vector<std::vector<double>> properties(n_points, {1. * my_cpu});
 
   for (auto &p : points)
     p = random_point<spacedim>();
index 9f5cfabcf7fe5b871b70e5a86dce4ef62e2fbb4a..08df8ebd24cd2e20eb393e0d1a62768eec8df599 100644 (file)
@@ -64,7 +64,7 @@ test()
     Utilities::MPI::all_gather(MPI_COMM_WORLD, my_bounding_box);
 
   std::vector<Point<spacedim>>     points(n_points);
-  std::vector<std::vector<double>> properties(n_points, {my_cpu});
+  std::vector<std::vector<double>> properties(n_points, {1. * my_cpu});
 
   for (auto &p : points)
     p = random_point<spacedim>(0, 0.1);

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.