[Dune] The new method getMark()

Robert Kloefkorn robertk at mathematik.uni-freiburg.de
Mon Nov 13 12:32:59 CET 2006


Hello Dune,

>- Why is getMark a method of the grid?  I would have expected it to be
>   a method of the Entity, as are all other const methods that give
>   information about entities.
The method is located on the grid class, because of the reasons Olaf
mentioned.

>- Suppose it is a method of the grid.  Why is it called with an Entity
>   as the argument?  The corresponding mark()-method takes an
>   Entity_Pointer_.  I think we should be consistent here.
Hm right. I wrote a mail to check if anybody is ok with the change I was
goning to apply accourding to that mail. The answer was yes. So what's
the problem now.

>- What is the precise semantics of the return value of mark()? The
>   documentation says 'true if Entity was marked, false otherwise'.
>   But what happens if the element has been marked before and I call
>   mark() with refcount==0 (i.e. I deliberately unmark the element).
>   Does the method return false (because the element is not marked
>   anymore) or true (because I changed the element's state)?
The method returns true, of course. The method returns true, if the
marking was successful, and false if not. Thats what the documentation
says. If I call mark with refCount 0, I want the entity to be not
refined and not coarsened. Pretty clear to me. If there are
missunderstandings we should revise the documentation.

> I am tempted to suggest we turn mark() into a void method, because
I think we should leave it the way it is.

- I expect the return value to be rarely used
- its semantics are not intuitively clear
> - the implementation can be costly (e.g. UGGrid), because mark() may
>   have to call getMark() internally to see whether it is changing
>   the element's state.  And getMark can be surprisingly costly
>   (UGGrid, again).
That's a problem of UG. I'm sure if think about that problem, you'll
find a faster solution, so that it is not a problem of UGGrid aswell.
Until then, yeah, it will be costly.

> Let the discussion begin!
Let the discussion end, because we already discussed this a lot.
We should get to an end, i.e. 1.0.

Regards,

R




-- 

  Robert Klöfkorn           <robertk at mathematik.uni-freiburg.de>

  Mathematisches Institut              Tel: +49 (0) 761 203 5631
  Abt. für Angewandte Mathematik       Fax: +49 (0) 761 203 5632
  Universität Freiburg
  Hermann-Herder-Str. 10
  79104 Freiburg

  http://www.mathematik.uni-freiburg.de/IAM/homepages/robertk




More information about the Dune mailing list