> On May 18, 2018, at 11:23 PM, Praveen C <[email protected]> wrote:
>
> 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.
Praveen,
Ahh, we didn't have support for passing PETSC_NULL_MAT from Fortran for this
routine. I have added it in the branch barry/fix-null-matrix-set-jacobian/maint
which after testing will go into the maint branch.
Could you please try this branch and let us know if it resolves the problem
(or a new problem pops up)?
Barry
Unfortunately handling null objects from Fortran requires us to manually
tweak the Fortran interface functions and sometimes we forget or don't realize
they need fixing until someone reports a problem.
>
> Thanks
> praveen