Remove unused size query functions
This commit is contained in:
parent
9862d88b12
commit
a0ad7883c7
@ -134,8 +134,6 @@ public:
|
||||
static UDQActive serializeObject();
|
||||
|
||||
int update(const UDQConfig& udq_config, const UDAValue& uda, const std::string& wgname, UDAControl control);
|
||||
std::size_t IUAD_size() const;
|
||||
std::size_t IUAP_size() const;
|
||||
explicit operator bool() const;
|
||||
const std::vector<Record>& get_iuad() const;
|
||||
std::vector<InputRecord> get_iuap() const;
|
||||
|
@ -850,8 +850,8 @@ captureDeclaredUDQData(const Opm::Schedule& sched,
|
||||
iUap::staticContrib(wg_no, i_uap);
|
||||
cnt_iuap += 1;
|
||||
}
|
||||
if (cnt_iuap != inteHead[VI::intehead::NO_IUAPS])
|
||||
OpmLog::error(fmt::format("Inconsistent number of iuap's: {} number of iuap's from intehead {}", cnt_iuap, inteHead[VI::intehead::NO_IUAPS]));
|
||||
if (iuap_vect.size() != static_cast<std::size_t>(inteHead[VI::intehead::NO_IUAPS]))
|
||||
OpmLog::error(fmt::format("Inconsistent number of iuap's: {} number of iuap's from intehead {}", iuap_vect.size(), inteHead[VI::intehead::NO_IUAPS]));
|
||||
|
||||
Opm::RestartIO::Helpers::igphData igph_dat;
|
||||
int cnt_igph = 0;
|
||||
@ -861,8 +861,8 @@ captureDeclaredUDQData(const Opm::Schedule& sched,
|
||||
iGph::staticContrib(igph[index], i_igph);
|
||||
cnt_igph += 1;
|
||||
}
|
||||
if (cnt_igph != inteHead[VI::intehead::NGMAXZ])
|
||||
OpmLog::error(fmt::format("Inconsistent number of igph's: {} number of igph's from intehead {}", cnt_igph, inteHead[VI::intehead::NGMAXZ]));
|
||||
if (igph.size() != static_cast<std::size_t>(inteHead[VI::intehead::NGMAXZ]))
|
||||
OpmLog::error(fmt::format("Inconsistent number of igph's: {} number of igph's from intehead {}", igph.size(), inteHead[VI::intehead::NGMAXZ]));
|
||||
}
|
||||
|
||||
std::size_t i_wudq = 0;
|
||||
|
@ -36,16 +36,6 @@ UDQActive UDQActive::serializeObject()
|
||||
return result;
|
||||
}
|
||||
|
||||
std::size_t UDQActive::IUAD_size() const {
|
||||
const auto& output = this->get_iuad();
|
||||
return output.size();
|
||||
}
|
||||
|
||||
std::size_t UDQActive::IUAP_size() const {
|
||||
const auto& output = this->get_iuap();
|
||||
return output.size();
|
||||
}
|
||||
|
||||
UDQActive::operator bool() const {
|
||||
return this->input_data.size() > 0;
|
||||
}
|
||||
|
@ -1485,18 +1485,18 @@ BOOST_AUTO_TEST_CASE(UDQ_USAGE) {
|
||||
UDQActive usage;
|
||||
UDQParams params;
|
||||
UDQConfig conf(params);
|
||||
BOOST_CHECK_EQUAL( usage.IUAD_size(), 0U );
|
||||
BOOST_CHECK_EQUAL( usage.get_iuad().size(), 0U );
|
||||
|
||||
UDAValue uda1("WUX");
|
||||
conf.add_assign(uda1.get<std::string>(), std::vector<std::string>{}, 100, 0);
|
||||
|
||||
const auto& iuad = usage.get_iuad();
|
||||
usage.update(conf, uda1, "W1", UDAControl::WCONPROD_ORAT);
|
||||
BOOST_CHECK_EQUAL( usage.IUAD_size(), 1U);
|
||||
BOOST_CHECK_EQUAL( usage.get_iuad().size(), 1U);
|
||||
BOOST_CHECK_EQUAL( iuad[0].use_count, 1U);
|
||||
|
||||
usage.update(conf, uda1, "W1", UDAControl::WCONPROD_GRAT);
|
||||
BOOST_CHECK_EQUAL( usage.IUAD_size(), 2U);
|
||||
BOOST_CHECK_EQUAL( usage.get_iuad().size(), 2U);
|
||||
BOOST_CHECK_EQUAL( iuad[1].use_count, 1U);
|
||||
|
||||
const auto& rec = iuad[0];
|
||||
@ -1504,7 +1504,7 @@ BOOST_AUTO_TEST_CASE(UDQ_USAGE) {
|
||||
BOOST_CHECK(rec.control == UDAControl::WCONPROD_ORAT);
|
||||
|
||||
|
||||
for (std::size_t index = 0; index < usage.IUAD_size(); index++) {
|
||||
for (std::size_t index = 0; index < usage.get_iuad().size(); index++) {
|
||||
const auto& record = iuad[index];
|
||||
BOOST_CHECK_EQUAL(record.input_index, 0U);
|
||||
|
||||
@ -1580,7 +1580,7 @@ BOOST_AUTO_TEST_CASE(IntegrationTest) {
|
||||
{
|
||||
const auto& udq_active = schedule[1].udq_active.get();
|
||||
const auto& active = udq_active.get_iuad();
|
||||
BOOST_CHECK_EQUAL(udq_active.IUAD_size(), 6U);
|
||||
BOOST_CHECK_EQUAL(active.size(), 6U);
|
||||
|
||||
BOOST_CHECK(active[0].control == UDAControl::WCONPROD_ORAT);
|
||||
BOOST_CHECK(active[1].control == UDAControl::WCONPROD_LRAT);
|
||||
@ -1661,9 +1661,9 @@ WCONPROD
|
||||
{
|
||||
const auto& udq_active = schedule[0].udq_active.get();
|
||||
BOOST_CHECK(udq_active);
|
||||
BOOST_CHECK_EQUAL(udq_active.IUAD_size(), 2U);
|
||||
|
||||
const auto& iuad = udq_active.get_iuad();
|
||||
BOOST_CHECK_EQUAL(iuad.size(), 2U);
|
||||
const auto& record0 = iuad[0];
|
||||
BOOST_CHECK_EQUAL( record0.uad_code, 300004);
|
||||
BOOST_CHECK_EQUAL( record0.input_index, 2U);
|
||||
@ -1683,8 +1683,8 @@ WCONPROD
|
||||
// - The new UDQs WUXO and WUXL are now used for the PROD2 well.
|
||||
const auto& udq_active = schedule[1].udq_active.get();
|
||||
BOOST_CHECK(udq_active);
|
||||
BOOST_CHECK_EQUAL(udq_active.IUAD_size(), 4U);
|
||||
const auto& iuad = udq_active.get_iuad();
|
||||
BOOST_CHECK_EQUAL(iuad.size(), 4U);
|
||||
|
||||
const auto& record0 = iuad[0];
|
||||
BOOST_CHECK_EQUAL( record0.uad_code, 300004);
|
||||
@ -1717,8 +1717,8 @@ WCONPROD
|
||||
// - The PROD1 well does not use UDQ
|
||||
const auto& udq_active = schedule[2].udq_active.get();
|
||||
BOOST_CHECK(udq_active);
|
||||
BOOST_CHECK_EQUAL(udq_active.IUAD_size(), 2U);
|
||||
const auto& iuad = udq_active.get_iuad();
|
||||
BOOST_CHECK_EQUAL(iuad.size(), 2U);
|
||||
|
||||
const auto& record0 = iuad[0];
|
||||
BOOST_CHECK_EQUAL( record0.uad_code, 300004);
|
||||
|
Loading…
Reference in New Issue
Block a user