fixing the compilation due to interface change
This commit is contained in:
parent
fd773423b0
commit
6093a80dff
@ -18,7 +18,7 @@ void python::common::export_EclipseConfig(py::module& module)
|
|||||||
|
|
||||||
py::class_< SummaryConfig >( module, "SummaryConfig")
|
py::class_< SummaryConfig >( module, "SummaryConfig")
|
||||||
.def(py::init([](const Deck& deck, const EclipseState& state, const Schedule& schedule) {
|
.def(py::init([](const Deck& deck, const EclipseState& state, const Schedule& schedule) {
|
||||||
return SummaryConfig( deck, schedule, state.getTableManager() );
|
return SummaryConfig( deck, schedule, state.getTableManager(), state.aquifer() );
|
||||||
} ) )
|
} ) )
|
||||||
|
|
||||||
.def( "__contains__", &SummaryConfig::hasKeyword );
|
.def( "__contains__", &SummaryConfig::hasKeyword );
|
||||||
|
@ -265,11 +265,6 @@ namespace {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool is_aquifer(const std::string& keyword)
|
|
||||||
{
|
|
||||||
return (keyword[0] == 'A') && (keyword != "ALL");
|
|
||||||
}
|
|
||||||
|
|
||||||
bool is_node_keyword(const std::string& keyword)
|
bool is_node_keyword(const std::string& keyword)
|
||||||
{
|
{
|
||||||
static const auto nodekw = keyword_set {
|
static const auto nodekw = keyword_set {
|
||||||
@ -360,10 +355,10 @@ inline void keywordW( SummaryConfig::keyword_list& list,
|
|||||||
// maybe loc will be needed
|
// maybe loc will be needed
|
||||||
inline void keywordAquifer( SummaryConfig::keyword_list& list,
|
inline void keywordAquifer( SummaryConfig::keyword_list& list,
|
||||||
const AquiferConfig& aquiferConfig,
|
const AquiferConfig& aquiferConfig,
|
||||||
const ParseContext& parseContext,
|
const ParseContext& /* parseContext */,
|
||||||
ErrorGuard& errors,
|
ErrorGuard& /* errors */,
|
||||||
const DeckKeyword& keyword,
|
const DeckKeyword& keyword,
|
||||||
const Schedule& schedule) {
|
const Schedule& /* schedule */) {
|
||||||
auto param = SummaryConfigNode {
|
auto param = SummaryConfigNode {
|
||||||
keyword.name(), SummaryConfigNode::Category::Aquifer, keyword.location()
|
keyword.name(), SummaryConfigNode::Category::Aquifer, keyword.location()
|
||||||
}
|
}
|
||||||
@ -955,20 +950,13 @@ inline void handleKW( SummaryConfig::keyword_list& list,
|
|||||||
const std::string& keyword,
|
const std::string& keyword,
|
||||||
const KeywordLocation& location,
|
const KeywordLocation& location,
|
||||||
const Schedule& schedule,
|
const Schedule& schedule,
|
||||||
const ParseContext& parseContext,
|
const ParseContext& /* parseContext */,
|
||||||
ErrorGuard& errors) {
|
ErrorGuard& /* errors */) {
|
||||||
|
|
||||||
|
|
||||||
if (is_udq(keyword))
|
if (is_udq(keyword))
|
||||||
throw std::logic_error("UDQ keywords not handleded when expanding alias list");
|
throw std::logic_error("UDQ keywords not handleded when expanding alias list");
|
||||||
|
|
||||||
/* if (is_aquifer(keyword)) {
|
|
||||||
std::string msg = "Summary output keyword {keyword} of type AQUIFER is not supported\n"
|
|
||||||
"In {{file}} line {{line}}";
|
|
||||||
parseContext.handleError(ParseContext::SUMMARY_UNHANDLED_KEYWORD, msg, location, errors);
|
|
||||||
return;
|
|
||||||
} */
|
|
||||||
|
|
||||||
using Cat = SummaryConfigNode::Category;
|
using Cat = SummaryConfigNode::Category;
|
||||||
const auto cat = parseKeywordCategory( keyword );
|
const auto cat = parseKeywordCategory( keyword );
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ BOOST_AUTO_TEST_CASE(RUN) {
|
|||||||
Deck deck = parser.parseFile("SPE1CASE1.DATA");
|
Deck deck = parser.parseFile("SPE1CASE1.DATA");
|
||||||
EclipseState state(deck);
|
EclipseState state(deck);
|
||||||
Schedule schedule(deck, state, python);
|
Schedule schedule(deck, state, python);
|
||||||
SummaryConfig summary_config(deck, schedule, state.getTableManager());
|
SummaryConfig summary_config(deck, schedule, state.getTableManager(), state.aquifer());
|
||||||
msim msim(state);
|
msim msim(state);
|
||||||
|
|
||||||
msim.well_rate("PROD", data::Rates::opt::oil, prod_opr);
|
msim.well_rate("PROD", data::Rates::opt::oil, prod_opr);
|
||||||
|
@ -63,7 +63,7 @@ struct test_data {
|
|||||||
state( this->deck ),
|
state( this->deck ),
|
||||||
python( std::make_shared<Python>() ),
|
python( std::make_shared<Python>() ),
|
||||||
schedule( this->deck, this->state, this->python),
|
schedule( this->deck, this->state, this->python),
|
||||||
summary_config( this->deck, this->schedule, this->state.getTableManager())
|
summary_config( this->deck, this->schedule, this->state.getTableManager(), this->state.aquifer() )
|
||||||
{
|
{
|
||||||
auto& ioconfig = this->state.getIOConfig();
|
auto& ioconfig = this->state.getIOConfig();
|
||||||
ioconfig.setBaseName("MSIM");
|
ioconfig.setBaseName("MSIM");
|
||||||
|
@ -84,7 +84,7 @@ BOOST_AUTO_TEST_CASE(MSIM_EXIT_TEST) {
|
|||||||
Opm::Deck deck = parser.parseFile(deck_file);
|
Opm::Deck deck = parser.parseFile(deck_file);
|
||||||
Opm::EclipseState state(deck);
|
Opm::EclipseState state(deck);
|
||||||
Opm::Schedule schedule(deck, state, python);
|
Opm::Schedule schedule(deck, state, python);
|
||||||
Opm::SummaryConfig summary_config(deck, schedule, state.getTableManager());
|
Opm::SummaryConfig summary_config(deck, schedule, state.getTableManager(), state.aquifer());
|
||||||
|
|
||||||
{
|
{
|
||||||
WorkArea work_area("test_msim");
|
WorkArea work_area("test_msim");
|
||||||
|
@ -156,7 +156,7 @@ static SummaryConfig createSummary( std::string input , const ParseContext& pars
|
|||||||
auto python = std::make_shared<Python>();
|
auto python = std::make_shared<Python>();
|
||||||
EclipseState state( deck );
|
EclipseState state( deck );
|
||||||
Schedule schedule(deck, state, parseContext, errors, python);
|
Schedule schedule(deck, state, parseContext, errors, python);
|
||||||
return SummaryConfig(deck, schedule, state.getTableManager(), <#initializer#>, parseContext, errors);
|
return SummaryConfig(deck, schedule, state.getTableManager(), state.aquifer(), parseContext, errors);
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(wells_all) {
|
BOOST_AUTO_TEST_CASE(wells_all) {
|
||||||
@ -176,7 +176,7 @@ BOOST_AUTO_TEST_CASE(EMPTY) {
|
|||||||
auto python = std::make_shared<Python>();
|
auto python = std::make_shared<Python>();
|
||||||
EclipseState state( deck );
|
EclipseState state( deck );
|
||||||
Schedule schedule(deck, state, python);
|
Schedule schedule(deck, state, python);
|
||||||
SummaryConfig conf(deck, schedule, state.getTableManager());
|
SummaryConfig conf(deck, schedule, state.getTableManager(), state.aquifer());
|
||||||
BOOST_CHECK_EQUAL( conf.size(), 0U );
|
BOOST_CHECK_EQUAL( conf.size(), 0U );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -189,7 +189,7 @@ BOOST_AUTO_TEST_CASE(wells_missingI) {
|
|||||||
parseContext.update(ParseContext::SUMMARY_UNKNOWN_WELL, InputError::THROW_EXCEPTION);
|
parseContext.update(ParseContext::SUMMARY_UNKNOWN_WELL, InputError::THROW_EXCEPTION);
|
||||||
EclipseState state( deck );
|
EclipseState state( deck );
|
||||||
Schedule schedule(deck, state, parseContext, errors, python );
|
Schedule schedule(deck, state, parseContext, errors, python );
|
||||||
BOOST_CHECK_NO_THROW(SummaryConfig(deck, schedule, state.getTableManager(), <#initializer#>, parseContext, errors));
|
BOOST_CHECK_NO_THROW(SummaryConfig(deck, schedule, state.getTableManager(), state.aquifer(), parseContext, errors));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -733,7 +733,7 @@ BOOST_AUTO_TEST_CASE(Summary_Segment)
|
|||||||
|
|
||||||
const auto schedule = Schedule { deck, state, python};
|
const auto schedule = Schedule { deck, state, python};
|
||||||
const auto summary = SummaryConfig {
|
const auto summary = SummaryConfig {
|
||||||
deck, schedule, state.getTableManager()
|
deck, schedule, state.getTableManager(), state.aquifer()
|
||||||
};
|
};
|
||||||
|
|
||||||
// SOFR PROD01 segments 1, 10, 21.
|
// SOFR PROD01 segments 1, 10, 21.
|
||||||
@ -1077,7 +1077,7 @@ END
|
|||||||
const auto parseContext = ParseContext{};
|
const auto parseContext = ParseContext{};
|
||||||
const auto state = EclipseState (deck);
|
const auto state = EclipseState (deck);
|
||||||
const auto schedule = Schedule (deck, state, parseContext, errors, std::make_shared<const Python>());
|
const auto schedule = Schedule (deck, state, parseContext, errors, std::make_shared<const Python>());
|
||||||
const auto smry = SummaryConfig(deck, schedule, state.getTableManager(), <#initializer#>, parseContext, errors);
|
const auto smry = SummaryConfig(deck, schedule, state.getTableManager(), state.aquifer(), parseContext, errors);
|
||||||
|
|
||||||
BOOST_CHECK_MESSAGE(deck.hasKeyword("GPR"), R"(Deck must have "GPR" keyword)");
|
BOOST_CHECK_MESSAGE(deck.hasKeyword("GPR"), R"(Deck must have "GPR" keyword)");
|
||||||
BOOST_CHECK_MESSAGE(smry.hasKeyword("GPR"), R"(SummaryConfig must have "GPR" keyword)");
|
BOOST_CHECK_MESSAGE(smry.hasKeyword("GPR"), R"(SummaryConfig must have "GPR" keyword)");
|
||||||
|
@ -34,7 +34,7 @@ inline void loadDeck( const char * deck_file) {
|
|||||||
auto deck = parser.parseFile(deck_file);
|
auto deck = parser.parseFile(deck_file);
|
||||||
Opm::EclipseState state( deck);
|
Opm::EclipseState state( deck);
|
||||||
Opm::Schedule schedule( deck, state, python);
|
Opm::Schedule schedule( deck, state, python);
|
||||||
Opm::SummaryConfig summary( deck, schedule, state.getTableManager( ));
|
Opm::SummaryConfig summary( deck, schedule, state.getTableManager( ), state.aquifer() );
|
||||||
{
|
{
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
|
|
||||||
|
@ -285,7 +285,7 @@ BOOST_AUTO_TEST_CASE(EclipseIOIntegration) {
|
|||||||
auto& eclGrid = es.getInputGrid();
|
auto& eclGrid = es.getInputGrid();
|
||||||
auto python = std::make_shared<Python>();
|
auto python = std::make_shared<Python>();
|
||||||
Schedule schedule(deck, es, python);
|
Schedule schedule(deck, es, python);
|
||||||
SummaryConfig summary_config( deck, schedule, es.getTableManager( ));
|
SummaryConfig summary_config( deck, schedule, es.getTableManager( ), es.aquifer());
|
||||||
SummaryState st(std::chrono::system_clock::now());
|
SummaryState st(std::chrono::system_clock::now());
|
||||||
es.getIOConfig().setBaseName( "FOO" );
|
es.getIOConfig().setBaseName( "FOO" );
|
||||||
|
|
||||||
|
@ -269,7 +269,7 @@ BOOST_AUTO_TEST_CASE(test_RFT)
|
|||||||
const auto numCells = grid.getCartesianSize( );
|
const auto numCells = grid.getCartesianSize( );
|
||||||
|
|
||||||
const Schedule schedule(deck, eclipseState, python);
|
const Schedule schedule(deck, eclipseState, python);
|
||||||
const SummaryConfig summary_config( deck, schedule, eclipseState.getTableManager( ));
|
const SummaryConfig summary_config( deck, schedule, eclipseState.getTableManager( ), eclipseState.aquifer() );
|
||||||
|
|
||||||
EclipseIO eclipseWriter( eclipseState, grid, schedule, summary_config );
|
EclipseIO eclipseWriter( eclipseState, grid, schedule, summary_config );
|
||||||
|
|
||||||
@ -396,7 +396,7 @@ BOOST_AUTO_TEST_CASE(test_RFT2)
|
|||||||
const auto numCells = grid.getCartesianSize( );
|
const auto numCells = grid.getCartesianSize( );
|
||||||
|
|
||||||
Schedule schedule(deck, eclipseState, python);
|
Schedule schedule(deck, eclipseState, python);
|
||||||
SummaryConfig summary_config( deck, schedule, eclipseState.getTableManager( ));
|
SummaryConfig summary_config( deck, schedule, eclipseState.getTableManager( ), eclipseState.aquifer() );
|
||||||
SummaryState st(std::chrono::system_clock::now());
|
SummaryState st(std::chrono::system_clock::now());
|
||||||
Action::State action_state;
|
Action::State action_state;
|
||||||
UDQState udq_state(10);
|
UDQState udq_state(10);
|
||||||
|
@ -360,7 +360,7 @@ struct Setup {
|
|||||||
grid( es.getInputGrid( ) ),
|
grid( es.getInputGrid( ) ),
|
||||||
python( std::make_shared<Python>() ),
|
python( std::make_shared<Python>() ),
|
||||||
schedule( deck, es, python ),
|
schedule( deck, es, python ),
|
||||||
summary_config( deck, schedule, es.getTableManager( ))
|
summary_config( deck, schedule, es.getTableManager( ), es.aquifer() )
|
||||||
{
|
{
|
||||||
auto& io_config = es.getIOConfig();
|
auto& io_config = es.getIOConfig();
|
||||||
io_config.setEclCompatibleRST(false);
|
io_config.setEclCompatibleRST(false);
|
||||||
|
@ -435,7 +435,7 @@ struct setup {
|
|||||||
grid( es.getInputGrid() ),
|
grid( es.getInputGrid() ),
|
||||||
python( std::make_shared<Python>() ),
|
python( std::make_shared<Python>() ),
|
||||||
schedule( deck, es, python),
|
schedule( deck, es, python),
|
||||||
config( deck, schedule, es.getTableManager()),
|
config( deck, schedule, es.getTableManager(), es.aquifer()),
|
||||||
wells( result_wells(w3_injector) ),
|
wells( result_wells(w3_injector) ),
|
||||||
grp_nwrk( result_group_nwrk() ),
|
grp_nwrk( result_group_nwrk() ),
|
||||||
name( toupper(std::move(fname)) ),
|
name( toupper(std::move(fname)) ),
|
||||||
|
@ -231,7 +231,7 @@ struct setup {
|
|||||||
grid( es.getInputGrid() ),
|
grid( es.getInputGrid() ),
|
||||||
python( std::make_shared<Python>() ),
|
python( std::make_shared<Python>() ),
|
||||||
schedule( deck, es, python),
|
schedule( deck, es, python),
|
||||||
config( deck, schedule, es.getTableManager()),
|
config( deck, schedule, es.getTableManager(), es.aquifer() ),
|
||||||
wells( result_wells() ),
|
wells( result_wells() ),
|
||||||
grp_nwrk( result_group_network() ),
|
grp_nwrk( result_group_network() ),
|
||||||
name( toupper(std::move(fname)) ),
|
name( toupper(std::move(fname)) ),
|
||||||
|
@ -203,7 +203,7 @@ BOOST_AUTO_TEST_CASE(EclipseWriteRestartWellInfo) {
|
|||||||
Opm::EclipseState es(deck);
|
Opm::EclipseState es(deck);
|
||||||
const Opm::EclipseGrid& grid = es.getInputGrid();
|
const Opm::EclipseGrid& grid = es.getInputGrid();
|
||||||
Opm::Schedule schedule( deck, es, python);
|
Opm::Schedule schedule( deck, es, python);
|
||||||
Opm::SummaryConfig summary_config( deck, schedule, es.getTableManager( ));
|
Opm::SummaryConfig summary_config( deck, schedule, es.getTableManager( ), es.aquifer());
|
||||||
const auto num_cells = grid.getCartesianSize();
|
const auto num_cells = grid.getCartesianSize();
|
||||||
Opm::EclipseIO eclipseWriter( es, grid , schedule, summary_config);
|
Opm::EclipseIO eclipseWriter( es, grid , schedule, summary_config);
|
||||||
int countTimeStep = schedule.getTimeMap().numTimesteps();
|
int countTimeStep = schedule.getTimeMap().numTimesteps();
|
||||||
|
Loading…
Reference in New Issue
Block a user