#3750 Completion export header : Extract report items per well

This commit is contained in:
Magne Sjaastad 2018-11-23 11:44:57 +01:00
parent 8d9080d695
commit 74dc73adf8

View File

@ -325,23 +325,32 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions(const std::ve
{ {
for (auto wellPath : usedWellPaths) for (auto wellPath : usedWellPaths)
{ {
std::vector<RigCompletionData> wellCompletions; std::vector<RigCompletionData> completionsForWell;
for (const auto& completion : completions) for (const auto& completion : completions)
{ {
if (completion.wellName() == wellPath->completions()->wellNameForExport()) if (completion.wellName() == wellPath->completions()->wellNameForExport())
{ {
wellCompletions.push_back(completion); completionsForWell.push_back(completion);
} }
} }
if (wellCompletions.empty()) continue; if (completionsForWell.empty()) continue;
std::vector<RicWellPathFractureReportItem> reportItemsForWell;
for (const auto& fracItem : fractureDataReportItems)
{
if (fracItem.wellPathNameForExport() == wellPath->completions()->wellNameForExport())
{
reportItemsForWell.push_back(fracItem);
}
}
QString fileName = QString("%1_unifiedCompletions_%2").arg(wellPath->name()).arg(eclipseCaseName); QString fileName = QString("%1_unifiedCompletions_%2").arg(wellPath->name()).arg(eclipseCaseName);
sortAndExportCompletionsToFile(exportSettings.caseToApply, sortAndExportCompletionsToFile(exportSettings.caseToApply,
exportSettings.folder, exportSettings.folder,
fileName, fileName,
wellCompletions, completionsForWell,
fractureDataReportItems, reportItemsForWell,
exportSettings.compdatExport); exportSettings.compdatExport);
progress.incrementProgress(); progress.incrementProgress();
} }
@ -357,17 +366,17 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions(const std::ve
{ {
for (auto wellPath : usedWellPaths) for (auto wellPath : usedWellPaths)
{ {
std::vector<RigCompletionData> wellCompletions; std::vector<RigCompletionData> completionsForWell;
for (const auto& completion : completions) for (const auto& completion : completions)
{ {
if (completion.wellName() == wellPath->completions()->wellNameForExport() && if (completion.wellName() == wellPath->completions()->wellNameForExport() &&
completionType == completion.completionType()) completionType == completion.completionType())
{ {
wellCompletions.push_back(completion); completionsForWell.push_back(completion);
} }
} }
if (wellCompletions.empty()) continue; if (completionsForWell.empty()) continue;
{ {
QString completionTypeText; QString completionTypeText;
@ -378,11 +387,20 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions(const std::ve
QString fileName = QString("%1_%2_%3").arg(wellPath->name()).arg(completionTypeText).arg(eclipseCaseName); QString fileName = QString("%1_%2_%3").arg(wellPath->name()).arg(completionTypeText).arg(eclipseCaseName);
if (completionType == RigCompletionData::FRACTURE) if (completionType == RigCompletionData::FRACTURE)
{ {
std::vector<RicWellPathFractureReportItem> reportItemsForWell;
for (const auto& fracItem : fractureDataReportItems)
{
if (fracItem.wellPathNameForExport() == wellPath->completions()->wellNameForExport())
{
reportItemsForWell.push_back(fracItem);
}
}
sortAndExportCompletionsToFile(exportSettings.caseToApply, sortAndExportCompletionsToFile(exportSettings.caseToApply,
exportSettings.folder, exportSettings.folder,
fileName, fileName,
wellCompletions, completionsForWell,
fractureDataReportItems, reportItemsForWell,
exportSettings.compdatExport); exportSettings.compdatExport);
} }
else else
@ -391,7 +409,7 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompletions(const std::ve
sortAndExportCompletionsToFile(exportSettings.caseToApply, sortAndExportCompletionsToFile(exportSettings.caseToApply,
exportSettings.folder, exportSettings.folder,
fileName, fileName,
wellCompletions, completionsForWell,
emptyReportItemVector, emptyReportItemVector,
exportSettings.compdatExport); exportSettings.compdatExport);
} }