<div dir="ltr"><div dir="ltr">On Thu, Jun 12, 2025 at 4:58 AM Mark Adams <<a href="mailto:mfadams@lbl.gov">mfadams@lbl.gov</a>> wrote:</div><div class="gmail_quote gmail_quote_container"><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"><div>Adding this to the PETSc mailing list,</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jun 12, 2025 at 3:43 AM hexioafeng <<a href="mailto:hexiaofeng@buaa.edu.cn" target="_blank">hexiaofeng@buaa.edu.cn</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><font size="4" face="Verdana"><br></font></div><div><font size="4" face="Verdana">Dear Professor,</font></div><div><font size="4" face="Verdana"><br></font></div><div><font size="4" face="Verdana">I hope this message finds you well.</font></div><div><font size="4" face="Verdana"><br></font></div><div><font size="4" face="Verdana">I am an employee at a CAE company and a heavy user of the PETSc library. I would like to thank you for your contributions to PETSc and express my deep appreciation for your work.</font></div><div><font size="4" face="Verdana"><br></font></div><div><font size="4" face="Verdana">Recently, I encountered some difficulties when using PETSc to solve structural mechanics problems with Lagrange multiplier constraints. After searching extensively online and reviewing several papers, I found your previous paper titled "<b>Algebraic multigrid methods for constrained linear systems with applications to contact problems in solid mechanics</b>" seems to be the most relevant and helpful. </font></div><div><font size="4" face="Verdana"><br></font></div><div><font size="4" face="Verdana">The stiffness matrix I'm working with, <b>K</b>, is a block saddle-point matrix of the form (A00 A01; A10 0), where <b>A00 is singular</b>—just as described in your paper, and different from many other articles . I have a few questions regarding your work and would greatly appreciate your insights:</font></div><div><font size="4" face="Verdana"><br></font></div><div><font size="4" face="Verdana">1. Is the <b>AMG/KKT</b> method presented in your paper available in PETSc? I tried using <b>CG+GAMG</b> directly but received a <b>KSP_DIVERGED_PC_FAILED</b> error. I also attempted to use <b>CG+PCFIELDSPLIT</b> with the following options: </font></div></div></blockquote><div><br></div><div>No</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><div><font size="4" face="Verdana"> </font></div><div><font size="4" face="Verdana"> -pc_type fieldsplit -pc_fieldsplit_detect_saddle_point -pc_fieldsplit_type schur -pc_fieldsplit_schur_precondition selfp -pc_fieldsplit_schur_fact_type full -fieldsplit_0_ksp_type preonly -fieldsplit_0_pc_type gamg -fieldsplit_1_ksp_type preonly -fieldsplit_1_pc_type bjacobi </font></div><div><font size="4" face="Verdana"> </font></div><div><font size="4" face="Verdana"> Unfortunately, this also resulted in a <b>KSP_DIVERGED_PC_FAILED</b> error. Do you have any suggestions?</font></div><div><font size="4" face="Verdana"><br></font></div><div><font size="4" face="Verdana">2. In your paper, you compare the method with <b>Uzawa</b>-type approaches. To my understanding, Uzawa methods typically require A00 to be invertible. How did you handle the singularity of A00 to construct an M-matrix that is invertible?</font></div><div><font size="4" face="Verdana"><br></font></div></div></blockquote><div><br></div>You add a regularization term like A01 * A10 (like springs). See the paper or any reference to augmented lagrange or Uzawa</div><div class="gmail_quote"><br><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><font size="4" face="Verdana"></font></div><div><font size="4" face="Verdana">3. Can i implement the AMG/KKT method in your paper using existing <b>AMG APIs</b>? Implementing a production-level AMG solver from scratch would be quite challenging for me, so I’m hoping to utilize existing AMG interfaces within PETSc or other packages.</font></div><div><font size="4" face="Verdana"><br></font></div></div></blockquote><div><br></div><div>You can do Uzawa and make the regularization matrix with matrix-matrix products. Just use AMG for the A00 block.</div><div><br></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><div><font size="4" face="Verdana"></font></div><div><font size="4" face="Verdana">4. For saddle-point systems where A00 is singular, can you recommend any more robust or efficient solutions? Alternatively, are you aware of any open-source software packages that can handle such cases out-of-the-box?</font></div><div><font size="4" face="Verdana"><br></font></div></div></blockquote><div><br></div>No, and I don't think PETSc can do this out-of-the-box, but others may be able to give you a better idea of what PETSc can do.</div><div class="gmail_quote">I think PETSc can do Uzawa or other similar algorithms but it will not do the regularization automatically (it is a bit more complicated than just A01 * A10)</div></div></blockquote><div><br></div><div>One other trick you can use is to have</div><div><br></div><div> -fieldsplit_0_mg_coarse_pc_type svd</div><div><br></div><div>This will use SVD on the coarse grid of GAMG, which can handle the null space in A00 as long as the prolongation does not put it back in. I have used this for the Laplacian with Neumann conditions and for freely floating elastic problems.</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"><div class="gmail_quote">Thanks,</div><div class="gmail_quote">Mark<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><font size="4" face="Verdana"></font></div><div><font size="4" face="Verdana"><br></font></div><div><font size="4" face="Verdana">Thank you very much for taking the time to read my email. Looking forward to hearing from you.</font></div><div><font size="4" face="Verdana"><br></font></div><div><font size="4" face="Verdana"><br></font></div><div><font size="4" face="Verdana"><br></font></div><div><font size="4" face="Verdana">Sincerely, </font></div><div><font size="4" face="Verdana"><br></font></div><div><font size="4" face="Verdana">Xiaofeng He</font></div><div><font size="4" face="Verdana">-----------------------------------------------------</font></div><div><font size="4" face="Verdana"><br></font></div><div><font size="4" face="Verdana">Research Engineer</font></div><div><font size="4" face="Verdana"><br></font></div><div><font size="4" face="Verdana">Internet Based Engineering, Beijing, China</font></div><div><div><br></div></div></div></blockquote></div></div>
</blockquote></div><div><br clear="all"></div><div><br></div><span class="gmail_signature_prefix">-- </span><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="https://urldefense.us/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!G_uCfscf7eWS!bhA0xS1Lyq7mWlSN2W2572y18Q38WKonPljSMeGMVE5TY4Nw-ueWz0h78sUCB1AquAVUULPnogDQWpKgqG0u$" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>