<div dir="ltr"><div dir="ltr">On Sat, Aug 22, 2020 at 2:07 AM baikadi pranay <<a href="mailto:pranayreddy865@gmail.com">pranayreddy865@gmail.com</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello,<br><br>I am trying to solve the Poisson equation in 2D for heterostructure devices. I have linearized the equation and discretized it using FDM. I am using BiCGStab to iteratively solve for the solution as follows:<br><br>Step 1: Solve A^(i-1) x^(i) = b^(i-1) {i = 1 to N where convergence is reached}<br>Step 2: Use x^{i} to update the central coefficients of A^{i-1} to get A^{i} and similarly update b^{i-1} to get b^{i}<br>Step3: If ( ||x^{i}-x^{i-1}||_2 , the 2-norm of the solution update, is greater than a tolerance, then go back to Step 1 to solve the new system of equations using BiCGStab. Else, exit the loop.<br><b><u>1) I am facing the following problem with this procedure</u></b>:<br>The 2-norm of the solution update is suddenly becoming zero after a few iterations in some cases. I print out the getconvergedreason and there are not red flags there, so I am kind of confused whey this behaviour is being observed. This behaviour is leading to "false convergences", in the sense that the solutions obtained are not physical.<br><br>A similar behaviour was observed when I used SOR instead of BiCGStab. At this point I am starting to suspect if it is wrong to use linear solvers on the poisson equation which is a nonlinear equation (although linearized). If you could please comment on this, that would be very helpful. <br><br>Any help with this problem is greatly appreciated. Please let me know if you need any further information. <br></div></blockquote><div><br></div><div>1) You are coding up the Picard method by hand to solve your nonlinear equation. If the operator is not contractive, this can stagnate, as you are seeing. You</div><div> could try another solver, like Newton's method. We have a variety of nonlinear solves in the SNES class.</div><div><br></div><div>2) It is not clear from your description whether you linear solver is converging. BiCGStab without a preconditioner is a terrible solver for Poisson. We usually</div><div> recommend starting with Algebraic Multigrid, like Hypre which is great at 2D Poisson. You can monitor the convergence of your linear solver using</div><div><br></div><div> -knp_monitor_true_solution -ksp_converged_reason</div><div><br></div><div> We want to see this information with any questions about convergence.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Thank you,<br><br>Sincerely,<br>Pranay.<br><br></div><div hspace="streak-pt-mark" style="max-height:1px"><img alt="" style="width: 0px; max-height: 0px; overflow: hidden;" src="https://mailfoogae.appspot.com/t?sender=acHJhbmF5cmVkZHk4NjVAZ21haWwuY29t&type=zerocontent&guid=e91af943-626d-449a-b812-eafec67b8f5a"><font color="#ffffff" size="1">ᐧ</font></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>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><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>