[petsc-users] How to use other matrix directly in petsc?

Bao Kai paeanball at gmail.com
Wed Nov 9 06:51:18 CST 2011


Dear all,

I have been writing a serial FEM code with a direct linear solver umfpack,
which is pretty easy to use. The problem is the memory required turned to
be very big and I can not afford it.

So I want to turn to PETSC to use  some iterative solver.

I have written the the whole matrix assembly process with coordinates list
format. The matrix can be converted to CSC format to use umfpack.

When I tried to use MatSetValues to generate the Matrix for petsc, it
turned out to be really slow.

I am wondering if there is some efficient way to convert the generated
matrix ( with COO, or CSC, or even CSR ) properly to make it usable for
PETSC.

Since the code at the moment is serial, the methods working for serial
petsc will be OK.

And I do many matrix manipulation( some may not easy with petsc) during the
matrix assembly, so I do not want to rewrite the whole assembling process
with petsc at the moment.

I just want to convert the matrix generated to the format the petsc can
use. It can save much time.

Thank you very much.


Best Regards,
Kai
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111109/4d44ca34/attachment.htm>


More information about the petsc-users mailing list