mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-14 01:12:11 -05:00
#1607 Record completion type of completion data and combine after all completions are calculated
This commit is contained in:
1 parent
771a47a287
commit
403bf1890c
4 files changed
+46
-22
No files matched your search
+5
-5
@@ -179,7 +179,7 @@ void RicWellPathExportCompletionDataFeature::exportCompletions(const std::vector
|
||||
QTextStream stream(&exportFile);
|
||||
RifEclipseDataTableFormatter formatter(stream);
|
||||
|
||||
std::map<IJKCellIndex, RigCompletionData> completionData;
|
||||
std::map<IJKCellIndex, std::vector<RigCompletionData> > completionData;
|
||||
|
||||
for (auto wellPath : wellPaths)
|
||||
{
|
||||
@@ -207,7 +207,7 @@ void RicWellPathExportCompletionDataFeature::exportCompletions(const std::vector
|
||||
std::vector<RigCompletionData> completions;
|
||||
for (auto& data : completionData)
|
||||
{
|
||||
completions.push_back(data.second);
|
||||
completions.push_back(RigCompletionData::combine(data.second));
|
||||
}
|
||||
// Sort by well name / cell index
|
||||
std::sort(completions.begin(), completions.end());
|
||||
@@ -525,18 +525,18 @@ void RicWellPathExportCompletionDataFeature::assignBranchAndSegmentNumbers(const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicWellPathExportCompletionDataFeature::appendCompletionData(std::map<IJKCellIndex, RigCompletionData>* completionData, const std::vector<RigCompletionData>& data)
|
||||
void RicWellPathExportCompletionDataFeature::appendCompletionData(std::map<IJKCellIndex, std::vector<RigCompletionData> >* completionData, const std::vector<RigCompletionData>& data)
|
||||
{
|
||||
for (auto& completion : data)
|
||||
{
|
||||
auto it = completionData->find(completion.cellIndex());
|
||||
if (it != completionData->end())
|
||||
{
|
||||
it->second = RigCompletionData::combine(it->second, completion);
|
||||
it->second.push_back(completion);
|
||||
}
|
||||
else
|
||||
{
|
||||
completionData->insert(std::pair<IJKCellIndex, RigCompletionData>(completion.cellIndex(), completion));
|
||||
completionData->insert(std::pair<IJKCellIndex, std::vector<RigCompletionData> >(completion.cellIndex(), std::vector<RigCompletionData> {completion}));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user