On Tue, Jan 17, 2017 at 1:32 PM, Mark W. Lohry <[email protected]> wrote:
> 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. > This is called at the beginning: http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/SNES/SNESSetUpdate.html but I used to put my modifications for Newton here http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/SNES/SNESLineSearchSetPostCheck.html#SNESLineSearchSetPostCheck For TS, there is http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/TS/TSSetPostStep.html Matt > 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 > -- What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead. -- Norbert Wiener
