adding number of segment and performation to MultisegmentWells

This commit is contained in:
Kai Bao
2016-04-25 11:30:14 +02:00
parent f319514581
commit 05e164b609
2 changed files with 17 additions and 0 deletions

View File

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

View File

@@ -76,9 +76,14 @@ namespace Opm {
const std::vector<WellMultiSegmentConstPtr>& wells() const;
const MultisegmentWellOps& wellOps() const;
int numSegment() const { return nseg_total_; };
int numPerf() const { return nperf_total_; };
protected:
const std::vector<WellMultiSegmentConstPtr> wells_multisegment_;
const MultisegmentWellOps wops_ms_;
int nseg_total_;
int nperf_total_;
};
} // namespace Opm