The resulting matrix is dependent on the number of processes you use (e.g.,
if you run with only one process, you will get a zero matrix).  Think it
over if this is really what you want.

--Junchao Zhang


On Mon, Jun 22, 2020 at 6:14 AM Eda Oktay <[email protected]> wrote:

> Hello everyone,
>
> I am trying to find elements in off diagonal blocks of a parallel
> sparse matrix. That is why, I want to use MatGetDiagonalBlock and from
> the matrix I obtain, I want to obtain off diagonal elements by
> subtracting it from my original matrix by using MatAXPY.
>
> However, since MatGetDiagonalBlock gives a sequential matrix and my
> original one is parallel, I can't use MatAXPY. That's why I want to
> change the type of one of the matrices.
>
> How can I change a MATSEQAIJ to MATMPIAIJ or vice versa?
>
> Thanks!
>

Reply via email to