mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
MultisegmentWell: use {fmt} to format error messages
This commit is contained in:
parent
dd9e2ad66a
commit
4c3d933835
@ -23,6 +23,8 @@
|
|||||||
|
|
||||||
#include <opm/input/eclipse/Schedule/MSW/Valve.hpp>
|
#include <opm/input/eclipse/Schedule/MSW/Valve.hpp>
|
||||||
|
|
||||||
|
#include <opm/material/densead/EvaluationFormat.hpp>
|
||||||
|
|
||||||
#include <opm/simulators/wells/MultisegmentWellAssemble.hpp>
|
#include <opm/simulators/wells/MultisegmentWellAssemble.hpp>
|
||||||
#include <opm/simulators/wells/WellBhpThpCalculator.hpp>
|
#include <opm/simulators/wells/WellBhpThpCalculator.hpp>
|
||||||
#include <opm/simulators/utils/DeferredLoggingErrorHelpers.hpp>
|
#include <opm/simulators/utils/DeferredLoggingErrorHelpers.hpp>
|
||||||
@ -841,9 +843,11 @@ namespace Opm
|
|||||||
const Value d = 1.0 - rv * rs;
|
const Value d = 1.0 - rv * rs;
|
||||||
|
|
||||||
if (getValue(d) == 0.0) {
|
if (getValue(d) == 0.0) {
|
||||||
OPM_DEFLOG_THROW(NumericalProblem, "Zero d value obtained for well " << this->name()
|
OPM_DEFLOG_THROW(NumericalProblem,
|
||||||
<< " during flux calculation"
|
fmt::format("Zero d value obtained for well {} "
|
||||||
<< " with rs " << rs << " and rv " << rv, deferred_logger);
|
"during flux calculation with rs {} and rv {}",
|
||||||
|
this->name(), rs, rv),
|
||||||
|
deferred_logger);
|
||||||
}
|
}
|
||||||
|
|
||||||
const Value tmp_oil = (cmix_s[oilCompIdx] - rv * cmix_s[gasCompIdx]) / d;
|
const Value tmp_oil = (cmix_s[oilCompIdx] - rv * cmix_s[gasCompIdx]) / d;
|
||||||
@ -2012,10 +2016,9 @@ namespace Opm
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
OPM_DEFLOG_THROW(NotImplemented,
|
OPM_DEFLOG_THROW(NotImplemented,
|
||||||
"Unsupported Injector Type ("
|
fmt::format("Unsupported Injector Type ({}) "
|
||||||
<< static_cast<int>(preferred_phase)
|
"for well {} during connection I.I. calculation",
|
||||||
<< ") for well " << this->name()
|
static_cast<int>(preferred_phase), this->name()),
|
||||||
<< " during connection I.I. calculation",
|
|
||||||
deferred_logger);
|
deferred_logger);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user