Convert to enum class

This commit is contained in:
Magne Sjaastad
2020-04-24 07:13:33 +02:00
parent 83914006fd
commit f89dcf4e52
63 changed files with 513 additions and 450 deletions

View File

@@ -1208,9 +1208,9 @@ void RiaApplication::applyPreferences()
// instead of using the application font
std::map<RiaDefines::FontSettingType, RiaFontCache::FontSize> fontSizes = m_preferences->defaultFontSizes();
m_defaultSceneFont = RiaFontCache::getFont( fontSizes[RiaDefines::SCENE_FONT] );
m_defaultAnnotationFont = RiaFontCache::getFont( fontSizes[RiaDefines::ANNOTATION_FONT] );
m_defaultWellLabelFont = RiaFontCache::getFont( fontSizes[RiaDefines::WELL_LABEL_FONT] );
m_defaultSceneFont = RiaFontCache::getFont( fontSizes[RiaDefines::FontSettingType::SCENE_FONT] );
m_defaultAnnotationFont = RiaFontCache::getFont( fontSizes[RiaDefines::FontSettingType::ANNOTATION_FONT] );
m_defaultWellLabelFont = RiaFontCache::getFont( fontSizes[RiaDefines::FontSettingType::WELL_LABEL_FONT] );
if ( this->project() )
{

View File

@@ -42,66 +42,66 @@ void caf::AppEnum<RiaDefines::ResultCatType>::setUp()
template <>
void caf::AppEnum<RiaDefines::DepthUnitType>::setUp()
{
addItem( RiaDefines::UNIT_METER, "UNIT_METER", "Meter" );
addItem( RiaDefines::UNIT_FEET, "UNIT_FEET", "Feet" );
addItem( RiaDefines::UNIT_NONE, "UNIT_NONE", "None" );
addItem( RiaDefines::DepthUnitType::UNIT_METER, "UNIT_METER", "Meter" );
addItem( RiaDefines::DepthUnitType::UNIT_FEET, "UNIT_FEET", "Feet" );
addItem( RiaDefines::DepthUnitType::UNIT_NONE, "UNIT_NONE", "None" );
setDefault( RiaDefines::UNIT_METER );
setDefault( RiaDefines::DepthUnitType::UNIT_METER );
}
template <>
void caf::AppEnum<RiaDefines::DepthTypeEnum>::setUp()
{
addItem( RiaDefines::MEASURED_DEPTH, "MEASURED_DEPTH", "Measured Depth" );
addItem( RiaDefines::TRUE_VERTICAL_DEPTH, "TRUE_VERTICAL_DEPTH", "True Vertical Depth (MSL)" );
addItem( RiaDefines::PSEUDO_LENGTH, "PSEUDO_LENGTH", "Pseudo Length" );
addItem( RiaDefines::CONNECTION_NUMBER, "CONNECTION_NUMBER", "Connection Number" );
addItem( RiaDefines::TRUE_VERTICAL_DEPTH_RKB, "TRUE_VERTICAL_DEPTH_RKB", "True Vertical Depth (RKB)" );
setDefault( RiaDefines::MEASURED_DEPTH );
addItem( RiaDefines::DepthTypeEnum::MEASURED_DEPTH, "MEASURED_DEPTH", "Measured Depth" );
addItem( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH, "TRUE_VERTICAL_DEPTH", "True Vertical Depth (MSL)" );
addItem( RiaDefines::DepthTypeEnum::PSEUDO_LENGTH, "PSEUDO_LENGTH", "Pseudo Length" );
addItem( RiaDefines::DepthTypeEnum::CONNECTION_NUMBER, "CONNECTION_NUMBER", "Connection Number" );
addItem( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB, "TRUE_VERTICAL_DEPTH_RKB", "True Vertical Depth (RKB)" );
setDefault( RiaDefines::DepthTypeEnum::MEASURED_DEPTH );
}
template <>
void caf::AppEnum<RiaDefines::PlotAxis>::setUp()
{
addItem( RiaDefines::PLOT_AXIS_LEFT, "PLOT_AXIS_LEFT", "Left" );
addItem( RiaDefines::PLOT_AXIS_RIGHT, "PLOT_AXIS_RIGHT", "Right" );
addItem( RiaDefines::PlotAxis::PLOT_AXIS_LEFT, "PLOT_AXIS_LEFT", "Left" );
addItem( RiaDefines::PlotAxis::PLOT_AXIS_RIGHT, "PLOT_AXIS_RIGHT", "Right" );
setDefault( RiaDefines::PLOT_AXIS_LEFT );
setDefault( RiaDefines::PlotAxis::PLOT_AXIS_LEFT );
}
template <>
void caf::AppEnum<RiaDefines::PhaseType>::setUp()
{
addItem( RiaDefines::OIL_PHASE, "OIL_PHASE", "Oil" );
addItem( RiaDefines::GAS_PHASE, "GAS_PHASE", "Gas" );
addItem( RiaDefines::WATER_PHASE, "WATER_PHASE", "Water" );
setDefault( RiaDefines::OIL_PHASE );
addItem( RiaDefines::PhaseType::OIL_PHASE, "OIL_PHASE", "Oil" );
addItem( RiaDefines::PhaseType::GAS_PHASE, "GAS_PHASE", "Gas" );
addItem( RiaDefines::PhaseType::WATER_PHASE, "WATER_PHASE", "Water" );
setDefault( RiaDefines::PhaseType::OIL_PHASE );
}
template <>
void caf::AppEnum<RiaDefines::WellPathComponentType>::setUp()
{
addItem( RiaDefines::WELL_PATH, "WELL_PATH", "Well Path" );
addItem( RiaDefines::PERFORATION_INTERVAL, "PERFORATION_INTERVAL", "Perforation Interval" );
addItem( RiaDefines::FISHBONES, "FISHBONES", "Fishbones" );
addItem( RiaDefines::FRACTURE, "FRACTURE", "Fracture" );
addItem( RiaDefines::ICD, "ICD", "ICD" );
addItem( RiaDefines::AICD, "AICD", "AICD" );
addItem( RiaDefines::ICV, "ICV", "ICV" );
addItem( RiaDefines::CASING, "CASING", "Casing" );
addItem( RiaDefines::LINER, "LINER", "Liner" );
addItem( RiaDefines::PACKER, "PACKER", "Packer" );
addItem( RiaDefines::UNDEFINED_COMPONENT, "UNDEFINED", "Undefined Component" );
setDefault( RiaDefines::WELL_PATH );
addItem( RiaDefines::WellPathComponentType::WELL_PATH, "WELL_PATH", "Well Path" );
addItem( RiaDefines::WellPathComponentType::PERFORATION_INTERVAL, "PERFORATION_INTERVAL", "Perforation Interval" );
addItem( RiaDefines::WellPathComponentType::FISHBONES, "FISHBONES", "Fishbones" );
addItem( RiaDefines::WellPathComponentType::FRACTURE, "FRACTURE", "Fracture" );
addItem( RiaDefines::WellPathComponentType::ICD, "ICD", "ICD" );
addItem( RiaDefines::WellPathComponentType::AICD, "AICD", "AICD" );
addItem( RiaDefines::WellPathComponentType::ICV, "ICV", "ICV" );
addItem( RiaDefines::WellPathComponentType::CASING, "CASING", "Casing" );
addItem( RiaDefines::WellPathComponentType::LINER, "LINER", "Liner" );
addItem( RiaDefines::WellPathComponentType::PACKER, "PACKER", "Packer" );
addItem( RiaDefines::WellPathComponentType::UNDEFINED_COMPONENT, "UNDEFINED", "Undefined Component" );
setDefault( RiaDefines::WellPathComponentType::WELL_PATH );
}
template <>
void caf::AppEnum<RiaDefines::MeshModeType>::setUp()
{
addItem( RiaDefines::FULL_MESH, "FULL_MESH", "All" );
addItem( RiaDefines::FAULTS_MESH, "FAULTS_MESH", "Faults only" );
addItem( RiaDefines::NO_MESH, "NO_MESH", "None" );
setDefault( RiaDefines::FULL_MESH );
addItem( RiaDefines::MeshModeType::FULL_MESH, "FULL_MESH", "All" );
addItem( RiaDefines::MeshModeType::FAULTS_MESH, "FAULTS_MESH", "Faults only" );
addItem( RiaDefines::MeshModeType::NO_MESH, "NO_MESH", "None" );
setDefault( RiaDefines::MeshModeType::FULL_MESH );
}
} // namespace caf

View File

