Box size in z is not ignored for 2D runs
I'm currently working on a 2D moving mesh algorithm, and while trying to run the 2D Sod shock, my simulations kept crashing with the "Must have at least 3 cells in each spatial dimension..." error. I checked the values of
cdim when it crashes, and turns out
cdim is 2. The underlying reason is that the initial condition file defines a box of
2.0x0.5x0.1, which is then used together with
h_max to compute
cdim. Since the value of
cdim is the smallest, it can cause a crash without any good reason (
h_max is larger in the moving mesh case than in the SPH or GIZMO case, but it is not wrong).
The problem can be solved for this particular test by either increasing the third dimension of the box size, or by omitting it from the initial condition. But I think it would be more correct if the dimensions of the box that are not relevant to the dimensionality of the problem are reset to safe values by the code, so that they are ignored, even if they are given in the initial condition.