Re: [petsc-users] on SNESSetJacobian semantics

2015-10-22 Thread Barry Smith
> On Oct 22, 2015, at 9:20 AM, Marco Zocca wrote: > > The signature of SNESSetJacobian is > > PetscErrorCode SNESSetJacobian(SNES snes,Mat Amat,Mat Pmat,PetscErrorCode > (*J)(SNES,Vec,Mat,Mat,void*),void *ctx) > > however it would seem redundant to supply

Re: [petsc-users] on SNESSetJacobian semantics

2015-10-22 Thread Matthew Knepley
On Thu, Oct 22, 2015 at 9:20 AM, Marco Zocca wrote: > The signature of SNESSetJacobian is > > PetscErrorCode SNESSetJacobian(SNES snes,Mat Amat,Mat Pmat,PetscErrorCode > (*J)(SNES,Vec,Mat,Mat,void*),void *ctx) > > however it would seem redundant to supply both a constant

Re: [petsc-users] on SNESSetJacobian semantics

2015-10-22 Thread Matthew Knepley
On Thu, Oct 22, 2015 at 9:37 AM, Marco Zocca wrote: > Thank you, but this is not really helping; > > why are there two slots to supply the Jacobian of the same function, i.e. > Amat and J ? > Amat is just the storage, not the values. J computes the values. Matt >

Re: [petsc-users] on SNESSetJacobian semantics

2015-10-22 Thread Marco Zocca
Thank you, but this is not really helping; why are there two slots to supply the Jacobian of the same function, i.e. Amat and J ? On 22 October 2015 at 16:30, Matthew Knepley wrote: > On Thu, Oct 22, 2015 at 9:20 AM, Marco Zocca > wrote: > >> The

Re: [petsc-users] on SNESSetJacobian semantics

2015-10-22 Thread Jed Brown
Matthew Knepley writes: > On Thu, Oct 22, 2015 at 9:37 AM, Marco Zocca wrote: > >> Thank you, but this is not really helping; >> >> why are there two slots to supply the Jacobian of the same function, i.e. >> Amat and J ? >> > > Amat is just the