Are you calling TSSolve() or TSStep()? What version of PETSc?<br><br><div class="gmail_quote">On Sat, Feb 11, 2012 at 07:27, Konstantinos Kontzialis <span dir="ltr"><<a href="mailto:ckontzialis@lycos.com">ckontzialis@lycos.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear all,<br>
<br>
I use the TSSetPostStep function to apply a function at the end of each time step.<br>
I code the following:<br>
<br>
ierr = TSCreate(sys.comm, &sys.ts);<br>
CHKERRQ(ierr);<br>
<br>
ierr = TSSetApplicationContext(sys.<u></u>ts, &sys);<br>
CHKERRQ(ierr);<br>
<br>
ierr = TSSetProblemType(sys.ts, TS_NONLINEAR);<br>
CHKERRQ(ierr);<br>
<br>
ierr = TSSetSolution(sys.ts, sys.gsv);<br>
CHKERRQ(ierr);<br>
<br>
ierr = TSSetPostStep(sys.ts, limiter_implicit);<br>
CHKERRQ(ierr);<br>
<br>
ierr = TSSetIFunction(sys.ts, sys.gres0, base_residual_implicit, &sys);<br>
CHKERRQ(ierr);<br>
<br>
ierr = TSGetSNES(sys.ts, &sys.snes);<br>
CHKERRQ(ierr);<br>
<br>
ierr = MatCreateSNESMF(sys.snes, &sys.J);<br>
CHKERRQ(ierr);<br>
<br>
and in the function :<br>
<br>
limiter_implicit set in TSSetPostStep I just put the command: puts("out\n"). But nothing prints on the the output at the end of each step. Any suggestions?<br>
<br>
Kostas<br>
</blockquote></div><br>