[petsc-users] How to set L1 norm as the converge test?

Matthew Knepley knepley at gmail.com
Wed Sep 24 14:35:01 CDT 2014


On Wed, Sep 24, 2014 at 2:31 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:

>
>   Brian,
>
>     Your convergence test routine could call KSPBuildResidual() and then
> compute the 1-norm of the residual and make any decision it likes based on
> that norm.  See KSPSetConvergenceTest()


Note that what Barry is saying is that the convergence theory for CG
guarantees monotonicity in the energy (A) norm, but says nothing
about L1 so you might get crap.

  Matt


>
>    Barry
>
> On Sep 24, 2014, at 2:24 PM, Brian Yang <brianyang1106 at gmail.com> wrote:
>
> > Thanks Mat and Barry,
> >
> > Yes I want to use the L1 norm in the convergence test. For the ||Ax-b||,
> I always want to calculate L1 norm instead of L2. Is Mat's way gonna work
> on this?
> >
> > On Wed, Sep 24, 2014 at 2:17 PM, Barry Smith <bsmith at mcs.anl.gov> wrote:
> >
> >   Brian,
> >
> >    Do you wish to monitor the convergence of the L1 norm, or do you wish
> to use the L1 norm in the convergence test?   Regardless you cannot change
> the LSQR or CG to be a different algorithm (with different convergence
> properties) with the L1 norm.
> >
> >
> >   Barry
> >
> > On Sep 24, 2014, at 2:08 PM, Brian Yang <brianyang1106 at gmail.com> wrote:
> >
> > > Hi all,
> > >
> > > For example, I am using LSQR or CG to solve Ax=b.
> > >
> > > When we turn on the monitor option of solving the linear system, we
> could see iteration number and residual for each iteration. I believe it's
> L2 norm of the objective function?
> > >
> > > If yes, is there a way that I could set it to L1 norm for solving the
> system?
> > >
> > > Thanks.
> > >
> > > --
> > > Brian Yang
> > > U of Houston
> > >
> > >
> > >
> >
> >
> >
> >
> > --
> > Brian Yang
> > U of Houston
> >
> >
> >
>
>


-- 
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-users/attachments/20140924/8bcdbd8e/attachment.html>


More information about the petsc-users mailing list