On 21 August 2016 at 13:01, Francesco Caimmi <francesco.cai...@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