Skip to content

Commit

Permalink
Fix fault reactivation grid generation crash
Browse files Browse the repository at this point in the history
  • Loading branch information
jonjenssen committed Feb 2, 2024
1 parent d661ed4 commit 4ce449e
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,8 @@ std::vector<size_t>
if ( intersect1.z() != intersect2.z() )
{
cellColumn.push_back( intersectedCell );
layers[intersect1.z()] = intersect1;
layers[intersect2.z()] = intersect2;
if ( !intersect1.isZero() ) layers[intersect1.z()] = intersect1;
if ( !intersect2.isZero() ) layers[intersect2.z()] = intersect2;
}

if ( kLayer == k )
Expand Down Expand Up @@ -473,6 +473,8 @@ std::pair<size_t, size_t> RigFaultReactivationModelGenerator::findCellWithInters

for ( auto& cell : cellRow )
{
if ( cell.isInvalid() ) continue;

auto corners = cell.faceCorners( face );

cvf::Vec3d intersect;
Expand Down Expand Up @@ -559,7 +561,7 @@ void RigFaultReactivationModelGenerator::generateGeometry( size_t sta
{
bottom_point = extrapolatePoint( ( ++layersBack.begin() )->second, layersBack.begin()->second, m_bufferBelowFault );
}
else if ( m_bufferBelowFault > 0.0 )
else
{
bottom_point = extrapolatePoint( ( ++layersFront.begin() )->second, layersFront.begin()->second, m_bufferBelowFault );
}
Expand All @@ -578,7 +580,7 @@ void RigFaultReactivationModelGenerator::generateGeometry( size_t sta
{
top_point = extrapolatePoint( ( ++layersFront.rbegin() )->second, layersFront.rbegin()->second, m_bufferAboveFault );
}
else if ( m_bufferAboveFault > 0.0 )
else
{
top_point = extrapolatePoint( ( ++layersBack.rbegin() )->second, layersBack.rbegin()->second, m_bufferAboveFault );
}
Expand Down

0 comments on commit 4ce449e

Please sign in to comment.