mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Improve UI for RFT segment curves (#9061)
* Make sure all curve values are set correctly for plot orientation * Make sure depth zoom is propagated to the Qwt plot * Expand min/max value range to allow more space around curves * Use int values to represent RFT segment branch number
This commit is contained in:
parent
193bc35f6b
commit
62cf62b9a2
@ -21,24 +21,29 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RifEclipseRftAddress::RifEclipseRftAddress( QString wellName, QDateTime timeStep, RftWellLogChannelType wellLogChannelName )
|
||||
RifEclipseRftAddress::RifEclipseRftAddress( const QString& wellName,
|
||||
const QDateTime& timeStep,
|
||||
RftWellLogChannelType wellLogChannelName,
|
||||
const QString& segmentResultName,
|
||||
int segmentBranchNumber )
|
||||
: m_wellName( wellName )
|
||||
, m_timeStep( timeStep )
|
||||
, m_wellLogChannel( wellLogChannelName )
|
||||
, m_segmentBranchNumber( -1 )
|
||||
, m_segmentResultName( segmentResultName )
|
||||
, m_segmentBranchNumber( segmentBranchNumber )
|
||||
{
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RifEclipseRftAddress RifEclipseRftAddress::createSegmentResult( const QString& wellName,
|
||||
const QDateTime& dateTime,
|
||||
const QString& resultName )
|
||||
RifEclipseRftAddress RifEclipseRftAddress::createAddress( const QString& wellName,
|
||||
const QDateTime& timeStep,
|
||||
RftWellLogChannelType wellLogChannel )
|
||||
{
|
||||
auto adr = RifEclipseRftAddress( wellName, dateTime, RifEclipseRftAddress::RftWellLogChannelType::SEGMENT_VALUES );
|
||||
|
||||
adr.setSegmentResultName( resultName );
|
||||
auto segmentResultName = "";
|
||||
auto segmentBranchNumber = -1;
|
||||
auto adr = RifEclipseRftAddress( wellName, timeStep, wellLogChannel, segmentResultName, segmentBranchNumber );
|
||||
|
||||
return adr;
|
||||
}
|
||||
@ -46,9 +51,18 @@ RifEclipseRftAddress RifEclipseRftAddress::createSegmentResult( const QString&
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RifEclipseRftAddress::setSegmentResultName( const QString& resultName )
|
||||
RifEclipseRftAddress RifEclipseRftAddress::createSegmentAddress( const QString& wellName,
|
||||
const QDateTime& dateTime,
|
||||
const QString& resultName,
|
||||
int segmentBranchNumber )
|
||||
{
|
||||
m_segmentResultName = resultName;
|
||||
auto adr = RifEclipseRftAddress( wellName,
|
||||
dateTime,
|
||||
RifEclipseRftAddress::RftWellLogChannelType::SEGMENT_VALUES,
|
||||
resultName,
|
||||
segmentBranchNumber );
|
||||
|
||||
return adr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -59,14 +73,6 @@ QString RifEclipseRftAddress::segmentResultName() const
|
||||
return m_segmentResultName;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RifEclipseRftAddress::setSegmentBranchNumber( int branchNumber )
|
||||
{
|
||||
m_segmentBranchNumber = branchNumber;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -52,15 +52,16 @@ public:
|
||||
};
|
||||
|
||||
public:
|
||||
RifEclipseRftAddress( QString wellName, QDateTime timeStep, RftWellLogChannelType wellLogChannel );
|
||||
|
||||
static RifEclipseRftAddress
|
||||
createSegmentResult( const QString& wellName, const QDateTime& dateTime, const QString& resultName );
|
||||
createAddress( const QString& wellName, const QDateTime& timeStep, RftWellLogChannelType wellLogChannel );
|
||||
|
||||
static RifEclipseRftAddress createSegmentAddress( const QString& wellName,
|
||||
const QDateTime& dateTime,
|
||||
const QString& resultName,
|
||||
int segmentBranchNumber );
|
||||
|
||||
QString segmentResultName() const;
|
||||
|
||||
void setSegmentBranchNumber( int branchNumber );
|
||||
int segmentBranchNumber() const;
|
||||
int segmentBranchNumber() const;
|
||||
|
||||
const QString& wellName() const;
|
||||
QDateTime timeStep() const;
|
||||
@ -70,7 +71,11 @@ public:
|
||||
static std::set<RftWellLogChannelType> pltPlotChannelTypes();
|
||||
|
||||
private:
|
||||
void setSegmentResultName( const QString& resultName );
|
||||
RifEclipseRftAddress( const QString& wellName,
|
||||
const QDateTime& timeStep,
|
||||
RftWellLogChannelType wellLogChannel,
|
||||
const QString& segmentResultName,
|
||||
int segmentBranchNumber );
|
||||
|
||||
private:
|
||||
QString m_wellName;
|
||||
|
@ -89,39 +89,47 @@ void RifReaderEclipseRft::open()
|
||||
QDateTime timeStep = RiaQDateTimeTools::createUtcDateTime();
|
||||
timeStep.setTime_t( timeStepTime_t );
|
||||
|
||||
RifEclipseRftAddress addressPressure( wellName, timeStep, RifEclipseRftAddress::RftWellLogChannelType::PRESSURE );
|
||||
RifEclipseRftAddress addressPressure =
|
||||
RifEclipseRftAddress::createAddress( wellName, timeStep, RifEclipseRftAddress::RftWellLogChannelType::PRESSURE );
|
||||
m_eclipseRftAddresses.insert( addressPressure );
|
||||
m_rftAddressToLibeclNodeIdx[addressPressure] = i;
|
||||
|
||||
RifEclipseRftAddress addressDepth( wellName, timeStep, RifEclipseRftAddress::RftWellLogChannelType::TVD );
|
||||
RifEclipseRftAddress addressDepth =
|
||||
RifEclipseRftAddress::createAddress( wellName, timeStep, RifEclipseRftAddress::RftWellLogChannelType::TVD );
|
||||
m_eclipseRftAddresses.insert( addressDepth );
|
||||
m_rftAddressToLibeclNodeIdx[addressDepth] = i;
|
||||
|
||||
if ( ecl_rft_node_is_RFT( node ) )
|
||||
{
|
||||
RifEclipseRftAddress addressSwat( wellName, timeStep, RifEclipseRftAddress::RftWellLogChannelType::SWAT );
|
||||
RifEclipseRftAddress addressSwat =
|
||||
RifEclipseRftAddress::createAddress( wellName, timeStep, RifEclipseRftAddress::RftWellLogChannelType::SWAT );
|
||||
m_eclipseRftAddresses.insert( addressSwat );
|
||||
m_rftAddressToLibeclNodeIdx[addressSwat] = i;
|
||||
|
||||
RifEclipseRftAddress addressSoil( wellName, timeStep, RifEclipseRftAddress::RftWellLogChannelType::SOIL );
|
||||
RifEclipseRftAddress addressSoil =
|
||||
RifEclipseRftAddress::createAddress( wellName, timeStep, RifEclipseRftAddress::RftWellLogChannelType::SOIL );
|
||||
m_eclipseRftAddresses.insert( addressSoil );
|
||||
m_rftAddressToLibeclNodeIdx[addressSoil] = i;
|
||||
|
||||
RifEclipseRftAddress addressSgas( wellName, timeStep, RifEclipseRftAddress::RftWellLogChannelType::SGAS );
|
||||
RifEclipseRftAddress addressSgas =
|
||||
RifEclipseRftAddress::createAddress( wellName, timeStep, RifEclipseRftAddress::RftWellLogChannelType::SGAS );
|
||||
m_eclipseRftAddresses.insert( addressSgas );
|
||||
m_rftAddressToLibeclNodeIdx[addressSgas] = i;
|
||||
}
|
||||
else if ( ecl_rft_node_is_PLT( node ) )
|
||||
{
|
||||
RifEclipseRftAddress addressWrat( wellName, timeStep, RifEclipseRftAddress::RftWellLogChannelType::WRAT );
|
||||
RifEclipseRftAddress addressWrat =
|
||||
RifEclipseRftAddress::createAddress( wellName, timeStep, RifEclipseRftAddress::RftWellLogChannelType::WRAT );
|
||||
m_eclipseRftAddresses.insert( addressWrat );
|
||||
m_rftAddressToLibeclNodeIdx[addressWrat] = i;
|
||||
|
||||
RifEclipseRftAddress addressOrat( wellName, timeStep, RifEclipseRftAddress::RftWellLogChannelType::ORAT );
|
||||
RifEclipseRftAddress addressOrat =
|
||||
RifEclipseRftAddress::createAddress( wellName, timeStep, RifEclipseRftAddress::RftWellLogChannelType::ORAT );
|
||||
m_eclipseRftAddresses.insert( addressOrat );
|
||||
m_rftAddressToLibeclNodeIdx[addressOrat] = i;
|
||||
|
||||
RifEclipseRftAddress addressGrat( wellName, timeStep, RifEclipseRftAddress::RftWellLogChannelType::GRAT );
|
||||
RifEclipseRftAddress addressGrat =
|
||||
RifEclipseRftAddress::createAddress( wellName, timeStep, RifEclipseRftAddress::RftWellLogChannelType::GRAT );
|
||||
m_eclipseRftAddresses.insert( addressGrat );
|
||||
m_rftAddressToLibeclNodeIdx[addressGrat] = i;
|
||||
}
|
||||
|
@ -67,7 +67,7 @@ std::set<RifEclipseRftAddress> RifReaderEnsembleStatisticsRft::eclipseRftAddress
|
||||
for ( auto channel : statChannels )
|
||||
{
|
||||
statisticsAddresses.insert(
|
||||
RifEclipseRftAddress( regularAddress.wellName(), regularAddress.timeStep(), channel ) );
|
||||
RifEclipseRftAddress::createAddress( regularAddress.wellName(), regularAddress.timeStep(), channel ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -192,13 +192,19 @@ void RifReaderEnsembleStatisticsRft::calculateStatistics( const RifEclipseRftAdd
|
||||
{
|
||||
const QString& wellName = rftAddress.wellName();
|
||||
const QDateTime& timeStep = rftAddress.timeStep();
|
||||
RifEclipseRftAddress depthAddress( wellName, timeStep, RifEclipseRftAddress::RftWellLogChannelType::TVD );
|
||||
RifEclipseRftAddress pressAddress( wellName, timeStep, RifEclipseRftAddress::RftWellLogChannelType::PRESSURE );
|
||||
RifEclipseRftAddress depthAddress =
|
||||
RifEclipseRftAddress::createAddress( wellName, timeStep, RifEclipseRftAddress::RftWellLogChannelType::TVD );
|
||||
RifEclipseRftAddress pressAddress =
|
||||
RifEclipseRftAddress::createAddress( wellName, timeStep, RifEclipseRftAddress::RftWellLogChannelType::PRESSURE );
|
||||
|
||||
RifEclipseRftAddress p10Address( wellName, timeStep, RifEclipseRftAddress::RftWellLogChannelType::PRESSURE_P10 );
|
||||
RifEclipseRftAddress p50Address( wellName, timeStep, RifEclipseRftAddress::RftWellLogChannelType::PRESSURE_P50 );
|
||||
RifEclipseRftAddress p90Address( wellName, timeStep, RifEclipseRftAddress::RftWellLogChannelType::PRESSURE_P90 );
|
||||
RifEclipseRftAddress meanAddress( wellName, timeStep, RifEclipseRftAddress::RftWellLogChannelType::PRESSURE_MEAN );
|
||||
RifEclipseRftAddress p10Address =
|
||||
RifEclipseRftAddress::createAddress( wellName, timeStep, RifEclipseRftAddress::RftWellLogChannelType::PRESSURE_P10 );
|
||||
RifEclipseRftAddress p50Address =
|
||||
RifEclipseRftAddress::createAddress( wellName, timeStep, RifEclipseRftAddress::RftWellLogChannelType::PRESSURE_P50 );
|
||||
RifEclipseRftAddress p90Address =
|
||||
RifEclipseRftAddress::createAddress( wellName, timeStep, RifEclipseRftAddress::RftWellLogChannelType::PRESSURE_P90 );
|
||||
RifEclipseRftAddress meanAddress =
|
||||
RifEclipseRftAddress::createAddress( wellName, timeStep, RifEclipseRftAddress::RftWellLogChannelType::PRESSURE_MEAN );
|
||||
|
||||
RiaCurveMerger<double> curveMerger;
|
||||
|
||||
|
@ -195,14 +195,20 @@ std::set<RifEclipseRftAddress> RifReaderFmuRft::eclipseRftAddresses()
|
||||
{
|
||||
if ( observation.valid() )
|
||||
{
|
||||
RifEclipseRftAddress tvdAddress( wellName, dateTime, RifEclipseRftAddress::RftWellLogChannelType::TVD );
|
||||
RifEclipseRftAddress mdAddress( wellName, dateTime, RifEclipseRftAddress::RftWellLogChannelType::MD );
|
||||
RifEclipseRftAddress pressureAddress( wellName,
|
||||
dateTime,
|
||||
RifEclipseRftAddress::RftWellLogChannelType::PRESSURE );
|
||||
RifEclipseRftAddress pressureErrorAddress( wellName,
|
||||
dateTime,
|
||||
RifEclipseRftAddress::RftWellLogChannelType::PRESSURE_ERROR );
|
||||
RifEclipseRftAddress tvdAddress =
|
||||
RifEclipseRftAddress::createAddress( wellName,
|
||||
dateTime,
|
||||
RifEclipseRftAddress::RftWellLogChannelType::TVD );
|
||||
RifEclipseRftAddress mdAddress =
|
||||
RifEclipseRftAddress::createAddress( wellName, dateTime, RifEclipseRftAddress::RftWellLogChannelType::MD );
|
||||
RifEclipseRftAddress pressureAddress =
|
||||
RifEclipseRftAddress::createAddress( wellName,
|
||||
dateTime,
|
||||
RifEclipseRftAddress::RftWellLogChannelType::PRESSURE );
|
||||
RifEclipseRftAddress pressureErrorAddress =
|
||||
RifEclipseRftAddress::createAddress( wellName,
|
||||
dateTime,
|
||||
RifEclipseRftAddress::RftWellLogChannelType::PRESSURE_ERROR );
|
||||
allAddresses.insert( tvdAddress );
|
||||
allAddresses.insert( mdAddress );
|
||||
allAddresses.insert( pressureAddress );
|
||||
|
@ -276,10 +276,10 @@ void RifReaderOpmRft::buildMetaData()
|
||||
|
||||
auto dt = RiaQDateTimeTools::createUtcDateTime( QDate( y, m, d ) );
|
||||
|
||||
auto channelTypes = identifyChannelType( resultDataName );
|
||||
if ( channelTypes != RifEclipseRftAddress::RftWellLogChannelType::NONE )
|
||||
auto channelType = identifyChannelType( resultDataName );
|
||||
if ( channelType != RifEclipseRftAddress::RftWellLogChannelType::NONE )
|
||||
{
|
||||
auto adr = RifEclipseRftAddress( QString::fromStdString( wellName ), dt, channelTypes );
|
||||
auto adr = RifEclipseRftAddress::createAddress( QString::fromStdString( wellName ), dt, channelType );
|
||||
m_addresses.insert( adr );
|
||||
}
|
||||
}
|
||||
@ -310,16 +310,18 @@ void RifReaderOpmRft::buildMetaData()
|
||||
if ( static_cast<size_t>( resultValueCount ) != segmentCount ) continue;
|
||||
|
||||
auto resultName = std::get<0>( resultNameAndSize );
|
||||
auto adr = RifEclipseRftAddress::createSegmentResult( QString::fromStdString( wellName ),
|
||||
dt,
|
||||
QString::fromStdString( resultName ) );
|
||||
auto adr = RifEclipseRftAddress::createSegmentAddress( QString::fromStdString( wellName ),
|
||||
dt,
|
||||
QString::fromStdString( resultName ),
|
||||
-1 );
|
||||
|
||||
m_addresses.insert( adr );
|
||||
}
|
||||
|
||||
auto adr = RifEclipseRftAddress::createSegmentResult( QString::fromStdString( wellName ),
|
||||
dt,
|
||||
RiaDefines::segmentNumberResultName() );
|
||||
auto adr = RifEclipseRftAddress::createSegmentAddress( QString::fromStdString( wellName ),
|
||||
dt,
|
||||
RiaDefines::segmentNumberResultName(),
|
||||
-1 );
|
||||
|
||||
m_addresses.insert( adr );
|
||||
}
|
||||
|
@ -300,15 +300,18 @@ class RigRftResultPointCalculator : public RigResultPointCalculator
|
||||
public:
|
||||
RigRftResultPointCalculator( const QString& wellPathName, RimEclipseResultCase* eclCase, QDateTime m_timeStep )
|
||||
{
|
||||
RifEclipseRftAddress gasRateAddress( RimWellPlotTools::simWellName( wellPathName ),
|
||||
m_timeStep,
|
||||
RifEclipseRftAddress::RftWellLogChannelType::GRAT );
|
||||
RifEclipseRftAddress oilRateAddress( RimWellPlotTools::simWellName( wellPathName ),
|
||||
m_timeStep,
|
||||
RifEclipseRftAddress::RftWellLogChannelType::ORAT );
|
||||
RifEclipseRftAddress watRateAddress( RimWellPlotTools::simWellName( wellPathName ),
|
||||
m_timeStep,
|
||||
RifEclipseRftAddress::RftWellLogChannelType::WRAT );
|
||||
RifEclipseRftAddress gasRateAddress =
|
||||
RifEclipseRftAddress::createAddress( RimWellPlotTools::simWellName( wellPathName ),
|
||||
m_timeStep,
|
||||
RifEclipseRftAddress::RftWellLogChannelType::GRAT );
|
||||
RifEclipseRftAddress oilRateAddress =
|
||||
RifEclipseRftAddress::createAddress( RimWellPlotTools::simWellName( wellPathName ),
|
||||
m_timeStep,
|
||||
RifEclipseRftAddress::RftWellLogChannelType::ORAT );
|
||||
RifEclipseRftAddress watRateAddress =
|
||||
RifEclipseRftAddress::createAddress( RimWellPlotTools::simWellName( wellPathName ),
|
||||
m_timeStep,
|
||||
RifEclipseRftAddress::RftWellLogChannelType::WRAT );
|
||||
|
||||
std::vector<caf::VecIjk> rftIndices;
|
||||
eclCase->rftReader()->cellIndices( gasRateAddress, &rftIndices );
|
||||
|
@ -499,9 +499,10 @@ void RimWellRftPlot::updateCurvesInPlot( const std::set<RiaRftPltCurveDefinition
|
||||
auto rftCase = curveDefToAdd.address().eclCase();
|
||||
curve->setEclipseResultCase( dynamic_cast<RimEclipseResultCase*>( rftCase ) );
|
||||
|
||||
RifEclipseRftAddress address( simWellName,
|
||||
curveDefToAdd.timeStep(),
|
||||
RifEclipseRftAddress::RftWellLogChannelType::PRESSURE );
|
||||
RifEclipseRftAddress address =
|
||||
RifEclipseRftAddress::createAddress( simWellName,
|
||||
curveDefToAdd.timeStep(),
|
||||
RifEclipseRftAddress::RftWellLogChannelType::PRESSURE );
|
||||
curve->setRftAddress( address );
|
||||
curve->setZOrder( 1 );
|
||||
curve->setSimWellBranchData( m_branchDetection, m_branchIndex );
|
||||
@ -515,9 +516,10 @@ void RimWellRftPlot::updateCurvesInPlot( const std::set<RiaRftPltCurveDefinition
|
||||
|
||||
auto observedFmuRftData = curveDefToAdd.address().observedFmuRftData();
|
||||
curve->setObservedFmuRftData( observedFmuRftData );
|
||||
RifEclipseRftAddress address( m_wellPathNameOrSimWellName,
|
||||
curveDefToAdd.timeStep(),
|
||||
RifEclipseRftAddress::RftWellLogChannelType::PRESSURE );
|
||||
RifEclipseRftAddress address =
|
||||
RifEclipseRftAddress::createAddress( m_wellPathNameOrSimWellName,
|
||||
curveDefToAdd.timeStep(),
|
||||
RifEclipseRftAddress::RftWellLogChannelType::PRESSURE );
|
||||
curve->setRftAddress( address );
|
||||
curve->setZOrder(
|
||||
RiuQwtPlotCurveDefines::zDepthForIndex( RiuQwtPlotCurveDefines::ZIndex::Z_SINGLE_CURVE_OBSERVED ) );
|
||||
@ -532,9 +534,10 @@ void RimWellRftPlot::updateCurvesInPlot( const std::set<RiaRftPltCurveDefinition
|
||||
curve->setEnsemble( curveDefToAdd.address().ensemble() );
|
||||
curve->setObservedFmuRftData(
|
||||
this->findObservedFmuData( m_wellPathNameOrSimWellName, curveDefToAdd.timeStep() ) );
|
||||
RifEclipseRftAddress address( m_wellPathNameOrSimWellName,
|
||||
curveDefToAdd.timeStep(),
|
||||
RifEclipseRftAddress::RftWellLogChannelType::PRESSURE );
|
||||
RifEclipseRftAddress address =
|
||||
RifEclipseRftAddress::createAddress( m_wellPathNameOrSimWellName,
|
||||
curveDefToAdd.timeStep(),
|
||||
RifEclipseRftAddress::RftWellLogChannelType::PRESSURE );
|
||||
curve->setRftAddress( address );
|
||||
curve->setZOrder( 1 );
|
||||
applyCurveAppearance( curve );
|
||||
|
@ -146,21 +146,21 @@ QList<caf::PdmOptionItemInfo> RimRftTools::segmentBranchIdOptions( RifReaderRftI
|
||||
{
|
||||
QList<caf::PdmOptionItemInfo> options;
|
||||
|
||||
options.push_front( caf::PdmOptionItemInfo( RiaDefines::allBranches(), RiaDefines::allBranches() ) );
|
||||
options.push_front( caf::PdmOptionItemInfo( RiaDefines::allBranches(), -1 ) );
|
||||
|
||||
if ( readerRft )
|
||||
{
|
||||
std::vector<double> values;
|
||||
|
||||
auto adr =
|
||||
RifEclipseRftAddress::createSegmentResult( wellName, timeStep, RiaDefines::segmentBranchNumberResultName() );
|
||||
RifEclipseRftAddress::createSegmentAddress( wellName, timeStep, RiaDefines::segmentBranchNumberResultName(), -1 );
|
||||
|
||||
readerRft->values( adr, &values );
|
||||
for ( const auto& v : values )
|
||||
{
|
||||
int intValue = v;
|
||||
auto txt = QString::number( intValue );
|
||||
options.push_back( caf::PdmOptionItemInfo( txt, txt ) );
|
||||
options.push_back( caf::PdmOptionItemInfo( txt, intValue ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -148,6 +148,33 @@ void RimWellLogCurve::setPropertyValuesAndDepths( const std::vector<double>& pro
|
||||
calculateCurveDataPropertyValueRange();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogCurve::setPropertyAndDepthsAndErrors( const std::vector<double>& propertyValues,
|
||||
const std::vector<double>& depthValues,
|
||||
const std::vector<double>& errorValues )
|
||||
{
|
||||
bool useLogarithmicScale = false;
|
||||
|
||||
if ( isVerticalCurve() )
|
||||
{
|
||||
this->setSamplesFromXYErrorValues( propertyValues,
|
||||
depthValues,
|
||||
errorValues,
|
||||
useLogarithmicScale,
|
||||
RiaCurveDataTools::ErrorAxis::ERROR_ALONG_X_AXIS );
|
||||
}
|
||||
else
|
||||
{
|
||||
this->setSamplesFromXYErrorValues( depthValues,
|
||||
propertyValues,
|
||||
errorValues,
|
||||
useLogarithmicScale,
|
||||
RiaCurveDataTools::ErrorAxis::ERROR_ALONG_Y_AXIS );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -265,14 +292,6 @@ void RimWellLogCurve::setOverrideCurveData( const std::vector<double>&
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaDefines::PhaseType RimWellLogCurve::resultPhase() const
|
||||
{
|
||||
return RiaDefines::PhaseType::PHASE_NOT_APPLICABLE;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -45,6 +45,30 @@ public:
|
||||
bool propertyValueRangeInData( double* minimumValue, double* maximumValue ) const;
|
||||
bool depthValueRangeInData( double* minimumValue, double* maximumValue ) const;
|
||||
|
||||
const RigWellLogCurveData* curveData() const;
|
||||
|
||||
void updateCurveAppearance() override;
|
||||
|
||||
virtual QString wellName() const = 0;
|
||||
virtual QString wellLogChannelUiName() const = 0;
|
||||
virtual QString wellLogChannelName() const;
|
||||
virtual QString wellLogChannelUnits() const = 0;
|
||||
virtual QString wellDate() const { return ""; };
|
||||
|
||||
static QString wellLogCurveIconName();
|
||||
|
||||
void setOverrideCurveData( const std::vector<double>& propertyValues,
|
||||
const std::vector<double>& depthValues,
|
||||
const RiaCurveDataTools::CurveIntervals& curveIntervals );
|
||||
|
||||
protected:
|
||||
void updateZoomInParentPlot() override;
|
||||
void updateLegendsInPlot() override;
|
||||
void setOverrideCurveDataPropertyValueRange( double minimumValue, double maximumValue );
|
||||
void calculateCurveDataPropertyValueRange();
|
||||
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
|
||||
void setPropertyValuesAndDepths( const std::vector<double>& propertyValues,
|
||||
const std::vector<double>& depths,
|
||||
RiaDefines::DepthTypeEnum depthType,
|
||||
@ -63,6 +87,9 @@ public:
|
||||
bool useLogarithmicScale,
|
||||
const QString& propertyUnit = RiaWellLogUnitTools<double>::noUnitString() );
|
||||
|
||||
void setPropertyAndDepthValuesToPlotCurve( const std::vector<double>& propertyValues,
|
||||
const std::vector<double>& depthValues );
|
||||
|
||||
void setPropertyValuesAndDepths( const std::vector<double>& propertyValues,
|
||||
const std::map<RiaDefines::DepthTypeEnum, std::vector<double>>& depths,
|
||||
double rkbDiff,
|
||||
@ -71,33 +98,9 @@ public:
|
||||
bool useLogarithmicScale,
|
||||
const QString& propertyUnit = RiaWellLogUnitTools<double>::noUnitString() );
|
||||
|
||||
void setPropertyAndDepthValuesToPlotCurve( const std::vector<double>& propertyValues,
|
||||
const std::vector<double>& depthValues );
|
||||
|
||||
const RigWellLogCurveData* curveData() const;
|
||||
|
||||
void updateCurveAppearance() override;
|
||||
|
||||
virtual QString wellName() const = 0;
|
||||
virtual QString wellLogChannelUiName() const = 0;
|
||||
virtual QString wellLogChannelName() const;
|
||||
virtual QString wellLogChannelUnits() const = 0;
|
||||
virtual QString wellDate() const { return ""; };
|
||||
|
||||
static QString wellLogCurveIconName();
|
||||
|
||||
void setOverrideCurveData( const std::vector<double>& propertyValues,
|
||||
const std::vector<double>& depthValues,
|
||||
const RiaCurveDataTools::CurveIntervals& curveIntervals );
|
||||
|
||||
virtual RiaDefines::PhaseType resultPhase() const;
|
||||
|
||||
protected:
|
||||
void updateZoomInParentPlot() override;
|
||||
void updateLegendsInPlot() override;
|
||||
void setOverrideCurveDataPropertyValueRange( double minimumValue, double maximumValue );
|
||||
void calculateCurveDataPropertyValueRange();
|
||||
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
void setPropertyAndDepthsAndErrors( const std::vector<double>& propertyValues,
|
||||
const std::vector<double>& depthValues,
|
||||
const std::vector<double>& errorValues );
|
||||
|
||||
bool isVerticalCurve() const;
|
||||
RiuPlotAxis depthAxis() const;
|
||||
|
@ -359,9 +359,13 @@ void RimWellLogCurveCommonDataSource::analyseCurvesAndTracks( const std::vector<
|
||||
m_uniqueCases.insert( rftCurve->eclipseResultCase() );
|
||||
|
||||
auto adr = rftCurve->rftAddress();
|
||||
m_uniqueRftWellNames.insert( adr.wellName() );
|
||||
m_uniqueRftTimeSteps.insert( adr.timeStep() );
|
||||
m_uniqueRftBranchIds.insert( QString::number( adr.segmentBranchNumber() ) );
|
||||
if ( adr.wellLogChannel() == RifEclipseRftAddress::RftWellLogChannelType::SEGMENT_VALUES &&
|
||||
adr.segmentResultName() != "None" )
|
||||
{
|
||||
m_uniqueRftWellNames.insert( adr.wellName() );
|
||||
m_uniqueRftTimeSteps.insert( adr.timeStep() );
|
||||
m_uniqueRftBranchIds.insert( adr.segmentBranchNumber() );
|
||||
}
|
||||
}
|
||||
}
|
||||
for ( RimWellLogTrack* track : tracks )
|
||||
@ -443,6 +447,11 @@ void RimWellLogCurveCommonDataSource::analyseCurvesAndTracks( const std::vector<
|
||||
{
|
||||
m_rftTimeStep = *( m_uniqueRftTimeSteps.begin() );
|
||||
}
|
||||
|
||||
if ( m_uniqueRftBranchIds.size() == 1u )
|
||||
{
|
||||
m_rftSegmentBranchId = *( m_uniqueRftBranchIds.begin() );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -745,7 +754,12 @@ std::vector<caf::PdmFieldHandle*> RimWellLogCurveCommonDataSource::fieldsToShowI
|
||||
{
|
||||
fieldsToDisplay.push_back( &m_simWellName );
|
||||
}
|
||||
fieldsToDisplay.push_back( &m_timeStep );
|
||||
|
||||
if ( m_uniqueRftWellNames.size() == 1u ) fieldsToDisplay.push_back( &m_rftWellName );
|
||||
if ( m_uniqueTimeSteps.size() == 1u ) fieldsToDisplay.push_back( &m_timeStep );
|
||||
if ( m_uniqueRftTimeSteps.size() == 1u ) fieldsToDisplay.push_back( &m_rftTimeStep );
|
||||
if ( m_uniqueRftBranchIds.size() == 1u ) fieldsToDisplay.push_back( &m_rftSegmentBranchId );
|
||||
|
||||
return fieldsToDisplay;
|
||||
}
|
||||
|
||||
@ -932,7 +946,7 @@ QList<caf::PdmOptionItemInfo>
|
||||
else if ( fieldNeedingOptions == &m_rftTimeStep )
|
||||
{
|
||||
auto eclipseCase = dynamic_cast<RimEclipseResultCase*>( m_case() );
|
||||
if ( eclipseCase && eclipseCase->rftReader() )
|
||||
if ( eclipseCase && eclipseCase->rftReader() && !m_uniqueRftWellNames.empty() )
|
||||
{
|
||||
options = RimRftTools::segmentTimeStepOptions( eclipseCase->rftReader(), *( m_uniqueRftWellNames.begin() ) );
|
||||
}
|
||||
@ -1005,9 +1019,9 @@ void RimWellLogCurveCommonDataSource::defineUiOrdering( QString uiConfigName, ca
|
||||
group->add( &m_wbsSmoothingThreshold );
|
||||
}
|
||||
|
||||
group->add( &m_rftWellName );
|
||||
group->add( &m_rftTimeStep );
|
||||
group->add( &m_rftSegmentBranchId );
|
||||
if ( !m_uniqueRftTimeSteps.empty() ) group->add( &m_rftTimeStep );
|
||||
if ( !m_uniqueRftWellNames.empty() ) group->add( &m_rftWellName );
|
||||
if ( !m_uniqueRftBranchIds.empty() ) group->add( &m_rftSegmentBranchId );
|
||||
|
||||
uiOrdering.skipRemainingFields( true );
|
||||
}
|
||||
|
@ -117,7 +117,7 @@ private:
|
||||
|
||||
caf::PdmField<QDateTime> m_rftTimeStep;
|
||||
caf::PdmField<QString> m_rftWellName;
|
||||
caf::PdmField<QString> m_rftSegmentBranchId;
|
||||
caf::PdmField<int> m_rftSegmentBranchId;
|
||||
|
||||
std::set<RimCase*> m_uniqueCases;
|
||||
std::set<int> m_uniqueTrajectoryTypes;
|
||||
@ -131,5 +131,5 @@ private:
|
||||
|
||||
std::set<QDateTime> m_uniqueRftTimeSteps;
|
||||
std::set<QString> m_uniqueRftWellNames;
|
||||
std::set<QString> m_uniqueRftBranchIds;
|
||||
std::set<int> m_uniqueRftBranchIds;
|
||||
};
|
||||
|
@ -173,7 +173,7 @@ RimWellLogRftCurve::RimWellLogRftCurve()
|
||||
CAF_PDM_InitFieldNoDefault( &m_rftDataType, "RftDataType", "Data Type" );
|
||||
|
||||
CAF_PDM_InitField( &m_segmentResultName, "SegmentResultName", RiaResultNames::undefinedResultName(), "Segment Result Name" );
|
||||
CAF_PDM_InitField( &m_segmentBranchId, "SegmentBranchId", RiaResultNames::undefinedResultName(), "Segment Branch" );
|
||||
CAF_PDM_InitField( &m_segmentBranchId, "SegmentBranchId", -1, "Segment Branch" );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -234,7 +234,7 @@ QDateTime RimWellLogRftCurve::timeStep() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogRftCurve::setSegmentBranchId( const QString& branchId )
|
||||
void RimWellLogRftCurve::setSegmentBranchId( int branchId )
|
||||
{
|
||||
m_segmentBranchId = branchId;
|
||||
}
|
||||
@ -308,9 +308,20 @@ RimObservedFmuRftData* RimWellLogRftCurve::observedFmuRftData() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogRftCurve::setRftAddress( RifEclipseRftAddress address )
|
||||
{
|
||||
m_timeStep = address.timeStep();
|
||||
m_wellName = address.wellName();
|
||||
m_wellLogChannelName = address.wellLogChannel();
|
||||
m_timeStep = address.timeStep();
|
||||
m_wellName = address.wellName();
|
||||
|
||||
if ( address.wellLogChannel() == RifEclipseRftAddress::RftWellLogChannelType::SEGMENT_VALUES )
|
||||
{
|
||||
m_rftDataType = RftDataType::RFT_SEGMENT_DATA;
|
||||
m_segmentResultName = address.segmentResultName();
|
||||
m_segmentBranchId = address.segmentBranchNumber();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_rftDataType = RftDataType::RFT_DATA;
|
||||
m_wellLogChannelName = address.wellLogChannel();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -318,7 +329,12 @@ void RimWellLogRftCurve::setRftAddress( RifEclipseRftAddress address )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RifEclipseRftAddress RimWellLogRftCurve::rftAddress() const
|
||||
{
|
||||
return { m_wellName, m_timeStep, m_wellLogChannelName() };
|
||||
if ( m_rftDataType == RftDataType::RFT_SEGMENT_DATA )
|
||||
{
|
||||
return RifEclipseRftAddress::createSegmentAddress( m_wellName, m_timeStep, m_segmentResultName(), m_segmentBranchId() );
|
||||
}
|
||||
|
||||
return RifEclipseRftAddress::createAddress( m_wellName, m_timeStep, m_wellLogChannelName() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -453,7 +469,7 @@ QString RimWellLogRftCurve::createCurveAutoName()
|
||||
{
|
||||
name.push_back( m_segmentResultName );
|
||||
|
||||
QString branchText = "Branch " + m_segmentBranchId();
|
||||
QString branchText = QString( "Branch %1" ).arg( m_segmentBranchId() );
|
||||
name.push_back( branchText );
|
||||
}
|
||||
|
||||
@ -573,15 +589,10 @@ void RimWellLogRftCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
||||
|
||||
auto propertyValues = this->curveData()->propertyValues();
|
||||
auto depthValues = this->curveData()->depths( RiaDefines::DepthTypeEnum::MEASURED_DEPTH, displayUnit );
|
||||
bool useLogarithmicScale = false;
|
||||
|
||||
if ( !errors.empty() )
|
||||
{
|
||||
this->setSamplesFromXYErrorValues( propertyValues,
|
||||
depthValues,
|
||||
errors,
|
||||
useLogarithmicScale,
|
||||
RiaCurveDataTools::ErrorAxis::ERROR_ALONG_X_AXIS );
|
||||
setPropertyAndDepthsAndErrors( propertyValues, depthValues, errors );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -620,22 +631,25 @@ void RimWellLogRftCurve::onLoadDataAndUpdate( bool updateParentPlot )
|
||||
{
|
||||
m_plotCurve->setPerPointLabels( perPointLabels );
|
||||
|
||||
auto xValues = this->curveData()->propertyValuesByIntervals();
|
||||
auto yValues =
|
||||
auto propertyValues = this->curveData()->propertyValuesByIntervals();
|
||||
auto depthValues =
|
||||
this->curveData()->depthValuesByIntervals( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH, displayUnit );
|
||||
bool useLogarithmicScale = false;
|
||||
|
||||
if ( !errors.empty() )
|
||||
{
|
||||
this->setSamplesFromXYErrorValues( xValues,
|
||||
yValues,
|
||||
errors,
|
||||
useLogarithmicScale,
|
||||
RiaCurveDataTools::ErrorAxis::ERROR_ALONG_X_AXIS );
|
||||
setPropertyAndDepthsAndErrors( propertyValues, depthValues, errors );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_plotCurve->setSamplesFromXValuesAndYValues( xValues, yValues, useLogarithmicScale );
|
||||
if ( isVerticalCurve() )
|
||||
{
|
||||
m_plotCurve->setSamplesFromXValuesAndYValues( propertyValues, depthValues, useLogarithmicScale );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_plotCurve->setSamplesFromXValuesAndYValues( depthValues, propertyValues, useLogarithmicScale );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -803,7 +817,9 @@ std::vector<QString> RimWellLogRftCurve::perPointLabels() const
|
||||
{
|
||||
if ( m_observedFmuRftData() )
|
||||
{
|
||||
RifEclipseRftAddress address( m_wellName(), m_timeStep, RifEclipseRftAddress::RftWellLogChannelType::PRESSURE );
|
||||
auto address = RifEclipseRftAddress::createAddress( m_wellName(),
|
||||
m_timeStep,
|
||||
RifEclipseRftAddress::RftWellLogChannelType::PRESSURE );
|
||||
return m_observedFmuRftData()->labels( address );
|
||||
}
|
||||
return {};
|
||||
@ -901,7 +917,8 @@ bool RimWellLogRftCurve::createWellPathIdxToRftFileIdxMapping()
|
||||
globCellIndicesToIndexInWell[intersections[idx].globCellIndex] = idx;
|
||||
}
|
||||
|
||||
RifEclipseRftAddress depthAddress( m_wellName(), m_timeStep, RifEclipseRftAddress::RftWellLogChannelType::TVD );
|
||||
RifEclipseRftAddress depthAddress =
|
||||
RifEclipseRftAddress::createAddress( m_wellName(), m_timeStep, RifEclipseRftAddress::RftWellLogChannelType::TVD );
|
||||
std::vector<caf::VecIjk> rftIndices;
|
||||
if ( !rftReader() ) return false;
|
||||
|
||||
@ -972,15 +989,15 @@ std::vector<double> RimWellLogRftCurve::xValues()
|
||||
|
||||
if ( m_rftDataType() == RftDataType::RFT_SEGMENT_DATA )
|
||||
{
|
||||
auto depthAddress = RifEclipseRftAddress::createSegmentResult( m_wellName(), m_timeStep, m_segmentResultName() );
|
||||
depthAddress.setSegmentBranchNumber( segmentBranchNumber() );
|
||||
auto depthAddress =
|
||||
RifEclipseRftAddress::createSegmentAddress( m_wellName(), m_timeStep, m_segmentResultName(), segmentBranchId() );
|
||||
|
||||
reader->values( depthAddress, &values );
|
||||
|
||||
return values;
|
||||
}
|
||||
|
||||
RifEclipseRftAddress address( m_wellName(), m_timeStep, m_wellLogChannelName() );
|
||||
auto address = RifEclipseRftAddress::createAddress( m_wellName(), m_timeStep, m_wellLogChannelName() );
|
||||
|
||||
reader->values( address, &values );
|
||||
|
||||
@ -1014,9 +1031,10 @@ std::vector<double> RimWellLogRftCurve::errorValues()
|
||||
|
||||
if ( reader && m_rftDataType() == RftDataType::RFT_DATA )
|
||||
{
|
||||
RifEclipseRftAddress errorAddress( m_wellName(),
|
||||
m_timeStep,
|
||||
RifEclipseRftAddress::RftWellLogChannelType::PRESSURE_ERROR );
|
||||
RifEclipseRftAddress errorAddress =
|
||||
RifEclipseRftAddress::createAddress( m_wellName(),
|
||||
m_timeStep,
|
||||
RifEclipseRftAddress::RftWellLogChannelType::PRESSURE_ERROR );
|
||||
reader->values( errorAddress, &errorValues );
|
||||
}
|
||||
|
||||
@ -1035,15 +1053,17 @@ std::vector<double> RimWellLogRftCurve::tvDepthValues()
|
||||
|
||||
if ( m_rftDataType() == RftDataType::RFT_SEGMENT_DATA )
|
||||
{
|
||||
auto depthAddress =
|
||||
RifEclipseRftAddress::createSegmentResult( m_wellName(), m_timeStep, RiaDefines::segmentTvdDepthResultName() );
|
||||
depthAddress.setSegmentBranchNumber( segmentBranchNumber() );
|
||||
auto depthAddress = RifEclipseRftAddress::createSegmentAddress( m_wellName(),
|
||||
m_timeStep,
|
||||
RiaDefines::segmentTvdDepthResultName(),
|
||||
segmentBranchId() );
|
||||
|
||||
reader->values( depthAddress, &values );
|
||||
return values;
|
||||
}
|
||||
|
||||
RifEclipseRftAddress depthAddress( m_wellName(), m_timeStep, RifEclipseRftAddress::RftWellLogChannelType::TVD );
|
||||
auto depthAddress =
|
||||
RifEclipseRftAddress::createAddress( m_wellName(), m_timeStep, RifEclipseRftAddress::RftWellLogChannelType::TVD );
|
||||
reader->values( depthAddress, &values );
|
||||
|
||||
bool wellPathExists = createWellPathIdxToRftFileIdxMapping();
|
||||
@ -1078,10 +1098,10 @@ std::vector<double> RimWellLogRftCurve::measuredDepthValues()
|
||||
RifReaderRftInterface* reader = rftReader();
|
||||
if ( reader )
|
||||
{
|
||||
auto depthAddress = RifEclipseRftAddress::createSegmentResult( m_wellName(),
|
||||
m_timeStep,
|
||||
RiaDefines::segmentStartDepthResultName() );
|
||||
depthAddress.setSegmentBranchNumber( segmentBranchNumber() );
|
||||
auto depthAddress = RifEclipseRftAddress::createSegmentAddress( m_wellName(),
|
||||
m_timeStep,
|
||||
RiaDefines::segmentStartDepthResultName(),
|
||||
segmentBranchId() );
|
||||
|
||||
reader->values( depthAddress, &values );
|
||||
}
|
||||
@ -1095,7 +1115,8 @@ std::vector<double> RimWellLogRftCurve::measuredDepthValues()
|
||||
|
||||
if ( !reader ) return values;
|
||||
|
||||
RifEclipseRftAddress depthAddress( m_wellName(), m_timeStep, RifEclipseRftAddress::RftWellLogChannelType::MD );
|
||||
RifEclipseRftAddress depthAddress =
|
||||
RifEclipseRftAddress::createAddress( m_wellName(), m_timeStep, RifEclipseRftAddress::RftWellLogChannelType::MD );
|
||||
reader->values( depthAddress, &values );
|
||||
return values;
|
||||
}
|
||||
@ -1144,7 +1165,7 @@ bool RimWellLogRftCurve::deriveMeasuredDepthValuesFromWellPath( const std::vecto
|
||||
RimProject* proj = RimProject::current();
|
||||
RimWellPath* wellPath = proj->wellPathByName( m_wellName );
|
||||
|
||||
if ( wellPath )
|
||||
if ( wellPath && wellPath->wellPathGeometry() )
|
||||
{
|
||||
const std::vector<double>& mdValuesOfWellPath = wellPath->wellPathGeometry()->measuredDepths();
|
||||
const std::vector<double>& tvdValuesOfWellPath = wellPath->wellPathGeometry()->trueVerticalDepths();
|
||||
@ -1171,8 +1192,14 @@ bool RimWellLogRftCurve::deriveMeasuredDepthFromObservedData( const std::vector<
|
||||
std::vector<double> tvdValuesOfObservedData;
|
||||
std::vector<double> mdValuesOfObservedData;
|
||||
|
||||
RifEclipseRftAddress tvdAddress( m_wellName(), m_timeStep, RifEclipseRftAddress::RftWellLogChannelType::TVD );
|
||||
RifEclipseRftAddress mdAddress( m_wellName(), m_timeStep, RifEclipseRftAddress::RftWellLogChannelType::MD );
|
||||
RifEclipseRftAddress tvdAddress =
|
||||
RifEclipseRftAddress::createAddress( m_wellName(),
|
||||
m_timeStep,
|
||||
RifEclipseRftAddress::RftWellLogChannelType::TVD );
|
||||
RifEclipseRftAddress mdAddress =
|
||||
RifEclipseRftAddress::createAddress( m_wellName(),
|
||||
m_timeStep,
|
||||
RifEclipseRftAddress::RftWellLogChannelType::MD );
|
||||
|
||||
reader->values( tvdAddress, &tvdValuesOfObservedData );
|
||||
reader->values( mdAddress, &mdValuesOfObservedData );
|
||||
@ -1193,14 +1220,7 @@ bool RimWellLogRftCurve::deriveMeasuredDepthFromObservedData( const std::vector<
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RimWellLogRftCurve::segmentBranchNumber() const
|
||||
int RimWellLogRftCurve::segmentBranchId() const
|
||||
{
|
||||
if ( m_segmentBranchId() != RiaDefines::allBranches() )
|
||||
{
|
||||
QString text = m_segmentBranchId();
|
||||
auto intValue = text.toInt();
|
||||
return intValue;
|
||||
}
|
||||
|
||||
return -1;
|
||||
return m_segmentBranchId();
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ public:
|
||||
void setTimeStep( const QDateTime& dateTime );
|
||||
QDateTime timeStep() const;
|
||||
|
||||
void setSegmentBranchId( const QString& branchId );
|
||||
void setSegmentBranchId( int branchId );
|
||||
|
||||
void setEclipseResultCase( RimEclipseResultCase* eclipseResultCase );
|
||||
RimEclipseResultCase* eclipseResultCase() const;
|
||||
@ -130,7 +130,7 @@ private:
|
||||
bool deriveMeasuredDepthFromObservedData( const std::vector<double>& tvDepthValues,
|
||||
std::vector<double>& derivedMDValues );
|
||||
|
||||
int segmentBranchNumber() const;
|
||||
int segmentBranchId() const;
|
||||
|
||||
private:
|
||||
caf::PdmPtrField<RimEclipseResultCase*> m_eclipseResultCase;
|
||||
@ -145,7 +145,7 @@ private:
|
||||
caf::PdmField<caf::AppEnum<RimWellLogRftCurve::RftDataType>> m_rftDataType;
|
||||
|
||||
caf::PdmField<QString> m_segmentResultName;
|
||||
caf::PdmField<QString> m_segmentBranchId;
|
||||
caf::PdmField<int> m_segmentBranchId;
|
||||
|
||||
std::map<size_t, size_t> m_idxInWellPathToIdxInRftFile;
|
||||
caf::PdmField<caf::AppEnum<RifEclipseRftAddress::RftWellLogChannelType>> m_wellLogChannelName;
|
||||
|
@ -401,6 +401,17 @@ void RimWellLogTrack::calculatePropertyValueZoomRange()
|
||||
{
|
||||
std::tie( minValue, maxValue ) = adjustXRange( minValue, maxValue, m_minorTickInterval() );
|
||||
}
|
||||
else
|
||||
{
|
||||
auto range = std::fabs( maxValue - minValue );
|
||||
maxValue += 0.1 * range;
|
||||
|
||||
auto candidateMinValue = minValue - 0.1 * range;
|
||||
if ( std::signbit( minValue ) == std::signbit( candidateMinValue ) )
|
||||
{
|
||||
minValue = candidateMinValue;
|
||||
}
|
||||
}
|
||||
|
||||
m_availablePropertyValueRangeMin = minValue;
|
||||
m_availablePropertyValueRangeMax = maxValue;
|
||||
@ -573,7 +584,7 @@ void RimWellLogTrack::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
||||
}
|
||||
else if ( changedField == &m_visiblePropertyValueRangeMin || changedField == &m_visiblePropertyValueRangeMax )
|
||||
{
|
||||
bool emptyRange = isEmptyVisibleXRange();
|
||||
bool emptyRange = isEmptyVisiblePropertyRange();
|
||||
m_explicitTickIntervals.uiCapability()->setUiReadOnly( emptyRange );
|
||||
m_propertyValueAxisGridVisibility.uiCapability()->setUiReadOnly( emptyRange );
|
||||
|
||||
@ -775,7 +786,7 @@ void RimWellLogTrack::updatePropertyValueAxisAndGridTickIntervals()
|
||||
{
|
||||
if ( !m_plotWidget ) return;
|
||||
|
||||
bool emptyRange = isEmptyVisibleXRange();
|
||||
bool emptyRange = isEmptyVisiblePropertyRange();
|
||||
if ( emptyRange )
|
||||
{
|
||||
m_plotWidget->enableGridLines( valueAxis(), false, false );
|
||||
@ -1227,7 +1238,7 @@ void RimWellLogTrack::visibleDepthRange( double* minDepth, double* maxDepth )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimWellLogTrack::isEmptyVisibleXRange() const
|
||||
bool RimWellLogTrack::isEmptyVisiblePropertyRange() const
|
||||
{
|
||||
return std::abs( m_visiblePropertyValueRangeMax() - m_visiblePropertyValueRangeMin ) <
|
||||
1.0e-6 * std::max( 1.0, std::max( m_visiblePropertyValueRangeMax(), m_visiblePropertyValueRangeMin() ) );
|
||||
@ -1304,10 +1315,12 @@ void RimWellLogTrack::onLoadDataAndUpdate()
|
||||
m_majorTickInterval.uiCapability()->setUiHidden( !m_explicitTickIntervals() );
|
||||
m_minorTickInterval.uiCapability()->setUiHidden( !m_explicitTickIntervals() );
|
||||
|
||||
bool emptyRange = isEmptyVisibleXRange();
|
||||
bool emptyRange = isEmptyVisiblePropertyRange();
|
||||
m_explicitTickIntervals.uiCapability()->setUiReadOnly( emptyRange );
|
||||
m_propertyValueAxisGridVisibility.uiCapability()->setUiReadOnly( emptyRange );
|
||||
|
||||
updateDepthZoom();
|
||||
|
||||
updateLegend();
|
||||
}
|
||||
|
||||
@ -1404,7 +1417,7 @@ void RimWellLogTrack::setAutoScaleDepthValuesEnabled( bool enabled )
|
||||
void RimWellLogTrack::setAutoScalePropertyValuesIfNecessary()
|
||||
{
|
||||
// Avoid resetting if visible range has set to empty by user
|
||||
bool emptyRange = isEmptyVisibleXRange();
|
||||
bool emptyRange = isEmptyVisiblePropertyRange();
|
||||
if ( !m_isAutoScalePropertyValuesEnabled && emptyRange ) return;
|
||||
|
||||
const double eps = 1.0e-8;
|
||||
@ -2332,7 +2345,7 @@ void RimWellLogTrack::uiOrderingForRftPltFormations( caf::PdmUiOrdering& uiOrder
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogTrack::uiOrderingForXAxisSettings( caf::PdmUiOrdering& uiOrdering )
|
||||
{
|
||||
caf::PdmUiGroup* gridGroup = uiOrdering.addNewGroup( "X Axis Settings" );
|
||||
caf::PdmUiGroup* gridGroup = uiOrdering.addNewGroup( "Property Axis Settings" );
|
||||
gridGroup->add( &m_isLogarithmicScaleEnabled );
|
||||
gridGroup->add( &m_visiblePropertyValueRangeMin );
|
||||
gridGroup->add( &m_visiblePropertyValueRangeMax );
|
||||
|
@ -309,7 +309,7 @@ private:
|
||||
const RigGeoMechWellLogExtractor* extractor ) const;
|
||||
|
||||
void connectCurveSignals( RimWellLogCurve* curve );
|
||||
bool isEmptyVisibleXRange() const;
|
||||
bool isEmptyVisiblePropertyRange() const;
|
||||
|
||||
private:
|
||||
QString m_propertyValueAxisTitle;
|
||||
|
Loading…
Reference in New Issue
Block a user