[petsc-users] TSSetPostStep
Jed Brown
jedbrown at mcs.anl.gov
Sat Feb 11 07:42:35 CST 2012
Are you calling TSSolve() or TSStep()? What version of PETSc?
On Sat, Feb 11, 2012 at 07:27, Konstantinos Kontzialis <
ckontzialis at lycos.com> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20120211/1799d435/attachment.htm>
More information about the petsc-users
mailing list