fix cell ids in flac3d writer
@@ -203,10 +203,12 @@ def _write_cells(f, points, cells):
"""Write zones.
"""
zones = _translate_zones(points, cells)
- for i, (meshio_type, zone) in enumerate(zones.items()):
+ i = 1
+ for meshio_type, zone in zones.items():
fmt = "Z {} {} " + " ".join((["{}"] * zone.shape[1])) + "\n"
for entry in zone + 1:
- f.write(fmt.format(meshio_to_flac3d_type[meshio_type], i + 1, *entry))
+ f.write(fmt.format(meshio_to_flac3d_type[meshio_type], i, *entry))
+ i += 1
def _translate_zones(points, cells):
