Removed WellsManager constructor which takes an ole Eclipsegridparser instance.

This commit is contained in:
Joakim Hove 2014-03-25 18:57:58 +01:00 committed by Atgeirr Flø Rasmussen
parent f0e86b98e3
commit 9f6d658486

View File

@ -45,6 +45,10 @@
#include <opm/core/simulator/WellState.hpp>
#include <opm/core/simulator/SimulatorIncompTwophase.hpp>
#include <opm/parser/eclipse/Parser/Parser.hpp>
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
#include <memory>
#include <boost/filesystem.hpp>
@ -94,6 +98,8 @@ try
// If we have a "deck_filename", grid and props will be read from that.
bool use_deck = param.has("deck_filename");
EclipseStateConstPtr eclipseState;
std::unique_ptr<EclipseGridParser> deck;
std::unique_ptr<GridManager> grid;
std::unique_ptr<IncompPropertiesInterface> props;
@ -103,8 +109,10 @@ try
// int max_well_control_iterations = 0;
double gravity[3] = { 0.0 };
if (use_deck) {
ParserPtr parser(new Opm::Parser());
std::string deck_filename = param.get<std::string>("deck_filename");
deck.reset(new EclipseGridParser(deck_filename));
eclipseState.reset( new EclipseState(parser->parseFile(deck_filename)));
// Grid init
grid.reset(new GridManager(*deck));
// Rock and fluid init
@ -260,7 +268,7 @@ try
<< simtimer.numSteps() - step << ")\n\n" << std::flush;
// Create new wells, well_state
WellsManager wells(*deck, *grid->c_grid(), props->permeability());
WellsManager wells(eclipseState , epoch , *grid->c_grid(), props->permeability());
// @@@ HACK: we should really make a new well state and
// properly transfer old well state to it every epoch,
// since number of wells may change etc.