[petsc-users] How do I set PETSc LU reuse factorization
Barry Smith
bsmith at mcs.anl.gov
Wed Mar 25 19:38:09 CDT 2015
> On Mar 25, 2015, at 6:50 PM, Sun, Hui <hus003 at ucsd.edu> wrote:
>
> Hello,
>
> If I have a KSP, whose Mat will be reused for a good number of times, and if I choose to use LU factorization, how do I set the parameter so that the factorization can be reused every time?
By default if any of the matrix entries change then it will do a new LU factorization (if the matrix does not change it will continue to use the current factorization. If you want to reuse the factorization even after the matrix changes you call KSPSetReusePreconditioner() and it will use the same factorization until you call KSPSetReusePreconditioner() with PETSC_FALSE.
Barry
>
> Best,
> Hui
More information about the petsc-users
mailing list