[Dune] Linear solve with transposed matrix

Christian Engwer christian.engwer at uni-muenster.de
Wed Mar 29 14:52:12 CEST 2017


Hi Tobias,

> I am currently solving linear systems of equations in the form
> 
> A x = b,
> 
> with a preconditioned iterative method in Dune. I would also like to solve linear systems with the same system matrix but transposed
> 
> A^T x = b.
> 
> As far as I can see, the iterative methods and preconditioners in Dune ISTL don't have an option to do so, and I have read<http://lists.dune-project.org/pipermail/dune/2015-August/013856.html> that there isn't an option to directly transpose a matrix (which is also not exactly what I want).

this is true, you can not apply the solver on the transposed
matrix. Actually it might work, if you don't want to have a fast
solver, you could copy the MatrixAdapter class, which implements the
operator interface and just call .mtv(...) instead of .mv(...).  But
this would not fast, as the apply-transposed is slower and (more
important) you can't use preconditioners.

Actually I suggest something different...

> The matrix, A, is of the type BCRSMatrix<FieldMatrix<double, 3, 3>>.
>
> What is the easiest way to solve such a system in Dune?

I suggest (and have done this myself) to actually assemble both
matrices. You can write a simple adapter around you local local
operator to swap row and column idex when writing to the local
stiffness matrix (remember that you also have to swap the offsiagonal
matrices if you have skeleton terms). This works, as long as your
matrix mattern is symmetric. Obviously you could also transpose te
matrix afterwards is this particular case...

If you want to follow tis route you should ask for details on the
dedicated mailing list for your discretization module.

Ciao
Christian

-- 
Prof. Dr. Christian Engwer 
Institut für Numerische und Angewandte Mathematik
Fachbereich Mathematik und Informatik der Universität Münster
Einsteinstrasse 62
48149 Münster

E-Mail  christian.engwer at uni-muenster.de
Telefon +49 251 83-35067
FAX     +49 251 83-32729




More information about the Dune mailing list