mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
RFT plot: Fix stepping on well
* Rft: Store segment and connection count per well * Update the segment branch index combo box when well changes * Bump version number
This commit is contained in:
parent
d3a5355141
commit
1eb44e519e
@ -39,9 +39,7 @@
|
|||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RifReaderOpmRft::RifReaderOpmRft( const QString& fileName, const QString& dataDeckFileName )
|
RifReaderOpmRft::RifReaderOpmRft( const QString& fileName, const QString& dataDeckFileName )
|
||||||
: m_segmentResultItemCount( 0 )
|
: m_fileName( fileName )
|
||||||
, m_connectionResultItemCount( 0 )
|
|
||||||
, m_fileName( fileName )
|
|
||||||
, m_dataDeckFileName( dataDeckFileName )
|
, m_dataDeckFileName( dataDeckFileName )
|
||||||
, m_detectedErrorWhenOpeningRftFile( false )
|
, m_detectedErrorWhenOpeningRftFile( false )
|
||||||
{
|
{
|
||||||
@ -51,9 +49,7 @@ RifReaderOpmRft::RifReaderOpmRft( const QString& fileName, const QString& dataDe
|
|||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RifReaderOpmRft::RifReaderOpmRft( const QString& fileName )
|
RifReaderOpmRft::RifReaderOpmRft( const QString& fileName )
|
||||||
: m_segmentResultItemCount( 0 )
|
: m_fileName( fileName )
|
||||||
, m_connectionResultItemCount( 0 )
|
|
||||||
, m_fileName( fileName )
|
|
||||||
, m_detectedErrorWhenOpeningRftFile( false )
|
, m_detectedErrorWhenOpeningRftFile( false )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -128,7 +124,7 @@ void RifReaderOpmRft::values( const RifEclipseRftAddress& rftAddress, std::vecto
|
|||||||
auto key = std::make_pair( wellName, RftDate{ y, m, d } );
|
auto key = std::make_pair( wellName, RftDate{ y, m, d } );
|
||||||
auto segment = m_rftWellDateSegments[key];
|
auto segment = m_rftWellDateSegments[key];
|
||||||
|
|
||||||
if ( data.size() == m_connectionResultItemCount )
|
if ( m_connectionResultItemCount.count( wellName ) && data.size() == m_connectionResultItemCount[wellName] )
|
||||||
{
|
{
|
||||||
// Connection results with size equal to length of result CONSEGNO. CONSEGNO defines the segment
|
// Connection results with size equal to length of result CONSEGNO. CONSEGNO defines the segment
|
||||||
// numbers the connection is connected to.
|
// numbers the connection is connected to.
|
||||||
@ -534,21 +530,30 @@ void RifReaderOpmRft::buildSegmentData()
|
|||||||
|
|
||||||
for ( const auto& [name, arrayType, size] : results )
|
for ( const auto& [name, arrayType, size] : results )
|
||||||
{
|
{
|
||||||
if ( ( name.find( "SEG" ) == 0 ) && m_segmentResultItemCount == 0 )
|
if ( ( name.find( "SEG" ) == 0 ) && m_segmentResultItemCount.count( wellName ) == 0 )
|
||||||
{
|
{
|
||||||
m_segmentResultItemCount = size;
|
m_segmentResultItemCount[wellName] = size;
|
||||||
}
|
}
|
||||||
if ( name.find( "CON" ) == 0 && m_connectionResultItemCount == 0 )
|
if ( name.find( "CON" ) == 0 && m_connectionResultItemCount.count( wellName ) == 0 )
|
||||||
{
|
{
|
||||||
m_connectionResultItemCount = size;
|
m_connectionResultItemCount[wellName] = size;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( const auto& rftResultMetaData : results )
|
for ( const auto& rftResultMetaData : results )
|
||||||
{
|
{
|
||||||
const auto& [name, arrayType, size] = rftResultMetaData;
|
const auto& [name, arrayType, size] = rftResultMetaData;
|
||||||
if ( size == static_cast<int64_t>( m_segmentResultItemCount ) ||
|
|
||||||
size == static_cast<int64_t>( m_connectionResultItemCount ) )
|
bool isResultItemCountValid = false;
|
||||||
|
if ( m_segmentResultItemCount.count( wellName ) &&
|
||||||
|
size == static_cast<int64_t>( m_segmentResultItemCount[wellName] ) )
|
||||||
|
isResultItemCountValid = true;
|
||||||
|
|
||||||
|
if ( m_connectionResultItemCount.count( wellName ) &&
|
||||||
|
size == static_cast<int64_t>( m_connectionResultItemCount[wellName] ) )
|
||||||
|
isResultItemCountValid = true;
|
||||||
|
|
||||||
|
if ( isResultItemCountValid )
|
||||||
{
|
{
|
||||||
segment.addResultNameAndSize( rftResultMetaData );
|
segment.addResultNameAndSize( rftResultMetaData );
|
||||||
}
|
}
|
||||||
|
@ -104,8 +104,8 @@ private:
|
|||||||
std::map<RftSegmentKey, RifRftSegment> m_rftWellDateSegments;
|
std::map<RftSegmentKey, RifRftSegment> m_rftWellDateSegments;
|
||||||
std::set<QDateTime> m_rftSegmentTimeSteps;
|
std::set<QDateTime> m_rftSegmentTimeSteps;
|
||||||
|
|
||||||
size_t m_segmentResultItemCount;
|
std::map<std::string, size_t> m_segmentResultItemCount;
|
||||||
size_t m_connectionResultItemCount;
|
std::map<std::string, size_t> m_connectionResultItemCount;
|
||||||
|
|
||||||
std::map<std::string, std::vector<std::pair<int, int>>> m_wseglink;
|
std::map<std::string, std::vector<std::pair<int, int>>> m_wseglink;
|
||||||
|
|
||||||
|
@ -864,6 +864,13 @@ void RimWellLogCurveCommonDataSource::fieldChangedByUi( const caf::PdmFieldHandl
|
|||||||
}
|
}
|
||||||
|
|
||||||
this->applyDataSourceChanges();
|
this->applyDataSourceChanges();
|
||||||
|
|
||||||
|
if ( changedField == &m_rftWellName )
|
||||||
|
{
|
||||||
|
// The segment branch index is depending on the well name. Make sure that the combo box for branch index is
|
||||||
|
// updated.
|
||||||
|
m_rftSegmentBranchIndex.uiCapability()->updateConnectedEditors();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -11,7 +11,7 @@ set(RESINSIGHT_VERSION_TEXT "-dev")
|
|||||||
# Must be unique and increasing within one combination of major/minor/patch version
|
# Must be unique and increasing within one combination of major/minor/patch version
|
||||||
# The uniqueness of this text is independent of RESINSIGHT_VERSION_TEXT
|
# The uniqueness of this text is independent of RESINSIGHT_VERSION_TEXT
|
||||||
# Format of text must be ".xx"
|
# Format of text must be ".xx"
|
||||||
set(RESINSIGHT_DEV_VERSION ".06")
|
set(RESINSIGHT_DEV_VERSION ".07")
|
||||||
|
|
||||||
# https://github.com/CRAVA/crava/tree/master/libs/nrlib
|
# https://github.com/CRAVA/crava/tree/master/libs/nrlib
|
||||||
set(NRLIB_GITHUB_SHA "ba35d4359882f1c6f5e9dc30eb95fe52af50fd6f")
|
set(NRLIB_GITHUB_SHA "ba35d4359882f1c6f5e9dc30eb95fe52af50fd6f")
|
||||||
|
Loading…
Reference in New Issue
Block a user