Work in progress, updating cell indexing

This commit is contained in:
Jon Jenssen
2024-09-04 18:17:19 +02:00
committed by jonjenssen
parent 9483c9054d
commit 2d5cedb5d9
28 changed files with 201 additions and 136 deletions

View File

@@ -93,9 +93,9 @@ bool RimFractureContainment::isEclipseCellOpenForFlow( const RigMainGrid* m
{
CVF_ASSERT( mainGrid );
if ( globalCellIndex >= mainGrid->globalCellArray().size() ) return false;
// if ( globalCellIndex >= mainGrid->globalCellArray().size() ) return false;
auto cell = mainGrid->globalCellArray()[globalCellIndex];
auto cell = mainGrid->cell( globalCellIndex );
auto mainGridCellIndex = cell.mainGridCellIndex();
size_t i, j, k;

View File

@@ -332,8 +332,7 @@ QString Rim3dOverlayInfoConfig::caseInfoText( RimEclipseView* eclipseView )
}
else if ( eclipseView->mainGrid() )
{
QString totCellCount =
localeWithSpaceAsGroupSeparator.toString( static_cast<int>( eclipseView->mainGrid()->globalCellArray().size() ) );
QString totCellCount = localeWithSpaceAsGroupSeparator.toString( static_cast<int>( eclipseView->mainGrid()->cellCount() ) );
size_t mxActCellCount =
eclipseView->eclipseCase()->eclipseCaseData()->activeCellInfo( RiaDefines::PorosityModelType::MATRIX_MODEL )->reservoirActiveCellCount();

View File

@@ -413,7 +413,7 @@ std::vector<size_t> RimEclipseContourMapProjection::findIntersectingCells( const
//--------------------------------------------------------------------------------------------------
size_t RimEclipseContourMapProjection::kLayer( size_t globalCellIdx ) const
{
const RigCell& cell = m_mainGrid->globalCellArray()[globalCellIdx];
const RigCell& cell = m_mainGrid->cell( globalCellIdx );
size_t mainGridCellIdx = cell.mainGridCellIndex();
size_t i, j, k;
m_mainGrid->ijkFromCellIndex( mainGridCellIdx, &i, &j, &k );
@@ -435,7 +435,7 @@ double RimEclipseContourMapProjection::calculateOverlapVolume( size_t globalCell
{
std::array<cvf::Vec3d, 8> hexCorners;
const RigCell& cell = m_mainGrid->globalCellArray()[globalCellIdx];
const RigCell& cell = m_mainGrid->cell( globalCellIdx );
size_t localCellIdx = cell.gridLocalCellIndex();
RigGridBase* localGrid = cell.hostGrid();
@@ -461,7 +461,7 @@ double RimEclipseContourMapProjection::calculateRayLengthInCell( size_t
{
std::array<cvf::Vec3d, 8> hexCorners;
RigCell cell = m_mainGrid->globalCellArray()[globalCellIdx];
RigCell cell = m_mainGrid->cell( globalCellIdx );
size_t localCellIdx = cell.gridLocalCellIndex();
RigGridBase* localGrid = cell.hostGrid();

View File

@@ -401,7 +401,7 @@ RimEclipseStatisticsCaseEvaluator::RimEclipseStatisticsCaseEvaluator( const std:
{
if ( !sourceCases.empty() )
{
m_reservoirCellCount = sourceCases[0]->eclipseCaseData()->mainGrid()->globalCellArray().size();
m_reservoirCellCount = sourceCases[0]->eclipseCaseData()->mainGrid()->cellCount();
}
CVF_ASSERT( m_destinationCase );

View File

@@ -2334,7 +2334,7 @@ void RimEclipseView::setOverridePropertyFilterCollection( RimEclipsePropertyFilt
//--------------------------------------------------------------------------------------------------
void RimEclipseView::calculateCurrentTotalCellVisibility( cvf::UByteArray* totalVisibility, int timeStep )
{
size_t cellCount = mainGrid()->globalCellArray().size();
size_t cellCount = mainGrid()->cellCount();
totalVisibility->resize( cellCount );
totalVisibility->setAll( false );
@@ -2364,8 +2364,7 @@ void RimEclipseView::calculateCurrentTotalCellVisibility( cvf::UByteArray* total
void RimEclipseView::calculateCellVisibility( cvf::UByteArray* visibility, std::vector<RivCellSetEnum> geomTypes, int timeStep )
{
if ( !mainGrid() ) return;
size_t cellCount = mainGrid()->globalCellArray().size();
size_t cellCount = mainGrid()->cellCount();
visibility->resize( cellCount );
visibility->setAll( false );

View File

@@ -267,8 +267,8 @@ void RimIdenticalGridCaseGroup::computeUnionOfActiveCells()
return;
}
m_unionOfMatrixActiveCells->setReservoirCellCount( m_mainGrid->globalCellArray().size() );
m_unionOfFractureActiveCells->setReservoirCellCount( m_mainGrid->globalCellArray().size() );
m_unionOfMatrixActiveCells->setReservoirCellCount( m_mainGrid->cellCount() );
m_unionOfFractureActiveCells->setReservoirCellCount( m_mainGrid->cellCount() );
m_unionOfMatrixActiveCells->setGridCount( m_mainGrid->gridCount() );
m_unionOfFractureActiveCells->setGridCount( m_mainGrid->gridCount() );

View File

@@ -474,7 +474,7 @@ void RimSummaryCaseMainCollection::loadFileSummaryCaseData( std::vector<RimFileS
RifOpmCommonEclipseSummary::resetEnhancedSummaryFileCount();
RiaThreadSafeLogger threadSafeLogger;
QCoreApplication::processEvents( QEventLoop::ExcludeUserInputEvents );
// QCoreApplication::processEvents( QEventLoop::ExcludeUserInputEvents );
// The HDF5 reader requires a special configuration to be thread safe. Disable threading for HDF reader.
bool canUseMultipleTreads = ( prefs->summaryDataReader() != RiaPreferencesSummary::SummaryReaderMode::HDF5_OPM_COMMON );
@@ -554,7 +554,7 @@ std::vector<RimSummaryCase*>
for ( const RifSummaryCaseFileResultInfo& fileInfo : summaryHeaderFileInfos )
{
QCoreApplication::processEvents( QEventLoop::ExcludeUserInputEvents );
// QCoreApplication::processEvents( QEventLoop::ExcludeUserInputEvents );
auto existingSummaryCase = findTopLevelSummaryCaseFromFileName( fileInfo.summaryFileName() );
if ( !existingSummaryCase )
@@ -597,7 +597,7 @@ std::vector<RimSummaryCase*>
if ( progress != nullptr ) progress->incrementProgress();
}
QCoreApplication::processEvents( QEventLoop::ExcludeUserInputEvents );
// QCoreApplication::processEvents( QEventLoop::ExcludeUserInputEvents );
}
RimSummaryCaseMainCollection::loadSummaryCaseData( sumCases );