mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #3261 from joakim-hove/wellstate-msw1
Reorder variables and remove .reserve() calls
This commit is contained in:
commit
ee91333402
@ -537,21 +537,18 @@ void WellStateFullyImplicitBlackoil::initWellStateMSWell(const std::vector<Well>
|
|||||||
{
|
{
|
||||||
// still using the order in wells
|
// still using the order in wells
|
||||||
const int nw = wells_ecl.size();
|
const int nw = wells_ecl.size();
|
||||||
const auto& pu = this->phaseUsage();
|
|
||||||
const int np = pu.num_phases;
|
|
||||||
if (nw == 0) {
|
if (nw == 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
const auto& pu = this->phaseUsage();
|
||||||
|
const int np = pu.num_phases;
|
||||||
|
|
||||||
top_segment_index_.clear();
|
top_segment_index_.clear();
|
||||||
top_segment_index_.reserve(nw);
|
|
||||||
seg_press_.clear();
|
seg_press_.clear();
|
||||||
seg_press_.reserve(nw);
|
|
||||||
seg_rates_.clear();
|
seg_rates_.clear();
|
||||||
seg_rates_.reserve(nw * numPhases());
|
|
||||||
seg_number_.clear();
|
seg_number_.clear();
|
||||||
|
|
||||||
nseg_ = 0;
|
nseg_ = 0;
|
||||||
|
|
||||||
// in the init function, the well rates and perforation rates have been initialized or copied from prevState
|
// in the init function, the well rates and perforation rates have been initialized or copied from prevState
|
||||||
// what we do here, is to set the segment rates and perforation rates
|
// what we do here, is to set the segment rates and perforation rates
|
||||||
for (int w = 0; w < nw; ++w) {
|
for (int w = 0; w < nw; ++w) {
|
||||||
|
@ -424,6 +424,11 @@ private:
|
|||||||
// for StandardWell, the number of segments will be one
|
// for StandardWell, the number of segments will be one
|
||||||
std::vector<double> seg_rates_;
|
std::vector<double> seg_rates_;
|
||||||
std::vector<double> seg_press_;
|
std::vector<double> seg_press_;
|
||||||
|
// the index of the top segments, which is used to locate the
|
||||||
|
// multisegment well related information in WellState
|
||||||
|
std::vector<int> top_segment_index_;
|
||||||
|
int nseg_; // total number of the segments
|
||||||
|
|
||||||
// The following data are only recorded for output
|
// The following data are only recorded for output
|
||||||
// pressure drop
|
// pressure drop
|
||||||
std::vector<double> seg_pressdrop_;
|
std::vector<double> seg_pressdrop_;
|
||||||
@ -433,10 +438,6 @@ private:
|
|||||||
std::vector<double> seg_pressdrop_hydorstatic_;
|
std::vector<double> seg_pressdrop_hydorstatic_;
|
||||||
// accelerational pressure drop
|
// accelerational pressure drop
|
||||||
std::vector<double> seg_pressdrop_acceleration_;
|
std::vector<double> seg_pressdrop_acceleration_;
|
||||||
// the index of the top segments, which is used to locate the
|
|
||||||
// multisegment well related information in WellState
|
|
||||||
std::vector<int> top_segment_index_;
|
|
||||||
int nseg_; // total number of the segments
|
|
||||||
|
|
||||||
// Productivity Index
|
// Productivity Index
|
||||||
std::vector<double> productivity_index_;
|
std::vector<double> productivity_index_;
|
||||||
|
Loading…
Reference in New Issue
Block a user