dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #04184
Re: MeshIterators
> On Thu, Jan 18, 2007 at 09:28:03AM +0100, Johan Hoffman wrote:
>> Do we have a simple way to get a pointer to a MeshEntity from the
>> corresponding index? Or is the idea that we should use iterators all the
>> time? It appears that sometimes you just want the pointer from the
>> index.
>> But maybe this is available but I have missed it?
>>
>> /Johan
>>
>
> I think you want this:
>
> Cell cell(mesh, index);
> Vertex vertex(mesh, index);
>
> etc.
>
> i.e. use the constructors for the mesh entities. This was not clear to
> me either at first.
>
> Johan
>
>
Ok, thanks! That's what I want.
/Johan
References