Schedule no longer part of EclipseState.
This commit is contained in:
parent
10a07ef9a4
commit
210364ecde
@ -181,8 +181,14 @@ try
|
|||||||
const UnstructuredGrid& grid = *grid_manager.c_grid();
|
const UnstructuredGrid& grid = *grid_manager.c_grid();
|
||||||
// Rock and fluid init
|
// Rock and fluid init
|
||||||
IncompPropertiesSinglePhase props(deck, eclipseState, grid);
|
IncompPropertiesSinglePhase props(deck, eclipseState, grid);
|
||||||
// Wells init.
|
// Wells init.i
|
||||||
WellsManager wells_manager(eclipseState , 0, grid);
|
const auto& ecl_grid = eclipseState.getInputGrid();
|
||||||
|
const TableManager table ( deck );
|
||||||
|
const Eclipse3DProperties eclipseProperties ( deck , table, ecl_grid);
|
||||||
|
const Schedule sched(deck, ecl_grid, eclipseProperties, Phases(true, true, true), parseContext );
|
||||||
|
|
||||||
|
|
||||||
|
WellsManager wells_manager(eclipseState , sched, 0, grid);
|
||||||
|
|
||||||
std::shared_ptr<Wells> my_wells(clone_wells(wells_manager.c_wells()), destroy_wells);
|
std::shared_ptr<Wells> my_wells(clone_wells(wells_manager.c_wells()), destroy_wells);
|
||||||
setBhpWells(*my_wells);
|
setBhpWells(*my_wells);
|
||||||
|
@ -327,6 +327,7 @@ namespace Opm
|
|||||||
|
|
||||||
/// Construct wells from deck.
|
/// Construct wells from deck.
|
||||||
WellsManager::WellsManager(const Opm::EclipseState& eclipseState,
|
WellsManager::WellsManager(const Opm::EclipseState& eclipseState,
|
||||||
|
const Opm::Schedule& schedule,
|
||||||
const size_t timeStep,
|
const size_t timeStep,
|
||||||
const UnstructuredGrid& grid)
|
const UnstructuredGrid& grid)
|
||||||
: w_(0), is_parallel_run_(false)
|
: w_(0), is_parallel_run_(false)
|
||||||
@ -334,7 +335,7 @@ namespace Opm
|
|||||||
// TODO: not sure about the usage of this WellsManager constructor
|
// TODO: not sure about the usage of this WellsManager constructor
|
||||||
// TODO: not sure whether this is the correct thing to do here.
|
// TODO: not sure whether this is the correct thing to do here.
|
||||||
DynamicListEconLimited dummy_list_econ_limited;
|
DynamicListEconLimited dummy_list_econ_limited;
|
||||||
init(eclipseState, timeStep, UgGridHelpers::numCells(grid),
|
init(eclipseState, schedule, timeStep, UgGridHelpers::numCells(grid),
|
||||||
UgGridHelpers::globalCell(grid), UgGridHelpers::cartDims(grid),
|
UgGridHelpers::globalCell(grid), UgGridHelpers::cartDims(grid),
|
||||||
UgGridHelpers::dimensions(grid),
|
UgGridHelpers::dimensions(grid),
|
||||||
UgGridHelpers::cell2Faces(grid), UgGridHelpers::beginFaceCentroids(grid),
|
UgGridHelpers::cell2Faces(grid), UgGridHelpers::beginFaceCentroids(grid),
|
||||||
|
@ -85,6 +85,7 @@ namespace Opm
|
|||||||
/// the wells handeled by another process. Defaults to empty set.
|
/// the wells handeled by another process. Defaults to empty set.
|
||||||
template<class F2C, class FC>
|
template<class F2C, class FC>
|
||||||
WellsManager(const Opm::EclipseState& eclipseState,
|
WellsManager(const Opm::EclipseState& eclipseState,
|
||||||
|
const Opm::Schedule& schedule,
|
||||||
const size_t timeStep,
|
const size_t timeStep,
|
||||||
int num_cells,
|
int num_cells,
|
||||||
const int* global_cell,
|
const int* global_cell,
|
||||||
@ -97,6 +98,7 @@ namespace Opm
|
|||||||
const std::unordered_set<std::string>& deactivated_wells = std::unordered_set<std::string> ());
|
const std::unordered_set<std::string>& deactivated_wells = std::unordered_set<std::string> ());
|
||||||
|
|
||||||
WellsManager(const Opm::EclipseState& eclipseState,
|
WellsManager(const Opm::EclipseState& eclipseState,
|
||||||
|
const Opm::Schedule& schedule,
|
||||||
const size_t timeStep,
|
const size_t timeStep,
|
||||||
const UnstructuredGrid& grid);
|
const UnstructuredGrid& grid);
|
||||||
/// Destructor.
|
/// Destructor.
|
||||||
@ -154,6 +156,7 @@ namespace Opm
|
|||||||
private:
|
private:
|
||||||
template<class C2F, class FC>
|
template<class C2F, class FC>
|
||||||
void init(const Opm::EclipseState& eclipseState,
|
void init(const Opm::EclipseState& eclipseState,
|
||||||
|
const Opm::Schedule& schedule,
|
||||||
const size_t timeStep,
|
const size_t timeStep,
|
||||||
int num_cells,
|
int num_cells,
|
||||||
const int* global_cell,
|
const int* global_cell,
|
||||||
|
@ -309,6 +309,7 @@ void WellsManager::createWellsFromSpecs(std::vector<const Well*>& wells, size_t
|
|||||||
template <class C2F, class FC>
|
template <class C2F, class FC>
|
||||||
WellsManager::
|
WellsManager::
|
||||||
WellsManager(const Opm::EclipseState& eclipseState,
|
WellsManager(const Opm::EclipseState& eclipseState,
|
||||||
|
const Opm::Schedule& schedule,
|
||||||
const size_t timeStep,
|
const size_t timeStep,
|
||||||
int number_of_cells,
|
int number_of_cells,
|
||||||
const int* global_cell,
|
const int* global_cell,
|
||||||
@ -321,7 +322,7 @@ WellsManager(const Opm::EclipseState& eclipseState,
|
|||||||
const std::unordered_set<std::string>& deactivated_wells)
|
const std::unordered_set<std::string>& deactivated_wells)
|
||||||
: w_(0), is_parallel_run_(is_parallel_run)
|
: w_(0), is_parallel_run_(is_parallel_run)
|
||||||
{
|
{
|
||||||
init(eclipseState, timeStep, number_of_cells, global_cell,
|
init(eclipseState, schedule, timeStep, number_of_cells, global_cell,
|
||||||
cart_dims, dimensions,
|
cart_dims, dimensions,
|
||||||
cell_to_faces, begin_face_centroids, list_econ_limited, deactivated_wells);
|
cell_to_faces, begin_face_centroids, list_econ_limited, deactivated_wells);
|
||||||
}
|
}
|
||||||
@ -330,6 +331,7 @@ WellsManager(const Opm::EclipseState& eclipseState,
|
|||||||
template <class C2F, class FC>
|
template <class C2F, class FC>
|
||||||
void
|
void
|
||||||
WellsManager::init(const Opm::EclipseState& eclipseState,
|
WellsManager::init(const Opm::EclipseState& eclipseState,
|
||||||
|
const Opm::Schedule& schedule,
|
||||||
const size_t timeStep,
|
const size_t timeStep,
|
||||||
int number_of_cells,
|
int number_of_cells,
|
||||||
const int* global_cell,
|
const int* global_cell,
|
||||||
@ -346,7 +348,7 @@ WellsManager::init(const Opm::EclipseState& eclipseState,
|
|||||||
"the corresponding grid is 3-dimensional.");
|
"the corresponding grid is 3-dimensional.");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eclipseState.getSchedule().numWells() == 0) {
|
if (schedule.numWells() == 0) {
|
||||||
OPM_MESSAGE("No wells specified in Schedule section, "
|
OPM_MESSAGE("No wells specified in Schedule section, "
|
||||||
"initializing no wells");
|
"initializing no wells");
|
||||||
return;
|
return;
|
||||||
@ -368,7 +370,6 @@ WellsManager::init(const Opm::EclipseState& eclipseState,
|
|||||||
// For easy lookup:
|
// For easy lookup:
|
||||||
std::map<std::string, int> well_names_to_index;
|
std::map<std::string, int> well_names_to_index;
|
||||||
|
|
||||||
const auto& schedule = eclipseState.getSchedule();
|
|
||||||
auto wells = schedule.getWells(timeStep);
|
auto wells = schedule.getWells(timeStep);
|
||||||
std::vector<int> wells_on_proc;
|
std::vector<int> wells_on_proc;
|
||||||
|
|
||||||
|
@ -48,6 +48,11 @@ BOOST_AUTO_TEST_CASE(TestStoppedWells)
|
|||||||
Opm::Deck deck(parser.parseFile(filename , parseContext));
|
Opm::Deck deck(parser.parseFile(filename , parseContext));
|
||||||
Opm::EclipseState eclipseState(deck , parseContext);
|
Opm::EclipseState eclipseState(deck , parseContext);
|
||||||
Opm::GridManager gridManager(eclipseState.getInputGrid());
|
Opm::GridManager gridManager(eclipseState.getInputGrid());
|
||||||
|
const auto& grid = eclipseState.getInputGrid();
|
||||||
|
const TableManager table ( deck );
|
||||||
|
const Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||||
|
const Schedule sched(deck, grid, eclipseProperties, Phases(true, true, true), parseContext );
|
||||||
|
|
||||||
|
|
||||||
double target_surfacerate_inj;
|
double target_surfacerate_inj;
|
||||||
double target_surfacerate_prod;
|
double target_surfacerate_prod;
|
||||||
@ -58,7 +63,7 @@ BOOST_AUTO_TEST_CASE(TestStoppedWells)
|
|||||||
|
|
||||||
// Both wells are open in the first schedule step
|
// Both wells are open in the first schedule step
|
||||||
{
|
{
|
||||||
Opm::WellsManager wellsManager(eclipseState , 0 , *gridManager.c_grid());
|
Opm::WellsManager wellsManager(eclipseState , sched, 0, *gridManager.c_grid());
|
||||||
const Wells* wells = wellsManager.c_wells();
|
const Wells* wells = wellsManager.c_wells();
|
||||||
const struct WellControls* ctrls0 = wells->ctrls[0];
|
const struct WellControls* ctrls0 = wells->ctrls[0];
|
||||||
const struct WellControls* ctrls1 = wells->ctrls[1];
|
const struct WellControls* ctrls1 = wells->ctrls[1];
|
||||||
@ -78,7 +83,7 @@ BOOST_AUTO_TEST_CASE(TestStoppedWells)
|
|||||||
|
|
||||||
// The injector is stopped
|
// The injector is stopped
|
||||||
{
|
{
|
||||||
Opm::WellsManager wellsManager(eclipseState , 1 , *gridManager.c_grid());
|
Opm::WellsManager wellsManager(eclipseState, sched, 1 , *gridManager.c_grid());
|
||||||
const Wells* wells = wellsManager.c_wells();
|
const Wells* wells = wellsManager.c_wells();
|
||||||
const struct WellControls* ctrls0 = wells->ctrls[0];
|
const struct WellControls* ctrls0 = wells->ctrls[0];
|
||||||
const struct WellControls* ctrls1 = wells->ctrls[1];
|
const struct WellControls* ctrls1 = wells->ctrls[1];
|
||||||
|
@ -46,15 +46,20 @@ BOOST_AUTO_TEST_CASE(AddWellsAndGroupToCollection) {
|
|||||||
Deck deck = parser.parseFile(scheduleFile, parseContext);
|
Deck deck = parser.parseFile(scheduleFile, parseContext);
|
||||||
EclipseState eclipseState(deck, parseContext);
|
EclipseState eclipseState(deck, parseContext);
|
||||||
PhaseUsage pu = phaseUsageFromDeck(eclipseState);
|
PhaseUsage pu = phaseUsageFromDeck(eclipseState);
|
||||||
|
const auto& grid = eclipseState.getInputGrid();
|
||||||
|
const TableManager table ( deck );
|
||||||
|
const Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||||
|
const Schedule sched(deck, grid, eclipseProperties, Phases(true, true, true), parseContext );
|
||||||
|
|
||||||
|
|
||||||
WellCollection collection;
|
WellCollection collection;
|
||||||
|
|
||||||
// Add groups to WellCollection
|
// Add groups to WellCollection
|
||||||
const auto& fieldGroup = eclipseState.getSchedule().getGroup("FIELD");
|
const auto& fieldGroup = sched.getGroup("FIELD");
|
||||||
collection.addField(fieldGroup, 2, pu);
|
collection.addField(fieldGroup, 2, pu);
|
||||||
|
|
||||||
collection.addGroup( eclipseState.getSchedule().getGroup( "G1" ), fieldGroup.name(), 2, pu);
|
collection.addGroup( sched.getGroup( "G1" ), fieldGroup.name(), 2, pu);
|
||||||
collection.addGroup( eclipseState.getSchedule().getGroup( "G2" ), fieldGroup.name(), 2, pu);
|
collection.addGroup( sched.getGroup( "G2" ), fieldGroup.name(), 2, pu);
|
||||||
|
|
||||||
BOOST_CHECK_EQUAL("FIELD", collection.findNode("FIELD")->name());
|
BOOST_CHECK_EQUAL("FIELD", collection.findNode("FIELD")->name());
|
||||||
BOOST_CHECK_EQUAL("FIELD", collection.findNode("G1")->getParent()->name());
|
BOOST_CHECK_EQUAL("FIELD", collection.findNode("G1")->getParent()->name());
|
||||||
@ -62,7 +67,7 @@ BOOST_AUTO_TEST_CASE(AddWellsAndGroupToCollection) {
|
|||||||
|
|
||||||
// Add wells to WellCollection
|
// Add wells to WellCollection
|
||||||
WellCollection wellCollection;
|
WellCollection wellCollection;
|
||||||
auto wells = eclipseState.getSchedule().getWells();
|
auto wells = sched.getWells();
|
||||||
for (size_t i=0; i<wells.size(); i++) {
|
for (size_t i=0; i<wells.size(); i++) {
|
||||||
collection.addWell(wells[i], 2, pu);
|
collection.addWell(wells[i], 2, pu);
|
||||||
}
|
}
|
||||||
|
@ -53,9 +53,14 @@ BOOST_AUTO_TEST_CASE(ConstructGroupFromWell) {
|
|||||||
Parser parser;
|
Parser parser;
|
||||||
Deck deck = parser.parseFile(scheduleFile, parseContext);
|
Deck deck = parser.parseFile(scheduleFile, parseContext);
|
||||||
EclipseState eclipseState(deck , parseContext);
|
EclipseState eclipseState(deck , parseContext);
|
||||||
PhaseUsage pu = phaseUsageFromDeck(eclipseState);
|
const auto& grid = eclipseState.getInputGrid();
|
||||||
|
const TableManager table ( deck );
|
||||||
|
const Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||||
|
const Schedule sched(deck, grid, eclipseProperties, Phases(true, true, true), parseContext );
|
||||||
|
|
||||||
auto wells = eclipseState.getSchedule().getWells();
|
PhaseUsage pu = phaseUsageFromDeck(eclipseState);
|
||||||
|
|
||||||
|
auto wells = sched.getWells();
|
||||||
|
|
||||||
for (size_t i=0; i<wells.size(); i++) {
|
for (size_t i=0; i<wells.size(); i++) {
|
||||||
const auto* well = wells[i];
|
const auto* well = wells[i];
|
||||||
@ -87,10 +92,15 @@ BOOST_AUTO_TEST_CASE(ConstructGroupFromGroup) {
|
|||||||
Deck deck = parser.parseFile(scheduleFile, parseContext);
|
Deck deck = parser.parseFile(scheduleFile, parseContext);
|
||||||
EclipseState eclipseState(deck , parseContext);
|
EclipseState eclipseState(deck , parseContext);
|
||||||
PhaseUsage pu = phaseUsageFromDeck(eclipseState);
|
PhaseUsage pu = phaseUsageFromDeck(eclipseState);
|
||||||
|
const auto& grid = eclipseState.getInputGrid();
|
||||||
|
const TableManager table ( deck );
|
||||||
|
const Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||||
|
const Schedule sched(deck, grid, eclipseProperties, Phases(true, true, true), parseContext );
|
||||||
|
|
||||||
const auto& nodes = eclipseState.getSchedule().getGroupTree(2);
|
|
||||||
|
|
||||||
for( const auto& grp : eclipseState.getSchedule().getGroups() ) {
|
const auto& nodes = sched.getGroupTree(2);
|
||||||
|
|
||||||
|
for( const auto& grp : sched.getGroups() ) {
|
||||||
if( !nodes.exists( grp->name() ) ) continue;
|
if( !nodes.exists( grp->name() ) ) continue;
|
||||||
const auto& group = *grp;
|
const auto& group = *grp;
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
#include <opm/parser/eclipse/Parser/Parser.hpp>
|
||||||
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
|
#include <opm/parser/eclipse/Parser/ParseContext.hpp>
|
||||||
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
#include <opm/parser/eclipse/EclipseState/Schedule/Schedule.hpp>
|
||||||
|
#include <opm/parser/eclipse/EclipseState/Tables/TableManager.hpp>
|
||||||
|
|
||||||
#include <opm/core/wells/WellsManager.hpp>
|
#include <opm/core/wells/WellsManager.hpp>
|
||||||
#include <opm/core/wells.h>
|
#include <opm/core/wells.h>
|
||||||
@ -183,21 +184,26 @@ BOOST_AUTO_TEST_CASE(New_Constructor_Works) {
|
|||||||
|
|
||||||
Opm::EclipseState eclipseState(deck, parseContext);
|
Opm::EclipseState eclipseState(deck, parseContext);
|
||||||
Opm::GridManager gridManager(eclipseState.getInputGrid());
|
Opm::GridManager gridManager(eclipseState.getInputGrid());
|
||||||
|
const auto& grid = eclipseState.getInputGrid();
|
||||||
|
const Opm::TableManager table ( deck );
|
||||||
|
const Opm::Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||||
|
const Opm::Schedule sched(deck, grid, eclipseProperties, Opm::Phases(true, true, true), parseContext );
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
Opm::WellsManager wellsManager(eclipseState, 0, *gridManager.c_grid());
|
Opm::WellsManager wellsManager(eclipseState, sched, 0, *gridManager.c_grid());
|
||||||
wells_static_check(wellsManager.c_wells());
|
wells_static_check(wellsManager.c_wells());
|
||||||
check_controls_epoch0(wellsManager.c_wells()->ctrls);
|
check_controls_epoch0(wellsManager.c_wells()->ctrls);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
Opm::WellsManager wellsManager(eclipseState, 1, *gridManager.c_grid());
|
Opm::WellsManager wellsManager(eclipseState, sched, 1, *gridManager.c_grid());
|
||||||
wells_static_check(wellsManager.c_wells());
|
wells_static_check(wellsManager.c_wells());
|
||||||
check_controls_epoch1(wellsManager.c_wells()->ctrls);
|
check_controls_epoch1(wellsManager.c_wells()->ctrls);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
Opm::WellsManager wellsManager(eclipseState, 3, *gridManager.c_grid());
|
Opm::WellsManager wellsManager(eclipseState, sched, 3, *gridManager.c_grid());
|
||||||
const Wells* wells = wellsManager.c_wells();
|
const Wells* wells = wellsManager.c_wells();
|
||||||
|
|
||||||
// There is 3 wells in total in the deck at the 3rd schedule step.
|
// There is 3 wells in total in the deck at the 3rd schedule step.
|
||||||
@ -219,9 +225,14 @@ BOOST_AUTO_TEST_CASE(WellsEqual) {
|
|||||||
Opm::Deck deck(parser.parseFile(filename, parseContext));
|
Opm::Deck deck(parser.parseFile(filename, parseContext));
|
||||||
Opm::EclipseState eclipseState(deck, parseContext);
|
Opm::EclipseState eclipseState(deck, parseContext);
|
||||||
Opm::GridManager gridManager(eclipseState.getInputGrid());
|
Opm::GridManager gridManager(eclipseState.getInputGrid());
|
||||||
|
const auto& grid = eclipseState.getInputGrid();
|
||||||
|
const Opm::TableManager table ( deck );
|
||||||
|
const Opm::Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||||
|
const Opm::Schedule sched(deck, grid, eclipseProperties, Opm::Phases(true, true, true), parseContext );
|
||||||
|
|
||||||
Opm::WellsManager wellsManager0(eclipseState, 0, *gridManager.c_grid());
|
|
||||||
Opm::WellsManager wellsManager1(eclipseState, 1, *gridManager.c_grid());
|
Opm::WellsManager wellsManager0(eclipseState, sched, 0, *gridManager.c_grid());
|
||||||
|
Opm::WellsManager wellsManager1(eclipseState, sched, 1, *gridManager.c_grid());
|
||||||
|
|
||||||
BOOST_CHECK(wells_equal( wellsManager0.c_wells() , wellsManager0.c_wells(),false));
|
BOOST_CHECK(wells_equal( wellsManager0.c_wells() , wellsManager0.c_wells(),false));
|
||||||
BOOST_CHECK(!wells_equal( wellsManager0.c_wells() , wellsManager1.c_wells(),false));
|
BOOST_CHECK(!wells_equal( wellsManager0.c_wells() , wellsManager1.c_wells(),false));
|
||||||
@ -234,9 +245,15 @@ BOOST_AUTO_TEST_CASE(ControlsEqual) {
|
|||||||
Opm::Deck deck(parser.parseFile(filename, parseContext));
|
Opm::Deck deck(parser.parseFile(filename, parseContext));
|
||||||
Opm::EclipseState eclipseState(deck, parseContext);
|
Opm::EclipseState eclipseState(deck, parseContext);
|
||||||
Opm::GridManager gridManager(eclipseState.getInputGrid());
|
Opm::GridManager gridManager(eclipseState.getInputGrid());
|
||||||
|
const auto& grid = eclipseState.getInputGrid();
|
||||||
|
const Opm::TableManager table ( deck );
|
||||||
|
const Opm::Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||||
|
const Opm::Schedule sched(deck, grid, eclipseProperties, Opm::Phases(true, true, true), parseContext );
|
||||||
|
|
||||||
Opm::WellsManager wellsManager0(eclipseState, 0, *gridManager.c_grid());
|
|
||||||
Opm::WellsManager wellsManager1(eclipseState, 1, *gridManager.c_grid());
|
|
||||||
|
Opm::WellsManager wellsManager0(eclipseState, sched, 0, *gridManager.c_grid());
|
||||||
|
Opm::WellsManager wellsManager1(eclipseState, sched, 1, *gridManager.c_grid());
|
||||||
|
|
||||||
BOOST_CHECK(well_controls_equal( wellsManager0.c_wells()->ctrls[0] , wellsManager0.c_wells()->ctrls[0] , false));
|
BOOST_CHECK(well_controls_equal( wellsManager0.c_wells()->ctrls[0] , wellsManager0.c_wells()->ctrls[0] , false));
|
||||||
BOOST_CHECK(well_controls_equal( wellsManager0.c_wells()->ctrls[1] , wellsManager0.c_wells()->ctrls[1] , false));
|
BOOST_CHECK(well_controls_equal( wellsManager0.c_wells()->ctrls[1] , wellsManager0.c_wells()->ctrls[1] , false));
|
||||||
@ -256,8 +273,13 @@ BOOST_AUTO_TEST_CASE(WellShutOK) {
|
|||||||
Opm::Deck deck(parser.parseFile(filename, parseContext));
|
Opm::Deck deck(parser.parseFile(filename, parseContext));
|
||||||
Opm::EclipseState eclipseState(deck, parseContext);
|
Opm::EclipseState eclipseState(deck, parseContext);
|
||||||
Opm::GridManager gridManager(eclipseState.getInputGrid());
|
Opm::GridManager gridManager(eclipseState.getInputGrid());
|
||||||
|
const auto& grid = eclipseState.getInputGrid();
|
||||||
|
const Opm::TableManager table ( deck );
|
||||||
|
const Opm::Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||||
|
const Opm::Schedule sched(deck, grid, eclipseProperties, Opm::Phases(true, true, true), parseContext );
|
||||||
|
|
||||||
Opm::WellsManager wellsManager2(eclipseState, 2, *gridManager.c_grid());
|
|
||||||
|
Opm::WellsManager wellsManager2(eclipseState, sched, 2, *gridManager.c_grid());
|
||||||
|
|
||||||
// Shut wells are not added to the deck. i.e number of wells should be 2-1
|
// Shut wells are not added to the deck. i.e number of wells should be 2-1
|
||||||
BOOST_CHECK(wellsManager2.c_wells()->number_of_wells == 1);
|
BOOST_CHECK(wellsManager2.c_wells()->number_of_wells == 1);
|
||||||
@ -272,8 +294,14 @@ BOOST_AUTO_TEST_CASE(WellSTOPOK) {
|
|||||||
Opm::Deck deck(parser.parseFile(filename, parseContext));
|
Opm::Deck deck(parser.parseFile(filename, parseContext));
|
||||||
Opm::EclipseState eclipseState(deck, parseContext);
|
Opm::EclipseState eclipseState(deck, parseContext);
|
||||||
Opm::GridManager gridManager(eclipseState.getInputGrid());
|
Opm::GridManager gridManager(eclipseState.getInputGrid());
|
||||||
|
const auto& grid = eclipseState.getInputGrid();
|
||||||
|
const Opm::TableManager table ( deck );
|
||||||
|
const Opm::Eclipse3DProperties eclipseProperties ( deck , table, grid);
|
||||||
|
const Opm::Schedule sched(deck, grid, eclipseProperties, Opm::Phases(true, true, true), parseContext );
|
||||||
|
|
||||||
Opm::WellsManager wellsManager(eclipseState, 0, *gridManager.c_grid());
|
|
||||||
|
|
||||||
|
Opm::WellsManager wellsManager(eclipseState, sched, 0, *gridManager.c_grid());
|
||||||
|
|
||||||
const Wells* wells = wellsManager.c_wells();
|
const Wells* wells = wellsManager.c_wells();
|
||||||
const struct WellControls* ctrls0 = wells->ctrls[0];
|
const struct WellControls* ctrls0 = wells->ctrls[0];
|
||||||
|
Loading…
Reference in New Issue
Block a user