mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3433 Non-Darcy Fracture: Regression tests : Add compare between two well path fractures
This commit is contained in:
@@ -108,7 +108,6 @@ QString RicWellPathFractureTextReportFeatureImpl::wellPathFractureReport(
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!RiaRegressionTestRunner::instance()->isRunningRegressionTests())
|
||||
{
|
||||
if (sourceCase)
|
||||
@@ -124,7 +123,6 @@ QString RicWellPathFractureTextReportFeatureImpl::wellPathFractureReport(
|
||||
textStream << lineStart << "\n";
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
QString tableText = createStimPlanFileLocationText(stimPlanTemplates);
|
||||
textStream << tableText;
|
||||
@@ -154,18 +152,13 @@ QString RicWellPathFractureTextReportFeatureImpl::wellPathFractureReport(
|
||||
std::vector<RimWellPathFracture*> wellPathFractures;
|
||||
for (const auto& w : wellPaths)
|
||||
{
|
||||
std::set<std::pair<double, RimWellPathFracture*>> sortedFracturesByMd;
|
||||
|
||||
for (const auto& frac : w->fractureCollection()->activeFractures())
|
||||
{
|
||||
sortedFracturesByMd.insert(std::make_pair(frac->fractureMD(), frac));
|
||||
wellPathFractures.push_back(frac);
|
||||
}
|
||||
}
|
||||
|
||||
for (const auto& mdAndFracture : sortedFracturesByMd)
|
||||
{
|
||||
wellPathFractures.push_back(mdAndFracture.second);
|
||||
}
|
||||
}
|
||||
std::sort(wellPathFractures.begin(), wellPathFractures.end(), RimWellPathFracture::compareByWellPathNameAndMD);
|
||||
|
||||
{
|
||||
QString tableText = createFractureInstancesText(wellPathFractures);
|
||||
@@ -674,7 +667,8 @@ QString RicWellPathFractureTextReportFeatureImpl::createFractureCompletionSummar
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RicWellPathFractureTextReportFeatureImpl::createConnectionsPerWellText(const std::vector<RicWellPathFractureReportItem>& wellPathFractureReportItems) const
|
||||
QString RicWellPathFractureTextReportFeatureImpl::createConnectionsPerWellText(
|
||||
const std::vector<RicWellPathFractureReportItem>& wellPathFractureReportItems) const
|
||||
{
|
||||
QString tableText;
|
||||
|
||||
@@ -682,10 +676,7 @@ QString RicWellPathFractureTextReportFeatureImpl::createConnectionsPerWellText(c
|
||||
RifEclipseDataTableFormatter formatter(stream);
|
||||
configureFormatter(&formatter);
|
||||
|
||||
std::vector<RifEclipseOutputTableColumn> header = {
|
||||
RifEclipseOutputTableColumn("Well"),
|
||||
floatNumberColumn("ConnCount")
|
||||
};
|
||||
std::vector<RifEclipseOutputTableColumn> header = {RifEclipseOutputTableColumn("Well"), floatNumberColumn("ConnCount")};
|
||||
|
||||
formatter.header(header);
|
||||
formatter.addHorizontalLine('-');
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user