#220 Is it safe to call method father()?
Metadata
Property | Value |
---|---|
Reported by | Oliver Sander (oliver.sander@tu-dresden.de) |
Reported at | Dec 13, 2006 10:23 |
Type | Feature Request |
Version | Git (pre2.4) [autotools] |
Operating System | Unspecified / All |
Last edited by | Andreas Dedner (A.S.Dedner@warwick.ac.uk) |
Last edited at | Jan 17, 2010 16:41 |
Closed by | Andreas Dedner (A.S.Dedner@warwick.ac.uk) |
Closed at | Jan 17, 2010 16:41 |
Closed in version | Unknown |
Resolution | Implemented |
Comment | In rev. 6154 |
Description
I think there is a tiny loophole in our grid interface specification. The documentation of the method father() says that the behaviour of the method is undefined when there is no father. That means you can really only call it when you are sure that there is a father. But how can you know? We know there is no father when we're on level 0. But on the other levels we cannot be sure that there is one. Parallel UG supports so-called vertical load-balancing, where the coarse grid remains on a given processor while finer parts of the grid get moved elsewhere. Hence those finer grid parts contain elements which are not on level 0 but with their fathers not being present on the same processor.
So it seems to me that either we need a way to figure out whether a father exists, or we need to specify that father() throws an exception when there is no father.
Or am I missing something?