mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#2073 WLP: Add PL (Pseudo Length) to depth axis if a simulation well is used as extraction curve or rft curve
This commit is contained in:
parent
e60941aa2c
commit
8853021403
@ -296,6 +296,7 @@ void RimWellLogExtractionCurve::onLoadDataAndUpdate(bool updateParentPlot)
|
||||
if (isCurveVisible())
|
||||
{
|
||||
// Make sure we have set correct case data into the result definitions.
|
||||
bool isUsingPseudoLength = false;
|
||||
|
||||
RimGeoMechCase* geomCase = dynamic_cast<RimGeoMechCase*>(m_case.value());
|
||||
RimEclipseCase* eclipseCase = dynamic_cast<RimEclipseCase*>(m_case.value());
|
||||
@ -323,6 +324,7 @@ void RimWellLogExtractionCurve::onLoadDataAndUpdate(bool updateParentPlot)
|
||||
eclipseCase->caseUserDescription(),
|
||||
m_generatedSimulationWellPathBranches[m_branchIndex].p(),
|
||||
eclipseCase->eclipseCaseData());
|
||||
isUsingPseudoLength = true;
|
||||
}
|
||||
}
|
||||
cvf::ref<RigGeoMechWellLogExtractor> geomExtractor = wellLogCollection->findOrCreateExtractor(m_wellPath, geomCase);
|
||||
@ -394,6 +396,7 @@ void RimWellLogExtractionCurve::onLoadDataAndUpdate(bool updateParentPlot)
|
||||
if(wellLogPlot->depthType() == RimWellLogPlot::TRUE_VERTICAL_DEPTH)
|
||||
{
|
||||
m_qwtPlotCurve->setSamples(m_curveData->xPlotValues().data(), m_curveData->trueDepthPlotValues(displayUnit).data(), static_cast<int>(m_curveData->xPlotValues().size()));
|
||||
isUsingPseudoLength = false;
|
||||
}
|
||||
else if (wellLogPlot->depthType() == RimWellLogPlot::MEASURED_DEPTH)
|
||||
{
|
||||
@ -402,6 +405,19 @@ void RimWellLogExtractionCurve::onLoadDataAndUpdate(bool updateParentPlot)
|
||||
|
||||
m_qwtPlotCurve->setLineSegmentStartStopIndices(m_curveData->polylineStartStopIndices());
|
||||
|
||||
if (isUsingPseudoLength)
|
||||
{
|
||||
RimWellLogTrack* wellLogTrack;
|
||||
firstAncestorOrThisOfType(wellLogTrack);
|
||||
CVF_ASSERT(wellLogTrack);
|
||||
|
||||
RiuWellLogTrack* viewer = wellLogTrack->viewer();
|
||||
if (viewer)
|
||||
{
|
||||
viewer->setDepthTitle("PL/" + wellLogPlot->depthPlotTitle());
|
||||
}
|
||||
}
|
||||
|
||||
updateZoomInParentPlot();
|
||||
|
||||
setLogScaleFromSelectedResult();
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include "RimTools.h"
|
||||
#include "RimWellLogPlot.h"
|
||||
#include "RimWellLogPlotCollection.h"
|
||||
#include "RimWellLogTrack.h"
|
||||
#include "RimWellPath.h"
|
||||
|
||||
#include "RigEclipseCaseData.h"
|
||||
@ -38,6 +39,7 @@
|
||||
#include "RigWellPathIntersectionTools.h"
|
||||
|
||||
#include "RiuLineSegmentQwtPlotCurve.h"
|
||||
#include "RiuWellLogTrack.h"
|
||||
|
||||
#include "RifEclipseRftAddress.h"
|
||||
#include "RifReaderEclipseRft.h"
|
||||
@ -89,6 +91,8 @@ RimWellLogRftCurve::RimWellLogRftCurve()
|
||||
CAF_PDM_InitFieldNoDefault(&m_wellName, "WellName", "Well Name", "", "", "");
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_wellLogChannelName, "WellLogChannelName", "Well Property", "", "", "");
|
||||
|
||||
m_isUsingPseudoLength = false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -263,6 +267,8 @@ void RimWellLogRftCurve::onLoadDataAndUpdate(bool updateParentPlot)
|
||||
{
|
||||
RimWellLogCurve::updateCurvePresentation();
|
||||
|
||||
m_isUsingPseudoLength = false;
|
||||
|
||||
if (isCurveVisible())
|
||||
{
|
||||
m_curveData = new RigWellLogCurveData;
|
||||
@ -298,6 +304,20 @@ void RimWellLogRftCurve::onLoadDataAndUpdate(bool updateParentPlot)
|
||||
else
|
||||
{
|
||||
m_qwtPlotCurve->setSamples(m_curveData->xPlotValues().data(), m_curveData->trueDepthPlotValues(displayUnit).data(), static_cast<int>(m_curveData->xPlotValues().size()));
|
||||
m_isUsingPseudoLength = false;
|
||||
}
|
||||
|
||||
if (m_isUsingPseudoLength)
|
||||
{
|
||||
RimWellLogTrack* wellLogTrack;
|
||||
firstAncestorOrThisOfType(wellLogTrack);
|
||||
CVF_ASSERT(wellLogTrack);
|
||||
|
||||
RiuWellLogTrack* viewer = wellLogTrack->viewer();
|
||||
if (viewer)
|
||||
{
|
||||
viewer->setDepthTitle("PL/" + wellLogPlot->depthPlotTitle());
|
||||
}
|
||||
}
|
||||
|
||||
m_qwtPlotCurve->setLineSegmentStartStopIndices(m_curveData->polylineStartStopIndices());
|
||||
@ -463,6 +483,7 @@ RigEclipseWellLogExtractor* RimWellLogRftCurve::extractor()
|
||||
if (wellPaths.size() == 0) return nullptr;
|
||||
|
||||
eclExtractor = wellLogCollection->findOrCreateSimWellExtractor(m_wellName(), QString("Find or create sim well extractor"), wellPaths[0], m_eclipseResultCase->eclipseCaseData());
|
||||
m_isUsingPseudoLength = true;
|
||||
}
|
||||
|
||||
return eclExtractor;
|
||||
|
@ -90,6 +90,8 @@ private:
|
||||
caf::PdmField<QDateTime> m_timeStep;
|
||||
caf::PdmField<QString> m_wellName;
|
||||
caf::PdmField< caf::AppEnum< RifEclipseRftAddress::RftWellLogChannelName > > m_wellLogChannelName;
|
||||
|
||||
bool m_isUsingPseudoLength;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user