#7678 Fishbones MSW : Make sure COMPSEGS is connected to ICD branch

Always connect open hole flow to an ICD, not the WELSEGS representing a well path lateral.
This commit is contained in:
Magne Sjaastad 2021-05-12 15:57:28 +02:00
parent 9ad8b6ce69
commit 460a387021

View File

@ -537,8 +537,10 @@ void RicWellPathExportMswCompletionsImpl::generateFishbonesMswExportInfo(
for ( size_t intersectionIndex = 0; intersectionIndex < filteredIntersections.size(); intersectionIndex++ )
{
auto cellIntersection = filteredIntersections[intersectionIndex];
if ( fishboneSectionStart <= cellIntersection.startMD && cellIntersection.startMD < fishboneSectionEnd )
const auto& cellIntersection = filteredIntersections[intersectionIndex];
if ( ( fishboneSectionEnd >= cellIntersection.startMD ) &&
( fishboneSectionStart <= cellIntersection.endMD ) )
{
double intersectionMidpoint = 0.5 * ( cellIntersection.startMD + cellIntersection.endMD );
size_t closestSubIndex = 0;