double use of indices in SPH density loop

From: Leonard Romano <leonard.romano_at_tum.de>
Date: Tue, 25 May 2021 10:58:46 +0200

Dear gadget-list members,

I just noticed that during the computation of the SPH density, there is
a possibly dangerous double use of loop indices.
First note that the loop over the workstack for doing final operations
on the results uses the index "i":|
|

    |for(int i = 0; i < ndensities; i++)|

|later in the same loop when hfac is computed using a loop, it is
indexed with the same "i":|||
||

    ||for(int i = 0; i < NUMDIMS; i++)||

||This could potentially lead to problems and should be changed to
something else (like "j").||

||Best,
Leonard
||

-- 
===================================================
Leonard Romano, B.Sc.(レオナルド・ロマノ)
Physics Department
Technical University of Munich (TUM), Germany
Theoretical Astrophysics Group
Department of Earth and Space Science
Graduate School of Science, Osaka University, Japan
he / him / his
===================================================
Received on 2021-05-25 10:58:57

This archive was generated by hypermail 2.3.0 : 2023-01-10 10:01:32 CET