Add return of wdfac type
This commit is contained in:
parent
fcb438aed4
commit
98220372eb
@ -53,6 +53,8 @@ namespace Opm {
|
||||
|
||||
bool useDFactor() const;
|
||||
bool useConnectionDFactor() const;
|
||||
bool useWellDFactor() const;
|
||||
WDFACTYPE getType() const;
|
||||
|
||||
bool operator==(const WDFAC& other) const;
|
||||
bool operator!=(const WDFAC& other) const;
|
||||
|
@ -109,10 +109,9 @@ namespace Opm {
|
||||
return m_type != WDFACTYPE::NONE;
|
||||
}
|
||||
|
||||
bool WDFAC::useConnectionDFactor() const {
|
||||
return m_type == WDFACTYPE::CON_DFACTOR;
|
||||
WDFACTYPE WDFAC::getType() const {
|
||||
return m_type;
|
||||
}
|
||||
|
||||
bool WDFAC::operator!=(const WDFAC& other) const {
|
||||
return !(*this == other);
|
||||
}
|
||||
|
@ -5780,9 +5780,9 @@ END
|
||||
double phi = 0.3;
|
||||
|
||||
// WDFAC overwrites D factor in COMDAT
|
||||
BOOST_CHECK(!wdfac11.useConnectionDFactor());
|
||||
BOOST_CHECK(wdfac11.getType() != WDFACTYPE::CON_DFACTOR);
|
||||
BOOST_CHECK(wdfac11.useDFactor());
|
||||
BOOST_CHECK(!wdfac21.useConnectionDFactor());
|
||||
BOOST_CHECK(wdfac21.getType() != WDFACTYPE::CON_DFACTOR);
|
||||
|
||||
BOOST_CHECK_CLOSE(wdfac11.getDFactor(rho, mu, k, phi, rw, h), 1*Opm::unit::day, 1e-12);
|
||||
BOOST_CHECK_CLOSE(wdfac21.getDFactor(rho, mu, k, phi, rw, h), 2*Opm::unit::day, 1e-12);
|
||||
@ -5800,9 +5800,9 @@ END
|
||||
const auto& well23 = sched.getWell("W2", 3);
|
||||
const auto& wdfac13 = well13.getWDFAC();
|
||||
const auto& wdfac23 = well23.getWDFAC();
|
||||
BOOST_CHECK(wdfac13.useConnectionDFactor());
|
||||
BOOST_CHECK(wdfac13.getType() == WDFACTYPE::CON_DFACTOR);
|
||||
BOOST_CHECK(wdfac13.useDFactor());
|
||||
BOOST_CHECK(!wdfac23.useConnectionDFactor());
|
||||
BOOST_CHECK(wdfac23.getType() != WDFACTYPE::CON_DFACTOR);
|
||||
|
||||
|
||||
BOOST_CHECK_CLOSE(well13.getConnections()[0].dFactor(), 0*Opm::unit::day, 1e-12);
|
||||
|
Loading…
Reference in New Issue
Block a user