alena kopanicakova <[email protected]> writes:

> Hello,
>
> I have parallel matrix, let's say
>
> a b
> c d
>
> I would like to extend it to block matrix with structure as (bs = 3):
>
> a 0 0 b 0 0
> 0 a 0 0 b 0
> 0 0 a 0 0 b
> c 0 0 d 0 0
> 0 c 0 0 d 0
> 0 0 c 0 0 d
>
> Result is basically kron. product with ident.

MatCreateMAIJ

> At the moment, I am just creating new mat with size bs-times bigger than
> initial and MatSetValues to proper places. It seems, that this is very
> inefficient and time consuming.
> I wonder, is there any trick, how to perform assembly efficiently?

http://www.mcs.anl.gov/petsc/documentation/faq.html#efficient-assembly

Attachment: signature.asc
Description: PGP signature

Reply via email to