[petsc-users] projection methods in TS

Gideon Simpson gideon.simpson at gmail.com
Fri Feb 3 19:14:59 CST 2017


I’m interested in implementing a projection method for an ODE of the form:

y’ = f(y),

such that g(y) = 0 for all time (i.e., g is conserved).  Note that in a projection method, a standard time step is made to produce y* from y_{n}, and then this is corrected to obtain y_{n+1} satisfying g(y) = 0.

There were two ways I was thinking of doing this, and I was hoping to get some input:

Idea 1: Manually loop through using taking a time step and then implementing the projection routine.  I see that there is a TSStep command, but this doesn’t  seem to be much documentation on how to use it in this scenario.  Does anyone have any guidance?

Idea 2: Is there some analog to TSMonitor that allows me to modify the solution after each time step, instead of just allowing for some computation of a statistic?




More information about the petsc-users mailing list