RFT ensemble refactoring

* Compute average MD for intersections with a cell
* Create extractor for simulation well
* Remove rftReader from RifDataSourceForRftPlt
* Add function compute measured depth for RFT cells based on well path geometry
* Move statistics reader to well ensemble curve set
* Make sure both TVD and MD are cached if possible
* Add selection of grid case to use for estimation of measured depth (MD)
Add "Grid Model For MD" where the user can select a grid model. This grid model is propagated to a hidden field in EnsembleCurveSet. The grid model is then applied to RifReaderEnsembleStatisticsRft owned by EnsembleCurveSet
This commit is contained in:
Magne Sjaastad
2023-09-04 10:08:30 +02:00
committed by GitHub
parent fe17b211b8
commit 7a782cec66
27 changed files with 627 additions and 428 deletions

View File

@@ -246,19 +246,17 @@ void RifReaderEclipseRft::values( const RifEclipseRftAddress& rftAddress, std::v
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RifReaderEclipseRft::cellIndices( const RifEclipseRftAddress& rftAddress, std::vector<caf::VecIjk>* indices )
std::vector<caf::VecIjk> RifReaderEclipseRft::cellIndices( const QString& wellName, const QDateTime& timeStep )
{
CVF_ASSERT( indices );
if ( !m_ecl_rft_file )
{
open();
}
indices->clear();
int index = indexFromAddress( wellName, timeStep );
if ( index < 0 ) return {};
int index = indexFromAddress( rftAddress );
if ( index < 0 ) return;
std::vector<caf::VecIjk> indices;
ecl_rft_node_type* node = ecl_rft_file_iget_node( m_ecl_rft_file, index );
@@ -268,8 +266,10 @@ void RifReaderEclipseRft::cellIndices( const RifEclipseRftAddress& rftAddress, s
ecl_rft_node_iget_ijk( node, cellIdx, &i, &j, &k );
caf::VecIjk ijk( (size_t)i, (size_t)j, (size_t)k );
indices->push_back( ijk );
indices.push_back( ijk );
}
return indices;
}
//--------------------------------------------------------------------------------------------------
@@ -453,3 +453,19 @@ int RifReaderEclipseRft::indexFromAddress( const RifEclipseRftAddress& rftAddres
return -1;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
int RifReaderEclipseRft::indexFromAddress( const QString& wellName, const QDateTime& timeStep ) const
{
for ( const auto& [rftAddr, nodeIdx] : m_rftAddressToLibeclNodeIdx )
{
if ( rftAddr.wellName() == wellName && rftAddr.timeStep() == timeStep )
{
return nodeIdx;
}
}
return -1;
}