split up f.write(), remove unused format()
@@ -304,19 +304,15 @@ def write_buffer(f, mesh, float_fmt):
for block in mesh.cells:
cells_per_dim[_topological_dimension[block.type]] += len(block)
- f.write(
- f"""# Generated by meshio {__version__}
-mesh3d
+ f.write(f"# Generated by meshio {__version__}\n")
+ f.write("mesh3d\n\n")
-dimension
-{dimension}
+ f.write("dimension\n")
+ f.write(f"{dimension}\n\n")
+
+ f.write("geomtype\n")
+ f.write("0\n")
-geomtype
-0
-""".format(
- __version__
- )
- )
f.write("\n# surfnr bcnr domin domout np p1 p2 p3\n")
f.write("surfaceelements\n")
f.write(f"{cells_per_dim[2]}\n")
