Export LGR completions in single COMPDATL, WPIMULTL and COMPLMPL tables

Add test for a well path entering an LGR twice.
This commit is contained in:
Magne Sjaastad committed 2026-10-15 11:56:10 +02:00
1 parent da4e6e15cd
commit 5503060d2b
3 files changed
+80 -4

No files matched your search

@@ -872,7 +872,15 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompdatAndWpimultTables(
formatter.setColumnSpacing( 3 );
formatter.setOptionalComment( exportDataSourceAsComment );
for ( const auto& gridCompletions : completionsPerGrid )
// All LGRs share one set of tables (COMPDATL, WPIMULTL, COMPLMPL) where each row carries its own LGR name
std::map<QString, std::vector<RigCompletionData>> completionsPerTable;
for ( const auto& [gridName, gridCompletions] : completionsPerGrid )
{
auto& tableCompletions = completionsPerTable[gridName.isEmpty() ? QString() : QString( "LGR" )];
tableCompletions.insert( tableCompletions.end(), gridCompletions.begin(), gridCompletions.end() );
}
for ( const auto& gridCompletions : completionsPerTable )
{
std::vector<RigCompletionData> completions = gridCompletions.second;
@@ -983,7 +991,7 @@ void RicWellPathExportCompletionDataFeatureImpl::exportCompdatTableUsingFormatte
if ( !gridName.isEmpty() )
{
formatter.add( gridName );
formatter.add( data.completionDataGridCell().lgrName() );
}
formatter.add( data.completionDataGridCell().localCellIndexI() + 1 )
@@ -1064,7 +1072,7 @@ void RicWellPathExportCompletionDataFeatureImpl::exportComplumpTableUsingFormatt
if ( !gridName.isEmpty() )
{
formatter.add( gridName );
formatter.add( data.completionDataGridCell().lgrName() );
}
formatter.add( data.completionDataGridCell().localCellIndexI() + 1 )
@@ -1123,7 +1131,7 @@ void RicWellPathExportCompletionDataFeatureImpl::exportWpimultTableUsingFormatte
if ( !gridName.isEmpty() )
{
formatter.add( gridName );
formatter.add( completion.completionDataGridCell().lgrName() );
}
formatter.add( completion.wpimult() );