[petsc-users] `snes+ksponly` did not update the solution when ksp failed.

Matthew Knepley knepley at gmail.com
Mon Mar 20 07:00:47 CDT 2023


On Mon, Mar 20, 2023 at 2:41 AM Zongze Yang <yangzongze at gmail.com> wrote:

> Hi,
>
> Hope this email finds you well. I am using firedrake to solve linear
> problems, which use SNES with KSPONLY.
>
> I found that the solution did not update when the `ksp` failed with DIVERGED_ITS.
> The macro `SNESCheckKSPSolve` called in `SNESSolve_KSPONLY` make it
> return before the solution is updated.
>

Yes, this is the intended behavior. We do not guarantee cleanup on errors.


> Is this behavior as expected? Can I just increase the value of `maxLinearSolveFailures`
> to make the solution updated without introducing other side effects?
>

Yes, that is right. It will not have other side effects with this SNES type.

  Thanks,

     Matt


> Best wishes,
> Zongze
>


-- 
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/20230320/2d376bd2/attachment.html>


More information about the petsc-users mailing list