[petsc-users] Create csr matrix
Jakub Pola
jakub.pola at gmail.com
Sun Dec 12 14:14:09 CST 2010
Hi,
Could you please help me with creating CSR matrix. I have only one
processor so It have to be done locally
Here is the matrix from those information I would like to have matrix
petsc matrix.
double vals [] = {1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0} ;
int c_idx [] = {1, 3, 2, 0, 1, 2, 2, 3} ;
int r_idx [] = {0, 2, 3, 6, 8} ;
int n_rows = 4 ; //square matrix
Thank you in advance for help.
Kuba
More information about the petsc-users
mailing list