Extracted SummaryConfig out from EclipseState
This commit is contained in:
@@ -24,6 +24,8 @@
|
||||
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
||||
|
||||
|
||||
inline void dumpMessages( const Opm::MessageContainer& messageContainer) {
|
||||
@@ -49,6 +51,8 @@ inline void loadDeck( const char * deck_file) {
|
||||
auto deck = parser.parseFile(deck_file, parseContext);
|
||||
std::cout << "parse complete - creating EclipseState .... "; std::cout.flush();
|
||||
Opm::EclipseState state( deck, parseContext );
|
||||
auto schedule = state.getSchedule( );
|
||||
Opm::SummaryConfig summary( deck, schedule, state.getTableManager( ), parseContext );
|
||||
std::cout << "complete." << std::endl;
|
||||
|
||||
dumpMessages( deck.getMessageContainer() );
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
#include <opm/parser/eclipse/Parser/MessageContainer.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/SimulationConfig/SimulationConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/SummaryConfig/SummaryConfig.hpp>
|
||||
|
||||
namespace Opm {
|
||||
|
||||
@@ -77,7 +76,6 @@ namespace Opm {
|
||||
|
||||
const InitConfig& getInitConfig() const;
|
||||
const SimulationConfig& getSimulationConfig() const;
|
||||
const SummaryConfig& getSummaryConfig() const;
|
||||
const RestartConfig& getRestartConfig() const;
|
||||
RestartConfig& getRestartConfig();
|
||||
|
||||
@@ -132,7 +130,6 @@ namespace Opm {
|
||||
const SimulationConfig m_simulationConfig;
|
||||
TransMult m_transMult;
|
||||
Schedule m_schedule;
|
||||
const SummaryConfig m_summaryConfig;
|
||||
|
||||
FaultCollection m_faults;
|
||||
std::string m_title;
|
||||
|
||||
@@ -60,8 +60,7 @@ namespace Opm {
|
||||
m_eclipseProperties( deck, m_tables, m_inputGrid ),
|
||||
m_simulationConfig( deck, m_eclipseProperties ),
|
||||
m_transMult( GridDims(deck), deck, m_eclipseProperties ),
|
||||
m_schedule( m_parseContext, m_inputGrid, m_eclipseProperties, deck, m_runspec.phases() ),
|
||||
m_summaryConfig( deck, m_schedule, m_tables, m_parseContext)
|
||||
m_schedule( m_parseContext, m_inputGrid, m_eclipseProperties, deck, m_runspec.phases() )
|
||||
{
|
||||
m_inputGrid.resetACTNUM(m_eclipseProperties.getIntGridProperty("ACTNUM").getData().data());
|
||||
|
||||
@@ -97,9 +96,6 @@ namespace Opm {
|
||||
return m_inputGrid;
|
||||
}
|
||||
|
||||
const SummaryConfig& EclipseState::getSummaryConfig() const {
|
||||
return m_summaryConfig;
|
||||
}
|
||||
|
||||
const RestartConfig& EclipseState::getRestartConfig() const {
|
||||
return m_eclipseConfig.getRestartConfig();
|
||||
|
||||
@@ -101,7 +101,8 @@ static std::vector< std::string > sorted_key_names( const SummaryConfig& summary
|
||||
static SummaryConfig createSummary( std::string input , const ParseContext& parseContext = ParseContext()) {
|
||||
auto deck = createDeck( input );
|
||||
EclipseState state( deck, parseContext );
|
||||
return state.getSummaryConfig();
|
||||
auto schedule = state.getSchedule( );
|
||||
return SummaryConfig( deck, schedule, state.getTableManager( ), parseContext );
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(wells_all) {
|
||||
|
||||
@@ -31,6 +31,8 @@ inline void loadDeck( const char * deck_file) {
|
||||
|
||||
auto deck = parser.parseFile(deck_file, parseContext);
|
||||
Opm::EclipseState state( deck, parseContext );
|
||||
auto schedule = state.getSchedule( );
|
||||
Opm::SummaryConfig summary( deck, schedule, state.getTableManager( ), parseContext );
|
||||
{
|
||||
std::stringstream ss;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user