[petsc-users] Quasi newton SNES change variable
Matthew Knepley
knepley at gmail.com
Wed Feb 9 06:58:01 CST 2022
On Wed, Feb 9, 2022 at 7:24 AM Bruno Rammon Silva Souza via petsc-users <
petsc-users at mcs.anl.gov> wrote:
> Hello everyone,
>
> I am using the LBFGS type in the SNES solver, and it's working fine. But I
> want to change the number of stored updates in this method. This variable
> of quasi-newton methods is usually chosen by the runtime option: -snes_qn_m
> <m>. However, I would like to change this variable inside my code, when
> calling a function, for example, but I can't find any kind of PETSc
> function that changes this variable directly. Is there any function like
> this? If not, is there some way to do that without using -snes_qn_m <m> at
> runtime?
>
This is an oversight which we will fix. For now you can use
https://petsc.org/main/docs/manualpages/Sys/PetscOptionsSetValue.html
in your code.
Thanks,
Matt
> Best regards,
> --
> Bruno Souza
>
--
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/20220209/f83e4290/attachment.html>
More information about the petsc-users
mailing list