Re: [petsc-dev] Proposed changes to TS API

2018-05-12 Thread Matthew Knepley
On Fri, May 11, 2018 at 7:05 PM, Jed Brown wrote: > "Smith, Barry F." writes: > > >Here is MY summary of the discussion so far. > > > > 1) the IFunction/IJacobian interface has its supporters. There is valid > argument that for certain cases it can be

Re: [petsc-dev] Proposed changes to TS API

2018-05-12 Thread Smith, Barry F.
> On May 12, 2018, at 1:17 PM, Jed Brown wrote: > > "Smith, Barry F." writes: > >>> On May 11, 2018, at 6:05 PM, Jed Brown wrote: >>> >>> "Smith, Barry F." writes: >>> Here is MY summary of the discussion

Re: [petsc-dev] Proposed changes to TS API

2018-05-12 Thread Jed Brown
"Smith, Barry F." writes: >> On May 11, 2018, at 6:05 PM, Jed Brown wrote: >> >> "Smith, Barry F." writes: >> >>> Here is MY summary of the discussion so far. >>> >>> 1) the IFunction/IJacobian interface has its supporters. There

Re: [petsc-dev] Proposed changes to TS API

2018-05-11 Thread Smith, Barry F.
> On May 11, 2018, at 6:05 PM, Jed Brown wrote: > > "Smith, Barry F." writes: > >> Here is MY summary of the discussion so far. >> >> 1) the IFunction/IJacobian interface has its supporters. There is valid >> argument that for certain cases it can

Re: [petsc-dev] Proposed changes to TS API

2018-05-11 Thread Jed Brown
"Smith, Barry F." writes: >> On May 11, 2018, at 6:05 PM, Jed Brown wrote: >> >> "Smith, Barry F." writes: >> >>> Here is MY summary of the discussion so far. >>> >>> 1) the IFunction/IJacobian interface has its supporters. There

Re: [petsc-dev] Proposed changes to TS API

2018-05-11 Thread Smith, Barry F.
> On May 11, 2018, at 6:05 PM, Jed Brown wrote: > > "Smith, Barry F." writes: > >> Here is MY summary of the discussion so far. >> >> 1) the IFunction/IJacobian interface has its supporters. There is valid >> argument that for certain cases it can

Re: [petsc-dev] Proposed changes to TS API

2018-05-11 Thread Jed Brown
"Smith, Barry F." writes: >Here is MY summary of the discussion so far. > > 1) the IFunction/IJacobian interface has its supporters. There is valid > argument that for certain cases it can be more efficient than the proposed > alternative; but this seems largely a

Re: [petsc-dev] Proposed changes to TS API

2018-05-11 Thread Jed Brown
"Smith, Barry F." writes: >> On May 11, 2018, at 3:36 PM, Jed Brown wrote: >> >> "Zhang, Hong" writes: >> >>> We are not forcing users to do two matrix assemblies per time >>> step. For most cases, there is even no need to update

Re: [petsc-dev] Proposed changes to TS API

2018-05-11 Thread Smith, Barry F.
Here is MY summary of the discussion so far. 1) the IFunction/IJacobian interface has its supporters. There is valid argument that for certain cases it can be more efficient than the proposed alternative; but this seems largely a theoretical believe at this time since there are no

Re: [petsc-dev] Proposed changes to TS API

2018-05-11 Thread Smith, Barry F.
> On May 11, 2018, at 5:26 PM, Jed Brown wrote: > > "Smith, Barry F." writes: > >>> On May 11, 2018, at 5:09 PM, Jed Brown wrote: >>> >>> "Smith, Barry F." writes: >>> >> The current IJacobian is

Re: [petsc-dev] Proposed changes to TS API

2018-05-11 Thread Jed Brown
"Smith, Barry F." writes: >> On May 11, 2018, at 5:09 PM, Jed Brown wrote: >> >> "Smith, Barry F." writes: >> > The current IJacobian is essentially SNESJacobian. And the single-matrix > SNESJacobian interface is always

Re: [petsc-dev] Proposed changes to TS API

2018-05-11 Thread Smith, Barry F.
> On May 11, 2018, at 5:09 PM, Jed Brown wrote: > > "Smith, Barry F." writes: > The current IJacobian is essentially SNESJacobian. And the single-matrix SNESJacobian interface is always there. Power users could set up the SNESJacobian

Re: [petsc-dev] Proposed changes to TS API

2018-05-11 Thread Jed Brown
"Smith, Barry F." writes: >> > The current IJacobian is essentially SNESJacobian. And the single-matrix >> > SNESJacobian interface is always there. Power users could set up the >> > SNESJacobian directly if we pass a read-only shift parameter to them. So >> > we are by no

