Bugfix: order of function arguments.

Order of arguments for computePhaseFlowRatesPerWell() was wrong.
This fix was done previously for SimulatorCompressibleTwophase,
but the incompressible sim was ignored.

Also added an ASSERT that may help catch some misuse.
This commit is contained in:
Atgeirr Flø Rasmussen
2012-10-10 14:09:09 +02:00
parent d124a71ee6
commit f5359936e0
2 changed files with 2 additions and 1 deletions
@@ -485,8 +485,8 @@ namespace Opm
// Optionally, check if well controls are satisfied.
if (check_well_controls_) {
Opm::computePhaseFlowRatesPerWell(*wells_,
fractional_flows,
well_state.perfRates(),
fractional_flows,
well_resflows_phase);
std::cout << "Checking well conditions." << std::endl;
// For testing we set surface := reservoir
+1
View File
@@ -553,6 +553,7 @@ namespace Opm
{
const int np = wells.number_of_phases;
const int nw = wells.number_of_wells;
ASSERT(int(flow_rates_per_well_cell.size()) == wells.well_connpos[nw]);
phase_flow_per_well.resize(nw * np);
for (int wix = 0; wix < nw; ++wix) {
for (int phase = 0; phase < np; ++phase) {