mirror of
https://github.com/OPM/opm-simulators.git
synced 2026-09-05 04:40:19 -05:00
Merge pull request #4478 from akva2/serialization_output_dir
fixed: output OPMRST file to output dir
This commit is contained in:
@@ -211,7 +211,17 @@ public:
|
|||||||
|
|
||||||
saveFile_ = EWOMS_GET_PARAM(TypeTag, std::string, SaveFile);
|
saveFile_ = EWOMS_GET_PARAM(TypeTag, std::string, SaveFile);
|
||||||
if (saveFile_.empty()) {
|
if (saveFile_.empty()) {
|
||||||
saveFile_ = ebosSimulator_.vanguard().caseName() + ".OPMRST";
|
const auto& ioconfig = ebosSimulator_.vanguard().eclState().getIOConfig();
|
||||||
|
std::filesystem::path path(ioconfig.getOutputDir() + '/');
|
||||||
|
path.replace_filename(ioconfig.getBaseName() + ".OPMRST");
|
||||||
|
if (loadStep_ != -1 && !std::filesystem::exists(path)) {
|
||||||
|
saveFile_ = ioconfig.fullBasePath() + ".OPMRST";
|
||||||
|
if (!std::filesystem::exists(saveFile_)) {
|
||||||
|
OPM_THROW(std::runtime_error, "Error locating serialized restart file");
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
saveFile_ = path;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user