STRUMPACK icon indicating copy to clipboard operation
STRUMPACK copied to clipboard

Adding a matrix to an HSS compressed matrix or ULV factoriized matrix

Open dimitargslavchev opened this issue 3 years ago • 0 comments

Hello Pieter,

I want to solve a parabolic equation as a series of systems of the form: (M / \sigma_j + A) u_{j+1} = M f_j + u_j / \sigma_j

A is a stiffness matrix that I have already compressed and solved a system Au = B before. A is dense, because my problem is non-local. M is the matrix of mass. It is either very sparse or diagonal (Lumped matrix of mass). \sigma_j is just some number. u_{j+1} is the unknown, while u_j was calculated previously. f_j is also known.

I need to solve the above equation repeatedly, so I am interested in doing the compression and possibly the factorization only once, rather than at each step.

So, is it possible in STRUMPACK to sum the ULV factorized form of A with either a sparse or diagonal matrix? Or I should use the HSS compressed form of A?

For the case where M is diagonal, it should be trivial to sum with the compressed matrix, since the compression does not change the diagonal. I think that this function should work:

void strumpack::HSS::HSSMatrix< scalar_t >::shift | ( | scalar_t | sigma | ) |  

For the case when M is sparse, the M matrix is generated on the same mesh as the stiffness matrix A, so may be it is possible to use the same compression structure as A. M has about 5 nonzeroes per row.

dimitargslavchev avatar Mar 23 '21 20:03 dimitargslavchev