> > I use ts_type arkimex, and I want at the end of every RK stage to apply a > limiter function. How can I set TS so that to apply the function at the end > of a RK stage?
Jed added the new TSAdapt code (in petsc-dev), I would suggest looking at TS*SetAdapt. Here is the one for TSAlpha: http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/TS/TSAlphaSetAdapt.html If you looks in $PETSC_DIR/src/ts/examples/tutorials, ex17.c and ex18.c both fiddle with this. In theory, I believe it would be possible to add a custom arkimex adapter that would do this limiter (as a hack). Before Matt or anyone else offers (and *depending on your problem!*) you could try to write this as a constrained inequality and use some of the new SNESVI capabilities: http://www.mcs.anl.gov/petsc/petsc-dev/docs/manualpages/SNES/SNESVISetVariableBounds.html -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111216/314e6ed9/attachment.htm>
