removing the well potential from WellsManager constructor.

This commit is contained in:
Kai Bao 2017-04-05 12:51:44 +02:00
parent 1aff98c4f4
commit 8d96d835b3
7 changed files with 1 additions and 37 deletions

View File

@ -642,7 +642,6 @@ namespace Opm
// as we get the following error otherwise
// with c++ (Debian 4.9.2-10) 4.9.2 and -std=c++11
// converting to const std::unordered_set<std::basic_string<char> > from initializer list would use explicit constructor
std::vector<double>(),
std::unordered_set<std::string>());
const Wells* wells = wells_manager.c_wells();

View File

@ -175,9 +175,6 @@ namespace Opm
void
outputFluidInPlace(const std::vector<double>& oip, const std::vector<double>& cip, const UnitSystem& units, const int reg);
void computeWellPotentials(const Wells* wells,
const WellState& xw,
std::vector<double>& well_potentials);
void updateListEconLimited(const std::unique_ptr<Solver>& solver,
const Schedule& schedule,

View File

@ -138,8 +138,6 @@ namespace Opm
desiredRestoreStep );
}
bool is_well_potentials_computed = param_.getDefault("compute_well_potentials", false );
std::vector<double> well_potentials;
DynamicListEconLimited dynamic_list_econ_limited;
SimulatorReport report;
SimulatorReport stepReport;
@ -178,7 +176,6 @@ namespace Opm
Opm::UgGridHelpers::beginFaceCentroids(grid_),
dynamic_list_econ_limited,
is_parallel_run_,
well_potentials,
defunct_well_names_);
const Wells* wells = wells_manager.c_wells();
WellState well_state;
@ -328,11 +325,6 @@ namespace Opm
report.output_write_time += perfTimer.stop();
prev_well_state = well_state;
// The well potentials are only computed if they are needed
// For now thay are only used to determine default guide rates for group controlled wells
if ( is_well_potentials_computed ) {
asImpl().computeWellPotentials(wells, well_state, well_potentials);
}
asImpl().updateListEconLimited(solver, eclipse_state_->getSchedule(), timer.currentStepNum(), wells,
well_state, dynamic_list_econ_limited);
@ -491,23 +483,6 @@ namespace Opm
return std::unique_ptr<Solver>(new Solver(solver_param_, std::move(model)));
}
template <class Implementation>
void SimulatorBase<Implementation>::computeWellPotentials(const Wells* wells,
const WellState& xw,
std::vector<double>& well_potentials)
{
const int nw = wells->number_of_wells;
const int np = wells->number_of_phases;
well_potentials.clear();
well_potentials.resize(nw*np,0.0);
for (int w = 0; w < nw; ++w) {
for (int perf = wells->well_connpos[w]; perf < wells->well_connpos[w + 1]; ++perf) {
for (int phase = 0; phase < np; ++phase) {
well_potentials[w*np + phase] += xw.wellPotentials()[perf*np + phase];
}
}
}
}
template <class Implementation>
void SimulatorBase<Implementation>::computeRESV(const std::size_t step,

View File

@ -227,9 +227,6 @@ public:
OpmLog::note(ss.str());
}
// TODO: not used at all, keeping it for interface purpose.
std::vector<double> well_potentials;
// Create wells and well state.
WellsManager wells_manager(eclState(),
timer.currentStepNum(),
@ -241,7 +238,6 @@ public:
Opm::UgGridHelpers::beginFaceCentroids(grid()),
dynamic_list_econ_limited,
is_parallel_run_,
well_potentials,
defunct_well_names_ );
const Wells* wells = wells_manager.c_wells();
WellState well_state;

View File

@ -126,7 +126,6 @@ namespace Opm
// as we get the following error otherwise
// with c++ (Debian 4.9.2-10) 4.9.2 and -std=c++11
// converting to const std::unordered_set<std::basic_string<char> > from initializer list would use explicit constructor
std::vector<double>(), // null well_potentials
Base::defunct_well_names_);
const Wells* wells = wells_manager.c_wells();
WellState well_state;

View File

@ -445,7 +445,6 @@ namespace Opm
// with c++ (Debian 4.9.2-10) 4.9.2 and -std=c++11
// converting to const std::unordered_set<std::basic_string<char> > from initializer list would use explicit constructo
, false,
std::vector<double>(),
std::unordered_set<std::string>());
const Wells* wells = wellsmanager.c_wells();

View File

@ -107,12 +107,11 @@ struct SetupMSW {
Opm::UgGridHelpers::cell2Faces(grid),
Opm::UgGridHelpers::beginFaceCentroids(grid),
dummy_dynamic_list,
false
false,
// We need to pass the optionaly arguments
// as we get the following error otherwise
// with c++ (Debian 4.9.2-10) 4.9.2 and -std=c++11
// converting to const std::unordered_set<std::basic_string<char> > from initializer list would use explicit constructor
, std::vector<double>(), // null well_potentials
std::unordered_set<std::string>());
const Wells* wells = wells_manager.c_wells();