Improve naming of cell related result names

Use radial/theta when required for GUI
Hide DX/DY from the list of available results
This commit is contained in:
Magne Sjaastad committed 2025-10-08 16:03:56 +02:00
1 parent b771421087
commit 62188fa9f2
7 files changed
+58 -18

No files matched your search

@@ -45,7 +45,8 @@ RigIndexIjkResultCalculator::~RigIndexIjkResultCalculator()
//--------------------------------------------------------------------------------------------------
bool RigIndexIjkResultCalculator::isMatching( const RigEclipseResultAddress& resVarAddr ) const
{
return ( resVarAddr.resultName() == RiaResultNames::indexIResultName() || resVarAddr.resultName() == RiaResultNames::indexJResultName() ||
return ( resVarAddr.resultName() == RiaResultNames::indexIResultName( m_resultsData->isRadialModel() ) ||
resVarAddr.resultName() == RiaResultNames::indexJResultName( m_resultsData->isRadialModel() ) ||
resVarAddr.resultName() == RiaResultNames::indexKResultName() ) &&
resVarAddr.resultCatType() == RiaDefines::ResultCatType::STATIC_NATIVE;
}
@@ -59,10 +60,10 @@ void RigIndexIjkResultCalculator::calculate( const RigEclipseResultAddress& resV
const size_t activeCellCount = activeReservoirCellIndices.size();
if ( activeCellCount == 0 ) return;
size_t iResultIndex =
m_resultsData->findScalarResultIndexFromAddress( RiaResultNames::staticIntegerAddress( RiaResultNames::indexIResultName() ) );
size_t jResultIndex =
m_resultsData->findScalarResultIndexFromAddress( RiaResultNames::staticIntegerAddress( RiaResultNames::indexJResultName() ) );
size_t iResultIndex = m_resultsData->findScalarResultIndexFromAddress(
RiaResultNames::staticIntegerAddress( RiaResultNames::indexIResultName( m_resultsData->isRadialModel() ) ) );
size_t jResultIndex = m_resultsData->findScalarResultIndexFromAddress(
RiaResultNames::staticIntegerAddress( RiaResultNames::indexJResultName( m_resultsData->isRadialModel() ) ) );
size_t kResultIndex =
m_resultsData->findScalarResultIndexFromAddress( RiaResultNames::staticIntegerAddress( RiaResultNames::indexKResultName() ) );
@@ -466,6 +466,8 @@ QStringList RigCaseCellResultsData::resultNames( RiaDefines::ResultCatType resTy
if ( resultAddress.isDeltaTimeStepActive() || resultAddress.isDeltaCaseActive() || resultAddress.isDivideByCellFaceAreaActive() )
continue;
if ( isRadialModel() && ( it->resultName() == "DX" || it->resultName() == "DY" ) ) continue;
if ( it->resultType() == resType )
{
varList.push_back( it->resultName() );
@@ -1136,8 +1138,10 @@ void RigCaseCellResultsData::createPlaceholderResultEntries()
// I/J/K indexes
{
findOrCreateScalarResultIndex( RiaResultNames::staticIntegerAddress( RiaResultNames::indexIResultName() ), needsToBeStored );
findOrCreateScalarResultIndex( RiaResultNames::staticIntegerAddress( RiaResultNames::indexJResultName() ), needsToBeStored );
findOrCreateScalarResultIndex( RiaResultNames::staticIntegerAddress( RiaResultNames::indexIResultName( isRadialModel() ) ),
needsToBeStored );
findOrCreateScalarResultIndex( RiaResultNames::staticIntegerAddress( RiaResultNames::indexJResultName( isRadialModel() ) ),
needsToBeStored );
findOrCreateScalarResultIndex( RiaResultNames::staticIntegerAddress( RiaResultNames::indexKResultName() ), needsToBeStored );
}
@@ -1378,8 +1382,8 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResult( const RigEclipseResu
}
RigAllanUtil::computeAllanResults( this, m_ownerMainGrid, includeInactiveCells );
}
else if ( resultName == RiaResultNames::indexIResultName() || resultName == RiaResultNames::indexJResultName() ||
resultName == RiaResultNames::indexKResultName() )
else if ( resultName == RiaResultNames::indexIResultName( isRadialModel() ) ||
resultName == RiaResultNames::indexJResultName( isRadialModel() ) || resultName == RiaResultNames::indexKResultName() )
{
computeIndexResults();
}
@@ -1945,7 +1949,7 @@ void RigCaseCellResultsData::computeDepthRelatedResults()
//--------------------------------------------------------------------------------------------------
void RigCaseCellResultsData::computeIndexResults()
{
RigEclipseResultAddress addr( RiaDefines::ResultCatType::STATIC_NATIVE, RiaResultNames::indexIResultName() );
RigEclipseResultAddress addr( RiaDefines::ResultCatType::STATIC_NATIVE, RiaResultNames::indexIResultName( isRadialModel() ) );
RigIndexIjkResultCalculator calculator( *this );
calculator.calculate( addr, 0 );
}
@@ -2999,6 +3003,16 @@ RigStatisticsDataCache* RigCaseCellResultsData::statistics( const RigEclipseResu
return m_statisticsDataCache[scalarResultIndex].p();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
bool RigCaseCellResultsData::isRadialModel() const
{
if ( !m_ownerMainGrid ) return false;
return m_ownerMainGrid->isRadial();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@@ -213,6 +213,8 @@ private:
RigStatisticsDataCache* statistics( const RigEclipseResultAddress& resVarAddr );
bool isRadialModel() const;
private:
cvf::ref<RifReaderInterface> m_readerInterface;
cvf::cref<RigFormationNames> m_activeFormationNamesData;