<div dir="ltr">I'm work on FEM (especially for solving contact mechanics).<div>In contact mechanics, original global jacobian matrix has nondiagonal dominance in some rows.</div><div>I want to remove this effect(nondiagonal dominance) by using some techniques. </div><div>Because I saw the many references that nondiagonal dominance is harmful for iterative solver.</div><div>So my goal is, combine algebraic multigrid with some tuning jacobian matrix.</div><div>To this goal, I am investigating what is possible and what is impossible.</div><div><br></div><div>Thanks,</div><div>Hyung Kim</div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">2022년 12월 15일 (목) 오전 11:34, Barry Smith <<a href="mailto:bsmith@petsc.dev">bsmith@petsc.dev</a>>님이 작성:<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><br><div><br><blockquote type="cite"><div>On Dec 14, 2022, at 9:10 PM, 김성익 <<a href="mailto:ksi2443@gmail.com" target="_blank">ksi2443@gmail.com</a>> wrote:</div><br><div><div dir="ltr">Hello,<div><br></div><div><br></div><div><br></div><div>I tried to find the way to adapt my own preconditioner.</div><div>In other words, I want to apply and solve a new preconditioner rather than using the existing one in Petsc.<br></div><div><br></div><div>So, my questions are as below</div><div>1. Is this possible to adapt my own preconditioner??</div></div></div></blockquote><div><br></div>   There are a variety of ways to provide your own preconditioner; you can use <a href="https://petsc.org/release/docs/manualpages/PC/PCSHELL/" target="_blank">https://petsc.org/release/docs/manualpages/PC/PCSHELL/</a> and take the preconditioner completely in your own hands. But often one builds a preconditioner by combining multiple simpler preconditioners: for example PCFIELDSPLIT discuss in <a href="https://petsc.org/release/docs/manual/ksp/" target="_blank">https://petsc.org/release/docs/manual/ksp/</a>, even block Jacobi <a href="https://petsc.org/release/docs/manualpages/PC/PCBJACOBI/#pcbjacobi" target="_blank">https://petsc.org/release/docs/manualpages/PC/PCBJACOBI/#pcbjacobi</a> is built up with smaller preconditioners.  </div><div><br></div><div>  What particular type of preconditioner are you planning to build? Other users may have ideas on how to do it.<br><blockquote type="cite"><div><div dir="ltr"><div><br></div><div>2. Also is it possible to extract preconditioner matrix created in Petsc?</div></div></div></blockquote><div><br></div>I'm not sure what you mean by this. Preconditioners are very rarely represented directly by a matrix (that would be too inefficient). Rather one provides functions that apply the action of the preconditioner. As noted above one provides such functions in PETSc using <a href="https://petsc.org/release/docs/manualpages/PC/PCSHELL/" target="_blank">https://petsc.org/release/docs/manualpages/PC/PCSHELL/</a>.  </div><div><br></div><div><br><blockquote type="cite"><div><div dir="ltr"><div><br></div><div>3. Is this possible to separate preconditioning & solving procedure to check the result of each process in Petsc??</div></div></div></blockquote><div><br></div>   The KSP and the PC work together to provide an over all good solver. One can focus on the preconditioner's quality by using it with several different Krylov methods. For example the KSPRICHARDSON (-ksp_typre richardson) does essentially nothing so the convergence (or lack of convergence) is determined by the preconditioner only. For non positive definite matrices <a href="https://petsc.org/release/docs/manualpages/KSP/KSPBCGS/#kspbcgs" target="_blank">https://petsc.org/release/docs/manualpages/KSP/KSPBCGS/#kspbcgs</a> is generally weaker than  <a href="https://petsc.org/release/docs/manualpages/KSP/KSPGMRES/#kspgmres" target="_blank">https://petsc.org/release/docs/manualpages/KSP/KSPGMRES/#kspgmres</a> so how your preconditioner works with these two different KSP methods can help you evaluate the preconditioner.</div><div><br></div><div>  Feel free to ask more detailed questions as you use the PETSc solvers,</div><div><br></div><div>  Barry</div><div><br><blockquote type="cite"><div><div dir="ltr"><div><br></div><div><br></div><div>Thanks,</div><div>Hyung Kim</div></div>
</div></blockquote></div><br></div></blockquote></div>