<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
Hi,
<div class="moz-forward-container">
<div class="moz-forward-container">
<p>I was working on some simulations and I saw something that
might be an error in the ut_hunt.F90 subroutine.<br>
Directory:
./source/flashUtilities/interpolation/oneDim/ut_hunt.F90</p>
<p>Take a monotonous array (xx) an a value (x) as argument
return the highest index (i) such as xx <= x < xx(i)<br>
If x is out of range from the array return either: 0 (x <
x(1)) or n - the size of xx- if x>= x(n)<br>
</p>
<p>The error is in the beginning line 48 to 60.<br>
<i>if (x.le.xx(1)) then<br>
low=0<br>
return<br>
end if<br>
if (x.gt.xx(n)) then<br>
low=n<br>
return<br>
end if</i></p>
<p>--> should be<br>
<i>if (x<b>.lt.</b>xx(1)) then<br>
low=0<br>
return<br>
end if<br>
if (x<b>.ge.</b>xx(n)) then<br>
low=n<br>
return<br>
end if</i></p>
<p>For the moment if x==xx(1), the subroutine return 0 where it
should actually return 1.<br>
(<i>else if</i> can also be used to concatenate both <i>if</i>
statement, but that won't change the results).</p>
<p>Please tell me if I did a misinterpretation of the intended
result of the subroutine.<br>
</p>
<p>Best,<br>
G.Rigon </p>
<pre class="moz-signature" cols="72">Gabriel Rigon
Laboratory for Theoretical Astronomy & Astrophysics (TA-Lab)
Graduate School of Science
Division of Particle and Astrophysical Science
Nagoya University, Japan</pre>
</div>
</div>
</body>
</html>