extend solvers for a BCRSMatrix with general BlockType
Taken from !76 (merged):
discussion on how to export the istl solvers in the general case, i.e., not only for FieldMatrix<1,1>
.
I'm just trying to figure out how to trigger the generation of the python solver
module. I'm not really enough of an istl expert I guess to be sure of getting all the possible combinations right...
My suggestion was to first focus on the IterativeSolver
(or possibly InverseOperator
) for a given (square) block sized matrix. That was the idea of my final suggestion, which could also be for example implemented as
dune.istl.solvers.cg(matrix,....)
in both case on module exporting all the iterative solvers for the blockSize
associates with matrix
would be generated. That would be quite easy to do I think. The preconditioners could also be exported in the same module and used for example like this:
seqJacobi = dune.istl.preconditioners.seqJacobi(matrix)
dune.istl.solver(matrix, seqJacobi, 1e-10)
Although I personally don't like to double matrix
argument here.
Exporting a more general LinearOperators
would of course be of interest but I guess only if one could derive from the virtual interface on the Python side. Of course possible but that would be a further project...