[Dune] Extract neighbouring element opposite to a certain vertex

Agnese, Marco m.agnese13 at imperial.ac.uk
Thu Feb 25 15:59:41 CET 2016


Hi Martin,


yes I am using conforming meshes.


By the way https://www.dune-project.org/doc-2.2.1/doxygen/html/group__GeometryGenericReferenceElements.html seems wrong for the 3d simplex (section 3.). Shouldn't be 1 bottom and 0 front in the face numbering picture? Otherwise vertex_idx+oppsite_face_idx != entity_dimension for vertex_idx=3 or 2.


Thank you very much,

Marco


________________________________
From: Martin Nolte <nolte at mathematik.uni-freiburg.de>
Sent: 25 February 2016 14:41
To: dune at dune-project.org
Subject: Re: [Dune] Extract neighbouring element opposite to a certain vertex

Hi Marco,

yes, you have to iterate over all intersections to find the corresponding
neighboring entity (I assume you are using a conforming grid, otherwise the
neighbor will not be unique).

You seek the intersection satisfying

indexInIndide() == Entity::dimension - vtxIdx.

Note that, in general, the world dimension does not coincide with the
dimension (though I guess it does in your case).

As to your second question: There is no guarantee on the order the faces are
traversed in.

Best,

Martin

On 02/25/2016 03:29 PM, Agnese, Marco wrote:
> Hi,
>
> I have a simplex entity and I want to extract the neighbouring element
> opposite to the vertex with local index vtxIdx.
>
> Therefore I need to find the intersection opposite to this vertex.
>
> This intersection has local index faceIdx=worlddim-vtxIdx. Is it right?
>
>
> So if I extract entity.template subEntity<1>(faceIdx) I should be able to
> extract this face. Am I correct? But the face extracted in this way is not an
> intersection therefore I can't use it to find the neighbouring entity. Is
> there a solution here?
>
>
> The other solution is to loop over the intersections and extract the vtxIdx-th
> one. But does it work always? Or which is the ordering of this intersections?
>
> I would expect to have them sorted accordingly the face local index (so
> faceIdx) but that seems not to be the case. What am I missing?
>
>
> Thank you very much for your help,
>
> cheers,
>
> Marco.
>
>
>
>
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune
Dune Info Page<http://lists.dune-project.org/mailman/listinfo/dune>
lists.dune-project.org
This is the mailing list for (potential) users of Dune to ask for help. Discussion about development happens on dune-devel at dune-project.org. To see the collection of ...



>

--
Dr. Martin Nolte <nolte at mathematik.uni-freiburg.de>

Universität Freiburg                                   phone: +49-761-203-5630
Abteilung für angewandte Mathematik                    fax:   +49-761-203-5632
Hermann-Herder-Straße 10
79104 Freiburg, Germany


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20160225/26ec598b/attachment.htm>


More information about the Dune mailing list