mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Janitor : Remove double if statement with identical test
This commit is contained in:
parent
67e7bb0cf3
commit
f35edc302f
@ -335,13 +335,15 @@ void RicWellPathExportMswCompletionsImpl::generateWelsegsTable( RifTextDataTable
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
generateWelsegsSegments( formatter, exportInfo, {RigCompletionData::FISHBONES_ICD, RigCompletionData::FISHBONES} );
|
|
||||||
generateWelsegsSegments( formatter, exportInfo, {RigCompletionData::FRACTURE} );
|
|
||||||
generateWelsegsSegments( formatter,
|
generateWelsegsSegments( formatter,
|
||||||
exportInfo,
|
exportInfo,
|
||||||
{RigCompletionData::PERFORATION_ICD,
|
{ RigCompletionData::FISHBONES_ICD, RigCompletionData::FISHBONES } );
|
||||||
|
generateWelsegsSegments( formatter, exportInfo, { RigCompletionData::FRACTURE } );
|
||||||
|
generateWelsegsSegments( formatter,
|
||||||
|
exportInfo,
|
||||||
|
{ RigCompletionData::PERFORATION_ICD,
|
||||||
RigCompletionData::PERFORATION_ICV,
|
RigCompletionData::PERFORATION_ICV,
|
||||||
RigCompletionData::PERFORATION_AICD} );
|
RigCompletionData::PERFORATION_AICD } );
|
||||||
}
|
}
|
||||||
|
|
||||||
formatter.tableCompleted();
|
formatter.tableCompleted();
|
||||||
@ -474,8 +476,8 @@ void RicWellPathExportMswCompletionsImpl::generateCompsegTables( RifTextDataTabl
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
{
|
{
|
||||||
std::set<RigCompletionData::CompletionType> fishbonesTypes = {RigCompletionData::FISHBONES_ICD,
|
std::set<RigCompletionData::CompletionType> fishbonesTypes = { RigCompletionData::FISHBONES_ICD,
|
||||||
RigCompletionData::FISHBONES};
|
RigCompletionData::FISHBONES };
|
||||||
generateCompsegTable( formatter, exportInfo, false, fishbonesTypes );
|
generateCompsegTable( formatter, exportInfo, false, fishbonesTypes );
|
||||||
if ( exportInfo.hasSubGridIntersections() )
|
if ( exportInfo.hasSubGridIntersections() )
|
||||||
{
|
{
|
||||||
@ -484,7 +486,7 @@ void RicWellPathExportMswCompletionsImpl::generateCompsegTables( RifTextDataTabl
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
std::set<RigCompletionData::CompletionType> fractureTypes = {RigCompletionData::FRACTURE};
|
std::set<RigCompletionData::CompletionType> fractureTypes = { RigCompletionData::FRACTURE };
|
||||||
generateCompsegTable( formatter, exportInfo, false, fractureTypes );
|
generateCompsegTable( formatter, exportInfo, false, fractureTypes );
|
||||||
if ( exportInfo.hasSubGridIntersections() )
|
if ( exportInfo.hasSubGridIntersections() )
|
||||||
{
|
{
|
||||||
@ -493,10 +495,10 @@ void RicWellPathExportMswCompletionsImpl::generateCompsegTables( RifTextDataTabl
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
std::set<RigCompletionData::CompletionType> perforationTypes = {RigCompletionData::PERFORATION,
|
std::set<RigCompletionData::CompletionType> perforationTypes = { RigCompletionData::PERFORATION,
|
||||||
RigCompletionData::PERFORATION_ICD,
|
RigCompletionData::PERFORATION_ICD,
|
||||||
RigCompletionData::PERFORATION_ICV,
|
RigCompletionData::PERFORATION_ICV,
|
||||||
RigCompletionData::PERFORATION_AICD};
|
RigCompletionData::PERFORATION_AICD };
|
||||||
generateCompsegTable( formatter, exportInfo, false, perforationTypes );
|
generateCompsegTable( formatter, exportInfo, false, perforationTypes );
|
||||||
if ( exportInfo.hasSubGridIntersections() )
|
if ( exportInfo.hasSubGridIntersections() )
|
||||||
{
|
{
|
||||||
@ -600,7 +602,7 @@ void RicWellPathExportMswCompletionsImpl::generateCompsegHeader( RifTextDataTabl
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
std::vector<RifTextDataTableColumn> header = {RifTextDataTableColumn( "Name" )};
|
std::vector<RifTextDataTableColumn> header = { RifTextDataTableColumn( "Name" ) };
|
||||||
formatter.header( header );
|
formatter.header( header );
|
||||||
formatter.add( exportInfo.wellPath()->completions()->wellNameForExport() );
|
formatter.add( exportInfo.wellPath()->completions()->wellNameForExport() );
|
||||||
formatter.rowCompleted();
|
formatter.rowCompleted();
|
||||||
@ -613,7 +615,7 @@ void RicWellPathExportMswCompletionsImpl::generateCompsegHeader( RifTextDataTabl
|
|||||||
allHeaders.push_back( RifTextDataTableColumn( "Grid" ) );
|
allHeaders.push_back( RifTextDataTableColumn( "Grid" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<RifTextDataTableColumn> commonHeaders = {RifTextDataTableColumn( "I" ),
|
std::vector<RifTextDataTableColumn> commonHeaders = { RifTextDataTableColumn( "I" ),
|
||||||
RifTextDataTableColumn( "J" ),
|
RifTextDataTableColumn( "J" ),
|
||||||
RifTextDataTableColumn( "K" ),
|
RifTextDataTableColumn( "K" ),
|
||||||
RifTextDataTableColumn( "Branch no" ),
|
RifTextDataTableColumn( "Branch no" ),
|
||||||
@ -621,7 +623,7 @@ void RicWellPathExportMswCompletionsImpl::generateCompsegHeader( RifTextDataTabl
|
|||||||
RifTextDataTableColumn( "End Length" ),
|
RifTextDataTableColumn( "End Length" ),
|
||||||
RifTextDataTableColumn( "Dir Pen" ),
|
RifTextDataTableColumn( "Dir Pen" ),
|
||||||
RifTextDataTableColumn( "End Range" ),
|
RifTextDataTableColumn( "End Range" ),
|
||||||
RifTextDataTableColumn( "Connection Depth" )};
|
RifTextDataTableColumn( "Connection Depth" ) };
|
||||||
allHeaders.insert( allHeaders.end(), commonHeaders.begin(), commonHeaders.end() );
|
allHeaders.insert( allHeaders.end(), commonHeaders.begin(), commonHeaders.end() );
|
||||||
formatter.header( allHeaders );
|
formatter.header( allHeaders );
|
||||||
}
|
}
|
||||||
@ -709,7 +711,7 @@ void RicWellPathExportMswCompletionsImpl::generateWsegAicdTable( RifTextDataTabl
|
|||||||
if ( !foundValve )
|
if ( !foundValve )
|
||||||
{
|
{
|
||||||
std::vector<QString> columnDescriptions =
|
std::vector<QString> columnDescriptions =
|
||||||
{"Well Name",
|
{ "Well Name",
|
||||||
"Segment Number",
|
"Segment Number",
|
||||||
"Segment Number",
|
"Segment Number",
|
||||||
"Strength of AICD",
|
"Strength of AICD",
|
||||||
@ -729,7 +731,7 @@ void RicWellPathExportMswCompletionsImpl::generateWsegAicdTable( RifTextDataTabl
|
|||||||
"Exponent of the gas flowing fraction in the density mixture calculation",
|
"Exponent of the gas flowing fraction in the density mixture calculation",
|
||||||
"Exponent of the oil flowing fraction in the density viscosity calculation",
|
"Exponent of the oil flowing fraction in the density viscosity calculation",
|
||||||
"Exponent of the water flowing fraction in the density viscosity calculation",
|
"Exponent of the water flowing fraction in the density viscosity calculation",
|
||||||
"Exponent of the gas flowing fraction in the density viscosity calculation"};
|
"Exponent of the gas flowing fraction in the density viscosity calculation" };
|
||||||
|
|
||||||
tighterFormatter.keyword( "WSEGAICD" );
|
tighterFormatter.keyword( "WSEGAICD" );
|
||||||
tighterFormatter.comment( "Column Overview:" );
|
tighterFormatter.comment( "Column Overview:" );
|
||||||
@ -1009,7 +1011,7 @@ RicMswExportInfo RicWellPathExportMswCompletionsImpl::generateFracturesMswExport
|
|||||||
RicExportFractureCompletionsImpl::generateCompdatValues( caseToApply,
|
RicExportFractureCompletionsImpl::generateCompdatValues( caseToApply,
|
||||||
wellPath->completions()->wellNameForExport(),
|
wellPath->completions()->wellNameForExport(),
|
||||||
wellPath->wellPathGeometry(),
|
wellPath->wellPathGeometry(),
|
||||||
{fracture},
|
{ fracture },
|
||||||
nullptr,
|
nullptr,
|
||||||
nullptr );
|
nullptr );
|
||||||
|
|
||||||
@ -1745,13 +1747,10 @@ void RicWellPathExportMswCompletionsImpl::assignBranchAndSegmentNumbers( const R
|
|||||||
if ( completion->completionType() == RigCompletionData::FISHBONES_ICD )
|
if ( completion->completionType() == RigCompletionData::FISHBONES_ICD )
|
||||||
{
|
{
|
||||||
++segmentNumber; // Skip a segment number because we need one for the ICD
|
++segmentNumber; // Skip a segment number because we need one for the ICD
|
||||||
if ( completion->completionType() == RigCompletionData::FISHBONES_ICD )
|
|
||||||
{
|
|
||||||
completion->setBranchNumber( ++branchNumber );
|
completion->setBranchNumber( ++branchNumber );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Then assign branch and segment numbers to each completion sub segment
|
// Then assign branch and segment numbers to each completion sub segment
|
||||||
for ( auto location : exportInfo->wellSegmentLocations() )
|
for ( auto location : exportInfo->wellSegmentLocations() )
|
||||||
|
Loading…
Reference in New Issue
Block a user