[Dune] parametrized AMR and cell divergence
Carsten Gräser
graeser at mi.fu-berlin.de
Wed Feb 25 22:03:38 CET 2015
Am 25.02.2015 um 11:03 schrieb Marco Cisternino:
> Thanks Carsten and Andreas,
> I understand the situation but I cannot understand the cure Carsten proposed.
> Could you be more specific, Carsten, please?
Assume you have a grid with hanging vertices resulting from local
refinement and a _continuous_ P1-function f.
Then each hanging vertex p on level k is contained in
a face F of an element on level l<k without being a vertex
of F. Hence f(p) is given by linear interpolation of the values
f(p_(F,i)) at the vertices p_(F,i) of F, i.e. it's a linear
combination of those values.
If some of the p_(F,i) are hanging themselves, the values f(p_(F,i))
are again linear combinations of values at vertices of even coarser
element. In the end f(p) is a linear combination of values
f(q_i) at nonhanging vertices q_i.
If you restrict your deformations to the subspace of such
_continuous_ P1-functions instead of all P1-functions, you will no
longer have holes or overlapping element (at least if the deformation
is small enough).
This subspace is often called the conforming P1-space for
the nonconforming mesh. Please refer to the discretization
module of your choice for the implementation: I know that
it's implemented in dune-fufem and dune-pdelab, and I'm
pretty sure that it's also implemented in dune-fem.
Best,
Carsten
> Thanks again,
>
> Marco
>
>
>
> Da: "Carsten Gräser" <graeser at mi.fu-berlin.de>
>
> A: "Marco Cisternino" <marco.cisternino at optimad.it>, dune at dune-project.org
> Inviato: Mercoledì, 25 febbraio 2015 0:28:11
> Oggetto: Re: [Dune] parametrized AMR and cell divergence
>
> Hi Marco,
> with hanging node you will have precisely the situation mentioned
> by Andreas. This does not change in 3d.
>
> The problem is that GeometryGrid moves individual vertices, i.e,
> the grid is deformed by a P1-function living on the host grid.
> Unfortunately a P1-function with arbitrary values for each vertex
> is not continuous in general. Hence you get holes or overlapping
> elements as described by Andreas.
>
> However you can cure this by using conforming P1-functions
> leading to continuous deformations. This can be achieved by
> interpolating the values at hanging nodes by their non-hanging
> neighbors.
>
> Best,
> Carsten
>
> Am 24.02.2015 um 19:17 schrieb Andreas Dedner:
>> All I'm saying is that one element is a pentagon and GeometryGrid does
>> not change the type of the element. So that the situation will not
>> be correctly resolved by GeometryGrid since it uses the element geometry
>> types of the hostgrid. For example element.geometry().volume() would
>> be wrong. You would need a grid that can handle this pentagon.
>> So the underlying codim zero elements do not conform to the dune
>> structure if you use GeometryGrid.
>>
>> One could still get the intersection correctly I guess. But not the way
>> it is implemented as you can see in
>> dune/grid/geometrygrid/intersection.hh, As you can see it uses the
>> geometry of
>> the inside element and as discussed above that is not correct.
>> Andreas
>> FieldVector< ctype, dimensionworld >
>> outerNormal ( const FieldVector< ctype, dimension-1 > &local ) const
>> {
>> const ReferenceElement< ctype, dimension > &refElement
>> = ReferenceElements< ctype, dimension>::general(
>> insideGeo_.type() );
>>
>> FieldVector< ctype, dimension > x( geometryInInside().global(
>> local ) );
>> const typename ElementGeometryImpl::JacobianInverseTransposed
>> &jit = insideGeo_.jacobianInverseTransposed( x );
>> const FieldVector< ctype, dimension > &refNormal =
>> refElement.integrationOuterNormal( indexInInside() );
>> FieldVector< ctype, dimensionworld > normal;
>> jit.mv( refNormal, normal );
>> return normal;
>> }
>>
>>
>>
>>
>>
>> On 24/02/15 17:17, Marco Cisternino wrote:
>>> This is exactly what I mean, but I was talking about 3D.
>>> Anyway, from what you're saying I cannot understand the use of
>>> GeometryGrid.
>>> If I can move nodes using a deformation function and I can refine
>>> locally (in Dune style), the "moved" situation is quite common.
>>> Moreover, in this case I'd sum over the 5 intersections of the right
>>> element asking for normals and intersections length, what is the
>>> relevance of being a cube for the element? Intersections are "cube".
>>> I can agree if you speak about the volume of the right element.
>>> Who's Z?? You meant Y?
>>> Thanks,
>>>
>>> Marco
>>>
>>>
>>> --
>>> -----------------------------------------------
>>> Marco Cisternino, PhD
>>> Software Developer
>>> OPTIMAD Engineering s.r.l.
>>> Via Giacinto Collegno 18
>>> 10143 Torino - Italy
>>> www.optimad.it
>>> marco.cisternino at optimad.it
>>> +39 011 19719782
>>> -----------------------------------------------
>>>
>>> ------------------------------------------------------------------------
>>> *Da: *"Andreas Dedner" <a.s.dedner at warwick.ac.uk>
>>> *A: *"Marco Cisternino" <marco.cisternino at optimad.it>
>>> *Cc: *dune at dune-project.org
>>> *Inviato: *Martedì, 24 febbraio 2015 18:00:30
>>> *Oggetto: *Re: [Dune] parametrized AMR and cell divergence
>>>
>>> So you have the following situation
>>> Original Moved
>>> X-----------A----------------X X--------A------------------X
>>> | | | |
>>> \ |
>>> | | | |
>>> \ |
>>> |------------Y | |-----------Y |
>>> | | | |
>>> / |
>>> | | | |
>>> / |
>>> X-----------B----------------X X-------B-------------------X
>>> Perhaps somebody else can add his thoughts but the right element after
>>> movement is not a cube any more so it still will have the straight edge
>>> between AB and your grid elements would not be non overlapping. That
>>> is not allowed in DUNE.
>>>
>>> The right element does have 5 intersections and I guess two of those
>>> could be between AZ and ZB... But the main problem is the non DUNE
>>> style grid.
>>>
>>> Andreas
>>>
>>> On 24/02/15 16:35, Marco Cisternino wrote:
>>>
>>> Absolutely non conforming.
>>> I know I have a hanging node, but I cannot understand what you
>>> say: why do you talk about coarse and fine intersections??
>>> If I move a hanging node I'm moving 4 intersections, isn't it? And
>>> my coarse element has 9 intersections, right?
>>> Through its intersections the coarse element knows about the
>>> hanging node or not?
>>> If not I cannot imagine the use of intersections.
>>>
>>> Thanks again.
>>> Marco
>>>
>>>
>>> ------------------------------------------------------------------------
>>> *Da: *"Andreas Dedner" <a.s.dedner at warwick.ac.uk>
>>> *A: *"Marco Cisternino" <marco.cisternino at optimad.it>,
>>> dune at dune-project.org
>>> *Inviato: *Martedì, 24 febbraio 2015 16:55:38
>>> *Oggetto: *Re: [Dune] parametrized AMR and cell divergence
>>>
>>> Hi.
>>> Conforming or non conforming? If non conforming you have a hanging
>>> node and if you move coarse and fine intersections will not match
>>> (the
>>> coarse grid element does not know about the hanging nor where it
>>> is). Could that be your problem?
>>> Best
>>> Andreas
>>>
>>>
>>> On 24/02/15 15:39, Marco Cisternino wrote:
>>>
>>> Hi Andreas, thank you for your reply.
>>> I'm using GeometryGrid and ALU together. I provide ALU with a
>>> DiscreteDeformationFunction (my coarse element
>>> parametrization). Any time a new point appears in the mesh
>>> after a refinement I move that point using the
>>> DiscreteDeformationFunction.
>>> The problem appears for local refinement. On the other hand,
>>> if I globally refine the mesh I have no problem about the
>>> divergence of the cells: it is zero everywhere.
>>> However, if I refine only a bunch of cells, then the coarse
>>> ones, sharing intersection with the fine ones, have non-zero
>>> divergence.
>>> I'm doing all this using the following methods:
>>> intersection centerOuterUnitNormal
>>> and codimension 1 volume method (choosing the element face
>>> corresponding to the intersection)
>>> I hope it is clearer.
>>> Thanks,
>>>
>>> Marco
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>> *Da: *"Andreas Dedner" <a.s.dedner at warwick.ac.uk>
>>> *A: *dune at dune-project.org
>>> *Inviato: *Martedì, 24 febbraio 2015 12:14:33
>>> *Oggetto: *Re: [Dune] parametrized AMR and cell divergence
>>>
>>> I'm not quite sure I understand the question. Are you seeing
>>> problems
>>> when refining the grid using ALU's standard globalRefine
>>> method or do the problems
>>> only appear when you use your local parametrization and after
>>> moving nodes around
>>> (I'm not quite clear how you do that with ALU....).
>>> Andreas
>>>
>>>
>>> On 24/02/15 11:00, Marco Cisternino wrote:
>>>
>>> Good morning,
>>> I would like to ask duners about deformed AMR.
>>> I'm working with body fitted mesh and ALUGrid.
>>>
>>> In order to refine my mesh I compute a local
>>> parametrization for every coarse element, then I refine
>>> the mesh moving new nodes using my parametrization.
>>> Therefore I compute the cell divergence summing over the
>>> cell intersection
>>> normal . flux * area
>>> where intersection normals and areas are computed by Dune
>>> methods centerUnitNormal and volume(this for a face),
>>> while flux is (1,1,1) everywhere.
>>> I expect 0 over the entire mesh and this is true on the
>>> coarse grid, but for a refined grid this is not true for
>>> coarse cells sharing intersections with finer cells.
>>> Does anyone see something like this? And is there a cure?
>>> Am I doing something wrong?
>>>
>>> Thanks for any hint.
>>> Bests,
>>>
>>> Marco
More information about the Dune
mailing list