Conflicting treatment of gridview/indexset in mappers
The MultipleCodimMultipleGeomTypeMapper
internally stores
// GridView is needed to keep the IndexSet valid
GV gridView_;
const typename GV::IndexSet& is;
a grid view and a reference to an indexset and there is an interesting comment where I don't know if the statement is correct. In the update method since recently, the gridview is updated, e.g.
void update (const GV& gridView)
{
gridView_ = gridView;
update_();
}
But the reference to the index set is not updated.
The SingleCodimSingleGeomTypeMapper
stores a pointer
const typename GV::IndexSet* is_;
So apparently no gridview is needed here to keep the pointer alive. Also update just sets the pointer
void update (const GV& gridView)
{
is_ = &gridView.indexSet();
}
without storing the gridview itself.
What are the correct guarantees offered by the interface? The implementations seem to contradict each other, so at least one of them should be buggy.
I think this should be resolved before release 2.8 since the new mapper.update(gridView) interfaces have just been introduced recently and this might be related.