[petsc-users] Setting SNESVI

Amir mhbaghaei at mail.sjtu.edu.cn
Sun Aug 19 10:00:22 CDT 2018


Thanks for your guide.
By monitoring the solutions during SNES, until it was diverged, I noticed that only at, same, one point, located on boundary, and at, same, one field, repeatedly the solution went out of my specified constraint.

Amir
On Aug 19 2018, at 10:26 pm, Matthew Knepley <knepley at gmail.com> wrote:
>
> On Sun, Aug 19, 2018 at 10:19 AM Amir <mhbaghaei at mail.sjtu.edu.cn (mailto:mhbaghaei at mail.sjtu.edu.cn)> wrote:
> > This is what I get after I modify the constraints, and using lu:
> > 0 SNES Function norm 6.839975279451e+01
> > 0 SNES VI Function norm 68.3997 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 1
> > Line search: gnorm after quadratic fit 1.167382139621e+02
> > Line search: Cubic step no good, shrinking lambda, current gnorm 9.661035212791e+01 lambda=1.4620823686291085e-02
> > Line search: Cubic step no good, shrinking lambda, current gnorm 7.872462383177e+01 lambda=1.4620823686291085e-03
> > Line search: Cubic step no good, shrinking lambda, current gnorm 7.010735352812e+01 lambda=1.4620823686291087e-04
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.845164828370e+01 lambda=1.4620823686291088e-05
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.840024692820e+01 lambda=1.4620823686291089e-06
> > Line search: Cubically determined step, current gnorm 6.839974867692e+01 lambda=1.4620823686291089e-07
>
>
> So clearly the direction coming out of your Newton equation is not a descent direction when combined with the constraints. Since
> it solves fine without the constraints, I suspect that your Jacobian is alright and your constraints are inconsistent with the solution.
> Step 1, look at the solution you get without constraints. How does it violate your constraints?
>
> Matt
>
> > 1 SNES Function norm 6.839974867692e+01
> > 1 SNES VI Function norm 68.3997 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 1
> > Line search: gnorm after quadratic fit 1.313376791907e+02
> > Line search: Cubic step no good, shrinking lambda, current gnorm 1.102614855398e+02 lambda=1.4115774027030809e-02
> > Line search: Cubic step no good, shrinking lambda, current gnorm 9.096517666290e+01 lambda=1.4115774027030810e-03
> > Line search: Cubic step no good, shrinking lambda, current gnorm 7.587134084601e+01 lambda=1.4115774027030810e-04
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.877273920434e+01 lambda=1.4115774027030810e-05
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.840408582565e+01 lambda=1.4115774027030811e-06
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.839977811504e+01 lambda=1.4115774027030813e-07
> > Line search: Cubically determined step, current gnorm 6.839974761445e+01 lambda=1.7645101306134412e-08
> > 2 SNES Function norm 6.839974761445e+01
> > 2 SNES VI Function norm 68.3997 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 2
> > Line search: gnorm after quadratic fit 1.053816835919e+02
> > Line search: Cubic step no good, shrinking lambda, current gnorm 1.064875244204e+02 lambda=2.9620424834498244e-02
> > Line search: Cubic step no good, shrinking lambda, current gnorm 8.928160190384e+01 lambda=2.9620424834498247e-03
> > Line search: Cubic step no good, shrinking lambda, current gnorm 7.462621000022e+01 lambda=2.9620424834498249e-04
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.862607236334e+01 lambda=2.9620424834498250e-05
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.840219410268e+01 lambda=2.9620424834498251e-06
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.839975697009e+01 lambda=2.9620424834498251e-07
> > Line search: Cubically determined step, current gnorm 6.839974486019e+01 lambda=1.0073837635308560e-07
> > 3 SNES Function norm 6.839974486019e+01
> > 3 SNES VI Function norm 68.3997 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 2
> > Line search: gnorm after quadratic fit 1.235990792724e+02
> > Line search: Cubic step no good, shrinking lambda, current gnorm 1.013971718389e+02 lambda=2.3488863243422971e-02
> > Line search: Cubic step no good, shrinking lambda, current gnorm 7.781731557824e+01 lambda=2.3488863243422975e-03
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.872972483427e+01 lambda=2.3488863243422976e-04
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.840207967049e+01 lambda=2.3488863243422978e-05
> > Line search: Cubically determined step, current gnorm 6.839957781288e+01 lambda=4.7431867318372446e-06
> > 4 SNES Function norm 6.839957781288e+01
> > 4 SNES VI Function norm 68.4009 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 2
> > Line search: gnorm after quadratic fit 1.076412782767e+02
> > Line search: Cubic step no good, shrinking lambda, current gnorm 8.067259042361e+01 lambda=2.9654955573060381e-02
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.991099677071e+01 lambda=2.9654955573060384e-03
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.841319422751e+01 lambda=2.9654955573060385e-04
> > Line search: Cubically determined step, current gnorm 6.839661391957e+01 lambda=8.6072251116571315e-05
> > 5 SNES Function norm 6.839661391957e+01
> > 5 SNES VI Function norm 68.4308 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 2
> > Line search: gnorm after quadratic fit 9.167521781305e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 8.101349837507e+01 lambda=6.4300240519536755e-02
> > Line search: Cubic step no good, shrinking lambda, current gnorm 7.041475585659e+01 lambda=6.6547102741568651e-03
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.844705599568e+01 lambda=6.6547102741568653e-04
> > Line search: Cubically determined step, current gnorm 6.839121015135e+01 lambda=1.4965127147397144e-04
> > 6 SNES Function norm 6.839121015135e+01
> > 6 SNES VI Function norm 68.5745 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 3
> > Line search: gnorm after quadratic fit 9.587731188484e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 8.197287845440e+01 lambda=5.2775823101139679e-02
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.940305546680e+01 lambda=5.2775823101139686e-03
> > Line search: Cubically determined step, current gnorm 6.837177518619e+01 lambda=6.3969948101878912e-04
> > 7 SNES Function norm 6.837177518619e+01
> > 7 SNES VI Function norm 71.0652 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 3
> > Line search: gnorm after quadratic fit 9.548865181502e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 7.876974019161e+01 lambda=5.0026957605696178e-02
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.891985531663e+01 lambda=5.1260581886742491e-03
> > Line search: Cubically determined step, current gnorm 6.832012833110e+01 lambda=9.3300874565775075e-04
> > 8 SNES Function norm 6.832012833110e+01
> > 8 SNES VI Function norm 79.8569 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 4
> > Line search: gnorm after quadratic fit 9.541909192352e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 7.493349067288e+01 lambda=5.1388541796399699e-02
> > Line search: Cubically determined step, current gnorm 6.781311229195e+01 lambda=7.6704381452756282e-03
> > 9 SNES Function norm 6.781311229195e+01
> > 9 SNES VI Function norm 206.467 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 6
> > Line search: gnorm after quadratic fit 9.394254710662e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 7.306526091645e+01 lambda=5.3539445292607950e-02
> > Line search: Cubically determined step, current gnorm 6.721835250392e+01 lambda=9.5561464381222188e-03
> > 10 SNES Function norm 6.721835250392e+01
> > 10 SNES VI Function norm 368.277 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 7
> > Line search: gnorm after quadratic fit 9.387716261564e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 7.070868333837e+01 lambda=4.9443994240769853e-02
> > Line search: Cubically determined step, current gnorm 6.660967991379e+01 lambda=1.0810468882260445e-02
> > 11 SNES Function norm 6.660967991379e+01
> > 11 SNES VI Function norm 567.089 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 9
> > Line search: gnorm after quadratic fit 9.346306901087e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 7.048649174104e+01 lambda=4.9192073733008407e-02
> > Line search: Cubically determined step, current gnorm 6.608645472517e+01 lambda=1.0044112192046832e-02
> > 12 SNES Function norm 6.608645472517e+01
> > 12 SNES VI Function norm 734.752 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 8
> > Line search: gnorm after quadratic fit 9.452595067062e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 7.208837086000e+01 lambda=4.5128845776024190e-02
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.800731174084e+01 lambda=6.5132735322282484e-03
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.634685717588e+01 lambda=6.5132735322282484e-04
> > Line search: Cubically determined step, current gnorm 6.608637269301e+01 lambda=6.5132735322282487e-05
> > 13 SNES Function norm 6.608637269301e+01
> > 13 SNES VI Function norm 735.814 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 8
> > Line search: gnorm after quadratic fit 9.318693996551e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 7.139943393009e+01 lambda=4.8118075850982413e-02
> > Line search: Cubically determined step, current gnorm 6.568600823304e+01 lambda=7.8756632431255542e-03
> > 14 SNES Function norm 6.568600823304e+01
> > 14 SNES VI Function norm 881.479 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 9
> > Line search: gnorm after quadratic fit 9.242424276014e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 7.226307852468e+01 lambda=4.8021995541678457e-02
> > Line search: Cubically determined step, current gnorm 6.540144178550e+01 lambda=6.6931701304969058e-03
> > 15 SNES Function norm 6.540144178550e+01
> > 15 SNES VI Function norm 1006.28 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 10
> > Line search: gnorm after quadratic fit 9.154992244384e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 7.122067564574e+01 lambda=5.0277415210907568e-02
> > Line search: Cubically determined step, current gnorm 6.506969399500e+01 lambda=7.8660529387648906e-03
> > 16 SNES Function norm 6.506969399500e+01
> > 16 SNES VI Function norm 1131.4 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 10
> > Line search: gnorm after quadratic fit 9.263744099217e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 7.045825559590e+01 lambda=4.3976587783298791e-02
> > Line search: Cubically determined step, current gnorm 6.477740872258e+01 lambda=6.6653314620139965e-03
> > 17 SNES Function norm 6.477740872258e+01
> > 17 SNES VI Function norm 1252.29 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 10
> > Line search: gnorm after quadratic fit 9.034042193429e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 7.097176730586e+01 lambda=4.9082849797732621e-02
> > Line search: Cubically determined step, current gnorm 6.448770943479e+01 lambda=7.1730414269226593e-03
> > 18 SNES Function norm 6.448770943479e+01
> > 18 SNES VI Function norm 1371.72 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 10
> > Line search: gnorm after quadratic fit 9.028256513212e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.990381886066e+01 lambda=4.4193294185915478e-02
> > Line search: Cubically determined step, current gnorm 6.422123220407e+01 lambda=6.6250183714544201e-03
> > 19 SNES Function norm 6.422123220407e+01
> > 19 SNES VI Function norm 1490.87 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 10
> > Line search: gnorm after quadratic fit 8.908334154738e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 7.060161630260e+01 lambda=4.6452357120490895e-02
> > Line search: Cubically determined step, current gnorm 6.411445689017e+01 lambda=6.3417192629449783e-03
> > 20 SNES Function norm 6.411445689017e+01
> > 20 SNES VI Function norm 1597.29 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 11
> > Line search: gnorm after quadratic fit 8.460267552084e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 7.051195181220e+01 lambda=5.8933530173091400e-02
> > Line search: Cubically determined step, current gnorm 6.379276529842e+01 lambda=9.2451193719573169e-03
> > 21 SNES Function norm 6.379276529842e+01
> > 21 SNES VI Function norm 1729.35 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 10
> > Line search: gnorm after quadratic fit 8.847710713735e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 7.007434740347e+01 lambda=4.8620669909360585e-02
> > Line search: Cubically determined step, current gnorm 6.358026444281e+01 lambda=6.8922394760267177e-03
> > 22 SNES Function norm 6.358026444281e+01
> > 22 SNES VI Function norm 1849.77 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 10
> > Line search: gnorm after quadratic fit 9.435581241699e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 7.335475468652e+01 lambda=3.2814238215953598e-02
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.652843583618e+01 lambda=3.2814238215953598e-03
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.529985391051e+01 lambda=3.2814238215953602e-04
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.366726270581e+01 lambda=3.2814238215953603e-05
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.358115196460e+01 lambda=3.2814238215953603e-06
> > Line search: Cubically determined step, current gnorm 6.358025861312e+01 lambda=3.2814238215953605e-07
> > 23 SNES Function norm 6.358025861312e+01
> > 23 SNES VI Function norm 1849.78 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 10
> > Line search: gnorm after quadratic fit 8.812900895448e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.822426303212e+01 lambda=4.8421685266110105e-02
> > Line search: Cubically determined step, current gnorm 6.335842666537e+01 lambda=8.4588034499471741e-03
> > 24 SNES Function norm 6.335842666537e+01
> > 24 SNES VI Function norm 1993.6 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 11
> > Line search: gnorm after quadratic fit 9.094159193064e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.742173830047e+01 lambda=4.3243453252109078e-02
> > Line search: Cubically determined step, current gnorm 6.316236273224e+01 lambda=7.7494584282214512e-03
> > 25 SNES Function norm 6.316236273224e+01
> > 25 SNES VI Function norm 2126.62 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 11
> > Line search: gnorm after quadratic fit 9.160540289460e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.722886652974e+01 lambda=4.1792497999647044e-02
> > Line search: Cubically determined step, current gnorm 6.300020419956e+01 lambda=7.3335939016311632e-03
> > 26 SNES Function norm 6.300020419956e+01
> > 26 SNES VI Function norm 2252.12 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 10
> > Line search: gnorm after quadratic fit 8.890109786397e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.686097246249e+01 lambda=4.7041389395739201e-02
> > Line search: Cubically determined step, current gnorm 6.283084254493e+01 lambda=9.0792221408297433e-03
> > 27 SNES Function norm 6.283084254493e+01
> > 27 SNES VI Function norm 2404.84 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 11
> > Line search: gnorm after quadratic fit 8.998798828268e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.576469464321e+01 lambda=4.2887406731046039e-02
> > Line search: Cubically determined step, current gnorm 6.266968273817e+01 lambda=9.2948647727201898e-03
> > 28 SNES Function norm 6.266968273817e+01
> > 28 SNES VI Function norm 2558.11 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 11
> > Line search: gnorm after quadratic fit 9.199146621649e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.564298288247e+01 lambda=4.0193768728643060e-02
> > Line search: Cubically determined step, current gnorm 6.252861090423e+01 lambda=8.3932894622200105e-03
> > 29 SNES Function norm 6.252861090423e+01
> > 29 SNES VI Function norm 2698.56 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 11
> > Line search: gnorm after quadratic fit 9.382191898563e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.772162800128e+01 lambda=3.5914901407691102e-02
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.485302824556e+01 lambda=4.7901702628153379e-03
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.285215446174e+01 lambda=4.7901702628153379e-04
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.253029194340e+01 lambda=4.7901702628153380e-05
> > Line search: Cubically determined step, current gnorm 6.252812967035e+01 lambda=1.5127710264417741e-05
> > 30 SNES Function norm 6.252812967035e+01
> > 30 SNES VI Function norm 2698.83 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 11
> > Line search: gnorm after quadratic fit 9.118652411357e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.495202040381e+01 lambda=4.0596953253201326e-02
> > Line search: Cubically determined step, current gnorm 6.239041273754e+01 lambda=9.5128837682561859e-03
> > 31 SNES Function norm 6.239041273754e+01
> > 31 SNES VI Function norm 2854.38 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 11
> > Line search: gnorm after quadratic fit 9.077825361440e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.467284344645e+01 lambda=4.0583557291813177e-02
> > Line search: Cubically determined step, current gnorm 6.225884047363e+01 lambda=9.7846838097028124e-03
> > 32 SNES Function norm 6.225884047363e+01
> > 32 SNES VI Function norm 3012.55 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 11
> > Line search: gnorm after quadratic fit 8.920999190500e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.466103609666e+01 lambda=4.2498592612658738e-02
> > Line search: Cubically determined step, current gnorm 6.213582712328e+01 lambda=1.0171220001350099e-02
> > 33 SNES Function norm 6.213582712328e+01
> > 33 SNES VI Function norm 3175.23 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 11
> > Line search: gnorm after quadratic fit 9.011924620812e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.495110751676e+01 lambda=4.2453491229013124e-02
> > Line search: Cubically determined step, current gnorm 6.201636649414e+01 lambda=9.3685443832871688e-03
> > 34 SNES Function norm 6.201636649414e+01
> > 34 SNES VI Function norm 3322.22 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 11
> > Line search: gnorm after quadratic fit 9.006024690051e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.414041989575e+01 lambda=4.0940226638739433e-02
> > Line search: Cubically determined step, current gnorm 6.190218472271e+01 lambda=1.0273994032172384e-02
> > 35 SNES Function norm 6.190218472271e+01
> > 35 SNES VI Function norm 3484.25 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 11
> > Line search: gnorm after quadratic fit 8.898991234613e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.426189506521e+01 lambda=4.3426020819675164e-02
> > Line search: Cubically determined step, current gnorm 6.178678684779e+01 lambda=1.0559984512509757e-02
> > 36 SNES Function norm 6.178678684779e+01
> > 36 SNES VI Function norm 3648.36 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 11
> > Line search: gnorm after quadratic fit 8.648025040907e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.404650680722e+01 lambda=4.6749921483990771e-02
> > Line search: Cubically determined step, current gnorm 6.165099494681e+01 lambda=1.1866483746353381e-02
> > 37 SNES Function norm 6.165099494681e+01
> > 37 SNES VI Function norm 3822.88 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 11
> > Line search: gnorm after quadratic fit 8.858076523292e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.520416756669e+01 lambda=4.2063577748779259e-02
> > Line search: Cubically determined step, current gnorm 6.152598711257e+01 lambda=7.9475995139781722e-03
> > 38 SNES Function norm 6.152598711257e+01
> > 38 SNES VI Function norm 3944.22 Active lower constraints 0/0 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 11
> > Line search: gnorm after quadratic fit 8.742192022113e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.343055909293e+01 lambda=3.8810591937350140e-02
> > Line search: Cubically determined step, current gnorm 6.135131913134e+01 lambda=9.8750504088198892e-03
> > 39 SNES Function norm 6.135131913134e+01
> > 39 SNES VI Function norm 4066.15 Active lower constraints 0/1 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 11
> > Line search: gnorm after quadratic fit 9.286112632409e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 7.061265007302e+01 lambda=2.9694426041134040e-02
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.436749315348e+01 lambda=2.9694426041134044e-03
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.299789903123e+01 lambda=2.9694426041134044e-04
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.141298285103e+01 lambda=2.9694426041134044e-05
> > Line search: Cubically determined step, current gnorm 6.135130530880e+01 lambda=2.9694426041134044e-06
> > 40 SNES Function norm 6.135130530880e+01
> > 40 SNES VI Function norm 4066.23 Active lower constraints 0/1 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 11
> > Line search: gnorm after quadratic fit 8.660062754407e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.674944119178e+01 lambda=4.3170190544802138e-02
> > Line search: Cubically determined step, current gnorm 6.120973541057e+01 lambda=6.1770273873522300e-03
> > 41 SNES Function norm 6.120973541057e+01
> > 41 SNES VI Function norm 4152.83 Active lower constraints 0/1 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 11
> > Line search: gnorm after quadratic fit 8.564645091492e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.676153862982e+01 lambda=4.4220462778047379e-02
> > Line search: Cubically determined step, current gnorm 6.104393345352e+01 lambda=6.3589031499342100e-03
> > 42 SNES Function norm 6.104393345352e+01
> > 42 SNES VI Function norm 4233.82 Active lower constraints 0/1 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 11
> > Line search: gnorm after quadratic fit 8.368658054045e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.715427252993e+01 lambda=4.7003756543045970e-02
> > Line search: Cubically determined step, current gnorm 6.101753259623e+01 lambda=6.3787492486959132e-03
> > 43 SNES Function norm 6.101753259623e+01
> > 43 SNES VI Function norm 4314.49 Active lower constraints 0/1 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 11
> > Line search: gnorm after quadratic fit 8.442307716417e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.496496980051e+01 lambda=4.5726539795380154e-02
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.142635208964e+01 lambda=8.4157732414286580e-03
> > Line search: Cubically determined step, current gnorm 6.095430498328e+01 lambda=2.1294466610363495e-03
> > 44 SNES Function norm 6.095430498328e+01
> > 44 SNES VI Function norm 4341.47 Active lower constraints 0/1 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 12
> > Line search: gnorm after quadratic fit 8.439891204437e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.240254752159e+01 lambda=4.3289599290802970e-02
> > Line search: Cubically determined step, current gnorm 6.081365387079e+01 lambda=1.2916446928212236e-02
> > 45 SNES Function norm 6.081365387079e+01
> > 45 SNES VI Function norm 4500.53 Active lower constraints 0/1 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 11
> > Line search: gnorm after quadratic fit 9.664056729635e+01
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.944851102419e+01 lambda=1.8635858087631831e-02
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.394837998027e+01 lambda=1.8635858087631832e-03
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.278442438314e+01 lambda=1.8635858087631834e-04
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.093400706607e+01 lambda=1.8635858087631834e-05
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081489139942e+01 lambda=1.8635858087631835e-06
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365630503e+01 lambda=1.8635858087631836e-07
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365482998e+01 lambda=7.3438624052552081e-08
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365418254e+01 lambda=2.3870801624167493e-08
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365397577e+01 lambda=8.0330117961387493e-09
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365390593e+01 lambda=2.6874115312641255e-09
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365388261e+01 lambda=8.9982494953058537e-10
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365387467e+01 lambda=3.0083351315759278e-10
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365387219e+01 lambda=1.0110298276678126e-10
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365387129e+01 lambda=3.3292703628714462e-11
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365387093e+01 lambda=1.0739379834615402e-11
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365387083e+01 lambda=3.6237724732408161e-12
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365387082e+01 lambda=1.2456833192766385e-12
> > Line search: Cubically determined step, current gnorm 6.081365387079e+01 lambda=3.5247146389212346e-13
> > 46 SNES Function norm 6.081365387079e+01
> > 46 SNES VI Function norm 4500.53 Active lower constraints 0/1 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 11
> > Line search: gnorm after quadratic fit 1.433547268242e+03
> > Line search: Cubic step no good, shrinking lambda, current gnorm 7.106740636849e+01 lambda=2.4859604812085913e-02
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.525497375887e+01 lambda=7.2498301889276232e-03
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.367730849091e+01 lambda=7.2498301889276236e-04
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.174333248068e+01 lambda=7.2498301889276242e-05
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.083400168850e+01 lambda=7.2498301889276242e-06
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081378891362e+01 lambda=7.2498301889276242e-07
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365527548e+01 lambda=1.0753239548189211e-07
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365445012e+01 lambda=4.4350670800939511e-08
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365407923e+01 lambda=1.5953160232199837e-08
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365394762e+01 lambda=5.8822684037182187e-09
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365389903e+01 lambda=2.1599843490971948e-09
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365388111e+01 lambda=7.9357831777119289e-10
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365387457e+01 lambda=2.9181178721013368e-10
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365387223e+01 lambda=1.0733281860745436e-10
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365387132e+01 lambda=3.9236995040615546e-11
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365387106e+01 lambda=1.4351792294805992e-11
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365387081e+01 lambda=4.8683006404131606e-12
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365387087e+01 lambda=2.0863028416245319e-12
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365387080e+01 lambda=5.3058618006527772e-13
> > Line search: unable to find good step length! After 19 tries
> > Line search: fnorm=6.0813653870787959e+01, gnorm=6.0813653870799314e+01, ynorm=7.0504021074247237e+02, minlambda=9.9999999999999998e-13, lambda=5.3058618006527772e-13, initial slope=-4.7232673282579080e+03
> > 47 SNES Function norm 6.081365387079e+01
> > 47 SNES VI Function norm 4500.53 Active lower constraints 0/1 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 11
> > Line search: gnorm after quadratic fit 1.280890413731e+02
> > Line search: Cubic step no good, shrinking lambda, current gnorm 7.053050135324e+01 lambda=2.2733898438250671e-02
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.399979736493e+01 lambda=2.2733898438250673e-03
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.297299206174e+01 lambda=2.2733898438250674e-04
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.098427084652e+01 lambda=2.2733898438250677e-05
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081555475063e+01 lambda=2.2733898438250679e-06
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365745105e+01 lambda=2.2733898438250681e-07
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365507363e+01 lambda=9.2077672155667702e-08
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365429323e+01 lambda=3.2329991301020441e-08
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365402243e+01 lambda=1.1595563414967544e-08
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365392495e+01 lambda=4.1432803927719340e-09
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365389024e+01 lambda=1.4815603373453140e-09
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365387781e+01 lambda=5.2922825349649990e-10
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365387324e+01 lambda=1.8866396505817014e-10
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365387173e+01 lambda=6.7568116386381729e-11
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365387107e+01 lambda=2.3800109593117919e-11
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365387094e+01 lambda=8.6880387507986266e-12
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365387083e+01 lambda=2.8858967256610185e-12
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365387082e+01 lambda=1.0348935437400166e-12
> > Line search: Cubically determined step, current gnorm 6.081365387077e+01 lambda=2.7070538024707468e-13
> > 48 SNES Function norm 6.081365387077e+01
> > 48 SNES VI Function norm 4500.53 Active lower constraints 0/1 upper constraints 0/0 Percent of total 0. Percent of bounded 0.
> > Linear solve converged due to CONVERGED_RTOL iterations 11
> > Line search: gnorm after quadratic fit 1.170943716019e+02
> > Line search: Cubic step no good, shrinking lambda, current gnorm 7.038597782185e+01 lambda=2.2207476459146142e-02
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.399318571001e+01 lambda=2.2207476459146142e-03
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.295164029113e+01 lambda=2.2207476459146143e-04
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.097743654776e+01 lambda=2.2207476459146143e-05
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081546079136e+01 lambda=2.2207476459146144e-06
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365719872e+01 lambda=2.2207476459146145e-07
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365503919e+01 lambda=9.0117449908413481e-08
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365427749e+01 lambda=3.1364523245356123e-08
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365401596e+01 lambda=1.1183735694685806e-08
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365392232e+01 lambda=3.9706025565052754e-09
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365388909e+01 lambda=1.4107330444508480e-09
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365387724e+01 lambda=5.0110371464381371e-10
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365387308e+01 lambda=1.7820909495605996e-10
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365387164e+01 lambda=6.3314737242538209e-11
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365387114e+01 lambda=2.2207910898013729e-11
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365387085e+01 lambda=7.4515329000007742e-12
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365387082e+01 lambda=2.7872933392432575e-12
> > Line search: Cubic step no good, shrinking lambda, current gnorm 6.081365387083e+01 lambda=8.8269934321345058e-13
> > Line search: unable to find good step length! After 18 tries
> > Line search: fnorm=6.0813653870766274e+01, gnorm=6.0813653870831025e+01, ynorm=7.0578565675503091e+02, minlambda=9.9999999999999998e-13, lambda=8.8269934321345058e-13, initial slope=-3.8123379550451641e+03
> > Nonlinear solve did not converge due to DIVERGED_LINE_SEARCH iterations 48
> >
> > Amir
> > On Aug 18 2018, at 11:42 pm, Smith, Barry F. <bsmith at mcs.anl.gov (mailto:bsmith at mcs.anl.gov)> wrote:
> > >
> > >
> > > -snes_monitor -snes_linesearch_monitor -pc_type lu
> > > produces what?
> > > Barry
> > > The line search failing means that the direction computed is not a descent direction which could be due to a bad Jacobian or inconsistent constraints.
> > >
> > > > On Aug 17, 2018, at 11:56 PM, Amir <mhbaghaei at mail.sjtu.edu.cn (mailto:mhbaghaei at mail.sjtu.edu.cn)> wrote:
> > > > Hi
> > > > I need to apply constraint to primitive variables. I am troubling to set up SNESVI. After running the code, I feel SNES is not actually solving. After one iteration of SNES, I got DIVERGED_LINESEARCH, with NO changing in function norm.
> > > > I think the way I set VI maybe wrong. Sorry for my simple explanation.
> > > > Very thankful for your time.
> > > > Amir
> > > > SNESCreate(PETSC_COMM_WORLD,&snes);
> > > > SNESSetApplicationContext(snes,&user);
> > > > SNESSetDM(snes,user.dm (http://user.dm));
> > > > SNESSetFunction(snes,NULL,FormFunction,&user);
> > > > FormInitialSolution(user.X,&user);
> > > > SNESSetSolution(snes,user.X);
> > > > SNESMonitorSet(snes,MySNESMonitor,&user,NULL);
> > > > SNESSetType(snes,SNESVINEWTONSSLS);
> > > > SNESSetNormSchedule(snes, SNES_NORM_ALWAYS);
> > > > SNESVISetVariableBounds(snes,user.XLOWER,user.XUPPER);
> > > > SNESGetLineSearch(snes,&linesearch);
> > > > SNESLineSearchSetType(linesearch,SNESLINESEARCHBT);
> > > > SNESLineSearchSetVIFunctions(linesearch, NULL, SNESNormFunction);
> > > > SNESSetFromOptions(snes);
> > > > SNESSolve(snes,NULL,user.X);
> > >
> > >
> >
> >
>
>
>
>
> --
> 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
>
>
> https://www.cse.buffalo.edu/~knepley/ (http://www.caam.rice.edu/~mk51/)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180819/97740b50/attachment-0001.html>


More information about the petsc-users mailing list