← Back to team overview

dolfin team mailing list archive

Re: [Question #143645]: Parallel mesh representation

 

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



Follow ups

References