[petsc-dev] How to do LU factorization using SuperLU_dist and reuse the factorization?

Barry Smith bsmith at mcs.anl.gov
Fri Nov 7 07:34:29 CST 2014


> On Nov 7, 2014, at 6:34 AM, Lulu Liu <lulu.liu at kaust.edu.sa> wrote:
> 
>  I have to solve linear problems like Ax=b many times, and all of linear problems have the same A but b is different.
> 
> My goal is to do A=LU using SuperLU_DIST,and then reuse this LU factorization to solve Ly=b, Ux=y.
> 
> How to do it ? How to implement it more efficiently?

  Just use KSPSolve() with -pc_type lu -pc_factor_mat_solver_package superlu_dist -ksp_type preonly 

  KSP is smart enough to reuse the factors automatically. There is no more efficient way.

  Barry


> 
> Thanks!
>  
> 
> This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email.




More information about the petsc-dev mailing list