On Wed, Jan 4, 2012 at 10:48 AM, Jed Brown <span dir="ltr">&lt;<a href="mailto:jedbrown@mcs.anl.gov">jedbrown@mcs.anl.gov</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote">On Wed, Jan 4, 2012 at 10:40, Matthew Knepley <span dir="ltr">&lt;<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have just noticed that MatGetRowMinAbs (but not the Max variant) in<br>
some cases returns a very small negative number like -1.62505e-17<br>
(displayed as %g). Is this an epsilon effect or an indication of a<br>
problem?<br></blockquote><div><br></div></div></div><div>Its not possible that was actually the minimum element?</div></blockquote></div><br><div>It is supposed to be returning the absolute value anyway, so no. Also, due to this patch of yours</div>

<div><br></div><div><a href="http://petsc.cs.iit.edu/petsc/petsc-dev/rev/e433a0" target="_blank">http://petsc.cs.iit.edu/petsc/petsc-dev/rev/e433a0</a></div><div><br></div><div>it should never return a value smaller than 1e-12 that isn&#39;t identically zero. I don&#39;t understand why this shift is being done, but I think that if you want a shift like this, it should at least be relative to the norm of the vector or something.</div>

</blockquote></div><br>Okay, here is what is wrong with the logic:<div><br></div><div>1) Its not a shift, it ignores values &lt; 1.0e-12</div><div><br></div><div>2) The problem is on line 2.17 of the diff where it takes the first value as minimum, but does not take the absolute value</div>
<div><br></div><div>3) After that, no value is greater than 1.0e-12, so it does not change it</div><div><br></div><div>You have a whole row of zeros. I will fix that line.</div><div><br></div><div>    Matt<br clear="all">
<div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener<br>
</div>