mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#6142 MSW valve export : Guard export if two valve intervals overlap
This commit is contained in:
parent
ba6d70eb46
commit
4efce74936
@ -241,6 +241,36 @@ void RicWellPathExportMswCompletionsImpl::exportWellSegmentsForPerforations(
|
||||
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 =
|
||||
generatePerforationsMswExportInfo( eclipseCase, wellPath, timeStep, perforationIntervals );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user