WellState FIBO: Initialize 'nseg_' in init()

Needed to guarantee that numSegments(wellID) returns sensible values
for wellID = numWells()-1 in the case of no multi-segment wells.
This commit is contained in:
Bård Skaflestad 2018-10-15 16:41:10 +02:00
parent 2418df701f
commit e958ee1139

View File

@ -280,6 +280,7 @@ namespace Opm
{ {
// we need to create a trival segment related values to avoid there will be some // we need to create a trival segment related values to avoid there will be some
// multi-segment wells added later. // multi-segment wells added later.
nseg_ = nw;
top_segment_index_.reserve(nw); top_segment_index_.reserve(nw);
for (int w = 0; w < nw; ++w) { for (int w = 0; w < nw; ++w) {
top_segment_index_.push_back(w); top_segment_index_.push_back(w);