[petsc-users] Requesting help with SNES non-linear example

Jose E. Roman jroman at dsic.upv.es
Sat Oct 26 02:12:25 CDT 2024


The examples in those old slides might be outdated. Try with the examples that come with the PETSc repo or tarball. In particular, that example can be found in src/binding/petsc4py/demo/legacy/bratu2d/bratu2d.py.

Jose

> El 25 oct 2024, a las 19:58, Vaishak Prasad <vaishakprasad at gmail.com> escribió:
> 
> Dear All,
> Greetings from India.
> 
> I am new to petsc4py. I was trying out the example on slides 18, and 19 at
> 
> https://urldefense.us/v3/__https://www.bu.edu/pasi/files/2011/01/Lisandro-Dalcin-petsc4py.pdf__;!!G_uCfscf7eWS!dpUYbX5YRxvaN33h0mhRCxEMkia_yIdGU6sQOpV0upkfReAJkPC8H6GX4HH6NNvgOCt1F2Ogn2963Ff_Vkub5yK7$ 
> 
> However, I get a zero vector for the solution `x`.
> 
> I am using petsc4py 3.21.3 on Linux.
> 
> Any help would be appreciated.
> 
> With regards
> 
> -- 
> Vaishak Prasad
> Post Doctoral Fellow
> Astrophysical Relativity Group
> International Center for Theoretical Sciences
> Tata Institute of Fundamental Research
> Survey No. 151, Shivakote, Hesaraghatta Hobli,
> Bengaluru, Karnataka, India, 
> Earth, Solar system, 
> Milky Way Galaxy, The Local Group



More information about the petsc-users mailing list