mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Omit "Unhandled keyword" messages on non-root processes
This commit is contained in:
parent
d4b818c948
commit
6d0d063413
@ -437,7 +437,8 @@ namespace Opm
|
||||
const Opm::PhaseUsage& phaseUsage,
|
||||
const Model& model,
|
||||
const RestartConfig& restartConfig,
|
||||
const int reportStepNum) {
|
||||
const int reportStepNum,
|
||||
const bool output) {
|
||||
|
||||
|
||||
std::vector<data::CellData> simProps;
|
||||
@ -547,10 +548,13 @@ namespace Opm
|
||||
std::move(adbToDoubleVector(sd.rq[aqua_idx].kr))});
|
||||
}
|
||||
else {
|
||||
if ( output )
|
||||
{
|
||||
Opm::OpmLog::warning("Empty:WATKR",
|
||||
"Not emitting empty Water Rel-Perm");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (liquid_active && outKeywords["KRO"] > 0) {
|
||||
if (sd.rq[liquid_idx].kr.size() > 0) {
|
||||
outKeywords["KRO"] = 0;
|
||||
@ -560,10 +564,13 @@ namespace Opm
|
||||
std::move(adbToDoubleVector(sd.rq[liquid_idx].kr))});
|
||||
}
|
||||
else {
|
||||
if ( output )
|
||||
{
|
||||
Opm::OpmLog::warning("Empty:OILKR",
|
||||
"Not emitting empty Oil Rel-Perm");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (vapour_active && outKeywords["KRG"] > 0) {
|
||||
if (sd.rq[vapour_idx].kr.size() > 0) {
|
||||
outKeywords["KRG"] = 0;
|
||||
@ -573,10 +580,13 @@ namespace Opm
|
||||
std::move(adbToDoubleVector(sd.rq[vapour_idx].kr))});
|
||||
}
|
||||
else {
|
||||
if ( output )
|
||||
{
|
||||
Opm::OpmLog::warning("Empty:GASKR",
|
||||
"Not emitting empty Gas Rel-Perm");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Vaporized and dissolved gas/oil ratio
|
||||
@ -600,7 +610,8 @@ namespace Opm
|
||||
/**
|
||||
* Bubble point and dew point pressures
|
||||
*/
|
||||
if (vapour_active && liquid_active && outKeywords["PBPD"] > 0) {
|
||||
if (output && vapour_active &&
|
||||
liquid_active && outKeywords["PBPD"] > 0) {
|
||||
outKeywords["PBPD"] = 0;
|
||||
Opm::OpmLog::warning("Bubble/dew point pressure output unsupported",
|
||||
"Writing bubble points and dew points (PBPD) to file is unsupported, "
|
||||
@ -608,6 +619,8 @@ namespace Opm
|
||||
}
|
||||
|
||||
//Warn for any unhandled keyword
|
||||
if (output)
|
||||
{
|
||||
for (auto& keyValue : outKeywords) {
|
||||
if (keyValue.second > 0) {
|
||||
std::string logstring = "Keyword '";
|
||||
@ -616,6 +629,7 @@ namespace Opm
|
||||
Opm::OpmLog::warning("Unhandled output keyword", logstring);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return simProps;
|
||||
}
|
||||
@ -636,7 +650,7 @@ namespace Opm
|
||||
{
|
||||
const RestartConfig& restartConfig = eclipseState_->getRestartConfig();
|
||||
const int reportStepNum = timer.reportStepNum();
|
||||
std::vector<data::CellData> cellData = detail::getCellData( phaseUsage_, physicalModel, restartConfig, reportStepNum );
|
||||
std::vector<data::CellData> cellData = detail::getCellData( phaseUsage_, physicalModel, restartConfig, reportStepNum, parallelOutput_->isIORank() );
|
||||
writeTimeStepWithCellProperties(timer, localState, localWellState, cellData, substep);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user