[petsc-users] From AIJ to CSR

Barry Smith bsmith at mcs.anl.gov
Tue Jul 23 21:03:50 CDT 2013


On Jul 23, 2013, at 8:59 PM, Su Yan <suyan0 at gmail.com> wrote:

> Hi, is there any way that I can extract the index information and element array from a AIJ matrix? Say, I have a Mat A, which is created using the CSR format with MatCreateSeqAIJ(). How can I get int *ia, int *ja, and double *array out of A?

   MatSeqAIJGetArray() for array and MatGetIJ() for ia and ja but we hope that generally users will never need to get access to these low-level underlying structures. Perhaps if you tell us why you want them we may suggest alternatives.

    Barry

> 
> Thanks,
> Su



More information about the petsc-users mailing list