<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><br></div><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>