@@ -43,7 +43,7 @@ enum class ResultCatType
// WARNING: DO NOT CHANGE THE ORDER WITHOUT KNOWING WHAT YOU ARE DOING!
// You may well change the behaviour of property filters.
enum WellPathComponentType
enum class WellPathComponentType
{
// Production Tube
WELL_PATH,
@@ -61,7 +61,7 @@ enum WellPathComponentType
UNDEFINED_COMPONENT
};
enum MeshModeType
enum class MeshModeType
{
FULL_MESH,
FAULTS_MESH,
@@ -133,7 +133,7 @@ std::vector<QString> wbsAngleResultNames();
std::vector<QString> wbsDerivedResultNames();
// Units and conversions
enum DepthUnitType
enum class DepthUnitType
{
UNIT_METER,
UNIT_FEET,
@@ -141,7 +141,7 @@ enum DepthUnitType
};
// Depth types used for well log plots
enum DepthTypeEnum
enum class DepthTypeEnum
{
MEASURED_DEPTH,
TRUE_VERTICAL_DEPTH,
@@ -151,7 +151,7 @@ enum DepthTypeEnum
};
// Defines relate to plotting
enum PlotAxis
enum class PlotAxis
{
PLOT_AXIS_LEFT,
PLOT_AXIS_RIGHT,
@@ -162,7 +162,7 @@ double minimumDefaultValuePlot();
double minimumDefaultLogValuePlot();
double maximumDefaultValuePlot();
enum PhaseType
enum class PhaseType
{
OIL_PHASE,
GAS_PHASE,
@@ -186,7 +186,7 @@ enum ImportFileType
ImportFileType obtainFileTypeFromFileName( const QString& fileName );
QString defaultDirectoryLabel( ImportFileType fileTypes );
enum CaseType
enum class CaseType
{
UNDEFINED_CASE = -1,
ECLIPSE_RESULT_CASE = 1,
@@ -196,7 +196,7 @@ enum CaseType
GEOMECH_ODB_CASE = 5
};
enum FontSettingType
enum class FontSettingType
{
SCENE_FONT,
ANNOTATION_FONT,

View File

@@ -995,10 +995,10 @@ bool RiaPreferences::openExportedPdfInViewer() const
std::map<RiaDefines::FontSettingType, RiaFontCache::FontSize> RiaPreferences::defaultFontSizes() const
{
std::map<RiaDefines::FontSettingType, RiaFontCache::FontSize> fontSizes;
fontSizes[RiaDefines::SCENE_FONT] = defaultSceneFontSize();
fontSizes[RiaDefines::ANNOTATION_FONT] = defaultAnnotationFontSize();
fontSizes[RiaDefines::WELL_LABEL_FONT] = defaultWellLabelFontSize();
fontSizes[RiaDefines::PLOT_FONT] = defaultPlotFontSize();
fontSizes[RiaDefines::FontSettingType::SCENE_FONT] = defaultSceneFontSize();
fontSizes[RiaDefines::FontSettingType::ANNOTATION_FONT] = defaultAnnotationFontSize();
fontSizes[RiaDefines::FontSettingType::WELL_LABEL_FONT] = defaultWellLabelFontSize();
fontSizes[RiaDefines::FontSettingType::PLOT_FONT] = defaultPlotFontSize();
return fontSizes;
}

View File

@@ -511,17 +511,17 @@ cvf::Color3f RiaColorTables::undefinedCellColor()
//--------------------------------------------------------------------------------------------------
RiaColorTables::WellPathComponentColors RiaColorTables::wellPathComponentColors()
{
return {{RiaDefines::WELL_PATH, cvf::Color3::CEETRON},
{RiaDefines::PERFORATION_INTERVAL, cvf::Color3::DARK_MAGENTA},
{RiaDefines::FISHBONES, cvf::Color3::DARK_GREEN},
{RiaDefines::FRACTURE, cvf::Color3::CRIMSON},
{RiaDefines::ICD, cvf::Color3::DARK_ORANGE},
{RiaDefines::AICD, cvf::Color3::INDIGO},
{RiaDefines::ICV, cvf::Color3::ORCHID},
{RiaDefines::CASING, cvf::Color3::SEA_GREEN},
{RiaDefines::LINER, cvf::Color3::OLIVE},
{RiaDefines::PACKER, cvf::Color3::GRAY},
{RiaDefines::UNDEFINED_COMPONENT, cvf::Color3::MAGENTA}};
return {{RiaDefines::WellPathComponentType::WELL_PATH, cvf::Color3::CEETRON},
{RiaDefines::WellPathComponentType::PERFORATION_INTERVAL, cvf::Color3::DARK_MAGENTA},
{RiaDefines::WellPathComponentType::FISHBONES, cvf::Color3::DARK_GREEN},
{RiaDefines::WellPathComponentType::FRACTURE, cvf::Color3::CRIMSON},
{RiaDefines::WellPathComponentType::ICD, cvf::Color3::DARK_ORANGE},
{RiaDefines::WellPathComponentType::AICD, cvf::Color3::INDIGO},
{RiaDefines::WellPathComponentType::ICV, cvf::Color3::ORCHID},
{RiaDefines::WellPathComponentType::CASING, cvf::Color3::SEA_GREEN},
{RiaDefines::WellPathComponentType::LINER, cvf::Color3::OLIVE},
{RiaDefines::WellPathComponentType::PACKER, cvf::Color3::GRAY},
{RiaDefines::WellPathComponentType::UNDEFINED_COMPONENT, cvf::Color3::MAGENTA}};
}
//--------------------------------------------------------------------------------------------------

View File

@@ -67,19 +67,19 @@ RiaDefines::DepthUnitType RiaEclipseUnitTools::depthUnit( UnitSystem unit )
switch ( unit )
{
case RiaEclipseUnitTools::UNITS_METRIC:
return RiaDefines::UNIT_METER;
return RiaDefines::DepthUnitType::UNIT_METER;
break;
case RiaEclipseUnitTools::UNITS_FIELD:
return RiaDefines::UNIT_FEET;
return RiaDefines::DepthUnitType::UNIT_FEET;
break;
case RiaEclipseUnitTools::UNITS_LAB:
return RiaDefines::UNIT_NONE;
return RiaDefines::DepthUnitType::UNIT_NONE;
break;
case RiaEclipseUnitTools::UNITS_UNKNOWN:
return RiaDefines::UNIT_NONE;
return RiaDefines::DepthUnitType::UNIT_NONE;
break;
default:
return RiaDefines::UNIT_NONE;
return RiaDefines::DepthUnitType::UNIT_NONE;
break;
}
}

View File

@@ -22,14 +22,13 @@
#include <limits>
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
template <typename FloatType>
const FloatType RiaWellLogUnitTools<FloatType>::gravityAcceleration()
{
return (FloatType) 9.81;
return (FloatType)9.81;
}
//--------------------------------------------------------------------------------------------------
@@ -139,11 +138,11 @@ std::vector<FloatType> RiaWellLogUnitTools<FloatType>::convertDepths( const std:
RiaDefines::DepthUnitType unitsIn,
RiaDefines::DepthUnitType unitsOut )
{
if ( unitsOut == RiaDefines::UNIT_METER && unitsIn == RiaDefines::UNIT_FEET )
if ( unitsOut == RiaDefines::DepthUnitType::UNIT_METER && unitsIn == RiaDefines::DepthUnitType::UNIT_FEET )
{
return multiply( depthsIn, RiaEclipseUnitTools::feetPerMeter() );
}
else if ( unitsOut == RiaDefines::UNIT_FEET && unitsIn == RiaDefines::UNIT_METER )
else if ( unitsOut == RiaDefines::DepthUnitType::UNIT_FEET && unitsIn == RiaDefines::DepthUnitType::UNIT_METER )
{
return multiply( depthsIn, RiaEclipseUnitTools::meterPerFeet() );
}
@@ -215,7 +214,7 @@ bool RiaWellLogUnitTools<FloatType>::convertValues( const std::vector<FloatType>
}
else if ( stringsMatch( unitsIn, barUnitString() ) && stringsMatch( unitsOut, barX100UnitString() ) )
{
*valuesOut = multiply( valuesIn, (FloatType) 0.01 );
*valuesOut = multiply( valuesIn, (FloatType)0.01 );
return true;
}
else if ( ( stringsMatch( unitsIn, noUnitString() ) || stringsMatch( unitsIn, sg_emwUnitString() ) ) &&
@@ -230,12 +229,14 @@ bool RiaWellLogUnitTools<FloatType>::convertValues( const std::vector<FloatType>
*valuesOut = convertBarToNormalizedByPP( tvdRKBs, valuesIn );
return true;
}
else if ( (stringsMatch( unitsIn, pascalUnitString()) || stringsMatch( unitsIn, pascalUnitString() ) && stringsMatch( unitsOut, barUnitString() ) ))
else if ( ( stringsMatch( unitsIn, pascalUnitString() ) ||
stringsMatch( unitsIn, pascalUnitString() ) && stringsMatch( unitsOut, barUnitString() ) ) )
{
*valuesOut = multiply( valuesIn, 1.0 / pascalPerBar() );
return true;
}
else if ( stringsMatch( unitsIn, barUnitString() ) && (stringsMatch( unitsIn, pascalUnitString()) || stringsMatch( unitsIn, pascalUnitString() )) )
else if ( stringsMatch( unitsIn, barUnitString() ) &&
( stringsMatch( unitsIn, pascalUnitString() ) || stringsMatch( unitsIn, pascalUnitString() ) ) )
{
*valuesOut = multiply( valuesIn, pascalPerBar() );
return true;
@@ -282,7 +283,8 @@ bool RiaWellLogUnitTools<FloatType>::convertValues( std::vector<std::pair<FloatT
///
//--------------------------------------------------------------------------------------------------
template <typename FloatType>
std::vector<FloatType> RiaWellLogUnitTools<FloatType>::tvdRKBs( const std::vector<FloatType>& measuredDepths, const RigWellPath* wellPath )
std::vector<FloatType>
RiaWellLogUnitTools<FloatType>::tvdRKBs( const std::vector<FloatType>& measuredDepths, const RigWellPath* wellPath )
{
std::vector<double> tvdRKBs( measuredDepths.size(), 0.0 );
for ( size_t i = 0; i < measuredDepths.size(); ++i )
@@ -290,7 +292,7 @@ std::vector<FloatType> RiaWellLogUnitTools<FloatType>::tvdRKBs( const std::vecto
cvf::Vec3d point = wellPath->interpolatedPointAlongWellPath( measuredDepths[i] );
tvdRKBs[i] = -point.z() + wellPath->rkbDiff();
}
return std::vector<FloatType>(tvdRKBs.begin(), tvdRKBs.end());
return std::vector<FloatType>( tvdRKBs.begin(), tvdRKBs.end() );
}
//--------------------------------------------------------------------------------------------------
@@ -350,8 +352,9 @@ std::vector<FloatType> RiaWellLogUnitTools<FloatType>::convertBarToGpcm3( const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
template<typename FloatType>
std::vector<FloatType> RiaWellLogUnitTools<FloatType>::convertNormalizedByPPToBar( const std::vector<FloatType>& tvdRKBs,
template <typename FloatType>
std::vector<FloatType>
RiaWellLogUnitTools<FloatType>::convertNormalizedByPPToBar( const std::vector<FloatType>& tvdRKBs,
const std::vector<FloatType>& normalizedValues )
{
CAF_ASSERT( tvdRKBs.size() == normalizedValues.size() );
@@ -368,7 +371,8 @@ std::vector<FloatType> RiaWellLogUnitTools<FloatType>::convertNormalizedByPPToBa
///
//--------------------------------------------------------------------------------------------------
template <typename FloatType>
std::vector<FloatType> RiaWellLogUnitTools<FloatType>::convertBarToNormalizedByPP( const std::vector<FloatType>& tvdRKBs,
std::vector<FloatType>
RiaWellLogUnitTools<FloatType>::convertBarToNormalizedByPP( const std::vector<FloatType>& tvdRKBs,
const std::vector<FloatType>& valuesInBar )
{
CAF_ASSERT( tvdRKBs.size() == valuesInBar.size() );
@@ -410,7 +414,7 @@ FloatType RiaWellLogUnitTools<FloatType>::pascalPerBar()
template <typename FloatType>
FloatType RiaWellLogUnitTools<FloatType>::MPaPerBar()
{
return (FloatType) 1.0e-1;
return (FloatType)1.0e-1;
}
//--------------------------------------------------------------------------------------------------
@@ -419,5 +423,5 @@ FloatType RiaWellLogUnitTools<FloatType>::MPaPerBar()
template <typename FloatType>
FloatType RiaWellLogUnitTools<FloatType>::hydrostaticPorePressureBar( FloatType depth )
{
return (FloatType) 1.0 / pascalPerBar() * depth * unitWeightOfWater();
return (FloatType)1.0 / pascalPerBar() * depth * unitWeightOfWater();
}

View File

@@ -41,7 +41,8 @@ bool RicMswICDAccumulator::accumulateValveParameters( const RimWellPathValve* we
double contributionFraction )
{
CVF_ASSERT( wellPathValve );
if ( wellPathValve->componentType() == RiaDefines::ICV || wellPathValve->componentType() == RiaDefines::ICD )
if ( wellPathValve->componentType() == RiaDefines::WellPathComponentType::ICV ||
wellPathValve->componentType() == RiaDefines::WellPathComponentType::ICD )
{
double icdOrificeRadius = wellPathValve->orificeDiameter( m_unitSystem ) / 2;
double icdArea = icdOrificeRadius * icdOrificeRadius * cvf::PI_D;
@@ -86,7 +87,7 @@ bool RicMswAICDAccumulator::accumulateValveParameters( const RimWellPathValve* w
double contributionFraction )
{
CVF_ASSERT( wellPathValve );
if ( wellPathValve->componentType() == RiaDefines::AICD )
if ( wellPathValve->componentType() == RiaDefines::WellPathComponentType::AICD )
{
const RimWellPathAicdParameters* params = wellPathValve->aicdParameters();
if ( params->isValid() )

View File

@@ -1302,7 +1302,7 @@ void RicWellPathExportMswCompletionsImpl::createValveCompletions(
if ( segment->startMD() <= valveMD && valveMD < segment->endMD() )
{
if ( valve->componentType() == RiaDefines::AICD )
if ( valve->componentType() == RiaDefines::WellPathComponentType::AICD )
{
QString valveLabel =
QString( "%1 #%2" ).arg( "Combined Valve for segment" ).arg( nMainSegment + 2 );
@@ -1312,7 +1312,7 @@ void RicWellPathExportMswCompletionsImpl::createValveCompletions(
superAICD = std::make_shared<RicMswPerforationAICD>( valveLabel, valve );
superAICD->addSubSegment( subSegment );
}
else if ( valve->componentType() == RiaDefines::ICD )
else if ( valve->componentType() == RiaDefines::WellPathComponentType::ICD )
{
QString valveLabel =
QString( "%1 #%2" ).arg( "Combined Valve for segment" ).arg( nMainSegment + 2 );
@@ -1322,7 +1322,7 @@ void RicWellPathExportMswCompletionsImpl::createValveCompletions(
superICD = std::make_shared<RicMswPerforationICD>( valveLabel, valve );
superICD->addSubSegment( subSegment );
}
else if ( valve->componentType() == RiaDefines::ICV )
else if ( valve->componentType() == RiaDefines::WellPathComponentType::ICV )
{
QString valveLabel =
QString( "ICV %1 at segment #%2" ).arg( valve->name() ).arg( nMainSegment + 2 );
@@ -1336,7 +1336,8 @@ void RicWellPathExportMswCompletionsImpl::createValveCompletions(
ICV->setArea( orificeRadius * orificeRadius * cvf::PI_D );
}
}
else if ( overlap > 0.0 && ( valve->componentType() == RiaDefines::ICD && !superICD ) )
else if ( overlap > 0.0 &&
( valve->componentType() == RiaDefines::WellPathComponentType::ICD && !superICD ) )
{
QString valveLabel =
QString( "%1 #%2" ).arg( "Combined Valve for segment" ).arg( nMainSegment + 2 );
@@ -1345,7 +1346,8 @@ void RicWellPathExportMswCompletionsImpl::createValveCompletions(
superICD = std::make_shared<RicMswPerforationICD>( valveLabel, valve );
superICD->addSubSegment( subSegment );
}
else if ( overlap > 0.0 && ( valve->componentType() == RiaDefines::AICD && !superAICD ) )
else if ( overlap > 0.0 &&
( valve->componentType() == RiaDefines::WellPathComponentType::AICD && !superAICD ) )
{
QString valveLabel =
QString( "%1 #%2" ).arg( "Combined Valve for segment" ).arg( nMainSegment + 2 );
@@ -1355,11 +1357,11 @@ void RicWellPathExportMswCompletionsImpl::createValveCompletions(
superAICD->addSubSegment( subSegment );
}
if ( valve->componentType() == RiaDefines::AICD )
if ( valve->componentType() == RiaDefines::WellPathComponentType::AICD )
{
totalAICDOverlap += overlap;
}
else if ( valve->componentType() == RiaDefines::ICD )
else if ( valve->componentType() == RiaDefines::WellPathComponentType::ICD )
{
totalICDOverlap += overlap;
}
@@ -1516,7 +1518,7 @@ void RicWellPathExportMswCompletionsImpl::moveIntersectionsToICVs(
for ( const RimWellPathValve* valve : perforationValves )
{
if ( !valve->isChecked() ) continue;
if ( valve->componentType() != RiaDefines::ICV ) continue;
if ( valve->componentType() != RiaDefines::WellPathComponentType::ICV ) continue;
auto icvIt = icvCompletionMap.find( valve );
if ( icvIt == icvCompletionMap.end() ) continue;

View File

@@ -107,7 +107,7 @@ void RicPlotProductionRateFeature::onActionTriggered( bool isChecked )
{
// Left Axis
RiaDefines::PlotAxis plotAxis = RiaDefines::PLOT_AXIS_LEFT;
RiaDefines::PlotAxis plotAxis = RiaDefines::PlotAxis::PLOT_AXIS_LEFT;
{
// Note : The parameter "WOIR" is probably never-existing, but we check for existence before creating
@@ -147,7 +147,7 @@ void RicPlotProductionRateFeature::onActionTriggered( bool isChecked )
{
// Left Axis
RiaDefines::PlotAxis plotAxis = RiaDefines::PLOT_AXIS_LEFT;
RiaDefines::PlotAxis plotAxis = RiaDefines::PlotAxis::PLOT_AXIS_LEFT;
{
// Oil
@@ -186,7 +186,7 @@ void RicPlotProductionRateFeature::onActionTriggered( bool isChecked )
// Right Axis
{
RiaDefines::PlotAxis plotAxis = RiaDefines::PLOT_AXIS_RIGHT;
RiaDefines::PlotAxis plotAxis = RiaDefines::PlotAxis::PLOT_AXIS_RIGHT;
{
QString parameterName = "WTHP";

View File

@@ -58,13 +58,13 @@ void RicSummaryCurveSwitchAxisFeature::onActionTriggered( bool isChecked )
{
RiaDefines::PlotAxis plotAxis = summaryCurve->axisY();
if ( plotAxis == RiaDefines::PLOT_AXIS_LEFT )
if ( plotAxis == RiaDefines::PlotAxis::PLOT_AXIS_LEFT )
{
summaryCurve->setLeftOrRightAxisY( RiaDefines::PLOT_AXIS_RIGHT );
summaryCurve->setLeftOrRightAxisY( RiaDefines::PlotAxis::PLOT_AXIS_RIGHT );
}
else
{
summaryCurve->setLeftOrRightAxisY( RiaDefines::PLOT_AXIS_LEFT );
summaryCurve->setLeftOrRightAxisY( RiaDefines::PlotAxis::PLOT_AXIS_LEFT );
}
summaryCurve->updateQwtPlotAxis();
@@ -79,13 +79,13 @@ void RicSummaryCurveSwitchAxisFeature::onActionTriggered( bool isChecked )
{
RiaDefines::PlotAxis plotAxis = asciiCurve->yAxis();
if ( plotAxis == RiaDefines::PLOT_AXIS_LEFT )
if ( plotAxis == RiaDefines::PlotAxis::PLOT_AXIS_LEFT )
{
asciiCurve->setYAxis( RiaDefines::PLOT_AXIS_RIGHT );
asciiCurve->setYAxis( RiaDefines::PlotAxis::PLOT_AXIS_RIGHT );
}
else
{
asciiCurve->setYAxis( RiaDefines::PLOT_AXIS_LEFT );
asciiCurve->setYAxis( RiaDefines::PlotAxis::PLOT_AXIS_LEFT );
}
asciiCurve->updateQwtPlotAxis();
@@ -100,13 +100,13 @@ void RicSummaryCurveSwitchAxisFeature::onActionTriggered( bool isChecked )
{
RiaDefines::PlotAxis plotAxis = timeHistoryCurve->yAxis();
if ( plotAxis == RiaDefines::PLOT_AXIS_LEFT )
if ( plotAxis == RiaDefines::PlotAxis::PLOT_AXIS_LEFT )
{
timeHistoryCurve->setYAxis( RiaDefines::PLOT_AXIS_RIGHT );
timeHistoryCurve->setYAxis( RiaDefines::PlotAxis::PLOT_AXIS_RIGHT );
}
else
{
timeHistoryCurve->setYAxis( RiaDefines::PLOT_AXIS_LEFT );
timeHistoryCurve->setYAxis( RiaDefines::PlotAxis::PLOT_AXIS_LEFT );
}
timeHistoryCurve->updateConnectedEditors();

View File

@@ -112,7 +112,7 @@ RimWellBoreStabilityPlot*
plot->setPlotTitleVisible( true );
plot->setLegendsVisible( true );
plot->setLegendsHorizontal( true );
plot->setDepthType( RiaDefines::TRUE_VERTICAL_DEPTH_RKB );
plot->setDepthType( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB );
plot->setAutoScaleDepthEnabled( true );
RicNewWellLogPlotFeatureImpl::updateAfterCreation( plot );

View File

@@ -542,17 +542,17 @@ std::set<RiaDefines::PhaseType> RifEclipseOutputFileTools::findAvailablePhases(
if ( phases & ECL_OIL_PHASE )
{
phaseTypes.insert( RiaDefines::OIL_PHASE );
phaseTypes.insert( RiaDefines::PhaseType::OIL_PHASE );
}
if ( phases & ECL_GAS_PHASE )
{
phaseTypes.insert( RiaDefines::GAS_PHASE );
phaseTypes.insert( RiaDefines::PhaseType::GAS_PHASE );
}
if ( phases & ECL_WATER_PHASE )
{
phaseTypes.insert( RiaDefines::WATER_PHASE );
phaseTypes.insert( RiaDefines::PhaseType::WATER_PHASE );
}
}
}

View File

@@ -979,7 +979,7 @@ void RivWellFracturePartMgr::appendFracturePerforationLengthParts( const RimEcli
RivPipeGeometryGenerator geoGenerator;
geoGenerator.cylinderWithCenterLineParts( &parts,
displayCoords,
RiaColorTables::wellPathComponentColors()[RiaDefines::PERFORATION_INTERVAL],
RiaColorTables::wellPathComponentColors()[RiaDefines::WellPathComponentType::PERFORATION_INTERVAL],
perforationRadius );
for ( auto part : parts )

View File

@@ -184,7 +184,7 @@ void RivWellPathPartMgr::appendWellPathAttributesToModel( cvf::ModelBasicList*
{
if ( attribute->isEnabled() )
{
if ( attribute->componentType() == RiaDefines::CASING )
if ( attribute->componentType() == RiaDefines::WellPathComponentType::CASING )
{
double wellPathRadius = this->wellPathRadius( characteristicCellSize, this->wellPathCollection() );
double endMD = attribute->endMD();
@@ -217,7 +217,7 @@ void RivWellPathPartMgr::appendWellPathAttributesToModel( cvf::ModelBasicList*
model->addPart( part.p() );
}
}
else if ( attribute->componentType() == RiaDefines::PACKER )
else if ( attribute->componentType() == RiaDefines::WellPathComponentType::PACKER )
{
double wellPathRadius = this->wellPathRadius( characteristicCellSize, this->wellPathCollection() );
double startMD = attribute->startMD();
@@ -499,7 +499,7 @@ void RivWellPathPartMgr::appendPerforationValvesToModel( cvf::ModelBasicList*
std::vector<double> measuredDepthsRelativeToStartMD;
std::vector<double> radii;
cvf::Color3f valveColor = valve->defaultComponentColor();
if ( valve->componentType() == RiaDefines::ICV )
if ( valve->componentType() == RiaDefines::WellPathComponentType::ICV )
{
measuredDepthsRelativeToStartMD = {0.0, 1.0, 1.5, 4.0, 5.0, 5.5, 8.0, 9.0};
radii = {wellPathRadius,
@@ -530,7 +530,8 @@ void RivWellPathPartMgr::appendPerforationValvesToModel( cvf::ModelBasicList*
model->addPart( part.p() );
}
}
else if ( valve->componentType() == RiaDefines::ICD || valve->componentType() == RiaDefines::AICD )
else if ( valve->componentType() == RiaDefines::WellPathComponentType::ICD ||
valve->componentType() == RiaDefines::WellPathComponentType::AICD )
{
std::vector<double> valveLocations = valve->valveLocations();
for ( double startMD : valveLocations )
@@ -549,7 +550,7 @@ void RivWellPathPartMgr::appendPerforationValvesToModel( cvf::ModelBasicList*
int nInners = 0;
for ( int i = 1; i < size - 1; i += 2 )
{
if ( inner && valve->componentType() == RiaDefines::AICD && nInners > 0 )
if ( inner && valve->componentType() == RiaDefines::WellPathComponentType::AICD && nInners > 0 )
{
radii[i + 1] = radii[i] = wellPathRadius * 1.7;
nInners = 0;

View File

@@ -449,7 +449,7 @@ void RimAnalysisPlot::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering
{
caf::PdmUiGroup* selVectorsGrp = uiOrdering.addNewGroup( "Selected Vectors" );
selVectorsGrp->add( &m_selectedVarsUiField );
selVectorsGrp->add( &m_selectVariablesButtonField, { false } );
selVectorsGrp->add( &m_selectVariablesButtonField, {false} );
QString vectorNames;
if ( m_analyserOfSelectedCurveDefs )
@@ -471,14 +471,14 @@ void RimAnalysisPlot::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering
timeStepGrp->add( &m_addTimestepUiField );
timeStepGrp->add( &m_selectedTimeSteps );
uiOrdering.add( &m_referenceCase, { true, 3, 2 } );
uiOrdering.add( &m_referenceCase, {true, 3, 2} );
uiOrdering.add( &m_showPlotTitle );
uiOrdering.add( &m_useAutoPlotTitle, { false } );
uiOrdering.add( &m_description, { false } );
uiOrdering.add( &m_useAutoPlotTitle, {false} );
uiOrdering.add( &m_description, {false} );
m_description.uiCapability()->setUiReadOnly( m_useAutoPlotTitle() );
uiOrdering.add( &m_barOrientation, { true, 3, 2 } );
uiOrdering.add( &m_barOrientation, {true, 3, 2} );
caf::PdmUiGroup* sortGrp = uiOrdering.addNewGroup( "Sorting and Grouping" );
sortGrp->add( &m_majorGroupType );
@@ -486,7 +486,7 @@ void RimAnalysisPlot::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering
sortGrp->add( &m_minorGroupType );
sortGrp->add( &m_valueSortOperation );
sortGrp->add( &m_useTopBarsFilter );
sortGrp->add( &m_maxBarCount, { false } );
sortGrp->add( &m_maxBarCount, {false} );
m_maxBarCount.uiCapability()->setUiReadOnly( !m_useTopBarsFilter() );
caf::PdmUiGroup* legendGrp = uiOrdering.addNewGroup( "Legend" );
@@ -499,10 +499,10 @@ void RimAnalysisPlot::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering
caf::PdmUiGroup* barLabelGrp = uiOrdering.addNewGroup( "Bar Labels" );
barLabelGrp->add( &m_useBarText );
barLabelGrp->add( &m_useQuantityInBarText );
barLabelGrp->add( &m_useSummaryItemInBarText, { false } );
barLabelGrp->add( &m_useSummaryItemInBarText, {false} );
barLabelGrp->add( &m_useCaseInBarText );
barLabelGrp->add( &m_useEnsembleInBarText, { false } );
barLabelGrp->add( &m_useTimeStepInBarText, { true, 4, 1 } );
barLabelGrp->add( &m_useEnsembleInBarText, {false} );
barLabelGrp->add( &m_useTimeStepInBarText, {true, 4, 1} );
m_useQuantityInBarText.uiCapability()->setUiReadOnly( !m_useBarText );
m_useSummaryItemInBarText.uiCapability()->setUiReadOnly( !m_useBarText );
@@ -556,16 +556,16 @@ QList<caf::PdmOptionItemInfo> RimAnalysisPlot::calculateValueOptions( const caf:
if ( fieldNeedingOptions == &m_addTimestepUiField )
{
options.push_back( { "None", QDateTime() } );
options.push_back( {"None", QDateTime()} );
std::set<time_t> timeStepUnion = allAvailableTimeSteps();
for ( time_t timeT : timeStepUnion )
{
QDateTime dateTime = RiaQDateTimeTools::fromTime_t( timeT );
QString formatString = RiaQDateTimeTools::createTimeFormatStringFromDates( { dateTime } );
QString formatString = RiaQDateTimeTools::createTimeFormatStringFromDates( {dateTime} );
options.push_back( { dateTime.toString( formatString ), dateTime } );
options.push_back( {dateTime.toString( formatString ), dateTime} );
}
}
else if ( fieldNeedingOptions == &m_valueSortOperation )
@@ -588,7 +588,7 @@ QList<caf::PdmOptionItemInfo> RimAnalysisPlot::calculateValueOptions( const caf:
{
std::vector<RimSummaryCase*> allSummaryCases = RiaApplication::instance()->project()->allSummaryCases();
options.push_back( { "None", nullptr } );
options.push_back( {"None", nullptr} );
for ( auto sumCase : allSummaryCases )
{
@@ -599,7 +599,7 @@ QList<caf::PdmOptionItemInfo> RimAnalysisPlot::calculateValueOptions( const caf:
displayName = caseColl->name() + "/" + displayName;
}
options.push_back( { displayName, sumCase } );
options.push_back( {displayName, sumCase} );
}
}
@@ -730,7 +730,7 @@ bool RimAnalysisPlot::applyFontSize( RiaDefines::FontSettingType fontSettingType
{
bool anyChange = false;
if ( fontSettingType == RiaDefines::PLOT_FONT && m_plotWidget )
if ( fontSettingType == RiaDefines::FontSettingType::PLOT_FONT && m_plotWidget )
{
for ( auto plotAxis : allPlotAxes() )
{
@@ -1071,7 +1071,7 @@ void RimAnalysisPlot::applyFilter( const RimPlotDataFilterItem* filter,
if ( filter->useAbsoluteValues() ) value = fabs( value );
bool useLargest = filter->filterOperation() == RimPlotDataFilterItem::TOP_N;
auto itIsInsertedPair = casesToKeepWithValue.insert( { sumCase, value } );
auto itIsInsertedPair = casesToKeepWithValue.insert( {sumCase, value} );
if ( !itIsInsertedPair.second ) // Already exists in map
{
double& insertedValue = itIsInsertedPair.first->second;
@@ -1165,7 +1165,7 @@ void RimAnalysisPlot::applyFilter( const RimPlotDataFilterItem* filter,
if ( historyTimesteps.size() )
{
selectedTimestepIndices =
RimAnalysisPlot::findTimestepIndices( { historyTimesteps.back() }, timesteps );
RimAnalysisPlot::findTimestepIndices( {historyTimesteps.back()}, timesteps );
}
}
else if ( filter->consideredTimeStepsType() == RimPlotDataFilterItem::SELECT_TIMESTEP_RANGE )
@@ -1223,7 +1223,7 @@ void RimAnalysisPlot::applyFilter( const RimPlotDataFilterItem* filter,
if ( filter->useAbsoluteValues() ) value = fabs( value );
bool useLargest = filter->filterOperation() == RimPlotDataFilterItem::TOP_N;
auto itIsInsertedPair = casesToKeepWithValue.insert( { sumCaseInEvaluation, value } );
auto itIsInsertedPair = casesToKeepWithValue.insert( {sumCaseInEvaluation, value} );
if ( !itIsInsertedPair.second ) // Already exists in map
{
double& insertedValue = itIsInsertedPair.first->second;
@@ -1277,7 +1277,7 @@ void RimAnalysisPlot::applyFilter( const RimPlotDataFilterItem* filter,
if ( filter->useAbsoluteValues() ) value = fabs( value );
bool useLargest = filter->filterOperation() == RimPlotDataFilterItem::TOP_N;
auto itIsInsertedPair = sumItemsToKeepWithValue.insert( { sumItem, value } );
auto itIsInsertedPair = sumItemsToKeepWithValue.insert( {sumItem, value} );
if ( !itIsInsertedPair.second ) // Already exists in map
{
double& insertedValue = itIsInsertedPair.first->second;
@@ -1305,7 +1305,7 @@ void RimAnalysisPlot::applyFilter( const RimPlotDataFilterItem* filter,
std::multimap<double, RifEclipseSummaryAddress> valueSortedSumItems;
for ( const auto& itemValPair : sumItemsToKeepWithValue )
{
valueSortedSumItems.insert( { itemValPair.second, itemValPair.first } );
valueSortedSumItems.insert( {itemValPair.second, itemValPair.first} );
}
if ( filter->filterOperation() == RimPlotDataFilterItem::TOP_N )
@@ -1336,7 +1336,7 @@ void RimAnalysisPlot::applyFilter( const RimPlotDataFilterItem* filter,
std::multimap<double, RimSummaryCase*> valueSortedSumCases;
for ( const auto& caseValPair : casesToKeepWithValue )
{
valueSortedSumCases.insert( { caseValPair.second, caseValPair.first } );
valueSortedSumCases.insert( {caseValPair.second, caseValPair.first} );
}
if ( filter->filterOperation() == RimPlotDataFilterItem::TOP_N )
@@ -1448,7 +1448,7 @@ void RimAnalysisPlot::addDataToChartBuilder( RiuGroupedBarChartBuilder& chartBui
double sortValue = std::numeric_limits<double>::infinity();
QDateTime dateTime = RiaQDateTimeTools::fromTime_t( timesteps[timestepIdx] );
QString formatString = RiaQDateTimeTools::createTimeFormatStringFromDates( { dateTime } );
QString formatString = RiaQDateTimeTools::createTimeFormatStringFromDates( {dateTime} );
QString timestepString = dateTime.toString( formatString );
@@ -1554,7 +1554,7 @@ void RimAnalysisPlot::updatePlotTitle()
{
if ( !autoTitle.isEmpty() ) autoTitle += " @ ";
QString formatString = RiaQDateTimeTools::createTimeFormatStringFromDates( { m_selectedTimeSteps()[0] } );
QString formatString = RiaQDateTimeTools::createTimeFormatStringFromDates( {m_selectedTimeSteps()[0]} );
autoTitle += m_selectedTimeSteps()[0].toString( formatString );
}
@@ -1629,7 +1629,7 @@ std::vector<RiaSummaryCurveDefinition> RimAnalysisPlot::curveDefinitionsWithEmbe
//--------------------------------------------------------------------------------------------------
std::set<RimPlotAxisPropertiesInterface*> RimAnalysisPlot::allPlotAxes() const
{
return { m_valueAxisProperties };
return {m_valueAxisProperties};
}
//--------------------------------------------------------------------------------------------------

View File

@@ -43,13 +43,13 @@ std::vector<RiaDefines::WellPathComponentType> fromCompletionData( const std::ve
switch ( d.completionType() )
{
case RigCompletionData::FRACTURE:
appCompletionTypes.push_back( RiaDefines::FRACTURE );
appCompletionTypes.push_back( RiaDefines::WellPathComponentType::FRACTURE );
break;
case RigCompletionData::PERFORATION:
appCompletionTypes.push_back( RiaDefines::PERFORATION_INTERVAL );
appCompletionTypes.push_back( RiaDefines::WellPathComponentType::PERFORATION_INTERVAL );
break;
case RigCompletionData::FISHBONES:
appCompletionTypes.push_back( RiaDefines::FISHBONES );
appCompletionTypes.push_back( RiaDefines::WellPathComponentType::FISHBONES );
break;
default:
break;
@@ -85,7 +85,8 @@ void RimCompletionCellIntersectionCalc::calculateCompletionTypeResult( RimEclips
for ( auto& intersection : intersectedCells )
{
completionTypeCellResult[intersection] = RiaDefines::WELL_PATH;
completionTypeCellResult[intersection] =
static_cast<int>( RiaDefines::WellPathComponentType::WELL_PATH );
}
auto completions = eclipseCase->computeAndGetVirtualPerforationTransmissibilities();
@@ -94,28 +95,31 @@ void RimCompletionCellIntersectionCalc::calculateCompletionTypeResult( RimEclips
for ( const auto& completionsForWell :
completions->multipleCompletionsPerEclipseCell( wellPath, timeStep ) )
{
RiaDefines::WellPathComponentType appCompletionType = RiaDefines::WELL_PATH;
RiaDefines::WellPathComponentType appCompletionType = RiaDefines::WellPathComponentType::WELL_PATH;
auto appCompletionTypes = fromCompletionData( completionsForWell.second );
if ( std::find( appCompletionTypes.begin(), appCompletionTypes.end(), RiaDefines::FRACTURE ) !=
appCompletionTypes.end() )
if ( std::find( appCompletionTypes.begin(),
appCompletionTypes.end(),
RiaDefines::WellPathComponentType::FRACTURE ) != appCompletionTypes.end() )
{
appCompletionType = RiaDefines::FRACTURE;
}
else if ( std::find( appCompletionTypes.begin(), appCompletionTypes.end(), RiaDefines::FISHBONES ) !=
appCompletionTypes.end() )
{
appCompletionType = RiaDefines::FISHBONES;
appCompletionType = RiaDefines::WellPathComponentType::FRACTURE;
}
else if ( std::find( appCompletionTypes.begin(),
appCompletionTypes.end(),
RiaDefines::PERFORATION_INTERVAL ) != appCompletionTypes.end() )
RiaDefines::WellPathComponentType::FISHBONES ) != appCompletionTypes.end() )
{
appCompletionType = RiaDefines::PERFORATION_INTERVAL;
appCompletionType = RiaDefines::WellPathComponentType::FISHBONES;
}
else if ( std::find( appCompletionTypes.begin(),
appCompletionTypes.end(),
RiaDefines::WellPathComponentType::PERFORATION_INTERVAL ) !=
appCompletionTypes.end() )
{
appCompletionType = RiaDefines::WellPathComponentType::PERFORATION_INTERVAL;
}
completionTypeCellResult[completionsForWell.first] = appCompletionType;
completionTypeCellResult[completionsForWell.first] = static_cast<int>( appCompletionType );
}
}
}

View File

@@ -74,7 +74,7 @@ RimFishbonesMultipleSubs::RimFishbonesMultipleSubs()
m_name.uiCapability()->setUiReadOnly( true );
m_name.xmlCapability()->setIOWritable( false );
cvf::Color3f defaultColor = RiaColorTables::wellPathComponentColors()[RiaDefines::FISHBONES];
cvf::Color3f defaultColor = RiaColorTables::wellPathComponentColors()[RiaDefines::WellPathComponentType::FISHBONES];
CAF_PDM_InitField( &fishbonesColor, "Color", defaultColor, "Fishbones Color", "", "", "" );
CAF_PDM_InitField( &m_lateralCountPerSub, "LateralCountPerSub", 3, "Laterals Per Sub", "", "", "" );
@@ -447,7 +447,7 @@ void RimFishbonesMultipleSubs::setUnitSystemSpecificDefaults()
//--------------------------------------------------------------------------------------------------
RiaDefines::WellPathComponentType RimFishbonesMultipleSubs::componentType() const
{
return RiaDefines::FISHBONES;
return RiaDefines::WellPathComponentType::FISHBONES;
}
//--------------------------------------------------------------------------------------------------

View File

@@ -324,7 +324,7 @@ void RimFracture::clearCachedNonDarcyProperties()
//--------------------------------------------------------------------------------------------------
RiaDefines::WellPathComponentType RimFracture::componentType() const
{
return RiaDefines::FRACTURE;
return RiaDefines::WellPathComponentType::FRACTURE;
}
//--------------------------------------------------------------------------------------------------

View File

@@ -258,7 +258,7 @@ bool RimPerforationInterval::isEnabled() const
//--------------------------------------------------------------------------------------------------
RiaDefines::WellPathComponentType RimPerforationInterval::componentType() const
{
return RiaDefines::PERFORATION_INTERVAL;
return RiaDefines::WellPathComponentType::PERFORATION_INTERVAL;
}
//--------------------------------------------------------------------------------------------------

View File

@@ -42,7 +42,7 @@ RimValveTemplate::RimValveTemplate()
m_valveTemplateUnit.uiCapability()->setUiReadOnly( true );
CAF_PDM_InitFieldNoDefault( &m_type, "CompletionType", "Type", "", "", "" );
m_type = RiaDefines::ICD;
m_type = RiaDefines::WellPathComponentType::ICD;
CAF_PDM_InitField( &m_userLabel, "UserLabel", QString( "Template" ), "Name", "", "", "" );
this->setName( fullLabel() );
@@ -106,7 +106,8 @@ RiaDefines::WellPathComponentType RimValveTemplate::type() const
//--------------------------------------------------------------------------------------------------
void RimValveTemplate::setType( RiaDefines::WellPathComponentType type )
{
CAF_ASSERT( type == RiaDefines::ICD || type == RiaDefines::AICD || RiaDefines::ICV );
CAF_ASSERT( type == RiaDefines::WellPathComponentType::ICD || type == RiaDefines::WellPathComponentType::AICD ||
type == RiaDefines::WellPathComponentType::ICV );
m_type = type;
}
@@ -178,7 +179,9 @@ QList<caf::PdmOptionItemInfo> RimValveTemplate::calculateValueOptions( const caf
if ( fieldNeedingOptions == &m_type )
{
std::set<RiaDefines::WellPathComponentType> supportedTypes = {RiaDefines::ICD, RiaDefines::AICD, RiaDefines::ICV};
std::set<RiaDefines::WellPathComponentType> supportedTypes = {RiaDefines::WellPathComponentType::ICD,
RiaDefines::WellPathComponentType::AICD,
RiaDefines::WellPathComponentType::ICV};
for ( RiaDefines::WellPathComponentType type : supportedTypes )
{
options.push_back( caf::PdmOptionItemInfo( CompletionTypeEnum::uiText( type ), type ) );
@@ -195,7 +198,7 @@ void RimValveTemplate::defineUiOrdering( QString uiConfigName, caf::PdmUiOrderin
uiOrdering.add( &m_type );
uiOrdering.add( &m_userLabel );
uiOrdering.add( &m_valveTemplateUnit );
if ( m_type() == RiaDefines::ICV || m_type() == RiaDefines::ICD )
if ( m_type() == RiaDefines::WellPathComponentType::ICV || m_type() == RiaDefines::WellPathComponentType::ICD )
{
if ( m_valveTemplateUnit == RiaEclipseUnitTools::UNITS_METRIC )
{
@@ -207,7 +210,7 @@ void RimValveTemplate::defineUiOrdering( QString uiConfigName, caf::PdmUiOrderin
}
}
if ( m_type() == RiaDefines::ICV || m_type() == RiaDefines::ICD )
if ( m_type() == RiaDefines::WellPathComponentType::ICV || m_type() == RiaDefines::WellPathComponentType::ICD )
{
caf::PdmUiGroup* group = uiOrdering.addNewGroup( "MSW Valve Parameters" );
group->add( &m_orificeDiameter );
@@ -257,15 +260,15 @@ void RimValveTemplate::fieldChangedByUi( const caf::PdmFieldHandle* changedField
void RimValveTemplate::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/ )
{
this->setName( fullLabel() );
if ( m_type() == RiaDefines::ICV )
if ( m_type() == RiaDefines::WellPathComponentType::ICV )
{
this->setUiIconFromResourceString( ":/ICVValve16x16.png" );
}
else if ( m_type() == RiaDefines::ICD )
else if ( m_type() == RiaDefines::WellPathComponentType::ICD )
{
this->setUiIconFromResourceString( ":/ICDValve16x16.png" );
}
else if ( m_type() == RiaDefines::AICD )
else if ( m_type() == RiaDefines::WellPathComponentType::AICD )
{
this->setUiIconFromResourceString( ":/AICDValve16x16.png" );
}

View File

@@ -108,15 +108,15 @@ void RimValveTemplateCollection::setDefaultUnitSystemBasedOnLoadedCases()
void RimValveTemplateCollection::addDefaultValveTemplates()
{
RimValveTemplate* aicd = new RimValveTemplate;
aicd->setType( RiaDefines::AICD );
aicd->setType( RiaDefines::WellPathComponentType::AICD );
aicd->setUserLabel( "Valve Template #1" );
RimValveTemplate* icd = new RimValveTemplate;
icd->setType( RiaDefines::ICD );
icd->setType( RiaDefines::WellPathComponentType::ICD );
icd->setUserLabel( "Valve Template #2" );
RimValveTemplate* icv = new RimValveTemplate;
icv->setType( RiaDefines::ICV );
icv->setType( RiaDefines::WellPathComponentType::ICV );
icv->setUserLabel( "Valve Template #3" );
addValveTemplate( aicd );

View File

@@ -76,7 +76,7 @@ RimWellPathValve::~RimWellPathValve()
//--------------------------------------------------------------------------------------------------
void RimWellPathValve::perforationIntervalUpdated()
{
if ( componentType() == RiaDefines::ICV )
if ( componentType() == RiaDefines::WellPathComponentType::ICV )
{
const RimPerforationInterval* perfInterval = nullptr;
this->firstAncestorOrThisOfType( perfInterval );
@@ -84,7 +84,8 @@ void RimWellPathValve::perforationIntervalUpdated()
double endMD = perfInterval->endMD();
m_measuredDepth = cvf::Math::clamp( m_measuredDepth(), std::min( startMD, endMD ), std::max( startMD, endMD ) );
}
else if ( componentType() == RiaDefines::ICD || componentType() == RiaDefines::AICD )
else if ( componentType() == RiaDefines::WellPathComponentType::ICD ||
componentType() == RiaDefines::WellPathComponentType::AICD )
{
m_multipleValveLocations->perforationIntervalUpdated();
}
@@ -121,11 +122,12 @@ void RimWellPathValve::multipleValveGeometryUpdated()
std::vector<double> RimWellPathValve::valveLocations() const
{
std::vector<double> valveDepths;
if ( componentType() == RiaDefines::ICV )
if ( componentType() == RiaDefines::WellPathComponentType::ICV )
{
valveDepths.push_back( m_measuredDepth );
}
else if ( componentType() == RiaDefines::ICD || componentType() == RiaDefines::AICD )
else if ( componentType() == RiaDefines::WellPathComponentType::ICD ||
componentType() == RiaDefines::WellPathComponentType::AICD )
{
valveDepths = m_multipleValveLocations->valveLocations();
}
@@ -179,13 +181,13 @@ void RimWellPathValve::setValveTemplate( RimValveTemplate* valveTemplate )
//--------------------------------------------------------------------------------------------------
void RimWellPathValve::applyValveLabelAndIcon()
{
if ( componentType() == RiaDefines::ICV )
if ( componentType() == RiaDefines::WellPathComponentType::ICV )
{
this->setUiIconFromResourceString( ":/ICVValve16x16.png" );
QString fullName = QString( "%1: %2" ).arg( componentLabel() ).arg( m_measuredDepth() );
this->setName( fullName );
}
else if ( componentType() == RiaDefines::ICD )
else if ( componentType() == RiaDefines::WellPathComponentType::ICD )
{
this->setUiIconFromResourceString( ":/ICDValve16x16.png" );
QString fullName = QString( "%1 %2: %3 - %4" )
@@ -195,7 +197,7 @@ void RimWellPathValve::applyValveLabelAndIcon()
.arg( m_multipleValveLocations->rangeEnd() );
this->setName( fullName );
}
else if ( componentType() == RiaDefines::AICD )
else if ( componentType() == RiaDefines::WellPathComponentType::AICD )
{
this->setUiIconFromResourceString( ":/AICDValve16x16.png" );
QString fullName = QString( "%1 %2: %3 - %4" )
@@ -307,7 +309,7 @@ RiaDefines::WellPathComponentType RimWellPathValve::componentType() const
{
return m_valveTemplate()->type();
}
return RiaDefines::UNDEFINED_COMPONENT;
return RiaDefines::WellPathComponentType::UNDEFINED_COMPONENT;
}
//--------------------------------------------------------------------------------------------------
@@ -315,7 +317,7 @@ RiaDefines::WellPathComponentType RimWellPathValve::componentType() const
//--------------------------------------------------------------------------------------------------
QString RimWellPathValve::componentLabel() const
{
if ( componentType() == RiaDefines::ICD )
if ( componentType() == RiaDefines::WellPathComponentType::ICD )
{
if ( m_multipleValveLocations->valveLocations().size() > 1 )
{
@@ -326,7 +328,7 @@ QString RimWellPathValve::componentLabel() const
return "ICD";
}
}
else if ( componentType() == RiaDefines::AICD )
else if ( componentType() == RiaDefines::WellPathComponentType::AICD )
{
if ( m_multipleValveLocations->valveLocations().size() > 1 )
{
@@ -337,7 +339,7 @@ QString RimWellPathValve::componentLabel() const
return "AICD";
}
}
else if ( componentType() == RiaDefines::ICV )
else if ( componentType() == RiaDefines::WellPathComponentType::ICV )
{
return "ICV";
}
@@ -349,15 +351,15 @@ QString RimWellPathValve::componentLabel() const
//--------------------------------------------------------------------------------------------------
QString RimWellPathValve::componentTypeLabel() const
{
if ( componentType() == RiaDefines::ICD )
if ( componentType() == RiaDefines::WellPathComponentType::ICD )
{
return "ICD";
}
else if ( componentType() == RiaDefines::AICD )
else if ( componentType() == RiaDefines::WellPathComponentType::AICD )
{
return "AICD";
}
else if ( componentType() == RiaDefines::ICV )
else if ( componentType() == RiaDefines::WellPathComponentType::ICV )
{
return "ICV";
}
@@ -377,7 +379,7 @@ cvf::Color3f RimWellPathValve::defaultComponentColor() const
//--------------------------------------------------------------------------------------------------
double RimWellPathValve::startMD() const
{
if ( componentType() == RiaDefines::ICV )
if ( componentType() == RiaDefines::WellPathComponentType::ICV )
{
return m_measuredDepth;
}
@@ -396,7 +398,7 @@ double RimWellPathValve::startMD() const
//--------------------------------------------------------------------------------------------------
double RimWellPathValve::endMD() const
{
if ( componentType() == RiaDefines::ICV )
if ( componentType() == RiaDefines::WellPathComponentType::ICV )
{
return m_measuredDepth + 0.5;
}
@@ -493,9 +495,10 @@ void RimWellPathValve::defineUiOrdering( QString uiConfigName, caf::PdmUiOrderin
uiOrdering.add( &m_createValveTemplate, false );
}
if ( componentType() == RiaDefines::ICV || componentType() == RiaDefines::ICD )
if ( componentType() == RiaDefines::WellPathComponentType::ICV ||
componentType() == RiaDefines::WellPathComponentType::ICD )
{
if ( componentType() == RiaDefines::ICV )
if ( componentType() == RiaDefines::WellPathComponentType::ICV )
{
RimWellPath* wellPath;
firstAncestorOrThisOfType( wellPath );
@@ -514,7 +517,8 @@ void RimWellPathValve::defineUiOrdering( QString uiConfigName, caf::PdmUiOrderin
}
}
if ( componentType() == RiaDefines::ICD || componentType() == RiaDefines::AICD )
if ( componentType() == RiaDefines::WellPathComponentType::ICD ||
componentType() == RiaDefines::WellPathComponentType::AICD )
{
caf::PdmUiGroup* group = uiOrdering.addNewGroup( "Multiple Valve Locations" );
m_multipleValveLocations->uiOrdering( uiConfigName, *group );

View File

@@ -100,8 +100,8 @@ RimWellAllocationPlot::RimWellAllocationPlot()
CAF_PDM_InitFieldNoDefault( &m_accumulatedWellFlowPlot, "AccumulatedWellFlowPlot", "Accumulated Well Flow", "", "", "" );
m_accumulatedWellFlowPlot.uiCapability()->setUiHidden( true );
m_accumulatedWellFlowPlot = new RimWellLogPlot;
m_accumulatedWellFlowPlot->setDepthUnit( RiaDefines::UNIT_NONE );
m_accumulatedWellFlowPlot->setDepthType( RiaDefines::CONNECTION_NUMBER );
m_accumulatedWellFlowPlot->setDepthUnit( RiaDefines::DepthUnitType::UNIT_NONE );
m_accumulatedWellFlowPlot->setDepthType( RiaDefines::DepthTypeEnum::CONNECTION_NUMBER );
m_accumulatedWellFlowPlot->setLegendsVisible( false );
m_accumulatedWellFlowPlot->uiCapability()->setUiIconFromResourceString( ":/WellFlowPlot16x16.png" );
@@ -125,8 +125,9 @@ RimWellAllocationPlot::RimWellAllocationPlot()
this->setAsPlotMdiWindow();
m_accumulatedWellFlowPlot->setAvailableDepthUnits( {} );
m_accumulatedWellFlowPlot->setAvailableDepthTypes(
{RiaDefines::CONNECTION_NUMBER, RiaDefines::TRUE_VERTICAL_DEPTH, RiaDefines::PSEUDO_LENGTH} );
m_accumulatedWellFlowPlot->setAvailableDepthTypes( {RiaDefines::DepthTypeEnum::CONNECTION_NUMBER,
RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH,
RiaDefines::DepthTypeEnum::PSEUDO_LENGTH} );
m_accumulatedWellFlowPlot->setCommonDataSourceEnabled( false );
@@ -282,7 +283,7 @@ void RimWellAllocationPlot::updateFromWell()
auto depthType = accumulatedWellFlowPlot()->depthType();
if ( depthType == RiaDefines::MEASURED_DEPTH ) return;
if ( depthType == RiaDefines::DepthTypeEnum::MEASURED_DEPTH ) return;
// Create tracks and curves from the calculated data
@@ -300,11 +301,11 @@ void RimWellAllocationPlot::updateFromWell()
accumulatedWellFlowPlot()->addPlot( plotTrack );
const std::vector<double>& depthValues = depthType == RiaDefines::CONNECTION_NUMBER
const std::vector<double>& depthValues = depthType == RiaDefines::DepthTypeEnum::CONNECTION_NUMBER
? wfCalculator->connectionNumbersFromTop( brIdx )
: depthType == RiaDefines::PSEUDO_LENGTH
: depthType == RiaDefines::DepthTypeEnum::PSEUDO_LENGTH
? wfCalculator->pseudoLengthFromTop( brIdx )
: depthType == RiaDefines::TRUE_VERTICAL_DEPTH
: depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH
? wfCalculator->trueVerticalDepth( brIdx )
: std::vector<double>();
@@ -314,7 +315,7 @@ void RimWellAllocationPlot::updateFromWell()
{
std::vector<double> curveDepthValues = depthValues;
std::vector<double> accFlow;
if ( depthType == RiaDefines::CONNECTION_NUMBER )
if ( depthType == RiaDefines::DepthTypeEnum::CONNECTION_NUMBER )
{
accFlow = ( m_flowType == ACCUMULATED
? wfCalculator->accumulatedTracerFlowPrConnection( tracerName, brIdx )
@@ -341,7 +342,8 @@ void RimWellAllocationPlot::updateFromWell()
}
}
}
else if ( depthType == RiaDefines::PSEUDO_LENGTH || depthType == RiaDefines::TRUE_VERTICAL_DEPTH )
else if ( depthType == RiaDefines::DepthTypeEnum::PSEUDO_LENGTH ||
depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH )
{
accFlow = ( m_flowType == ACCUMULATED
? wfCalculator->accumulatedTracerFlowPrPseudoLength( tracerName, brIdx )

View File

@@ -374,11 +374,11 @@ void RimWellDistributionPlot::onLoadDataAndUpdate()
}
QString phaseString = "N/A";
if ( m_phase == RiaDefines::OIL_PHASE )
if ( m_phase == RiaDefines::PhaseType::OIL_PHASE )
phaseString = "Oil";
else if ( m_phase == RiaDefines::GAS_PHASE )
else if ( m_phase == RiaDefines::PhaseType::GAS_PHASE )
phaseString = "Gas";
else if ( m_phase == RiaDefines::WATER_PHASE )
else if ( m_phase == RiaDefines::PhaseType::WATER_PHASE )
phaseString = "Water";
const QString timeStepName = m_case ? m_case->timeStepName( m_timeStepIndex ) : "N/A";

View File

@@ -40,7 +40,7 @@ class RimWellDistributionPlot : public RimPlot
CAF_PDM_HEADER_INIT;
public:
explicit RimWellDistributionPlot( RiaDefines::PhaseType phase = RiaDefines::OIL_PHASE );
explicit RimWellDistributionPlot( RiaDefines::PhaseType phase = RiaDefines::PhaseType::OIL_PHASE );
~RimWellDistributionPlot() override;
void setDataSourceParameters( RimEclipseResultCase* eclipseResultCase, int timeStepIndex, QString targetWellName );

View File

@@ -95,9 +95,9 @@ RimWellDistributionPlotCollection::RimWellDistributionPlotCollection()
setAsPlotMdiWindow();
addPlot( new RimWellDistributionPlot( RiaDefines::OIL_PHASE ) );
addPlot( new RimWellDistributionPlot( RiaDefines::GAS_PHASE ) );
addPlot( new RimWellDistributionPlot( RiaDefines::WATER_PHASE ) );
addPlot( new RimWellDistributionPlot( RiaDefines::PhaseType::OIL_PHASE ) );
addPlot( new RimWellDistributionPlot( RiaDefines::PhaseType::GAS_PHASE ) );
addPlot( new RimWellDistributionPlot( RiaDefines::PhaseType::WATER_PHASE ) );
}
//--------------------------------------------------------------------------------------------------

View File

@@ -254,9 +254,9 @@ void RimWellFlowRateCurve::updateStackedPlotData()
RimWellLogPlot::DepthTypeEnum depthType = wellLogPlot->depthType();
RiaDefines::DepthUnitType displayUnit = wellLogPlot->depthUnit();
if ( depthType == RiaDefines::CONNECTION_NUMBER )
if ( depthType == RiaDefines::DepthTypeEnum::CONNECTION_NUMBER )
{
displayUnit = RiaDefines::UNIT_NONE;
displayUnit = RiaDefines::DepthUnitType::UNIT_NONE;
}
std::vector<double> depthValues;
@@ -323,7 +323,7 @@ bool RimWellFlowRateCurve::isUsingConnectionNumberDepthType() const
{
RimWellLogPlot* wellLogPlot;
firstAncestorOrThisOfType( wellLogPlot );
if ( wellLogPlot && wellLogPlot->depthType() == RiaDefines::CONNECTION_NUMBER )
if ( wellLogPlot && wellLogPlot->depthType() == RiaDefines::DepthTypeEnum::CONNECTION_NUMBER )
{
return true;
}
@@ -350,7 +350,7 @@ void RimWellFlowRateCurve::setFlowValuesPrDepthValue( const QString&
const std::vector<double>& depthValues,
const std::vector<double>& flowRates )
{
this->setValuesAndDepths( flowRates, depthValues, depthType, 0.0, RiaDefines::UNIT_NONE, false );
this->setValuesAndDepths( flowRates, depthValues, depthType, 0.0, RiaDefines::DepthUnitType::UNIT_NONE, false );
m_curveAutoName = curveName;
}

View File

@@ -140,7 +140,7 @@ RimWellPltPlot::RimWellPltPlot()
m_isOnLoad = true;
m_plotLegendsHorizontal = false;
setAvailableDepthTypes( {RiaDefines::MEASURED_DEPTH} );
setAvailableDepthTypes( {RiaDefines::DepthTypeEnum::MEASURED_DEPTH} );
}
//--------------------------------------------------------------------------------------------------
@@ -169,13 +169,13 @@ void RimWellPltPlot::setPlotXAxisTitles( RimWellLogTrack* plotTrack )
// Todo: Handle different units in the relevant las channels
switch ( source.wellLogFile()->wellLogFileData()->depthUnit() )
{
case RiaDefines::UNIT_METER:
case RiaDefines::DepthUnitType::UNIT_METER:
presentUnitSystems.insert( RiaEclipseUnitTools::UNITS_METRIC );
break;
case RiaDefines::UNIT_FEET:
case RiaDefines::DepthUnitType::UNIT_FEET:
presentUnitSystems.insert( RiaEclipseUnitTools::UNITS_FIELD );
break;
case RiaDefines::UNIT_NONE:
case RiaDefines::DepthUnitType::UNIT_NONE:
presentUnitSystems.insert( RiaEclipseUnitTools::UNITS_UNKNOWN );
break;
}
@@ -657,8 +657,10 @@ void RimWellPltPlot::syncCurvesFromUiSelection()
RiaEclipseUnitTools::UnitSystem unitSystem = RiaEclipseUnitTools::UNITS_UNKNOWN;
{
RiaDefines::DepthUnitType depthUnit = wellLogFileData->depthUnit();
if ( depthUnit == RiaDefines::UNIT_FEET ) unitSystem = RiaEclipseUnitTools::UNITS_FIELD;
if ( depthUnit == RiaDefines::UNIT_METER ) unitSystem = RiaEclipseUnitTools::UNITS_METRIC;
if ( depthUnit == RiaDefines::DepthUnitType::UNIT_FEET )
unitSystem = RiaEclipseUnitTools::UNITS_FIELD;
if ( depthUnit == RiaDefines::DepthUnitType::UNIT_METER )
unitSystem = RiaEclipseUnitTools::UNITS_METRIC;
}
for ( const ChannelValNameIdxTuple& channelInfo : sortedChannels )

View File

@@ -95,7 +95,7 @@ RimWellRftPlot::RimWellRftPlot()
m_wellLogPlot_OBSOLETE.uiCapability()->setUiHidden( true );
m_wellLogPlot_OBSOLETE.xmlCapability()->setIOWritable( false );
m_depthType = RiaDefines::TRUE_VERTICAL_DEPTH;
m_depthType = RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH;
CAF_PDM_InitFieldNoDefault( &m_wellPathNameOrSimWellName, "WellName", "Well Name", "", "", "" );
CAF_PDM_InitField( &m_branchIndex, "BranchIndex", 0, "Branch Index", "", "", "" );
@@ -128,7 +128,7 @@ RimWellRftPlot::RimWellRftPlot()
// TODO: may want to support TRUE_VERTICAL_DEPTH_RKB in the future
// It was developed for regular well log plots and requires some more work for RFT plots.
setAvailableDepthTypes( {RiaDefines::MEASURED_DEPTH, RiaDefines::TRUE_VERTICAL_DEPTH} );
setAvailableDepthTypes( {RiaDefines::DepthTypeEnum::MEASURED_DEPTH, RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH} );
m_nameConfig->setCustomName( "RFT Plot" );
m_plotLegendsHorizontal = false;
@@ -647,7 +647,7 @@ void RimWellRftPlot::updateCurvesInPlot( const std::set<RiaRftPltCurveDefinition
}
}
if ( depthType() == RiaDefines::MEASURED_DEPTH )
if ( depthType() == RiaDefines::DepthTypeEnum::MEASURED_DEPTH )
{
assignWellPathToExtractionCurves();
}
@@ -1074,7 +1074,7 @@ void RimWellRftPlot::onLoadDataAndUpdate()
updateMdiWindowVisibility();
updateFormationsOnPlot();
if ( depthType() == RiaDefines::MEASURED_DEPTH )
if ( depthType() == RiaDefines::DepthTypeEnum::MEASURED_DEPTH )
{
assignWellPathToExtractionCurves();
}

View File

@@ -573,8 +573,8 @@ void RimGridCrossPlot::updateAxes()
{
if ( !m_plotWidget ) return;
updateAxisInQwt( RiaDefines::PLOT_AXIS_BOTTOM );
updateAxisInQwt( RiaDefines::PLOT_AXIS_LEFT );
updateAxisInQwt( RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM );
updateAxisInQwt( RiaDefines::PlotAxis::PLOT_AXIS_LEFT );
m_plotWidget->updateAnnotationObjects( m_xAxisProperties );
m_plotWidget->updateAnnotationObjects( m_yAxisProperties );
@@ -733,7 +733,7 @@ void RimGridCrossPlot::setYAxisInverted( bool inverted )
//--------------------------------------------------------------------------------------------------
bool RimGridCrossPlot::hasCustomFontSizes( RiaDefines::FontSettingType fontSettingType, int defaultFontSize ) const
{
if ( fontSettingType != RiaDefines::PLOT_FONT ) return false;
if ( fontSettingType != RiaDefines::FontSettingType::PLOT_FONT ) return false;
for ( auto plotAxis : allPlotAxes() )
{
@@ -759,7 +759,7 @@ bool RimGridCrossPlot::applyFontSize( RiaDefines::FontSettingType fontSettingTyp
bool forceChange /*= false*/ )
{
bool anyChange = false;
if ( fontSettingType == RiaDefines::PLOT_FONT && m_plotWidget )
if ( fontSettingType == RiaDefines::FontSettingType::PLOT_FONT && m_plotWidget )
{
for ( auto plotAxis : allPlotAxes() )
{
@@ -819,8 +819,8 @@ void RimGridCrossPlot::updateZoomInQwt()
{
if ( m_plotWidget )
{
updateAxisInQwt( RiaDefines::PLOT_AXIS_LEFT );
updateAxisInQwt( RiaDefines::PLOT_AXIS_BOTTOM );
updateAxisInQwt( RiaDefines::PlotAxis::PLOT_AXIS_LEFT );
updateAxisInQwt( RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM );
m_plotWidget->updateAxes();
updateZoomFromQwt();
m_plotWidget->scheduleReplot();
@@ -832,8 +832,8 @@ void RimGridCrossPlot::updateZoomInQwt()
//--------------------------------------------------------------------------------------------------
void RimGridCrossPlot::updateZoomFromQwt()
{
updateAxisFromQwt( RiaDefines::PLOT_AXIS_LEFT );
updateAxisFromQwt( RiaDefines::PLOT_AXIS_BOTTOM );
updateAxisFromQwt( RiaDefines::PlotAxis::PLOT_AXIS_LEFT );
updateAxisFromQwt( RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM );
}
//--------------------------------------------------------------------------------------------------
@@ -894,7 +894,7 @@ void RimGridCrossPlot::updateAxisInQwt( RiaDefines::PlotAxis axisType )
RimPlotAxisProperties* axisProperties = m_xAxisProperties();
QString axisParameterString = xAxisParameterString();
if ( axisType == RiaDefines::PLOT_AXIS_LEFT )
if ( axisType == RiaDefines::PlotAxis::PLOT_AXIS_LEFT )
{
axisProperties = m_yAxisProperties();
axisParameterString = yAxisParameterString();
@@ -989,7 +989,7 @@ void RimGridCrossPlot::updateAxisFromQwt( RiaDefines::PlotAxis axisType )
RimPlotAxisProperties* axisProperties = m_xAxisProperties();
QwtInterval axisRange = xAxisRange;
if ( axisType == RiaDefines::PLOT_AXIS_LEFT )
if ( axisType == RiaDefines::PlotAxis::PLOT_AXIS_LEFT )
{
axisProperties = m_yAxisProperties();
axisRange = yAxisRange;

View File

@@ -737,7 +737,7 @@ void Rim3dView::setupBeforeSave()
//--------------------------------------------------------------------------------------------------
void Rim3dView::setMeshOnlyDrawstyle()
{
meshMode.setValueWithFieldChanged( RiaDefines::FULL_MESH );
meshMode.setValueWithFieldChanged( RiaDefines::MeshModeType::FULL_MESH );
surfaceMode.setValueWithFieldChanged( NO_SURFACE );
}
@@ -747,7 +747,7 @@ void Rim3dView::setMeshOnlyDrawstyle()
void Rim3dView::setMeshSurfDrawstyle()
{
surfaceMode.setValueWithFieldChanged( SURFACE );
meshMode.setValueWithFieldChanged( RiaDefines::FULL_MESH );
meshMode.setValueWithFieldChanged( RiaDefines::MeshModeType::FULL_MESH );
}
//--------------------------------------------------------------------------------------------------
@@ -756,7 +756,7 @@ void Rim3dView::setMeshSurfDrawstyle()
void Rim3dView::setFaultMeshSurfDrawstyle()
{
surfaceMode.setValueWithFieldChanged( SURFACE );
meshMode.setValueWithFieldChanged( RiaDefines::FAULTS_MESH );
meshMode.setValueWithFieldChanged( RiaDefines::MeshModeType::FAULTS_MESH );
}
//--------------------------------------------------------------------------------------------------
@@ -765,7 +765,7 @@ void Rim3dView::setFaultMeshSurfDrawstyle()
void Rim3dView::setSurfOnlyDrawstyle()
{
surfaceMode.setValueWithFieldChanged( SURFACE );
meshMode.setValueWithFieldChanged( RiaDefines::NO_MESH );
meshMode.setValueWithFieldChanged( RiaDefines::MeshModeType::NO_MESH );
}
//--------------------------------------------------------------------------------------------------
@@ -1252,14 +1252,14 @@ void Rim3dView::updateDisplayModelVisibility()
mask |= intersectionCellFaceBit;
}
if ( meshMode == RiaDefines::FULL_MESH )
if ( meshMode == RiaDefines::MeshModeType::FULL_MESH )
{
mask |= uintMeshSurfaceBit;
mask |= uintMeshFaultBit;
mask |= intersectionCellMeshBit;
mask |= intersectionFaultMeshBit;
}
else if ( meshMode == RiaDefines::FAULTS_MESH )
else if ( meshMode == RiaDefines::MeshModeType::FAULTS_MESH )
{
mask |= uintMeshFaultBit;
mask |= intersectionFaultMeshBit;
@@ -1327,7 +1327,7 @@ bool Rim3dView::applyFontSize( RiaDefines::FontSettingType fontSettingType,
int fontSize,
bool forceChange /*= false*/ )
{
if ( fontSettingType == RiaDefines::SCENE_FONT )
if ( fontSettingType == RiaDefines::FontSettingType::SCENE_FONT )
{
applyBackgroundColorAndFontChanges();
return true;

View File

@@ -80,7 +80,7 @@ void Rim3dWellLogRftCurve::curveValuesAndMds( std::vector<double>* values, std::
// These values are for a simulation well
*values = curveData->xValues();
*measuredDepthValues = curveData->depths( RiaDefines::MEASURED_DEPTH );
*measuredDepthValues = curveData->depths( RiaDefines::DepthTypeEnum::MEASURED_DEPTH );
}
//--------------------------------------------------------------------------------------------------

View File

@@ -89,10 +89,10 @@ RimDepthTrackPlot::RimDepthTrackPlot()
CAF_PDM_InitField( &m_plotWindowTitle, "PlotDescription", QString( "" ), "Name", "", "", "" );
m_plotWindowTitle.xmlCapability()->setIOWritable( false );
caf::AppEnum<RimDepthTrackPlot::DepthTypeEnum> depthType = RiaDefines::MEASURED_DEPTH;
caf::AppEnum<RimDepthTrackPlot::DepthTypeEnum> depthType = RiaDefines::DepthTypeEnum::MEASURED_DEPTH;
CAF_PDM_InitScriptableFieldWithIO( &m_depthType, "DepthType", depthType, "Type", "", "", "" );
caf::AppEnum<RiaDefines::DepthUnitType> depthUnit = RiaDefines::UNIT_METER;
caf::AppEnum<RiaDefines::DepthUnitType> depthUnit = RiaDefines::DepthUnitType::UNIT_METER;
CAF_PDM_InitScriptableFieldWithIO( &m_depthUnit, "DepthUnit", depthUnit, "Unit", "", "", "" );
CAF_PDM_InitScriptableFieldWithIO( &m_minVisibleDepth, "MinimumDepth", 0.0, "Min", "", "", "" );
@@ -112,8 +112,10 @@ RimDepthTrackPlot::RimDepthTrackPlot()
CAF_PDM_InitFieldNoDefault( &m_plots, "Tracks", "", "", "", "" );
m_plots.uiCapability()->setUiHidden( true );
m_availableDepthUnits = {RiaDefines::UNIT_METER, RiaDefines::UNIT_FEET};
m_availableDepthTypes = {RiaDefines::MEASURED_DEPTH, RiaDefines::TRUE_VERTICAL_DEPTH, RiaDefines::TRUE_VERTICAL_DEPTH_RKB};
m_availableDepthUnits = {RiaDefines::DepthUnitType::UNIT_METER, RiaDefines::DepthUnitType::UNIT_FEET};
m_availableDepthTypes = {RiaDefines::DepthTypeEnum::MEASURED_DEPTH,
RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH,
RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB};
m_minAvailableDepth = HUGE_VAL;
m_maxAvailableDepth = -HUGE_VAL;
@@ -771,7 +773,7 @@ void RimDepthTrackPlot::fieldChangedByUi( const caf::PdmFieldHandle* changedFiel
{
m_isAutoScaleDepthEnabled = true;
bool isTVDRKB = m_depthType == RiaDefines::TRUE_VERTICAL_DEPTH_RKB;
bool isTVDRKB = m_depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB;
m_nameConfig->setAutoNameTags( m_nameConfig->addCaseName(),
m_nameConfig->addWellName(),
m_nameConfig->addTimeStep(),
@@ -959,38 +961,38 @@ QString RimDepthTrackPlot::depthAxisTitle() const
switch ( m_depthType.value() )
{
case RiaDefines::MEASURED_DEPTH:
case RiaDefines::DepthTypeEnum::MEASURED_DEPTH:
depthTitle = "MD";
break;
case RiaDefines::TRUE_VERTICAL_DEPTH:
case RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH:
depthTitle = "TVDMSL";
break;
case RiaDefines::PSEUDO_LENGTH:
case RiaDefines::DepthTypeEnum::PSEUDO_LENGTH:
depthTitle = "PL";
break;
case RiaDefines::CONNECTION_NUMBER:
case RiaDefines::DepthTypeEnum::CONNECTION_NUMBER:
depthTitle = "Connection";
break;
case RiaDefines::TRUE_VERTICAL_DEPTH_RKB:
case RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB:
depthTitle = "TVDRKB";
break;
}
if ( m_depthType() == RiaDefines::CONNECTION_NUMBER ) return depthTitle;
if ( m_depthType() == RiaDefines::DepthTypeEnum::CONNECTION_NUMBER ) return depthTitle;
if ( m_depthUnit == RiaDefines::UNIT_METER )
if ( m_depthUnit == RiaDefines::DepthUnitType::UNIT_METER )
{
depthTitle += " [m]";
}
else if ( m_depthUnit == RiaDefines::UNIT_FEET )
else if ( m_depthUnit == RiaDefines::DepthUnitType::UNIT_FEET )
{
depthTitle += " [ft]";
}
else if ( m_depthUnit == RiaDefines::UNIT_NONE )
else if ( m_depthUnit == RiaDefines::DepthUnitType::UNIT_NONE )
{
depthTitle += "";
}

View File

@@ -162,7 +162,7 @@ void RimEclipseContourMapView::initAfterRead()
disablePerspectiveProjectionField();
setShowGridBox( false );
meshMode.setValue( RiaDefines::NO_MESH );
meshMode.setValue( RiaDefines::MeshModeType::NO_MESH );
surfaceMode.setValue( FAULTS );
setFaultVisParameters();
scheduleCreateDisplayModelAndRedraw();

View File

@@ -411,15 +411,17 @@ void RimEclipsePropertyFilter::computeResultValueRange()
}
else if ( m_resultDefinition->resultVariable() == RiaDefines::completionTypeResultName() )
{
std::vector<RiaDefines::WellPathComponentType> componentTypes = {RiaDefines::WELL_PATH,
RiaDefines::PERFORATION_INTERVAL,
RiaDefines::FISHBONES,
RiaDefines::FRACTURE};
std::vector<RiaDefines::WellPathComponentType> componentTypes =
{RiaDefines::WellPathComponentType::WELL_PATH,
RiaDefines::WellPathComponentType::PERFORATION_INTERVAL,
RiaDefines::WellPathComponentType::FISHBONES,
RiaDefines::WellPathComponentType::FRACTURE};
std::vector<std::pair<QString, int>> ctNamesAndValues;
for ( RiaDefines::WellPathComponentType type : componentTypes )
{
ctNamesAndValues.push_back(
std::make_pair( caf::AppEnum<RiaDefines::WellPathComponentType>::uiText( type ), type ) );
std::make_pair( caf::AppEnum<RiaDefines::WellPathComponentType>::uiText( type ),
static_cast<int>( type ) ) );
}
setCategoryNamesAndValues( ctNamesAndValues );
}

View File

@@ -1957,22 +1957,26 @@ void RimEclipseResultDefinition::updateRangesForExplicitLegends( RimRegularLegen
const std::vector<int>& visibleCategories =
cellResultsData->uniqueCellScalarValues( this->eclipseResultAddress() );
std::vector<RiaDefines::WellPathComponentType> supportedCompletionTypes = {RiaDefines::WELL_PATH,
RiaDefines::FISHBONES,
RiaDefines::PERFORATION_INTERVAL,
RiaDefines::FRACTURE};
std::vector<RiaDefines::WellPathComponentType> supportedCompletionTypes =
{RiaDefines::WellPathComponentType::WELL_PATH,
RiaDefines::WellPathComponentType::FISHBONES,
RiaDefines::WellPathComponentType::PERFORATION_INTERVAL,
RiaDefines::WellPathComponentType::FRACTURE};
RiaColorTables::WellPathComponentColors colors = RiaColorTables::wellPathComponentColors();
std::vector<std::tuple<QString, int, cvf::Color3ub>> categories;
for ( auto completionType : supportedCompletionTypes )
{
if ( std::find( visibleCategories.begin(), visibleCategories.end(), completionType ) !=
visibleCategories.end() )
if ( std::find( visibleCategories.begin(),
visibleCategories.end(),
static_cast<int>( completionType ) ) != visibleCategories.end() )
{
QString categoryText =
caf::AppEnum<RiaDefines::WellPathComponentType>::uiText( completionType );
categories.push_back( std::make_tuple( categoryText, completionType, colors[completionType] ) );
categories.push_back( std::make_tuple( categoryText,
static_cast<int>( completionType ),
colors[completionType] ) );
}
}

View File

@@ -175,7 +175,7 @@ void RimGeoMechContourMapView::initAfterRead()
m_gridCollection->setActive( false ); // This is also not added to the tree view, so cannot be enabled.
disablePerspectiveProjectionField();
setShowGridBox( false );
meshMode.setValue( RiaDefines::NO_MESH );
meshMode.setValue( RiaDefines::MeshModeType::NO_MESH );
surfaceMode.setValue( FAULTS );
scheduleCreateDisplayModelAndRedraw();
}

View File

@@ -74,7 +74,7 @@ RimGridTimeHistoryCurve::RimGridTimeHistoryCurve()
CAF_PDM_InitField( &m_plotAxis,
"PlotAxis",
caf::AppEnum<RiaDefines::PlotAxis>( RiaDefines::PLOT_AXIS_LEFT ),
caf::AppEnum<RiaDefines::PlotAxis>( RiaDefines::PlotAxis::PLOT_AXIS_LEFT ),
"Axis",
"",
"",
@@ -711,7 +711,7 @@ void RimGridTimeHistoryCurve::updateQwtPlotAxis()
{
if ( m_qwtPlotCurve )
{
if ( this->yAxis() == RiaDefines::PLOT_AXIS_LEFT )
if ( this->yAxis() == RiaDefines::PlotAxis::PLOT_AXIS_LEFT )
{
m_qwtPlotCurve->setYAxis( QwtPlot::yLeft );
}

View File

@@ -375,7 +375,7 @@ bool RimGridView::isGridVisualizationMode() const
bool RimGridView::hasCustomFontSizes( RiaDefines::FontSettingType fontSettingType, int defaultFontSize ) const
{
bool hasCustomFonts = Rim3dView::hasCustomFontSizes( fontSettingType, defaultFontSize );
if ( fontSettingType == RiaDefines::ANNOTATION_FONT )
if ( fontSettingType == RiaDefines::FontSettingType::ANNOTATION_FONT )
{
auto annotations = annotationCollection();
if ( annotations )
@@ -396,7 +396,7 @@ bool RimGridView::applyFontSize( RiaDefines::FontSettingType fontSettingType,
bool forceChange /*= false*/ )
{
bool anyChange = Rim3dView::applyFontSize( fontSettingType, oldFontSize, fontSize, forceChange );
if ( fontSettingType == RiaDefines::ANNOTATION_FONT )
if ( fontSettingType == RiaDefines::FontSettingType::ANNOTATION_FONT )
{
auto annotations = annotationCollection();
if ( annotations )
@@ -448,7 +448,7 @@ void RimGridView::initAfterRead()
// This change was introduced in https://github.com/OPM/ResInsight/commit/f7bfe8d0
bool isGridVisualizationModeBefore_2018_1_1 =
( ( surfaceMode() == RimGridView::SURFACE ) || ( meshMode() == RiaDefines::FULL_MESH ) );
( ( surfaceMode() == RimGridView::SURFACE ) || ( meshMode() == RiaDefines::MeshModeType::FULL_MESH ) );
m_gridCollection->setActive( isGridVisualizationModeBefore_2018_1_1 );
if ( !isGridVisualizationModeBefore_2018_1_1 )
@@ -457,7 +457,7 @@ void RimGridView::initAfterRead()
// If was showing with mesh and/or surfaces, turn to full mesh/surf mode to show the mesh,
// and to avoid a strange setup when dropping out into grid mode again
if ( surfaceMode() != RimGridView::NO_SURFACE ) surfaceMode = RimGridView::SURFACE;
if ( meshMode() != RiaDefines::NO_MESH ) meshMode = RiaDefines::FULL_MESH;
if ( meshMode() != RiaDefines::MeshModeType::NO_MESH ) meshMode = RiaDefines::MeshModeType::FULL_MESH;
}
}
}

View File

@@ -686,7 +686,7 @@ void RimMultiPlot::recreatePlotWidgets()
//--------------------------------------------------------------------------------------------------
bool RimMultiPlot::hasCustomFontSizes( RiaDefines::FontSettingType fontSettingType, int defaultFontSize ) const
{
if ( fontSettingType == RiaDefines::PLOT_FONT && m_viewer )
if ( fontSettingType == RiaDefines::FontSettingType::PLOT_FONT && m_viewer )
{
if ( m_viewer->fontSize() != defaultFontSize )
{
@@ -716,7 +716,7 @@ bool RimMultiPlot::applyFontSize( RiaDefines::FontSettingType fontSettingType,
bool forceChange /*= false */ )
{
bool somethingChanged = false;
if ( fontSettingType == RiaDefines::PLOT_FONT && m_viewer )
if ( fontSettingType == RiaDefines::FontSettingType::PLOT_FONT && m_viewer )
{
if ( oldFontSize == m_viewer->fontSize() || forceChange )
{

View File

@@ -297,10 +297,10 @@ QString RimPlotAxisProperties::name() const
//--------------------------------------------------------------------------------------------------
RiaDefines::PlotAxis RimPlotAxisProperties::plotAxisType() const
{
if ( m_axis == QwtPlot::yRight ) return RiaDefines::PLOT_AXIS_RIGHT;
if ( m_axis == QwtPlot::xBottom ) return RiaDefines::PLOT_AXIS_BOTTOM;
if ( m_axis == QwtPlot::yRight ) return RiaDefines::PlotAxis::PLOT_AXIS_RIGHT;
if ( m_axis == QwtPlot::xBottom ) return RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM;
return RiaDefines::PLOT_AXIS_LEFT;
return RiaDefines::PlotAxis::PLOT_AXIS_LEFT;
}
//--------------------------------------------------------------------------------------------------

View File

@@ -63,7 +63,7 @@ RimWellBoreStabilityPlot::RimWellBoreStabilityPlot()
m_nameConfig->setCustomName( "Well Bore Stability" );
m_nameConfig->enableAllAutoNameTags( true );
m_commonDataSource->setCaseType( RiaDefines::GEOMECH_ODB_CASE );
m_commonDataSource->setCaseType( RiaDefines::CaseType::GEOMECH_ODB_CASE );
}
//--------------------------------------------------------------------------------------------------

View File

@@ -148,8 +148,10 @@ void RimWellLogCurve::setValuesWithMdAndTVD( const std::vector<double>& xValues,
bool isExtractionCurve,
const QString& xUnits )
{
std::map<RiaDefines::DepthTypeEnum, std::vector<double>> depths = { { RiaDefines::MEASURED_DEPTH, measuredDepths },
{ RiaDefines::TRUE_VERTICAL_DEPTH, tvdMSL } };
std::map<RiaDefines::DepthTypeEnum, std::vector<double>> depths = {{RiaDefines::DepthTypeEnum::MEASURED_DEPTH,
measuredDepths},
{RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH,
tvdMSL}};
setValuesAndDepths( xValues, depths, rkbDiff, depthUnit, isExtractionCurve, xUnits );
}

View File

@@ -69,7 +69,7 @@ bool RimWellLogCurveCommonDataSource::DoubleComparator::operator()( const double
///
//--------------------------------------------------------------------------------------------------
RimWellLogCurveCommonDataSource::RimWellLogCurveCommonDataSource()
: m_caseType( RiaDefines::UNDEFINED_CASE )
: m_caseType( RiaDefines::CaseType::UNDEFINED_CASE )
{
CAF_PDM_InitObject( "Change Data Source", "", "", "" );
@@ -758,12 +758,14 @@ QList<caf::PdmOptionItemInfo>
if ( fieldNeedingOptions == &m_case )
{
if ( m_caseType == RiaDefines::GEOMECH_ODB_CASE )
if ( m_caseType == RiaDefines::CaseType::GEOMECH_ODB_CASE )
{
RimTools::geoMechCaseOptionItems( &options );
}
else if ( m_caseType == RiaDefines::ECLIPSE_RESULT_CASE || m_caseType == RiaDefines::ECLIPSE_INPUT_CASE ||
m_caseType == RiaDefines::ECLIPSE_SOURCE_CASE || m_caseType == RiaDefines::ECLIPSE_STAT_CASE )
else if ( m_caseType == RiaDefines::CaseType::ECLIPSE_RESULT_CASE ||
m_caseType == RiaDefines::CaseType::ECLIPSE_INPUT_CASE ||
m_caseType == RiaDefines::CaseType::ECLIPSE_SOURCE_CASE ||
m_caseType == RiaDefines::CaseType::ECLIPSE_STAT_CASE )
{
RimTools::eclipseCaseOptionItems( &options );
}

View File

@@ -345,7 +345,8 @@ void RimWellLogExtractionCurve::onLoadDataAndUpdate( bool updateParentPlot )
RiaDefines::DepthTypeEnum depthType = wellLogPlot->depthType();
RiaDefines::DepthUnitType displayUnit = wellLogPlot->depthUnit();
if ( depthType == RiaDefines::TRUE_VERTICAL_DEPTH || depthType == RiaDefines::TRUE_VERTICAL_DEPTH_RKB )
if ( depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH ||
depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB )
{
isUsingPseudoLength = false;
}
@@ -450,7 +451,7 @@ void RimWellLogExtractionCurve::extractData( bool* isUsingPseudoLength,
std::vector<double> tvDepthValues;
double rkbDiff = 0.0;
RiaDefines::DepthUnitType depthUnit = RiaDefines::UNIT_METER;
RiaDefines::DepthUnitType depthUnit = RiaDefines::DepthUnitType::UNIT_METER;
QString xUnits = RiaWellLogUnitTools<double>::noUnitString();
if ( eclExtractor.notNull() && eclipseCase )
@@ -477,7 +478,7 @@ void RimWellLogExtractionCurve::extractData( bool* isUsingPseudoLength,
{
// See https://github.com/OPM/ResInsight/issues/538
depthUnit = RiaDefines::UNIT_FEET;
depthUnit = RiaDefines::DepthUnitType::UNIT_FEET;
}
}
else if ( geomExtractor.notNull() ) // geomExtractor
@@ -517,7 +518,7 @@ void RimWellLogExtractionCurve::extractData( bool* isUsingPseudoLength,
{
this->setValuesAndDepths( values,
measuredDepthValues,
RiaDefines::MEASURED_DEPTH,
RiaDefines::DepthTypeEnum::MEASURED_DEPTH,
0.0,
depthUnit,
!performDataSmoothing,

View File

@@ -125,15 +125,15 @@ void RimWellLogFileCurve::onLoadDataAndUpdate( bool updateParentPlot )
std::map<RiaDefines::DepthTypeEnum, std::vector<double>> validDepths;
if ( values.size() == measuredDepthValues.size() )
{
validDepths.insert( std::make_pair( RiaDefines::MEASURED_DEPTH, measuredDepthValues ) );
validDepths.insert( std::make_pair( RiaDefines::DepthTypeEnum::MEASURED_DEPTH, measuredDepthValues ) );
}
if ( values.size() == tvdMslValues.size() )
{
validDepths.insert( std::make_pair( RiaDefines::TRUE_VERTICAL_DEPTH, tvdMslValues ) );
validDepths.insert( std::make_pair( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH, tvdMslValues ) );
}
if ( values.size() == tvdRkbValues.size() )
{
validDepths.insert( std::make_pair( RiaDefines::TRUE_VERTICAL_DEPTH_RKB, tvdRkbValues ) );
validDepths.insert( std::make_pair( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB, tvdRkbValues ) );
}
this->setValuesAndDepths( values, validDepths, rkbDiff, wellLogFile->depthUnit(), false );
@@ -165,13 +165,13 @@ void RimWellLogFileCurve::onLoadDataAndUpdate( bool updateParentPlot )
}
}
RiaDefines::DepthUnitType displayUnit = RiaDefines::UNIT_METER;
RiaDefines::DepthUnitType displayUnit = RiaDefines::DepthUnitType::UNIT_METER;
if ( wellLogPlot )
{
displayUnit = wellLogPlot->depthUnit();
}
RiaDefines::DepthTypeEnum depthType = RiaDefines::MEASURED_DEPTH;
RiaDefines::DepthTypeEnum depthType = RiaDefines::DepthTypeEnum::MEASURED_DEPTH;
if ( wellLogPlot && this->curveData()->availableDepthTypes().count( wellLogPlot->depthType() ) )
{
depthType = wellLogPlot->depthType();

View File

@@ -376,7 +376,7 @@ void RimWellLogRftCurve::onLoadDataAndUpdate( bool updateParentPlot )
{
this->RimPlotCurve::updateCurvePresentation( updateParentPlot );
RiaDefines::DepthTypeEnum depthType = RiaDefines::TRUE_VERTICAL_DEPTH;
RiaDefines::DepthTypeEnum depthType = RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH;
DerivedMDSource derivedMDSource = NO_SOURCE;
if ( isCurveVisible() )
@@ -461,18 +461,18 @@ void RimWellLogRftCurve::onLoadDataAndUpdate( bool updateParentPlot )
RiaEclipseUnitTools::depthUnit( unitSystem ),
false );
RiaDefines::DepthUnitType displayUnit = RiaDefines::UNIT_METER;
RiaDefines::DepthUnitType displayUnit = RiaDefines::DepthUnitType::UNIT_METER;
if ( wellLogPlot )
{
displayUnit = wellLogPlot->depthUnit();
}
if ( wellLogPlot->depthType() == RiaDefines::MEASURED_DEPTH )
if ( wellLogPlot->depthType() == RiaDefines::DepthTypeEnum::MEASURED_DEPTH )
{
m_qwtPlotCurve->setPerPointLabels( perPointLabels );
auto xValues = this->curveData()->xPlotValues();
auto yValues = this->curveData()->depthPlotValues( RiaDefines::MEASURED_DEPTH, displayUnit );
auto yValues = this->curveData()->depthPlotValues( RiaDefines::DepthTypeEnum::MEASURED_DEPTH, displayUnit );
bool keepOnlyPositiveValues = false;
if ( !errors.empty() )
@@ -517,7 +517,8 @@ void RimWellLogRftCurve::onLoadDataAndUpdate( bool updateParentPlot )
m_qwtPlotCurve->setPerPointLabels( perPointLabels );
auto xValues = this->curveData()->xPlotValues();
auto yValues = this->curveData()->depthPlotValues( RiaDefines::TRUE_VERTICAL_DEPTH, displayUnit );
auto yValues =
this->curveData()->depthPlotValues( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH, displayUnit );
bool isLogCurve = false;
if ( !errors.empty() )

View File

@@ -798,23 +798,23 @@ QString RimWellLogTrack::asciiDataForPlotExport() const
// Header
if ( depthType == RiaDefines::CONNECTION_NUMBER )
if ( depthType == RiaDefines::DepthTypeEnum::CONNECTION_NUMBER )
{
out += "Connection";
}
else if ( depthType == RiaDefines::MEASURED_DEPTH )
else if ( depthType == RiaDefines::DepthTypeEnum::MEASURED_DEPTH )
{
out += "MD ";
}
else if ( depthType == RiaDefines::PSEUDO_LENGTH )
else if ( depthType == RiaDefines::DepthTypeEnum::PSEUDO_LENGTH )
{
out += "PL ";
}
else if ( depthType == RiaDefines::TRUE_VERTICAL_DEPTH )
else if ( depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH )
{
out += "TVDMSL ";
}
else if ( depthType == RiaDefines::TRUE_VERTICAL_DEPTH_RKB )
else if ( depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB )
{
out += "TVDRKB ";
}
@@ -830,7 +830,7 @@ QString RimWellLogTrack::asciiDataForPlotExport() const
size_t i = dIdx;
double curveDepth = curveDepths[i];
if ( depthType == RiaDefines::CONNECTION_NUMBER )
if ( depthType == RiaDefines::DepthTypeEnum::CONNECTION_NUMBER )
{
if ( dIdx == 0 )
continue; // Skip the first line. (shallow depth, which is last)
@@ -871,7 +871,7 @@ QString RimWellLogTrack::asciiDataForPlotExport() const
//--------------------------------------------------------------------------------------------------
bool RimWellLogTrack::hasCustomFontSizes( RiaDefines::FontSettingType fontSettingType, int defaultFontSize ) const
{
if ( fontSettingType == RiaDefines::PLOT_FONT && m_plotWidget )
if ( fontSettingType == RiaDefines::FontSettingType::PLOT_FONT && m_plotWidget )
{
return defaultFontSize != m_plotWidget->axisTitleFontSize( QwtPlot::xTop );
}
@@ -886,7 +886,7 @@ bool RimWellLogTrack::applyFontSize( RiaDefines::FontSettingType fontSettingType
int fontSize,
bool forceChange /*= false*/ )
{
if ( fontSettingType == RiaDefines::PLOT_FONT && m_plotWidget )
if ( fontSettingType == RiaDefines::FontSettingType::PLOT_FONT && m_plotWidget )
{
if ( oldFontSize == m_plotWidget->axisTitleFontSize( QwtPlot::xTop ) || forceChange )
{
@@ -1921,7 +1921,7 @@ void RimWellLogTrack::handleWheelEvent( QWheelEvent* event )
std::vector<std::pair<double, double>> RimWellLogTrack::waterAndRockRegions( RiaDefines::DepthTypeEnum depthType,
const RigWellLogExtractor* extractor ) const
{
if ( depthType == RiaDefines::MEASURED_DEPTH )
if ( depthType == RiaDefines::DepthTypeEnum::MEASURED_DEPTH )
{
double waterStartMD = 0.0;
if ( extractor->wellPathData()->rkbDiff() != std::numeric_limits<double>::infinity() )
@@ -1932,14 +1932,14 @@ std::vector<std::pair<double, double>> RimWellLogTrack::waterAndRockRegions( Ria
double rockEndMD = extractor->cellIntersectionMDs().back();
return {{waterStartMD, waterEndMD}, {waterEndMD, rockEndMD}};
}
else if ( depthType == RiaDefines::TRUE_VERTICAL_DEPTH )
else if ( depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH )
{
double waterStartTVD = 0.0;
double waterEndTVD = extractor->cellIntersectionTVDs().front();
double rockEndTVD = extractor->cellIntersectionTVDs().back();
return {{waterStartTVD, waterEndTVD}, {waterEndTVD, rockEndTVD}};
}
else if ( depthType == RiaDefines::TRUE_VERTICAL_DEPTH_RKB )
else if ( depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB )
{
double waterStartTVDRKB = extractor->wellPathData()->rkbDiff();
double waterEndTVDRKB = extractor->cellIntersectionTVDs().front() + extractor->wellPathData()->rkbDiff();
@@ -2171,14 +2171,15 @@ void RimWellLogTrack::findRegionNamesToPlot( const CurveSamplingPointData&
std::vector<double> depthVector;
if ( depthType == RiaDefines::MEASURED_DEPTH || depthType == RiaDefines::PSEUDO_LENGTH )
if ( depthType == RiaDefines::DepthTypeEnum::MEASURED_DEPTH || depthType == RiaDefines::DepthTypeEnum::PSEUDO_LENGTH )
{
depthVector = curveData.md;
}
else if ( depthType == RiaDefines::TRUE_VERTICAL_DEPTH || depthType == RiaDefines::TRUE_VERTICAL_DEPTH_RKB )
else if ( depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH ||
depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB )
{
depthVector = curveData.tvd;
if ( depthType == RiaDefines::TRUE_VERTICAL_DEPTH_RKB )
if ( depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB )
{
for ( double& depthValue : depthVector )
{
@@ -2290,8 +2291,9 @@ void RimWellLogTrack::updateFormationNamesOnPlot()
{
if ( m_formationWellPathForSourceWellPath == nullptr ) return;
if ( !( plot->depthType() == RiaDefines::MEASURED_DEPTH || plot->depthType() == RiaDefines::TRUE_VERTICAL_DEPTH ||
plot->depthType() == RiaDefines::TRUE_VERTICAL_DEPTH_RKB ) )
if ( !( plot->depthType() == RiaDefines::DepthTypeEnum::MEASURED_DEPTH ||
plot->depthType() == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH ||
plot->depthType() == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB ) )
{
return;
}
@@ -2308,7 +2310,7 @@ void RimWellLogTrack::updateFormationNamesOnPlot()
m_showformationFluids(),
plot->depthType() );
if ( plot->depthType() == RiaDefines::TRUE_VERTICAL_DEPTH_RKB )
if ( plot->depthType() == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB )
{
for ( double& depthValue : yValues )
{
@@ -2590,16 +2592,17 @@ void RimWellLogTrack::updateWellPathAttributesOnPlot()
}
}
const std::map<RiaDefines::WellPathComponentType, int> sortIndices = {{RiaDefines::WELL_PATH, 0},
{RiaDefines::CASING, 1},
{RiaDefines::LINER, 2},
{RiaDefines::PERFORATION_INTERVAL, 3},
{RiaDefines::FISHBONES, 4},
{RiaDefines::FRACTURE, 5},
{RiaDefines::PACKER, 6},
{RiaDefines::ICD, 7},
{RiaDefines::AICD, 8},
{RiaDefines::ICV, 9}};
const std::map<RiaDefines::WellPathComponentType, int> sortIndices =
{{RiaDefines::WellPathComponentType::WELL_PATH, 0},
{RiaDefines::WellPathComponentType::CASING, 1},
{RiaDefines::WellPathComponentType::LINER, 2},
{RiaDefines::WellPathComponentType::PERFORATION_INTERVAL, 3},
{RiaDefines::WellPathComponentType::FISHBONES, 4},
{RiaDefines::WellPathComponentType::FRACTURE, 5},
{RiaDefines::WellPathComponentType::PACKER, 6},
{RiaDefines::WellPathComponentType::ICD, 7},
{RiaDefines::WellPathComponentType::AICD, 8},
{RiaDefines::WellPathComponentType::ICV, 9}};
std::stable_sort( allWellPathComponents.begin(),
allWellPathComponents.end(),

View File

@@ -127,16 +127,16 @@ void RimWellMeasurementCurve::onLoadDataAndUpdate( bool updateParentPlot )
measuredDepthValues,
trueVerticalDepthValues,
m_wellPath->wellPathGeometry()->rkbDiff(),
RiaDefines::UNIT_METER,
RiaDefines::DepthUnitType::UNIT_METER,
false );
}
else
{
this->setValuesAndDepths( values,
measuredDepthValues,
RiaDefines::MEASURED_DEPTH,
RiaDefines::DepthTypeEnum::MEASURED_DEPTH,
0.0,
RiaDefines::UNIT_METER,
RiaDefines::DepthUnitType::UNIT_METER,
false );
}
}
@@ -151,13 +151,13 @@ void RimWellMeasurementCurve::onLoadDataAndUpdate( bool updateParentPlot )
setSymbolEdgeColor( getColorForMeasurementKind( measurementKind() ) );
setLineStyle( RiuQwtPlotCurve::STYLE_NONE );
RiaDefines::DepthUnitType displayUnit = RiaDefines::UNIT_METER;
RiaDefines::DepthUnitType displayUnit = RiaDefines::DepthUnitType::UNIT_METER;
if ( wellLogPlot )
{
displayUnit = wellLogPlot->depthUnit();
}
RiaDefines::DepthTypeEnum depthType = RiaDefines::MEASURED_DEPTH;
RiaDefines::DepthTypeEnum depthType = RiaDefines::DepthTypeEnum::MEASURED_DEPTH;
if ( wellLogPlot && this->curveData()->availableDepthTypes().count( wellLogPlot->depthType() ) )
{
depthType = wellLogPlot->depthType();

View File

@@ -207,7 +207,7 @@ bool RimWellPath::isEnabled() const
//--------------------------------------------------------------------------------------------------
RiaDefines::WellPathComponentType RimWellPath::componentType() const
{
return RiaDefines::WELL_PATH;
return RiaDefines::WellPathComponentType::WELL_PATH;
}
//--------------------------------------------------------------------------------------------------

View File

@@ -43,7 +43,7 @@ RimWellPathAttribute::RimWellPathAttribute()
CAF_PDM_InitField( &m_startMD, "DepthStart", -1.0, "Start MD", "", "", "" );
CAF_PDM_InitField( &m_endMD, "DepthEnd", -1.0, "End MD", "", "", "" );
CAF_PDM_InitField( &m_diameterInInches, "DiameterInInches", MAX_DIAMETER_IN_INCHES, "Diameter", "", "", "" );
m_type = RiaDefines::CASING;
m_type = RiaDefines::WellPathComponentType::CASING;
m_diameterInInches.uiCapability()->setUiEditorTypeName( caf::PdmUiComboBoxEditor::uiEditorTypeName() );
}
@@ -114,7 +114,7 @@ RiaDefines::WellPathComponentType RimWellPathAttribute::componentType() const
QString RimWellPathAttribute::componentLabel() const
{
QString fullLabel = componentTypeLabel();
if ( m_type() == RiaDefines::CASING || m_type() == RiaDefines::LINER )
if ( m_type() == RiaDefines::WellPathComponentType::CASING || m_type() == RiaDefines::WellPathComponentType::LINER )
{
fullLabel += QString( " %1" ).arg( diameterLabel() );
}
@@ -158,9 +158,9 @@ double RimWellPathAttribute::endMD() const
//--------------------------------------------------------------------------------------------------
std::set<double> RimWellPathAttribute::supportedDiameters( RiaDefines::WellPathComponentType type )
{
CAF_ASSERT( type == RiaDefines::CASING || type == RiaDefines::LINER );
CAF_ASSERT( type == RiaDefines::WellPathComponentType::CASING || type == RiaDefines::WellPathComponentType::LINER );
std::set<double> values;
if ( type == RiaDefines::CASING )
if ( type == RiaDefines::WellPathComponentType::CASING )
{
values = {MAX_DIAMETER_IN_INCHES,
26.0,
@@ -187,7 +187,7 @@ std::set<double> RimWellPathAttribute::supportedDiameters( RiaDefines::WellPathC
//--------------------------------------------------------------------------------------------------
bool RimWellPathAttribute::isDiameterSupported() const
{
return m_type() == RiaDefines::CASING || m_type() == RiaDefines::LINER;
return m_type() == RiaDefines::WellPathComponentType::CASING || m_type() == RiaDefines::WellPathComponentType::LINER;
}
//--------------------------------------------------------------------------------------------------
@@ -199,9 +199,9 @@ QList<caf::PdmOptionItemInfo>
QList<caf::PdmOptionItemInfo> options;
if ( fieldNeedingOptions == &m_type )
{
std::set<RiaDefines::WellPathComponentType> supportedTypes = {RiaDefines::CASING,
RiaDefines::LINER,
RiaDefines::PACKER};
std::set<RiaDefines::WellPathComponentType> supportedTypes = {RiaDefines::WellPathComponentType::CASING,
RiaDefines::WellPathComponentType::LINER,
RiaDefines::WellPathComponentType::PACKER};
for ( RiaDefines::WellPathComponentType type : supportedTypes )
{
options.push_back( caf::PdmOptionItemInfo( CompletionTypeEnum::uiText( type ), type ) );
@@ -252,7 +252,7 @@ void RimWellPathAttribute::fieldChangedByUi( const caf::PdmFieldHandle* changedF
{
if ( changedField == &m_type )
{
if ( m_type() == RiaDefines::CASING )
if ( m_type() == RiaDefines::WellPathComponentType::CASING )
{
RimWellPath* wellPath = nullptr;
this->firstAncestorOrThisOfTypeAsserted( wellPath );
@@ -263,21 +263,21 @@ void RimWellPathAttribute::fieldChangedByUi( const caf::PdmFieldHandle* changedF
m_diameterInInches = *( supportedDiameters( m_type() ).begin() );
}
}
else if ( m_type() == RiaDefines::LINER )
else if ( m_type() == RiaDefines::WellPathComponentType::LINER )
{
if ( !supportedDiameters( m_type() ).count( m_diameterInInches() ) )
{
m_diameterInInches = *( supportedDiameters( m_type() ).rbegin() );
}
}
else if ( m_type() == RiaDefines::PACKER )
else if ( m_type() == RiaDefines::WellPathComponentType::PACKER )
{
m_endMD = m_startMD + 1;
}
}
if ( changedField == &m_startMD )
{
if ( m_type() == RiaDefines::PACKER )
if ( m_type() == RiaDefines::WellPathComponentType::PACKER )
{
m_endMD = m_startMD + 1;
}
@@ -300,7 +300,7 @@ void RimWellPathAttribute::fieldChangedByUi( const caf::PdmFieldHandle* changedF
//--------------------------------------------------------------------------------------------------
void RimWellPathAttribute::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
{
bool startDepthAvailable = m_type() != RiaDefines::CASING;
bool startDepthAvailable = m_type() != RiaDefines::WellPathComponentType::CASING;
m_startMD.uiCapability()->setUiReadOnly( !startDepthAvailable );
m_diameterInInches.uiCapability()->setUiReadOnly( !isDiameterSupported() );

View File

@@ -202,7 +202,7 @@ void RimAsciiDataCurve::updateQwtPlotAxis()
{
if ( m_qwtPlotCurve )
{
if ( this->yAxis() == RiaDefines::PLOT_AXIS_LEFT )
if ( this->yAxis() == RiaDefines::PlotAxis::PLOT_AXIS_LEFT )
{
m_qwtPlotCurve->setYAxis( QwtPlot::yLeft );
}

View File

@@ -753,7 +753,7 @@ void RimSummaryCurve::updateQwtPlotAxis()
{
if ( m_qwtPlotCurve )
{
if ( this->axisY() == RiaDefines::PLOT_AXIS_LEFT )
if ( this->axisY() == RiaDefines::PlotAxis::PLOT_AXIS_LEFT )
{
m_qwtPlotCurve->setYAxis( QwtPlot::yLeft );
}

View File

@@ -257,8 +257,8 @@ void RimSummaryPlot::setShowPlotTitle( bool showTitle )
//--------------------------------------------------------------------------------------------------
void RimSummaryPlot::updateAxes()
{
updateYAxis( RiaDefines::PLOT_AXIS_LEFT );
updateYAxis( RiaDefines::PLOT_AXIS_RIGHT );
updateYAxis( RiaDefines::PlotAxis::PLOT_AXIS_LEFT );
updateYAxis( RiaDefines::PlotAxis::PLOT_AXIS_RIGHT );
if ( m_isCrossPlot )
{
@@ -586,15 +586,15 @@ void RimSummaryPlot::copyAxisPropertiesFromOther( const RimSummaryPlot& sourceSu
{
{
QString data =
sourceSummaryPlot.yAxisPropertiesLeftOrRight( RiaDefines::PLOT_AXIS_LEFT )->writeObjectToXmlString();
yAxisPropertiesLeftOrRight( RiaDefines::PLOT_AXIS_LEFT )
sourceSummaryPlot.yAxisPropertiesLeftOrRight( RiaDefines::PlotAxis::PLOT_AXIS_LEFT )->writeObjectToXmlString();
yAxisPropertiesLeftOrRight( RiaDefines::PlotAxis::PLOT_AXIS_LEFT )
->readObjectFromXmlString( data, caf::PdmDefaultObjectFactory::instance() );
}
{
QString data =
sourceSummaryPlot.yAxisPropertiesLeftOrRight( RiaDefines::PLOT_AXIS_RIGHT )->writeObjectToXmlString();
yAxisPropertiesLeftOrRight( RiaDefines::PLOT_AXIS_RIGHT )
sourceSummaryPlot.yAxisPropertiesLeftOrRight( RiaDefines::PlotAxis::PLOT_AXIS_RIGHT )->writeObjectToXmlString();
yAxisPropertiesLeftOrRight( RiaDefines::PlotAxis::PLOT_AXIS_RIGHT )
->readObjectFromXmlString( data, caf::PdmDefaultObjectFactory::instance() );
}
}
@@ -733,7 +733,7 @@ void RimSummaryPlot::applyDefaultCurveAppearances()
//--------------------------------------------------------------------------------------------------
bool RimSummaryPlot::hasCustomFontSizes( RiaDefines::FontSettingType fontSettingType, int defaultFontSize ) const
{
if ( fontSettingType == RiaDefines::PLOT_FONT && m_plotWidget )
if ( fontSettingType == RiaDefines::FontSettingType::PLOT_FONT && m_plotWidget )
{
for ( auto plotAxis : allPlotAxes() )
{
@@ -761,7 +761,7 @@ bool RimSummaryPlot::applyFontSize( RiaDefines::FontSettingType fontSettingType,
{
bool anyChange = false;
if ( fontSettingType == RiaDefines::PLOT_FONT && m_plotWidget )
if ( fontSettingType == RiaDefines::FontSettingType::PLOT_FONT && m_plotWidget )
{
for ( auto plotAxis : allPlotAxes() )
{
@@ -812,7 +812,7 @@ void RimSummaryPlot::updateYAxis( RiaDefines::PlotAxis plotAxis )
if ( !m_plotWidget ) return;
QwtPlot::Axis qwtAxis = QwtPlot::yLeft;
if ( plotAxis == RiaDefines::PLOT_AXIS_LEFT )
if ( plotAxis == RiaDefines::PlotAxis::PLOT_AXIS_LEFT )
{
qwtAxis = QwtPlot::yLeft;
}
@@ -851,7 +851,7 @@ void RimSummaryPlot::updateYAxis( RiaDefines::PlotAxis plotAxis )
//--------------------------------------------------------------------------------------------------
void RimSummaryPlot::updateZoomForAxis( RiaDefines::PlotAxis plotAxis )
{
if ( plotAxis == RiaDefines::PLOT_AXIS_BOTTOM )
if ( plotAxis == RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM )
{
if ( m_isCrossPlot )
{
@@ -942,7 +942,7 @@ std::vector<RimSummaryCurve*> RimSummaryPlot::visibleSummaryCurvesForAxis( RiaDe
{
std::vector<RimSummaryCurve*> curves;
if ( plotAxis == RiaDefines::PLOT_AXIS_BOTTOM )
if ( plotAxis == RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM )
{
if ( m_summaryCurveCollection && m_summaryCurveCollection->isCurvesVisible() )
{
@@ -1016,7 +1016,7 @@ RimPlotAxisProperties* RimSummaryPlot::yAxisPropertiesLeftOrRight( RiaDefines::P
{
RimPlotAxisProperties* yAxisProps = nullptr;
if ( leftOrRightPlotAxis == RiaDefines::PLOT_AXIS_LEFT )
if ( leftOrRightPlotAxis == RiaDefines::PlotAxis::PLOT_AXIS_LEFT )
{
yAxisProps = m_leftYAxisProperties();
}
@@ -1041,7 +1041,7 @@ std::vector<RimGridTimeHistoryCurve*> RimSummaryPlot::visibleTimeHistoryCurvesFo
{
if ( c->isCurveVisible() )
{
if ( c->yAxis() == plotAxis || plotAxis == RiaDefines::PLOT_AXIS_BOTTOM )
if ( c->yAxis() == plotAxis || plotAxis == RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM )
{
curves.push_back( c );
}
@@ -1062,7 +1062,7 @@ std::vector<RimAsciiDataCurve*> RimSummaryPlot::visibleAsciiDataCurvesForAxis( R
{
if ( c->isCurveVisible() )
{
if ( c->yAxis() == plotAxis || plotAxis == RiaDefines::PLOT_AXIS_BOTTOM )
if ( c->yAxis() == plotAxis || plotAxis == RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM )
{
curves.push_back( c );
}
@@ -1162,9 +1162,9 @@ void RimSummaryPlot::updateBottomXAxis()
std::set<QString> timeHistoryQuantities;
RimSummaryPlotAxisFormatter calc( bottomAxisProperties,
visibleSummaryCurvesForAxis( RiaDefines::PLOT_AXIS_BOTTOM ),
visibleSummaryCurvesForAxis( RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM ),
{},
visibleAsciiDataCurvesForAxis( RiaDefines::PLOT_AXIS_BOTTOM ),
visibleAsciiDataCurvesForAxis( RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM ),
timeHistoryQuantities );
calc.applyAxisPropertiesToPlot( m_plotWidget );
}
@@ -1493,9 +1493,9 @@ void RimSummaryPlot::updateZoomInQwt()
{
if ( m_plotWidget )
{
updateZoomForAxis( RiaDefines::PLOT_AXIS_BOTTOM );
updateZoomForAxis( RiaDefines::PLOT_AXIS_LEFT );
updateZoomForAxis( RiaDefines::PLOT_AXIS_RIGHT );
updateZoomForAxis( RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM );
updateZoomForAxis( RiaDefines::PlotAxis::PLOT_AXIS_LEFT );
updateZoomForAxis( RiaDefines::PlotAxis::PLOT_AXIS_RIGHT );
m_plotWidget->updateAxes();
updateZoomFromQwt();

View File

@@ -231,7 +231,7 @@ QString RimSummaryPlotAxisFormatter::autoAxisTitle() const
{
continue;
}
else if ( m_axisProperties->plotAxisType() == RiaDefines::PLOT_AXIS_BOTTOM )
else if ( m_axisProperties->plotAxisType() == RiaDefines::PlotAxis::PLOT_AXIS_BOTTOM )
{
sumAddress = rimCurve->summaryAddressX();
unitText = rimCurve->unitNameX();

View File

@@ -1724,8 +1724,8 @@ void RigCaseCellResultsData::testAndComputeSgasForTimeStep( size_t timeStepIndex
if ( m_readerInterface.isNull() ) return;
std::set<RiaDefines::PhaseType> phases = m_readerInterface->availablePhases();
if ( phases.count( RiaDefines::GAS_PHASE ) == 0 ) return;
if ( phases.count( RiaDefines::OIL_PHASE ) > 0 ) return;
if ( phases.count( RiaDefines::PhaseType::GAS_PHASE ) == 0 ) return;
if ( phases.count( RiaDefines::PhaseType::OIL_PHASE ) > 0 ) return;
// Simulation type is gas and water. No SGAS is present, compute SGAS based on SWAT

View File

@@ -178,44 +178,53 @@ public:
const RigWellLogCurveData* firstCurveData = curveDataForFirstCurve();
if ( firstCurveData->depthUnit() == RiaDefines::UNIT_METER )
if ( firstCurveData->depthUnit() == RiaDefines::DepthUnitType::UNIT_METER )
{
lasFile->AddLog( "DEPTH", "M", "Depth in meters", firstCurveData->depths( RiaDefines::MEASURED_DEPTH ) );
lasFile->AddLog( "DEPTH",
"M",
"Depth in meters",
firstCurveData->depths( RiaDefines::DepthTypeEnum::MEASURED_DEPTH ) );
}
else if ( firstCurveData->depthUnit() == RiaDefines::UNIT_FEET )
else if ( firstCurveData->depthUnit() == RiaDefines::DepthUnitType::UNIT_FEET )
{
lasFile->AddLog( "DEPTH", "FT", "Depth in feet", firstCurveData->depths( RiaDefines::MEASURED_DEPTH ) );
lasFile->AddLog( "DEPTH",
"FT",
"Depth in feet",
firstCurveData->depths( RiaDefines::DepthTypeEnum::MEASURED_DEPTH ) );
}
else if ( firstCurveData->depthUnit() == RiaDefines::UNIT_NONE )
else if ( firstCurveData->depthUnit() == RiaDefines::DepthUnitType::UNIT_NONE )
{
lasFile->AddLog( "DEPTH", "", "Depth in Connection number", firstCurveData->depths( RiaDefines::MEASURED_DEPTH ) );
lasFile->AddLog( "DEPTH",
"",
"Depth in Connection number",
firstCurveData->depths( RiaDefines::DepthTypeEnum::MEASURED_DEPTH ) );
}
if ( firstCurveData->depths( RiaDefines::TRUE_VERTICAL_DEPTH ).size() )
if ( firstCurveData->depths( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH ).size() )
{
lasFile->AddLog( "TVDMSL",
"M",
"True vertical depth in meters",
firstCurveData->depths( RiaDefines::TRUE_VERTICAL_DEPTH ) );
firstCurveData->depths( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH ) );
if ( m_exportTvdrkb && m_rkbDiff != -1.0 )
{
// Export True Vertical Depth Rotary Kelly Bushing - TVDRKB
std::vector<double> tvdrkbValues = firstCurveData->depths( RiaDefines::TRUE_VERTICAL_DEPTH );
std::vector<double> tvdrkbValues = firstCurveData->depths( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH );
for ( auto& value : tvdrkbValues )
{
value += m_rkbDiff;
}
if ( firstCurveData->depthUnit() == RiaDefines::UNIT_METER )
if ( firstCurveData->depthUnit() == RiaDefines::DepthUnitType::UNIT_METER )
{
lasFile->AddLog( "TVDRKB", "M", "True vertical depth (Rotary Kelly Bushing)", tvdrkbValues );
}
else if ( firstCurveData->depthUnit() == RiaDefines::UNIT_FEET )
else if ( firstCurveData->depthUnit() == RiaDefines::DepthUnitType::UNIT_FEET )
{
lasFile->AddLog( "TVDRKB", "FT", "True vertical depth (Rotary Kelly Bushing)", tvdrkbValues );
}
else if ( firstCurveData->depthUnit() == RiaDefines::UNIT_NONE )
else if ( firstCurveData->depthUnit() == RiaDefines::DepthUnitType::UNIT_NONE )
{
CVF_ASSERT( false );
lasFile->AddLog( "TVDRKB", "", "", tvdrkbValues );
@@ -225,16 +234,19 @@ public:
double minDepth = 0.0;
double maxDepth = 0.0;
firstCurveData->calculateDepthRange( RiaDefines::MEASURED_DEPTH, firstCurveData->depthUnit(), &minDepth, &maxDepth );
firstCurveData->calculateDepthRange( RiaDefines::DepthTypeEnum::MEASURED_DEPTH,
firstCurveData->depthUnit(),
&minDepth,
&maxDepth );
lasFile->setStartDepth( minDepth );
lasFile->setStopDepth( maxDepth );
if ( firstCurveData->depthUnit() == RiaDefines::UNIT_METER )
if ( firstCurveData->depthUnit() == RiaDefines::DepthUnitType::UNIT_METER )
{
lasFile->setDepthUnit( "M" );
}
else if ( firstCurveData->depthUnit() == RiaDefines::UNIT_FEET )
else if ( firstCurveData->depthUnit() == RiaDefines::DepthUnitType::UNIT_FEET )
{
lasFile->setDepthUnit( "FT" );
}

View File

@@ -70,11 +70,11 @@ RigTofWellDistributionCalculator::RigTofWellDistributionCalculator( RimEclipseRe
}
QString phaseResultName;
if ( phase == RiaDefines::WATER_PHASE )
if ( phase == RiaDefines::PhaseType::WATER_PHASE )
phaseResultName = "SWAT";
else if ( phase == RiaDefines::OIL_PHASE )
else if ( phase == RiaDefines::PhaseType::OIL_PHASE )
phaseResultName = "SOIL";
else if ( phase == RiaDefines::GAS_PHASE )
else if ( phase == RiaDefines::PhaseType::GAS_PHASE )
phaseResultName = "SGAS";
const std::vector<double>* phaseResults = eclipseCaseData->resultValues( RiaDefines::PorosityModelType::MATRIX_MODEL,
RiaDefines::ResultCatType::DYNAMIC_NATIVE,

View File

@@ -34,7 +34,7 @@
RigWellLogCurveData::RigWellLogCurveData()
{
m_isExtractionCurve = false;
m_depthUnit = RiaDefines::UNIT_METER;
m_depthUnit = RiaDefines::DepthUnitType::UNIT_METER;
m_xUnitString = RiaWellLogUnitTools<double>::noUnitString();
}
@@ -117,7 +117,8 @@ std::vector<double> RigWellLogCurveData::xValues() const
std::vector<double> RigWellLogCurveData::xValues( const QString& units ) const
{
std::vector<double> convertedValues;
if ( units != m_xUnitString && RiaWellLogUnitTools<double>::convertValues( depths( RiaDefines::TRUE_VERTICAL_DEPTH_RKB ),
if ( units != m_xUnitString &&
RiaWellLogUnitTools<double>::convertValues( depths( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB ),
m_xValues,
&convertedValues,
m_xUnitString,
@@ -149,18 +150,20 @@ std::vector<double> RigWellLogCurveData::depths( RiaDefines::DepthTypeEnum depth
if ( m_rkbDiff != 0.0 )
{
if ( depthType == RiaDefines::TRUE_VERTICAL_DEPTH_RKB && m_depths.count( RiaDefines::TRUE_VERTICAL_DEPTH ) )
if ( depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB &&
m_depths.count( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH ) )
{
std::vector<double> tvds = depths( RiaDefines::TRUE_VERTICAL_DEPTH );
std::vector<double> tvds = depths( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH );
for ( double& tvdValue : tvds )
{
tvdValue += m_rkbDiff;
}
return tvds;
}
else if ( depthType == RiaDefines::TRUE_VERTICAL_DEPTH && m_depths.count( RiaDefines::TRUE_VERTICAL_DEPTH_RKB ) )
else if ( depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH &&
m_depths.count( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB ) )
{
std::vector<double> tvds = depths( RiaDefines::TRUE_VERTICAL_DEPTH_RKB );
std::vector<double> tvds = depths( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB );
for ( double& tvdValue : tvds )
{
tvdValue -= m_rkbDiff;
@@ -185,14 +188,15 @@ std::set<RiaDefines::DepthTypeEnum> RigWellLogCurveData::availableDepthTypes() c
if ( m_rkbDiff != 0.0 )
{
if ( depthTypes.count( RiaDefines::TRUE_VERTICAL_DEPTH ) && !depthTypes.count( RiaDefines::TRUE_VERTICAL_DEPTH_RKB ) )
if ( depthTypes.count( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH ) &&
!depthTypes.count( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB ) )
{
depthTypes.insert( RiaDefines::TRUE_VERTICAL_DEPTH_RKB );
depthTypes.insert( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB );
}
else if ( depthTypes.count( RiaDefines::TRUE_VERTICAL_DEPTH_RKB ) &&
!depthTypes.count( RiaDefines::TRUE_VERTICAL_DEPTH ) )
else if ( depthTypes.count( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB ) &&
!depthTypes.count( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH ) )
{
depthTypes.insert( RiaDefines::TRUE_VERTICAL_DEPTH );
depthTypes.insert( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH );
}
}
@@ -255,8 +259,8 @@ cvf::ref<RigWellLogCurveData> RigWellLogCurveData::calculateResampledCurveData(
bool isTVDAvailable = false;
std::vector<double> tvDepths;
auto mdIt = m_depths.find( RiaDefines::MEASURED_DEPTH );
auto tvdIt = m_depths.find( RiaDefines::TRUE_VERTICAL_DEPTH );
auto mdIt = m_depths.find( RiaDefines::DepthTypeEnum::MEASURED_DEPTH );
auto tvdIt = m_depths.find( RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH );
if ( tvdIt != m_depths.end() && !tvdIt->second.empty() ) isTVDAvailable = true;
@@ -306,12 +310,18 @@ cvf::ref<RigWellLogCurveData> RigWellLogCurveData::calculateResampledCurveData(
if ( isTVDAvailable )
{
std::map<RiaDefines::DepthTypeEnum, std::vector<double>> resampledDepths =
{{RiaDefines::TRUE_VERTICAL_DEPTH, tvDepths}, {RiaDefines::MEASURED_DEPTH, measuredDepths}};
{{RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH, tvDepths},
{RiaDefines::DepthTypeEnum::MEASURED_DEPTH, measuredDepths}};
reSampledData->setValuesAndDepths( xValues, resampledDepths, m_rkbDiff, m_depthUnit, true );
}
else
{
reSampledData->setValuesAndDepths( xValues, measuredDepths, RiaDefines::MEASURED_DEPTH, 0.0, m_depthUnit, m_isExtractionCurve );
reSampledData->setValuesAndDepths( xValues,
measuredDepths,
RiaDefines::DepthTypeEnum::MEASURED_DEPTH,
0.0,
m_depthUnit,
m_isExtractionCurve );
}
return reSampledData;
@@ -337,7 +347,7 @@ void RigWellLogCurveData::calculateIntervalsOfContinousValidValues()
for ( size_t intIdx = 0; intIdx < intervalsCount; intIdx++ )
{
std::vector<std::pair<size_t, size_t>> depthValuesIntervals;
splitIntervalAtEmptySpace( m_depths[RiaDefines::MEASURED_DEPTH],
splitIntervalAtEmptySpace( m_depths[RiaDefines::DepthTypeEnum::MEASURED_DEPTH],
intervalsOfValidValues[intIdx].first,
intervalsOfValidValues[intIdx].second,
&depthValuesIntervals );

View File

@@ -241,15 +241,15 @@ QString RigWellLogFile::wellLogChannelUnitString( const QString& well
{
if ( displayDepthUnit != depthUnit() )
{
if ( displayDepthUnit == RiaDefines::UNIT_METER )
if ( displayDepthUnit == RiaDefines::DepthUnitType::UNIT_METER )
{
return "M";
}
else if ( displayDepthUnit == RiaDefines::UNIT_FEET )
else if ( displayDepthUnit == RiaDefines::DepthUnitType::UNIT_FEET )
{
return "FT";
}
else if ( displayDepthUnit == RiaDefines::UNIT_NONE )
else if ( displayDepthUnit == RiaDefines::DepthUnitType::UNIT_NONE )
{
CVF_ASSERT( false );
return "";
@@ -296,11 +296,11 @@ bool RigWellLogFile::hasTvdRkbChannel() const
//--------------------------------------------------------------------------------------------------
RiaDefines::DepthUnitType RigWellLogFile::depthUnit() const
{
RiaDefines::DepthUnitType unitType = RiaDefines::UNIT_METER;
RiaDefines::DepthUnitType unitType = RiaDefines::DepthUnitType::UNIT_METER;
if ( depthUnitString().toUpper() == "F" || depthUnitString().toUpper() == "FT" )
{
unitType = RiaDefines::UNIT_FEET;
unitType = RiaDefines::DepthUnitType::UNIT_FEET;
}
return unitType;

View File

@@ -55,7 +55,7 @@ void RigWellPathFormations::depthAndFormationNamesWithoutDuplicatesOnDepth( std:
{
std::map<double, bool, DepthComp> tempMakeVectorUniqueOnMeasuredDepth;
if ( depthType == RiaDefines::MEASURED_DEPTH )
if ( depthType == RiaDefines::DepthTypeEnum::MEASURED_DEPTH )
{
for ( const std::pair<RigWellPathFormation, FormationLevel>& formation : m_formations )
{
@@ -77,7 +77,7 @@ void RigWellPathFormations::depthAndFormationNamesWithoutDuplicatesOnDepth( std:
}
}
}
else if ( depthType == RiaDefines::TRUE_VERTICAL_DEPTH )
else if ( depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH )
{
for ( const std::pair<RigWellPathFormation, FormationLevel>& formation : m_formations )
{
@@ -169,7 +169,7 @@ void RigWellPathFormations::evaluateFormationsForOnePosition(
{
double depth;
if ( depthType == RiaDefines::MEASURED_DEPTH )
if ( depthType == RiaDefines::DepthTypeEnum::MEASURED_DEPTH )
{
if ( position == TOP )
{
@@ -180,7 +180,7 @@ void RigWellPathFormations::evaluateFormationsForOnePosition(
depth = formation.first.mdBase;
}
}
else if ( depthType == RiaDefines::TRUE_VERTICAL_DEPTH )
else if ( depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH )
{
if ( position == TOP )
{
@@ -237,11 +237,11 @@ void RigWellPathFormations::evaluateFluids( const std::vector<RigWellPathFormati
for ( const RigWellPathFormation& formation : fluidFormations )
{
double depthBase;
if ( depthType == RiaDefines::MEASURED_DEPTH )
if ( depthType == RiaDefines::DepthTypeEnum::MEASURED_DEPTH )
{
depthBase = formation.mdBase;
}
else if ( depthType == RiaDefines::TRUE_VERTICAL_DEPTH )
else if ( depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH )
{
depthBase = formation.tvdBase;
}
@@ -254,11 +254,11 @@ void RigWellPathFormations::evaluateFluids( const std::vector<RigWellPathFormati
for ( const RigWellPathFormation& formation : fluidFormations )
{
double depthTop;
if ( depthType == RiaDefines::MEASURED_DEPTH )
if ( depthType == RiaDefines::DepthTypeEnum::MEASURED_DEPTH )
{
depthTop = formation.mdTop;
}
else if ( depthType == RiaDefines::TRUE_VERTICAL_DEPTH )
else if ( depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH )
{
depthTop = formation.tvdTop;
}

View File

@@ -47,9 +47,9 @@
//--------------------------------------------------------------------------------------------------
RiuWellPathComponentPlotItem::RiuWellPathComponentPlotItem( const RimWellPath* wellPath )
: m_wellPath( wellPath )
, m_componentType( RiaDefines::WELL_PATH )
, m_componentType( RiaDefines::WellPathComponentType::WELL_PATH )
, m_columnOffset( 0.0 )
, m_depthType( RiaDefines::MEASURED_DEPTH )
, m_depthType( RiaDefines::DepthTypeEnum::MEASURED_DEPTH )
, m_maxColumnOffset( 0.0 )
, m_showLabel( false )
{
@@ -69,7 +69,7 @@ RiuWellPathComponentPlotItem::RiuWellPathComponentPlotItem( const RimWellPath*
const RimWellPathComponentInterface* component )
: m_wellPath( wellPath )
, m_columnOffset( 0.0 )
, m_depthType( RiaDefines::MEASURED_DEPTH )
, m_depthType( RiaDefines::DepthTypeEnum::MEASURED_DEPTH )
, m_maxColumnOffset( 0.0 )
, m_showLabel( false )
{
@@ -137,7 +137,7 @@ void RiuWellPathComponentPlotItem::calculateColumnOffsets( const RimWellPathComp
m_wellPath->descendantsIncludingThisOfType( attributeCollection );
for ( const RimWellPathAttribute* otherAttribute : attributeCollection.front()->attributes() )
{
if ( otherAttribute->componentType() == RiaDefines::CASING )
if ( otherAttribute->componentType() == RiaDefines::WellPathComponentType::CASING )
{
uniqueCasingDiameters.insert( otherAttribute->diameterInInches() );
}
@@ -148,7 +148,7 @@ void RiuWellPathComponentPlotItem::calculateColumnOffsets( const RimWellPathComp
m_maxColumnOffset = ( uniqueCasingDiameters.size() - 1 ) * 0.25;
const RimWellPathAttribute* myAttribute = dynamic_cast<const RimWellPathAttribute*>( component );
if ( myAttribute && myAttribute->componentType() == RiaDefines::CASING )
if ( myAttribute && myAttribute->componentType() == RiaDefines::WellPathComponentType::CASING )
{
int nNarrowerCasings = std::count_if( uniqueCasingDiameters.begin(),
uniqueCasingDiameters.end(),
@@ -172,11 +172,11 @@ void RiuWellPathComponentPlotItem::onLoadDataAndUpdate( bool updateParentPlot )
double casingTrackEnd = 0.75 + m_maxColumnOffset;
if ( m_componentType == RiaDefines::WELL_PATH )
if ( m_componentType == RiaDefines::WellPathComponentType::WELL_PATH )
{
addColumnFeature( -0.25, 0.25, startDepth, endDepth, componentColor() );
}
else if ( m_componentType == RiaDefines::CASING )
else if ( m_componentType == RiaDefines::WellPathComponentType::CASING )
{
double posMin = 0.5 + m_columnOffset;
double posMax = 0.75 + m_columnOffset;
@@ -186,13 +186,13 @@ void RiuWellPathComponentPlotItem::onLoadDataAndUpdate( bool updateParentPlot )
addMarker( posMax, endDepth, 12, RiuQwtSymbol::SYMBOL_RIGHT_ANGLED_TRIANGLE, componentColor() );
addMarker( casingTrackEnd, endDepth, 12, RiuQwtSymbol::SYMBOL_RIGHT_ANGLED_TRIANGLE, componentColor( 0.0 ), label() );
}
else if ( m_componentType == RiaDefines::LINER )
else if ( m_componentType == RiaDefines::WellPathComponentType::LINER )
{
addColumnFeature( -0.5, -0.25, startDepth, endDepth, componentColor() );
addColumnFeature( 0.25, 0.5, startDepth, endDepth, componentColor() );
addMarker( casingTrackEnd, endDepth, 10, RiuQwtSymbol::SYMBOL_RIGHT_ANGLED_TRIANGLE, componentColor( 0.0 ), label() );
}
else if ( m_componentType == RiaDefines::PERFORATION_INTERVAL )
else if ( m_componentType == RiaDefines::WellPathComponentType::PERFORATION_INTERVAL )
{
addColumnFeature( -casingTrackEnd, -0.25, startDepth, endDepth, componentColor(), Qt::Dense6Pattern );
addColumnFeature( 0.25, casingTrackEnd, startDepth, endDepth, componentColor(), Qt::Dense6Pattern );
@@ -218,13 +218,13 @@ void RiuWellPathComponentPlotItem::onLoadDataAndUpdate( bool updateParentPlot )
m_combinedComponentGroup.addLegendItem( legendItem1 );
m_combinedComponentGroup.addLegendItem( legendItem2 );
}
else if ( m_componentType == RiaDefines::FISHBONES )
else if ( m_componentType == RiaDefines::WellPathComponentType::FISHBONES )
{
addColumnFeature( -casingTrackEnd, -0.25, startDepth, endDepth, componentColor(), Qt::BDiagPattern );
addColumnFeature( 0.25, casingTrackEnd, startDepth, endDepth, componentColor(), Qt::FDiagPattern );
addMarker( casingTrackEnd, midDepth, 10, RiuQwtSymbol::SYMBOL_RIGHT_ANGLED_TRIANGLE, componentColor( 0.0 ), label() );
}
else if ( m_componentType == RiaDefines::FRACTURE )
else if ( m_componentType == RiaDefines::WellPathComponentType::FRACTURE )
{
addColumnFeature( -casingTrackEnd, -0.25, startDepth, endDepth, componentColor(), Qt::SolidPattern );
addColumnFeature( 0.25, casingTrackEnd, startDepth, endDepth, componentColor(), Qt::SolidPattern );
@@ -254,7 +254,7 @@ void RiuWellPathComponentPlotItem::onLoadDataAndUpdate( bool updateParentPlot )
label(),
Qt::AlignTop | Qt::AlignRight );
}
else if ( m_componentType == RiaDefines::ICD )
else if ( m_componentType == RiaDefines::WellPathComponentType::ICD )
{
for ( double md : m_subMDs )
{
@@ -263,7 +263,7 @@ void RiuWellPathComponentPlotItem::onLoadDataAndUpdate( bool updateParentPlot )
m_combinedComponentGroup.addLegendItem(
createMarker( 0.0, 0.0, 12.0, RiuQwtSymbol::SYMBOL_ELLIPSE, componentColor() ) );
}
else if ( m_componentType == RiaDefines::ICV )
else if ( m_componentType == RiaDefines::WellPathComponentType::ICV )
{
for ( double md : m_subMDs )
{
@@ -272,7 +272,7 @@ void RiuWellPathComponentPlotItem::onLoadDataAndUpdate( bool updateParentPlot )
m_combinedComponentGroup.addLegendItem(
createMarker( 0.0, 0.0, 12.0, RiuQwtSymbol::SYMBOL_ELLIPSE, componentColor() ) );
}
else if ( m_componentType == RiaDefines::AICD )
else if ( m_componentType == RiaDefines::WellPathComponentType::AICD )
{
for ( double md : m_subMDs )
{
@@ -281,7 +281,7 @@ void RiuWellPathComponentPlotItem::onLoadDataAndUpdate( bool updateParentPlot )
m_combinedComponentGroup.addLegendItem(
createMarker( 0.0, 0.0, 12.0, RiuQwtSymbol::SYMBOL_ELLIPSE, componentColor() ) );
}
else if ( m_componentType == RiaDefines::PACKER )
else if ( m_componentType == RiaDefines::WellPathComponentType::PACKER )
{
addColumnFeature( -1.1 * casingTrackEnd, -0.25, startDepth, endDepth, componentColor(), Qt::DiagCrossPattern );
addColumnFeature( 0.25, 1.1 * casingTrackEnd, startDepth, endDepth, componentColor(), Qt::DiagCrossPattern );
@@ -299,7 +299,8 @@ std::pair<double, double> RiuWellPathComponentPlotItem::depthsOfDepthType() cons
double startDepth = m_startMD;
double endDepth = m_endMD;
if ( m_depthType == RiaDefines::TRUE_VERTICAL_DEPTH || m_depthType == RiaDefines::TRUE_VERTICAL_DEPTH_RKB )
if ( m_depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH ||
m_depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB )
{
endDepth = -m_wellPath->wellPathGeometry()->interpolatedPointAlongWellPath( m_endMD ).z();
double rkbDiff = m_wellPath->wellPathGeometry()->rkbDiff();
@@ -308,14 +309,14 @@ std::pair<double, double> RiuWellPathComponentPlotItem::depthsOfDepthType() cons
rkbDiff = 0.0;
}
if ( m_componentType == RiaDefines::WELL_PATH )
if ( m_componentType == RiaDefines::WellPathComponentType::WELL_PATH )
{
startDepth = 0.0;
if ( m_depthType == RiaDefines::TRUE_VERTICAL_DEPTH )
if ( m_depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH )
{
startDepth -= rkbDiff;
}
else if ( m_depthType == RiaDefines::TRUE_VERTICAL_DEPTH_RKB )
else if ( m_depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB )
{
endDepth += m_wellPath->wellPathGeometry()->rkbDiff();
}
@@ -323,7 +324,7 @@ std::pair<double, double> RiuWellPathComponentPlotItem::depthsOfDepthType() cons
else
{
startDepth = -m_wellPath->wellPathGeometry()->interpolatedPointAlongWellPath( m_startMD ).z();
if ( m_depthType == RiaDefines::TRUE_VERTICAL_DEPTH_RKB )
if ( m_depthType == RiaDefines::DepthTypeEnum::TRUE_VERTICAL_DEPTH_RKB )
{
startDepth += m_wellPath->wellPathGeometry()->rkbDiff();
endDepth += m_wellPath->wellPathGeometry()->rkbDiff();