[petsc-users] extract Mat data
gouarin
loic.gouarin at math.u-psud.fr
Thu Mar 31 08:56:28 CDT 2011
Hello,
I need to extract a pseudo CSR format from a PETSc Mat. It's easy with
MATSEQ, I use:
MatGetRowIJ(A, 1, PETSC_FALSE, PETSC_FALSE, &(Acsr.n), &(Acsr.ia),
&(Acsr.ja), &done);
MatGetArray(A, &(Acsr.a));
I want to do the same for MATMPI. This is what I do:
MatGetLocalMat(A,MAT_INITIAL_MATRIX, &Aloc);
MatGetRowIJ(Aloc, 1, PETSC_FALSE, PETSC_FALSE, &(Acsr.n), &(Acsr.ia),
&(Acsr.ja), &done);
MatGetArray(Aloc, &(Acsr.a));
Now, I need to know on what process the non local points are.
Is there a petsc function that gives this partition ?
Best regards,
Loic
More information about the petsc-users
mailing list