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();
}
// 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();
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();
}
// 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();
}
// 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();