[petsc-dev] -ksp_monitor and different norms

Matthew Knepley knepley at gmail.com
Tue Oct 30 15:35:03 CDT 2012


On Tue, Oct 30, 2012 at 4:33 PM, Mark F. Adams <mark.adams at columbia.edu>wrote:

>
> On Oct 25, 2012, at 2:03 PM, Jed Brown <jedbrown at mcs.anl.gov> wrote:
>
> On Thu, Oct 25, 2012 at 12:52 PM, Mark F. Adams <mark.adams at columbia.edu>wrote:
>
>> How should I go about getting -ksp_monitor to report the infinity norm?
>>
>
> Preconditioned or unpreconditioned residual?
>
> You would use KSPMonitorSet(). This may be handy enough that PETSc should
> have -ksp_monitor_max.
>
>
> OK, I'm going to start putting in -ksp_monitor_max, speak now or forever
> hold your peace.
>
> You can see the setup code in KSPSetFromOptions(). You could copy
> KSPMonitorTrueResidualNorm() or refactor so that both call a common helper
> that takes an additional argument (the norm type). Or put the norm type in
> the context data structure, I guess that's what it's there for, but then
> you need a destructor.
>
> We are getting enough of these that they might make more sense as flags.
Right now, true_residual prints
the true and preconditioned residual. I think it would be nicer to print
all the different norms I want on one line.

   Matt

-- 
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20121030/a07e5687/attachment.html>


More information about the petsc-dev mailing list