From 51b72ce7be7af3caef481f69409253649201d515 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Wed, 10 Mar 2021 08:06:26 +0100 Subject: [PATCH] WELSEGS Export : Avoid duplicate perforation segments in WELSEGS table --- .../RicWellPathExportMswCompletionsImpl.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportMswCompletionsImpl.cpp b/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportMswCompletionsImpl.cpp index 8217277598..e41ea632d9 100644 --- a/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportMswCompletionsImpl.cpp +++ b/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportMswCompletionsImpl.cpp @@ -395,6 +395,11 @@ void RicWellPathExportMswCompletionsImpl::writeWelsegsSegmentsRecursively( RifTe for ( auto& completion : segment->completions() ) { + // For a well with perforation intervals, the WELSEGS segments are reported twice if if we include the + // RicMswPerforation completions. Investigate when this class is intended to be exported to file + auto performationMsw = dynamic_cast( completion ); + if ( performationMsw ) continue; + auto segmentValve = dynamic_cast( completion ); if ( segmentValve != nullptr ) {