Hi Wolfgang,

Thank you so much for your reply. I think my problem has two potential 
issues:
1. W * M * W^T will be an n by n fully dense matrix with n > 100k. Even if 
it is valid to use LinearOperator to perform W * M * W^T, will memory 
required to store this operator be an issue?
2. I still have to solve B x= (B_0 + W * M * W^T) x = p. Whether linear 
solvers such as CG will be efficient enough is also an issue since W * M * 
W^T is fully dense.

Anyhow, I will do some experiments and let the community know.
Best,

Tao

On Friday, April 19, 2024 at 6:58:18 PM UTC-4 Wolfgang Bangerth wrote:

> 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: [email protected]
> 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/b37ca7e7-1eac-4c23-9e71-9f8d539b07efn%40googlegroups.com.

Reply via email to