#2509 Fracture : Move unit conversion of top/bot perforation depth

This commit is contained in:
Magne Sjaastad
2018-02-20 15:35:08 +01:00
parent 35febab8db
commit 4e737885e4
4 changed files with 46 additions and 56 deletions

View File

@@ -133,59 +133,17 @@ double RigStimPlanFractureDefinition::maxY() const
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigStimPlanFractureDefinition::setTvdToTopPerf(double topPerfTvd, RiaDefines::DepthUnitType unit)
void RigStimPlanFractureDefinition::setTvdToTopPerf(double topPerfTvd)
{
if (unit == RiaDefines::UNIT_METER)
{
if (m_unitSet == RiaEclipseUnitTools::UNITS_FIELD)
{
m_topPerfTvd = RiaEclipseUnitTools::meterToFeet(topPerfTvd);
}
else if (m_unitSet == RiaEclipseUnitTools::UNITS_METRIC)
{
m_topPerfTvd = topPerfTvd;
}
}
else if (unit == RiaDefines::UNIT_FEET)
{
if (m_unitSet == RiaEclipseUnitTools::UNITS_FIELD)
{
m_topPerfTvd = topPerfTvd;
}
else if (m_unitSet == RiaEclipseUnitTools::UNITS_METRIC)
{
m_topPerfTvd = RiaEclipseUnitTools::feetToMeter(topPerfTvd);
}
}
m_topPerfTvd = topPerfTvd;
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
void RigStimPlanFractureDefinition::setTvdToBottomPerf(double bottomPerfTvd, RiaDefines::DepthUnitType unit)
void RigStimPlanFractureDefinition::setTvdToBottomPerf(double bottomPerfTvd)
{
if (unit == RiaDefines::UNIT_METER)
{
if (m_unitSet == RiaEclipseUnitTools::UNITS_FIELD)
{
m_bottomPerfTvd = RiaEclipseUnitTools::meterToFeet(bottomPerfTvd);
}
else if (m_unitSet == RiaEclipseUnitTools::UNITS_METRIC)
{
m_bottomPerfTvd = bottomPerfTvd;
}
}
else if (unit == RiaDefines::UNIT_FEET)
{
if (m_unitSet == RiaEclipseUnitTools::UNITS_FIELD)
{
m_bottomPerfTvd = bottomPerfTvd;
}
else if (m_unitSet == RiaEclipseUnitTools::UNITS_METRIC)
{
m_bottomPerfTvd = RiaEclipseUnitTools::feetToMeter(bottomPerfTvd);
}
}
m_bottomPerfTvd = bottomPerfTvd;
}
//--------------------------------------------------------------------------------------------------

View File

@@ -68,8 +68,8 @@ public:
double maxDepth() const;
double topPerfTvd() const;
double bottomPerfTvd() const;
void setTvdToTopPerf(double topPerfTvd, RiaDefines::DepthUnitType unit);
void setTvdToBottomPerf(double bottomPerfTvd, RiaDefines::DepthUnitType unit);
void setTvdToTopPerf(double topPerfTvd);
void setTvdToBottomPerf(double bottomPerfTvd);
cvf::ref<RigFractureGrid> createFractureGrid(const QString& resultName,
int activeTimeStepIndex,