Triangulation<dim> &tria,
const Function<dim,double> *coefficient = 0);
+ /**
+ *
+ *
+ */
+ template<int dim>
+ std::map<unsigned int,Point<dim> >
+ get_all_vertex_at_boundary (const Triangulation<dim> &tria);
+
/**
* Scale the entire triangulation by the given factor. To preserve the
* orientation of the triangulation, the factor must be positive.
}
+ template<int dim>
+ std::map<unsigned int,Point<dim> >
+ get_all_vertex_at_boundary (const Triangulation<dim> &tria)
+ {
+ std::map<unsigned int, Point<dim> > vertex_map;
+ typename Triangulation<dim>::active_cell_iterator
+ cell = tria.begin_active(),
+ endc = tria.end();
+ for (; cell!=endc; ++cell)
+ {
+ for (unsigned int i=0;i<GeometryInfo<dim>::faces_per_cell; ++i)
+ {
+ const auto face = cell->face(i);
+ if (face->at_boundary())
+ {
+ for (unsigned j = 0; j < GeometryInfo<dim>::vertices_per_face; ++j)
+ {
+ const auto vertex = face->vertex(j);
+ const auto vertex_index = face->vertex_index(j);
+ vertex_map[vertex_index] = vertex / vertex.norm();
+ }
+ }
+ }
+ }
+ return vertex_map;
+ }
/**
* Distort a triangulation in
}
-
template <int dim, int spacedim>
void
partition_triangulation (const unsigned int n_partitions,
laplace_transform (const std::map<unsigned int,Point<deal_II_dimension> > &new_points,
Triangulation<deal_II_dimension> &triangulation,
const Function<deal_II_dimension> *coefficient);
+
+ template
+ std::map<unsigned int,Point<deal_II_dimension> >
+ get_all_vertex_at_boundary (const Triangulation<deal_II_dimension> &tria);
+
# endif
template