[petsc-users] Modifying the solution vector at each TS and/or SNES step

Mark W. Lohry mlohry at princeton.edu
Tue Jan 17 13:32:27 CST 2017


I have an algorithm where I'd like to slightly modify the solution vector at certain stages (specifically applying a filtering operation), for example at the conclusion of each TS or SNES step.

When TSMonitor is called, the solution vector is locked read-only. I'd also be concerned about modifying it there -- any kind of computation of the time derivative should be done with my altered solution vector, and similar for SNES although it's probably less critical there.

Are there any hooks available to let me modify a solution vector at particular points like that?

Thanks,
Mark Lohry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20170117/47e1661b/attachment.html>


More information about the petsc-users mailing list