Merge pull request #578 from blattms/allow-silent-getWriteRestartFile-call

Allow to switch of logging during getWriteRestartFile call.
This commit is contained in:
Atgeirr Flø Rasmussen
2018-12-07 18:53:41 +01:00
committed by GitHub
2 changed files with 3 additions and 3 deletions

View File

@@ -324,7 +324,7 @@ namespace Opm {
int getFirstRestartStep() const;
bool getWriteRestartFile(size_t timestep) const;
bool getWriteRestartFile(size_t timestep, bool log=true) const;
const std::map< std::string, int >& getRestartKeywords( size_t timestep ) const;
int getKeyword( const std::string& keyword, size_t timeStep) const;

View File

@@ -498,11 +498,11 @@ void RestartConfig::handleScheduleSection(const SCHEDULESection& schedule) {
}
bool RestartConfig::getWriteRestartFile(size_t timestep) const {
bool RestartConfig::getWriteRestartFile(size_t timestep, bool log) const {
if (0 == timestep)
return m_write_initial_RST_file;
if (save_keywords[timestep]) {
if (save_keywords[timestep] && log) {
std::string logstring = "Fast restart using SAVE is not supported. Standard restart file is written instead";
Opm::OpmLog::warning("Unhandled output keyword", logstring);
return true;