how to get the transpose of a block sparsity matrix?

35 views
Skip to first unread message

hua zhang

unread,
Aug 16, 2019, 11:41:46 PM8/16/19
to deal.II User Group
Dear all deal.ii users,
        I am studying goal oriented adaptivity for FSI problems and code it in deal.ii. The system consists of velocity, pressure, displacement(u,p,w), so  I use block sparsity matrix for system matrix. When I solve the dual equation, I find what I need is a transpose matrix of system matrix, so how should I do to get the transpose of block sparsity matrix?
        I have tried to get transpose of every block using transpose_operator, but I don't know how to combined these terms into a new block sparsity matrix.

Wolfgang Bangerth

unread,
Aug 17, 2019, 5:33:26 PM8/17/19
to dea...@googlegroups.com
In essence, you only need an object whose vmult function calls the Tvmult
function of your block sparse matrix. That can be achieved with only a few
lines of code. But I think it can be done in an even easier way: create a
LinearOperator object from your block matrix, and then apply transpose() to it
to get the transpose linear operator.

Best
W.

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

hua zhang

unread,
Aug 18, 2019, 10:03:09 PM8/18/19
to deal.II User Group

Thank you very much, Prof.Bangerth. I have solved this problem using the first way you mentioned.
在 2019年8月18日星期日 UTC+8上午5:33:26,Wolfgang Bangerth写道:
Reply all
Reply to author
Forward
0 new messages