> On 5 Nov 2022, at 10:31 AM, Edoardo alinovi <edoardo.alin...@gmail.com> wrote:
> 
> 
> Matt, Barry,
> 
> Should I do any particular trick to solve block matrices in ksp? 
> 
> I am doing a silly 3x3 cavity test case and I am struggling to converge using 
> CG+bjacobi.

This is far from the ideal preconditioner.
First, you should check that your assembly is correct and stick to PCLU.
Does the KSP report an error in this case?
Does the solution « look » acceptable?

Thanks,
Pierre

> It might be I have an error in the matrix, but just to be sure I am not 
> missing something fundamental in the setup.
> 
> This is my log that shows how norm residual is far to be happy:
> 
> 10000 KSP unpreconditioned resid norm 2.273088479279e+03 true resid norm 
> 2.273088479279e+03 ||r(i)||/||b|| 6.561841227018e+02
>  Reason =           -3
>  ERROR: KSP has not converged. Simulations stopped.
> [0]PETSC ERROR: --------------------- Error Message 
> --------------------------------------------------------------
> [0]PETSC ERROR: KSPSolve has not converged, reason DIVERGED_ITS
> 
> Thank you
> 

Reply via email to