Re: [petsc-users] Question about TSSetRHSJacobian for linear time dependent problem

2019-01-27 Thread Sajid Ali via petsc-users
The form is u_t = A(t)u. On Sun, Jan 27, 2019 at 4:24 PM Smith, Barry F. wrote: > > > > On Jan 25, 2019, at 4:51 PM, Sajid Ali via petsc-users < > petsc-users@mcs.anl.gov> wrote: > > > > Hi, > > > > If I have a linear time dependent equation I'm trying to solve using TS, > I can use : > >

Re: [petsc-users] Question about TSSetRHSJacobian for linear time dependent problem

2019-01-27 Thread Smith, Barry F. via petsc-users
> On Jan 25, 2019, at 4:51 PM, Sajid Ali via petsc-users > wrote: > > Hi, > > If I have a linear time dependent equation I'm trying to solve using TS, I > can use : > TSSetProblemType(ts,TS_LINEAR); > TSSetRHSFunction(ts,NULL,TSComputeRHSFunctionLinear,NULL); >

Re: [petsc-users] Question about TSSetRHSJacobian for linear time dependent problem

2019-01-27 Thread Smith, Barry F. via petsc-users
> On Jan 27, 2019, at 4:26 PM, Sajid Ali > wrote: > > The form is u_t = A(t)u. Got it. You can call TSRHSJacobianSetReuse() after you create the TS object and then each time your compute jacobian is called it will be passed the same matrix as before. Then you can use