[petsc-users] New matrix with same distribution as an old submatrix
Barry Smith
bsmith at mcs.anl.gov
Thu Mar 17 21:25:50 CDT 2016
Use MatGetLocalSizes() in the K_sub and then create the new matrix with those local sizes.
> On Mar 17, 2016, at 9:33 PM, Tabrez Ali <tabrezali at gmail.com> wrote:
>
> Hello
>
> Lets say I create a submatrix K_sub from a larger matrix K using MatGetSubMatrix. Now how do I create a new matrix M which has the same parallel distribution as K_sub?
>
> Thanks in advance.
>
> Tabrez
More information about the petsc-users
mailing list