Closed henry2004y closed 3 months ago
I fixed another getDomainDecomposition
bug in f1417dbf843f06853a9e127670383a6208e833ed. Also, now the fsgrid output is never squeezed while reading.
Surprisingly I found that my original implementation in Fortran-style is correct. The logic in the original Python code is like a mess...
While comparing the fsgrid reading between Vlasiator.jl and Analysator, I realized that I might carelessly treat a Python array of size
(nx, ny, nz, 3)
as a Julia array of size(3, nx, ny, nz)
. The issue is that these two are not equivalent in memory. However, because of the transpose operation when calling matplotlib, I have not noticed anything suspicious from the plots, since in 2D the transpose operation is equivalent to switching the order of dimensions. However, in 3D, this should be wrong.A fully equivalent version would be
(3, nz, ny, nx)
; but this is not natural at all.