Dear Erik, We actually already have a function that can do 1/2 the job for you, namely GridTools:: compute_active_cell_halo_layer <https://www.dealii.org/8.4.1/doxygen/deal.II/namespaceGridTools.html#a7ed62cdc6910a2ae39e8caa3142c1ad1>. In this instance your predicate would be whether the input cell has a face on the patch you've specified. You'd then remove from this list all of the cells that are not on the boundary. It might be a bit expensive to use if you compute for many patches, because it does a loop over all cells in the triangulation. We could, however, look at extending the function for multiple predicates leading to the output of multiple collections of cells, one for each predicate.
Daniel, I think that this is more generic than your approach, because not all FE's have DoFs that have support on a face? Best, Jean-Paul On Monday, February 6, 2017 at 1:49:54 PM UTC+1, Daniel Arndt wrote: > > Erik, > > you might want to have a look at > https://groups.google.com/d/msg/dealii/wG6aJdXHweA/IcsUjxj5dFsJ > > Basically, I would loop through all the neighbors recursively only > considering cells that have a vertex with the face you are looking for in > common. > You can access the DoFs on faces just as for cells via > > std::vector<types::global_dof_index> dof_indices(fe.dofs_per_face); > for (; cell != endc; ++cell) > if (!cell->is_artificial()) > for (unsigned int face=0; face<GeometryInfo<dim>::faces_per_cell; > ++face) > [...] > cell->face(face)->get_dof_indices(dof_indices); > [...] > > Maybe also look into step-42 for accessing DoFs on faces. > > Best, > Daniel > -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
