mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Janitor : Show warning when generated NNCs count is larger than 5M
This commit is contained in:
@@ -16,6 +16,8 @@
|
|||||||
//
|
//
|
||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "RiaLogging.h"
|
||||||
|
|
||||||
#include "RigCellFaceGeometryTools.h"
|
#include "RigCellFaceGeometryTools.h"
|
||||||
|
|
||||||
#include "RigActiveCellInfo.h"
|
#include "RigActiveCellInfo.h"
|
||||||
@@ -27,8 +29,6 @@
|
|||||||
|
|
||||||
#include "cafAssert.h"
|
#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" )
|
QString message = QString( "Nnc connection imported from Eclipse are not unique\nNNC count : %1\nUnique : %2" )
|
||||||
.arg( nativeConnections.size() )
|
.arg( nativeConnections.size() )
|
||||||
.arg( nativeCellPairs.size() );
|
.arg( nativeCellPairs.size() );
|
||||||
qDebug() << message;
|
RiaLogging::warning( message );
|
||||||
}
|
}
|
||||||
|
|
||||||
const cvf::Collection<RigFault>& faults = mainGrid->faults();
|
const cvf::Collection<RigFault>& faults = mainGrid->faults();
|
||||||
@@ -199,6 +199,16 @@ RigConnectionContainer RigCellFaceGeometryTools::computeOtherNncs( const RigMain
|
|||||||
} // end parallel region
|
} // 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();
|
otherConnections.remove_duplicates();
|
||||||
return otherConnections;
|
return otherConnections;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user