Statistics Contourmap UI updates (#12060)

* Enable time step selections and controls in view
* Support loading just what we need for statistics contour maps by using custom reader settings
* Close case once done with it unless there are active views.
* Add selection of user interface case (for result selection, display of wells, faults...)
* Avoid int overflow for nested progresses by using double
* Improve auto naming
* Misc. UI improvements
This commit is contained in:
jonjenssen
2025-01-14 21:52:54 +01:00
committed by GitHub
parent ba1224c9de
commit b999faf293
47 changed files with 1238 additions and 774 deletions

View File

@@ -561,6 +561,38 @@ void RimEclipseView::onUpdateScaleTransform()
if ( nativeOrOverrideViewer() ) nativeOrOverrideViewer()->updateCachedValuesInScene();
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
std::vector<size_t> RimEclipseView::activeTimeStepIndices( bool propertyFiltersActive )
{
std::vector<size_t> timeStepIndices;
// First entry in this vector is used to define the geometry only result mode with no results.
timeStepIndices.push_back( 0 );
// Find the number of time frames the animation needs to show the requested data.
if ( ( isTimeStepDependentDataVisibleInThisOrComparisonView() && currentGridCellResults()->maxTimeStepCount() > 0 ) )
{
CVF_ASSERT( currentGridCellResults() );
size_t i;
for ( i = 0; i < currentGridCellResults()->maxTimeStepCount(); i++ )
{
timeStepIndices.push_back( i );
}
}
else if ( cellResult()->hasStaticResult() || cellEdgeResult()->hasResult() || propertyFiltersActive ||
intersectionCollection()->hasAnyActiveSeparateResults() ||
( surfaceInViewCollection() && surfaceInViewCollection()->hasAnyActiveSeparateResults() ) )
{
// The one and only static result entry
timeStepIndices.push_back( 0 );
}
return timeStepIndices;
}
//--------------------------------------------------------------------------------------------------
/// Create display model,
/// or at least empty scenes as frames that is delivered to the viewer
@@ -585,30 +617,7 @@ void RimEclipseView::onCreateDisplayModel()
// Define a vector containing time step indices to produce geometry for.
// First entry in this vector is used to define the geometry only result mode with no results.
std::vector<size_t> timeStepIndices;
// The one and only geometry entry
timeStepIndices.push_back( 0 );
// Find the number of time frames the animation needs to show the requested data.
if ( ( isTimeStepDependentDataVisibleInThisOrComparisonView() && currentGridCellResults()->maxTimeStepCount() > 0 ) )
{
CVF_ASSERT( currentGridCellResults() );
size_t i;
for ( i = 0; i < currentGridCellResults()->maxTimeStepCount(); i++ )
{
timeStepIndices.push_back( i );
}
}
else if ( cellResult()->hasStaticResult() || cellEdgeResult()->hasResult() || propertyFiltersActive ||
intersectionCollection()->hasAnyActiveSeparateResults() ||
( surfaceInViewCollection() && surfaceInViewCollection()->hasAnyActiveSeparateResults() ) )
{
// The one and only static result entry
timeStepIndices.push_back( 0 );
}
std::vector<size_t> timeStepIndices = activeTimeStepIndices( propertyFiltersActive );
cvf::Collection<cvf::ModelBasicList> frameModels;
size_t timeIdx;
@@ -1195,7 +1204,7 @@ void RimEclipseView::onLoadDataAndUpdate()
if ( eclipseCase() )
{
if ( !eclipseCase()->openReserviorCase() )
if ( !eclipseCase()->openReservoirCase() )
{
RiaLogging::warning( "Could not open the Eclipse Grid file: \n" + eclipseCase()->gridFileName() );
setEclipseCase( nullptr );