From c743d0a8c06fa33d5bdd87c1bd6d01db56b3f617 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atgeirr=20Fl=C3=B8=20Rasmussen?= Date: Fri, 29 May 2020 10:21:31 +0200 Subject: [PATCH] Use correct relative path names in pvd file. --- opm/models/io/vtkmultiwriter.hh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/opm/models/io/vtkmultiwriter.hh b/opm/models/io/vtkmultiwriter.hh index 835be58e9..8546ff7cd 100644 --- a/opm/models/io/vtkmultiwriter.hh +++ b/opm/models/io/vtkmultiwriter.hh @@ -35,6 +35,8 @@ #include #include +#include + #include #include @@ -85,9 +87,12 @@ class VtkMultiWriter : public BaseOutputWriter // determine name to write into the multi-file for the // current time step + // The file names in the pvd file are relative, the path should therefore be stripped. + const Opm::filesystem::path fullPath{fileName}; + const std::string localFileName = fullPath.filename(); multiWriter_.multiFile_.precision(16); multiWriter_.multiFile_ << " \n"; + << localFileName << "\"/>\n"; } private: