[petsc-users] Adaptive controllers in TS

Jed Brown jed at jedbrown.org
Sun Oct 19 13:41:14 CDT 2014


Miguel Angel Salazar de Troya <salazardetroya at gmail.com> writes:

> Hi all
>
> I'm trying to find out what is the adaptive controller scheme used in the
> Runge-Kutta time stepping algorithm. Basically I want to know the function
> that determines the next time step. I see that the next time step is set
> with the function TSAdaptChoose(), which calls the pointer function
> (*choose)() within the structure _TSAdaptOps, but where is this set?

via TSAdaptSetType.  The default will be TSAdaptChoose_Basic
(adaptbasic.c).  You can find this information easily by running in a
debugger.

> I need to know this for an adjoint analysis to calculate gradients. I was
> wondering if there is an example of such analysis with the TS structure.
> I've seen that the RK source file includes a funciton to interpolate the
> solution, something that is necessary in an adjoint analysis, hence my
> question about the example.

Interpolation arises for "continuous" adjoints.  Be aware that if you
want consistent gradients, you'll want a discrete adjoint, which
integrates backward in time using the adjoint RK method.  The stages of
the adjoint RK method coincide with the forward method, so no
interpolation is needed.

Hong (Cc'd) is developing an example that can integrate discrete adjoint
equations and we intend to eventually incorporate that functionality
into the library.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20141019/7acbb81b/attachment.pgp>


More information about the petsc-users mailing list