The case in which we want to generate a block with no thickness (size[2] = 0) the mesher fails in writing the header of the .lon file.
The error is in mesher.cc in the function Grid2D::build_mesh.
The solution might be to add these lines:
num_axes = f_def.withSheets()?2:1;
lon_os << num_axes << std::endl;
E.g. to reproduce error:
mesher -size[0] 1.0 -size[1] 1.0 -size[2] 0.0 -bath[0] -0.0 -bath[1] -0.0 -bath[2] -0.0 -center[0] 0.5 -center[1] 0.5 -center[2] 0.0 -resolution[0] 300.0 -resolution[1] 300.0 -resolution[2] 300.0 -mesh meshes/2021-02-23_HglGPzWkBu/block -Elem3D 0 -fibers.rotEndo 0.0 -fibers.rotEpi 0.0 -fibers.sheetEndo 90.0 -fibers.sheetEpi 90.0 -periodic 0 -periodic_tag 1234
Output:
1 0 0
1 0 0
...