[Dune-devel] SPQR solver with subMatrix feature

Simon Praetorius simon.praetorius at tu-dresden.de
Wed Jul 16 16:10:36 CEST 2025


Hi everyone,

I am currently trying to cleanup several solvers in dune-istl, such that 
they works with other matrices than BCRSMatrix<FieldMatrix<double,n,m>>. 
One example I am looking into is the SPQR solver. What is troubling me 
is the method setSubMatrix(matrix,rowIndexSet). It is undocumented and I 
cannot find the corresponding MR (I think it was included before GitLab 
was setup, > 10y ago). As far as I understand, the rowIndexSet selects a 
subset of the outer indices of the blocked matrix and just copies these 
entries to the internal spqrSparseMatrix. The problem I have with this 
is, that in the apply method, we do not have the rowIndexSet anymore and 
get the full size vectors x and b corresponding to the original matrix 
dimensions. What is implemented is an implicit assumption, that the 
rowIndexSet selects consecutively the first n rows of the matrix (and, 
by the way, also the first n columns of the matrix). Thus, the 
assignment simply traverses the vectors until n is reached.

This subMatrix features is actually tested in the spqrtest, at least, 
the corresponding functions are called. Can someone tell me if my 
description mirrors the expected behavior? Can we assume that the 
rowIndexSet is always referring to the outer index? Is this a feature we 
want to preserve, or would it be fine to just drop it. There are much 
better ways to achieve the same, which is not restricted to the SPQR 
solver. Oh, I juts found that such a matrix is implemented in many 
solvers. But again, none of these solvers have this method properly 
documented. I just found that UMFPack implements a different method, 
setMatrix(matrix, bitVector) with a different behavior. Do I get it 
wrong, or is here the whole solver interface lacking something?

Best,
Simon

-- 
Dr. Simon Praetorius
Technische Universität Dresden
Fakultät Mathematik
Institut für Wissenschaftliches Rechnen
Tel: TUD-34432
Web: tu-dresden.de/Members/simon.praetorius

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4855 bytes
Desc: Kryptografische S/MIME-Signatur
URL: <https://lists.dune-project.org/pipermail/dune-devel/attachments/20250716/e71e0a7e/attachment.bin>


More information about the Dune-devel mailing list