Calling tree() in unbound state
(Copied from the list)
We decided that a local view is only usable if it's bound to an entity. Especially accessing the tree will lead to undefined behaviour since the size, local finite element, ... are not initialized.
However, in DiscreteGlobalBasisFunction::LocalFunction
I need to attach data to the tree nodes in some pre-allocated container. As a consequence we must either require that the LocalFunction
containing the container is in bound state on copy or destruction,
or we must bind it internally to a dummy, e.g. gridView().begin<0>()
.
So avoid this I propose to allow accessing the tree and all its statically known data, i.e., treePath()
and treeIndex()
in unbound state. Actually I currently already rely on this.
Accepting this request would not lead to any code change. But I'd like to have a decision on this.