initializing top_well_segments_ when constructing MultisegmentWells

not wait until BlackoilMultiSegmentModel.
This commit is contained in:
Kai Bao
2016-05-04 16:10:18 +02:00
parent 9bdf1d5b93
commit 28e65283d9
2 changed files with 2 additions and 2 deletions

View File

@@ -91,8 +91,6 @@ namespace Opm {
updatePrimalVariableFromState(reservoir_state);
}
msWells().topWellSegments() = well_state.topSegmentLoc();
const int nw = wellsMultiSegment().size();
if ( !msWellOps().has_multisegment_wells ) {

View File

@@ -155,9 +155,11 @@ namespace Opm {
// TODO: repeated with the wellOps's initialization, delete one soon.
// Count the total number of perforations and segments.
const int nw = wells_ms.size();
top_well_segments_.resize(nw);
int nperf_total = 0;
int nseg_total = 0;
for (int w = 0; w < nw; ++w) {
top_well_segments_[w] = nseg_total;
nperf_total += wells_ms[w]->numberOfPerforations();
nseg_total += wells_ms[w]->numberOfSegments();
}