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

@@ -155,6 +155,29 @@ void RigWellLogExtractor::resampleIntersections( double maxDistanceBetweenInters
m_intersectedCellFaces = resampledIntersectedCellFaces;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::optional<double> RigWellLogExtractor::averageMdForCell( size_t cellIndex ) const
{
std::vector<size_t> indicesForCell;
for ( size_t i = 0; i < m_intersectedCellsGlobIdx.size(); i++ )
{
if ( m_intersectedCellsGlobIdx[i] == cellIndex ) indicesForCell.emplace_back( i );
}
if ( indicesForCell.empty() ) return std::nullopt;
double sum = 0.0;
for ( const auto& i : indicesForCell )
{
sum += m_intersectionMeasuredDepths[i];
}
return sum / static_cast<double>( indicesForCell.size() );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------

View File

@@ -73,6 +73,8 @@ public:
void resampleIntersections( double maxDistanceBetweenIntersections );
std::optional<double> averageMdForCell( size_t cellIndex ) const;
protected:
static void insertIntersectionsInMap( const std::vector<HexIntersectionInfo>& intersections,
cvf::Vec3d p1,