mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-03 20:20:48 -06:00
#5300 Formations : Make sure views are updated correctly
This commit is contained in:
parent
ff2963293b
commit
79641f090f
@ -2076,7 +2076,9 @@ void RimEclipseView::defineAxisLabels( cvf::String* xLabel, cvf::String* yLabel,
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RimEclipseView::isUsingFormationNames() const
|
bool RimEclipseView::isUsingFormationNames() const
|
||||||
{
|
{
|
||||||
if ( ( cellResult()->resultType() == RiaDefines::FORMATION_NAMES ) ) return true;
|
if ( cellResult()->resultType() == RiaDefines::FORMATION_NAMES ) return true;
|
||||||
|
|
||||||
|
if ( faultResultSettings()->customFaultResult()->resultType() == RiaDefines::ALLEN_DIAGRAMS ) return true;
|
||||||
|
|
||||||
return eclipsePropertyFilterCollection()->isUsingFormationNames();
|
return eclipsePropertyFilterCollection()->isUsingFormationNames();
|
||||||
}
|
}
|
||||||
|
@ -2843,44 +2843,44 @@ void RigCaseCellResultsData::setActiveFormationNames( RigFormationNames* activeF
|
|||||||
{
|
{
|
||||||
fnData->at( cIdx ) = HUGE_VAL;
|
fnData->at( cIdx ) = HUGE_VAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
size_t localCellCount = m_ownerMainGrid->cellCount();
|
|
||||||
for ( size_t cIdx = 0; cIdx < localCellCount; ++cIdx )
|
|
||||||
{
|
{
|
||||||
size_t i( cvf::UNDEFINED_SIZE_T ), j( cvf::UNDEFINED_SIZE_T ), k( cvf::UNDEFINED_SIZE_T );
|
size_t localCellCount = m_ownerMainGrid->cellCount();
|
||||||
|
for ( size_t cIdx = 0; cIdx < localCellCount; ++cIdx )
|
||||||
if ( !m_ownerMainGrid->ijkFromCellIndex( cIdx, &i, &j, &k ) ) continue;
|
|
||||||
|
|
||||||
int formNameIdx = activeFormationNames->formationIndexFromKLayerIdx( k );
|
|
||||||
if ( formNameIdx != -1 )
|
|
||||||
{
|
{
|
||||||
fnData->at( cIdx ) = formNameIdx;
|
size_t i( cvf::UNDEFINED_SIZE_T ), j( cvf::UNDEFINED_SIZE_T ), k( cvf::UNDEFINED_SIZE_T );
|
||||||
|
|
||||||
|
if ( !m_ownerMainGrid->ijkFromCellIndex( cIdx, &i, &j, &k ) ) continue;
|
||||||
|
|
||||||
|
int formNameIdx = activeFormationNames->formationIndexFromKLayerIdx( k );
|
||||||
|
if ( formNameIdx != -1 )
|
||||||
|
{
|
||||||
|
fnData->at( cIdx ) = formNameIdx;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
fnData->at( cIdx ) = HUGE_VAL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
for ( size_t cIdx = localCellCount; cIdx < totalGlobCellCount; ++cIdx )
|
||||||
{
|
{
|
||||||
fnData->at( cIdx ) = HUGE_VAL;
|
size_t mgrdCellIdx = m_ownerMainGrid->globalCellArray()[cIdx].mainGridCellIndex();
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for ( size_t cIdx = localCellCount; cIdx < totalGlobCellCount; ++cIdx )
|
size_t i( cvf::UNDEFINED_SIZE_T ), j( cvf::UNDEFINED_SIZE_T ), k( cvf::UNDEFINED_SIZE_T );
|
||||||
{
|
|
||||||
size_t mgrdCellIdx = m_ownerMainGrid->globalCellArray()[cIdx].mainGridCellIndex();
|
|
||||||
|
|
||||||
size_t i( cvf::UNDEFINED_SIZE_T ), j( cvf::UNDEFINED_SIZE_T ), k( cvf::UNDEFINED_SIZE_T );
|
if ( !m_ownerMainGrid->ijkFromCellIndex( mgrdCellIdx, &i, &j, &k ) ) continue;
|
||||||
|
|
||||||
if ( !m_ownerMainGrid->ijkFromCellIndex( mgrdCellIdx, &i, &j, &k ) ) continue;
|
int formNameIdx = activeFormationNames->formationIndexFromKLayerIdx( k );
|
||||||
|
if ( formNameIdx != -1 )
|
||||||
int formNameIdx = activeFormationNames->formationIndexFromKLayerIdx( k );
|
{
|
||||||
if ( formNameIdx != -1 )
|
fnData->at( cIdx ) = formNameIdx;
|
||||||
{
|
}
|
||||||
fnData->at( cIdx ) = formNameIdx;
|
else
|
||||||
}
|
{
|
||||||
else
|
fnData->at( cIdx ) = HUGE_VAL;
|
||||||
{
|
}
|
||||||
fnData->at( cIdx ) = HUGE_VAL;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3047,7 +3047,11 @@ void RigCaseCellResultsData::computeAllenResults( RigCaseCellResultsData* cellRe
|
|||||||
val = 0.0;
|
val = 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t formationCount = cellResultsData->activeFormationNames()->formationNames().size();
|
size_t formationCount = 0;
|
||||||
|
if ( cellResultsData->activeFormationNames() )
|
||||||
|
{
|
||||||
|
formationCount = cellResultsData->activeFormationNames()->formationNames().size();
|
||||||
|
}
|
||||||
|
|
||||||
const std::vector<RigConnection>& nncConnections = mainGrid->nncData()->connections();
|
const std::vector<RigConnection>& nncConnections = mainGrid->nncData()->connections();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user