Thanks, yes, that should work well for 2D. I actually just thought of a 
corner case (pun intended) in 3D. It is possible for a cell's vertex to be 
on a boundary, without any of its neighbour actually have a boundary face.

Imagine a 3D cube with a hollow inner cube. The cells directly diagonal to 
the corner cells will have a vertex on the boundary, but none of its 
neigbor actually lie on the boundary.

Any advice on how to approach this since the current processor would not 
find it within its ghost cells?

Doug
On Wednesday, October 21, 2020 at 9:24:35 PM UTC-4 Wolfgang Bangerth wrote:

> 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.
>
> Best
> W.
>
>
> -- 
> ------------------------------------------------------------------------
> Wolfgang Bangerth email: [email protected]
> www: http://www.math.colostate.edu/~bangerth/
>
>

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/90f3dc38-05bd-49b3-aef4-50563b22f158n%40googlegroups.com.

Reply via email to