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:
@@ -272,40 +272,44 @@ std::set<QString> RifReaderOpmRft::wellNames()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RifReaderOpmRft::cellIndices( const RifEclipseRftAddress& rftAddress, std::vector<caf::VecIjk>* indices )
|
||||
std::vector<caf::VecIjk> RifReaderOpmRft::cellIndices( const QString& wellName, const QDateTime& timeStep )
|
||||
{
|
||||
if ( !openFiles() ) return;
|
||||
if ( !openFiles() ) return {};
|
||||
|
||||
auto wellName = rftAddress.wellName().toStdString();
|
||||
auto stdWellName = wellName.toStdString();
|
||||
|
||||
auto date = rftAddress.timeStep().date();
|
||||
auto date = timeStep.date();
|
||||
int y = date.year();
|
||||
int m = date.month();
|
||||
int d = date.day();
|
||||
|
||||
std::vector<caf::VecIjk> indices;
|
||||
|
||||
try
|
||||
{
|
||||
auto resultNameI = "CONIPOS";
|
||||
auto dataI = m_opm_rft->getRft<int>( resultNameI, wellName, y, m, d );
|
||||
auto dataI = m_opm_rft->getRft<int>( resultNameI, stdWellName, y, m, d );
|
||||
|
||||
auto resultNameJ = "CONJPOS";
|
||||
auto dataJ = m_opm_rft->getRft<int>( resultNameJ, wellName, y, m, d );
|
||||
auto dataJ = m_opm_rft->getRft<int>( resultNameJ, stdWellName, y, m, d );
|
||||
|
||||
auto resultNameK = "CONKPOS";
|
||||
auto dataK = m_opm_rft->getRft<int>( resultNameK, wellName, y, m, d );
|
||||
auto dataK = m_opm_rft->getRft<int>( resultNameK, stdWellName, y, m, d );
|
||||
|
||||
if ( !dataI.empty() && ( dataI.size() == dataJ.size() ) && ( dataI.size() == dataK.size() ) )
|
||||
{
|
||||
for ( size_t n = 0; n < dataI.size(); n++ )
|
||||
{
|
||||
// NB: Transform to zero-based cell indices
|
||||
indices->push_back( caf::VecIjk( dataI[n] - 1, dataJ[n] - 1, dataK[n] - 1 ) );
|
||||
indices.push_back( caf::VecIjk( dataI[n] - 1, dataJ[n] - 1, dataK[n] - 1 ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
catch ( ... )
|
||||
{
|
||||
}
|
||||
|
||||
return indices;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user