#3433 Fracture header : Simplify interface to ReportItems

This commit is contained in:
Magne Sjaastad 2018-10-04 15:02:15 +02:00
parent f23fa64235
commit 927e65cb44
4 changed files with 32 additions and 30 deletions

View File

@ -1176,7 +1176,7 @@ void RicWellPathExportCompletionDataFeatureImpl::exportWellPathFractureReport(
{
for (const auto& reportItem : wellPathFractureReportItems)
{
if (reportItem.wellPathName() == wellPath->name())
if (reportItem.wellPathNameForExport() == wellPath->completions()->wellNameForExport())
{
wellPathsSet.insert(wellPath);
}

View File

@ -24,7 +24,7 @@
RicWellPathFractureReportItem::RicWellPathFractureReportItem(const QString& wellPathName,
const QString& fractureName,
const QString& fractureTemplateName)
: m_wellPath(wellPathName)
: m_wellPathNameForExport(wellPathName)
, m_wellPathFracture(fractureName)
, m_wellPathFractureTemplate(fractureTemplateName)
, m_transmissibility(0.0)
@ -82,31 +82,37 @@ void RicWellPathFractureReportItem::setAreaWeightedTransmissibility(double trans
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RicWellPathFractureReportItem::wellPathName() const
QString RicWellPathFractureReportItem::wellPathNameForExport() const
{
return m_wellPath;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicWellPathFractureReportItem::getNames(QString& wellPathName, QString& fractureName, QString& fractureTemplateName) const
{
wellPathName = m_wellPath;
fractureName = m_wellPathFracture;
fractureTemplateName = m_wellPathFractureTemplate;
return m_wellPathNameForExport;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RicWellPathFractureReportItem::fractureName() const
{
return m_wellPathFracture;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RicWellPathFractureReportItem::fractureTemplateName() const
{
return m_wellPathFractureTemplate;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RicWellPathFractureReportItem::setUnitSystem(RiaEclipseUnitTools::UnitSystem unitSystem)
{
m_unitSystem = unitSystem;
}
//--------------------------------------------------------------------------------------------------
///
///
//--------------------------------------------------------------------------------------------------
RiaEclipseUnitTools::UnitSystem RicWellPathFractureReportItem::unitSystem() const
{

View File

@ -34,12 +34,12 @@ public:
void setWidthAndConductivity(double width, double conductivity);
void setHeightAndHalfLength(double height, double halfLength);
void setAreaWeightedTransmissibility(double transmissibility);
void setUnitSystem(RiaEclipseUnitTools::UnitSystem unitSystem);
QString wellPathName() const;
QString wellPathNameForExport() const;
QString fractureName() const;
QString fractureTemplateName() const;
void getNames(QString& wellPathName, QString& fractureName, QString& fractureTemplateName) const;
void setUnitSystem(RiaEclipseUnitTools::UnitSystem unitSystem);
RiaEclipseUnitTools::UnitSystem unitSystem() const;
double transmissibility() const;
@ -56,9 +56,9 @@ public:
private:
RiaEclipseUnitTools::UnitSystem m_unitSystem;
QString m_wellPath;
QString m_wellPathFracture;
QString m_wellPathFractureTemplate;
QString m_wellPathNameForExport;
QString m_wellPathFracture;
QString m_wellPathFractureTemplate;
double m_transmissibility;
size_t m_connectionCount;

View File

@ -626,12 +626,9 @@ QString RicWellPathFractureTextReportFeatureImpl::createFractureCompletionSummar
for (const auto& reportItem : wellPathFractureReportItems)
{
QString wellPathName, fractureName, fractureTemplateName;
reportItem.getNames(wellPathName, fractureName, fractureTemplateName);
formatter.add(wellPathName);
formatter.add(fractureName);
formatter.add(fractureTemplateName);
formatter.add(reportItem.wellPathNameForExport());
formatter.add(reportItem.fractureName());
formatter.add(reportItem.fractureTemplateName());
formatter.add(reportItem.transmissibility());
formatter.add(reportItem.connectionCount());
@ -676,8 +673,7 @@ QString RicWellPathFractureTextReportFeatureImpl::createConnectionsPerWellText(c
std::map<QString /*Well*/, size_t> wellConnectionCounts;
for (const auto& reportItem : wellPathFractureReportItems)
{
QString wellPathName, fractureName, fractureTemplateName;
reportItem.getNames(wellPathName, fractureName, fractureTemplateName);
QString wellPathName = reportItem.wellPathNameForExport();
if (wellConnectionCounts.find(wellPathName) == wellConnectionCounts.end())
{
wellConnectionCounts.insert(std::make_pair(wellPathName, 0));