diff --git a/Common/Gmsh.cpp b/Common/Gmsh.cpp
index f9fa8c783192da4daf4d6af52f49b13c3bbaa99a..36e1680bf8a1aa921aaa95510e3f43597667e5af 100644
--- a/Common/Gmsh.cpp
+++ b/Common/Gmsh.cpp
@@ -104,6 +104,12 @@ int GmshMergeFile(std::string fileName)
   return MergeFile(fileName, true);
 }
 
+int GmshWriteFile(std::string fileName)
+{
+  CreateOutputFile(fileName, FORMAT_AUTO);
+  return 1;
+}
+
 int GmshFinalize()
 {
   return 1;
diff --git a/Common/Gmsh.h b/Common/Gmsh.h
index 8230d1a6ee9756f2c828c1e569deb1def2a6a3fb..cb71d5da65d4d18c12e8593d0802b2ceb091a147 100644
--- a/Common/Gmsh.h
+++ b/Common/Gmsh.h
@@ -21,6 +21,7 @@ int GmshGetOption(std::string category, std::string name, std::string &value, in
 int GmshGetOption(std::string category, std::string name, double &value, int index=0);
 int GmshGetOption(std::string category, std::string name, unsigned int &value, int index=0);
 int GmshMergeFile(std::string fileName);
+int GmshWriteFile(std::string fileName);
 int GmshFinalize();
 int GmshBatch();