Create CRS matrix

Satish Balay balay at mcs.anl.gov
Mon Jun 22 08:46:57 CDT 2009


Check the following:

http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Mat/MatCreateSeqAIJWithArrays.html
http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/Mat/MatCreateMPIAIJWithArrays.html

Satish

On Mon, 22 Jun 2009, Megan Lewis wrote:

> Hi,
> I know PETSc stores their matrices in CRS format.  I have the 3 arrays
> required for CRS format as pointers (two int pointers and one double
> pointer).  Instead of allocating the memory and running through all of
> the non-zero elements in the matrix, is there any way to create a
> matrix in PETSc by passing in the 3 arrays?
> 
> Thanks!
> 



More information about the petsc-users mailing list