[FLASH-USERS] Fwd: Error in ut_hunt ?

RIGON Gabriel gabriel.rigon at nagoya-u.jp
Fri Jan 8 00:23:51 EST 2021


  Hi,

I was working on some simulations and I saw something that might be an 
error in the ut_hunt.F90 subroutine.
Directory: ./source/flashUtilities/interpolation/oneDim/ut_hunt.F90

Take a monotonous array (xx) an a value (x) as argument return the 
highest index (i) such as xx <= x < xx(i)
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)

The error is in the beginning line 48 to 60.
/if (x.le.xx(1)) then
   low=0
   return
end if
if (x.gt.xx(n)) then
   low=n
   return
end if/

--> should be
/if (x*.lt.*xx(1)) then
   low=0
   return
end if
if (x*.ge.*xx(n)) then
   low=n
   return
end if/

For the moment if x==xx(1), the subroutine return 0 where it should 
actually return 1.
(/else if/ can also be used to concatenate both /if/ statement, but that 
won't change the results).

Please tell me if I did a misinterpretation of the intended result of 
the subroutine.

Best,
G.Rigon

Gabriel Rigon
Laboratory for Theoretical Astronomy & Astrophysics (TA-Lab)
Graduate School of Science
Division of Particle and Astrophysical Science
Nagoya University, Japan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://flash.rochester.edu/pipermail/flash-users/attachments/20210108/862199ad/attachment.htm>


More information about the flash-users mailing list