[petsc-users] Test convergence with non linear preconditioners
Adolfo Rodriguez
adantra at gmail.com
Wed Aug 5 20:10:48 CDT 2020
It looks like I cannot really change the test function or anything else for
this particular SNES solver (I am using SNESFas). Basically, I am trying
to use the ideas exposed in the paper on Composing scalable solvers but it
seems that SNESFas does not allow to change the function for testing
convergence, or anything else. Is this correct?
Adolfo
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon>
Virus-free.
www.avast.com
<https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link>
<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
On Wed, Aug 5, 2020 at 3:41 PM Barry Smith <bsmith at petsc.dev> wrote:
>
> Adolfo,
>
> You can also just change the tolerances for the inner solve using the
> options data base and the prefix for the inner solve.
>
> When you run with -snes_view it will show the prefix for each of the
> (nested) solvers. You can also run with -help to get all the possible
> options for the inner solvers.
>
> In this case I think the prefix is npc so you can set tolerances with
> -npc_snes_rtol <rtol> -npc_ksp_rtol <rtol> etc. From the program you can
> use SNESGetNPC() and then call SNESSetXXX() to set options, for the linear
> solver (if there is one) call SNESGetKSP() on the npc and then set options
> on that KSP.
>
>
> Barry
>
>
> On Aug 5, 2020, at 3:30 PM, Adolfo Rodriguez <adantra at gmail.com> wrote:
>
> Jed,
>
> I tred your suggestion
>
> SNESGetNPC(snes, &inner);
> SNESSetConvergenceTest(inner, YourFunc, ...);
>
> and it is working as expected. I had not pieced together the fact that
> "inner" is a "snes" object as well.
>
> Thanks!
>
>
>
>
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=icon> Virus-free.
> www.avast.com
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=link>
>
> On Wed, Aug 5, 2020 at 3:11 PM Jed Brown <jed at jedbrown.org> wrote:
>
>> Adolfo Rodriguez <adantra at gmail.com> writes:
>>
>> > Actually I can set the non-linear pc. My problem relates to the
>> convergence
>> > test. I have not found a way to set the tolerances for the inner
>> problem,
>> > are they hard coded?
>>
>> I suggested code to set a custom convergence test. Nothing is
>> hard-coded. What have you done?
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20200805/b205295f/attachment.html>
More information about the petsc-users
mailing list