Extract some blocks from a sparse block matrix

50 views
Skip to first unread message

lianzha...@gmail.com

unread,
Feb 20, 2017, 10:50:39 AM2/20/17
to deal.II User Group
Dear all,

I'm working on some monolithic and partitioned schemes of FSI problem. In a monolithic scheme, the matrix usually consists both fluid and structure parts. However in a partitioned scheme, we can use two matrices which represent the fluid and structure separably. I would like to extract the fluid part and the structure part from the matrix assembled in monolithic scheme. So is it possible to extract some blocks from a sparse block matrix and then use these blocks to build a new sparse block matrix? If yes, this would help me test kinds of partitioned schemes without making too much effort on coding. 

For example, A is a 4*4 sparse block matrix with 16 blocks, can I extract the block(0,0), block(0,2), block(2,0) and block(2,2) from A?  Even more, can these four blocks be used to build a new sparse block matrix B?

Thanks.

Best regards,
Leon

Timo Heister

unread,
Feb 20, 2017, 11:20:14 AM2/20/17
to dea...@googlegroups.com
Message has been deleted

lianzha...@gmail.com

unread,
Feb 28, 2017, 11:01:26 PM2/28/17
to deal.II User Group
Dear Timo Heister,

Thank you very much. I have used the BlockMatrixArray object in my code and it works well. However, it seems that the BlockMatrixArray object is a kind of pointer so that we have to use the iteration method to solve the linear system, of course, we could develop precondition by using BlockTrianglePrecondition object. I'm wondering if there is some way for BlockMatrixArray object to use the direct method to solve the linear system, eg using SparseDirectUMFPACK.

Thanks again.

Best,
Leon

Daniel Jodlbauer

unread,
Mar 1, 2017, 3:17:15 AM3/1/17
to deal.II User Group
SparseDirectUMFPACK creates a copy of the matrix using iterators, which are not implemented for the BlockMatrixArray, so these would have to be added (and some minor other functions used within the factorize method).
Alternatively, one could implement the factorize method for BlockMatrixArray separately, which is probably easier.
Reply all
Reply to author
Forward
0 new messages