Are you calling TSSolve() or TSStep()? What version of PETSc? On Sat, Feb 11, 2012 at 07:27, Konstantinos Kontzialis < [email protected]> wrote:
Dear all,
I use the TSSetPostStep function to apply a function at the end of each time step. I code the following:
ierr = TSCreate(sys.comm, &sys.ts); CHKERRQ(ierr);
ierr = TSSetApplicationContext(sys.**ts, &sys); CHKERRQ(ierr);
ierr = TSSetProblemType(sys.ts, TS_NONLINEAR); CHKERRQ(ierr);
ierr = TSSetSolution(sys.ts, sys.gsv); CHKERRQ(ierr);
ierr = TSSetPostStep(sys.ts, limiter_implicit); CHKERRQ(ierr);
ierr = TSSetIFunction(sys.ts, sys.gres0, base_residual_implicit, &sys); CHKERRQ(ierr);
ierr = TSGetSNES(sys.ts, &sys.snes); CHKERRQ(ierr);
ierr = MatCreateSNESMF(sys.snes, &sys.J); CHKERRQ(ierr);
and in the function :
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?
Kostas