From 052b61e67237b1e0bcde70088e4316e326ba5b1b Mon Sep 17 00:00:00 2001 From: Kai Bao Date: Wed, 7 Oct 2015 09:18:53 +0200 Subject: [PATCH] indexing the location of top segments in WellStateMultiSegment it is better to be in the global well class if we decide to have it later. --- opm/autodiff/WellStateMultiSegment.hpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/opm/autodiff/WellStateMultiSegment.hpp b/opm/autodiff/WellStateMultiSegment.hpp index 1d9a46052..522f15341 100644 --- a/opm/autodiff/WellStateMultiSegment.hpp +++ b/opm/autodiff/WellStateMultiSegment.hpp @@ -89,6 +89,7 @@ namespace Opm bhp_.resize(nw); thp_.resize(nw); + top_segment_loc_.resize(nw); temperature_.resize(nw, 273.15 + 20); // standard temperature for now // deciding to add the following variables temporarily @@ -138,6 +139,8 @@ namespace Opm wellMapEntry.start_perforation = start_perforation; wellMapEntry.number_of_perforations = wells[w]->numberOfPerforations(); + top_segment_loc_[w] = start_segment; + int start_perforation_segment = 0; wellMapEntry.start_perforation_segment.resize(wellMapEntry.number_of_segments); wellMapEntry.number_of_perforations_segment.resize(wellMapEntry.number_of_segments); @@ -406,6 +409,11 @@ namespace Opm std::cout << std::endl; } + std::cout << " locations of the top segments : " << std::endl; + for (int i = 0; i < nw; ++i) { + std::cout << i << " " << top_segment_loc_[i] << std::endl; + } + std::cout << " output all the information from the wellMap " << std::endl; for (WellMapType::const_iterator iter = wellMap().begin(); iter != wellMap().end(); ++iter) { @@ -485,6 +493,11 @@ namespace Opm std::vector segtotalrate_; // std::vector current_controls_; + // the location of the top segments within the whole segment list + // it is better in the Wells class if we have a class instead of + // using a vector for all the wells + std::vector top_segment_loc_; + WellMapType wellMap_; int nseg_;