mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
fixed: mixed-up input and output paths for restart serialization
This commit is contained in:
@@ -212,15 +212,14 @@ public:
|
|||||||
saveFile_ = EWOMS_GET_PARAM(TypeTag, std::string, SaveFile);
|
saveFile_ = EWOMS_GET_PARAM(TypeTag, std::string, SaveFile);
|
||||||
if (saveFile_.empty()) {
|
if (saveFile_.empty()) {
|
||||||
const auto& ioconfig = ebosSimulator_.vanguard().eclState().getIOConfig();
|
const auto& ioconfig = ebosSimulator_.vanguard().eclState().getIOConfig();
|
||||||
std::filesystem::path path(ioconfig.getOutputDir() + '/');
|
saveFile_ = ioconfig.fullBasePath() + ".OPMRST";
|
||||||
path.replace_filename(ioconfig.getBaseName() + ".OPMRST");
|
if (loadStep_ != -1 && !std::filesystem::exists(saveFile_)) {
|
||||||
if (loadStep_ != -1 && !std::filesystem::exists(path)) {
|
std::filesystem::path path(ioconfig.getInputDir() + "/");
|
||||||
saveFile_ = ioconfig.fullBasePath() + ".OPMRST";
|
path.replace_filename(ioconfig.getBaseName() + ".OPMRST");
|
||||||
|
saveFile_ = path;
|
||||||
if (!std::filesystem::exists(saveFile_)) {
|
if (!std::filesystem::exists(saveFile_)) {
|
||||||
OPM_THROW(std::runtime_error, "Error locating serialized restart file");
|
OPM_THROW(std::runtime_error, "Error locating serialized restart file");
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
saveFile_ = path;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user