[DRAFT] relax consistency guarantees.
In order to support multi-domain spaces we relaxed the consistency guarantees between leaf-nodes and the corresponding finiteElement.
If node.size() == 0 accessing finiteElement is undefined behaviour and thus we skip nodes with size() == 0.
Currently this change only impacts the semantics, but leaves the interface unchanged. We should consider introducing a convenience function on the leaf-nodes that make the current now state explicit. Different possible names got proposed:
active
valid
hasFiniteElement
empty
Merge request reports
Activity
Could we also add these "guarantees" somewhere into the documentation of the interface? E.g. into the documentation of the
finiteElement()
method. We do not have contracts of something like this in c++20 to annotate a precondition, but maybe anassert(size() > 0)
in the top offiniteElement()
would also be documentation in code. I would guess, that this additional check does not lead to any performance costs.