Re: [petsc-dev] Proposed changes to TS API

2018-05-11 Thread Smith, Barry F.
> On May 11, 2018, at 3:38 PM, Matthew Knepley wrote: > > On Fri, May 11, 2018 at 4:36 PM, Jed Brown wrote: > "Zhang, Hong" writes: > > > We are not forcing users to do two matrix assemblies per time > > step. For most cases, there is

Re: [petsc-dev] Proposed changes to TS API

2018-05-11 Thread Smith, Barry F.
> On May 11, 2018, at 3:36 PM, Jed Brown wrote: > > "Zhang, Hong" writes: > >> We are not forcing users to do two matrix assemblies per time >> step. For most cases, there is even no need to update dF/dUdot at >> all. For extreme cases that the

Re: [petsc-dev] Proposed changes to TS API

2018-05-11 Thread Matthew Knepley
On Fri, May 11, 2018 at 4:36 PM, Jed Brown wrote: > "Zhang, Hong" writes: > > > We are not forcing users to do two matrix assemblies per time > > step. For most cases, there is even no need to update dF/dUdot at > > all. For extreme cases that the

Re: [petsc-dev] Proposed changes to TS API

2018-05-11 Thread Jed Brown
"Zhang, Hong" writes: > We are not forcing users to do two matrix assemblies per time > step. For most cases, there is even no need to update dF/dUdot at > all. For extreme cases that the application requires frequent update > on dF/dUdot and assembly is expensive, one can

Re: [petsc-dev] Proposed changes to TS API

2018-05-11 Thread Emil Constantinescu
On 5/11/18 3:14 PM, Zhang, Hong wrote: On May 11, 2018, at 1:01 PM, Lisandro Dalcin > wrote: On Fri, 11 May 2018 at 19:34, Jed Brown > wrote: "Smith, Barry F."

Re: [petsc-dev] Proposed changes to TS API

2018-05-11 Thread Zhang, Hong
On May 11, 2018, at 1:01 PM, Lisandro Dalcin > wrote: On Fri, 11 May 2018 at 19:34, Jed Brown > wrote: "Smith, Barry F." > writes: I assemble the combined

Re: [petsc-dev] Proposed changes to TS API

2018-05-11 Thread Smith, Barry F.
> On May 11, 2018, at 1:01 PM, Lisandro Dalcin wrote: > > On Fri, 11 May 2018 at 19:34, Jed Brown wrote: > >> "Smith, Barry F." writes: > > > I assemble the combined system directly. How, two sets of calls to

Re: [petsc-dev] Proposed changes to TS API

2018-05-11 Thread Smith, Barry F.
> On May 11, 2018, at 12:58 PM, Stefano Zampini > wrote: > > >> On May 11, 2018, at 6:20 PM, Smith, Barry F. wrote: >> >> >> >>> On May 11, 2018, at 8:03 AM, Stefano Zampini >>> wrote: >>> >>> I don’t think

Re: [petsc-dev] Proposed changes to TS API

2018-05-11 Thread Stefano Zampini
> On May 11, 2018, at 6:20 PM, Smith, Barry F. wrote: > > > >> On May 11, 2018, at 8:03 AM, Stefano Zampini >> wrote: >> >> I don’t think changing the current TS API is best approach. >> >> Obtaining separate Jacobians is a need for adjoints

Re: [petsc-dev] Proposed changes to TS API

2018-05-11 Thread Jed Brown
"Smith, Barry F." writes: >> On May 11, 2018, at 10:17 AM, Smith, Barry F. wrote: >> >> >> >>> On May 11, 2018, at 7:05 AM, Matthew Knepley wrote: >>> >>> On Fri, May 11, 2018 at 12:25 AM, Smith, Barry F. >>>

Re: [petsc-dev] Proposed changes to TS API

2018-05-11 Thread Jed Brown
"Smith, Barry F." writes: >> On May 11, 2018, at 7:20 AM, Jed Brown wrote: >> >> "Smith, Barry F." writes: >> On May 10, 2018, at 4:12 PM, Jed Brown wrote: "Zhang, Hong" writes:

Re: [petsc-dev] Proposed changes to TS API

2018-05-11 Thread Smith, Barry F.
> On May 11, 2018, at 10:17 AM, Smith, Barry F. wrote: > > > >> On May 11, 2018, at 7:05 AM, Matthew Knepley wrote: >> >> On Fri, May 11, 2018 at 12:25 AM, Smith, Barry F. wrote: >> >> >>> On May 10, 2018, at 4:12 PM, Jed Brown

Re: [petsc-dev] Proposed changes to TS API

