[Dune] Extract neighbouring element opposite to a certain vertex
Agnese, Marco
m.agnese13 at imperial.ac.uk
Thu Feb 25 17:55:59 CET 2016
Hi Carsten, hi Andreas,
yes, you are right. Looking at the vertices coordinates the faces are perfectly defined and everything is perfectly fine (I am looking at both the figures in section 3.).
I still think that the covered lines should be dashed to have a coherent plot but maybe that's is a matter of personal taste.
Thank you very much for all the helps,
Best,
Marco
________________________________________
From: Carsten Gräser <graeser at mi.fu-berlin.de>
Sent: 25 February 2016 16:44
To: Agnese, Marco; dune at dune-project.org
Subject: Re: [Dune] Extract neighbouring element opposite to a certain vertex
I'm sorry, but you must be looking
at a different picture. The triangle
denoted '0 bottom' is clearly
spanned by the vertices called
0 (0,0,0)
1 (1,0,0)
2 (0,1,0)
And vertex 3 (0,0,1) is clearly on
top, opposite to this face.
Despite the fact that it's grayed out
it may be slightly unclear if the vertex 2
is behind or in front of the screen plain,
but this does not change the vertex
face relation in any way.
Best,
Carsten
Am 25. Februar 2016 17:25:49 MEZ, schrieb "Agnese, Marco" <m.agnese13 at imperial.ac.uk>:
>From the picture it seems that the vertex 3 is opposite to the so
>called front face (which has index 1) and that vertex 2 is opposite to
>the bottom one (index 0). It looks that the bottom face is defined by
>the vertices 0, 1 and 3 and that the vertex 2 is outside the plane of
>the screen. Obviously if the bottom face is defined by the vertices 0,
>1 and 2 everything works fine. But since there aren't any dashed lines,
>it means that all edges are visible and necessary 2 is the "top''of the
>pyramid pointing outside the screen.
>
>
>Or the fading numbers are the one covered by the faces? In that case
>everything is correct. But this isn't a very standard notation, at
>least for me, so, looking at the picture it comes automatically to me
>the first configuration which is wrong.
>
>I don't know if it will be formatted correctly in the mailing list but
>the reference element should be drawn like this:
>
>
> 3
> ,/|`\
> ,/ | `\
> ,/ '. `\
> ,/ | `\
> ,/ | `\
>0-----------'.-----2
> `\. | ,/
> `\. | ,/
> `\. '. ,/
> `\. |/
> `1
>
>
>Hope to have been sufficiently clear :)
>Cheers,
>Maco
>
>________________________________________
>From: Carsten Gräser <graeser at mi.fu-berlin.de>
>Sent: 25 February 2016 16:04
>To: Agnese, Marco; dune at dune-project.org
>Subject: Re: [Dune] Extract neighbouring element opposite to a certain
>vertex
>
>Am 25.02.2016 um 15:59 schrieb Agnese, Marco:
>> 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.
>I can't see any problem here, it's
>
> 3(top vertex) + 0(bottom face) = 3
>
>and
>
> 2(back vertex) + 1 (front face) = 3,
>
>exactly as stated by Martin.
>
>Best,
>Carsten
>
>>
>>
>> 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.
--
Prof. Dr. Carsten Gräser
Freie Universität Berlin
Institut für Mathematik
Arnimallee 6
14195 Berlin, Germany
phone: +49 30 838 72637
fax : +49 30 838 472637
email: graeser at mi.fu-berlin.de
URL : http://page.mi.fu-berlin.de/graeser
More information about the Dune
mailing list