On Wed, Mar 23, 2011 at 12:04 PM, Rebecca Xuefei Yuan <span dir="ltr"><<a href="mailto:xy2102@columbia.edu">xy2102@columbia.edu</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Dear Matt,<br>
<br>
Thanks very much for your reply.<br>
<br>
I add "snes_fd" in the option, but get<br>
<br>
*********************************************<br>
0 SNES Function norm 6.064004119408e-01<br>
Linear solve converged due to CONVERGED_RTOL iterations 2<br>
Nonlinear solve did not converge due to DIVERGED_FUNCTION_COUNT<br>
*********************************************<br></blockquote><div><br></div><div>It looks like this FD derivative did not give any descent directions when factored. Possibly</div><div>the FD Jacobian is too inaccurate, or the factorization was. These both mean your problem</div>
<div>is very ill-conditioned. You should try to reformulate it.</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
which is worse than the default Newton-Krylov solver as<br>
<br>
<br>
<br>
*********************************************<br>
0 SNES Function norm 6.064004119408e-01<br>
Linear solve converged due to CONVERGED_RTOL iterations 2<br>
1 SNES Function norm 7.917252729980e-02<br>
Linear solve converged due to CONVERGED_RTOL iterations 2<br>
2 SNES Function norm 6.967390244191e-03<br>
Linear solve converged due to CONVERGED_RTOL iterations 10<br>
3 SNES Function norm 4.863622639964e-03<br>
Linear solve converged due to CONVERGED_RTOL iterations 5<br>
4 SNES Function norm 3.696117297933e-03<br>
Linear solve converged due to CONVERGED_RTOL iterations 1<br>
5 SNES Function norm 1.755926765314e-03<br>
Linear solve converged due to CONVERGED_RTOL iterations 4<br>
6 SNES Function norm <a href="tel:1.2068107721" target="_blank">1.2068107721</a>64e-03<br>
Linear solve converged due to CONVERGED_RTOL iterations 1<br>
7 SNES Function norm 2.339140575778e-04<br>
Linear solve converged due to CONVERGED_RTOL iterations 7<br>
8 SNES Function norm 1.676689222401e-04<br>
Linear solve converged due to CONVERGED_RTOL iterations 1<br>
9 SNES Function norm 6.032645773400e-05<br>
Linear solve converged due to CONVERGED_RTOL iterations 5<br>
10 SNES Function norm 4.747680518253e-05<br>
Linear solve converged due to CONVERGED_RTOL iterations 1<br>
11 SNES Function norm <a href="tel:1.6503016270" target="_blank">1.6503016270</a>11e-05<br>
Linear solve converged due to CONVERGED_RTOL iterations 2<br>
12 SNES Function norm 6.030736960845e-06<br>
Linear solve converged due to CONVERGED_RTOL iterations 5<br>
13 SNES Function norm 3.278948607849e-06<br>
Linear solve converged due to CONVERGED_RTOL iterations 5<br>
14 SNES Function norm 2.488486141044e-06<br>
Linear solve converged due to CONVERGED_RTOL iterations 1<br>
15 SNES Function norm 6.689684826529e-07<br>
Linear solve converged due to CONVERGED_RTOL iterations 3<br>
16 SNES Function norm 2.543676285453e-07<br>
Linear solve converged due to CONVERGED_RTOL iterations 7<br>
17 SNES Function norm 1.671616367100e-07<br>
Linear solve converged due to CONVERGED_RTOL iterations 1<br>
18 SNES Function norm 7.228647551356e-08<br>
Linear solve converged due to CONVERGED_RTOL iterations 7<br>
19 SNES Function norm 5.812218130475e-08<br>
Linear solve converged due to CONVERGED_RTOL iterations 1<br>
20 SNES Function norm 2.883628165794e-08<br>
Linear solve converged due to CONVERGED_RTOL iterations 3<br>
21 SNES Function norm 2.291142576313e-08<br>
Linear solve converged due to CONVERGED_RTOL iterations 2<br>
22 SNES Function norm 2.291142573122e-08<br>
Linear solve converged due to CONVERGED_RTOL iterations 2<br>
23 SNES Function norm 2.291142569390e-08<br>
Linear solve converged due to CONVERGED_RTOL iterations 2<br>
24 SNES Function norm 2.291142565808e-08<br>
Linear solve converged due to CONVERGED_RTOL iterations 2<br>
25 SNES Function norm 2.291142562249e-08<br>
Linear solve converged due to CONVERGED_RTOL iterations 2<br>
26 SNES Function norm 2.291142558929e-08<br>
Linear solve converged due to CONVERGED_RTOL iterations 2<br>
27 SNES Function norm 2.291142555415e-08<br>
Linear solve converged due to CONVERGED_RTOL iterations 2<br>
28 SNES Function norm 2.291142554381e-08<br>
Linear solve converged due to CONVERGED_RTOL iterations 2<br>
29 SNES Function norm 2.291142550392e-08<br>
Linear solve converged due to CONVERGED_RTOL iterations 2<br>
30 SNES Function norm 2.291142549609e-08<br>
Linear solve converged due to CONVERGED_RTOL iterations 2<br>
31 SNES Function norm 2.291142546087e-08<br>
Linear solve converged due to CONVERGED_RTOL iterations 2<br>
32 SNES Function norm 2.291142544510e-08<br>
Linear solve converged due to CONVERGED_RTOL iterations 2<br>
33 SNES Function norm 2.291142542335e-08<br>
Linear solve converged due to CONVERGED_RTOL iterations 2<br>
34 SNES Function norm 2.291142541222e-08<br>
Linear solve converged due to CONVERGED_RTOL iterations 2<br>
35 SNES Function norm 2.291142540142e-08<br>
Linear solve converged due to CONVERGED_RTOL iterations 2<br>
36 SNES Function norm 2.291142539388e-08<br>
Linear solve converged due to CONVERGED_RTOL iterations 2<br>
37 SNES Function norm 2.291142535647e-08<br>
Linear solve converged due to CONVERGED_RTOL iterations 2<br>
38 SNES Function norm 2.291142532336e-08<br>
Linear solve converged due to CONVERGED_RTOL iterations 2<br>
39 SNES Function norm 2.291142528666e-08<br>
Linear solve converged due to CONVERGED_RTOL iterations 2<br>
40 SNES Function norm 2.291142526471e-08<br>
Linear solve converged due to CONVERGED_RTOL iterations 2<br>
41 SNES Function norm 2.291142526200e-08<br>
Linear solve converged due to CONVERGED_RTOL iterations 2<br>
42 SNES Function norm 2.291142526187e-08<br>
Linear solve converged due to CONVERGED_RTOL iterations 2<br>
43 SNES Function norm 2.291142522689e-08<br>
Linear solve converged due to CONVERGED_RTOL iterations 2<br>
44 SNES Function norm 2.291142518799e-08<br>
Linear solve converged due to CONVERGED_RTOL iterations 2<br>
45 SNES Function norm 2.291142517718e-08<br>
Linear solve converged due to CONVERGED_RTOL iterations 2<br>
46 SNES Function norm 2.291142517238e-08<br>
Linear solve converged due to CONVERGED_RTOL iterations 2<br>
47 SNES Function norm 2.291142515991e-08<br>
Linear solve converged due to CONVERGED_RTOL iterations 2<br>
48 SNES Function norm 2.291142512095e-08<br>
Linear solve converged due to CONVERGED_RTOL iterations 2<br>
49 SNES Function norm 2.291142508630e-08<br>
Linear solve converged due to CONVERGED_RTOL iterations 2<br>
50 SNES Function norm 2.291142507169e-08<br>
Nonlinear solve did not converge due to DIVERGED_MAX_IT<br>
*********************************************<br>
<br>
When I see this residual history, I would like to make some improvement on the solver, any suggestions on it?<br>
<br>
The options for the Newton-Krylov run are<br>
<br>
-pc_type asm<br>
-snes_ksp_ew true<br>
<br>
for np=1.<br>
<br>
Thanks again for your kind help!<br>
<br>
Cheers,<br>
<br>
Rebecca<div><div></div><div class="h5"><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
Quoting Matthew Knepley <<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>>:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Wed, Mar 23, 2011 at 11:46 AM, Rebecca Xuefei Yuan<br>
<<a href="mailto:xy2102@columbia.edu" target="_blank">xy2102@columbia.edu</a>>wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
If the nonlinear system is evaluated at F(u) = 0 in "FormFunction()", but<br>
the symbolic Jacobian is not provided. Is there any options that I can call<br>
to solve the corresponding linear system by direct solver?<br>
<br>
</blockquote>
<br>
-snes_fd, which is very slow.<br>
<br>
Matt<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks very much!<br>
<br>
Best regards,<br>
<br>
Rebecca<br>
<br>
<br>
<br>
</blockquote>
<br>
<br>
--<br>
What most experimenters take for granted before they begin their experiments<br>
is infinitely more interesting than any results to which their experiments<br>
lead.<br>
-- Norbert Wiener<br>
<br>
</blockquote>
<br>
<br>
<br></div></div><font color="#888888">
Rebecca Xuefei YUAN<br>
Department of Applied Physics and Applied Mathematics<br>
Columbia University<br>
Tel:<a href="tel:917-399-8032" target="_blank">917-399-8032</a><br>
<a href="http://www.columbia.edu/~xy2102" target="_blank">www.columbia.edu/~xy2102</a><br>
<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener<br>