UMFPACK: Use generic flatMatrixForEach routines for arbitrary blocked matrices
My motivation of this MR is to use UMFPACK
with MultiTypeBlockMatrix
.
This is already possible for symmetric matrices in the class Cholmod
.
Here I propose a similar rewriting of the UMFPACK
class.
Instead of calling the BCCSMatrixInitializer
, we directly parse the matrix into
an UMFPACK
compatible form using flatMatrixForEach
methods.
This allows us to use almost every blocked matrix structure, such as MultiTypeBlockMatrix
.
Moreover, the 'setMatrix' method is extended by a second bitVector
argument to handle exclusion of
indices. The old 'setSubMatrix' method is kept. The new interface is inspired by the neighbored Cholmod
class.
Things to discuss:
All of the magic happens directly inUMFPACK
right now. Should this be exported into theBCCSMatrix
/BCCSMatrixInitializer
class?On the other hand: the routines are hard-wired toUMFPACK
with ignore bits. So we should keep them here.- I introduce a new interface with bit-wise "ignore" DOFs. This is inspired from the
dune-solvers
module. - The "old"
setSubMatrix
method does not fit into the current context: It handles only top-level indices and cannot be used for nested block matrices. Should be keep it? I am no sure how important this method is. One application can be found inDune::Solvers::UMFPackSolver
, but a subsequent MR in this module will switch to a bitvector. - Deducing the
domain_type
andrange_type
directly form theMatrix
type causes problems if the ignore field is present: I want flexibility in the ignored dofs, i.e., disable single bits of a block component. This is easily possible since we store a compressed scalar matrix in theUMFPACKMatrix
. However, theapply
method assumes the arguments to be codensed to the active components. This is in general not compatible with the type of the vectors. InCholmod
this a solved by dropping theMatrix
template type and fixing only theVector
type. The matrix type can be arbitrary, since everything is stored in a scalar matrix in the end.
Edited by Patrick Jaap