PrincetonUniversity / athena

Athena++ radiation GRMHD code and adaptive mesh refinement (AMR) framework
https://www.athena-astro.app
BSD 3-Clause "New" or "Revised" License
226 stars 122 forks source link

Array indexing errors in llf_mhd_rel_no_transform.cpp #568

Closed smressle closed 6 months ago

smressle commented 7 months ago

The prim_land prim_r arrays in hydro/rsolvers/mhd/llf_mhd_rel_no_transform.cpp are indexed incorrectly.

Instead of prim_l(IDN,i) they are indexed prim_l(IDN,k,j,i). This causes undefined behavior for the primitive values and in my case nans. The other llf files seem to be correctly indexed.

felker commented 6 months ago

@smressle can you test my fix in a9cc89e ?

smressle commented 5 months ago

Yes this works! (sorry for the late response)

On Tue, Apr 2, 2024 at 12:03 PM Kyle Gerard Felker @.***> wrote:

Closed #568 https://github.com/PrincetonUniversity/athena/issues/568 as completed via a9cc89e https://github.com/PrincetonUniversity/athena/commit/a9cc89ed5ab1f89c92f0b482145b3f03bc289f4a .

— Reply to this email directly, view it on GitHub https://github.com/PrincetonUniversity/athena/issues/568#event-12328492831, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB6S4RQXHOZCLAKSUF6G3N3Y3LJE5AVCNFSM6AAAAABEHRZQN2VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJSGMZDQNBZGI4DGMI . You are receiving this because you were mentioned.Message ID: @.***>