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:
bang...@colostate.edu
www:
http://www.math.colostate.edu/~bangerth/