mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5913 Import NNC : Do not compute NNCs if importNNCs is disabled in preferences
This commit is contained in:
parent
87f1535888
commit
2bc9cb37c0
@ -608,8 +608,12 @@ void RimEclipseCase::computeCachedData()
|
||||
|
||||
{
|
||||
auto task = pInf.task( "Calculating faults", 17 );
|
||||
rigEclipseCase->mainGrid()->calculateFaults(
|
||||
rigEclipseCase->activeCellInfo( RiaDefines::PorosityModelType::MATRIX_MODEL ) );
|
||||
|
||||
bool computeNncs = RiaApplication::instance()->preferences()->readerSettings()->importNNCs();
|
||||
|
||||
rigEclipseCase->mainGrid()->calculateFaults( rigEclipseCase->activeCellInfo(
|
||||
RiaDefines::PorosityModelType::MATRIX_MODEL ),
|
||||
computeNncs );
|
||||
}
|
||||
|
||||
{
|
||||
|
@ -20,6 +20,11 @@
|
||||
|
||||
#include "RimEclipseCaseCollection.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaPreferences.h"
|
||||
|
||||
#include "RifReaderSettings.h"
|
||||
|
||||
#include "RigEclipseCaseData.h"
|
||||
#include "RigGridManager.h"
|
||||
#include "RigMainGrid.h"
|
||||
@ -127,8 +132,11 @@ RigMainGrid* RimEclipseCaseCollection::registerCaseInGridCollection( RigEclipseC
|
||||
// This is the first insertion of this grid, compute cached data
|
||||
rigEclipseCase->mainGrid()->computeCachedData();
|
||||
|
||||
rigEclipseCase->mainGrid()->calculateFaults(
|
||||
rigEclipseCase->activeCellInfo( RiaDefines::PorosityModelType::MATRIX_MODEL ) );
|
||||
bool computeNncs = RiaApplication::instance()->preferences()->readerSettings()->importNNCs();
|
||||
|
||||
rigEclipseCase->mainGrid()->calculateFaults( rigEclipseCase->activeCellInfo(
|
||||
RiaDefines::PorosityModelType::MATRIX_MODEL ),
|
||||
computeNncs );
|
||||
|
||||
equalGrid = rigEclipseCase->mainGrid();
|
||||
}
|
||||
|
@ -3091,6 +3091,13 @@ void RigCaseCellResultsData::computeAllanResults( RigCaseCellResultsData* cellRe
|
||||
if ( cellResultsData && cellResultsData->activeFormationNames() &&
|
||||
!cellResultsData->activeFormationNames()->formationNames().empty() )
|
||||
{
|
||||
// If import of NNC is disabled in preferences, we must make ensure that computed NNC connections are in place
|
||||
if ( mainGrid->nncData()->nativeConnectionCount() == mainGrid->nncData()->connections().size() )
|
||||
{
|
||||
mainGrid->nncData()->computeCompleteSetOfNncs( mainGrid, cellResultsData->activeCellInfo() );
|
||||
mainGrid->distributeNNCsToFaults();
|
||||
}
|
||||
|
||||
auto fnNamesResAddr = RigEclipseResultAddress( RiaDefines::ResultCatType::FORMATION_NAMES,
|
||||
RiaDefines::activeFormationNamesResultName() );
|
||||
auto fnAllanResultResAddr =
|
||||
|
@ -413,7 +413,7 @@ bool RigMainGrid::hasFaultWithName( const QString& name ) const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigMainGrid::calculateFaults( const RigActiveCellInfo* activeCellInfo )
|
||||
void RigMainGrid::calculateFaults( const RigActiveCellInfo* activeCellInfo, bool computeNncs )
|
||||
{
|
||||
if ( hasFaultWithName( RiaDefines::undefinedGridFaultName() ) &&
|
||||
hasFaultWithName( RiaDefines::undefinedGridFaultWithInactiveName() ) )
|
||||
@ -556,7 +556,10 @@ void RigMainGrid::calculateFaults( const RigActiveCellInfo* activeCellInfo )
|
||||
}
|
||||
}
|
||||
|
||||
this->nncData()->computeCompleteSetOfNncs( this, activeCellInfo );
|
||||
if ( computeNncs )
|
||||
{
|
||||
this->nncData()->computeCompleteSetOfNncs( this, activeCellInfo );
|
||||
}
|
||||
|
||||
distributeNNCsToFaults();
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ public:
|
||||
void setFaults( const cvf::Collection<RigFault>& faults );
|
||||
const cvf::Collection<RigFault>& faults() const;
|
||||
cvf::Collection<RigFault>& faults();
|
||||
void calculateFaults( const RigActiveCellInfo* activeCellInfo );
|
||||
void calculateFaults( const RigActiveCellInfo* activeCellInfo, bool computeNncs );
|
||||
|
||||
void distributeNNCsToFaults();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user