<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div dir="ltr"></div><div dir="ltr"><br></div><div dir="ltr"><br><blockquote type="cite">On 5 Nov 2022, at 10:31 AM, Edoardo alinovi <edoardo.alinovi@gmail.com> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div dir="ltr">Matt, Barry,<div><br></div><div>Should I do any particular trick to solve block matrices in ksp? </div><div><br></div><div>I am doing a silly 3x3 cavity test case and I am struggling to converge using CG+bjacobi.</div></div></div></blockquote><div><br></div><div>This is far from the ideal preconditioner.</div><div>First, you should check that your assembly is correct and stick to PCLU.</div><div>Does the KSP report an error in this case?</div><div>Does the solution « look » acceptable?</div><div><br></div><div>Thanks,</div><div>Pierre</div><br><blockquote type="cite"><div dir="ltr"><div dir="ltr"><div> It might be I have an error in the matrix, but just to be sure I am not missing something fundamental in the setup.</div><div><br></div><div>This is my log that shows how norm residual is far to be happy:</div><div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><br></div><div><b>10000 </b>KSP unpreconditioned resid norm 2.273088479279e+03 true resid norm 2.273088479279e+03 ||r(i)||/||b|| 6.561841227018e+02</div><div> Reason =           -3</div><div> ERROR: KSP has not converged. Simulations stopped.</div><div>[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------</div><div>[0]PETSC ERROR: KSPSolve has not converged, reason DIVERGED_ITS</div></blockquote></div><div><br></div><div>Thank you</div><div><br></div></div>
</div></blockquote></body></html>