mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-14 17:32:13 -05: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:
1 parent
19dc7493a8
commit
8ad2ffa471
5 files changed
+58
-25
No files matched your search
@@ -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