adding list_econ_limited to setupWellControls
This commit is contained in:
@@ -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;
|
||||
|
@@ -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,
|
||||
|
@@ -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 =
|
||||
|
@@ -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));
|
||||
|
||||
|
Reference in New Issue
Block a user