mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Janitor: Remove deprecated method.
This commit is contained in:
parent
5ecf621357
commit
1899184a41
@ -606,8 +606,7 @@ bool RiaApplication::loadProject( const QString& projectFileName, ProjectLoadAct
|
||||
|
||||
// Now load the ReservoirViews for the cases
|
||||
// Add all "native" cases in the project
|
||||
std::vector<RimCase*> casesToLoad;
|
||||
m_project->allCases( casesToLoad );
|
||||
std::vector<RimCase*> casesToLoad = m_project->allGridCases();
|
||||
{
|
||||
caf::ProgressInfo caseProgress( casesToLoad.size(), "Reading Cases" );
|
||||
|
||||
|
@ -193,9 +193,7 @@ void RiaProjectModifier::replaceSourceCases( RimProject* project )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaProjectModifier::replaceCase( RimProject* project )
|
||||
{
|
||||
std::vector<RimCase*> allCases;
|
||||
project->allCases( allCases );
|
||||
|
||||
std::vector<RimCase*> allCases = project->allGridCases();
|
||||
for ( RimCase* rimCase : allCases )
|
||||
{
|
||||
RimEclipseResultCase* eclipseResultCase = dynamic_cast<RimEclipseResultCase*>( rimCase );
|
||||
@ -234,9 +232,7 @@ void RiaProjectModifier::replaceCase( RimProject* project )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaProjectModifier::replacePropertiesFolder( RimProject* project )
|
||||
{
|
||||
std::vector<RimCase*> allCases;
|
||||
project->allCases( allCases );
|
||||
|
||||
std::vector<RimCase*> allCases = project->allGridCases();
|
||||
for ( RimCase* rimCase : allCases )
|
||||
{
|
||||
RimEclipseInputCase* inputCase = dynamic_cast<RimEclipseInputCase*>( rimCase );
|
||||
@ -289,9 +285,7 @@ QString RiaProjectModifier::caseNameFromGridFileName( const QString& fullGridFil
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RiaProjectModifier::firstCaseId( RimProject* project )
|
||||
{
|
||||
std::vector<RimCase*> allCases;
|
||||
project->allCases( allCases );
|
||||
|
||||
std::vector<RimCase*> allCases = project->allGridCases();
|
||||
for ( RimCase* rimCase : allCases )
|
||||
{
|
||||
RimEclipseResultCase* resultCase = dynamic_cast<RimEclipseResultCase*>( rimCase );
|
||||
@ -330,8 +324,7 @@ int RiaProjectModifier::firstGroupId( RimProject* project )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RiaProjectModifier::firstInputCaseId( RimProject* project )
|
||||
{
|
||||
std::vector<RimCase*> allCases;
|
||||
project->allCases( allCases );
|
||||
std::vector<RimCase*> allCases = project->allGridCases();
|
||||
|
||||
for ( RimCase* rimCase : allCases )
|
||||
{
|
||||
|
@ -42,10 +42,8 @@ RicfCreateView::RicfCreateView()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmScriptResponse RicfCreateView::execute()
|
||||
{
|
||||
RimProject* project = RimProject::current();
|
||||
std::vector<RimCase*> allCases;
|
||||
project->allCases( allCases );
|
||||
|
||||
RimProject* project = RimProject::current();
|
||||
std::vector<RimCase*> allCases = project->allGridCases();
|
||||
for ( RimCase* rimCase : allCases )
|
||||
{
|
||||
if ( rimCase->caseId() == m_caseId() )
|
||||
|
@ -64,8 +64,7 @@ caf::PdmScriptResponse RicfImportFormationNames::execute()
|
||||
if ( formationNames )
|
||||
{
|
||||
bool foundCase = false;
|
||||
std::vector<RimCase*> cases;
|
||||
RimProject::current()->allCases( cases );
|
||||
std::vector<RimCase*> cases = RimProject::current()->allGridCases();
|
||||
for ( RimCase* rimCase : cases )
|
||||
{
|
||||
if ( m_applyToCaseId() == -1 || ( rimCase->caseId() == m_applyToCaseId() ) )
|
||||
|
@ -69,11 +69,10 @@ void RicfSetTimeStep::setTimeStepIndex( int timeStepIndex )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::PdmScriptResponse RicfSetTimeStep::execute()
|
||||
{
|
||||
RimCase* rimCase = nullptr;
|
||||
std::vector<RimCase*> allCases;
|
||||
RimCase* rimCase = nullptr;
|
||||
|
||||
{
|
||||
RimProject::current()->allCases( allCases );
|
||||
std::vector<RimCase*> allCases = RimProject::current()->allGridCases();
|
||||
|
||||
bool foundCase = false;
|
||||
for ( RimCase* c : allCases )
|
||||
|
@ -58,9 +58,7 @@ void RicShowMainWindowFeature::showMainWindow()
|
||||
|
||||
// When the main window is created, make sure all the views are loaded and displayed
|
||||
|
||||
std::vector<RimCase*> allGridModels;
|
||||
RimProject::current()->allCases( allGridModels );
|
||||
|
||||
std::vector<RimCase*> allGridModels = RimProject::current()->allGridCases();
|
||||
for ( RimCase* gridModel : allGridModels )
|
||||
{
|
||||
if ( gridModel )
|
||||
|
@ -75,8 +75,7 @@ void RicExportCompletionsWellSegmentsFeature::onActionTriggered( bool isChecked
|
||||
QString defaultDir = RiaApplication::instance()->lastUsedDialogDirectoryWithFallbackToProjectFolder( "COMPLETIONS" );
|
||||
|
||||
RicCaseAndFileExportSettingsUi exportSettings;
|
||||
std::vector<RimCase*> cases;
|
||||
app->project()->allCases( cases );
|
||||
std::vector<RimCase*> cases = app->project()->allGridCases();
|
||||
for ( auto c : cases )
|
||||
{
|
||||
RimEclipseCase* eclipseCase = dynamic_cast<RimEclipseCase*>( c );
|
||||
|
@ -72,8 +72,7 @@ void RicWellPathExportCompletionDataFeature::prepareExportSettingsAndExportCompl
|
||||
|
||||
if ( !exportSettings->caseToApply() )
|
||||
{
|
||||
std::vector<RimCase*> cases;
|
||||
app->project()->allCases( cases );
|
||||
std::vector<RimCase*> cases = app->project()->allGridCases();
|
||||
for ( auto c : cases )
|
||||
{
|
||||
RimEclipseCase* eclipseCase = dynamic_cast<RimEclipseCase*>( c );
|
||||
|
@ -179,8 +179,7 @@ void RicCreateDepthAdjustedLasFilesUi::setDefaultValues()
|
||||
RimProject* proj = RimProject::current();
|
||||
if ( proj )
|
||||
{
|
||||
std::vector<RimCase*> allCases;
|
||||
proj->allCases( allCases );
|
||||
std::vector<RimCase*> allCases = proj->allGridCases();
|
||||
if ( !allCases.empty() ) selectedCase = allCases[0];
|
||||
|
||||
std::vector<RimWellPath*> allWellPaths = proj->activeOilField()->wellPathCollection->allWellPaths();
|
||||
|
@ -292,8 +292,7 @@ RicExportLgrUi*
|
||||
|
||||
if ( !featureUi->caseToApply() && !defaultCase )
|
||||
{
|
||||
std::vector<RimCase*> cases;
|
||||
app->project()->allCases( cases );
|
||||
std::vector<RimCase*> cases = app->project()->allGridCases();
|
||||
for ( auto c : cases )
|
||||
{
|
||||
RimEclipseCase* eclipseCase = dynamic_cast<RimEclipseCase*>( c );
|
||||
|
@ -90,9 +90,7 @@ void RicSnapshotAllViewsToFileFeature::exportSnapshotOfViewsIntoFolder( const QS
|
||||
|
||||
RiaLogging::info( QString( "Exporting snapshot of all views to %1" ).arg( snapshotFolderName ) );
|
||||
|
||||
std::vector<RimCase*> projectCases;
|
||||
project->allCases( projectCases );
|
||||
|
||||
std::vector<RimCase*> projectCases = project->allGridCases();
|
||||
for ( size_t i = 0; i < projectCases.size(); i++ )
|
||||
{
|
||||
RimCase* cas = projectCases[i];
|
||||
|
@ -116,9 +116,8 @@ void RicCreateSaturationPressurePlotsFeature::onActionTriggered( bool isChecked
|
||||
|
||||
std::vector<RimEclipseResultCase*> eclipseCases;
|
||||
{
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
std::vector<RimCase*> cases;
|
||||
app->project()->allCases( cases );
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
std::vector<RimCase*> cases = app->project()->allGridCases();
|
||||
for ( auto* rimCase : cases )
|
||||
{
|
||||
auto erc = dynamic_cast<RimEclipseResultCase*>( rimCase );
|
||||
|
@ -188,8 +188,7 @@ void RicCloseCaseFeature::deleteEclipseCase( RimEclipseCase* eclipseCase )
|
||||
{
|
||||
RimProject* project = RimProject::current();
|
||||
|
||||
std::vector<RimCase*> cases;
|
||||
project->allCases( cases );
|
||||
std::vector<RimCase*> cases = project->allGridCases();
|
||||
|
||||
if ( cases.empty() )
|
||||
{
|
||||
|
@ -131,9 +131,7 @@ void RicImportEnsembleFeature::importSingleEnsemble( const QStringList&
|
||||
RicSummaryPlotBuilder::createAndAppendDefaultSummaryMultiPlot( {}, { ensemble } );
|
||||
}
|
||||
|
||||
std::vector<RimCase*> allCases;
|
||||
RiaApplication::instance()->project()->allCases( allCases );
|
||||
|
||||
std::vector<RimCase*> allCases = RiaApplication::instance()->project()->allGridCases();
|
||||
if ( allCases.empty() )
|
||||
{
|
||||
RiuMainWindow::closeIfOpen();
|
||||
|
@ -127,8 +127,7 @@ void RicImportFormationNamesFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
RimProject* proj = RimProject::current();
|
||||
|
||||
std::vector<RimCase*> cases;
|
||||
proj->allCases( cases );
|
||||
std::vector<RimCase*> cases = proj->allGridCases();
|
||||
|
||||
// Legend name is base name of the one formation file, c.f. RicImportFormationNamesFeature::importFormationFiles()
|
||||
QString legendName = QFileInfo( fileNames.last() ).baseName();
|
||||
|
@ -100,10 +100,8 @@ void RicImportSummaryCasesFeature::onActionTriggered( bool isChecked )
|
||||
mainPlotWindow->updateMultiPlotToolBar();
|
||||
}
|
||||
|
||||
std::vector<RimCase*> allCases;
|
||||
app->project()->allCases( allCases );
|
||||
|
||||
if ( allCases.size() == 0 )
|
||||
std::vector<RimCase*> allCases = app->project()->allGridCases();
|
||||
if ( allCases.empty() )
|
||||
{
|
||||
RiuMainWindow::closeIfOpen();
|
||||
}
|
||||
@ -152,10 +150,8 @@ std::pair<bool, std::vector<RimSummaryCase*>> RicImportSummaryCasesFeature::crea
|
||||
mainPlotWindow->updateMultiPlotToolBar();
|
||||
|
||||
// Close main window if there are no eclipse cases imported
|
||||
std::vector<RimCase*> allCases;
|
||||
app->project()->allCases( allCases );
|
||||
|
||||
if ( allCases.size() == 0 )
|
||||
std::vector<RimCase*> allCases = app->project()->allGridCases();
|
||||
if ( allCases.empty() )
|
||||
{
|
||||
RiuMainWindow::closeIfOpen();
|
||||
}
|
||||
|
@ -67,10 +67,8 @@ void RicImportSummaryGroupFeature::onActionTriggered( bool isChecked )
|
||||
mainPlotWindow->updateMultiPlotToolBar();
|
||||
}
|
||||
|
||||
std::vector<RimCase*> allCases;
|
||||
app->project()->allCases( allCases );
|
||||
|
||||
if ( allCases.size() == 0 )
|
||||
std::vector<RimCase*> allCases = app->project()->allGridCases();
|
||||
if ( allCases.empty() )
|
||||
{
|
||||
RiuMainWindow::closeIfOpen();
|
||||
}
|
||||
|
@ -78,9 +78,7 @@ RimSimWellInView* RicWellLogTools::selectedSimulationWell( int* branchIndex )
|
||||
bool RicWellLogTools::hasRftData()
|
||||
{
|
||||
RimEclipseResultCase* resultCase;
|
||||
std::vector<RimCase*> cases;
|
||||
RimProject::current()->allCases( cases );
|
||||
|
||||
std::vector<RimCase*> cases = RimProject::current()->allGridCases();
|
||||
for ( RimCase* rimCase : cases )
|
||||
{
|
||||
if ( ( resultCase = dynamic_cast<RimEclipseResultCase*>( rimCase ) ) )
|
||||
@ -101,9 +99,7 @@ bool RicWellLogTools::hasRftData()
|
||||
bool RicWellLogTools::hasRftDataForWell( const QString& wellName )
|
||||
{
|
||||
RimEclipseResultCase* resultCase;
|
||||
std::vector<RimCase*> cases;
|
||||
RimProject::current()->allCases( cases );
|
||||
|
||||
std::vector<RimCase*> cases = RimProject::current()->allGridCases();
|
||||
for ( RimCase* rimCase : cases )
|
||||
{
|
||||
if ( ( resultCase = dynamic_cast<RimEclipseResultCase*>( rimCase ) ) )
|
||||
@ -236,8 +232,7 @@ ExtractionCurveType* RicWellLogTools::addExtractionCurve( RimWellLogTrack*
|
||||
}
|
||||
else
|
||||
{
|
||||
std::vector<RimCase*> allCases;
|
||||
RimProject::current()->allCases( allCases );
|
||||
std::vector<RimCase*> allCases = RimProject::current()->allGridCases();
|
||||
if ( !allCases.empty() ) caseToApply = allCases.front();
|
||||
}
|
||||
}
|
||||
@ -343,9 +338,7 @@ RimWellLogRftCurve* RicWellLogTools::addRftCurve( RimWellLogTrack* plotTrack, co
|
||||
|
||||
RimEclipseResultCase* resultCase = nullptr;
|
||||
|
||||
std::vector<RimCase*> cases;
|
||||
RimProject::current()->allCases( cases );
|
||||
|
||||
std::vector<RimCase*> cases = RimProject::current()->allGridCases();
|
||||
for ( RimCase* rimCase : cases )
|
||||
{
|
||||
if ( ( resultCase = dynamic_cast<RimEclipseResultCase*>( rimCase ) ) )
|
||||
|
@ -41,8 +41,7 @@ CAF_CMD_SOURCE_INIT( RicAdd3dWellLogCurveFeature, "RicAdd3dWellLogCurveFeature"
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicAdd3dWellLogCurveFeature::isCommandEnabled() const
|
||||
{
|
||||
std::vector<RimCase*> cases;
|
||||
RimProject::current()->allCases( cases );
|
||||
std::vector<RimCase*> cases = RimProject::current()->allGridCases();
|
||||
if ( cases.empty() ) return false;
|
||||
|
||||
return caf::SelectionManager::instance()->selectedItemAncestorOfType<RimWellPath>();
|
||||
|
@ -35,8 +35,7 @@ CAF_CMD_SOURCE_INIT( RicAdd3dWellLogFileCurveFeature, "RicAdd3dWellLogFileCurveF
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicAdd3dWellLogFileCurveFeature::isCommandEnabled() const
|
||||
{
|
||||
std::vector<RimCase*> cases;
|
||||
RimProject::current()->allCases( cases );
|
||||
std::vector<RimCase*> cases = RimProject::current()->allGridCases();
|
||||
if ( cases.empty() ) return false;
|
||||
|
||||
return ( RicWellLogTools::findWellPathWithLogFileFromSelection() != nullptr );
|
||||
|
@ -37,8 +37,7 @@ CAF_CMD_SOURCE_INIT( RicAdd3dWellLogRftCurveFeature, "RicAdd3dWellLogRftCurveFea
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicAdd3dWellLogRftCurveFeature::isCommandEnabled() const
|
||||
{
|
||||
std::vector<RimCase*> cases;
|
||||
RimProject::current()->allCases( cases );
|
||||
std::vector<RimCase*> cases = RimProject::current()->allGridCases();
|
||||
if ( cases.empty() ) return false;
|
||||
|
||||
RimWellPath* wellPath = caf::SelectionManager::instance()->selectedItemAncestorOfType<RimWellPath>();
|
||||
|
@ -169,8 +169,6 @@ RimSimWellInView* RicNewPltPlotFeature::selectedSimulationWell( int* branchIndex
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicNewPltPlotFeature::caseAvailable() const
|
||||
{
|
||||
std::vector<RimCase*> cases;
|
||||
RimProject::current()->allCases( cases );
|
||||
|
||||
return cases.size() > 0;
|
||||
std::vector<RimCase*> cases = RimProject::current()->allGridCases();
|
||||
return !cases.empty();
|
||||
}
|
||||
|
@ -133,8 +133,6 @@ void RicNewWellLogExtractionCurveFeature::setupActionLook( QAction* actionToSetu
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicNewWellLogExtractionCurveFeature::caseAvailable()
|
||||
{
|
||||
std::vector<RimCase*> cases;
|
||||
RimProject::current()->allCases( cases );
|
||||
|
||||
std::vector<RimCase*> cases = RimProject::current()->allGridCases();
|
||||
return !cases.empty();
|
||||
}
|
||||
|
@ -176,8 +176,7 @@ RimWellLogTrack*
|
||||
|
||||
if ( !caseToApply )
|
||||
{
|
||||
std::vector<RimCase*> allCases;
|
||||
RimProject::current()->allCases( allCases );
|
||||
std::vector<RimCase*> allCases = RimProject::current()->allGridCases();
|
||||
if ( !allCases.empty() )
|
||||
{
|
||||
caseToApply = allCases.front();
|
||||
|
@ -229,9 +229,7 @@ void RimWellPltPlot::updateFormationsOnPlot() const
|
||||
{
|
||||
/// Set default case. Todo : Use the first of the selected cases in the
|
||||
/// plot
|
||||
std::vector<RimCase*> cases;
|
||||
proj->allCases( cases );
|
||||
|
||||
std::vector<RimCase*> cases = proj->allGridCases();
|
||||
if ( !cases.empty() )
|
||||
{
|
||||
formationNamesCase = cases[0];
|
||||
|
@ -209,9 +209,7 @@ void RimWellRftPlot::updateFormationsOnPlot() const
|
||||
if ( !formationNamesCase )
|
||||
{
|
||||
/// Set default case. Todo : Use the first of the selected cases in the plot
|
||||
std::vector<RimCase*> cases;
|
||||
proj->allCases( cases );
|
||||
|
||||
std::vector<RimCase*> cases = proj->allGridCases();
|
||||
if ( !cases.empty() )
|
||||
{
|
||||
formationNamesCase = cases[0];
|
||||
|
@ -104,10 +104,8 @@ QList<caf::PdmOptionItemInfo> RimAdvancedSnapshotExportDefinition::calculateValu
|
||||
|
||||
std::vector<Rim3dView*> views;
|
||||
|
||||
RimProject* proj = RimProject::current();
|
||||
std::vector<RimCase*> cases;
|
||||
proj->allCases( cases );
|
||||
|
||||
RimProject* proj = RimProject::current();
|
||||
std::vector<RimCase*> cases = proj->allGridCases();
|
||||
for ( RimCase* rimCase : cases )
|
||||
{
|
||||
for ( Rim3dView* rimView : rimCase->views() )
|
||||
|
@ -289,9 +289,7 @@ QList<caf::PdmOptionItemInfo> RimGridCalculation::calculateValueOptions( const c
|
||||
RimProject* proj = RimProject::current();
|
||||
if ( proj )
|
||||
{
|
||||
std::vector<RimCase*> cases;
|
||||
proj->allCases( cases );
|
||||
|
||||
std::vector<RimCase*> cases = proj->allGridCases();
|
||||
for ( RimCase* c : cases )
|
||||
{
|
||||
auto* eclipseCase = dynamic_cast<RimEclipseCase*>( c );
|
||||
|
@ -554,8 +554,50 @@ std::vector<RimCase*> RimProject::allGridCases() const
|
||||
{
|
||||
std::vector<RimCase*> cases;
|
||||
|
||||
// TODO: Move code from allCases here
|
||||
allCases( cases );
|
||||
for ( size_t oilFieldIdx = 0; oilFieldIdx < oilFields().size(); oilFieldIdx++ )
|
||||
{
|
||||
RimOilField* oilField = oilFields[oilFieldIdx];
|
||||
if ( !oilField ) continue;
|
||||
|
||||
RimEclipseCaseCollection* analysisModels = oilField->analysisModels();
|
||||
if ( analysisModels )
|
||||
{
|
||||
for ( size_t caseIdx = 0; caseIdx < analysisModels->cases.size(); caseIdx++ )
|
||||
{
|
||||
cases.push_back( analysisModels->cases[caseIdx] );
|
||||
}
|
||||
for ( size_t cgIdx = 0; cgIdx < analysisModels->caseGroups.size(); cgIdx++ )
|
||||
{
|
||||
// Load the Main case of each IdenticalGridCaseGroup
|
||||
RimIdenticalGridCaseGroup* cg = analysisModels->caseGroups[cgIdx];
|
||||
if ( cg == nullptr ) continue;
|
||||
|
||||
if ( cg->statisticsCaseCollection() )
|
||||
{
|
||||
for ( size_t caseIdx = 0; caseIdx < cg->statisticsCaseCollection()->reservoirs.size(); caseIdx++ )
|
||||
{
|
||||
cases.push_back( cg->statisticsCaseCollection()->reservoirs[caseIdx] );
|
||||
}
|
||||
}
|
||||
if ( cg->caseCollection() )
|
||||
{
|
||||
for ( size_t caseIdx = 0; caseIdx < cg->caseCollection()->reservoirs.size(); caseIdx++ )
|
||||
{
|
||||
cases.push_back( cg->caseCollection()->reservoirs[caseIdx] );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RimGeoMechModels* geomModels = oilField->geoMechModels();
|
||||
if ( geomModels )
|
||||
{
|
||||
for ( auto acase : geomModels->cases() )
|
||||
{
|
||||
cases.push_back( acase );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return cases;
|
||||
}
|
||||
@ -637,57 +679,6 @@ void RimProject::assignPlotIdToPlotWindow( RimPlotWindow* plotWindow )
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
/// TODO: This function is deprecated, use allGridCases()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimProject::allCases( std::vector<RimCase*>& cases ) const
|
||||
{
|
||||
for ( size_t oilFieldIdx = 0; oilFieldIdx < oilFields().size(); oilFieldIdx++ )
|
||||
{
|
||||
RimOilField* oilField = oilFields[oilFieldIdx];
|
||||
if ( !oilField ) continue;
|
||||
|
||||
RimEclipseCaseCollection* analysisModels = oilField->analysisModels();
|
||||
if ( analysisModels )
|
||||
{
|
||||
for ( size_t caseIdx = 0; caseIdx < analysisModels->cases.size(); caseIdx++ )
|
||||
{
|
||||
cases.push_back( analysisModels->cases[caseIdx] );
|
||||
}
|
||||
for ( size_t cgIdx = 0; cgIdx < analysisModels->caseGroups.size(); cgIdx++ )
|
||||
{
|
||||
// Load the Main case of each IdenticalGridCaseGroup
|
||||
RimIdenticalGridCaseGroup* cg = analysisModels->caseGroups[cgIdx];
|
||||
if ( cg == nullptr ) continue;
|
||||
|
||||
if ( cg->statisticsCaseCollection() )
|
||||
{
|
||||
for ( size_t caseIdx = 0; caseIdx < cg->statisticsCaseCollection()->reservoirs.size(); caseIdx++ )
|
||||
{
|
||||
cases.push_back( cg->statisticsCaseCollection()->reservoirs[caseIdx] );
|
||||
}
|
||||
}
|
||||
if ( cg->caseCollection() )
|
||||
{
|
||||
for ( size_t caseIdx = 0; caseIdx < cg->caseCollection()->reservoirs.size(); caseIdx++ )
|
||||
{
|
||||
cases.push_back( cg->caseCollection()->reservoirs[caseIdx] );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RimGeoMechModels* geomModels = oilField->geoMechModels();
|
||||
if ( geomModels )
|
||||
{
|
||||
for ( auto acase : geomModels->cases() )
|
||||
{
|
||||
cases.push_back( acase );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -754,8 +745,7 @@ RimSummaryCaseMainCollection* RimProject::firstSummaryCaseMainCollection() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimProject::allNotLinkedViews( std::vector<Rim3dView*>& views )
|
||||
{
|
||||
std::vector<RimCase*> cases;
|
||||
allCases( cases );
|
||||
std::vector<RimCase*> cases = allGridCases();
|
||||
|
||||
std::vector<Rim3dView*> alreadyLinkedViews;
|
||||
if ( viewLinkerCollection->viewLinker() )
|
||||
@ -796,8 +786,7 @@ void RimProject::allNotLinkedViews( std::vector<Rim3dView*>& views )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimProject::allViews( std::vector<Rim3dView*>& views ) const
|
||||
{
|
||||
std::vector<RimCase*> cases;
|
||||
allCases( cases );
|
||||
std::vector<RimCase*> cases = allGridCases();
|
||||
|
||||
for ( size_t caseIdx = 0; caseIdx < cases.size(); caseIdx++ )
|
||||
{
|
||||
@ -832,8 +821,7 @@ void RimProject::allViews( std::vector<Rim3dView*>& views ) const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimProject::allVisibleViews( std::vector<Rim3dView*>& views ) const
|
||||
{
|
||||
std::vector<RimCase*> cases;
|
||||
allCases( cases );
|
||||
std::vector<RimCase*> cases = allGridCases();
|
||||
|
||||
for ( size_t caseIdx = 0; caseIdx < cases.size(); caseIdx++ )
|
||||
{
|
||||
@ -870,8 +858,7 @@ void RimProject::allVisibleGridViews( std::vector<RimGridView*>& views ) const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimProject::scheduleCreateDisplayModelAndRedrawAllViews()
|
||||
{
|
||||
std::vector<RimCase*> cases;
|
||||
allCases( cases );
|
||||
std::vector<RimCase*> cases = allGridCases();
|
||||
for ( size_t caseIdx = 0; caseIdx < cases.size(); caseIdx++ )
|
||||
{
|
||||
RimCase* rimCase = cases[caseIdx];
|
||||
@ -933,8 +920,7 @@ const RimOilField* RimProject::activeOilField() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimProject::computeUtmAreaOfInterest()
|
||||
{
|
||||
std::vector<RimCase*> cases;
|
||||
allCases( cases );
|
||||
std::vector<RimCase*> cases = allGridCases();
|
||||
|
||||
cvf::BoundingBox projectBB;
|
||||
|
||||
@ -1064,13 +1050,13 @@ RimDialogData* RimProject::dialogData() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimEclipseCase*> RimProject::eclipseCases() const
|
||||
{
|
||||
std::vector<RimEclipseCase*> allCases;
|
||||
std::vector<RimEclipseCase*> allGridCases;
|
||||
for ( const auto& oilField : oilFields )
|
||||
{
|
||||
const auto& cases = oilField->analysisModels->cases;
|
||||
allCases.insert( allCases.end(), cases.begin(), cases.end() );
|
||||
allGridCases.insert( allGridCases.end(), cases.begin(), cases.end() );
|
||||
}
|
||||
return allCases;
|
||||
return allGridCases;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -1346,8 +1332,7 @@ std::vector<RimValveTemplate*> RimProject::allValveTemplates() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
caf::AppEnum<RiaDefines::EclipseUnitSystem> RimProject::commonUnitSystemForAllCases() const
|
||||
{
|
||||
std::vector<RimCase*> rimCases;
|
||||
allCases( rimCases );
|
||||
std::vector<RimCase*> rimCases = allGridCases();
|
||||
|
||||
RiaDefines::EclipseUnitSystem commonUnitSystem = RiaDefines::EclipseUnitSystem::UNITS_UNKNOWN;
|
||||
|
||||
|
@ -131,8 +131,7 @@ public:
|
||||
void assignCaseIdToSummaryCase( RimSummaryCase* summaryCase );
|
||||
void assignIdToEnsemble( RimSummaryCaseCollection* summaryCaseCollection );
|
||||
|
||||
std::vector<RimCase*> allGridCases() const;
|
||||
void allCases( std::vector<RimCase*>& cases ) const; // Deprecated, use allGridCases()
|
||||
[[nodiscard]] std::vector<RimCase*> allGridCases() const;
|
||||
|
||||
std::vector<RimSummaryCase*> allSummaryCases() const;
|
||||
std::vector<RimSummaryCaseCollection*> summaryGroups() const;
|
||||
|
@ -324,9 +324,7 @@ void RimTools::caseOptionItems( QList<caf::PdmOptionItemInfo>* options )
|
||||
RimProject* proj = RimProject::current();
|
||||
if ( proj )
|
||||
{
|
||||
std::vector<RimCase*> cases;
|
||||
proj->allCases( cases );
|
||||
|
||||
std::vector<RimCase*> cases = proj->allGridCases();
|
||||
for ( RimCase* c : cases )
|
||||
{
|
||||
options->push_back( caf::PdmOptionItemInfo( c->caseUserDescription(), c, false, c->uiIconProvider() ) );
|
||||
@ -344,9 +342,7 @@ void RimTools::eclipseCaseOptionItems( QList<caf::PdmOptionItemInfo>* options )
|
||||
RimProject* proj = RimProject::current();
|
||||
if ( proj )
|
||||
{
|
||||
std::vector<RimCase*> cases;
|
||||
proj->allCases( cases );
|
||||
|
||||
std::vector<RimCase*> cases = proj->allGridCases();
|
||||
for ( RimCase* c : cases )
|
||||
{
|
||||
RimEclipseCase* eclipseCase = dynamic_cast<RimEclipseCase*>( c );
|
||||
@ -368,9 +364,7 @@ void RimTools::geoMechCaseOptionItems( QList<caf::PdmOptionItemInfo>* options )
|
||||
RimProject* proj = RimProject::current();
|
||||
if ( proj )
|
||||
{
|
||||
std::vector<RimCase*> cases;
|
||||
proj->allCases( cases );
|
||||
|
||||
std::vector<RimCase*> cases = proj->allGridCases();
|
||||
for ( RimCase* c : cases )
|
||||
{
|
||||
RimGeoMechCase* geoMechCase = dynamic_cast<RimGeoMechCase*>( c );
|
||||
|
@ -116,9 +116,8 @@ RimEclipseCase* RimGridSummaryCase_obsolete::associatedEclipseCase()
|
||||
{
|
||||
// Find a possible associated eclipse case
|
||||
|
||||
RimProject* project = RimProject::current();
|
||||
std::vector<RimCase*> allCases;
|
||||
project->allCases( allCases );
|
||||
RimProject* project = RimProject::current();
|
||||
std::vector<RimCase*> allCases = project->allGridCases();
|
||||
for ( RimCase* someCase : allCases )
|
||||
{
|
||||
auto eclCase = dynamic_cast<RimEclipseCase*>( someCase );
|
||||
|
@ -250,9 +250,8 @@ void RimSurface::defineEditorAttribute( const caf::PdmFieldHandle* field, QStrin
|
||||
{
|
||||
if ( field == &m_depthOffset )
|
||||
{
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
std::vector<RimCase*> cases;
|
||||
app->project()->allCases( cases );
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
std::vector<RimCase*> cases = app->project()->allGridCases();
|
||||
|
||||
cvf::BoundingBox bb;
|
||||
|
||||
|
@ -235,7 +235,7 @@ public:
|
||||
std::vector<RimCase*> cases;
|
||||
if ( argCaseGroupId == -1 )
|
||||
{
|
||||
proj->allCases( cases );
|
||||
cases = proj->allGridCases();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -160,9 +160,7 @@ RimEclipseCase* RiaSocketServer::findReservoir( int caseId )
|
||||
RimProject* project = RimProject::current();
|
||||
if ( !project ) return nullptr;
|
||||
|
||||
std::vector<RimCase*> cases;
|
||||
project->allCases( cases );
|
||||
|
||||
std::vector<RimCase*> cases = project->allGridCases();
|
||||
for ( size_t i = 0; i < cases.size(); i++ )
|
||||
{
|
||||
if ( cases[i]->caseId() == currCaseId )
|
||||
|
@ -210,9 +210,7 @@ void RiuMainWindowTools::setFixedWindowSizeFor3dViews( RiuMainWindowBase* mainWi
|
||||
RimProject* proj = RimProject::current();
|
||||
if ( !proj ) return;
|
||||
|
||||
std::vector<RimCase*> projectCases;
|
||||
proj->allCases( projectCases );
|
||||
|
||||
std::vector<RimCase*> projectCases = proj->allGridCases();
|
||||
for ( RimCase* cas : projectCases )
|
||||
{
|
||||
if ( !cas ) continue;
|
||||
|
@ -111,9 +111,7 @@ grpc::Status RiaGrpcProjectService::GetAllCases( grpc::ServerContext* context,
|
||||
const rips::Empty* request,
|
||||
rips::CaseInfoArray* reply )
|
||||
{
|
||||
std::vector<RimCase*> cases;
|
||||
RimProject::current()->allCases( cases );
|
||||
|
||||
std::vector<RimCase*> cases = RimProject::current()->allGridCases();
|
||||
if ( cases.empty() )
|
||||
{
|
||||
return Status( grpc::NOT_FOUND, "No cases found" );
|
||||
|
@ -44,9 +44,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimCase* RiaGrpcServiceInterface::findCase( int caseId )
|
||||
{
|
||||
std::vector<RimCase*> cases;
|
||||
RimProject::current()->allCases( cases );
|
||||
|
||||
std::vector<RimCase*> cases = RimProject::current()->allGridCases();
|
||||
for ( RimCase* rimCase : cases )
|
||||
{
|
||||
if ( caseId == rimCase->caseId() )
|
||||
|
Loading…
Reference in New Issue
Block a user