]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Testsuite: work around a bug with <gcc-4.9 1452/head
authorMatthias Maier <tamiko@43-1.org>
Fri, 28 Aug 2015 19:15:41 +0000 (14:15 -0500)
committerMatthias Maier <tamiko@43-1.org>
Fri, 28 Aug 2015 19:15:41 +0000 (14:15 -0500)
tests/deal.II/grid_tools_halo_layer_01.cc
tests/deal.II/grid_tools_halo_layer_02.cc
tests/deal.II/grid_tools_halo_layer_03.cc
tests/deal.II/grid_tools_halo_layer_04.cc
tests/deal.II/grid_tools_halo_layer_05.cc

index 27cee7f1b95ccd3fdd728d3698cd959776c36a29..f02f5962d710a4919ce15d92bb80ef4c438cbafe 100644 (file)
@@ -88,9 +88,12 @@ void test ()
     GridOut().write_vtk (tria, f);
   }
 
+  std_cxx11::function<bool (const cell_iterator &)> predicate = pred_mat_id<dim>;
+
   // Compute a halo layer around material id 2 and set it to material id 3
   const std::vector<cell_iterator> active_halo_layer
-    = GridTools::compute_active_cell_halo_layer(tria, pred_mat_id<dim>); // General predicate
+    = GridTools::compute_active_cell_halo_layer(tria, predicate); // General predicate
+
   AssertThrow(active_halo_layer.size() > 0, ExcMessage("No halo layer found."));
   for (typename std::vector<cell_iterator>::const_iterator
        it = active_halo_layer.begin();
index ed87b4569faf8909f839895c09508ed23c684514..f1a91555ac28290f35b8a64b92e90c0ddd976ec8 100644 (file)
@@ -83,8 +83,10 @@ void test ()
   }
 
   // Compute a halo layer around material id 2 and set it to material id 3
+  std_cxx11::function<bool (const cell_iterator &)> predicate
+    = IteratorFilters::MaterialIdEqualTo(2, true);
   const std::vector<cell_iterator> active_halo_layer
-    = GridTools::compute_active_cell_halo_layer(tria, IteratorFilters::MaterialIdEqualTo(2, true));
+    = GridTools::compute_active_cell_halo_layer(tria, predicate);
   AssertThrow(active_halo_layer.size() > 0, ExcMessage("No halo layer found."));
   for (typename std::vector<cell_iterator>::const_iterator
        it = active_halo_layer.begin();
index ae0f5235cfe3e97479c8f7ac09e4b315410da4a9..2ffa877d8e4042497d28d5431656cc0435a82eed 100644 (file)
@@ -91,8 +91,10 @@ void test ()
   std::set<types::material_id> material_ids;
   material_ids.insert(2);
   material_ids.insert(3);
+  std_cxx11::function<bool (const cell_iterator &)> predicate
+    = IteratorFilters::MaterialIdEqualTo(material_ids, true);
   const std::vector<cell_iterator> active_halo_layer
-    = GridTools::compute_active_cell_halo_layer(tria, IteratorFilters::MaterialIdEqualTo(material_ids, true));
+    = GridTools::compute_active_cell_halo_layer(tria, predicate);
   AssertThrow(active_halo_layer.size() > 0, ExcMessage("No halo layer found."));
   for (typename std::vector<cell_iterator>::const_iterator
        it = active_halo_layer.begin();
index 1e934083d0dec288b081d766eabd3a8a49403c0a..4e2f76c517eeb4df1613f83b1517532be1b59739 100644 (file)
@@ -114,8 +114,10 @@ void test ()
   }
 
   // Compute a halo layer around active fe index 2 and set it to active fe index 3
+  std_cxx11::function<bool (const cell_iterator &)> predicate
+    = IteratorFilters::ActiveFEIndexEqualTo(2, true);
   std::vector<cell_iterator> active_halo_layer
-    = GridTools::compute_active_cell_halo_layer(dof_handler, IteratorFilters::ActiveFEIndexEqualTo(2, true));
+    = GridTools::compute_active_cell_halo_layer(dof_handler, predicate);
   AssertThrow(active_halo_layer.size() > 0, ExcMessage("No halo layer found."));
   for (typename std::vector<cell_iterator>::iterator
        it = active_halo_layer.begin();
index 6707b201608dd76d86507d276c464e80bd67de6a..e034596e72ac449876744f04bedb90b95bb1099c 100644 (file)
@@ -120,11 +120,13 @@ void test ()
   }
 
   // Compute a halo layer around active fe indices 2,3 and set it to active fe index 4
-  std::set<types::material_id> material_ids;
-  material_ids.insert(2);
-  material_ids.insert(3);
+  std::set<unsigned int> index_set;
+  index_set.insert(2);
+  index_set.insert(3);
+  std_cxx11::function<bool (const cell_iterator &)> predicate
+    = IteratorFilters::ActiveFEIndexEqualTo(index_set, true);
   std::vector<cell_iterator> active_halo_layer
-    = GridTools::compute_active_cell_halo_layer(dof_handler, IteratorFilters::ActiveFEIndexEqualTo(material_ids, true));
+    = GridTools::compute_active_cell_halo_layer(dof_handler, predicate);
   AssertThrow(active_halo_layer.size() > 0, ExcMessage("No halo layer found."));
   for (typename std::vector<cell_iterator>::iterator
        it = active_halo_layer.begin();

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.