<html 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:Aptos;
panose-1:2 11 0 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:12.0pt;
font-family:"Aptos",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.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Aptos",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="en-CH" link="blue" vlink="purple" style="word-wrap:break-word;line-break:after-white-space">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"> </span><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">></span><span style="font-size:11.0pt;mso-fareast-language:EN-US">In my reading, it says <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">>Residual norms for firedrake_0_ solve.</span><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">> 0 KSP Residual norm 4.621368953027e+02</span><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"> <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">></span><span style="font-size:11.0pt;mso-fareast-language:EN-US"> so the residual in the first (0th) split does correspond to the outer-most KSP residual norm
(not printed but equal to the SNES at the first iteration of Newton.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">></span><span style="font-size:11.0pt;mso-fareast-language:EN-US"> It is the residual norm of the first field of the first field that is 1<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">>Residual norms for firedrake_0_fieldsplit_0_ solve.</span><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"> > 0 KSP Residual norm 1.000000000000e+00</span><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">Residual norms for firedrake_0_ solve.</span><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"> 0 KSP Residual norm 4.621368953027e+02<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">Is the residual of the outer solve (it is being printed).
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">Residual norms for firedrake_0_fieldsplit_0_ solve.</span><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"> 0 KSP Residual norm 1.000000000000e+00</span><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">Is the residual of the first field. I am not sure what you are referring to with “</span><span style="font-size:11.0pt;mso-fareast-language:EN-US">the residual norm
of the first field of the first field</span><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">”<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US">Miguel<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">
</p>
<table style="WIDTH: 409px" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; WIDTH: 260px; PADDING-BOTTOM: 20px" valign="top" class=""><br></td><td style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; WIDTH: 149px; PADDING-BOTTOM: 20px" valign="top" class=""><br></td></tr><tr><td valign="top" colspan="1" style="width: 260px; font-family: Arial; color: rgb(138, 138, 140); font-size: 8pt; line-height: 14pt; padding: 0px 0px 15px;" class=""><span data-codetwo-visible="Name"><b style="COLOR: #1b1464">MIGUEL ANGEL SALAZAR DE TROYA<br></b></span><span style="FONT-SIZE: 8pt; COLOR: #8a8a8c"><span data-codetwo-visible="Job title">Head of Software Engineering</span></span><br><span data-codetwo-visible="Email"><a style="FONT-SIZE: 8pt; TEXT-DECORATION: underline; COLOR: #8a8a8c" href="mailto:miguel.salazar@corintis.com"><em>miguel.salazar@corintis.com</em></a><br></span><span data-codetwo-visible="Phone">Corintis SA<br></span><span data-codetwo-visible="Company address">EPFL Innovation Park Building C<br>1015 Lausanne<br></span></td><td valign="top" colspan="1" style="width: 149px; font-family: Arial; line-height: 14pt; padding: 0px 0px 15px;" class=""><img src="cid:2024-08-1609_02_11-re_mailmigrationfromgoogletooffice365-sebastien.gobel@corintis.com-co_4456a1bf-dd3e-46b7-85f9-21f278e66a79.png" border="0" id="0.k3axcrzm7nf" alt="www.corintis.com" style="width: 247px; height: 97px;" width="247" height="97"></td>
</tr>
<tr data-codetwo-visible="Disclaimer">
<td style="FONT-SIZE: 7pt; FONT-FAMILY: Arial; WIDTH: 409px; COLOR: #ffffff; PADDING-BOTTOM: 3px; PADDING-TOP: 3px; PADDING-LEFT: 10px; PADDING-RIGHT: 10px; BACKGROUND-COLOR: #1b1464" valign="top" colspan="2">Here at Corintis we care for your privacy. That is why we have taken appropriate
measures to ensure that the data you have provided to us is always secure.</td>
</tr>
</tbody>
</table>
<div id="mail-editor-reference-message-container">
<div>
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="color:black">From:
</span></b><span style="color:black">Barry Smith <bsmith@petsc.dev><br>
<b>Date: </b>Tuesday, 17 September 2024 at 16:24<br>
<b>To: </b>miguel.salazar <miguel.salazar@corintis.com><br>
<b>Cc: </b>petsc-users@mcs.anl.gov <petsc-users@mcs.anl.gov><br>
<b>Subject: </b>Re: [petsc-users] Residual at the fieldsplit level<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div id="mail-editor-reference-message-container">
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">Initial residual: 462.13689530272404</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> 0 SNES Function norm 4.621368953027e+02</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> Residual norms for firedrake_0_ solve.</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> 0 KSP Residual norm 4.621368953027e+02</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> Residual norms for firedrake_0_fieldsplit_0_ solve.</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> <span class="apple-converted-space"> </span></span><span lang="IT-CH" style="font-size:11.0pt">0 KSP Residual norm 1.000000000000e+00</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="IT-CH" style="font-size:11.0pt"> 1 KSP Residual norm 3.501082228626e-15</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="IT-CH" style="font-size:11.0pt"> <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:11.0pt">Residual norms for firedrake_0_fieldsplit_1_ solve.</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> <span class="apple-converted-space"> </span></span><span lang="IT-CH" style="font-size:11.0pt">0 KSP Residual norm 0.000000000000e+00</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="IT-CH" style="font-size:11.0pt"> 1 KSP Residual norm 0.000000000000e+00</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="IT-CH" style="font-size:11.0pt"> <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:11.0pt">1 KSP Residual norm 1.612167203819e-12</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> 1 SNES Function norm 1.599350481360e-12<br>
```</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> </span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">Using the fieldsplit additive preconditioner, the problem converges in a single KSP iteration, as expected. However, I do not understand<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:11.0pt">why
the</span><span class="apple-converted-space"><span style="font-size:11.0pt"> </span></span><span style="font-size:11.0pt">residual of fieldsplit_0 (1e+0) does not coincide with the outer residual (462.13689530272404)</span><span lang="EN-US" style="font-size:11.0pt">.
It should be the case given that only<span class="apple-converted-space"> </span></span><span style="font-size:11.0pt">fieldsplit_0 has</span><span class="apple-converted-space"><span lang="EN-US" style="font-size:11.0pt"> </span></span><span lang="EN-US" style="font-size:11.0pt">a
non-zero residual contribution</span><span style="font-size:11.0pt">. The fact that it is just 1 is suspicious. Is there something about how the fieldsplit works that I am missing?</span><o:p></o:p></p>
</div>
</div>
</blockquote>
</div>
</div>
</blockquote>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"> In my reading, it says <o:p></o:p></p>
</div>
<div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div id="mail-editor-reference-message-container">
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">Residual norms for firedrake_0_ solve.</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> 0 KSP Residual norm 4.621368953027e+02</span><o:p></o:p></p>
</div>
</div>
</blockquote>
</div>
</div>
</blockquote>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> so the <span style="font-size:11.0pt">residual in the first (0th) split does correspond to the outer-most KSP residual norm (not printed but equal to the SNES at the first iteration of Newton.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> It is the residual norm of the first field of the first field that is 1</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div id="mail-editor-reference-message-container">
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">Residual norms for firedrake_0_fieldsplit_0_ solve.</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> <span class="apple-converted-space"> </span></span><span lang="IT-CH" style="font-size:11.0pt">0 KSP Residual norm 1.000000000000e+00</span><o:p></o:p></p>
</div>
</div>
</blockquote>
</div>
</div>
</blockquote>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"> Or am I missing something<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"> Barry<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">Initial residual: 462.13689530272404</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> 0 SNES Function norm 4.621368953027e+02</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> Residual norms for firedrake_0_ solve.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> 0 KSP Residual norm 4.621368953027e+02</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> Residual norms for firedrake_0_ solve.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> 0 KSP unpreconditioned resid norm 4.621368953027e+02 true resid norm 4.621368953027e+02 ||r(i)||/||b|| 1.000000000000e+00</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> Residual norms for firedrake_0_fieldsplit_0_ solve.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> 0 KSP Residual norm 1.000000000000e+00</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> Residual norms for firedrake_0_fieldsplit_0_ solve.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> </span><span lang="IT-CH" style="font-size:11.0pt">0 KSP none resid norm 1.000000000000e+00 true resid norm 3.501082228626e-15 ||r(i)||/||b|| 3.501082228626e-15</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="IT-CH" style="font-size:11.0pt"> 1 KSP Residual norm 3.501082228626e-15</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="IT-CH" style="font-size:11.0pt"> 1 KSP none resid norm 3.501082228626e-15 true resid norm 3.501082228626e-15 ||r(i)||/||b|| 3.501082228626e-15</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="IT-CH" style="font-size:11.0pt"> </span><span lang="EN-US" style="font-size:11.0pt">Residual norms for firedrake_0_fieldsplit_1_ solve.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> 0 KSP Residual norm 0.000000000000e+00</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> Residual norms for firedrake_0_fieldsplit_1_ solve.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> 0 KSP none resid norm 0.000000000000e+00 true resid norm 0.000000000000e+00 ||r(i)||/||b|| inf</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> 1 KSP Residual norm 0.000000000000e+00</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> 1 KSP none resid norm 0.000000000000e+00 true resid norm 0.000000000000e+00 ||r(i)||/||b|| inf</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> 1 KSP Residual norm 1.612167203819e-12</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> 1 KSP unpreconditioned resid norm 1.612167203819e-12 true resid norm 1.589286585800e-12 ||r(i)||/||b|| 3.438995245681e-15</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> 1 SNES Function norm 1.599350481360e-12</span><o:p></o:p></p>
</div>
</div>
</blockquote>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><br>
<br>
<o:p></o:p></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<p class="MsoNormal">On Sep 17, 2024, at 1:04<span style="font-family:"Arial",sans-serif"> </span>AM, miguel.salazar <miguel.salazar@corintis.com> wrote:<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">These are the new options (with ksp_monitor_true_residual)<br>
<br>
solver_mumps_assembled = {</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> "ksp_type": "preonly",</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> "ksp_monitor": None,</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> "ksp_monitor_true_residual": None,</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> "pc_type": "python",</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> "pc_python_type": "firedrake.AssembledPC",</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> "assembled_pc_type": "lu",</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> "assembled_pc_factor_mat_solver_type": "mumps",</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> "assembled_mat_mumps_icntl_14": 200,</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> "assembled_mat_mumps_icntl_24": 1,</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">}</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">solver_fieldsplit = {</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> "mat_type": "matfree",</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> "snes_monitor": None,</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> "snes_type": "newtonls",</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> "ksp_type": "fgmres",</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> "ksp_monitor_true_residual": None,</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> <span class="apple-converted-space"> </span></span><span lang="IT-CH" style="font-size:11.0pt">"ksp_rtol": 1e-1,</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="IT-CH" style="font-size:11.0pt"> "ksp_monitor": None,</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="IT-CH" style="font-size:11.0pt"> <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:11.0pt">"pc_type": "fieldsplit",</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> "pc_fieldsplit_type": "additive",</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> "fieldsplit_0": solver_mumps_assembled,</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> "fieldsplit_1": solver_mumps_assembled,</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">}</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">And this is the output</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">Initial residual: 462.13689530272404</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> 0 SNES Function norm 4.621368953027e+02</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> Residual norms for firedrake_0_ solve.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> 0 KSP Residual norm 4.621368953027e+02</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> Residual norms for firedrake_0_ solve.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> 0 KSP unpreconditioned resid norm 4.621368953027e+02 true resid norm 4.621368953027e+02 ||r(i)||/||b|| 1.000000000000e+00</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> Residual norms for firedrake_0_fieldsplit_0_ solve.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> 0 KSP Residual norm 1.000000000000e+00</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> Residual norms for firedrake_0_fieldsplit_0_ solve.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> <span class="apple-converted-space"> </span></span><span lang="IT-CH" style="font-size:11.0pt">0 KSP none resid norm 1.000000000000e+00 true resid norm 3.501082228626e-15 ||r(i)||/||b|| 3.501082228626e-15</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="IT-CH" style="font-size:11.0pt"> 1 KSP Residual norm 3.501082228626e-15</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="IT-CH" style="font-size:11.0pt"> 1 KSP none resid norm 3.501082228626e-15 true resid norm 3.501082228626e-15 ||r(i)||/||b|| 3.501082228626e-15</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="IT-CH" style="font-size:11.0pt"> <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:11.0pt">Residual norms for firedrake_0_fieldsplit_1_ solve.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> 0 KSP Residual norm 0.000000000000e+00</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> Residual norms for firedrake_0_fieldsplit_1_ solve.</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> 0 KSP none resid norm 0.000000000000e+00 true resid norm 0.000000000000e+00 ||r(i)||/||b|| inf</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> 1 KSP Residual norm 0.000000000000e+00</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> 1 KSP none resid norm 0.000000000000e+00 true resid norm 0.000000000000e+00 ||r(i)||/||b|| inf</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> 1 KSP Residual norm 1.612167203819e-12</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> 1 KSP unpreconditioned resid norm 1.612167203819e-12 true resid norm 1.589286585800e-12 ||r(i)||/||b|| 3.438995245681e-15</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> 1 SNES Function norm 1.599350481360e-12</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">The true residual is very low. (</span><span lang="IT-CH" style="font-size:11.0pt">3.501082228626e-15)</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"><o:p> </o:p></span></p>
</div>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="409" style="width:306.75pt">
<tbody>
<tr>
<td width="260" valign="top" style="width:195.0pt;padding:0cm 0cm 15.0pt 0cm"></td>
<td width="149" valign="top" style="width:111.75pt;padding:0cm 0cm 15.0pt 0cm"></td>
</tr>
<tr>
<td width="260" valign="top" style="width:195.0pt;padding:0cm 0cm 11.25pt 0cm">
<p class="MsoNormal" style="line-height:14.0pt"><b><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#1B1464">MIGUEL ANGEL SALAZAR DE TROYA<br>
</span></b><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#8A8A8C">Head of Software Engineering<br>
<a href="mailto:miguel.salazar@corintis.com"><em><span style="font-family:"Arial",sans-serif;color:#8A8A8C">miguel.salazar@corintis.com</span></em></a><br>
Corintis SA<br>
EPFL Innovation Park Building C<br>
1015 Lausanne<br>
<br>
<o:p></o:p></span></p>
</td>
<td width="149" valign="top" style="width:111.75pt;padding:0cm 0cm 11.25pt 0cm">
<p class="MsoNormal" style="line-height:14.0pt"><span style="font-family:"Arial",sans-serif"><2024-08-1609_02_11-re_mailmigrationfromgoogletooffice365-sebastien.gobel@corintis.com-co_4456a1bf-dd3e-46b7-85f9-21f278e66a79.png><o:p></o:p></span></p>
</td>
</tr>
<tr>
<td width="409" colspan="2" valign="top" style="width:306.75pt;background:#1B1464;padding:2.25pt 7.5pt 2.25pt 7.5pt">
<p class="MsoNormal"><span style="font-size:7.0pt;font-family:"Arial",sans-serif;color:white">Here at Corintis we care for your privacy. That is why we have taken appropriate measures to ensure that the data you have provided to us is always secure.<o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
<div id="mail-editor-reference-message-container">
<div>
<div>
<div style="border:none;border-top:solid windowtext 1.0pt;padding:3.0pt 0cm 0cm 0cm;border-color:currentcolor currentcolor">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b>From:<span class="apple-converted-space"> </span></b>Barry Smith <<a href="mailto:bsmith@petsc.dev">bsmith@petsc.dev</a>><br>
<b>Date:<span class="apple-converted-space"> </span></b>Monday, 16 September 2024 at 19:34<br>
<b>To:<span class="apple-converted-space"> </span></b>miguel.salazar <<a href="mailto:miguel.salazar@corintis.com">miguel.salazar@corintis.com</a>><br>
<b>Cc:<span class="apple-converted-space"> </span></b><a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a><span class="apple-converted-space"> </span><<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>><br>
<b>Subject:<span class="apple-converted-space"> </span></b>Re: [petsc-users] Residual at the fieldsplit level<o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"> Try ksp_monitor_true_residual. Let's see if it is an issue of preconditioned vs unpreconditioned residual.<o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p> </o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal">On Sep 16, 2024, at 1:05<span style="font-family:"Arial",sans-serif"> </span>PM, miguel.salazar <<a href="mailto:miguel.salazar@corintis.com">miguel.salazar@corintis.com</a>> wrote:<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">Hello,</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> </span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">I have this simple example on Firedrake to illustrate my point. I am solving for a two-component poisson equation (uncoupled). Only the first component has a non-zero residual.<br>
<br>
```<br>
</span><span style="font-size:11.0pt">import firedrake as fd</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">from firedrake import inner, grad, dx, sin, pi</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">N = 10</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">mesh = fd.UnitSquareMesh(N, N)</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">V = fd.FunctionSpace(mesh, "CG", 1)</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">W = V * V</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">u = fd.Function(W)</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">v = fd.TestFunction(W)</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">a = inner(grad(u[0]), grad(v[0])) * dx + inner(grad(u[1]), grad(v[1])) * dx</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">x = fd.SpatialCoordinate(mesh)</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">f = fd.Function(V)</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">f.interpolate(fd.Constant(1e4) * sin(x[0] * pi) * sin(2 * x[1] * pi))</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">L = f * v[0] * dx</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">F = a - L</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">bcs = [fd.DirichletBC(W.sub(0), fd.Constant(2.0), (1,))]</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">def snes_firedrake_residual(F, u, bcs):</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> for bcs_ in bcs:</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> bcs_.apply(u)</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> residual = fd.assemble(F, bcs=bcs, zero_bc_nodes=True)</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> with residual.dat.vec_ro as r:</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> print("Initial residual:", r.norm())</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">snes_firedrake_residual(F, u, bcs)</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">problem = fd.NonlinearVariationalProblem(F, u, bcs=bcs)</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">solver_mumps_assembled = {</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> "ksp_type": "preonly",</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> "ksp_monitor": None,</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> "pc_type": "python",</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> "pc_python_type": "firedrake.AssembledPC",</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> "assembled_pc_type": "lu",</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> "assembled_pc_factor_mat_solver_type": "mumps",</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> "assembled_mat_mumps_icntl_14": 200,</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> "assembled_mat_mumps_icntl_24": 1,</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">}</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">solver_fieldsplit = {</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> "mat_type": "matfree",</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> "snes_type": "newtonls",</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> "ksp_type": "fgmres",</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> "ksp_rtol": 1e-1,</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> "ksp_monitor": None,</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> "pc_type": "fieldsplit",</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> "pc_fieldsplit_type": "additive",</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> "fieldsplit_0": solver_mumps_assembled,</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> "fieldsplit_1": solver_mumps_assembled,</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">}</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt"> </span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">solver = fd.NonlinearVariationalSolver(problem, solver_parameters=solver_fieldsplit)</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">solver.solve()</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">```<br>
<br>
The PETSc output is as follow<br>
<br>
```<br>
Initial residual: 462.13689530272404</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> 0 SNES Function norm 4.621368953027e+02</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> Residual norms for firedrake_0_ solve.</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> 0 KSP Residual norm 4.621368953027e+02</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> Residual norms for firedrake_0_fieldsplit_0_ solve.</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> <span class="apple-converted-space"> </span></span><span lang="IT-CH" style="font-size:11.0pt">0 KSP Residual norm 1.000000000000e+00</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="IT-CH" style="font-size:11.0pt"> 1 KSP Residual norm 3.501082228626e-15</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="IT-CH" style="font-size:11.0pt"> <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:11.0pt">Residual norms for firedrake_0_fieldsplit_1_ solve.</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> <span class="apple-converted-space"> </span></span><span lang="IT-CH" style="font-size:11.0pt">0 KSP Residual norm 0.000000000000e+00</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="IT-CH" style="font-size:11.0pt"> 1 KSP Residual norm 0.000000000000e+00</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="IT-CH" style="font-size:11.0pt"> <span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:11.0pt">1 KSP Residual norm 1.612167203819e-12</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> 1 SNES Function norm 1.599350481360e-12<br>
```</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt"> </span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt">Using the fieldsplit additive preconditioner, the problem converges in a single KSP iteration, as expected. However, I do not understand<span class="apple-converted-space"> </span></span><span lang="EN-US" style="font-size:11.0pt">why
the</span><span class="apple-converted-space"><span style="font-size:11.0pt"> </span></span><span style="font-size:11.0pt">residual of fieldsplit_0 (1e+0) does not coincide with the outer residual (462.13689530272404)</span><span lang="EN-US" style="font-size:11.0pt">.
It should be the case given that only<span class="apple-converted-space"> </span></span><span style="font-size:11.0pt">fieldsplit_0 has</span><span class="apple-converted-space"><span lang="EN-US" style="font-size:11.0pt"> </span></span><span lang="EN-US" style="font-size:11.0pt">a
non-zero residual contribution</span><span style="font-size:11.0pt">. The fact that it is just 1 is suspicious. Is there something about how the fieldsplit works that I am missing?</span><span lang="EN-US" style="font-size:11.0pt"><br>
<br>
Thanks,</span><o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt">Miguel</span><o:p></o:p></p>
</div>
</div>
</div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif"> </span><o:p></o:p></p>
</div>
</div>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="409" style="width:306.75pt;word-spacing:0px">
<tbody>
<tr>
<td width="260" valign="top" style="width:195.0pt;padding:0cm 0cm 15.0pt 0cm"></td>
<td width="149" valign="top" style="width:111.75pt;padding:0cm 0cm 15.0pt 0cm"></td>
</tr>
<tr>
<td width="260" valign="top" style="width:195.0pt;padding:0cm 0cm 11.25pt 0cm">
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt;line-height:14.0pt"><b><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#1B1464">MIGUEL ANGEL SALAZAR DE TROYA<br>
</span></b><span style="font-size:8.0pt;font-family:"Arial",sans-serif;color:#8A8A8C">Head of Software Engineering<br>
<a href="mailto:miguel.salazar@corintis.com"><em><span style="font-family:"Arial",sans-serif;color:#8A8A8C">miguel.salazar@corintis.com</span></em></a><br>
Corintis SA<br>
EPFL Innovation Park Building C<br>
1015 Lausanne</span><o:p></o:p></p>
</div>
</td>
<td width="149" valign="top" style="width:111.75pt;padding:0cm 0cm 11.25pt 0cm">
<div>
<p class="MsoNormal" style="line-height:14.0pt"><span style="font-family:"Arial",sans-serif"><2024-08-1609_02_11-re_mailmigrationfromgoogletooffice365-sebastien.gobel@corintis.com-co_4456a1bf-dd3e-46b7-85f9-21f278e66a79.png></span><o:p></o:p></p>
</div>
</td>
</tr>
<tr>
<td width="409" colspan="2" valign="top" style="width:306.75pt;background:#1B1464;padding:2.25pt 7.5pt 2.25pt 7.5pt">
<div>
<p class="MsoNormal"><span style="font-size:7.0pt;font-family:"Arial",sans-serif;color:white">Here at Corintis we care for your privacy. That is why we have taken appropriate measures to ensure that the data you have provided to us is always secure.</span><o:p></o:p></p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</div>
</body>
</html>