mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#8403 Ensure the NNC connection polygon is created before computing area
This commit is contained in:
parent
e09a839228
commit
87780b2b8a
@ -164,6 +164,8 @@ void RivElementVectorResultPartMgr::appendDynamicGeometryPartsToModel( cvf::Mode
|
|||||||
faceNormal = ( faceCenter - cellCenter ).getNormalized() * arrowScaling;
|
faceNormal = ( faceCenter - cellCenter ).getNormalized() * arrowScaling;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if ( !resultAddresses.empty() && !directions.empty() )
|
||||||
|
{
|
||||||
#pragma omp parallel for
|
#pragma omp parallel for
|
||||||
for ( int gcIdx = 0; gcIdx < static_cast<int>( cells.size() ); ++gcIdx )
|
for ( int gcIdx = 0; gcIdx < static_cast<int>( cells.size() ); ++gcIdx )
|
||||||
{
|
{
|
||||||
@ -230,6 +232,7 @@ void RivElementVectorResultPartMgr::appendDynamicGeometryPartsToModel( cvf::Mode
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( result->showNncData() )
|
if ( result->showNncData() )
|
||||||
{
|
{
|
||||||
|
@ -645,12 +645,14 @@ bool RigNNCData::generateScalarValues( const RigEclipseResultAddress& resVarAddr
|
|||||||
auto it = m_connectionResults.find( nameit->second );
|
auto it = m_connectionResults.find( nameit->second );
|
||||||
if ( it == m_connectionResults.end() ) return false;
|
if ( it == m_connectionResults.end() ) return false;
|
||||||
|
|
||||||
auto& srcdata = it->second;
|
// Connection polygons are used to compute the center for the NNC flow vectors
|
||||||
|
// If connection polygons are present, this is a no-op
|
||||||
|
buildPolygonsForEclipseConnections();
|
||||||
|
|
||||||
|
auto& srcdata = it->second;
|
||||||
auto& dstdata = makeDynamicConnectionScalarResult( resVarAddr.resultName(), srcdata.size() );
|
auto& dstdata = makeDynamicConnectionScalarResult( resVarAddr.resultName(), srcdata.size() );
|
||||||
|
|
||||||
const double epsilon = 1.0e-3;
|
const double epsilon = 1.0e-3;
|
||||||
|
|
||||||
std::vector<double> areas( m_connections.size() );
|
std::vector<double> areas( m_connections.size() );
|
||||||
|
|
||||||
for ( size_t dataIdx = 0; dataIdx < m_connections.size(); dataIdx++ )
|
for ( size_t dataIdx = 0; dataIdx < m_connections.size(); dataIdx++ )
|
||||||
|
Loading…
Reference in New Issue
Block a user