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 25 forks source link

dumped fields have on one edge a row of zeros #170

Open ZeugAusHH opened 2 months ago

ZeugAusHH commented 2 months ago

Dumped fields loaded from .fld.h5 files have on one edge a row of zeros. This is unexpected.

I ran the following tests with commit id 04d8aeaaefbde3a01e6972c600fad487b2e2f309 , this is the current status of the developer branch.

In the attached screenshots there is an example. In /int_xy profile of the light field (left plot), on the right edge of the profile there is a row of zeros (in MATLAB orientation). This is also the case when plotting data of a single slice, in the example plot (on the right), the real component of slice 5500 is shown. The power in this slice is exceeding 1GW at the position of the dump.

image

In the 1D-vector data format written to the .fld.h5 file, the last ngrid elements of the linear vector are zero. In my demo case (with ngrid=101), I test this in MATLAB using: image

svenreiche commented 1 month ago

I cannot verify this behavior. I generated a wave front, dumped it, imported it in another run and dumped it again. In both dumps I have no zero elements

ZeugAusHH commented 1 month ago

Thanks for looking into it. I will set up a minimum working example in the coming days.

ZeugAusHH commented 1 month ago

Here is a minimum working example demonstrating the issue, the simulation was performed with git commit id 04d8aea (with mpisize=256, but this should not be relevant).

Input files: demo.in.txt demo.lat.txt analysis.py.txt

Screenshot (yellow grid cells in right panel are exactly zero): image