<div dir="ltr"><div dir="ltr">On Wed, Feb 9, 2022 at 7:24 AM Bruno Rammon Silva Souza via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello everyone,<br><br>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?<br></div></blockquote><div><br></div><div>This is an oversight which we will fix. For now you can use</div><div><br></div><div> <a href="https://petsc.org/main/docs/manualpages/Sys/PetscOptionsSetValue.html">https://petsc.org/main/docs/manualpages/Sys/PetscOptionsSetValue.html</a></div><div><br></div><div>in your code.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Best regards,<div>-- <br><div dir="ltr"><div dir="ltr"><div><table style="border-spacing:0px;border-collapse:collapse;line-height:1.4;font-family:Verdana,Geneva,sans-serif;font-size:11.7px;color:rgb(0,0,1)" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td><div style="font-stretch:normal;font-size:1.2em;line-height:normal;font-family:Verdana,Geneva,sans-serif">Bruno Souza</div></td></tr><tr><td style="padding:4px 0px"></td></tr></tbody></table></div></div></div></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>