[petsc-users] When is the TSMonitor called?

2014-10-08 Thread Miguel Angel Salazar de Troya
Hi all

I want to save a certain quantity at the very beginning of each time step,
before any TSFunction of any kind is called. Can I do this within the
TSMonitor? It would also be ok to save that quantity at the very end of the
time step.

Thanks
Miguel

-- 
*Miguel Angel Salazar de Troya*
Graduate Research Assistant
Department of Mechanical Science and Engineering
University of Illinois at Urbana-Champaign
(217) 550-2360
salaz...@illinois.edu


Re: [petsc-users] When is the TSMonitor called?

2014-10-08 Thread Jed Brown
Miguel Angel Salazar de Troya salazardetr...@gmail.com writes:

 Hi all

 I want to save a certain quantity at the very beginning of each time step,
 before any TSFunction of any kind is called. Can I do this within the
 TSMonitor? It would also be ok to save that quantity at the very end of the
 time step.

This is the main time loop in TSSolve()

while (!ts-reason) {
  ierr = TSMonitor(ts,ts-steps,ts-ptime,ts-vec_sol);CHKERRQ(ierr);
  ierr = TSStep(ts);CHKERRQ(ierr);
  ierr = TSPostStep(ts);CHKERRQ(ierr);
}


pgpARWjQKQBmp.pgp
Description: PGP signature