mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Move Reference Well functionality to WellLogExtractionCurve
* Remove reference well feature from plot objects * Move Reference Well functionality to WellLogExtractionCurve * Reset reference well selection if new selected well path equals ref
This commit is contained in:
parent
80086a04f4
commit
3e8c85a202
@ -628,9 +628,8 @@ std::map<QString, QString> RimDepthTrackPlot::createNameKeyValueMap() const
|
|||||||
{
|
{
|
||||||
std::map<QString, QString> variableValueMap;
|
std::map<QString, QString> variableValueMap;
|
||||||
|
|
||||||
RimCase* commonCase = m_commonDataSource->caseToApply();
|
RimCase* commonCase = m_commonDataSource->caseToApply();
|
||||||
RimWellPath* commonWellPath = m_commonDataSource->wellPathToApply();
|
RimWellPath* commonWellPath = m_commonDataSource->wellPathToApply();
|
||||||
RimWellPath* commonRefWellPath = m_commonDataSource->referenceWellPathToApply();
|
|
||||||
|
|
||||||
if ( commonCase )
|
if ( commonCase )
|
||||||
{
|
{
|
||||||
@ -676,11 +675,6 @@ std::map<QString, QString> RimDepthTrackPlot::createNameKeyValueMap() const
|
|||||||
variableValueMap[RiaDefines::namingVariableWell()] = m_commonDataSource->simWellNameToApply();
|
variableValueMap[RiaDefines::namingVariableWell()] = m_commonDataSource->simWellNameToApply();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( commonRefWellPath && !commonRefWellPath->name().isEmpty() )
|
|
||||||
{
|
|
||||||
variableValueMap[RiaDefines::namingVariableRefWell()] = QString( "Ref. Well: %1" ).arg( commonRefWellPath->name() );
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( commonWellPath )
|
if ( commonWellPath )
|
||||||
{
|
{
|
||||||
RigWellPath* wellPathGeometry = commonWellPath->wellPathGeometry();
|
RigWellPath* wellPathGeometry = commonWellPath->wellPathGeometry();
|
||||||
@ -1275,7 +1269,6 @@ void RimDepthTrackPlot::defineEditorAttribute( const caf::PdmFieldHandle* field,
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimDepthTrackPlot::onLoadDataAndUpdate()
|
void RimDepthTrackPlot::onLoadDataAndUpdate()
|
||||||
{
|
{
|
||||||
updateReferenceWellPathInCurves();
|
|
||||||
updateMdiWindowVisibility();
|
updateMdiWindowVisibility();
|
||||||
performAutoNameUpdate();
|
performAutoNameUpdate();
|
||||||
updatePlots();
|
updatePlots();
|
||||||
@ -1307,21 +1300,6 @@ caf::PdmFieldHandle* RimDepthTrackPlot::userDescriptionField()
|
|||||||
return &m_plotWindowTitle;
|
return &m_plotWindowTitle;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
///
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
void RimDepthTrackPlot::updateReferenceWellPathInCurves()
|
|
||||||
{
|
|
||||||
for ( auto plot : this->plots() )
|
|
||||||
{
|
|
||||||
auto wellLogTrack = dynamic_cast<RimWellLogTrack*>( plot );
|
|
||||||
for ( auto curve : wellLogTrack->curves() )
|
|
||||||
{
|
|
||||||
curve->setReferenceWellPath( m_commonDataSource->referenceWellPathToApply() );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -197,8 +197,6 @@ protected:
|
|||||||
void updatePlots();
|
void updatePlots();
|
||||||
caf::PdmFieldHandle* userDescriptionField() override;
|
caf::PdmFieldHandle* userDescriptionField() override;
|
||||||
|
|
||||||
void updateReferenceWellPathInCurves();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void cleanupBeforeClose();
|
void cleanupBeforeClose();
|
||||||
void updateSubPlotNames();
|
void updateSubPlotNames();
|
||||||
|
@ -27,11 +27,9 @@
|
|||||||
#include "RimGeoMechCase.h"
|
#include "RimGeoMechCase.h"
|
||||||
#include "RimTools.h"
|
#include "RimTools.h"
|
||||||
#include "RimWbsParameters.h"
|
#include "RimWbsParameters.h"
|
||||||
#include "RimWellLogCurve.h"
|
|
||||||
#include "RimWellLogCurveCommonDataSource.h"
|
#include "RimWellLogCurveCommonDataSource.h"
|
||||||
#include "RimWellLogFile.h"
|
#include "RimWellLogFile.h"
|
||||||
#include "RimWellLogPlotNameConfig.h"
|
#include "RimWellLogPlotNameConfig.h"
|
||||||
#include "RimWellLogTrack.h"
|
|
||||||
|
|
||||||
#include "cafPdmBase.h"
|
#include "cafPdmBase.h"
|
||||||
#include "cafPdmFieldScriptingCapability.h"
|
#include "cafPdmFieldScriptingCapability.h"
|
||||||
@ -50,7 +48,7 @@ RimWellBoreStabilityPlot::RimWellBoreStabilityPlot()
|
|||||||
CAF_PDM_InitScriptableObject( "Well Bore Stability Plot",
|
CAF_PDM_InitScriptableObject( "Well Bore Stability Plot",
|
||||||
":/WellBoreStability16x16.png",
|
":/WellBoreStability16x16.png",
|
||||||
"",
|
"",
|
||||||
"A GeoMechanical Well Bore Stabilit Plot" );
|
"A GeoMechanical Well Bore Stability Plot" );
|
||||||
|
|
||||||
CAF_PDM_InitScriptableFieldWithScriptKeywordNoDefault( &m_wbsParameters,
|
CAF_PDM_InitScriptableFieldWithScriptKeywordNoDefault( &m_wbsParameters,
|
||||||
"WbsParameters",
|
"WbsParameters",
|
||||||
@ -221,6 +219,5 @@ void RimWellBoreStabilityPlot::applyDataSource()
|
|||||||
m_wbsParameters->setTimeStep( m_commonDataSource->timeStepToApply() );
|
m_wbsParameters->setTimeStep( m_commonDataSource->timeStepToApply() );
|
||||||
m_wbsParameters->setFrameIndex( -1 );
|
m_wbsParameters->setFrameIndex( -1 );
|
||||||
|
|
||||||
this->updateReferenceWellPathInCurves();
|
|
||||||
this->updateConnectedEditors();
|
this->updateConnectedEditors();
|
||||||
}
|
}
|
||||||
|
@ -57,15 +57,6 @@ RimWellLogCurve::RimWellLogCurve()
|
|||||||
m_curveDataPropertyValueRange =
|
m_curveDataPropertyValueRange =
|
||||||
std::make_pair( std::numeric_limits<double>::infinity(), -std::numeric_limits<double>::infinity() );
|
std::make_pair( std::numeric_limits<double>::infinity(), -std::numeric_limits<double>::infinity() );
|
||||||
|
|
||||||
// Ref well path as Ui element for debug purpose. If not needed: Remove use of caf::PdmPtrField,
|
|
||||||
// and replace with regular non-ui ptr. The remove related code in calculateValueOptions() and
|
|
||||||
// defineUiOrdering().
|
|
||||||
CAF_PDM_InitFieldNoDefault( &m_refWellPath, "ReferenceWellPath", "Reference Well Path" );
|
|
||||||
m_refWellPath.uiCapability()->setUiHidden( !RiaApplication::enableDevelopmentFeatures() );
|
|
||||||
m_refWellPath.uiCapability()->setUiReadOnly( true );
|
|
||||||
|
|
||||||
CAF_PDM_InitField( &m_useRefWell, "UseReferenceWellPath", true, "Use Reference Well Path" );
|
|
||||||
|
|
||||||
setDeletable( true );
|
setDeletable( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -234,24 +225,6 @@ const RigWellLogCurveData* RimWellLogCurve::curveData() const
|
|||||||
return m_curveData.p();
|
return m_curveData.p();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
///
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
void RimWellLogCurve::setReferenceWellPath( RimWellPath* refWellPath )
|
|
||||||
{
|
|
||||||
m_refWellPath = refWellPath;
|
|
||||||
|
|
||||||
if ( m_refWellPath == nullptr )
|
|
||||||
{
|
|
||||||
m_useRefWell.uiCapability()->setUiHidden( true );
|
|
||||||
m_useRefWell = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_useRefWell.uiCapability()->setUiHidden( false );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -439,37 +412,6 @@ void RimWellLogCurve::calculateCurveDataPropertyValueRange()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
///
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
QList<caf::PdmOptionItemInfo> RimWellLogCurve::calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions )
|
|
||||||
{
|
|
||||||
auto options = RimStackablePlotCurve::calculateValueOptions( fieldNeedingOptions );
|
|
||||||
if ( fieldNeedingOptions == &m_refWellPath )
|
|
||||||
{
|
|
||||||
options.push_back( caf::PdmOptionItemInfo( QString( "None" ), nullptr ) );
|
|
||||||
RimTools::wellPathOptionItems( &options );
|
|
||||||
}
|
|
||||||
return options;
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
///
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
void RimWellLogCurve::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
|
||||||
{
|
|
||||||
RimStackablePlotCurve::defineUiOrdering( uiConfigName, uiOrdering );
|
|
||||||
|
|
||||||
auto group = uiOrdering.findGroup( "DataSource" );
|
|
||||||
if ( group != nullptr )
|
|
||||||
{
|
|
||||||
group->add( &m_refWellPath );
|
|
||||||
group->add( &m_useRefWell );
|
|
||||||
}
|
|
||||||
|
|
||||||
uiOrdering.skipRemainingFields( true );
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -491,12 +433,6 @@ void RimWellLogCurve::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
|||||||
{
|
{
|
||||||
loadDataAndUpdate( true );
|
loadDataAndUpdate( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( changedField == &m_useRefWell )
|
|
||||||
{
|
|
||||||
loadDataAndUpdate( true );
|
|
||||||
updateConnectedEditors();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -49,7 +49,6 @@ public:
|
|||||||
|
|
||||||
const RigWellLogCurveData* curveData() const;
|
const RigWellLogCurveData* curveData() const;
|
||||||
|
|
||||||
void setReferenceWellPath( RimWellPath* refWellPath );
|
|
||||||
void updateCurveAppearance() override;
|
void updateCurveAppearance() override;
|
||||||
|
|
||||||
virtual QString wellName() const = 0;
|
virtual QString wellName() const = 0;
|
||||||
@ -67,13 +66,11 @@ public:
|
|||||||
double closestYValueForX( double xValue ) const override;
|
double closestYValueForX( double xValue ) const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void updateZoomInParentPlot() override;
|
void updateZoomInParentPlot() override;
|
||||||
void updateLegendsInPlot() override;
|
void updateLegendsInPlot() override;
|
||||||
void setOverrideCurveDataPropertyValueRange( double minimumValue, double maximumValue );
|
void setOverrideCurveDataPropertyValueRange( double minimumValue, double maximumValue );
|
||||||
void calculateCurveDataPropertyValueRange();
|
void calculateCurveDataPropertyValueRange();
|
||||||
QList<caf::PdmOptionItemInfo> calculateValueOptions( const caf::PdmFieldHandle* fieldNeedingOptions ) override;
|
|
||||||
|
|
||||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
|
||||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||||
|
|
||||||
void setPropertyValuesAndDepths( const std::vector<double>& propertyValues,
|
void setPropertyValuesAndDepths( const std::vector<double>& propertyValues,
|
||||||
@ -113,10 +110,6 @@ protected:
|
|||||||
RiuPlotAxis depthAxis() const;
|
RiuPlotAxis depthAxis() const;
|
||||||
RiuPlotAxis valueAxis() const;
|
RiuPlotAxis valueAxis() const;
|
||||||
|
|
||||||
protected:
|
|
||||||
caf::PdmPtrField<RimWellPath*> m_refWellPath;
|
|
||||||
caf::PdmField<bool> m_useRefWell;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
cvf::ref<RigWellLogCurveData> m_curveData;
|
cvf::ref<RigWellLogCurveData> m_curveData;
|
||||||
std::pair<double, double> m_curveDataPropertyValueRange;
|
std::pair<double, double> m_curveDataPropertyValueRange;
|
||||||
|
@ -83,7 +83,6 @@ RimWellLogCurveCommonDataSource::RimWellLogCurveCommonDataSource()
|
|||||||
CAF_PDM_InitFieldNoDefault( &m_trajectoryType, "TrajectoryType", "Trajectory Type" );
|
CAF_PDM_InitFieldNoDefault( &m_trajectoryType, "TrajectoryType", "Trajectory Type" );
|
||||||
|
|
||||||
CAF_PDM_InitFieldNoDefault( &m_wellPath, "CurveWellPath", "Well Path" );
|
CAF_PDM_InitFieldNoDefault( &m_wellPath, "CurveWellPath", "Well Path" );
|
||||||
CAF_PDM_InitFieldNoDefault( &m_refWellPath, "CurveReferenceWellPath", "Reference Well Path" );
|
|
||||||
|
|
||||||
CAF_PDM_InitFieldNoDefault( &m_simWellName, "SimulationWellName", "Well Name" );
|
CAF_PDM_InitFieldNoDefault( &m_simWellName, "SimulationWellName", "Well Name" );
|
||||||
CAF_PDM_InitFieldNoDefault( &m_branchDetection,
|
CAF_PDM_InitFieldNoDefault( &m_branchDetection,
|
||||||
@ -112,9 +111,8 @@ RimWellLogCurveCommonDataSource::RimWellLogCurveCommonDataSource()
|
|||||||
CAF_PDM_InitFieldNoDefault( &m_rftSegmentBranchIndex, "SegmentBranchIndex", "RFT Branch" );
|
CAF_PDM_InitFieldNoDefault( &m_rftSegmentBranchIndex, "SegmentBranchIndex", "RFT Branch" );
|
||||||
CAF_PDM_InitFieldNoDefault( &m_rftSegmentBranchType, "SegmentBranchType", "RFT Completion" );
|
CAF_PDM_InitFieldNoDefault( &m_rftSegmentBranchType, "SegmentBranchType", "RFT Completion" );
|
||||||
|
|
||||||
m_case = nullptr;
|
m_case = nullptr;
|
||||||
m_wellPath = nullptr;
|
m_wellPath = nullptr;
|
||||||
m_refWellPath = nullptr;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -189,14 +187,6 @@ void RimWellLogCurveCommonDataSource::setWellPathToApply( RimWellPath* val )
|
|||||||
m_wellPath = val;
|
m_wellPath = val;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
///
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
RimWellPath* RimWellLogCurveCommonDataSource::referenceWellPathToApply() const
|
|
||||||
{
|
|
||||||
return m_refWellPath;
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -848,10 +838,6 @@ void RimWellLogCurveCommonDataSource::fieldChangedByUi( const caf::PdmFieldHandl
|
|||||||
RimWellLogPlot* parentPlot = nullptr;
|
RimWellLogPlot* parentPlot = nullptr;
|
||||||
this->firstAncestorOrThisOfType( parentPlot );
|
this->firstAncestorOrThisOfType( parentPlot );
|
||||||
|
|
||||||
if ( changedField == &m_wellPath && m_wellPath() == m_refWellPath() )
|
|
||||||
{
|
|
||||||
m_refWellPath = nullptr;
|
|
||||||
}
|
|
||||||
if ( changedField == &m_branchDetection && m_branchDetection().isPartiallyTrue() )
|
if ( changedField == &m_branchDetection && m_branchDetection().isPartiallyTrue() )
|
||||||
{
|
{
|
||||||
// The Tristate is cycled from false -> partially true -> true
|
// The Tristate is cycled from false -> partially true -> true
|
||||||
@ -944,11 +930,6 @@ QList<caf::PdmOptionItemInfo>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( fieldNeedingOptions == &m_refWellPath )
|
|
||||||
{
|
|
||||||
options.push_back( caf::PdmOptionItemInfo( QString( "None" ), nullptr ) );
|
|
||||||
RimTools::wellPathOptionItemsSubset( { m_wellPath() }, &options );
|
|
||||||
}
|
|
||||||
else if ( fieldNeedingOptions == &m_timeStep )
|
else if ( fieldNeedingOptions == &m_timeStep )
|
||||||
{
|
{
|
||||||
if ( m_case() )
|
if ( m_case() )
|
||||||
@ -1053,7 +1034,6 @@ void RimWellLogCurveCommonDataSource::defineUiOrdering( QString uiConfigName, ca
|
|||||||
if ( trajectoryTypeToApply() == RimWellLogExtractionCurve::WELL_PATH )
|
if ( trajectoryTypeToApply() == RimWellLogExtractionCurve::WELL_PATH )
|
||||||
{
|
{
|
||||||
group->add( &m_wellPath );
|
group->add( &m_wellPath );
|
||||||
group->add( &m_refWellPath );
|
|
||||||
}
|
}
|
||||||
else if ( trajectoryTypeToApply() == RimWellLogExtractionCurve::SIMULATION_WELL )
|
else if ( trajectoryTypeToApply() == RimWellLogExtractionCurve::SIMULATION_WELL )
|
||||||
{
|
{
|
||||||
@ -1080,7 +1060,6 @@ void RimWellLogCurveCommonDataSource::defineUiOrdering( QString uiConfigName, ca
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( m_wellPath() ) group->add( &m_wellPath );
|
if ( m_wellPath() ) group->add( &m_wellPath );
|
||||||
group->add( &m_refWellPath );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( uiConfigName == smoothingUiOrderinglabel() )
|
if ( uiConfigName == smoothingUiOrderinglabel() )
|
||||||
@ -1108,8 +1087,8 @@ void RimWellLogCurveCommonDataSource::defineEditorAttribute( const caf::PdmField
|
|||||||
if ( myAttr )
|
if ( myAttr )
|
||||||
{
|
{
|
||||||
if ( field == &m_case || field == &m_summaryCase || field == &m_simWellName || field == &m_wellPath ||
|
if ( field == &m_case || field == &m_summaryCase || field == &m_simWellName || field == &m_wellPath ||
|
||||||
field == &m_refWellPath || field == &m_timeStep || field == &m_rftTimeStep ||
|
field == &m_timeStep || field == &m_rftTimeStep || field == &m_rftSegmentBranchIndex ||
|
||||||
field == &m_rftSegmentBranchIndex || field == &m_rftWellName )
|
field == &m_rftWellName )
|
||||||
{
|
{
|
||||||
myAttr->showPreviousAndNextButtons = true;
|
myAttr->showPreviousAndNextButtons = true;
|
||||||
myAttr->nextIcon = QIcon( ":/ComboBoxDown.svg" );
|
myAttr->nextIcon = QIcon( ":/ComboBoxDown.svg" );
|
||||||
|
@ -67,7 +67,6 @@ public:
|
|||||||
void setTrajectoryTypeToApply( int val );
|
void setTrajectoryTypeToApply( int val );
|
||||||
RimWellPath* wellPathToApply() const;
|
RimWellPath* wellPathToApply() const;
|
||||||
void setWellPathToApply( RimWellPath* val );
|
void setWellPathToApply( RimWellPath* val );
|
||||||
RimWellPath* referenceWellPathToApply() const;
|
|
||||||
int branchIndexToApply() const;
|
int branchIndexToApply() const;
|
||||||
void setBranchIndexToApply( int val );
|
void setBranchIndexToApply( int val );
|
||||||
caf::Tristate branchDetectionToApply() const;
|
caf::Tristate branchDetectionToApply() const;
|
||||||
@ -123,7 +122,6 @@ private:
|
|||||||
caf::PdmPtrField<RimSummaryCase*> m_summaryCase;
|
caf::PdmPtrField<RimSummaryCase*> m_summaryCase;
|
||||||
caf::PdmField<int> m_trajectoryType;
|
caf::PdmField<int> m_trajectoryType;
|
||||||
caf::PdmPtrField<RimWellPath*> m_wellPath;
|
caf::PdmPtrField<RimWellPath*> m_wellPath;
|
||||||
caf::PdmPtrField<RimWellPath*> m_refWellPath;
|
|
||||||
caf::PdmField<QString> m_simWellName;
|
caf::PdmField<QString> m_simWellName;
|
||||||
caf::PdmField<bool> m_allow3DSelectionLink;
|
caf::PdmField<bool> m_allow3DSelectionLink;
|
||||||
caf::PdmField<int> m_branchIndex;
|
caf::PdmField<int> m_branchIndex;
|
||||||
|
@ -101,6 +101,8 @@ RimWellLogExtractionCurve::RimWellLogExtractionCurve()
|
|||||||
CAF_PDM_InitFieldNoDefault( &m_wellPath, "CurveWellPath", "Well Name" );
|
CAF_PDM_InitFieldNoDefault( &m_wellPath, "CurveWellPath", "Well Name" );
|
||||||
m_wellPath.uiCapability()->setUiTreeChildrenHidden( true );
|
m_wellPath.uiCapability()->setUiTreeChildrenHidden( true );
|
||||||
|
|
||||||
|
CAF_PDM_InitFieldNoDefault( &m_refWellPath, "ReferenceWellPath", "Reference Well Path" );
|
||||||
|
|
||||||
CAF_PDM_InitField( &m_simWellName, "SimulationWellName", QString( "" ), "Well Name" );
|
CAF_PDM_InitField( &m_simWellName, "SimulationWellName", QString( "" ), "Well Name" );
|
||||||
CAF_PDM_InitField( &m_branchDetection,
|
CAF_PDM_InitField( &m_branchDetection,
|
||||||
"BranchDetection",
|
"BranchDetection",
|
||||||
@ -153,6 +155,7 @@ RimWellLogExtractionCurve::~RimWellLogExtractionCurve()
|
|||||||
void RimWellLogExtractionCurve::setWellPath( RimWellPath* wellPath )
|
void RimWellLogExtractionCurve::setWellPath( RimWellPath* wellPath )
|
||||||
{
|
{
|
||||||
m_wellPath = wellPath;
|
m_wellPath = wellPath;
|
||||||
|
if ( m_wellPath == m_refWellPath ) m_refWellPath = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -302,6 +305,11 @@ void RimWellLogExtractionCurve::fieldChangedByUi( const caf::PdmFieldHandle* cha
|
|||||||
this->loadDataAndUpdate( true );
|
this->loadDataAndUpdate( true );
|
||||||
}
|
}
|
||||||
else if ( changedField == &m_wellPath )
|
else if ( changedField == &m_wellPath )
|
||||||
|
{
|
||||||
|
if ( m_wellPath == m_refWellPath ) m_refWellPath = nullptr;
|
||||||
|
this->loadDataAndUpdate( true );
|
||||||
|
}
|
||||||
|
else if ( changedField == &m_refWellPath )
|
||||||
{
|
{
|
||||||
this->loadDataAndUpdate( true );
|
this->loadDataAndUpdate( true );
|
||||||
}
|
}
|
||||||
@ -549,7 +557,7 @@ RimWellLogExtractionCurve::WellLogExtractionCurveData
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Reference well adjustment does not support simulated wells
|
// Reference well adjustment does not support simulated wells
|
||||||
if ( m_trajectoryType == WELL_PATH && wellExtractor.notNull() && refWellExtractor.notNull() && m_useRefWell )
|
if ( m_trajectoryType == WELL_PATH && wellExtractor.notNull() && refWellExtractor.notNull() )
|
||||||
{
|
{
|
||||||
RigEclipseResultAddress indexKResAdr( RiaDefines::ResultCatType::STATIC_NATIVE,
|
RigEclipseResultAddress indexKResAdr( RiaDefines::ResultCatType::STATIC_NATIVE,
|
||||||
RiaResultNames::indexKResultName() );
|
RiaResultNames::indexKResultName() );
|
||||||
@ -639,7 +647,7 @@ RimWellLogExtractionCurve::WellLogExtractionCurveData
|
|||||||
const std::string fieldName = m_geomResultDefinition->resultAddress().fieldName;
|
const std::string fieldName = m_geomResultDefinition->resultAddress().fieldName;
|
||||||
const bool isNeglectedFieldName = fieldName == RiaResultNames::wbsAzimuthResult().toStdString() ||
|
const bool isNeglectedFieldName = fieldName == RiaResultNames::wbsAzimuthResult().toStdString() ||
|
||||||
fieldName == RiaResultNames::wbsInclinationResult().toStdString();
|
fieldName == RiaResultNames::wbsInclinationResult().toStdString();
|
||||||
if ( !isNeglectedFieldName && wellExtractor.notNull() && refWellExtractor.notNull() && m_useRefWell )
|
if ( !isNeglectedFieldName && wellExtractor.notNull() && refWellExtractor.notNull() )
|
||||||
{
|
{
|
||||||
RigFemResultAddress indexKResAdr( RigFemResultPosEnum::RIG_ELEMENT_NODAL, "INDEX", "INDEX_K" );
|
RigFemResultAddress indexKResAdr( RigFemResultPosEnum::RIG_ELEMENT_NODAL, "INDEX", "INDEX_K" );
|
||||||
|
|
||||||
@ -968,6 +976,11 @@ QList<caf::PdmOptionItemInfo>
|
|||||||
{
|
{
|
||||||
RimTools::wellPathOptionItems( &options );
|
RimTools::wellPathOptionItems( &options );
|
||||||
}
|
}
|
||||||
|
if ( fieldNeedingOptions == &m_refWellPath )
|
||||||
|
{
|
||||||
|
options.push_back( caf::PdmOptionItemInfo( QString( "None" ), nullptr ) );
|
||||||
|
RimTools::wellPathOptionItemsSubset( { m_wellPath() }, &options );
|
||||||
|
}
|
||||||
else if ( fieldNeedingOptions == &m_case )
|
else if ( fieldNeedingOptions == &m_case )
|
||||||
{
|
{
|
||||||
RimTools::caseOptionItems( &options );
|
RimTools::caseOptionItems( &options );
|
||||||
@ -1015,6 +1028,7 @@ void RimWellLogExtractionCurve::defineUiOrdering( QString uiConfigName, caf::Pdm
|
|||||||
if ( m_trajectoryType() == WELL_PATH )
|
if ( m_trajectoryType() == WELL_PATH )
|
||||||
{
|
{
|
||||||
curveDataGroup->add( &m_wellPath );
|
curveDataGroup->add( &m_wellPath );
|
||||||
|
curveDataGroup->add( &m_refWellPath );
|
||||||
RimWellLogCurve::defineUiOrdering( uiConfigName, uiOrdering );
|
RimWellLogCurve::defineUiOrdering( uiConfigName, uiOrdering );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -1031,6 +1045,7 @@ void RimWellLogExtractionCurve::defineUiOrdering( QString uiConfigName, caf::Pdm
|
|||||||
else if ( geomCase )
|
else if ( geomCase )
|
||||||
{
|
{
|
||||||
curveDataGroup->add( &m_wellPath );
|
curveDataGroup->add( &m_wellPath );
|
||||||
|
curveDataGroup->add( &m_refWellPath );
|
||||||
RimWellLogCurve::defineUiOrdering( uiConfigName, uiOrdering );
|
RimWellLogCurve::defineUiOrdering( uiConfigName, uiOrdering );
|
||||||
|
|
||||||
m_geomResultDefinition->uiOrdering( uiConfigName, *curveDataGroup );
|
m_geomResultDefinition->uiOrdering( uiConfigName, *curveDataGroup );
|
||||||
@ -1171,7 +1186,7 @@ QString RimWellLogExtractionCurve::createCurveAutoName()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( m_useRefWell && m_refWellPath && !m_refWellPath->name().isEmpty() )
|
if ( m_refWellPath() != nullptr && !m_refWellPath->name().isEmpty() )
|
||||||
{
|
{
|
||||||
generatedCurveName.push_back( QString( "Ref. Well: %1" ).arg( m_refWellPath->name() ) );
|
generatedCurveName.push_back( QString( "Ref. Well: %1" ).arg( m_refWellPath->name() ) );
|
||||||
}
|
}
|
||||||
|
@ -125,6 +125,7 @@ protected:
|
|||||||
caf::PdmPtrField<RimCase*> m_case;
|
caf::PdmPtrField<RimCase*> m_case;
|
||||||
caf::PdmField<caf::AppEnum<TrajectoryType>> m_trajectoryType;
|
caf::PdmField<caf::AppEnum<TrajectoryType>> m_trajectoryType;
|
||||||
caf::PdmPtrField<RimWellPath*> m_wellPath;
|
caf::PdmPtrField<RimWellPath*> m_wellPath;
|
||||||
|
caf::PdmPtrField<RimWellPath*> m_refWellPath;
|
||||||
caf::PdmField<QString> m_simWellName;
|
caf::PdmField<QString> m_simWellName;
|
||||||
caf::PdmField<int> m_branchIndex;
|
caf::PdmField<int> m_branchIndex;
|
||||||
caf::PdmField<bool> m_branchDetection;
|
caf::PdmField<bool> m_branchDetection;
|
||||||
|
Loading…
Reference in New Issue
Block a user