mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Janitor : Use enum class
This commit is contained in:
@@ -179,8 +179,9 @@ std::map<std::string, std::vector<int>> RimFlowDiagSolution::allTracerActiveCell
|
||||
if ( !simWellData[wIdx]->hasWellResult( timeStepIndex ) ) continue;
|
||||
const RigWellResultFrame& wellResFrame = simWellData[wIdx]->wellResultFrame( timeStepIndex );
|
||||
|
||||
bool isInjectorWell = ( wellResFrame.m_productionType != RigWellResultFrame::PRODUCER &&
|
||||
wellResFrame.m_productionType != RigWellResultFrame::UNDEFINED_PRODUCTION_TYPE );
|
||||
bool isInjectorWell =
|
||||
( wellResFrame.m_productionType != RiaDefines::WellProductionType::PRODUCER &&
|
||||
wellResFrame.m_productionType != RiaDefines::WellProductionType::UNDEFINED_PRODUCTION_TYPE );
|
||||
|
||||
std::string wellName = simWellData[wIdx]->m_wellName.toStdString();
|
||||
std::string wellNameXf = addCrossFlowEnding( simWellData[wIdx]->m_wellName ).toStdString();
|
||||
@@ -242,16 +243,16 @@ RimFlowDiagSolution::TracerStatusType RimFlowDiagSolution::tracerStatusOverall(
|
||||
tracerStatus = TracerStatusType::CLOSED;
|
||||
for ( const RigWellResultFrame& wellResFrame : simWellData[wIdx]->m_wellCellsTimeSteps )
|
||||
{
|
||||
if ( wellResFrame.m_productionType == RigWellResultFrame::GAS_INJECTOR ||
|
||||
wellResFrame.m_productionType == RigWellResultFrame::OIL_INJECTOR ||
|
||||
wellResFrame.m_productionType == RigWellResultFrame::WATER_INJECTOR )
|
||||
if ( wellResFrame.m_productionType == RiaDefines::WellProductionType::GAS_INJECTOR ||
|
||||
wellResFrame.m_productionType == RiaDefines::WellProductionType::OIL_INJECTOR ||
|
||||
wellResFrame.m_productionType == RiaDefines::WellProductionType::WATER_INJECTOR )
|
||||
{
|
||||
if ( tracerStatus == TracerStatusType::PRODUCER )
|
||||
tracerStatus = TracerStatusType::VARYING;
|
||||
else
|
||||
tracerStatus = TracerStatusType::INJECTOR;
|
||||
}
|
||||
else if ( wellResFrame.m_productionType == RigWellResultFrame::PRODUCER )
|
||||
else if ( wellResFrame.m_productionType == RiaDefines::WellProductionType::PRODUCER )
|
||||
{
|
||||
if ( tracerStatus == TracerStatusType::INJECTOR )
|
||||
tracerStatus = TracerStatusType::VARYING;
|
||||
@@ -298,16 +299,16 @@ RimFlowDiagSolution::TracerStatusType RimFlowDiagSolution::tracerStatusInTimeSte
|
||||
|
||||
const RigWellResultFrame& wellResFrame = simWellData[wIdx]->wellResultFrame( timeStepIndex );
|
||||
|
||||
if ( wellResFrame.m_productionType == RigWellResultFrame::GAS_INJECTOR ||
|
||||
wellResFrame.m_productionType == RigWellResultFrame::OIL_INJECTOR ||
|
||||
wellResFrame.m_productionType == RigWellResultFrame::WATER_INJECTOR )
|
||||
if ( wellResFrame.m_productionType == RiaDefines::WellProductionType::GAS_INJECTOR ||
|
||||
wellResFrame.m_productionType == RiaDefines::WellProductionType::OIL_INJECTOR ||
|
||||
wellResFrame.m_productionType == RiaDefines::WellProductionType::WATER_INJECTOR )
|
||||
{
|
||||
if ( hasCrossFlowEnding( tracerName ) ) return TracerStatusType::PRODUCER;
|
||||
|
||||
return TracerStatusType::INJECTOR;
|
||||
}
|
||||
else if ( wellResFrame.m_productionType == RigWellResultFrame::PRODUCER ||
|
||||
wellResFrame.m_productionType == RigWellResultFrame::UNDEFINED_PRODUCTION_TYPE )
|
||||
else if ( wellResFrame.m_productionType == RiaDefines::WellProductionType::PRODUCER ||
|
||||
wellResFrame.m_productionType == RiaDefines::WellProductionType::UNDEFINED_PRODUCTION_TYPE )
|
||||
{
|
||||
if ( hasCrossFlowEnding( tracerName ) ) return TracerStatusType::INJECTOR;
|
||||
|
||||
|
||||
@@ -260,9 +260,9 @@ void RimWellAllocationPlot::updateFromWell()
|
||||
|
||||
if ( tracerFractionCellValues.size() )
|
||||
{
|
||||
bool isProducer =
|
||||
( simWellData->wellProductionType( m_timeStep ) == RigWellResultFrame::PRODUCER ||
|
||||
simWellData->wellProductionType( m_timeStep ) == RigWellResultFrame::UNDEFINED_PRODUCTION_TYPE );
|
||||
bool isProducer = ( simWellData->wellProductionType( m_timeStep ) == RiaDefines::WellProductionType::PRODUCER ||
|
||||
simWellData->wellProductionType( m_timeStep ) ==
|
||||
RiaDefines::WellProductionType::UNDEFINED_PRODUCTION_TYPE );
|
||||
RigEclCellIndexCalculator cellIdxCalc( m_case->eclipseCaseData()->mainGrid(),
|
||||
m_case->eclipseCaseData()->activeCellInfo(
|
||||
RiaDefines::PorosityModelType::MATRIX_MODEL ) );
|
||||
@@ -444,8 +444,9 @@ std::map<QString, const std::vector<double>*>
|
||||
{
|
||||
RimFlowDiagSolution::TracerStatusType requestedTracerType = RimFlowDiagSolution::TracerStatusType::UNDEFINED;
|
||||
|
||||
const RigWellResultFrame::WellProductionType prodType = simWellData->wellProductionType( m_timeStep );
|
||||
if ( prodType == RigWellResultFrame::PRODUCER || prodType == RigWellResultFrame::UNDEFINED_PRODUCTION_TYPE )
|
||||
const RiaDefines::WellProductionType prodType = simWellData->wellProductionType( m_timeStep );
|
||||
if ( prodType == RiaDefines::WellProductionType::PRODUCER ||
|
||||
prodType == RiaDefines::WellProductionType::UNDEFINED_PRODUCTION_TYPE )
|
||||
{
|
||||
requestedTracerType = RimFlowDiagSolution::TracerStatusType::INJECTOR;
|
||||
}
|
||||
@@ -593,23 +594,23 @@ QString RimWellAllocationPlot::wellStatusTextForTimeStep( const QString&
|
||||
{
|
||||
const RigWellResultFrame& wellResultFrame = simWellData->wellResultFrame( timeStep );
|
||||
|
||||
RigWellResultFrame::WellProductionType prodType = wellResultFrame.m_productionType;
|
||||
RiaDefines::WellProductionType prodType = wellResultFrame.m_productionType;
|
||||
|
||||
switch ( prodType )
|
||||
{
|
||||
case RigWellResultFrame::PRODUCER:
|
||||
case RiaDefines::WellProductionType::PRODUCER:
|
||||
statusText = "Producer";
|
||||
break;
|
||||
case RigWellResultFrame::OIL_INJECTOR:
|
||||
case RiaDefines::WellProductionType::OIL_INJECTOR:
|
||||
statusText = "Oil Injector";
|
||||
break;
|
||||
case RigWellResultFrame::GAS_INJECTOR:
|
||||
case RiaDefines::WellProductionType::GAS_INJECTOR:
|
||||
statusText = "Gas Injector";
|
||||
break;
|
||||
case RigWellResultFrame::WATER_INJECTOR:
|
||||
case RiaDefines::WellProductionType::WATER_INJECTOR:
|
||||
statusText = "Water Injector";
|
||||
break;
|
||||
case RigWellResultFrame::UNDEFINED_PRODUCTION_TYPE:
|
||||
case RiaDefines::WellProductionType::UNDEFINED_PRODUCTION_TYPE:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user