Skip to content

Commit

Permalink
Adjust progress info
Browse files Browse the repository at this point in the history
  • Loading branch information
jonjenssen committed Jan 13, 2025
1 parent b104d48 commit fc2f208
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
10 changes: 5 additions & 5 deletions ApplicationLibCode/FileInterface/RifReaderOpmCommonActive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ bool RifReaderOpmCommonActive::importGrid( RigMainGrid* /* mainGrid*/, RigEclips
RigActiveCellGrid* activeGrid = new RigActiveCellGrid();
eclipseCaseData->setMainGrid( activeGrid );

caf::ProgressInfo progInfo( 5, "Importing Eclipse Grid" );
caf::ProgressInfo progInfo( 4, "Importing Eclipse Grid" );

Opm::EclIO::EGrid opmGrid( m_gridFileName );

Expand Down Expand Up @@ -119,7 +119,7 @@ bool RifReaderOpmCommonActive::importGrid( RigMainGrid* /* mainGrid*/, RigEclips
activeCellInfo->setGridCount( 1 + numLGRs );
fractureActiveCellInfo->setGridCount( 1 + numLGRs );

auto task = progInfo.task( "Getting Active Cell Information", 1 );
auto task = progInfo.task( "Getting Active Cell Information" );

for ( int lgrIdx = 0; lgrIdx < numLGRs; lgrIdx++ )
{
Expand Down Expand Up @@ -163,12 +163,12 @@ bool RifReaderOpmCommonActive::importGrid( RigMainGrid* /* mainGrid*/, RigEclips
.arg( QString::fromStdString( RiaStdStringTools::formatThousandGrouping( opmGrid.totalActiveCells() ) ) )
.arg( QString::fromStdString( RiaStdStringTools::formatThousandGrouping( opmGrid.totalNumberOfCells() ) ) ) );

auto task = progInfo.task( "Loading Active Cell Main Grid Geometry", 1 );
auto task = progInfo.task( "Loading Active Cell Main Grid Geometry" );
transferActiveGeometry( opmGrid, opmGrid, activeGrid, activeGrid, eclipseCaseData );

bool hasParentInfo = ( lgr_parent_names.size() >= (size_t)numLGRs );

auto task2 = progInfo.task( "Loading Active Cell LGR Grid Geometry ", 1 );
auto task2 = progInfo.task( "Loading Active Cell LGR Grid Geometry" );

for ( int lgrIdx = 0; lgrIdx < numLGRs; lgrIdx++ )
{
Expand All @@ -193,7 +193,7 @@ bool RifReaderOpmCommonActive::importGrid( RigMainGrid* /* mainGrid*/, RigEclips

if ( isNNCsEnabled() )
{
auto task = progInfo.task( "Loading NNC data", 1 );
auto task = progInfo.task( "Loading NNC data" );
transferStaticNNCData( opmGrid, lgrGrids, activeGrid );
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,15 +354,20 @@ void RimStatisticsContourMap::computeStatistics()
RigEclipseContourMapProjection contourMapProjection( *contourMapGrid, *firstEclipseCaseData, *firstResultData );
m_gridMapping = contourMapProjection.generateGridMapping( resultAggregation, {} );

caf::ProgressInfo progInfo( ensemble->cases().size() + 1, "Reading Eclipse Ensemble" );
const size_t nCases = ensemble->cases().size();

std::map<size_t, std::vector<std::vector<double>>> timestep_results;

caf::ProgressInfo progInfo( nCases, QString( "Reading Eclipse Ensemble" ) );

auto readerSettings = RiaPreferencesGrid::current()->gridOnlyReaderSettings();
auto casesInViews = ensemble->casesInViews();

int i = 1;
for ( RimEclipseCase* eCase : ensemble->cases() )
{
auto task = progInfo.task( QString( "Processing Case %1 of %2" ).arg( i++ ).arg( nCases ) );

RifReaderSettings oldSettings = eCase->readerSettings();
eCase->setReaderSettings( readerSettings );

Expand Down Expand Up @@ -398,8 +403,6 @@ void RimStatisticsContourMap::computeStatistics()
{
eCase->closeReservoirCase();
}

progInfo.incrementProgress();
}

m_contourMapGrid = std::move( contourMapGrid );
Expand Down

0 comments on commit fc2f208

Please sign in to comment.