diff --git a/opm/autodiff/WellStateFullyImplicitBlackoil.hpp b/opm/autodiff/WellStateFullyImplicitBlackoil.hpp index 353ff201b..edfcca5ae 100644 --- a/opm/autodiff/WellStateFullyImplicitBlackoil.hpp +++ b/opm/autodiff/WellStateFullyImplicitBlackoil.hpp @@ -456,9 +456,13 @@ namespace Opm { // we need to create a trival segment related values to avoid there will be some // multi-segment wells added later. + nseg_ = nw; + seg_number_.clear(); top_segment_index_.reserve(nw); + seg_number_.reserve(nw); for (int w = 0; w < nw; ++w) { top_segment_index_.push_back(w); + seg_number_.push_back(1); // Top segment is segment #1 } segpress_ = bhp(); segrates_ = wellRates();