Thanks Barry and Jed.

> On 18-May-2018, at 10:35 PM, Smith, Barry F. <[email protected]> wrote:
> 
>   This is wrong. If you have a ApplyPC you need to attach it to the PC not 
> the mat. So you would have 
> 
>       SNESGetPC(snes,&pc);
>       PCSetType(pc,PCSHELL);
>       PCShellSetAppy(pc,ApplyPC)


I am now setting up with PCSHELL, but face a doubt on Mat objects.

So in my case (-snes_mf and PCSHELL), I dont have any jacobian and precond 
matrix. In fortran should I do something like this

call TSSetRHSJacobian(ts, PETSC_NULL_MAT, PETSC_NULL_MAT, RHSJacobian, ctx, 
ierr)

But this gives segmentation violation when TSSetRHSJacobian is called.

Thanks
praveen

Reply via email to