svenreiche / Genesis-1.3-Version4

Time-dependent, 3D Code to simulate the amplification process of a Free-electron Laser.
GNU General Public License v3.0
53 stars 26 forks source link

[BUG] `Field/dgrid` output is confusingly labeled #146

Closed ChristopherMayes closed 7 months ago

ChristopherMayes commented 7 months ago

Describe the bug The input file has a typical field input as:

&field
dgrid= 2e-4
ngrid=255
...
&end

However, in the main output HDF5, the Field/dgrid written is not the same as dgrid above, but is: 2* dgrid / (ngrid - 1) = 1.57480e-6

To Reproduce Run Genesis4 on https://github.com/svenreiche/Genesis-1.3-Version4/tree/master/examples/Example1-SteadyState

Expected behavior I would expect Field/dgrid = 2e-4

svenreiche commented 7 months ago

Fixed with the current commit. The field is now giving the input parameter of the same name. a new output has been added, named gridspacing to have the old value of the field.