[petsc-users] Reading values from a matrix into a different format
Tim Steinhoff
kandanovian at gmail.com
Wed Jun 10 10:03:32 CDT 2015
Hi all
assume that a sparse matrix is constructed via
MPI_Comm comm;
Mat A;
PetscInt n = 10000; /* dimension of matrix */
comm = PETSC_COMM_SELF;
MatCreate(comm,&A);
MatSetSizes(Amat,n,n,n,n);
MatSetBlockSize(A,6);
MatSetType(A,MATAIJ);
followd by some suitable preallocation and setting of values.
What can be done to efficiently read the values from the matrix A and
store them in a format like the coordinate format COO?
Regards
Tim
More information about the petsc-users
mailing list