*** Wartungsfenster jeden ersten Mittwoch vormittag im Monat ***

Skip to content
Snippets Groups Projects
Commit 71af784a authored by Carl-Martin Pfeiler's avatar Carl-Martin Pfeiler
Browse files

I.SaveMagnetization() extension always .vtk forced

parent 695f3c35
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,11 @@ def SaveMagnetization(filename, mesh, m, label="m"):
content += Mesh2VTK(mesh)
content += Mag2VTK(mesh, m, label)
output = open(filename + ".vtk", "w")
ext = ".vtk"
if(filename[-4:] == ext):
ext = ""
output = open(filename + ext, "w")
output.write(content)
output.close()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment