[petsc-users] [petsc4py] a problem with computeRHSFunctionLinear interface?

Lisandro Dalcin dalcinl at gmail.com
Sun Aug 21 12:11:00 CDT 2016


On 21 August 2016 at 13:01, Francesco Caimmi <francesco.caimmi at polimi.it>
wrote:

> I will also take the chance to ask a related question: in the original C
> code,
> lines 213 -214 read
>     ierr = TSGetSNES(ts,&snes);CHKERRQ(ierr);
>     ierr=SNESSetJacobian(snes,NULL,NULL,SNESComputeJacobianDefault,
> NULL);CHKERRQ(ierr);
>
> How do I translate the last line in Python? I was not able to find the
> equivalent of SNESComputeJacobianDefault.
>

That one is not directly available, however you can pass -snes_fd in the
command line, or alternatively

opts = PETSc.Options()
opts['snes_fd'] = 1
snes.setFromOptions()


-- 
Lisandro Dalcin
============
Research Scientist
Computer, Electrical and Mathematical Sciences & Engineering (CEMSE)
Extreme Computing Research Center (ECRC)
King Abdullah University of Science and Technology (KAUST)
http://ecrc.kaust.edu.sa/

4700 King Abdullah University of Science and Technology
al-Khawarizmi Bldg (Bldg 1), Office # 0109
Thuwal 23955-6900, Kingdom of Saudi Arabia
http://www.kaust.edu.sa

Office Phone: +966 12 808-0459
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20160821/2ddaabe1/attachment.html>


More information about the petsc-users mailing list