[Dune] Re: Task #114.

Markus Blatt Markus.Blatt at ipvs.uni-stuttgart.de
Mon Nov 6 13:58:55 CET 2006


Hi,

On Mon, Nov 06, 2006 at 10:30:30AM +0100, Oliver Sander wrote:
> However I must say that
> I don't particularly like your proposed solution.  Intuitively, I
> would expect a method 'mark()' to do just that: mark the element,
> and not follow some implicit priority rules while doing so.  These
> would have to be documented very well and still people wouldn't
> read them and then wonder why mark doesn't always coarsen elements
> when it is told to do so.
> In order to solve your problem I propose to add a new method which
> returns the mark state of an entity.  Then you could implement your
> priority rule outside of the class interface.  To me, this would
> have several advantages:
> - the semantics of mark() are easier to understand
> - you could implement other priority rules if that was ever
>   necessary
> - the implementation of mark() could be faster, which is good,
>   because most applications don't use priority rules anyways.
> - having access to the mark state may be useful for debugging
> 

we just discussed this issue in our group meeting here in
Stuttgart. We agree with Oliver that his proposed solution (mark
method just marks and user code can query mark state) is  more
intuitive and clear to the user. It is not too much additional work to
include and if statement in the already exisitent loop over all
entities and for people reading the user code it is more clear what
happens.

Therefore we would prefer this
(rather simple) soltion over the solution with priority rules

Cheers,

Markus (Speaking for Stuttgart)




More information about the Dune mailing list