[petsc-users] how to reuse Mumps factorization

袁煕 yuanxi at advancesoft.jp
Wed Oct 19 19:50:46 CDT 2022


Got it.

Thanks for your detailed explanation.

YUAN

2022年10月19日(水) 23:58 Barry Smith <bsmith at petsc.dev>:

>
>    Every time a matrix entry gets changes PETSc tracks these changes so
> for the next KSP by default solve it repeats the numerical factorization if
> the matrix has changed. Otherwise it reuses the still current
> factorization.
>
>    If you are calling KSP directly, you can call
> KSPSetReusePreconditioner() to prevent KSP from automatically performing a
> new factorization, so it will use the out-of-date preconditioner but if you
> use a KSPType of, for example, KSPGMRES, it will still solve the linear
> system correctly just taking some iterations. Reusing the preconditioner
> can be faster if the matrix does not change too much since a numerical
> factorization takes a lot of time
>
>    If you use SNES you can control "lagging" the preconditioner
> with SNESSetLagPreconditioner()
>
>   Barry
>
>
> On Oct 19, 2022, at 9:15 AM, Matthew Knepley <knepley at gmail.com> wrote:
>
> On Wed, Oct 19, 2022 at 9:13 AM 袁煕 <yuanxi at advancesoft.jp> wrote:
>
>> Hello,
>>
>> I am using Mumps to solve a problem with multiple time steps. The matrix
>> structure does not change  but its value may or may not change  during
>> those steps. That means I should reuse the symbolic factorization but
>> recall numeric factorization when needed.
>>
>> I have found the following anwser of a similar question
>> https://lists.mcs.anl.gov/pipermail/petsc-users/2020-August/041846.html
>>
>> which says "it automatically uses the same factorization", but I don't
>> know if it includes numerical factorization also.
>>
>> My question is :
>> 1. Does numeric factorization do automatically? If not
>>
>
> Yes.
>
>   Thanks,
>
>      Matt
>
>
>> 2. Could I control when numeric factorization should be done and how to
>> do it?
>>
>> Much thanks
>>
>> YUAN
>>
>
>
> --
> 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
>
> https://www.cse.buffalo.edu/~knepley/
> <http://www.cse.buffalo.edu/~knepley/>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20221020/3ee83a08/attachment.html>


More information about the petsc-users mailing list