mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#8371 Make sure all NNC faces are created and assigned
Make sure that the first cell in RigConnection is assigned the lowest cell index. Assign the opposite face if the cell indexes are swapped. In RigCellFaceGeometryTools, test both combinations of (cellA, cellB) and (cellB, cellA)
This commit is contained in:
@@ -304,8 +304,18 @@ void RigCellFaceGeometryTools::extractConnectionsForFace( const RigFault::FaultF
|
||||
}
|
||||
}
|
||||
|
||||
std::pair<unsigned, unsigned> candidate( static_cast<unsigned>( sourceReservoirCellIndex ),
|
||||
static_cast<unsigned>( candidateCellIndex ) );
|
||||
// Test if this pair of cells already has a connection. Check both combinations of cell index ordering to avoid
|
||||
// duplicate NNC geometry for the same pair of cells
|
||||
|
||||
auto candidate = std::make_pair( static_cast<unsigned>( sourceReservoirCellIndex ),
|
||||
static_cast<unsigned>( candidateCellIndex ) );
|
||||
|
||||
if ( nativeCellPairs.count( candidate ) > 0 )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
std::swap( candidate.first, candidate.second );
|
||||
|
||||
if ( nativeCellPairs.count( candidate ) > 0 )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user