<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt"><div class="" style="">What if I use <span style="font-size: 12pt;" class="">-pc_type</span><span style="font-size: 12pt;" class=""> asm? Will the communication be avoided in this special case?</span></div><div class="" style="color: rgb(0, 0, 0); font-size: 12pt; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;"><span style="font-size: 12pt;" class=""><br></span></div><div class="" style="color: rgb(0, 0, 0); font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;"><span style="font-size: 12pt;" class="">Thanks,</span></div><div class="" style="color: rgb(0, 0, 0); font-size: 12pt;
 font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal;"><span style="font-size: 12pt;" class="">Qin</span></div><div class="" style=""><br class="" style=""></div>  <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;" class=""> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;" class=""> <div dir="ltr" class="" style=""> <hr size="1" class="" style="">  <font size="2" face="Arial" class="" style=""> <b class="" style=""><span style="font-weight:bold;" class="">From:</span></b> Barry Smith <bsmith@mcs.anl.gov><br class="" style=""> <b class="" style=""><span style="font-weight: bold;" class="">To:</span></b> Qin Lu <lu_qin_2000@yahoo.com> <br class="" style=""><b class="" style=""><span style="font-weight: bold;"
 class="">Cc:</span></b> Petsc-users <petsc-users@mcs.anl.gov> <br class="" style=""> <b class="" style=""><span style="font-weight: bold;" class="">Sent:</span></b> Monday, August 25, 2014 8:19 PM<br class="" style=""> <b class="" style=""><span style="font-weight: bold;" class="">Subject:</span></b> Re: [petsc-users] Solve of subdomains without connections<br class="" style=""> </font> </div> <div class="" style=""><br class="" style=""><br clear="none" class="" style="">On Aug 25, 2014, at 5:18 PM, Qin Lu <<a shape="rect" ymailto="mailto:lu_qin_2000@yahoo.com" href="mailto:lu_qin_2000@yahoo.com" class="" style="">lu_qin_2000@yahoo.com</a>> wrote:<br clear="none" class="" style=""><br clear="none" class="" style="">> Hello,<br clear="none" class="" style="">>  <br clear="none" class="" style="">> I am using PETSc ksp solver to solve a problem on a physical domain. The domain is splitted to subdomains in such a way that there
 is no connections between them, but I still have to solve the whole domain as a single linear system. My questions are:<br clear="none" class="" style="">>  <br clear="none" class="" style="">> 1. Does PETSc detect that the matrix is a block diagonal matrix and solve it efficiently?<br clear="none" class="" style="">> 2. In parallel solve, each subdoamin is assigned to a separate process. Does PETSc solve the system efficiently by avoiding all the unnecessary parallel message passing since there is no connections between processes?<br clear="none" class="" style=""><br clear="none" class="" style="">   If you use block Jacobi preconditioner then there will be no communication during the matrix-vector product nor the preconditioner. However the global reductions for the default Krylov method GMRES will still occur.  To eliminate the global reductions use for a solve<br clear="none" class="" style=""><br clear="none" class=""
 style="">   -ksp_type preonly -pc_type bjacobi   -sub_ksp_type gmres (or whatever Krylov method you want on each process) -sub_pc_type ilu (or whatever preconditioner you want on each process).<br clear="none" class="" style=""> <br clear="none" class="" style="">   Now there will be no communication during the linear solve.<br clear="none" class="" style=""><br clear="none" class="" style="">  Barry<div class="" id="yqtfd59009" style=""><br clear="none" class="" style=""><br clear="none" class="" style="">>  <br clear="none" class="" style="">> Thanks,<br clear="none" class="" style="">> Qin<br clear="none" class="" style="">> <br clear="none" class="" style="">> <br clear="none" class="" style=""></div><br class="" style=""><br class="" style=""></div> </div> </div>  </div></body></html>