[Dune] hanging node detection

Carsten Gräser graeser at math.fu-berlin.de
Thu Oct 13 22:21:42 CEST 2011


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