Janitor : Show warning when generated NNCs count is larger than 5M

This commit is contained in:
Magne Sjaastad 2021-12-17 10:34:08 +01:00
parent 58f5c2e92b
commit d82fa7f72b

View File

@ -16,6 +16,8 @@
//
/////////////////////////////////////////////////////////////////////////////////
#include "RiaLogging.h"
#include "RigCellFaceGeometryTools.h"
#include "RigActiveCellInfo.h"
@ -27,8 +29,6 @@
#include "cafAssert.h"
#include <QDebug>
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
@ -150,7 +150,7 @@ RigConnectionContainer RigCellFaceGeometryTools::computeOtherNncs( const RigMain
QString message = QString( "Nnc connection imported from Eclipse are not unique\nNNC count : %1\nUnique : %2" )
.arg( nativeConnections.size() )
.arg( nativeCellPairs.size() );
qDebug() << message;
RiaLogging::warning( message );
}
const cvf::Collection<RigFault>& faults = mainGrid->faults();
@ -199,6 +199,16 @@ RigConnectionContainer RigCellFaceGeometryTools::computeOtherNncs( const RigMain
} // end parallel region
}
size_t nncCountWarningThreshold = 5000000;
if ( otherConnections.size() > nncCountWarningThreshold )
{
auto txt = QString( "Additional NNC count has reached %1, and is above the warning threshold of %2. Faults for "
"inactive cells can be managed from Preferences->Eclipse Grid->Include Inactive Cells" )
.arg( otherConnections.size() )
.arg( nncCountWarningThreshold );
RiaLogging::warning( txt );
}
otherConnections.remove_duplicates();
return otherConnections;
}