Great, that was exactly what I was looking for. Thanks!
On Mon, Jun 22, 2009 at 7:46 AM, Satish Balay<balay at mcs.anl.gov> wrote: > 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! >> > >
