mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-14 18:03:24 -06:00
Use correct relative path names in pvd file.
This commit is contained in:
parent
b31f33f567
commit
c743d0a8c0
@ -35,6 +35,8 @@
|
|||||||
#include <opm/models/io/baseoutputwriter.hh>
|
#include <opm/models/io/baseoutputwriter.hh>
|
||||||
#include <opm/models/parallel/tasklets.hh>
|
#include <opm/models/parallel/tasklets.hh>
|
||||||
|
|
||||||
|
#include <opm/common/utility/FileSystem.hpp>
|
||||||
|
|
||||||
#include <opm/material/common/Valgrind.hpp>
|
#include <opm/material/common/Valgrind.hpp>
|
||||||
#include <opm/material/common/Unused.hpp>
|
#include <opm/material/common/Unused.hpp>
|
||||||
|
|
||||||
@ -85,9 +87,12 @@ class VtkMultiWriter : public BaseOutputWriter
|
|||||||
|
|
||||||
// determine name to write into the multi-file for the
|
// determine name to write into the multi-file for the
|
||||||
// current time step
|
// 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_.precision(16);
|
||||||
multiWriter_.multiFile_ << " <DataSet timestep=\"" << multiWriter_.curTime_ << "\" file=\""
|
multiWriter_.multiFile_ << " <DataSet timestep=\"" << multiWriter_.curTime_ << "\" file=\""
|
||||||
<< fileName << "\"/>\n";
|
<< localFileName << "\"/>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user