0
$\begingroup$

I am using PETSc and libmesh to solve a simple linear elastic problem with quite complicated geometry, using linear tetrahedral elements. I am always using the KSP CG as the solver.

I noticed that for certain meshes, the block-Jacobi (PCBJACOBI) preconditioner would fail to converge (DIVERGED_INDEFINITE_PC) but Jacobi (PCJACOBI) works fine. As a beginner in this field, this sounds very strange to me. Could anyone please help provide a hint?

Also, I read on the PETSc website that both Jacobi and the block-Jacobi support parallel processing. Would that mean that it'd be safe for me just to stay with Jacobi, maybe with some loss in performance?

$\endgroup$

1 Answer 1

1
$\begingroup$

pcjacobi is a Jacobi preconditioner (also known is point-Jacobi preconditioner). For this preconditioner, you just take the diagonal elements of the matrix and invert them for the future use in the iterative solver.

pcbjacobi would be a block-Jacobi preconditioner. For block-Jacobi, you don't take individual diagonal entries, but use small matrix blocks that are on the matrix diagonal. Now, you need to "invert them" whatever that means. A properly configured (block size) block-Jacobi preconditioner usually gives better convergence than point-Jacobi. However, preconditioning and iterative solvers are definitely connected to dark arts, thus you always can find some counter-examples.

Now, in your case, probably the matrix does not have any zero diagonal entries; thus point-Jacobi works fine. And the way you configure block-Jacobi results in preconditioner featuring non-invertible (or poorly invertible) blocks, leading to the preconditioning problems. I suggest you take a look at the PETSc example on block-Jacobi to identify your particular issue.

Regarding parallel processing: I would play more with your particular problem set, understand how different iterative solvers, preconditioners, and their parameters influence the convergence before evaluating the effect from parallelization. And ask it as a separate question later.

$\endgroup$
1
  • $\begingroup$ Thank you Anton! This is extremely helpful. I will read through the example you shared! :) $\endgroup$
    – Shawn Wang
    Commented May 10, 2019 at 3:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.