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

Casagrande Raffael raffael.casagrande at sam.math.ethz.ch
Tue Apr 8 15:56:51 CEST 2014


Hi Markus,

Sorry for not replying to the mailing list. I have to admit that this is the first time that I use a mailing list.

> -----Original Message-----
> From: Markus Blatt [mailto:markus at dr-blatt.de]
> Sent: Dienstag, 8. April 2014 10:04
> To: Casagrande Raffael
> Cc: dune at dune-project.org
> Subject: Re: [Dune] How children which are copies of their father handled in
> DUNE?
> 
> Hi,
> 
> Please always reply to the list. If I am helping for free everybody should benefit.
> 
> On Thu, Apr 03, 2014 at 04:45:22PM +0000, Casagrande  Raffael wrote:
> >
> > 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?
> 
> With our iterators not being random access iterators and therefore not
> providing operator-(i1, i2), they should actually be equal. You only visit each
> entity once during the traversal.

Hmm what I meant with std::distance(begin,end) is just the number of times that I have to increment begin until begin == end. So if I take again the example from my original question, 

(a)-------------(i)------(b)    level 0
(c)------(d)----(j)               level 1,

Then the leaf view contains nodes (c), (d), (i), (j), (b) so I assume that when I iterate through all nodes of the leaf view I will effectively get 5 nodes? (i.e. std::distance(leafView().begin<1>(), leafView().end<1>()) == 5 but
leafView().size(1) == 4)


> 
> > 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$.
> >
> 
> Please open a bug report about this at
> <http://www.dune-project.org/flyspray>. On this list it might simply get lost.

Okay, I'll do that in a moment when I'm sure I've understood the problem ;)

Thanks a lot in advance,
Raffael

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




More information about the Dune mailing list