22#ifndef INCLUDE_EXADG_GRID_MARKED_VERTICES_H_
23#define INCLUDE_EXADG_GRID_MARKED_VERTICES_H_
26#include <deal.II/grid/tria.h>
34get_marked_vertices_via_boundary_ids(dealii::Triangulation<dim>
const & triangulation,
35 std::set<dealii::types::boundary_id>
const & boundary_ids)
39 std::vector<bool> marked_vertices(triangulation.n_vertices(),
false);
41 for(
auto const & cell : triangulation.active_cell_iterators())
43 if(not(cell->is_artificial()) and cell->at_boundary())
45 for(
auto const & f : cell->face_indices())
47 if(cell->face(f)->at_boundary())
49 if(boundary_ids.find(cell->face(f)->boundary_id()) != boundary_ids.end())
51 for(
auto const & v : cell->face(f)->vertex_indices())
53 marked_vertices[cell->face(f)->vertex_index(v)] =
true;
64 if(std::all_of(marked_vertices.begin(), marked_vertices.end(), [](
bool vertex_is_marked) {
65 return vertex_is_marked == false;
68 marked_vertices.clear();
71 return marked_vertices;