Hi!

I use TS object to solve a non-linear problem du/dt=f(u,t). I would like to 
check the non-linear solver performance in TSStep. I tried to output the 
residuals by setting a monitor. So far my attempt didn't work. Please let me 
know if there are functions that calculate residuals of iterations in each TS 
time step. If not, how can I output the solver iteration/residuals correctly 
while using TS objects. 

Many thanks!

P.S. The following are the code I tried:

    PetscViewerASCIIOpen(PETSC_COMM_WORLD,"snes.log",&rviewer); 
    ierr = TSGetSNES(ts,&ts_snes);
    ierr = SNESMonitorSet(ts_snes,SNESMonitorDefault,&rviewer,PETSC_NULL);

I did get residual output in snes.log, but the format was very weird. Each line 
started with countless blank/space and at the very end was the SNES iteration 
info.  As a result, the file took a lot of memory space even with one line of 
outputs.

I also tried:
    PetscViewerASCIIMonitorCreate(PETSC_COMM_WORLD,"snes.log",0,&rviewer);
    ierr = TSGetSNES(ts,&ts_snes);
    ierr = SNESMonitorSet(ts_snes,SNESMonitorDefault,&rviewer,PETSC_NULL);
which didn't work at all.
_________________________________________________________________
?????MSN??????????
http://im.live.cn/click/


Reply via email to