<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.apple-converted-space
{mso-style-name:apple-converted-space;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 2.0cm 2.0cm 2.0cm;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="IT" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Thank you Barry.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">I added a custom atoll = 1.0e-12 and this makes the CFD stable with all the linear solver types. CFD solution is good and pressure is a good “zero” field at every CFD iteration.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">I did the same test using ASM+ILU+FGMRES(BCGS and GMRES) and the behaviour is the same.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">During some CFD iteration the residual of linear system starts slightly higher than atol and the linear solver makes some iteration (2/3 iterations) before it stops because of atol.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">The pressure is still different in the 2 sub-domains (order 1.0e-14 because of those few linear solver iterations), therefore no symmetry of the solution In the 2 sub-domains.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">I think it is a matter of round-off, do you agree on this? Or do I need to take care of this difference as a symptom of something wrong?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US">Thank you for your support.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-GB">Marco Cisternino <o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span lang="EN-GB" style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> Barry Smith <bsmith@petsc.dev>
<br>
<b>Sent:</b> giovedì 30 settembre 2021 16:39<br>
<b>To:</b> Marco Cisternino <marco.cisternino@optimad.it><br>
<b>Cc:</b> petsc-users@mcs.anl.gov<br>
<b>Subject:</b> Re: [petsc-users] Disconnected domains and Poisson equation<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
</div>
<p class="MsoNormal"><span lang="EN-GB"> It looks like the initial solution (guess) is to round-off the solution to the linear system 9.010260489109e-14<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-GB">0 KSP unpreconditioned resid norm 9.010260489109e-14 true resid norm 9.010260489109e-14 ||r(i)||/||b|| 2.021559024868e+00<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> 0 KSP Residual norm 9.010260489109e-14 % max 1.000000000000e+00 min 1.000000000000e+00 max/min 1.000000000000e+00<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> 1 KSP unpreconditioned resid norm 4.918108339808e-15 true resid norm 4.918171792537e-15 ||r(i)||/||b|| 1.103450292594e-01<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> 1 KSP Residual norm 4.918108339808e-15 % max 9.566256813737e-01 min 9.566256813737e-01 max/min 1.000000000000e+00<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> 2 KSP unpreconditioned resid norm 1.443599554690e-15 true resid norm 1.444867143493e-15 ||r(i)||/||b|| 3.241731154382e-02<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> 2 KSP Residual norm 1.443599554690e-15 % max 9.614019380614e-01 min 7.360950481750e-01 max/min 1.306083963538e+00<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB">Thus the Krylov solver will not be able to improve the solution, it then gets stuck trying to improve the solution but cannot because of round off. <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB">In other words the algorithm has converged (even at the initial solution (guess) and should stop immediately.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB">You can use -ksp_atol 1.e-12 to get it to stop immediately without iterating if the initial residual is less than 1e-12. <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB">Barry<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"><br>
<br>
<o:p></o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal"><span lang="EN-GB">On Sep 30, 2021, at 4:16 AM, Marco Cisternino <</span><a href="mailto:marco.cisternino@optimad.it"><span lang="EN-GB">marco.cisternino@optimad.it</span></a><span lang="EN-GB">> wrote:<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<div>
<div>
<p class="MsoNormal"><span lang="EN-GB">Hello Barry.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB">This is the output of ksp_view using fgmres and gamg. It has to be said that the solution of the linear system should be a zero values field. As you can see both unpreconditioned residual and r/b converge at this iteration
of the CFD solver. During the time integration of the CFD, I can observe pressure linear solver residuals behaving in a different way: unpreconditioned residual stil converges but r/b stalls. After the output of ksp_view I add the output of ksp_monitor_true_residual
for one of these iteration where r/b stalls.<br>
Thanks,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB">KSP Object: 1 MPI processes<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> type: fgmres<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> restart=30, using Classical (unmodified) Gram-Schmidt Orthogonalization with no iterative refinement<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> happy breakdown tolerance 1e-30<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> maximum iterations=100, nonzero initial guess<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> tolerances: relative=1e-05, absolute=1e-50, divergence=10000.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> right preconditioning<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> using UNPRECONDITIONED norm type for convergence test<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB">PC Object: 1 MPI processes<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> type: gamg<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> type is MULTIPLICATIVE, levels=4 cycles=v<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> Cycles per PCApply=1<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> Using externally compute Galerkin coarse grid matrices<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> GAMG specific options<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> Threshold for dropping small values in graph on each level = 0.02 0.02 <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> Threshold scaling factor for each level not specified = 1.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> AGG specific options<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> Symmetric graph true<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> Number of levels to square graph 1<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> Number smoothing steps 0<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> Coarse grid solver -- level -------------------------------<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> KSP Object: (mg_coarse_) 1 MPI processes<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> type: preonly<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> maximum iterations=10000, initial guess is zero<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> tolerances: relative=1e-05, absolute=1e-50, divergence=10000.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> left preconditioning<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> using NONE norm type for convergence test<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> PC Object: (mg_coarse_) 1 MPI processes<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> type: bjacobi<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> number of blocks = 1<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> Local solve is same for all blocks, in the following KSP and PC objects:<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> KSP Object: (mg_coarse_sub_) 1 MPI processes<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> type: preonly<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> maximum iterations=1, initial guess is zero<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> tolerances: relative=1e-05, absolute=1e-50, divergence=10000.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> left preconditioning<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> using DEFAULT norm type for convergence test<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> PC Object: (mg_coarse_sub_) 1 MPI processes<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> type: lu<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> PC has not been set up so information may be incomplete<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> out-of-place factorization<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> tolerance for zero pivot 2.22045e-14<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> using diagonal shift on blocks to prevent zero pivot [INBLOCKS]<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> matrix ordering: nd<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> linear system matrix = precond matrix:<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> <span class="apple-converted-space"> </span></span><span lang="FR">Mat Object: 1 MPI processes<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="FR"> type: seqaij<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="FR"> <span class="apple-converted-space"> </span></span><span lang="EN-GB">rows=18, cols=18<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> total: nonzeros=104, allocated nonzeros=104<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> total number of mallocs used during MatSetValues calls =0<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> not using I-node routines<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> linear system matrix = precond matrix:<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> <span class="apple-converted-space"> </span></span><span lang="FR">Mat Object: 1 MPI processes<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="FR"> type: seqaij<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="FR"> <span class="apple-converted-space"> </span></span><span lang="EN-GB">rows=18, cols=18<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> total: nonzeros=104, allocated nonzeros=104<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> total number of mallocs used during MatSetValues calls =0<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> not using I-node routines<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> Down solver (pre-smoother) on level 1 -------------------------------<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> KSP Object: (mg_levels_1_) 1 MPI processes<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> type: chebyshev<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> eigenvalue estimates used: min = 0., max = 0.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> eigenvalues estimate via gmres min 0., max 0.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> eigenvalues estimated using gmres with translations [0. 0.1; 0. 1.1]<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> KSP Object: (mg_levels_1_esteig_) 1 MPI processes<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> type: gmres<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> restart=30, using Classical (unmodified) Gram-Schmidt Orthogonalization with no iterative refinement<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> happy breakdown tolerance 1e-30<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> maximum iterations=10, initial guess is zero<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> tolerances: relative=1e-12, absolute=1e-50, divergence=10000.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> left preconditioning<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> using DEFAULT norm type for convergence test<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> estimating eigenvalues using noisy right hand side<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> maximum iterations=2, nonzero initial guess<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> tolerances: relative=1e-05, absolute=1e-50, divergence=10000.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> left preconditioning<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> using NONE norm type for convergence test<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> PC Object: (mg_levels_1_) 1 MPI processes<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> type: sor<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> type = local_symmetric, iterations = 1, local iterations = 1, omega = 1.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> linear system matrix = precond matrix:<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> Mat Object: 1 MPI processes<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> type: seqaij<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> rows=67, cols=67<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> total: nonzeros=675, allocated nonzeros=675<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> total number of mallocs used during MatSetValues calls =0<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> not using I-node routines<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> Up solver (post-smoother) same as down solver (pre-smoother)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> Down solver (pre-smoother) on level 2 -------------------------------<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> KSP Object: (mg_levels_2_) 1 MPI processes<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> type: chebyshev<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> eigenvalue estimates used: min = 0., max = 0.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> eigenvalues estimate via gmres min 0., max 0.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> eigenvalues estimated using gmres with translations [0. 0.1; 0. 1.1]<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> KSP Object: (mg_levels_2_esteig_) 1 MPI processes<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> type: gmres<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> restart=30, using Classical (unmodified) Gram-Schmidt Orthogonalization with no iterative refinement<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> happy breakdown tolerance 1e-30<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> maximum iterations=10, initial guess is zero<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> tolerances: relative=1e-12, absolute=1e-50, divergence=10000.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> left preconditioning<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> using DEFAULT norm type for convergence test<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> estimating eigenvalues using noisy right hand side<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> maximum iterations=2, nonzero initial guess<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> tolerances: relative=1e-05, absolute=1e-50, divergence=10000.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> left preconditioning<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> using NONE norm type for convergence test<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> PC Object: (mg_levels_2_) 1 MPI processes<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> type: sor<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> type = local_symmetric, iterations = 1, local iterations = 1, omega = 1.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> linear system matrix = precond matrix:<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> Mat Object: 1 MPI processes<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> type: seqaij<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> rows=348, cols=348<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> total: nonzeros=3928, allocated nonzeros=3928<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> total number of mallocs used during MatSetValues calls =0<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> not using I-node routines<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> Up solver (post-smoother) same as down solver (pre-smoother)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> Down solver (pre-smoother) on level 3 -------------------------------<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> KSP Object: (mg_levels_3_) 1 MPI processes<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> type: chebyshev<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> eigenvalue estimates used: min = 0., max = 0.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> eigenvalues estimate via gmres min 0., max 0.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> eigenvalues estimated using gmres with translations [0. 0.1; 0. 1.1]<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> KSP Object: (mg_levels_3_esteig_) 1 MPI processes<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> type: gmres<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> restart=30, using Classical (unmodified) Gram-Schmidt Orthogonalization with no iterative refinement<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> happy breakdown tolerance 1e-30<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> maximum iterations=10, initial guess is zero<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> tolerances: relative=1e-12, absolute=1e-50, divergence=10000.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> left preconditioning<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> using DEFAULT norm type for convergence test<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> estimating eigenvalues using noisy right hand side<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> maximum iterations=2, nonzero initial guess<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> tolerances: relative=1e-05, absolute=1e-50, divergence=10000.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> left preconditioning<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> using NONE norm type for convergence test<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> PC Object: (mg_levels_3_) 1 MPI processes<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> type: sor<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> type = local_symmetric, iterations = 1, local iterations = 1, omega = 1.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> linear system matrix = precond matrix:<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> Mat Object: 1 MPI processes<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> type: seqaij<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> rows=3584, cols=3584<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> total: nonzeros=23616, allocated nonzeros=23616<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> total number of mallocs used during MatSetValues calls =0<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> has attached null space<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> not using I-node routines<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> Up solver (post-smoother) same as down solver (pre-smoother)<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> linear system matrix = precond matrix:<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> Mat Object: 1 MPI processes<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> type: seqaij<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> rows=3584, cols=3584<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> total: nonzeros=23616, allocated nonzeros=23616<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> total number of mallocs used during MatSetValues calls =0<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> has attached null space<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> not using I-node routines<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> Pressure system has reached convergence in 0 iterations with reason 3.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> 0 KSP unpreconditioned resid norm 4.798763170703e-16 true resid norm 4.798763170703e-16 ||r(i)||/||b|| 1.000000000000e+00<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> 0 KSP Residual norm 4.798763170703e-16 % max 1.000000000000e+00 min 1.000000000000e+00 max/min 1.000000000000e+00<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> 1 KSP unpreconditioned resid norm 1.648749109132e-17 true resid norm 1.648749109132e-17 ||r(i)||/||b|| 3.435779284125e-02<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> 1 KSP Residual norm 1.648749109132e-17 % max 9.561792537103e-01 min 9.561792537103e-01 max/min 1.000000000000e+00<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> 2 KSP unpreconditioned resid norm 4.737880600040e-19 true resid norm 4.737880600040e-19 ||r(i)||/||b|| 9.873128619820e-04<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> 2 KSP Residual norm 4.737880600040e-19 % max 9.828636644296e-01 min 9.293131521763e-01 max/min 1.057623753767e+00<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> 3 KSP unpreconditioned resid norm 2.542212716830e-20 true resid norm 2.542212716830e-20 ||r(i)||/||b|| 5.297641551371e-05<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> 3 KSP Residual norm 2.542212716830e-20 % max 9.933572357920e-01 min 9.158303248850e-01 max/min 1.084652046127e+00<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> 4 KSP unpreconditioned resid norm 6.614510286263e-21 true resid norm 6.614510286269e-21 ||r(i)||/||b|| 1.378378146822e-05<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> 4 KSP Residual norm 6.614510286263e-21 % max 9.950912550705e-01 min 6.296575800237e-01 max/min 1.580368896747e+00<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> 5 KSP unpreconditioned resid norm 1.981505525281e-22 true resid norm 1.981505525272e-22 ||r(i)||/||b|| 4.129200493513e-07<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> 5 KSP Residual norm 1.981505525281e-22 % max 9.984097962703e-01 min 5.316259535293e-01 max/min 1.878030577029e+00<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB">Linear solve converged due to CONVERGED_RTOL iterations 5<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB">Ksp_monitor_true_residual output for stalling r/b CFD iteration<br>
0 KSP unpreconditioned resid norm 9.010260489109e-14 true resid norm 9.010260489109e-14 ||r(i)||/||b|| 2.021559024868e+00<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> <span class="apple-converted-space"> </span></span>0 KSP Residual norm 9.010260489109e-14 % max 1.000000000000e+00 min 1.000000000000e+00 max/min 1.000000000000e+00<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> 1 KSP unpreconditioned resid norm 4.918108339808e-15 true resid norm 4.918171792537e-15 ||r(i)||/||b|| 1.103450292594e-01<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> 1 KSP Residual norm 4.918108339808e-15 % max 9.566256813737e-01 min 9.566256813737e-01 max/min 1.000000000000e+00<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> 2 KSP unpreconditioned resid norm 1.443599554690e-15 true resid norm 1.444867143493e-15 ||r(i)||/||b|| 3.241731154382e-02<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> 2 KSP Residual norm 1.443599554690e-15 % max 9.614019380614e-01 min 7.360950481750e-01 max/min 1.306083963538e+00<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> 3 KSP unpreconditioned resid norm 6.623206616803e-16 true resid norm 6.654132553541e-16 ||r(i)||/||b|| 1.492933720678e-02<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> 3 KSP Residual norm 6.623206616803e-16 % max 9.764112945239e-01 min 4.911485418014e-01 max/min 1.988016274960e+00<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> 4 KSP unpreconditioned resid norm 6.551896936698e-16 true resid norm 6.646157296305e-16 ||r(i)||/||b|| 1.491144376933e-02<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> 4 KSP Residual norm 6.551896936698e-16 % max 9.883425885532e-01 min 1.461270778833e-01 max/min 6.763582786091e+00<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> 5 KSP unpreconditioned resid norm 6.222297644887e-16 true resid norm 1.720560536914e-15 ||r(i)||/||b|| 3.860282047823e-02<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> 5 KSP Residual norm 6.222297644887e-16 % max 1.000409371755e+00 min 4.989767363560e-03 max/min 2.004921870829e+02<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> 6 KSP unpreconditioned resid norm 6.496945794974e-17 true resid norm 2.031914800253e-14 ||r(i)||/||b|| 4.558842341106e-01<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> 6 KSP Residual norm 6.496945794974e-17 % max 1.004914985753e+00 min 1.459258738706e-03 max/min 6.886475709192e+02<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> 7 KSP unpreconditioned resid norm 1.965237342540e-17 true resid norm 1.684522207337e-14 ||r(i)||/||b|| 3.779425772373e-01<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> 7 KSP Residual norm 1.965237342540e-17 % max 1.005737762541e+00 min 1.452603803766e-03 max/min 6.923689446035e+02<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> 8 KSP unpreconditioned resid norm 1.627718951285e-17 true resid norm 1.958642967520e-14 ||r(i)||/||b|| 4.394448276241e-01<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> 8 KSP Residual norm 1.627718951285e-17 % max 1.006364278765e+00 min 1.452081813014e-03 max/min 6.930492963590e+02<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> 9 KSP unpreconditioned resid norm 1.616577677764e-17 true resid norm 2.019110946644e-14 ||r(i)||/||b|| 4.530115373837e-01<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> 9 KSP Residual norm 1.616577677764e-17 % max 1.006648747131e+00 min 1.452031376577e-03 max/min 6.932692801059e+02<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">10 KSP unpreconditioned resid norm 1.285788988203e-17 true resid norm 2.065082694477e-14 ||r(i)||/||b|| 4.633258453698e-01<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">10 KSP Residual norm 1.285788988203e-17 % max 1.007469033514e+00 min 1.433291867068e-03 max/min 7.029057072477e+02<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">11 KSP unpreconditioned resid norm 5.490854431580e-19 true resid norm 1.798071628891e-14 ||r(i)||/||b|| 4.034187394623e-01<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">11 KSP Residual norm 5.490854431580e-19 % max 1.008058905554e+00 min 1.369401685301e-03 max/min 7.361309076612e+02<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">12 KSP unpreconditioned resid norm 1.371754802104e-20 true resid norm 1.965688920064e-14 ||r(i)||/||b|| 4.410256708163e-01<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">12 KSP Residual norm 1.371754802104e-20 % max 1.008409402214e+00 min 1.369243011779e-03 max/min 7.364721919624e+02<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB">Linear solve converged due to CONVERGED_RTOL iterations 12<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> <o:p></o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-GB">Marco Cisternino<span class="apple-converted-space"> </span><o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> <o:p></o:p></span></p>
</div>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<div>
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span class="apple-converted-space"><span lang="EN-US"> </span></span><span lang="EN-US">Barry Smith <</span><a href="mailto:bsmith@petsc.dev"><span lang="EN-US">bsmith@petsc.dev</span></a><span lang="EN-US">><span class="apple-converted-space"> </span><br>
<b>Sent:</b><span class="apple-converted-space"> </span>mercoledì 29 settembre 2021 18:34<br>
<b>To:</b><span class="apple-converted-space"> </span>Marco Cisternino <</span><a href="mailto:marco.cisternino@optimad.it"><span lang="EN-US">marco.cisternino@optimad.it</span></a><span lang="EN-US">><br>
<b>Cc:</b><span class="apple-converted-space"> </span></span><a href="mailto:petsc-users@mcs.anl.gov"><span lang="EN-US">petsc-users@mcs.anl.gov</span></a><span lang="EN-US"><br>
<b>Subject:</b><span class="apple-converted-space"> </span>Re: [petsc-users] Disconnected domains and Poisson equation</span><span lang="EN-GB"><o:p></o:p></span></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> <o:p></o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-GB"><br>
<br>
<br>
<o:p></o:p></span></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal"><span lang="EN-GB">On Sep 29, 2021, at 11:59 AM, Marco Cisternino <</span><a href="mailto:marco.cisternino@optimad.it"><span lang="EN-GB">marco.cisternino@optimad.it</span></a><span lang="EN-GB">> wrote:<o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> <o:p></o:p></span></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-GB">For sake of completeness, explicitly building the null space using a vector per sub-domain make s the CFD runs using BCGS and GMRES more stable, but still slower than FGMRES.<o:p></o:p></span></p>
</div>
</div>
</div>
</blockquote>
<div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> <o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> Something is strange. Please run with -ksp_view and send the output on the solver details.<o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-GB"><br>
<br>
<br>
<o:p></o:p></span></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-GB">I had divergence using BCGS and GMRES setting the null space with only one constant.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB">Thanks<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> <o:p></o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-GB">Marco Cisternino<span class="apple-converted-space"> </span><o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> <o:p></o:p></span></p>
</div>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<div>
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span class="apple-converted-space"><span lang="EN-US"> </span></span><span lang="EN-US">Marco Cisternino<span class="apple-converted-space"> </span><br>
<b>Sent:</b><span class="apple-converted-space"> </span>mercoledì 29 settembre 2021 17:54<br>
<b>To:</b><span class="apple-converted-space"> </span>Barry Smith <</span><a href="mailto:bsmith@petsc.dev"><span lang="EN-US">bsmith@petsc.dev</span></a><span lang="EN-US">><br>
<b>Cc:</b><span class="apple-converted-space"> </span></span><a href="mailto:petsc-users@mcs.anl.gov"><span lang="EN-US">petsc-users@mcs.anl.gov</span></a><span lang="EN-US"><br>
<b>Subject:</b><span class="apple-converted-space"> </span>RE: [petsc-users] Disconnected domains and Poisson equation</span><span lang="EN-GB"><o:p></o:p></span></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> <o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB">Thank you Barry for the quick reply.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB">About the null space: I already tried what you suggest, building 2 Vec (constants) with 0 and 1 chosen by sub-domain, normalizing them and setting the null space like this<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB">MatNullSpaceCreate(PETSC_COMM_WORLD,PETSC_FALSE,nconstants,constants,&nullspace);<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB">The solution is slightly different in values but it is still different in the two sub-domains.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB">About the solver: I tried BCGS, GMRES and FGMRES. The linear system is a pressure system in a navier-stokes solver and only solving with FGMRES makes the CFD stable, with BCGS and GMRES the CFD solution diverges. Moreover,
in the same case but with a single domain, CFD solution is stable using all the solvers, but FGMRES converges in much less iterations than the others.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> <o:p></o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-GB">Marco Cisternino<span class="apple-converted-space"> </span><o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> <o:p></o:p></span></p>
</div>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<div>
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span class="apple-converted-space"><span lang="EN-US"> </span></span><span lang="EN-US">Barry Smith <</span><a href="mailto:bsmith@petsc.dev"><span lang="EN-US">bsmith@petsc.dev</span></a><span lang="EN-US">><span class="apple-converted-space"> </span><br>
<b>Sent:</b><span class="apple-converted-space"> </span>mercoledì 29 settembre 2021 15:59<br>
<b>To:</b><span class="apple-converted-space"> </span>Marco Cisternino <</span><a href="mailto:marco.cisternino@optimad.it"><span lang="EN-US">marco.cisternino@optimad.it</span></a><span lang="EN-US">><br>
<b>Cc:</b><span class="apple-converted-space"> </span></span><a href="mailto:petsc-users@mcs.anl.gov"><span lang="EN-US">petsc-users@mcs.anl.gov</span></a><span lang="EN-US"><br>
<b>Subject:</b><span class="apple-converted-space"> </span>Re: [petsc-users] Disconnected domains and Poisson equation</span><span lang="EN-GB"><o:p></o:p></span></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> <o:p></o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> <o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> The problem actually has a two dimensional null space; constant on each domain but possibly different constants. I think you need to build the MatNullSpace by explicitly constructing two vectors, one with 0 on one domain
and constant value on the other and one with 0 on the other domain and constant on the first. <o:p></o:p></span></p>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> <o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> Separate note: why use FGMRES instead of just GMRES? If the problem is linear and the preconditioner is linear (no GMRES inside the smoother) then you can just use GMRES and it will save a little space/work and be
conceptually clearer.<o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> <o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> Barry<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span lang="EN-GB"> <o:p></o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal"><span lang="EN-GB">On Sep 29, 2021, at 8:46 AM, Marco Cisternino <</span><a href="mailto:marco.cisternino@optimad.it"><span lang="EN-GB">marco.cisternino@optimad.it</span></a><span lang="EN-GB">> wrote:<o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> <o:p></o:p></span></p>
</div>
<div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-GB">Good morning,<o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-GB">I want to solve the Poisson equation on a 3D domain with 2 non-connected sub-domains.<o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-GB">I am using FGMRES+GAMG and I have no problem if the two sub-domains see a Dirichlet boundary condition each.<o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-GB">On the same domain I would like to solve the Poisson equation imposing periodic boundary condition in one direction and homogenous Neumann boundary conditions in the other two directions. The two sub-domains are symmetric
with respect to the separation between them and the operator discretization and the right hand side are symmetric as well. It would be nice to have the same solution in both the sub-domains.<o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-GB">Setting the null space to the constant, the solver converges to a solution having the same gradients in both sub-domains but different values.<o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-GB">Am I doing some wrong with the null space? I’m not setting a block matrix (one block for each sub-domain), should I?<o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-GB">I tested the null space against the matrix using MatNullSpaceTest and the answer is true. Can I do something more to have a symmetric solution as outcome of the solver?<o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-GB">Thank you in advance for any comments and hints.<o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> <o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-GB">Best regards,</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-GB"> </span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-GB">Marco Cisternino</span><o:p></o:p></p>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>