On Jan 7, 2008 4:35 PM, Barry Smith <<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br> Sean,<br><br> Can you run the ls version with the additional options -info -<br>snes_monitor and send<br>the results? </blockquote><div><br>Hi Barry,<br>
<br> Attached are the gzipped results. It says something about an
inconsistent rhs. Could that be the problem? And what would the rhs
in question be?<br><br><br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">You could also make a run with -snes_mf_operator and see<br>if that "converges"
<br>in the same way or not (this is another check that the analytic<br>Jacobian is right/wrong).</blockquote><div><br>I tried that, and it seemed to do the same thing.<br><br>Thanks a lot for the feedback.<br><br>Sean<br>
<br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br><br><br> Thanks<br><font color="#888888"><br> Barry<br></font><div>
<div></div><div class="Wj3C7c"><br>On Jan 7, 2008, at 3:30 PM, Sean Dettrick wrote:<br><br>> Hi,<br>><br>> I am solving a version of the Grad-Shafranov equation, F(x)=0, which<br>> but for some extra spatial dependences is similar in form to the 2D
<br>> Bratu equation in snes/examples/tutorials/ex5.c. I started with the<br>> ex5.c code, introducing just enough changes to model the new<br>> system. The analytic Jacobian function appears to be correct, with
<br>> a Norm of matrix ratio < 1.e9 (found using -snes_type test).<br>><br>> The problem I am having is that in most cases the SNES solver does<br>> not converge to a solution x of F(x)=0. Rather, what happens is
<br>> that the fnorm (obtained in a monitor function) converges to some<br>> large non-zero value, and F(x) seems to get "stuck", i.e. it<br>> converges to a large non-zero result. Even though it is clearly not
<br>> a solution, the -snes_converged_reason is reported as "Nonlinear<br>> solve converged due to CONVERGED_TR_DELTA". The intermediate KSP<br>> steps have -ksp_converged_reason reported as "Linear solve converged
<br>> due to CONVERGED_STEP_LENGTH". I have been typically running with<br>> parameters -da_grid_x 100 -da_grid_y 101 -snes_converged_reason -<br>> ksp_converged_reason -snes_type tr -ksp_type gmres -snes_max_it 100.
<br>><br>> Does this sound like a familiar scenario with a familiar solution?<br>> Or can anyone point me to some documentation that describes the SNES<br>> tr and ls parameters in more detail than the manual.pdf
?<br>> Or can anyone recommend the best SNES and KSP parameters for the<br>> Bratu example?<br>><br>> Any help or advice would be greatly appreciated.<br>><br>> Thanks,<br>> Sean Dettrick<br><br></div>
</div></blockquote></div><br>