Re: [petsc-users] Set PC PythonContext within NPC

2015-07-01 Thread Asbjørn Nilsen Riseth
Thanks Lawrence, fixed my issue by calling snes.setUp(), so I can access the linear PC from my NPC. This requires pull request 339: https://bitbucket.org/petsc/petsc/pull-request/339/make-sure-vec_sol-is-not-null-before At some point I'll learn to use app contexts in my python shells. For now,

Re: [petsc-users] Set PC PythonContext within NPC

2015-06-25 Thread Lawrence Mitchell
On 24 Jun 2015, at 17:02, Asbjørn Nilsen Riseth ris...@maths.ox.ac.uk wrote: Hi all, I'm currently trying to set up a nonlinear solver that uses NGMRES with NEWTONLS as a right preconditioner. The NEWTONLS has a custom linear preconditioner. Everything is accessed through petsc4py.

[petsc-users] Set PC PythonContext within NPC

2015-06-24 Thread Asbjørn Nilsen Riseth
Hi all, I'm currently trying to set up a nonlinear solver that uses NGMRES with NEWTONLS as a right preconditioner. The NEWTONLS has a custom linear preconditioner. Everything is accessed through petsc4py. *Is there a way I can configure a NPC NEWTONLS KSP CompositePC without first calling solve