Bug in non-fixed size entity bloking
When doing entity blocking in a tree on another node other than leaf nodes, non-fixed settings where some blocks may have zero sizes lead to segfaults. This may happen in the context of multidomain solvers that implement wrappers to provide support outside of the sub-domain.
The bug can be seen in this line:
// if not every entity has a sub-block, an addition of any offset with an `entity_index` will be clearly out of bounds.
ci.push_back(_gt_entity_offsets[geometry_type_index] + entity_index);
The solution to this is to use the _entity_dof_offset
to store a value for every entity index as it is done in the non blocked case.
// every mapped entity has an entry in `_entity_dof_offsets` and contains an offset for the final block
ci.push_back(_entity_dof_offsets[_gt_entity_offsets[geometry_type_index] + entity_index]);
This additionally needs that the _entity_dof_offsets
stores the offset of the block instead of the DOF size.