Warwick-Plasma / epoch

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

dfloat can't be used in ic_module.f90 for version higher than v4.16.6 #272

Closed smallrainbow closed 3 years ago

smallrainbow commented 3 years ago

Dear developers,

dfloat can be used in the ic_module file, e.g., epoch-v4.10.1 instead of v>=4.16.6 (it reports fortran2003 can't use dfloat ... during the compilation by intel fortran + openmpi) Could you help check it, please? Thank you!

TomGoffrey commented 3 years ago

dfloat isn't part of any Fortran standard. It's listed as a GNU extension here. EPOCH is written in standards compliant Fortran 2003, which does not include dfloat.

There are several standards compliant ways of converting integers to floats, but I would suggest using REAL(a, num) within EPOCH.