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 48 49 50 51 52
|
<!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.10.3 2018-12-18</b></div>
<div id="bugreport" align=right><a href="mailto:petsc-maint@mcs.anl.gov?subject=Typo or Error in Documentation &body=Please describe the typo or error in the documentation: petsc-3.10.3 v3.10.3 docs/manualpages/PC/PCBJACOBI.html "><small>Report Typos and Errors</small></a></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>
<TABLE border="0" cellpadding="0" cellspacing="0">
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pc_use_amat </B></TD><TD>- use Amat to apply block of operator in inner Krylov method
</TD></TR>
<TR><TD WIDTH=40></TD><TD ALIGN=LEFT VALIGN=TOP><B>-pc_bjacobi_blocks <n> </B></TD><TD>- use n total blocks
</TD></TR></TABLE>
<P>
<H3><FONT COLOR="#CC3333">Notes</FONT></H3>
Each processor can have one or more blocks, or a single block can be shared by several processes. 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>
For GPU-based vectors (CUDA, ViennaCL) it is recommended to use exactly one block per MPI process for best
performance. Different block partitioning may lead to additional data transfers
between host and GPU that lead to degraded performance.
<P>
The options prefix for each block is sub_, for example -sub_pc_type lu.
<P>
When multiple processes share a single block, each block encompasses exactly all the unknowns owned its set of processes.
<P>
<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></B><H3><FONT COLOR="#CC3333">Level</FONT></H3>beginner<BR>
<H3><FONT COLOR="#CC3333">Location</FONT></H3>
</B><A HREF="../../../src/ksp/pc/impls/bjacobi/bjacobi.c.html#PCBJACOBI">src/ksp/pc/impls/bjacobi/bjacobi.c</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>
<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>
</BODY></HTML>
|