<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br class="webkit-block-placeholder"></div> Your initial function norm is so big as to be obscene; 10^7. I think you need a much better<div>initial guess to make progress. What happens with the same options and da grid of say 8 by 8?</div><div>Does it converge nicely or still mess up.</div><div><br class="webkit-block-placeholder"></div><div> ex5.c stinks because it does not support grid sequencing: I recommend looking at </div><div>ex19.c and sticking your form function in there, then you can use -dmmg_grid_sequence</div><div>and it will use grid sequencing to get a good initial guess on the fine grid.</div><div><br class="webkit-block-placeholder"></div><div> Barry</div><div><br><div><div>On Jan 7, 2008, at 6:37 PM, Sean Dettrick wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">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> <span><ls_result.gz></span></blockquote></div><br></div></body></html>