mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-24 10:10:18 -06:00
Remove cell_index from ReservoirFailure struct.
This commit is contained in:
parent
58eedf0d65
commit
576852b299
@ -49,19 +49,17 @@ namespace Opm
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum struct Type { Invalid, MassBalance, Cnv };
|
enum struct Type { Invalid, MassBalance, Cnv };
|
||||||
ReservoirFailure(Type t, Severity s, int phase, int cell_index)
|
ReservoirFailure(Type t, Severity s, int phase)
|
||||||
: type_(t), severity_(s), phase_(phase), cell_index_(cell_index)
|
: type_(t), severity_(s), phase_(phase)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
Type type() const { return type_; }
|
Type type() const { return type_; }
|
||||||
Severity severity() const { return severity_; }
|
Severity severity() const { return severity_; }
|
||||||
int phase() const { return phase_; }
|
int phase() const { return phase_; }
|
||||||
int cellIndex() const { return cell_index_; }
|
|
||||||
private:
|
private:
|
||||||
Type type_;
|
Type type_;
|
||||||
Severity severity_;
|
Severity severity_;
|
||||||
int phase_;
|
int phase_;
|
||||||
int cell_index_;
|
|
||||||
};
|
};
|
||||||
class WellFailure
|
class WellFailure
|
||||||
{
|
{
|
||||||
|
@ -38,7 +38,7 @@ BOOST_AUTO_TEST_CASE(DefaultConstructor)
|
|||||||
BOOST_AUTO_TEST_CASE(Failures)
|
BOOST_AUTO_TEST_CASE(Failures)
|
||||||
{
|
{
|
||||||
Opm::ConvergenceReport s1;
|
Opm::ConvergenceReport s1;
|
||||||
s1.setReservoirFailed({CR::ReservoirFailure::Type::Cnv, CR::Severity::Normal, 2, 100});
|
s1.setReservoirFailed({CR::ReservoirFailure::Type::Cnv, CR::Severity::Normal, 2});
|
||||||
{
|
{
|
||||||
BOOST_CHECK(!s1.converged());
|
BOOST_CHECK(!s1.converged());
|
||||||
BOOST_CHECK(s1.reservoirFailed());
|
BOOST_CHECK(s1.reservoirFailed());
|
||||||
@ -48,7 +48,6 @@ BOOST_AUTO_TEST_CASE(Failures)
|
|||||||
BOOST_CHECK(f.type() == CR::ReservoirFailure::Type::Cnv);
|
BOOST_CHECK(f.type() == CR::ReservoirFailure::Type::Cnv);
|
||||||
BOOST_CHECK(f.severity() == CR::Severity::Normal);
|
BOOST_CHECK(f.severity() == CR::Severity::Normal);
|
||||||
BOOST_CHECK(f.phase() == 2);
|
BOOST_CHECK(f.phase() == 2);
|
||||||
BOOST_CHECK(f.cellIndex() == 100);
|
|
||||||
BOOST_CHECK(s1.wellFailures().empty());
|
BOOST_CHECK(s1.wellFailures().empty());
|
||||||
BOOST_CHECK(s1.severityOfWorstFailure() == CR::Severity::Normal);
|
BOOST_CHECK(s1.severityOfWorstFailure() == CR::Severity::Normal);
|
||||||
}
|
}
|
||||||
@ -85,7 +84,6 @@ BOOST_AUTO_TEST_CASE(Failures)
|
|||||||
BOOST_CHECK(f.type() == CR::ReservoirFailure::Type::Cnv);
|
BOOST_CHECK(f.type() == CR::ReservoirFailure::Type::Cnv);
|
||||||
BOOST_CHECK(f.severity() == CR::Severity::Normal);
|
BOOST_CHECK(f.severity() == CR::Severity::Normal);
|
||||||
BOOST_CHECK(f.phase() == 2);
|
BOOST_CHECK(f.phase() == 2);
|
||||||
BOOST_CHECK(f.cellIndex() == 100);
|
|
||||||
BOOST_REQUIRE(s1.wellFailures().size() == 2);
|
BOOST_REQUIRE(s1.wellFailures().size() == 2);
|
||||||
const auto f0 = s1.wellFailures()[0];
|
const auto f0 = s1.wellFailures()[0];
|
||||||
BOOST_CHECK(f0.type() == CR::WellFailure::Type::ControlTHP);
|
BOOST_CHECK(f0.type() == CR::WellFailure::Type::ControlTHP);
|
||||||
|
Loading…
Reference in New Issue
Block a user