Display all data if multiple fractures crosses a cell

- add the operator<=> for QString
- add operator<=> to fracture report item
This commit is contained in:
Magne Sjaastad
2023-05-12 12:41:52 +02:00
parent 2b0906c2ab
commit 37e29a0f68
6 changed files with 27 additions and 24 deletions

View File

@@ -174,3 +174,11 @@ QStringList RiaTextStringTools::splitSkipEmptyParts( const QString& text, const
return text.split( regExp, QString::SkipEmptyParts );
#endif
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::strong_ordering operator<=>( const QString& lhs, const QString& rhs )
{
return lhs.compare( rhs ) <=> 0;
}

View File

@@ -40,3 +40,17 @@ QStringList splitSkipEmptyParts( const QString& text, const QRegExp& regExp );
QString replaceTemplateTextWithValues( const QString& templateText, const std::map<QString, QString>& valueMap );
} // namespace RiaTextStringTools
//--------------------------------------------------------------------------------------------------
//
// Add operator<=> for QString to global scope
//
// Example of error message when this operator is not defined:
//
// 'auto RicWellPathFractureReportItem::operator <=>(const RicWellPathFractureReportItem &) const'
// : function was implicitly deleted because 'RicWellPathFractureReportItem' data member
// 'RicWellPathFractureReportItem::m_wellPathNameForExport' of type 'QString' has no valid
// 'operator<=>'
//
//--------------------------------------------------------------------------------------------------
std::strong_ordering operator<=>( const QString& lhs, const QString& rhs );

View File

@@ -374,7 +374,7 @@ std::vector<RigCompletionData>
if ( fractureDataReportItems )
{
RicWellPathFractureReportItem reportItem( wellNameForExport, fracture->name(), fracTemplate->name(), fracture->fractureMD() );
RicWellPathFractureReportItem reportItem( wellNameForExport, fracture->name(), fracTemplate->name() );
reportItem.setUnitSystem( fracTemplate->fractureTemplateUnit() );
if ( performPressureDepletionScaling )

View File

@@ -21,7 +21,6 @@
#include "RigCompletionData.h"
#include "RicExportCompletionDataSettingsUi.h"
#include "RicWellPathFractureReportItem.h"
#include "cvfVector2.h"
#include "cvfVector3.h"

View File

@@ -27,12 +27,10 @@
//--------------------------------------------------------------------------------------------------
RicWellPathFractureReportItem::RicWellPathFractureReportItem( const QString& wellPathNameForExport,
const QString& fractureName,
const QString& fractureTemplateName,
double measuredDepth )
const QString& fractureTemplateName )
: m_wellPathNameForExport( wellPathNameForExport )
, m_wellPathFracture( fractureName )
, m_wellPathFractureTemplate( fractureTemplateName )
, m_mesuredDepth( measuredDepth )
, m_transmissibility( 0.0 )
, m_connectionCount( 0 )
, m_area( 0.0 )
@@ -301,16 +299,3 @@ double RicWellPathFractureReportItem::pressureDepletionMaxPressureDrop() const
{
return m_pressureDepletionMaxPressureDrop;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RicWellPathFractureReportItem::operator<( const RicWellPathFractureReportItem& other ) const
{
if ( this->wellPathNameForExport() != other.wellPathNameForExport() )
{
return this->wellPathNameForExport() < other.wellPathNameForExport();
}
return this->m_mesuredDepth < other.m_mesuredDepth;
}

View File

@@ -19,6 +19,7 @@
#pragma once
#include "RiaDefines.h"
#include "RiaTextStringTools.h"
#include <QString>
@@ -28,10 +29,7 @@
class RicWellPathFractureReportItem
{
public:
RicWellPathFractureReportItem( const QString& wellPathNameForExport,
const QString& fractureName,
const QString& fractureTemplateName,
double measuredDepth );
RicWellPathFractureReportItem( const QString& wellPathNameForExport, const QString& fractureName, const QString& fractureTemplateName );
void setData( double trans, size_t connCount, double area );
void setWidthAndConductivity( double width, double conductivity );
@@ -74,14 +72,13 @@ public:
double pressureDepletionMinPressureDrop() const;
double pressureDepletionMaxPressureDrop() const;
bool operator<( const RicWellPathFractureReportItem& other ) const;
auto operator<=>( const RicWellPathFractureReportItem& rhs ) const = default;
private:
RiaDefines::EclipseUnitSystem m_unitSystem;
QString m_wellPathNameForExport;
QString m_wellPathFracture;
QString m_wellPathFractureTemplate;
double m_mesuredDepth;
double m_transmissibility;
size_t m_connectionCount;