mirror of
https://github.com/OPM/ResInsight.git
synced 2026-08-27 05:37:21 -05:00
#12295 Guard display of debug messages using keywords in Preferences
This commit is contained in:
@@ -16,10 +16,11 @@
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RiaLogging.h"
|
||||
|
||||
#include "RigCellFaceGeometryTools.h"
|
||||
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaPreferencesSystem.h"
|
||||
|
||||
#include "RigActiveCellInfo.h"
|
||||
#include "RigCell.h"
|
||||
#include "RigMainGrid.h"
|
||||
@@ -63,7 +64,7 @@ cvf::StructGridInterface::FaceType RigCellFaceGeometryTools::calculateCellFaceOv
|
||||
isPossibleNeighborInDirection[cvf::StructGridInterface::POS_J] + isPossibleNeighborInDirection[cvf::StructGridInterface::NEG_J] +
|
||||
isPossibleNeighborInDirection[cvf::StructGridInterface::POS_K] + isPossibleNeighborInDirection[cvf::StructGridInterface::NEG_K];
|
||||
|
||||
// If cell 2 is not adjancent with respect to any of the six ijk directions,
|
||||
// If cell 2 is not adjacent with respect to any of the six ijk directions,
|
||||
// assume that we have no overlapping area.
|
||||
|
||||
if ( !hasNeighbourInAnyDirection )
|
||||
@@ -133,6 +134,8 @@ RigConnectionContainer RigCellFaceGeometryTools::computeOtherNncs( const RigMain
|
||||
// by Eclipse. Use faults as basis for subset of cells to find NNC connection for. The imported connections from
|
||||
// Eclipse are located at the beginning of the connections vector.
|
||||
|
||||
const bool isLoggingEnabled = RiaPreferencesSystem::current()->isLoggingActivatedForKeyword( "RigCellFaceGeometryTools" );
|
||||
|
||||
std::set<std::pair<unsigned, unsigned>> nativeCellPairs;
|
||||
|
||||
for ( size_t i = 0; i < nativeConnections.size(); ++i )
|
||||
@@ -146,7 +149,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() );
|
||||
RiaLogging::warning( message );
|
||||
if ( isLoggingEnabled ) RiaLogging::warning( message );
|
||||
}
|
||||
|
||||
const cvf::Collection<RigFault>& faults = mainGrid->faults();
|
||||
@@ -202,7 +205,7 @@ RigConnectionContainer RigCellFaceGeometryTools::computeOtherNncs( const RigMain
|
||||
"inactive cells can be managed from Preferences->Eclipse Grid->Include Inactive Cells" )
|
||||
.arg( otherConnections.size() )
|
||||
.arg( nncCountWarningThreshold );
|
||||
RiaLogging::warning( txt );
|
||||
if ( isLoggingEnabled ) RiaLogging::warning( txt );
|
||||
}
|
||||
|
||||
otherConnections.remove_duplicates();
|
||||
|
||||
Reference in New Issue
Block a user