mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Work in progress, updating cell indexing
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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() );
|
||||
|
||||
|
||||
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user