<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Oct 12, 2015 at 9:11 PM, K. N. Ramachandran <span dir="ltr"><<a href="mailto:knram06@gmail.com" target="_blank">knram06@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div>Hello Matt,<br><br></div>Actually I felt the boundary conditions were having a role to play and set all the boundary conditions to Dirichlet. In this case, convergence was almost immediate with the Hypre preconditioner, taking 17 seconds with 3 iterations. The MG method took about the same time though.<br><br></div>So I reverted to the Dirichlet, Neumann mix of BCs and Hypre starts to diverge. Please find attached the output for the Hypre run using Dirichlet and Neumann for a 21^3 grid (rows), with a max of 7 nonzeros per row. Details of the options used before running are in the file. The solver used in all cases is bcgs.<br><br></div>Also attached is the MG output for 101^3 grid<br></div>1) Dirichlet and Neumann<br></div>2) Dirichlet only<br><br></div>where it seems to take about the same time.<br></div></div></blockquote><div><br></div><div>Notice that you have no levels of MG here. You need to use -pc_mg_levels <n></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"><div dir="ltr"><div></div>I was thinking if the Null space has something to do with this? From the PETSc docs, I understand that the Null space should be removed/attached when solving singular systems. My domain will have at least two Dirichlet conditions, so it is not singular. But since the Neumann conditions seem to affect the convergence with Hypre, perhaps they have a role to play in terms of the null space?<br><div><div><div><div><div><div><div><br><br></div></div></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 12, 2015 at 3:52 PM, K. N. Ramachandran <span dir="ltr"><<a href="mailto:knram06@gmail.com" target="_blank">knram06@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hello Matt,<br><br></div>Thanks for your reply. I am actually retrying against the latest PETSc and will revert once I get the information.<span><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Oct 12, 2015 at 9:39 AM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On Sat, Oct 10, 2015 at 7:56 PM, K. N. Ramachandran <span dir="ltr"><<a href="mailto:knram06@gmail.com" target="_blank">knram06@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Sorry, some more questions.<br></div><div><br>3) Also, for Dirichlet bc, I specify the value through Identity rows, i.e. A_ii = 1 and the rhs value would correspond to the Dirichlet condition. I am specifying it this way for my convenience. I am aware that MatZerosRowColumns might help here, but would keeping it this way be detrimental?<br></div></div></blockquote><div><br></div></span><div>That is fine. However you would want to scale these entries to be approximately the same size as the other diagonal entries.</div><span><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div></div>4) Can I expect symmetric matrices to perform better, i.e. if I eliminate Dirichlet rows? But I would still be left with Neumann boundary conditions, where I use the second order formulation. If I used the first order formulation and made it symmetric, would that be an advantage? I tried the latter, but I didn't see the condition number change much.</div></blockquote><div><br></div></span><div>Will not matter for MG.</div><div><br></div><div> Matt</div><span><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><br></div></div></div></blockquote></span></div></div></div></blockquote></div><br clear="all"><br></div></span><div class="gmail_extra">Regards,<br></div><div class="gmail_extra"><div><div dir="ltr">K.N.Ramachandran<br><div>Ph: <a href="tel:814-441-4279" value="+18144414279" target="_blank">814-441-4279</a></div></div></div>
</div></div>
</blockquote></div><br><br clear="all"><br></div><div class="gmail_extra">Thanking You,<br></div><div class="gmail_extra"><div><div dir="ltr">K.N.Ramachandran<br><div>Ph: <a href="tel:814-441-4279" value="+18144414279" target="_blank">814-441-4279</a></div></div></div>
</div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">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</div>
</div></div>