sparse matrix multiplication

28 views
Skip to first unread message

Peimeng Yin

unread,
Dec 4, 2017, 2:04:18 PM12/4/17
to deal.II User Group
I want to solve a linear system, which has the following form

(A+B A^{-1} B) u = f

Here A is a diagonal black matrix, B is a block matrix that I can figure out the pattern. Are there any solver that I can use to solve the linear system?

or

Can I figure out the pattern of B*B or BA^{-1}B ?

Best,
 

Wolfgang Bangerth

unread,
Dec 4, 2017, 2:43:56 PM12/4/17
to dea...@googlegroups.com
On 12/04/2017 12:04 PM, Peimeng Yin wrote:
> I want to solve a linear system, which has the following form
>
> (A+B A^{-1} B) u = f
>
> Here A is a diagonal black matrix, B is a block matrix that I can figure
> out the pattern. Are there any solver that I can use to solve the linear
> system?

Yes. Have you taken a look at step-20 and step-22? They do exactly this
sort of thing.


> Can I figure out the pattern of B*B or BA^{-1}B ?

In general, A^{-1} is going to be a dense matrix even if A is a sparse
matrix. So building this matrix is not efficient.

Best
W.

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

Wolfgang Bangerth

unread,
Dec 4, 2017, 2:45:15 PM12/4/17
to dea...@googlegroups.com
On 12/04/2017 12:43 PM, Wolfgang Bangerth wrote:
>
>> Can I figure out the pattern of B*B or BA^{-1}B ?
>
> In general, A^{-1} is going to be a dense matrix even if A is a sparse
> matrix. So building this matrix is not efficient.

Of course, you say that A is diagonal, in which case this doesn't apply.
It is possible to compute the sparsity pattern of B^T B, but it is
generally much denser than that of B, and the more efficient way to deal
with this is to only implement the *action* of these operations, as is
done in step-20/22.
Reply all
Reply to author
Forward
0 new messages