On Thu, Oct 20, 2011 at 10:29, Matthew Knepley <knepley at gmail.com> wrote:
> On Thu, Oct 20, 2011 at 3:15 PM, Klaij, Christiaan <C.Klaij at marin.nl>wrote: > >> Thanks for all the answers! >> >> First, I would like to see something printed to stdout, right now I don't. >> Assuming my KSPMonitorSet call is correct, could it be that I don't >> see anything because I'm using FGMRES? Should I get a warning >> when using this monitor with any other KSP beside CG and GMRES? >> > > If you just want to see the monitor, why not use the command line or > PetscOptionsSetValue()? > This is the code for setting up the monitor, you can call the part inside the if statement yourself if you like. ierr = PetscOptionsString("-ksp_monitor_singular_value","Monitor singular values","KSPMonitorSet","stdout",monfilename,PETSC_MAX_PATH_LEN,&flg);CHKERRQ(ierr); if (flg) { ierr = KSPSetComputeSingularValues(ksp,PETSC_TRUE);CHKERRQ(ierr); ierr = PetscViewerASCIIOpen(((PetscObject)ksp)->comm,monfilename,&monviewer);CHKERRQ(ierr); ierr = KSPMonitorSet(ksp,KSPMonitorSingularValue,monviewer,(PetscErrorCode (*)(void**))PetscViewerDestroy);CHKERRQ(ierr); } -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20111020/4ec6fb76/attachment.htm>