Warwick-Plasma / epoch

Particle-in-cell code for plasma physics simulations
https://epochpic.github.io
GNU General Public License v3.0
184 stars 58 forks source link

Possible typo in the source code when evaluating the constant "r_xyz" #700

Closed XiangyanAn closed 2 months ago

XiangyanAn commented 2 months ago

I just found that in epoch3d/src/parser/evaluator_blocks.F90, line 300-305, the code reads:

IF (parameters%use_grid_position) THEN
        CALL push_on_eval(&
            SQRT(x(parameters%pack_ix)**2 + y(parameters%pack_iy)**2 &
               + z(parameters%pack_iy)**2))
      ELSE

the index of z might probably be parameters%pack_iz. Otherwise the parser would give a wrong r_xyz.

TomGoffrey commented 2 months ago

@XiangyanAn thanks for bringing this to our attention. This has been fixed.