#3433 Non-Darcy Fracture: Regression tests : Add compare between two well path fractures

This commit is contained in:
Magne Sjaastad
2018-10-11 09:26:51 +02:00
parent 6ff94e1be7
commit b5ab2968dd
3 changed files with 42 additions and 25 deletions

View File

@@ -162,6 +162,30 @@ std::vector<cvf::Vec3d> RimWellPathFracture::perforationLengthCenterLineCoords()
return wellPathCoords;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RimWellPathFracture::compareByWellPathNameAndMD(const RimWellPathFracture* lhs, const RimWellPathFracture* rhs)
{
CVF_TIGHT_ASSERT(lhs && rhs);
RimWellPath* lhsWellPath = nullptr;
lhs->firstAncestorOrThisOfType(lhsWellPath);
RimWellPath* rhsWellPath = nullptr;
rhs->firstAncestorOrThisOfType(rhsWellPath);
if (lhsWellPath && rhsWellPath)
{
if (lhsWellPath->name() != rhsWellPath->name())
{
return lhsWellPath->name() < rhsWellPath->name();
}
}
return lhs->fractureMD() < rhs->fractureMD();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -49,6 +49,8 @@ public:
virtual std::vector<cvf::Vec3d> perforationLengthCenterLineCoords() const override;
static bool compareByWellPathNameAndMD(const RimWellPathFracture* lhs, const RimWellPathFracture* rhs);
protected:
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
virtual void defineEditorAttribute(const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute * attribute) override;