Anders Logg <l...@simula.no> writes: > On Thu, Feb 03, 2011 at 09:03:58PM +0100, Niclas Jansson wrote: >> 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). >> > >> > >> >> Perfect! That should be enough to get me started porting some code. > > Great! > >> 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. > > Isn't the rule that when a vertex is shared, it's owned by the lowest > rank process? >
Ok, if so that should be enough. > I don't know how we handle ghosted entities (or if we even have > ghosted entities). We have ghosted dofs stored in Vectors (handled by > PETSc/Epetra) but I'm not sure how it's handled. Garth knows a great > deal more about that. > True, but I don't like to start messing around with dofs for pure 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