Added EclipseGrid to the EclipseState class

This commit is contained in:
Joakim Hove
2014-04-24 09:01:58 +02:00
parent 7905cbf462
commit 02f88ce8ff
4 changed files with 36 additions and 2 deletions

View File

@@ -18,6 +18,7 @@
*/
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
#include <opm/parser/eclipse/EclipseState/Grid/EclipseGrid.hpp>
#include <opm/parser/eclipse/EclipseState/Schedule/ScheduleEnums.hpp>
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
#include <iostream>
@@ -27,11 +28,17 @@ namespace Opm {
EclipseState::EclipseState(DeckConstPtr deck) {
initPhases(deck);
initEclipseGrid(deck);
initSchedule(deck);
initTitle(deck);
}
EclipseGridConstPtr EclipseState::getEclipseGrid() const {
return m_eclipseGrid;
}
ScheduleConstPtr EclipseState::getSchedule() const {
return schedule;
}
@@ -45,6 +52,13 @@ namespace Opm {
schedule = ScheduleConstPtr( new Schedule(deck) );
}
void EclipseState::initEclipseGrid(DeckConstPtr deck) {
std::shared_ptr<Opm::GRIDSection> gridSection(new Opm::GRIDSection(deck) );
std::shared_ptr<Opm::RUNSPECSection> runspecSection(new Opm::RUNSPECSection(deck) );
m_eclipseGrid = EclipseGridConstPtr( new EclipseGrid( runspecSection , gridSection ));
}
void EclipseState::initPhases(DeckConstPtr deck) {
if (deck->hasKeyword("OIL"))