adding list_econ_limited to setupWellControls

This commit is contained in:
Kai Bao
2016-06-28 09:08:37 +02:00
parent bc1fb8e477
commit c7c38374ec
4 changed files with 12 additions and 3 deletions

View File

@@ -419,7 +419,8 @@ namespace Opm
void WellsManager::setupWellControls(std::vector< const Well* >& wells, size_t timeStep,
std::vector<std::string>& well_names, const PhaseUsage& phaseUsage,
const std::vector<int>& wells_on_proc) {
const std::vector<int>& wells_on_proc,
const DynamicListEconLimited& list_econ_limited) {
int well_index = 0;
auto well_on_proc = wells_on_proc.begin();
@@ -442,6 +443,10 @@ namespace Opm
continue;
}
if (list_econ_limited.wellEconLimited(well->name())) {
continue;
}
if (well->isInjector(timeStep)) {
const WellInjectionProperties& injectionProperties = well->getInjectionProperties(timeStep);
int ok = 1;

View File

@@ -165,7 +165,8 @@ namespace Opm
static void setupCompressedToCartesian(const int* global_cell, int number_of_cells, std::map<int,int>& cartesian_to_compressed );
void setupWellControls(std::vector<const Well*>& wells, size_t timeStep,
std::vector<std::string>& well_names, const PhaseUsage& phaseUsage,
const std::vector<int>& wells_on_proc);
const std::vector<int>& wells_on_proc,
const DynamicListEconLimited& list_econ_limited);
template<class C2F, class FC, class NTG>
void createWellsFromSpecs( std::vector<const Well*>& wells, size_t timeStep,

View File

@@ -146,6 +146,7 @@ void WellsManager::createWellsFromSpecs(std::vector<const Well*>& wells, size_t
}
if (list_econ_limited.wellEconLimited(well->name())) {
// std::cout << " the well " << well->name() << " was closed " << std::endl;
continue;
}
@@ -419,7 +420,7 @@ WellsManager::init(const Opm::EclipseStateConstPtr eclipseState,
pu, cartesian_to_compressed, permeability, ntg,
wells_on_proc, list_econ_limited);
setupWellControls(wells, timeStep, well_names, pu, wells_on_proc);
setupWellControls(wells, timeStep, well_names, pu, wells_on_proc, list_econ_limited);
{
GroupTreeNodeConstPtr fieldNode =

View File

@@ -469,6 +469,8 @@ void
clear_well_controls(int well_index, struct Wells *W)
/* ---------------------------------------------------------------------- */
{
// printf(" well_indx = %d \n", well_index);
// printf(" W->number_of_wells = %d \n", W->number_of_wells);
assert (W != NULL);
assert ((0 <= well_index) && (well_index < W->number_of_wells));