[petsc-users] How to set L1 norm as the converge test?
Brian Yang
brianyang1106 at gmail.com
Wed Sep 24 18:08:58 CDT 2014
For LSQR,
http://www.mcs.anl.gov/petsc/petsc-current/src/ksp/ksp/impls/lsqr/lsqr.c.html#KSPLSQR
I checked the lsqr.c implementation, within routine KSPSolve_LSQR, I saw
few places using VecNorm and before KSP_Monitor to output the rnorm, there
were many intermediate updates for the iteration.
I am just wondering whether I could replace NORM2 to NORM1 and remove
related square (or square root) operations to achieve my goal?
Thanks.
On Wed, Sep 24, 2014 at 3:48 PM, Brian Yang <brianyang1106 at gmail.com> wrote:
> Thanks everyone, I will try KSPSetConvergenceTest to test.
>
> On Wed, Sep 24, 2014 at 2:54 PM, Jed Brown <jed at jedbrown.org> wrote:
>
>> Matthew Knepley <knepley at gmail.com> writes:
>>
>> > 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.
>>
>> Moreover, if you have an overdetermined linear system, but want to
>> minimize the 1-norm of the residual (instead of the 2-norm that least
>> squares minimizes), you are actually asking to solve a "linear program"
>> and need to use an LP solver (a very different algorithm).
>>
>> If you merely watch the 1-norm of the residual, it might increase as the
>> least squares solver converges.
>>
>
>
>
> --
> Brian Yang
> U of Houston
>
>
>
>
--
Brian Yang
U of Houston
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140924/8aa97a81/attachment.html>
More information about the petsc-users
mailing list