#3750 Completion export header : Report only referenced fracture templates

This commit is contained in:
Magne Sjaastad 2018-11-23 11:32:50 +01:00
parent 200e6d229b
commit 8d9080d695
2 changed files with 39 additions and 21 deletions

View File

@ -25,11 +25,11 @@
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
RicWellPathFractureReportItem::RicWellPathFractureReportItem(const QString& wellPathName,
RicWellPathFractureReportItem::RicWellPathFractureReportItem(const QString& wellPathNameForExport,
const QString& fractureName,
const QString& fractureTemplateName,
double measuredDepth)
: m_wellPathNameForExport(wellPathName)
: m_wellPathNameForExport(wellPathNameForExport)
, m_wellPathFracture(fractureName)
, m_wellPathFractureTemplate(fractureTemplateName)
, m_mesuredDepth(measuredDepth)

View File

@ -80,14 +80,28 @@ QString RicWellPathFractureTextReportFeatureImpl::wellPathFractureReport(
textStream << lineStart << "\n";
auto proj = RiaApplication::instance()->project();
auto fractureTemplates = proj->activeOilField()->fractureDefinitionCollection()->fractureTemplates();
std::vector<RimStimPlanFractureTemplate*> stimPlanTemplates;
std::vector<RimEllipseFractureTemplate*> ellipseTemplates;
{
auto proj = RiaApplication::instance()->project();
auto fractureTemplates = proj->activeOilField()->fractureDefinitionCollection()->fractureTemplates();
std::set<QString> usedFractureTemplateNames;
for (const auto& item : wellPathFractureReportItems)
{
usedFractureTemplateNames.insert(item.fractureTemplateName());
}
for (const auto fracTemplate : fractureTemplates)
{
if (usedFractureTemplateNames.find(fracTemplate->name()) == usedFractureTemplateNames.end())
{
continue;
}
auto stimPlanTemplate = dynamic_cast<RimStimPlanFractureTemplate*>(fracTemplate);
if (stimPlanTemplate)
{
@ -100,6 +114,7 @@ QString RicWellPathFractureTextReportFeatureImpl::wellPathFractureReport(
ellipseTemplates.push_back(ellipseTemplate);
}
}
}
if (!RiaRegressionTestRunner::instance()->isRunningRegressionTests())
{
@ -136,7 +151,11 @@ QString RicWellPathFractureTextReportFeatureImpl::wellPathFractureReport(
}
{
QString tableText = createFractureText(fractureTemplates);
std::vector<RimFractureTemplate*> fracTemplates;
fracTemplates.insert(fracTemplates.end(), ellipseTemplates.begin(), ellipseTemplates.end());
fracTemplates.insert(fracTemplates.end(), stimPlanTemplates.begin(), stimPlanTemplates.end());
QString tableText = createFractureText(fracTemplates);
textStream << tableText;
textStream << lineStart << "\n";
}
@ -698,7 +717,8 @@ QString RicWellPathFractureTextReportFeatureImpl::createFractureCompletionSummar
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RicWellPathFractureTextReportFeatureImpl::createFracturePressureDepletionSummaryText(const std::vector<RicWellPathFractureReportItem>& wellPathFractureReportItems) const
QString RicWellPathFractureTextReportFeatureImpl::createFracturePressureDepletionSummaryText(
const std::vector<RicWellPathFractureReportItem>& wellPathFractureReportItems) const
{
QString tableText;
@ -706,13 +726,11 @@ QString RicWellPathFractureTextReportFeatureImpl::createFracturePressureDepletio
RifEclipseDataTableFormatter formatter(stream);
configureFormatter(&formatter);
std::vector<RifEclipseOutputTableColumn> header = {
RifEclipseOutputTableColumn("Well"),
std::vector<RifEclipseOutputTableColumn> header = {RifEclipseOutputTableColumn("Well"),
RifEclipseOutputTableColumn("Fracture"),
RifEclipseOutputTableColumn("Actual WBHP"),
RifEclipseOutputTableColumn("Min Pressure Drop"),
RifEclipseOutputTableColumn("Max Pressure Drop")
};
RifEclipseOutputTableColumn("Max Pressure Drop")};
bool createdTable = false;