From 632d40376739803c1cd9b3014dbf3c00aaa6b193 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Fri, 28 Aug 2015 14:15:41 -0500 Subject: [PATCH] Testsuite: work around a bug with predicate = pred_mat_id; + // Compute a halo layer around material id 2 and set it to material id 3 const std::vector active_halo_layer - = GridTools::compute_active_cell_halo_layer(tria, pred_mat_id); // 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::const_iterator it = active_halo_layer.begin(); diff --git a/tests/deal.II/grid_tools_halo_layer_02.cc b/tests/deal.II/grid_tools_halo_layer_02.cc index ed87b4569f..f1a91555ac 100644 --- a/tests/deal.II/grid_tools_halo_layer_02.cc +++ b/tests/deal.II/grid_tools_halo_layer_02.cc @@ -83,8 +83,10 @@ void test () } // Compute a halo layer around material id 2 and set it to material id 3 + std_cxx11::function predicate + = IteratorFilters::MaterialIdEqualTo(2, true); const std::vector 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::const_iterator it = active_halo_layer.begin(); diff --git a/tests/deal.II/grid_tools_halo_layer_03.cc b/tests/deal.II/grid_tools_halo_layer_03.cc index ae0f5235cf..2ffa877d8e 100644 --- a/tests/deal.II/grid_tools_halo_layer_03.cc +++ b/tests/deal.II/grid_tools_halo_layer_03.cc @@ -91,8 +91,10 @@ void test () std::set material_ids; material_ids.insert(2); material_ids.insert(3); + std_cxx11::function predicate + = IteratorFilters::MaterialIdEqualTo(material_ids, true); const std::vector 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::const_iterator it = active_halo_layer.begin(); diff --git a/tests/deal.II/grid_tools_halo_layer_04.cc b/tests/deal.II/grid_tools_halo_layer_04.cc index 1e934083d0..4e2f76c517 100644 --- a/tests/deal.II/grid_tools_halo_layer_04.cc +++ b/tests/deal.II/grid_tools_halo_layer_04.cc @@ -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 predicate + = IteratorFilters::ActiveFEIndexEqualTo(2, true); std::vector 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::iterator it = active_halo_layer.begin(); diff --git a/tests/deal.II/grid_tools_halo_layer_05.cc b/tests/deal.II/grid_tools_halo_layer_05.cc index 6707b20160..e034596e72 100644 --- a/tests/deal.II/grid_tools_halo_layer_05.cc +++ b/tests/deal.II/grid_tools_halo_layer_05.cc @@ -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 material_ids; - material_ids.insert(2); - material_ids.insert(3); + std::set index_set; + index_set.insert(2); + index_set.insert(3); + std_cxx11::function predicate + = IteratorFilters::ActiveFEIndexEqualTo(index_set, true); std::vector 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::iterator it = active_halo_layer.begin(); -- 2.39.5