Skip to content

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 in UMFPACK right now. Should this be exported into the BCCSMatrix / BCCSMatrixInitializer class?
  • On the other hand: the routines are hard-wired to UMFPACK 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 in Dune::Solvers::UMFPackSolver, but a subsequent MR in this module will switch to a bitvector.
  • Deducing the domain_type and range_type directly form the Matrix 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 the UMFPACKMatrix. However, the apply method assumes the arguments to be codensed to the active components. This is in general not compatible with the type of the vectors. In Cholmod this a solved by dropping the Matrix template type and fixing only the Vector type. The matrix type can be arbitrary, since everything is stored in a scalar matrix in the end.
Edited by Patrick Jaap

Merge request reports

Loading