On Wed, Nov 9, 2011 at 12:51 PM, Bao Kai <span dir="ltr">&lt;<a href="mailto:paeanball@gmail.com">paeanball@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div dir="ltr">Dear all, <div><br></div><div>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. </div>

<div><br></div><div>So I want to turn to PETSC to use  some iterative solver. </div><div><br></div><div>I have written the the whole matrix assembly process with coordinates list format. The matrix can be converted to CSC format to use umfpack. </div>

<div><br></div><div>When I tried to use MatSetValues to generate the Matrix for petsc, it turned out to be really slow. </div><div><br></div><div>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.</div>

<div><br></div><div>Since the code at the moment is serial, the methods working for serial petsc will be OK. </div><div><br></div><div>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. </div>

<div><br></div><div>I just want to convert the matrix generated to the format the petsc can use. It can save much time. </div></div></blockquote><div><br></div><div><a href="http://www.mcs.anl.gov/petsc/petsc-as/documentation/faq.html#efficient-assembly">http://www.mcs.anl.gov/petsc/petsc-as/documentation/faq.html#efficient-assembly</a></div>
<div><br></div><div>   Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div dir="ltr"><div>Thank you very much. </div><div><br></div><div><br></div>
<div>Best Regards, </div>
<div>Kai </div><div><br></div><div><br></div><div><br></div><div> </div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>