mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
NNC: Compute data on demand
This commit is contained in:
parent
9682d126e9
commit
b41df5a62a
@ -386,6 +386,22 @@ QString RiaDefines::formationAllanResultName()
|
|||||||
return "Formation Allan";
|
return "Formation Allan";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
std::set<QString> RiaDefines::nncResultNames()
|
||||||
|
{
|
||||||
|
return {combinedTransmissibilityResultName(),
|
||||||
|
formationAllanResultName(),
|
||||||
|
formationBinaryAllanResultName(),
|
||||||
|
combinedWaterFluxResultName(),
|
||||||
|
combinedGasFluxResultName(),
|
||||||
|
combinedOilFluxResultName(),
|
||||||
|
combinedRiAreaNormTranResultName(),
|
||||||
|
combinedRiMultResultName(),
|
||||||
|
combinedRiTranResultName()};
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -21,6 +21,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
#include <set>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace RiaDefines
|
namespace RiaDefines
|
||||||
@ -106,8 +107,9 @@ QString mobilePoreVolumeName();
|
|||||||
QString completionTypeResultName();
|
QString completionTypeResultName();
|
||||||
|
|
||||||
// Fault results
|
// Fault results
|
||||||
QString formationBinaryAllanResultName();
|
QString formationBinaryAllanResultName();
|
||||||
QString formationAllanResultName();
|
QString formationAllanResultName();
|
||||||
|
std::set<QString> nncResultNames();
|
||||||
|
|
||||||
// Mock model text identifiers
|
// Mock model text identifiers
|
||||||
QString mockModelBasic();
|
QString mockModelBasic();
|
||||||
|
@ -124,16 +124,7 @@ void RicCreateTemporaryLgrFeature::updateViews( RimEclipseCase* eclipseCase )
|
|||||||
|
|
||||||
RiaApplication::instance()->project()->mainPlotCollection()->wellLogPlotCollection()->reloadAllPlots();
|
RiaApplication::instance()->project()->mainPlotCollection()->wellLogPlotCollection()->reloadAllPlots();
|
||||||
|
|
||||||
for ( const auto& v : eclipseCase->views() )
|
eclipseCase->createDisplayModelAndUpdateAllViews();
|
||||||
{
|
|
||||||
RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>( v );
|
|
||||||
if ( eclipseView )
|
|
||||||
{
|
|
||||||
eclipseView->scheduleReservoirGridGeometryRegen();
|
|
||||||
}
|
|
||||||
|
|
||||||
v->loadDataAndUpdate();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -707,6 +707,38 @@ void RimEclipseCase::ensureFaultDataIsComputed()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
bool RimEclipseCase::ensureNncDataIsComputed()
|
||||||
|
{
|
||||||
|
bool computedData = false;
|
||||||
|
RigEclipseCaseData* rigEclipseCase = eclipseCaseData();
|
||||||
|
if ( rigEclipseCase && rigEclipseCase->mainGrid() )
|
||||||
|
{
|
||||||
|
computedData = rigEclipseCase->mainGrid()->nncData()->ensureConnectionDataIsProcecced();
|
||||||
|
}
|
||||||
|
|
||||||
|
return computedData;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimEclipseCase::createDisplayModelAndUpdateAllViews()
|
||||||
|
{
|
||||||
|
for ( const auto& v : views() )
|
||||||
|
{
|
||||||
|
RimEclipseView* eclipseView = dynamic_cast<RimEclipseView*>( v );
|
||||||
|
if ( eclipseView )
|
||||||
|
{
|
||||||
|
eclipseView->scheduleReservoirGridGeometryRegen();
|
||||||
|
}
|
||||||
|
|
||||||
|
v->loadDataAndUpdate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -116,6 +116,8 @@ public:
|
|||||||
void loadAndSyncronizeInputProperties( bool includeGridFileName );
|
void loadAndSyncronizeInputProperties( bool includeGridFileName );
|
||||||
|
|
||||||
void ensureFaultDataIsComputed();
|
void ensureFaultDataIsComputed();
|
||||||
|
bool ensureNncDataIsComputed();
|
||||||
|
void createDisplayModelAndUpdateAllViews();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void initAfterRead() override;
|
void initAfterRead() override;
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include "RiaApplication.h"
|
#include "RiaApplication.h"
|
||||||
#include "RiaColorTables.h"
|
#include "RiaColorTables.h"
|
||||||
#include "RiaLogging.h"
|
#include "RiaLogging.h"
|
||||||
|
#include "RiaNncDefines.h"
|
||||||
#include "RiaQDateTimeTools.h"
|
#include "RiaQDateTimeTools.h"
|
||||||
|
|
||||||
#include "RicfCommandObject.h"
|
#include "RicfCommandObject.h"
|
||||||
@ -1141,6 +1142,19 @@ void RimEclipseResultDefinition::loadResult()
|
|||||||
gridCellResults->createResultEntry( this->eclipseResultAddress(), false );
|
gridCellResults->createResultEntry( this->eclipseResultAddress(), false );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString resultName = m_resultVariable();
|
||||||
|
std::set<QString> eclipseResultNamesWithNncData = RiaDefines::nncResultNames();
|
||||||
|
if ( eclipseResultNamesWithNncData.find( resultName ) != eclipseResultNamesWithNncData.end() )
|
||||||
|
{
|
||||||
|
eclipseCase()->ensureFaultDataIsComputed();
|
||||||
|
|
||||||
|
bool dataWasComputed = eclipseCase()->ensureNncDataIsComputed();
|
||||||
|
if ( dataWasComputed )
|
||||||
|
{
|
||||||
|
eclipseCase()->createDisplayModelAndUpdateAllViews();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
gridCellResults->ensureKnownResultLoaded( this->eclipseResultAddress() );
|
gridCellResults->ensureKnownResultLoaded( this->eclipseResultAddress() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -186,9 +186,9 @@ size_t RigNNCData::connectionsWithNoCommonArea( QStringList& connectionTextFirst
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RigNNCData::ensureConnectionDataIsProcecced()
|
bool RigNNCData::ensureConnectionDataIsProcecced()
|
||||||
{
|
{
|
||||||
if ( m_connectionsAreProcessed ) return;
|
if ( m_connectionsAreProcessed ) return false;
|
||||||
|
|
||||||
if ( m_mainGrid )
|
if ( m_mainGrid )
|
||||||
{
|
{
|
||||||
@ -228,6 +228,8 @@ void RigNNCData::ensureConnectionDataIsProcecced()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -50,7 +50,7 @@ public:
|
|||||||
|
|
||||||
RigNNCData();
|
RigNNCData();
|
||||||
|
|
||||||
void ensureConnectionDataIsProcecced();
|
bool ensureConnectionDataIsProcecced();
|
||||||
void setSourceDataForProcessing( RigMainGrid* mainGrid,
|
void setSourceDataForProcessing( RigMainGrid* mainGrid,
|
||||||
const RigActiveCellInfo* activeCellInfo,
|
const RigActiveCellInfo* activeCellInfo,
|
||||||
bool includeInactiveCells );
|
bool includeInactiveCells );
|
||||||
|
Loading…
Reference in New Issue
Block a user