[cleanup]Simplify ISTLMatrixBackend entry access by multi-indices
This cleans up the entry access by a pair of row- and column-multi-indices as follows:
- Factor out a generic utility function
visitMatrixEntry()
for accessing the(i,j)
-th entry of a matrix with dynamic indices. By combininghybridIndexAccess()
andhybridRowIndexAccess()
this also works with multi-type matrices. - Factor out a generic utility function
visitMatrixEntryRecursive()
for recursively accessing matrix entries with dynamic row- and column-multi-indices. The action to apply to the resolved matrix entry is customizable. - Use
visitMatrixEntryRecursive()
to return matrix entries.
This is a significant simplification of the old MultiIndexResolver
-code
and far more readable. It is also more generic, and forms the foundation
of possible extensions to other methods that need multi-index-access,
like, e.g., matrixEntryExists(i,j)
or addToMatrixEntry(i,j)
.
Merge request reports
Activity
This does some preliminary steps towards supporting more matrix types to get a solution for #25.
mentioned in issue #25
Currently the CI is expected to fail for testing against dune-istl master, because this requires the bugfix core/dune-istl!516 (merged) which needs to arrive in the CI image. For the tests against the releases this is not a problem, because the check uses a workaround in this case.
added 2 commits
mentioned in commit 79ec00b6