3
# Copyright (C) 2008 Anders Logg
4
# Licensed under the GNU LGPL Version 2.1
6
# Script for ordering a DOLFIN mesh according to the UFC ordering scheme
10
from dolfin import Mesh, File
15
# Check that we got at least
22
print "Ordering %s..." % filename
29
shutil.move(filename, filename + ".bak")
31
# Write file and gzip if necessary
33
if len(filename) >= 3 and filename[-3:] == ".gz":
34
filename = filename[:-3]
39
os.system("gzip " + filename)
42
"Print usage instructions"
43
print "Usage: dolfin-order mesh0.xml[.gz] [mesh1.xml[.gz] mesh2.xml[.gz] ...]"
45
if __name__ == "__main__":