I can certainly use SNESMonitorSet with a custom monitor that sets up a
binary viewer for SNESMonitorResidual, but I'm being lazy.
This is currently the way to go: should require 3 lines of code, create the binary
viewer, call SNESMonitorSet() and then destroy the viewer at the end. You
can make it one line of code by passing PETSC_BINARY_VIEWER_WORLD into the
the SNESMonitorSet() call.
It would be nice to have a very generally solution to this, so one could
easily direct to many different types of viewers from the options database.
Maybe a rework of VecView_Private() code being used in conjunction with the
various -xxx_monitor_residual/solution/update options, for KSP, SNES and TS.
Do I have time to write it? Heck no, I don't even have time to read my email :-)
Barry
On Mon, 10 Sep 2007, mspieg wrote:
Apologies if this is obvious, but is there a clean way to dump out SNES
residuals (and or updates) (inside a DMMG) as binary vectors for debugging.
I'm currently using
-snes_monitor_residual
which is lovely for visualizing the residuals but uses VecView with the
default Viewer set to draw and it would be useful to have a command line
option to change the viewer type to binary (if it doesn't already exist)
I can certainly use SNESMonitorSet with a custom monitor that sets up a
binary viewer for SNESMonitorResidual, but I'm being lazy.
Any and all help greatly appreciated.
cheers
marc
----------------------------------------------------
Marc Spiegelman
Lamont-Doherty Earth Observatory
Dept. of Applied Physics/Applied Math
Columbia University
----------------------------------------------------