On 10/21/20 1:05 PM, Doug Shi-Dong wrote:
>
> It seems like I might have to loop over the neighbors of every cell to make
> sure that account for all the corners/edges DoFs that might be on a boundary,
> but that seems inefficient.
>
> Anyone knows of a better way within deal.II to deal with this?
Each vertex of the locally owned part of the domain is surrounded by either
locally owned cells or ghost cells. As a consequence, if you loop over all
locally owned cells and all ghost cells, you will find that vertex as one
vertex on a boundary face.
You are right that it is difficult to do this by starting at one vertex. The
easier approach is to first loop over all locally-owned + ghost cells, loop
over their faces, see whether a face is on the boundary, and then collect all
vertices that you are interested in in a std::set or similar. Then, later on
when you are curious about one specific vertex, you only need to look whether
it's in the std::set.