[petsc-users] time stepping questions

Gideon Simpson gideon.simpson at gmail.com
Tue Mar 10 03:07:42 CDT 2015


I had two questions on time stepping routines:

1.  What’s the proper usage of TSMonitorSolutionBinary?  As near as I can tell from source, I need to call:

PetscViewerBinaryOpen(PETSC_COMM_WORLD, "sim.bin",FILE_MODE_WRITE, &viewer);

TSMonitorSet(ts, TSMonitorSolutionBinary, viewer,(PetscErrorCode (*)(void**))PetscViewerDestroy);

I’m guessing it’s necessary to include the PetscViewerDestroy command?  Also, is there a reason why I’m not passing a pointer to the viewer, but rather just the view itself?

2.  Is there a built in way to track the time steps that the TS solver takes?  Assuming it’s using adaptivity, this could be variable.  I imagine I could use a TSMonitor routine to print it to the screen, but is there some way to get it into a file?

-gideon



More information about the petsc-users mailing list