Also define function EclipseState::hasInputLgr

Otherwise people will experience linker error when trying to use it.

Closes #3787
This commit is contained in:
Markus Blatt 2023-11-23 15:17:43 +01:00
parent c9cecb9036
commit 7893c414dc
2 changed files with 5 additions and 0 deletions

View File

@ -275,6 +275,10 @@ namespace Opm {
return !m_inputNnc.input().empty();
}
bool EclipseState::hasInputLGR() const {
return m_lgrs.size();
}
void EclipseState::initLgrs(const Deck& deck) {
if (!DeckSection::hasGRID(deck))
return;

View File

@ -101,6 +101,7 @@ SCHEDULE
Opm::EclipseState state(deck);
Opm::LgrCollection lgrs = state.getLgrs();
BOOST_CHECK(state.hasInputLGR());
BOOST_CHECK_EQUAL( lgrs.size() , 2U );
BOOST_CHECK(lgrs.hasLgr("LGR1"));
BOOST_CHECK(lgrs.hasLgr("LGR2"));