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 } );
|
||||||
RigCompletionData::PERFORATION_ICV,
|
generateWelsegsSegments( formatter, exportInfo, { RigCompletionData::FRACTURE } );
|
||||||
RigCompletionData::PERFORATION_AICD} );
|
generateWelsegsSegments( formatter,
|
||||||
|
exportInfo,
|
||||||
|
{ RigCompletionData::PERFORATION_ICD,
|
||||||
|
RigCompletionData::PERFORATION_ICV,
|
||||||
|
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,15 +615,15 @@ 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" ),
|
||||||
RifTextDataTableColumn( "Start Length" ),
|
RifTextDataTableColumn( "Start Length" ),
|
||||||
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,27 +711,27 @@ 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",
|
||||||
"Length of AICD",
|
"Length of AICD",
|
||||||
"Density of Calibration Fluid",
|
"Density of Calibration Fluid",
|
||||||
"Viscosity of Calibration Fluid",
|
"Viscosity of Calibration Fluid",
|
||||||
"Critical water in liquid fraction for emulsions viscosity model",
|
"Critical water in liquid fraction for emulsions viscosity model",
|
||||||
"Emulsion viscosity transition region",
|
"Emulsion viscosity transition region",
|
||||||
"Max ratio of emulsion viscosity to continuous phase viscosity",
|
"Max ratio of emulsion viscosity to continuous phase viscosity",
|
||||||
"Flow scaling factor method",
|
"Flow scaling factor method",
|
||||||
"Maximum flowrate for AICD device",
|
"Maximum flowrate for AICD device",
|
||||||
"Volume flow rate exponent, x",
|
"Volume flow rate exponent, x",
|
||||||
"Viscosity function exponent, y",
|
"Viscosity function exponent, y",
|
||||||
"Device OPEN/SHUT",
|
"Device OPEN/SHUT",
|
||||||
"Exponent of the oil flowing fraction in the density mixture calculation",
|
"Exponent of the oil flowing fraction in the density mixture calculation",
|
||||||
"Exponent of the water flowing fraction in the density mixture calculation",
|
"Exponent of the water flowing fraction in the density mixture calculation",
|
||||||
"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,10 +1747,7 @@ 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 );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user