#include "slepcmfn.h" PetscErrorCode MFNMonitorRegister(const char name[],PetscViewerType vtype,PetscViewerFormat format,PetscErrorCode (*monitor)(MFN,PetscInt,PetscReal,PetscViewerAndFormat*),PetscErrorCode (*create)(PetscViewer,PetscViewerFormat,void*,PetscViewerAndFormat**),PetscErrorCode (*destroy)(PetscViewerAndFormat**))Not Collective
name | - name of a new monitor routine | |
vtype | - a PetscViewerType for the output | |
format | - a PetscViewerFormat for the output | |
monitor | - monitor routine | |
create | - creation routine, or NULL | |
destroy | - destruction routine, or NULL |
MFNMonitorRegister("my_monitor",PETSCVIEWERASCII,PETSC_VIEWER_ASCII_INFO_DETAIL,MyMonitor,NULL,NULL);
Then, your monitor can be chosen with the procedural interface via
MFNMonitorSetFromOptions(mfn,"-mfn_monitor_my_monitor","my_monitor",NULL)or at runtime via the option
-mfn_monitor_my_monitor