2018-05-11 Thread Lisandro Dalcin
On Fri, 11 May 2018 at 18:20, Smith, Barry F. wrote: > So you are proposing keeping TSSetIFunction and TSSetIJacobian and ADDING a new API TSSetComputeSplitJacobians() and it that is not provided calling TSComputeIJacobian() twice with different shifts (which is

Re: [petsc-dev] Proposed changes to TS API

2018-05-11 Thread Zhang, Hong
Before we go down the rabbit hole, let me reiterate the primary point: an unfriendly API breaks the deal in the first place. Perhaps we should reflect on why many other software use PETSc just as a nonlinear/linear solver and implement their own time stepper instead of using TS. FWIW I think

Re: [petsc-dev] Proposed changes to TS API

2018-05-11 Thread Smith, Barry F.
> On May 11, 2018, at 7:20 AM, Jed Brown wrote: > > "Smith, Barry F." writes: > >>> On May 10, 2018, at 4:12 PM, Jed Brown wrote: >>> >>> "Zhang, Hong" writes: >>> Dear PETSc folks, Current TS

Re: [petsc-dev] Proposed changes to TS API

2018-05-11 Thread Smith, Barry F.
> On May 11, 2018, at 8:03 AM, Stefano Zampini > wrote: > > I don’t think changing the current TS API is best approach. > > Obtaining separate Jacobians is a need for adjoints and tangent linear models > only. > This is how I implemented it in

Re: [petsc-dev] Proposed changes to TS API

2018-05-11 Thread Smith, Barry F.
> On May 11, 2018, at 7:05 AM, Matthew Knepley wrote: > > On Fri, May 11, 2018 at 12:25 AM, Smith, Barry F. wrote: > > > > On May 10, 2018, at 4:12 PM, Jed Brown wrote: > > > > "Zhang, Hong" writes: > > > >>

Re: [petsc-dev] Proposed changes to TS API

2018-05-11 Thread Stefano Zampini
I don’t think changing the current TS API is best approach. Obtaining separate Jacobians is a need for adjoints and tangent linear models only. This is how I implemented it in stefano_zampini/feature-continuousadjoint

Re: [petsc-dev] Proposed changes to TS API

2018-05-11 Thread Jed Brown
"Smith, Barry F." writes: >> On May 10, 2018, at 4:12 PM, Jed Brown wrote: >> >> "Zhang, Hong" writes: >> >>> Dear PETSc folks, >>> >>> Current TS APIs (IFunction/IJacobian+RHSFunction/RHSJacobian) were designed >>> for the fully

Re: [petsc-dev] Proposed changes to TS API

2018-05-11 Thread Matthew Knepley
On Fri, May 11, 2018 at 12:25 AM, Smith, Barry F. wrote: > > > > On May 10, 2018, at 4:12 PM, Jed Brown wrote: > > > > "Zhang, Hong" writes: > > > >> Dear PETSc folks, > >> > >> Current TS APIs

Re: [petsc-dev] Proposed changes to TS API

2018-05-10 Thread Smith, Barry F.
> On May 10, 2018, at 4:12 PM, Jed Brown wrote: > > "Zhang, Hong" writes: > >> Dear PETSc folks, >> >> Current TS APIs (IFunction/IJacobian+RHSFunction/RHSJacobian) were designed >> for the fully implicit formulation F(t,U,Udot) = G(t,U). >> Shampine's

Re: [petsc-dev] Proposed changes to TS API

2018-05-10 Thread Matthew Knepley
On Thu, May 10, 2018 at 5:12 PM, Jed Brown wrote: > "Zhang, Hong" writes: > > > Dear PETSc folks, > > > > Current TS APIs (IFunction/IJacobian+RHSFunction/RHSJacobian) were > designed for the fully implicit formulation F(t,U,Udot) = G(t,U). > > Shampine's

Re: [petsc-dev] Proposed changes to TS API

2018-05-10 Thread Zhang, Hong
On May 10, 2018, at 4:12 PM, Jed Brown > wrote: "Zhang, Hong" > writes: Dear PETSc folks, Current TS APIs (IFunction/IJacobian+RHSFunction/RHSJacobian) were designed for the fully implicit formulation

Re: [petsc-dev] Proposed changes to TS API

2018-05-10 Thread Jed Brown
"Zhang, Hong" writes: > Dear PETSc folks, > > Current TS APIs (IFunction/IJacobian+RHSFunction/RHSJacobian) were designed > for the fully implicit formulation F(t,U,Udot) = G(t,U). > Shampine's paper >

[petsc-dev] Proposed changes to TS API

2018-05-10 Thread Zhang, Hong
Dear PETSc folks, Current TS APIs (IFunction/IJacobian+RHSFunction/RHSJacobian) were designed for the fully implicit formulation F(t,U,Udot) = G(t,U). Shampine's paper