mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #109 from joakim-hove/remove-old-WellsManager
Removed calls to deprecated WellsManager() constructor
This commit is contained in:
@@ -48,6 +48,8 @@
|
|||||||
|
|
||||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||||
|
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||||
|
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
#include <boost/scoped_ptr.hpp>
|
||||||
#include <boost/filesystem.hpp>
|
#include <boost/filesystem.hpp>
|
||||||
@@ -94,6 +96,7 @@ try
|
|||||||
boost::scoped_ptr<GridManager> grid;
|
boost::scoped_ptr<GridManager> grid;
|
||||||
boost::scoped_ptr<BlackoilPropertiesInterface> props;
|
boost::scoped_ptr<BlackoilPropertiesInterface> props;
|
||||||
boost::scoped_ptr<RockCompressibility> rock_comp;
|
boost::scoped_ptr<RockCompressibility> rock_comp;
|
||||||
|
EclipseStateConstPtr eclipseState;
|
||||||
BlackoilState state;
|
BlackoilState state;
|
||||||
// bool check_well_controls = false;
|
// bool check_well_controls = false;
|
||||||
// int max_well_control_iterations = 0;
|
// int max_well_control_iterations = 0;
|
||||||
@@ -103,6 +106,8 @@ try
|
|||||||
deck.reset(new EclipseGridParser(deck_filename));
|
deck.reset(new EclipseGridParser(deck_filename));
|
||||||
Opm::ParserPtr newParser(new Opm::Parser() );
|
Opm::ParserPtr newParser(new Opm::Parser() );
|
||||||
Opm::DeckConstPtr newParserDeck = newParser->parseFile( deck_filename );
|
Opm::DeckConstPtr newParserDeck = newParser->parseFile( deck_filename );
|
||||||
|
eclipseState.reset( new EclipseState(newParserDeck ));
|
||||||
|
|
||||||
|
|
||||||
// Grid init
|
// Grid init
|
||||||
grid.reset(new GridManager(newParserDeck));
|
grid.reset(new GridManager(newParserDeck));
|
||||||
@@ -255,7 +260,7 @@ try
|
|||||||
<< simtimer.numSteps() - step << ")\n\n" << std::flush;
|
<< simtimer.numSteps() - step << ")\n\n" << std::flush;
|
||||||
|
|
||||||
// Create new wells, well_state
|
// 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
|
// @@@ HACK: we should really make a new well state and
|
||||||
// properly transfer old well state to it every epoch,
|
// properly transfer old well state to it every epoch,
|
||||||
// since number of wells may change etc.
|
// since number of wells may change etc.
|
||||||
|
|||||||
@@ -46,6 +46,9 @@
|
|||||||
#include <opm/core/simulator/WellState.hpp>
|
#include <opm/core/simulator/WellState.hpp>
|
||||||
#include <opm/autodiff/SimulatorIncompTwophaseAd.hpp>
|
#include <opm/autodiff/SimulatorIncompTwophaseAd.hpp>
|
||||||
|
|
||||||
|
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||||
|
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||||
|
|
||||||
#include <boost/scoped_ptr.hpp>
|
#include <boost/scoped_ptr.hpp>
|
||||||
#include <boost/filesystem.hpp>
|
#include <boost/filesystem.hpp>
|
||||||
|
|
||||||
@@ -100,12 +103,16 @@ try
|
|||||||
boost::scoped_ptr<GridManager> grid;
|
boost::scoped_ptr<GridManager> grid;
|
||||||
boost::scoped_ptr<IncompPropertiesInterface> props;
|
boost::scoped_ptr<IncompPropertiesInterface> props;
|
||||||
boost::scoped_ptr<RockCompressibility> rock_comp;
|
boost::scoped_ptr<RockCompressibility> rock_comp;
|
||||||
|
EclipseStateConstPtr eclipseState;
|
||||||
TwophaseState state;
|
TwophaseState state;
|
||||||
// bool check_well_controls = false;
|
// bool check_well_controls = false;
|
||||||
// int max_well_control_iterations = 0;
|
// int max_well_control_iterations = 0;
|
||||||
double gravity[3] = { 0.0 };
|
double gravity[3] = { 0.0 };
|
||||||
if (use_deck) {
|
if (use_deck) {
|
||||||
std::string deck_filename = param.get<std::string>("deck_filename");
|
std::string deck_filename = param.get<std::string>("deck_filename");
|
||||||
|
ParserPtr parser(new Opm::Parser());
|
||||||
|
eclipseState.reset( new EclipseState(parser->parseFile(deck_filename)));
|
||||||
|
|
||||||
deck.reset(new EclipseGridParser(deck_filename));
|
deck.reset(new EclipseGridParser(deck_filename));
|
||||||
// Grid init
|
// Grid init
|
||||||
grid.reset(new GridManager(*deck));
|
grid.reset(new GridManager(*deck));
|
||||||
@@ -262,7 +269,7 @@ try
|
|||||||
<< simtimer.numSteps() - step << ")\n\n" << std::flush;
|
<< simtimer.numSteps() - step << ")\n\n" << std::flush;
|
||||||
|
|
||||||
// Create new wells, well_state
|
// 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
|
// @@@ HACK: we should really make a new well state and
|
||||||
// properly transfer old well state to it every epoch,
|
// properly transfer old well state to it every epoch,
|
||||||
// since number of wells may change etc.
|
// since number of wells may change etc.
|
||||||
|
|||||||
Reference in New Issue
Block a user