Anders Logg <l...@simula.no> writes: > On Tue, Feb 01, 2011 at 11:57:28AM -0000, Anders Logg wrote: >> Question #143645 on DOLFIN changed: >> https://answers.launchpad.net/dolfin/+question/143645 >> >> Anders Logg proposed the following answer: >> On Tue, Feb 01, 2011 at 11:50:37AM -0000, Garth Wells wrote: >> > Question #143645 on DOLFIN changed: >> > https://answers.launchpad.net/dolfin/+question/143645 >> > >> > Status: Open => Answered >> > >> > Garth Wells proposed the following answer: >> > I don't think so. >> >> I think it should be possible, at least "in principle". I'll comment >> more later. I'm in a meeting now. > > Sorry for my late reply. > > What you can do is to get the "overlap": > > std::map<uint, std::vector<uint> >* overlap = > mesh.data().vector_mapping("overlap"); > > This gives you a mapping for each shared vertex to its neighboring > processes (the processes it's shared with). > > You can check if a vertex is shared by > > overlap->find(i) != overlap->end() > > There is no functionality for checking edges, cells etc. Such > operations must be expressed in terms of their vertices. > > It would be easy to add some shortcuts like > > bool Vertex::is_ shared() const; > > and even > > bool MeshEntity::is_shared() const; > > etc if that helps. They could just look at the overlap. > > If that is costly, we could store another MeshFunction that holds the > appropriate data (or add as part of ParallelData). > > -- > Anders >
Perfect! That should be enough to get me started porting some code. How about owners of mesh entities? If I remember correctly mesh entities were not owned by a specific rank. If one could determine if a vertex is owned, ghosted or shared, it would make life much simpler when implementing various parallel mesh algorithms. Niclas _______________________________________________ Mailing list: https://launchpad.net/~dolfin Post to : dolfin@lists.launchpad.net Unsubscribe : https://launchpad.net/~dolfin More help : https://help.launchpad.net/ListHelp