[cleanup]Simplify ISTLMatrixBackend entry access by multi-indices
Compare changes
Files
2+ 96
− 78
@@ -23,9 +23,9 @@ namespace Dune::Fufem {
@@ -49,92 +49,112 @@ class ISTLMatrixBackend
@@ -157,15 +177,13 @@ public:
This cleans up the entry access by a pair of row- and column-multi-indices as follows:
visitMatrixEntry()
for
accessing the (i,j)
-th entry of a matrix with dynamic indices.
By combining hybridIndexAccess()
and hybridRowIndexAccess()
this
also works with multi-type matrices.visitMatrixEntryRecursive()
for
recursively accessing matrix entries with dynamic row- and column-multi-indices.
The action to apply to the resolved matrix entry is customizable.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)
.