[Dune] same ID for several interfaces!

Benjamin Faigle Benjamin.faigle at iws.uni-stuttgart.de
Wed Jun 8 15:17:47 CEST 2011


Hi Carsten, Dune,

ahh, now I finally got it.

Sorry for the noise, and thanks very much for the help,

Benjamin

On 06/08/2011 02:49 PM, Carsten Gräser wrote:
> Hi,
>
> Am 08.06.2011 14:28, schrieb Benjamin Faigle:
>> Hello,
>>
>> to clarify the concerns, I want to extend my small sketch:
>>
>> +---+-------+-------+
>> |   |       |       |
>> +---+   7   |   8   |
>> |   |       |       |
>> +---+---+---+-------+
>> |   | 39| 38|       |
>> +---+---+---+   15  |
>> |   | 36| 37|       |
>> +---+---+---+-------+
>> |   |       |       |
>> +---+   6   |   12  |
>> |   |       |       |
>> +---+-------+-------+
>>
>> I doublechecked the sketch, both with indices and via global positions through
>> is.geometry().center(). The wrong faces are not next to each other. But I indeed made a mistake in
>> my mail, same IDs are for 38-7 and !37!-6, however that should not really be a difference.
> it does make a difference. This might be exactly the (second)
> situation I mentioned:
>
> 38 and 37 have a common face (1-subentity) and the global id might be the one
> from this entity. The check with is.geometry().center() does not show this.
> As Oliver mentioned the problem is the following:
>
> Starting from 38 indexInOutside gives you the LOCAL index i of the
> subentity with respect to 7. If you use the subIndex method with
> the element inside, a.k. 38 but with the local index i with respect
> to 7 you get the id of a face of 38 that is in general NOT contained
> in the intersection. See the example:
>
> +----------+
> |    0     |
> |          |
> |3        1|   7
> |          |
> |    2     |
> +-----+----+
> |  0  |
> |3   1|  38
> |  2  |
> +-----+<<<<<
> |     |  36
> +-----+
>
> If you have the intersection of 38 and 7 starting from 38 you have
> indexInOutside=2 and indexInInside=0. Hence subId(inside, indexInOutside,1)
> gives you the id of the bottom face of 38 and NOT of the top face related
> to the intersection. If this happens on 38 and 36 you might get the common
> face of those two.
>
> While is.geometry().center() gives you the center of the intersection
> and not the unrelated face refered to by indexInOutside the following
> really uses the geometry of this face:
>
>    is.inside->subEntity<1>(is.indexInOutside()).geometry().center()
>
> Best,
> Carsten
>
>>
>> I also checked the is.indexInOutside(), which is 2 for IS 38->7 and is 3 for IS 37->6.
>>
>> I will try it with dune 2.1, but this will take some time...
>> Cheers,
>>
>> Benjamin
>>
>>
>> On 06/08/2011 02:02 PM, Carsten Gräser wrote:
>>> Hi Benjamin,
>>>
>>> Am 08.06.2011 13:53, schrieb Oliver Sander:
>>>> Hi Benjamin!
>>>> Thanks for reporting this.  So you claim that you have come across a
>>>> UGGrid configuration with non-unique edge indices?  That would indeed
>>>> be a bug.
>>>>
>>>> However, you know that the line
>>>>
>>>> grid.globalIdSet().subId(*is.inside(), is.indexInOutside(), 1);
>>>>
>>>> is not what you want: you would want is is.indexInInside().  That may
>>>> already explain your problem with the double id: if you are on 38 then
>>>> indexInOutside is one of 0,1,2,3,4.  However element 38 has only
>>>> four edges.  Hence if indexInOutside happens to be 4 you run into
>>>> undefined behaviour.
>>> this is not true. In your case both have four faces.
>>>
>>> If the situation is exactly as you depicted this is an error. Since
>>> 7,8,36,38 all have four faces but 36 and 38 do not share a common
>>> face this should not happen.
>>>
>>> If the situation is only similar to your drawing, the behaviour
>>> might be OK:
>>>
>>> * If 7 or 6 have more faces then 38 or 36, respectively, (triangles and quads)
>>>     you have undefined behaviour. That's the case Oliver had in mind.
>>> * If you exchange 38 and 39 this behaviour might be correct,
>>>     since 36 and 38 would share a face.
>>>
>>>> Here's my suggestion:
>>>> Try the same with Dune 2.1 and see if the problem persists.
>>>> If it does persist create a test case that triggers the problem
>>>> while using the grid API correctly.  If you have such a test
>>>> case please report back to me and I will try to fix it.
>>> In addition please check if one of the two points above apply.
>>>
>>> Thanks,
>>> Carsten
>>>
>>>>
>>>> Thanks in advance,
>>>> Oliver
>>>>
>>>>
>>
>> _______________________________________________
>> Dune mailing list
>> Dune at dune-project.org
>> http://lists.dune-project.org/mailman/listinfo/dune
>
>




More information about the Dune mailing list