<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=us-ascii">
<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;}
@font-face
{font-family:"Mulish Light";
panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Mulish Medium";
panose-1:0 0 0 0 0 0 0 0 0 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Mulish Light",serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
@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="EN-GB" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-family:"Mulish Light",serif">Good morning,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Mulish Light",serif">I’m observing an unexpected (to me) behaviour of my code.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Mulish Light",serif">I tried to reduce the problem in a toy code here attached.<br>
The toy code archive contains a small main, a matrix and a rhs.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Mulish Light",serif">The toy code solves the linear system and check the norms and the mean of the solution.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Mulish Light",serif">The problem into the matrix and the rhs is the finite volume discretization of the pressure equation of an incompressible NS solver.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Mulish Light",serif">It has been cooked as tiny as possible (16 cells!).<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Mulish Light",serif">It is important to say that it is an elliptic problem with homogeneous Neumann boundary conditions only, for this reason the toy code sets a null space containing the constant.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Mulish Light",serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Mulish Light",serif">The unexpected (to me) behaviour is evident by launching the code using different preconditioners, using -pc-type <pctype><br>
I tested using PCNONE (“none”), PCGAMG (“gamg”) and PCILU (“ilu”). The default solver is KSPFGMRES.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Mulish Light",serif">Using the three PC, I get 3 different solutions. It seems to me that they differ in the mean value, but GAMG is impressive.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Mulish Light",serif">PCNONE gives me the zero mean solution I expected. What about the others?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Mulish Light",serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Mulish Light",serif">Asking for residuals monitor, the ratio ||r||/||b|| shows convergence for PCNONE and PCILU (~10^-16), but it stalls for PCGAMG (~10^-4).<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Mulish Light",serif">I cannot see why. Am I doing anything wrong or incorrectly thinking about the expected behaviour?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Mulish Light",serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Mulish Light",serif">Generalizing to larger mesh the behaviour is similar.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Mulish Light",serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Mulish Light",serif">Thank you for any help.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Mulish Light",serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Mulish Medium";mso-fareast-language:EN-GB">Marco Cisternino</span><span style="mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>