mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-24 22:27:55 -05:00
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:
1 parent
b771421087
commit
62188fa9f2
7 files changed
+58
-18
No files matched your search
@@ -392,17 +392,17 @@ QString RiaResultNames::formationAllanResultName()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::indexIResultName()
|
||||
QString RiaResultNames::indexIResultName( bool isRadial )
|
||||
{
|
||||
return "INDEX_I";
|
||||
return isRadial ? "INDEX_RADIAL" : "INDEX_I";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RiaResultNames::indexJResultName()
|
||||
QString RiaResultNames::indexJResultName( bool isRadial )
|
||||
{
|
||||
return "INDEX_J";
|
||||
return isRadial ? "INDEX_THETA" : "INDEX_J";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -75,8 +75,8 @@ QString faultReactAssessmentPrefix();
|
||||
|
||||
QString completionTypeResultName();
|
||||
|
||||
QString indexIResultName();
|
||||
QString indexJResultName();
|
||||
QString indexIResultName( bool isRadial );
|
||||
QString indexJResultName( bool isRadial );
|
||||
QString indexKResultName();
|
||||
RigEclipseResultAddress staticIntegerAddress( const QString& resultName );
|
||||
|
||||
|
||||
+6
-5
@@ -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;
|
||||
|
||||
@@ -377,8 +377,16 @@ void RiuViewerCommands::displayContextMenu( QMouseEvent* event )
|
||||
|
||||
menuBuilder.subMenuStart( "Range Filter", QIcon( ":/CellFilter_Range.png" ) );
|
||||
|
||||
menuBuilder.addCmdFeatureWithUserData( "RicNewRangeFilterSlice3dviewFeature", "I Slice", iSliceList );
|
||||
menuBuilder.addCmdFeatureWithUserData( "RicNewRangeFilterSlice3dviewFeature", "J Slice", jSliceList );
|
||||
if ( isRadialGrid( mainOrComparisonView, m_currentGridIdx ) )
|
||||
{
|
||||
menuBuilder.addCmdFeatureWithUserData( "RicNewRangeFilterSlice3dviewFeature", "Radial Slice", iSliceList );
|
||||
menuBuilder.addCmdFeatureWithUserData( "RicNewRangeFilterSlice3dviewFeature", "Theta Slice", jSliceList );
|
||||
}
|
||||
else
|
||||
{
|
||||
menuBuilder.addCmdFeatureWithUserData( "RicNewRangeFilterSlice3dviewFeature", "I Slice", iSliceList );
|
||||
menuBuilder.addCmdFeatureWithUserData( "RicNewRangeFilterSlice3dviewFeature", "J Slice", jSliceList );
|
||||
}
|
||||
menuBuilder.addCmdFeatureWithUserData( "RicNewRangeFilterSlice3dviewFeature", "K Slice", kSliceList );
|
||||
menuBuilder.addCmdFeature( "RicNewCellRangeFilterFeature", "IJK Filter" );
|
||||
|
||||
@@ -1184,6 +1192,20 @@ void RiuViewerCommands::ijkFromCellIndex( Rim3dView* mainOrComparisonView, size_
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RiuViewerCommands::isRadialGrid( Rim3dView* mainOrComparisonView, size_t gridIdx )
|
||||
{
|
||||
RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>( mainOrComparisonView );
|
||||
if ( eclipseView && eclipseView->eclipseCase() && eclipseView->eclipseCase()->eclipseCaseData() )
|
||||
{
|
||||
return eclipseView->eclipseCase()->eclipseCaseData()->grid( gridIdx )->isRadial();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -83,6 +83,7 @@ public:
|
||||
|
||||
private:
|
||||
void ijkFromCellIndex( Rim3dView* mainOrComparisonView, size_t gridIdx, size_t cellIndex, size_t* i, size_t* j, size_t* k );
|
||||
bool isRadialGrid( Rim3dView* mainOrComparisonView, size_t gridIdx );
|
||||
|
||||
bool handleOverlayItemPicking( int winPosX, int winPosY );
|
||||
void handleTextPicking( int winPosX, int winPosY, cvf::HitItemCollection* hitItems );
|
||||
|
||||
Reference in new issue
Block a user