Skip to content

Commit 317ead3

Browse files
authored
Merge pull request #841 from nschloe/abaqus-end-step
Abaqus end step
2 parents e503fdc + 04e720e commit 317ead3

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
<p align="center">I/O for mesh files.</p>
44
</p>
55

6-
76
[![gh-actions](https://img.shields.io/github/workflow/status/nschloe/meshio/ci?style=flat-square)](https://github.com/nschloe/meshio/actions?query=workflow%3Aci)
87
[![codecov](https://img.shields.io/codecov/c/github/nschloe/meshio.svg?style=flat-square)](https://codecov.io/gh/nschloe/meshio)
98
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/psf/black)

meshio/abaqus/_abaqus.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -314,10 +314,10 @@ def _read_set(f, params_map):
314314

315315
def write(filename, mesh, float_fmt=".16e", translate_cell_names=True):
316316
with open_file(filename, "wt") as f:
317-
f.write("*Heading\n")
317+
f.write("*HEADING\n")
318318
f.write("Abaqus DataFile Version 6.14\n")
319319
f.write("written by meshio v{}\n".format(__version__))
320-
f.write("*Node\n")
320+
f.write("*NODE\n")
321321
fmt = ", ".join(["{}"] + ["{:" + float_fmt + "}"] * mesh.points.shape[1]) + "\n"
322322
for k, x in enumerate(mesh.points):
323323
f.write(fmt.format(k + 1, *x))
@@ -326,7 +326,7 @@ def write(filename, mesh, float_fmt=".16e", translate_cell_names=True):
326326
name = (
327327
meshio_to_abaqus_type[cell_type] if translate_cell_names else cell_type
328328
)
329-
f.write("*Element,type=" + name + "\n")
329+
f.write("*ELEMENT, TYPE={}\n".format(name))
330330
for row in node_idcs:
331331
eid += 1
332332
nids_strs = (str(nid + 1) for nid in row.tolist())
@@ -338,7 +338,7 @@ def write(filename, mesh, float_fmt=".16e", translate_cell_names=True):
338338
for k, v in mesh.cell_sets.items():
339339
if len(v[ic]) > 0:
340340
els = [str(i + 1 + offset) for i in v[ic]]
341-
f.write("*ELSET, ELSET=%s\n" % k)
341+
f.write("*ELSET, ELSET={}\n".format(k))
342342
f.write(
343343
",\n".join(
344344
",".join(els[i : i + nnl]) for i in range(0, len(els), nnl)
@@ -349,13 +349,14 @@ def write(filename, mesh, float_fmt=".16e", translate_cell_names=True):
349349

350350
for k, v in mesh.point_sets.items():
351351
nds = [str(i + 1) for i in v]
352-
f.write("*NSET, NSET=%s\n" % k)
352+
f.write("*NSET, NSET={}\n".format(k))
353353
f.write(
354354
",\n".join(",".join(nds[i : i + nnl]) for i in range(0, len(nds), nnl))
355355
+ "\n"
356356
)
357357

358-
f.write("*end")
358+
# https://github.com/nschloe/meshio/issues/747#issuecomment-641895555
359+
f.write("*END STEP")
359360

360361

361362
register("abaqus", [".inp"], read, {"abaqus": write})

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = meshio
3-
version = 4.0.14
3+
version = 4.0.15
44
author = Nico Schlömer et al.
55
author_email = [email protected]
66
description = I/O for many mesh formats

0 commit comments

Comments
 (0)