mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
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:
@@ -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() );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user