Skip to content

Commit d41afed

Browse files
committed
conforming arg order
1 parent b41c1e4 commit d41afed

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

gustaf/io/meshio.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def load(fname):
8484
return meshes[0] if len(meshes) == 1 else meshes
8585

8686

87-
def export(mesh, fname, submeshes=None, **kwargs):
87+
def export(fname, mesh, submeshes=None, **kwargs):
8888
"""Export mesh elements and vertex data into meshio and use its write
8989
function. The definition of submeshes with identical vertex coordinates
9090
is possible. In that case vertex numbering and data from the main mesh
@@ -164,7 +164,10 @@ def export(mesh, fname, submeshes=None, **kwargs):
164164

165165
cells = []
166166
# Merge main mesh and submeshes in one list
167-
meshes = [mesh]
167+
if not isinstance(mesh, list):
168+
meshes = [mesh]
169+
else:
170+
meshes = mesh
168171
if submeshes is not None:
169172
meshes.extend(submeshes)
170173

0 commit comments

Comments
 (0)