#5273 Allen Diagrams: Compute complete set of NNCs

Add class RigNncConnection
Implement algorithm to compute the complete set of Nncs
This commit is contained in:
Magne Sjaastad
2020-01-15 08:45:40 +01:00
parent 360893817e
commit fa791d0568
9 changed files with 352 additions and 32 deletions

View File

@@ -57,14 +57,10 @@ void RigNNCData::processConnections( const RigMainGrid& mainGrid )
// Found an overlap polygon. Store data about connection
m_connections[cnIdx].m_c1Face = connectionFace;
for ( size_t pIdx = 0; pIdx < connectionPolygon.size(); ++pIdx )
{
if ( connectionPolygon[pIdx] < mainGrid.nodes().size() )
m_connections[cnIdx].m_polygon.push_back( mainGrid.nodes()[connectionPolygon[pIdx]] );
else
m_connections[cnIdx].m_polygon.push_back(
connectionIntersections[connectionPolygon[pIdx] - mainGrid.nodes().size()] );
}
m_connections[cnIdx].m_polygon = RigCellFaceGeometryTools::extractPolygon( mainGrid.nodes(),
connectionPolygon,
connectionIntersections );
// Add to search map, possibly not needed
// m_cellIdxToFaceToConnectionIdxMap[m_connections[cnIdx].m_c1GlobIdx][connectionFace].push_back(cnIdx);
@@ -78,6 +74,18 @@ void RigNNCData::processConnections( const RigMainGrid& mainGrid )
}
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigNNCData::computeNncsFromFaults( const RigMainGrid* mainGrid )
{
m_nativeConnectionCount = m_connections.size();
std::vector<RigConnection> otherConnections = RigCellFaceGeometryTools::computeOtherNncs( mainGrid, m_connections );
m_connections.insert( m_connections.end(), otherConnections.begin(), otherConnections.end() );
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------