[Dune] [#347] UGGrid index sets use O(n) default implementation of method contains()

Dune flyspray at dune-project.org
Mon Oct 4 23:10:33 CEST 2010


THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.

The following task has a new comment added:

FS#347 - UGGrid index sets use O(n) default implementation of method contains()
User who did this - Oliver Sander (sander)

----------
The problem is that the correct solution is fairly invasive, and I am not sure whether it's worth implementing. 

Here is the problem: let's say you have a LevelIndexSet and an Entity. The contains-method is supposed to tell you whether the Entity is part of the index set.  One sure way of doing that is iterating over the index set and look whether you find the entity, but that of course is linear.  Another way is to check whether the level of the entity matches the level of the index set, and whether the entity belongs to the same grid object as the index set.  Unfortunately, this second check is fairly difficult in UGGrid, since a UGGrid Entity is basically just a pointer to its UG equivalent.

So I currently see two ways out:
a) Make the UGGrid entity know its grid. In principle that is not a problem, it is just comparatively invasive, error-prone and 'bloaty' for a corner case problem
b) Decide (and document well) that the output of contains() is undefined if the argument entity is not part of the correct grid.  That doesn't really convince me either, because testing whether a given entity belongs to a given grid sounds like a reasonable thing for me to expect from a contains-method.
----------

More information can be found at the following URL:
http://www.dune-project.org/flyspray/index.php?do=details&task_id=347#comment2157

You are receiving this message because you have requested it from the Flyspray bugtracking system.  If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.




More information about the Dune mailing list