mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Merge pull request #5439 from OPM/nnc-improvements
Improve NNC results for complete NNC geometry
This commit is contained in:
@@ -2348,12 +2348,13 @@ double riMult( double transResults, double riTransResults )
|
||||
{
|
||||
if ( transResults == HUGE_VAL || riTransResults == HUGE_VAL ) return HUGE_VAL;
|
||||
|
||||
// To make 0.0 values give 1.0 in mult value
|
||||
if ( cvf::Math::abs( riTransResults ) < 1e-12 )
|
||||
const double epsilon = 1e-9;
|
||||
|
||||
if ( cvf::Math::abs( riTransResults ) < epsilon )
|
||||
{
|
||||
if ( cvf::Math::abs( transResults ) < 1e-12 )
|
||||
if ( cvf::Math::abs( transResults ) < epsilon )
|
||||
{
|
||||
return 1.0;
|
||||
return 0.0;
|
||||
}
|
||||
|
||||
return HUGE_VAL;
|
||||
|
||||
@@ -83,7 +83,21 @@ void RigNNCData::computeCompleteSetOfNncs( const RigMainGrid* mainGrid )
|
||||
|
||||
std::vector<RigConnection> otherConnections = RigCellFaceGeometryTools::computeOtherNncs( mainGrid, m_connections );
|
||||
|
||||
m_connections.insert( m_connections.end(), otherConnections.begin(), otherConnections.end() );
|
||||
if ( !otherConnections.empty() )
|
||||
{
|
||||
m_connections.insert( m_connections.end(), otherConnections.begin(), otherConnections.end() );
|
||||
|
||||
// Transmissibility values from Eclipse has been read into propertyNameCombTrans in
|
||||
// RifReaderEclipseOutput::transferStaticNNCData(). Initialize computed NNCs with zero transmissibility
|
||||
auto it = m_connectionResults.find( RiaDefines::propertyNameCombTrans() );
|
||||
if ( it != m_connectionResults.end() )
|
||||
{
|
||||
if ( !it->second.empty() )
|
||||
{
|
||||
it->second[0].resize( m_connections.size(), 0.0 );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user