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:
@@ -203,3 +203,33 @@ void RigFault::accumulateFaultsPrCell( RigFaultsPrCellAccumulator* faultsPrCellA
|
||||
faultIdx );
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RigFaultsPrCellAccumulator::RigFaultsPrCellAccumulator( size_t reservoirCellCount )
|
||||
{
|
||||
std::array<int, 6> initVals = { NO_FAULT, NO_FAULT, NO_FAULT, NO_FAULT, NO_FAULT, NO_FAULT };
|
||||
m_faultIdxForCellFace.resize( reservoirCellCount, initVals );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RigFaultsPrCellAccumulator::faultIdx( size_t reservoirCellIndex, cvf::StructGridInterface::FaceType face ) const
|
||||
{
|
||||
// Ensure no crash after creating temporary LGRs
|
||||
if ( reservoirCellIndex < m_faultIdxForCellFace.size() )
|
||||
{
|
||||
return m_faultIdxForCellFace[reservoirCellIndex][face];
|
||||
}
|
||||
return NO_FAULT;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RigFaultsPrCellAccumulator::setFaultIdx( size_t reservoirCellIndex, cvf::StructGridInterface::FaceType face, int faultIdx )
|
||||
{
|
||||
m_faultIdxForCellFace[reservoirCellIndex][face] = faultIdx;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user