On 4/18/24 12:06, Tao Jin wrote:

I am developing a quasi Newton solver in deal.ii. During each iteration, I need to solve a linear system B * x = p, where the matrix B has the following form:
B = B_0 + W * M * W^T.
B_0 is an n by n sparse matrix (n is large > 100k);
M is a m by m *full matrix* (m is small m = 20 for example);
W is a n by m full matrix;
Since W * M * W^T will be an n by n fully dense matrix, I cannot afford to explicitly store it.

Does the deal.ii community have any suggestion what is the most efficient way to solve this linear system? I am thinking to use LinearOperator to define and operate on W * M * W^T, but I am not sure whether it supports full matrix and how efficient it would be.

Tao:
I'm not an expert in the LinearOperator framework, but operators such as yours appear, for example, in step-20:
https://dealii.org/developer/doxygen/deal.II/step_20.html#step_20-Implementationoflinearsolversandpreconditioners
There, opS has exactly the form you describe, and it does not actually compute the entries of the S matrix, but only represents the *action* as three matrix-vector products.

That only leaves the question of whether you can use linear_operator(M) on full matrices M. I don't know the answer to that, but what happens if you try?

Best
 W.

--
------------------------------------------------------------------------
Wolfgang Bangerth          email:                 bange...@colostate.edu
                           www: http://www.math.colostate.edu/~bangerth/


--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/5609f7a2-a5bc-46dd-8522-002f08702211%40colostate.edu.

Reply via email to