From 124ffeb03213012e4f79654247e9effb83bbd607 Mon Sep 17 00:00:00 2001
From: Oliver Sander <oliver.sander@tu-dresden.de>
Date: Sat, 30 Jan 2016 07:19:49 +0100
Subject: [PATCH] Write the result in raw binary, so external EOC measuring
 tools can use it

---
 src/harmonicmaps.cc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/harmonicmaps.cc b/src/harmonicmaps.cc
index 96e483f9..2c079a93 100644
--- a/src/harmonicmaps.cc
+++ b/src/harmonicmaps.cc
@@ -257,6 +257,11 @@ int main (int argc, char *argv[]) try
     vtkWriter.addVertexData(localXFunction, VTK::FieldInfo("orientation", VTK::FieldInfo::Type::scalar, xEmbedded[0].size()));
     vtkWriter.write(resultPath + "_" + energy + "_result");
 
+    // Write the corresponding coefficient vector: verbatim in binary, to be completely lossless
+    std::ofstream outFile("harmonicmaps-result-" + std::to_string(numLevels) + ".data", std::ios_base::binary);
+    GenericVector::writeBinary(outFile, xEmbedded);
+    outFile.close();
+
     /////////////////////////////////////////////////////////////////
     //   Measure the discretization error, if requested
     /////////////////////////////////////////////////////////////////
-- 
GitLab