Barry Smith <[email protected]> writes: >> On Oct 17, 2017, at 7:43 AM, Stefano Zampini <[email protected]> >> wrote: >> >> >> >> >> What happens if you call TSCreateAdjointsTS() on a TS obtained with >> TSCreateAdjointsTS()? Is the resulting TS useful? >> >> >> I don't think so. > > Hmm, this is rather bothersome. So the new TS that comes out is not > really a full-featured TS (using your new extended TS object that > knows about adjoints)?
Is it useful to precondition Newton with Newton preconditioned with Newton? > It is like a subclass of TS that can only do timestepping? This > goes back to my concern that TS shouldn't be overloaded with all > the adjoint sensitivity stuff, there should be a higher level > PetscSensi object that does sensitivities and it contains multiple > TS for the ODE/DAE integrator and one for "reverse" mode. Let's not mix together Stefano's TSComputeObjectiveAndGradient (which could easily go into a helper PetscSensi) with the control flow needed to create/integrate an adjoint system. In my opinion, it must be possible to have a comparable/same interface to create a discrete adjoint (which depends on the forward implementation) as to create a continuous adjoint (with customizable space and time discretization). I think we should postpone discussion of higher level convenience functions like TSComputeObjectiveAndGradient or some new organization thereof until we agree about the basic representation of adjoints. My preference is for TSCreateAdjointTS() which the user can customize to use arbitrary time integration methods (thus becoming a "continuous-in-time" adjoint) and to use different spatial discretizations (for consistency with the adjoint PDE).
