petsc-3.4.2 2013-07-02

# PCBJACOBI

Use block Jacobi preconditioning, each block is (approximately) solved with its own KSP object.

### Options Database Keys

-pc_use_amat -use Amat to apply block of operator in inner Krylov method

Notes: Each processor can have one or more blocks, but a block cannot be shared by more than one processor. Defaults to one block per processor.

To set options on the solvers for each block append -sub_ to all the KSP, KSP, and PC options database keys. For example, -sub_pc_type ilu -sub_pc_factor_levels 1 -sub_ksp_type preonly

To set the options on the solvers separate for each block call PCBJacobiGetSubKSP() and set the options directly on the resulting KSP object (you can access its PC KSPGetPC())

Developer Notes: This preconditioner does not currently work with CUDA/CUSP for a couple of reasons. (1) It creates seq vectors as work vectors that should be cusp (2) The use of VecPlaceArray() is not handled properly by CUSP (that is it will not know where the ownership of the vector is so may use wrong values) even if it did know the ownership it may induce extra copy ups and downs. Satish suggests a VecTransplantArray() to handle two vectors sharing the same pointer and handling the CUSP side as well instead of VecGetArray()/VecPlaceArray().

### See Also

PCCreate(), PCSetType(), PCType (for list of available types), PC,
PCASM, PCSetUseAmat(), PCGetUseAmat(), PCBJacobiGetSubKSP(), PCBJacobiSetTotalBlocks(), PCBJacobiSetLocalBlocks(), PCSetModifySubmatrices()

Level:beginner
Location:src/ksp/pc/impls/bjacobi/bjacobi.c
Index of all PC routines
Table of Contents for all manual pages
Index of all manual pages

### Examples

src/ksp/ksp/examples/tutorials/ex7.c.html