Direct support for multi indices
Conceptually ISTL uses multi indices, but there is no direct support in dune-istl
.
On the other hand most discretization modules use multi-index objects internally to handle nested vectors and matrices. In all these modules we find in some way additional helper functions that allow to access or modify ISTL containers, based on multi indices or partial multi indices.
I discussed with @simon.praetorius and tried to collect some functions that might be helpful. Including such functions in dune-istl
directly should significantly simplify the implementation of backends, e.g. in PDELab, functions or Amdis. FEM currently has very limited support of nested containers, on the other hand, it the burden of writing a backend vanishes, this might perhaps change?!
This issue should act as collection of ideas for such a multi index interface. I start with ideas for the vectors, matrices a bit more complex and should follow later:
- we need a proper definition of a multi index concept.
- for convenience we might want to add an
operator [](MultiIndex)
or some free standing access function likeaccessVectorEntry(Vector,MultiIndex)
. - functions for perform operators on a set of MultiIndex. This allows for example to
- gather/scatter entries into a communication buffer
- compute a parallel scalar product only on entries owned by the current rank