<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On 21 August 2016 at 13:01, Francesco Caimmi <span dir="ltr"><<a href="mailto:francesco.caimmi@polimi.it" target="_blank">francesco.caimmi@polimi.it</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":oz" class="a3s aXjCH m156ac8c5d97bcb7d">I will also take the chance to ask a related question: in the original C code,<br>
lines 213 -214 read<br>
ierr = TSGetSNES(ts,&snes);CHKERRQ(<wbr>ierr);<br>
ierr=SNESSetJacobian(snes,<wbr>NULL,NULL,<wbr>SNESComputeJacobianDefault,<wbr>NULL);CHKERRQ(ierr);<br>
<br>
How do I translate the last line in Python? I was not able to find the<br>
equivalent of SNESComputeJacobianDefault.<br></div></blockquote></div><br>That one is not directly available, however you can pass -snes_fd in the command line, or alternatively</div><div class="gmail_extra"><br></div><div class="gmail_extra">opts = PETSc.Options()</div><div class="gmail_extra">opts['snes_fd'] = 1</div><div class="gmail_extra">snes.setFromOptions()<br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Lisandro Dalcin<br>============<br>Research Scientist<br>Computer, Electrical and Mathematical Sciences & Engineering (CEMSE)<br>Extreme Computing Research Center (ECRC)<br>King Abdullah University of Science and Technology (KAUST)<br><a href="http://ecrc.kaust.edu.sa/" target="_blank">http://ecrc.kaust.edu.sa/</a><br><br>4700 King Abdullah University of Science and Technology<br>al-Khawarizmi Bldg (Bldg 1), Office # 0109<br>Thuwal 23955-6900, Kingdom of Saudi Arabia<br><a href="http://www.kaust.edu.sa" target="_blank">http://www.kaust.edu.sa</a><br><br>Office Phone: +966 12 808-0459</div>
</div></div>