On Fri, Aug 14, 2015 at 9:23 AM, Romain Thomas <[email protected]> wrote:
> Dear PETSc users, > > I would like to know if I can replace the following functions > > MatLUFactorNumeric(Mat fact,Mat mat,const MatFactorInfo *info) > MatLUFactorSymbolic(Mat fact,Mat mat,IS row,IS col,const MatFactorInfo > *info) > MatLUFactor(Mat mat,IS row,IS col,const MatFactorInfo *info) > > by > > MatLUFactorNumeric_KLU(Mat F,Mat A,const MatFactorInfo *info) > MatLUFactorSymbolic_KLU(Mat F,Mat A,IS r,IS c,const MatFactorInfo *info) > MatGetFactor_seqaij_klu(Mat A,MatFactorType ftype,Mat *F) > > in my code for the simulation of electrical power systems? (I installed > the package SuiteSparse) > Why would you do that? It already works with the former code. In fact, you should really just use KSPCreate(comm, &ksp) KSPSetOperator(ksp, A, A); KSPSetFromOptions(ksp); KSPSolve(ksp, b, x); and then give the options -ksp_type preonly -pc_type lu -pc_mat_factor_package suitesparse This is no advantage to using the Factor language since subsequent calls to KSPSolve() will not refactor. Matt > Thank you, > Best regards, > Romain > -- 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
