<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div class="gmail_quote">
<div dir="ltr">Huq:<br>
</div>
<div dir="ltr"><font face="comic sans ms, sans-serif"># define PETSC_MACHINE_EPSILON 2.2204460492503131e-16</font></div>
<div><font face="comic sans ms, sans-serif">See /petsc/include/petscmath.h</font></div>
<div><font face="comic sans ms, sans-serif">Hong</font></div>
<div><font face="comic sans ms, sans-serif"><br>
</font></div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div style="font-family:"comic sans ms",sans-serif">Hello PETSc developers,</div>
<div style="font-family:"comic sans ms",sans-serif"><br>
</div>
<div style="font-family:"comic sans ms",sans-serif">I went through the ex23.c of ksp section attached herewith but I don't understand the following part: </div>
<div style="font-family:"comic sans ms",sans-serif">***********************************************</div>
<div><font face="comic sans ms, sans-serif">tol=1000.*PETSC_MACHINE_EPSILON</font><br>
</div>
<div><font face="comic sans ms, sans-serif">************************************************</font></div>
<div><font face="comic sans ms, sans-serif">and,</font></div>
<div><font face="comic sans ms, sans-serif">************************************************</font></div>
<div><font face="comic sans ms, sans-serif">
<div>ierr = VecAXPY(x,-1.0,u);CHKERRQ(ierr);</div>
<div> ierr = VecNorm(x,NORM_2,&norm);CHKERRQ(ierr);</div>
<div> ierr = KSPGetIterationNumber(ksp,&its);CHKERRQ(ierr);</div>
<div> if (norm > tol) {</div>
<div> ierr = PetscPrintf(PETSC_COMM_WORLD,"Norm of error %g, Iterations %D\n", (double)norm,its);CHKERRQ(ierr);</div>
<div> }</div>
<div>************************************************</div>
<div>I don't understand what is "tol" here and "*PETSC_MACHINE_EPSILON"?</div>
<div>The if condition is also not clear to me.</div>
<div><br>
</div>
<div>Thanks.</div>
<div>Sincerely,</div>
<div>Huq</div>
</font></div>
-- <br>
<div dir="ltr" class="gmail-m_-5009578020581527361gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr"><br>
<div><font face="comic sans ms, sans-serif">Fazlul Huq</font></div>
<div><font face="comic sans ms, sans-serif">Graduate Research Assistant</font></div>
<div><font face="comic sans ms, sans-serif">Department of Nuclear, Plasma & Radiological Engineering (NPRE)</font></div>
<div><font face="comic sans ms, sans-serif">University of Illinois at Urbana-Champaign (UIUC)</font></div>
<div><font face="comic sans ms, sans-serif">E-mail: <a href="mailto:huq2090@gmail.com" target="_blank">
huq2090@gmail.com</a></font></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</body>
</html>