1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML3.2 EN">
<HTML>
<HEAD> <link rel="canonical" href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCBJACOBI.html" />
<META NAME="GENERATOR" CONTENT="DOCTEXT">
<TITLE>PCBJACOBI</TITLE>
</HEAD>
<BODY BGCOLOR="FFFFFF">
<div id="version" align=right><b>petsc-3.4.2 2013-07-02</b></div>
<A NAME="PCBJACOBI"><H1>PCBJACOBI</H1></A>
Use block Jacobi preconditioning, each block is (approximately) solved with its own <A HREF="../KSP/KSP.html#KSP">KSP</A> object.
<H3><FONT COLOR="#CC3333">Options Database Keys</FONT></H3>
<DT><B>-pc_use_amat </B> -use Amat to apply block of operator in inner Krylov method
<br>
<P>
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.
<P>
To set options on the solvers for each block append -sub_ to all the <A HREF="../KSP/KSP.html#KSP">KSP</A>, <A HREF="../KSP/KSP.html#KSP">KSP</A>, and <A HREF="../PC/PC.html#PC">PC</A>
options database keys. For example, -sub_pc_type ilu -sub_pc_factor_levels 1 -sub_ksp_type preonly
<P>
To set the options on the solvers separate for each block call <A HREF="../PC/PCBJacobiGetSubKSP.html#PCBJacobiGetSubKSP">PCBJacobiGetSubKSP</A>()
and set the options directly on the resulting <A HREF="../KSP/KSP.html#KSP">KSP</A> object (you can access its <A HREF="../PC/PC.html#PC">PC</A>
<A HREF="../KSP/KSPGetPC.html#KSPGetPC">KSPGetPC</A>())
<P>
<P>
<P>
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 <A HREF="../Vec/VecPlaceArray.html#VecPlaceArray">VecPlaceArray</A>() 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 <A HREF="../Vec/VecGetArray.html#VecGetArray">VecGetArray</A>()/<A HREF="../Vec/VecPlaceArray.html#VecPlaceArray">VecPlaceArray</A>().
<P>
<P>
<H3><FONT COLOR="#CC3333">See Also</FONT></H3>
<A HREF="../PC/PCCreate.html#PCCreate">PCCreate</A>(), <A HREF="../PC/PCSetType.html#PCSetType">PCSetType</A>(), <A HREF="../PC/PCType.html#PCType">PCType</A> (for list of available types), <A HREF="../PC/PC.html#PC">PC</A>,
<BR><A HREF="../PC/PCASM.html#PCASM">PCASM</A>, <A HREF="../PC/PCSetUseAmat.html#PCSetUseAmat">PCSetUseAmat</A>(), <A HREF="../PC/PCGetUseAmat.html#PCGetUseAmat">PCGetUseAmat</A>(), <A HREF="../PC/PCBJacobiGetSubKSP.html#PCBJacobiGetSubKSP">PCBJacobiGetSubKSP</A>(), <A HREF="../PC/PCBJacobiSetTotalBlocks.html#PCBJacobiSetTotalBlocks">PCBJacobiSetTotalBlocks</A>(),
<A HREF="../PC/PCBJacobiSetLocalBlocks.html#PCBJacobiSetLocalBlocks">PCBJacobiSetLocalBlocks</A>(), PCSetModifySubmatrices()
<P><B><P><B><FONT COLOR="#CC3333">Level:</FONT></B>beginner
<BR><FONT COLOR="#CC3333">Location:</FONT></B><A HREF="../../../src/ksp/pc/impls/bjacobi/bjacobi.c.html#PCBJACOBI">src/ksp/pc/impls/bjacobi/bjacobi.c</A>
<BR><A HREF="./index.html">Index of all PC routines</A>
<BR><A HREF="../../index.html">Table of Contents for all manual pages</A>
<BR><A HREF="../singleindex.html">Index of all manual pages</A>
<P><H3><FONT COLOR="#CC3333">Examples</FONT></H3>
<A HREF="../../../src/ksp/ksp/examples/tutorials/ex7.c.html">src/ksp/ksp/examples/tutorials/ex7.c.html</A><BR>
</BODY></HTML>
|