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

Matthew Knepley knepley at gmail.com
Wed Nov 9 07:50:50 CST 2011


On Wed, Nov 9, 2011 at 12:51 PM, Bao Kai <paeanball at gmail.com> wrote:

> 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.
>

http://www.mcs.anl.gov/petsc/petsc-as/documentation/faq.html#efficient-assembly

   Matt


> Thank you very much.
>
>
> Best Regards,
> Kai
>
>
>
>
>



-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111109/5b559c4a/attachment.htm>


More information about the petsc-users mailing list