[Dune] Re: Task #114.
Mario Ohlberger
mario at mathematik.uni-freiburg.de
Mon Nov 6 15:21:42 CET 2006
Hi all,
we also discussed task 114 in our meeting today. As a result, we
suggest to follow Olivers proposal in the following way:
there should be an additional method "int getMark(Entity &)" on the
grid-class that returns the mark that is set on the Entity.
Best regards,
Mario.
Markus Blatt wrote:
> 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)
>
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://www.dune-project.org/cgi-bin/mailman/listinfo/dune
--
***********************************************************
Dr. Mario Ohlberger Tel.: +49-761/203-5635
Abteilung f. Angewandte Mathematik Fax.: +49-761/203-5632
Universitaet Freiburg
Hermann-Herder-Str. 10
D-79104 Freiburg
E-Mail: mario at mathematik.uni-freiburg.de
http://www.mathematik.uni-freiburg.de/IAM/homepages/mario/
************************************************************
More information about the Dune
mailing list