dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #17136
Re: [Question #95085]: Mesh traversal
Question #95085 on DOLFIN changed:
https://answers.launchpad.net/dolfin/+question/95085
Anders Logg posted a new comment:
On Mon, Jan 04, 2010 at 11:58:39AM +0100, Garth N. Wells wrote:
>
>
> dbeacham wrote:
> > Question #95085 on DOLFIN changed:
> > https://answers.launchpad.net/dolfin/+question/95085
> >
> > Status: Answered => Solved
> >
> > dbeacham confirmed that the question is solved:
> > Thanks for this - I hadn't appreciated the need to call mesh.init.
> >
> > One quick clarification:
> >
> > Say that a vertex, v, has v.entities(1) = [300 400 500] (ie is adjacent
> > to edges 300, 400 and 500), then in order to find the information on any
> > of those edges, I'd have to cycle through the edge iterator until I
> > found the edge, e, such that e.index() = 300, 400 or 500?
> >
>
> If you know the index, you can create the edge
>
> Edge edge(const Mesh& mesh, uint index);
>
> Garth
Furthermore, if you should need to know the local number of that
entity, you can do
Edge edge(mesh, 400);
uint local_index = cell.index(edge);
Then local_index should be 1.
--
Anders
--
You received this question notification because you are a member of
DOLFIN Team, which is an answer contact for DOLFIN.
References