<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Feb 26, 2016 at 11:01 AM, Manav Bhatia <span dir="ltr"><<a href="mailto:bhatiamanav@gmail.com" target="_blank">bhatiamanav@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word">Hi, <div><br></div><div> I am working on a problem with system of equations in complex numbers, and am splitting it up to solve it with petsc compiled for real number support:</div><div><br></div><div><div><div><span style="font-family:Monaco;font-size:10px">(J_R + i J_I) (x_R + i x_I) + (r_R + i r_I) = 0</span></div><div><span style="color:rgb(59,170,68);font-family:Monaco;font-size:10px"><br></span></div><div>is then defined as </div><div><br></div><div><div style="margin:0px;font-size:10px;line-height:normal;font-family:Monaco">[ J_R -J_I] {x_R} + {r_R} = {0}</div></div><div style="margin:0px;font-size:10px;line-height:normal;font-family:Monaco"><div style="margin:0px;line-height:normal">[ J_I J_R] {x_I} + {r_I} = {0}</div></div></div><div><br>
I have tried block-Schur solver with the Jacobian defined using the nested matrix format with a separate matrix for each quadrant of the Jacobian. This works well for diagonally dominant cases, but for high-frequency problems (J_I scales with frequency), the solver convergence is very slow. </div></div><div><br></div><div>Now, I am attempting to create a single matrix so that I can use the other ksp+pc combinations for this system of equations. </div><div><br></div><div>I am wondering if there is a natural way to create an mpiaij or an mpibaij matrix from the nested matrix defined above. </div></div></blockquote><div><br></div><div>You can use this</div><div><br></div><div> <a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatGetLocalSubMatrix.html">http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatGetLocalSubMatrix.html</a></div><div><br></div><div>to have the same assembly code insert into a global matrix. That way you can use Fieldsplit or other preconditioners.</div><div>Also, a full Schur complement would converge in 1 iteration with exact solves. I always start there and then back off.</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div>I would appreciate any guidance on this. </div><div><br></div><div>Regards,</div><div>Manav</div><div><br></div><div><br></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>