<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Aug 14, 2015 at 9:23 AM, Romain Thomas <span dir="ltr"><<a href="mailto:R.Thomas@tudelft.nl" target="_blank">R.Thomas@tudelft.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">Dear PETSc users,<br>
<br>
I would like to know if I can replace the following functions<br>
<br>
MatLUFactorNumeric(Mat fact,Mat mat,const MatFactorInfo *info)<br>
MatLUFactorSymbolic(Mat fact,Mat mat,IS row,IS col,const MatFactorInfo *info)<br>
MatLUFactor(Mat mat,IS row,IS col,const MatFactorInfo *info)<br>
<br>
by<br>
<br>
MatLUFactorNumeric_KLU(Mat F,Mat A,const MatFactorInfo *info)<br>
MatLUFactorSymbolic_KLU(Mat F,Mat A,IS r,IS c,const MatFactorInfo *info)<br>
MatGetFactor_seqaij_klu(Mat A,MatFactorType ftype,Mat *F)<br>
<br>
in my code for the simulation of electrical power systems? (I installed the package SuiteSparse)<br></div></div></blockquote><div><br></div><div>Why would you do that? It already works with the former code. In fact, you should really just use</div><div><br></div><div> KSPCreate(comm, &ksp)</div><div> KSPSetOperator(ksp, A, A);</div><div> KSPSetFromOptions(ksp);</div><div> KSPSolve(ksp, b, x);</div><div><br></div><div>and then give the options</div><div><br></div><div> -ksp_type preonly -pc_type lu -pc_mat_factor_package suitesparse</div><div><br></div><div>This is no advantage to using the Factor language since subsequent calls to</div><div>KSPSolve() will not refactor.</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><div style="direction:ltr;font-family:Tahoma;color:#000000;font-size:10pt">
Thank you,<br>
Best regards,<br>
Romain<br>
</div>
</div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">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</div>
</div></div>