Reading a Sparse matrix in CRS format from a function to be used in parallel linear solvers

#DOMINIC DENVER JOHN CHANDAR# DOMI0002 at ntu.edu.sg
Wed Jan 31 00:43:45 CST 2007


Hi,
 
       I have a function which creates a sparse matrix following a
certain eqn and returns a pointer to the row, column index and the value
of a sparse matrix (CRS- form).
i   j   val
1  1  1.0
2  2  1.0
2  3  -1.5..
so on...
 
 The matrix may not have a definite pattern like the one we see for
tridiagonal or pentadiagonal matrices or the test cases (linear solvers)
cited in the petsc documentation. Now, i would like to use the linear
solvers in petsc to solve the system of equations. I do not want to
write that sparse matrix into a file and read it into petsc since it may
be huge.I would like to call that function from petsc and would return
the pointer to i j and val and insert values of this sparse matrix using
MatSetValues in parallel. How can I achieve this ?
 
Cheers,
Dominic  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20070131/cd51ee2e/attachment.htm>


More information about the petsc-users mailing list