mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-10 15:36:09 -06:00
#3531 Temporary LGR : Reorganize clearing of cache data
This commit is contained in:
parent
145323d8b1
commit
e33bfc895f
@ -142,11 +142,8 @@ void RicCreateTemporaryLgrFeature::onActionTriggered(bool isChecked)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
eclipseCase->results(RiaDefines::MATRIX_MODEL)->freeAllocatedResultsData();
|
deleteAllCachedData(eclipseCase);
|
||||||
eclipseCase->results(RiaDefines::FRACTURE_MODEL)->freeAllocatedResultsData();
|
|
||||||
|
|
||||||
eclipseCase->eclipseCaseData()->clearWellCellsInGridCache();
|
|
||||||
eclipseCase->eclipseCaseData()->mainGrid()->computeCachedData();
|
|
||||||
activeView->loadDataAndUpdate();
|
activeView->loadDataAndUpdate();
|
||||||
|
|
||||||
if (intersectsExistingLgr)
|
if (intersectsExistingLgr)
|
||||||
@ -254,6 +251,45 @@ void RicCreateTemporaryLgrFeature::createLgr(LgrInfo& lgrInfo, RigMainGrid* main
|
|||||||
localGrid->setParentGrid(mainGrid);
|
localGrid->setParentGrid(mainGrid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RicCreateTemporaryLgrFeature::deleteAllCachedData(RimEclipseCase* eclipseCase)
|
||||||
|
{
|
||||||
|
if (eclipseCase)
|
||||||
|
{
|
||||||
|
RigCaseCellResultsData* cellResultsDataMatrix = eclipseCase->results(RiaDefines::MATRIX_MODEL);
|
||||||
|
if (cellResultsDataMatrix)
|
||||||
|
{
|
||||||
|
cellResultsDataMatrix->freeAllocatedResultsData();
|
||||||
|
}
|
||||||
|
|
||||||
|
RigCaseCellResultsData* cellResultsDataFracture = eclipseCase->results(RiaDefines::FRACTURE_MODEL);
|
||||||
|
if (cellResultsDataFracture)
|
||||||
|
{
|
||||||
|
cellResultsDataFracture->freeAllocatedResultsData();
|
||||||
|
}
|
||||||
|
|
||||||
|
RigEclipseCaseData* eclipseCaseData = eclipseCase->eclipseCaseData();
|
||||||
|
if (eclipseCaseData)
|
||||||
|
{
|
||||||
|
eclipseCaseData->clearWellCellsInGridCache();
|
||||||
|
eclipseCaseData->mainGrid()->computeCachedData();
|
||||||
|
eclipseCaseData->computeActiveCellBoundingBoxes();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cellResultsDataMatrix)
|
||||||
|
{
|
||||||
|
cellResultsDataMatrix->computeDepthRelatedResults();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cellResultsDataFracture)
|
||||||
|
{
|
||||||
|
cellResultsDataFracture->computeDepthRelatedResults();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -48,6 +48,7 @@ protected:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
static void createLgr(LgrInfo& lgrInfo, RigMainGrid* mainGrid);
|
static void createLgr(LgrInfo& lgrInfo, RigMainGrid* mainGrid);
|
||||||
|
static void deleteAllCachedData(RimEclipseCase* eclipseCase);
|
||||||
|
|
||||||
static std::vector<RimWellPath*> selectedWellPaths();
|
static std::vector<RimWellPath*> selectedWellPaths();
|
||||||
static bool containsAnyNonMainGridCells(const std::vector<RigCompletionDataGridCell>& cells);
|
static bool containsAnyNonMainGridCells(const std::vector<RigCompletionDataGridCell>& cells);
|
||||||
|
Loading…
Reference in New Issue
Block a user