[Dune] How children which are copies of their father handled in DUNE?

Casagrande Raffael raffael.casagrande at sam.math.ethz.ch
Thu Apr 3 18:45:22 CEST 2014


Hi Markus,

Thanks a lot for the explanations. I think I understand now a lot more and but I have two more question to clarify my understanding ;)

1) If the size() methods of the leaf view omit the entities which are copies of others, then std::distance(leafView().begin<1>(), leafView().end<1>()) != leafView().size(1), right?
2) But I guess for any levelView this equality will hold because there are no children and fathers (which could be copies of each other) in the same level view?

If this is so then I would suggest to update the documentation of the IndexSet to something like this:

The index map \f$ m \f$ has the following properties:
  - Two entities have the same index if one is an exact copy of the other, i.e. for any \f$ e, e' \in E_g^c \f$ we have \f$ e \mathcal{C} e' \rightarrow m(e) = m(e')\f$ (this is only possible in leaf views)
  - Otherwise they have different indices: For any \f$ e, e' \in E_g^c\f$ such that \f$ e \neq e' \wedge  \neg( e \mathcal{C} e' ) \f$ then \f$ m(e) != m(e') \f$
  - It is consecutive and zero-based within the subsets \f$ E_g^c / \mathcal{C} \f$, i.e. we have \f$ 0 \leq m(e) < |E_g^c / \mathcal{C} | \f$ for any \f$ e \in E_g^c\f$.

I have to admit that this explanation is quite mathematical, but I think it is very essential that one distinguishes between the leaf entities and their equivalence relation. Maybe the concept of one entity being a copy of another one could be introduced in more detail in the documentation of the index set. It could then also be used in the documentation of the size() functions (because there the documentation is essentially also unclear about this; In STL containers it is always true that size() == distance(begin, end), but this doesn't hold for leaf views!)

Or did I get something wrong?

Thanks again!
Raffael

________________________________________
From: Markus Blatt [markus at dr-blatt.de]
Sent: Thursday, April 03, 2014 3:03 PM
To: Casagrande  Raffael
Cc: dune at dune-project.org
Subject: Re: [Dune] How children which are copies of their father handled in DUNE?

Hi Raffael,

On Thu, Apr 03, 2014 at 09:30:49AM +0000, Casagrande  Raffael wrote:
> I have problems to understand how entities which are exact copies of their father are being dealt with in the context of leaf views. In particular consider the following 1D hierarchical grid:
>
> (a)-------------(i)------(b)    level 0
> (c)------(d)----(j)               level 1
>
> where (a), ..., (j) denote the nodes of the grid. As far as I understand the following is true:
> - node (j) is a copy of it's father (i).
> - The leaf view consists of nodes (c), (d), (i), (j), (b) since node (i) belongs to a codim=0 leaf entity.
> - The id of node (i) == id of node (j) (global id set)
>
> Is this correct?

Yes, that is correct.

> If so there are a few things which are very unclear to me:
> - is the leaf index of node (i) the same as the leaf index of node
> (j) ? I think this should be the case because of [1] Def. 25, but
> the dune class documentation seems to suggest the opposite (and is
> not very clear about this).

No that is the case. The index set (leaf index map in Def. 25), is
a mapping from zero to the number of entities of this codimension,
reference element and process number (Def. 25 clause 1). Clause 2 only
holds for copies of entities that are part of the leaf view. In this
case no matter whether you retrieve the node from the right or left
element it will be mapped to the same index.

Which part of the documentation are you referring to?
http://www.dune-project.org/doc/doxygen/html/classDune_1_1IndexSet.html#_details
which reads
"The index map $m$ has the following properties:

    It is unique within the subsets $E_g^c$, i.e. for any
    $e,e^\prime\in E_g^c$ we have $e\neq e^\prime \rightarrow m(e)\neq
    m(e^\prime)$."

I guess we might not have defined what equaltiy of entites
means... Please let us know how we can improve this.

> - How is the size() method of the leaf view defined for nodes, is leafView().size(nodes) == 5 or == 4?
> - How is the size() method of the leaf index set defined for nodes? is leafView().indexSet().size(nodes) == 5 or == 4?

Should be 4 for both, to let users allocate containers of the correct
size.

Markus
--
Do you need more support with DUNE or HPC in general?

Dr. Markus Blatt - HPC-Simulation-Software & Services http://www.dr-blatt.de
Hans-Bunte-Str. 8-10, 69123 Heidelberg, Germany
Tel.: +49 (0) 160 97590858  Fax: +49 (0)322 1108991658





More information about the Dune mailing list