[Dune] Extract neighbouring element opposite to a certain vertex

Carsten Gräser graeser at mi.fu-berlin.de
Thu Feb 25 17:04:26 CET 2016


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.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20160225/b6d31beb/attachment.sig>


More information about the Dune mailing list