#6142 MSW valve export : Guard export if two valve intervals overlap

This commit is contained in:
Magne Sjaastad 2020-06-24 15:51:19 +02:00
parent ba6d70eb46
commit 4efce74936

View File

@ -241,6 +241,36 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForPerforations(
return; return;
} }
// Check if there exist overlap between valves in a perforation interval
for ( const auto& perfInterval : perforationIntervals )
{
for ( const auto& valve : perfInterval->valves() )
{
for ( const auto& otherValve : perfInterval->valves() )
{
if ( otherValve != valve )
{
bool hasIntersection =
!( ( valve->endMD() < otherValve->startMD() ) || ( otherValve->endMD() < valve->startMD() ) );
if ( hasIntersection )
{
RiaLogging::error(
QString( "Valve overlap detected for perforation interval : %1" ).arg( perfInterval->name() ) );
RiaLogging::error( "Name of valves" );
RiaLogging::error( valve->name() );
RiaLogging::error( otherValve->name() );
RiaLogging::error( "Failed to export well segments" );
return;
}
}
}
}
}
RicMswExportInfo exportInfo = RicMswExportInfo exportInfo =
generatePerforationsMswExportInfo( eclipseCase, wellPath, timeStep, perforationIntervals ); generatePerforationsMswExportInfo( eclipseCase, wellPath, timeStep, perforationIntervals );