BlockOilSimulator: allow to run without wells (mainly for testing and debugging).

This commit is contained in:
Robert K
2015-01-19 14:14:18 +01:00
parent bfe5f57c9a
commit 463e4bc5e3
5 changed files with 159 additions and 107 deletions

View File

@@ -62,12 +62,14 @@ namespace Opm
return;
}
const int nw = wells->number_of_wells;
if( nw == 0 ) return ;
// We use the WellState::init() function to do bhp and well rates init.
// The alternative would be to copy that function wholesale.
BaseType :: init(wells, state);
// Initialize perfphaserates_, which must be done here.
const int nw = wells->number_of_wells;
const int np = wells->number_of_phases;
const int nperf = wells->well_connpos[nw];
perfphaserates_.resize(nperf * np, 0.0);