[petsc-users] Passing a context to TSPreStep()

Jed Brown jed at jedbrown.org
Sun May 24 18:07:40 CDT 2015


Miguel Angel Salazar de Troya <salazardetroya at gmail.com> writes:
> I would like to record the information about the failed steps in an
> adaptive time stepping algorithm. I have noticed that I could call
> TSPreStep() and get the current time step, but I want to store it in an
> external data structure. Now, for TSMonitor(), one of the arguments is a
> context that I can use to store some results. Is there a similar thing for
> TSPreStep() How could I implement it?

You could use TSSetApplicationContext and TSGetApplicationContext.  I
think it is purely historical that TSSetPreStep() does not include a
context -- perhaps it should be changed.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150524/ae04fa4b/attachment.pgp>


More information about the petsc-users mailing list