[Dune] hanging node detection
Carsten Gräser
graeser at math.fu-berlin.de
Tue Oct 18 11:45:26 CEST 2011
Hi Bernd,
UGGrid, ALUSimplexGrid, and ALUCubeGrid all have conforming level
grids and thus a conforming macro grid. Only Alberta and ALUConformGrid
allow for non-conforming level grids due to bisection refinement.
However you cannot construct a non-conforming macro grid using
the grid factory, because it does not allow to define neighborship
relations (besides the nodal one).
You can find the is*wiesConforming properties in the capabilities
struct for the grid implementations. As far a I remember Jö started
a very comprehensive list of grid implementation features in the wiki.
Unfortunately I was not able to find it.
Best,
Carsten
Am 18.10.2011 10:39, schrieb Oliver Sander:
> Hi Bernd!
> In UG macro grids have to be conforming. There is no way around that.
> best,
> Oliver
>
> Am 18.10.2011 10:30, schrieb Bernd Flemisch:
>> Hey Carsten, hey Dune,
>>
>> thank you for your hints. I implemented it and it seems to work.
>> However, I came across another issue: I try to construct a macro
>> triangulation with hanging nodes via a DGF file, see e.g. the attached
>> file. Both ALU and UG create a boundary along the interface containing
>> the hanging node, so it is not possible to get to the neighbor via the
>> intersection. Does that mean that for ALU and UG, it is only possible to
>> construct conforming macrogrids with correct neighbor information? Or is
>> there some other way?
>>
>> Thank you. Kind regards
>> Bernd
>>
>> On Thu, 13 Oct 2011 22:21:42 +0200
>> Carsten Gräser <graeser at math.fu-berlin.de> wrote:
>>> Am 13.10.2011 17:29, schrieb Bernd Flemisch:
>>>> Hey Carsten,
>>>>
>>>> that does not sound so bad, I will try that.
>>> Just a few hints for the implementation:
>>>
>>> * If you want to use local finite elements you need to
>>> wrap a single local basis functions of one element
>>> to take local coordinated wrt the other. This
>>> requires to compute x_Alocal -> x_global -> x_Blocal
>>> while x_Alocal -> x_intersection_local -> x_Blocal
>>> does not work.
>>>
>>> * You might want to implement caching since one cannot
>>> implement a single local basis function at once.
>>>
>>> * If you really only want to know if a node is
>>> hanging the following does essentially the same
>>> but seems to be much simpler:
>>>
>>> For each vertex of element A compute the local
>>> coordinates and barycentric coordinates in B.
>>> Then the node is hanging if any of these
>>> coordinates is in (0,1). The barycentric
>>> coordinates can be computed using the P1
>>> local fe.
>>>
>>> Best,
>>> Carsten
>>>
>>>>
>>>> Thank you for your fast answer. Kind regards
>>>> Bernd
>>>>
>>>> On Thu, 13 Oct 2011 17:05:22 +0200
>>>> Carsten Gräser <graeser at math.fu-berlin.de> wrote:
>>>>> Hello Bernd,
>>>>>
>>>>> Am 13.10.2011 16:18, schrieb Bernd Flemisch:
>>>>>> Dear Dune,
>>>>>>
>>>>>> can you recommend a way of detecting whether a node is hanging or
>>>>>> not?
>>>>>> It's easy if the neighboring elements are on different levels, but
>>>>>> let's
>>>>>> assume they are on the same. I can think of comparing
>>>>>> intersection.geometryInInside and intersection.geometryInOutside, but
>>>>>> maybe there is something nicer?
>>>>>
>>>>> in dune-fufem we construct conforming fe spaces on grids with
>>>>> hanging nodes in the following way:
>>>>>
>>>>> For each pair of neighboring elements we evaluate the local
>>>>> interpolation on one element for all local basis functions
>>>>> of the other. This gives you the weights you need to construct
>>>>> the conforming composite basis function. This does at least
>>>>> work for Pk,Qk, and RefinedP1 local finite elements on grids
>>>>> with conforming level grids.
>>>>>
>>>>> If level grids are not conforming you can still use
>>>>> this approach with P1/Q1 elements to find the hanging nodes
>>>>> which are just the ones associated to all weights in (0,1).
>>>>> Of coarse you must check this with some epsilon. However this
>>>>> is safe for all reasonable grids.
>>>>>
>>>>> This approach does essentially wrap all coordinate computations
>>>>> in a nice way. There might be faster ways to check this, however
>>>>> you cannot avoid to do some coordinate computations because this
>>>>> is the only way to check if a vertex is contained in a face if
>>>>> it is not a node (or copy of one) of the face.
>>>>>
>>>>> Best,
>>>>> Carsten
More information about the Dune
mailing list