mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3467 New interface class for completions +use RiaDefines::CompletionType
This commit is contained in:
@@ -191,34 +191,6 @@ double RimFishbonesMultipleSubs::rotationAngle(size_t index) const
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFishbonesMultipleSubs::startOfSubMD() const
|
||||
{
|
||||
double measuredDepth = 0.0;
|
||||
if (!m_locationOfSubs().empty())
|
||||
{
|
||||
measuredDepth = m_locationOfSubs().front();
|
||||
}
|
||||
|
||||
return measuredDepth;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFishbonesMultipleSubs::endOfSubMD() const
|
||||
{
|
||||
double measuredDepth = 0.0;
|
||||
if (!m_locationOfSubs().empty())
|
||||
{
|
||||
measuredDepth = m_locationOfSubs().back();
|
||||
}
|
||||
|
||||
return measuredDepth;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -428,6 +400,58 @@ void RimFishbonesMultipleSubs::setUnitSystemSpecificDefaults()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaDefines::CompletionType RimFishbonesMultipleSubs::type() const
|
||||
{
|
||||
return RiaDefines::FISHBONES;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFishbonesMultipleSubs::startMD() const
|
||||
{
|
||||
double measuredDepth = 0.0;
|
||||
if (!m_locationOfSubs().empty())
|
||||
{
|
||||
measuredDepth = m_locationOfSubs().front();
|
||||
}
|
||||
|
||||
return measuredDepth;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFishbonesMultipleSubs::endMD() const
|
||||
{
|
||||
double measuredDepth = 0.0;
|
||||
if (!m_locationOfSubs().empty())
|
||||
{
|
||||
measuredDepth = m_locationOfSubs().back();
|
||||
}
|
||||
|
||||
return measuredDepth;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimFishbonesMultipleSubs::completionLabel() const
|
||||
{
|
||||
return generatedName();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimFishbonesMultipleSubs::completionTypeLabel() const
|
||||
{
|
||||
return "Fishbones";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -18,11 +18,12 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
|
||||
#include "RimCheckableNamedObject.h"
|
||||
#include "Rim3dPropertiesInterface.h"
|
||||
#include "RimFishbonesPipeProperties.h"
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RimWellPathCompletionInterface.h"
|
||||
|
||||
#include "cvfBase.h"
|
||||
#include "cvfVector3.h"
|
||||
@@ -51,7 +52,7 @@ struct SubLateralIndex {
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimFishbonesMultipleSubs : public caf::PdmObject, public Rim3dPropertiesInterface
|
||||
class RimFishbonesMultipleSubs : public caf::PdmObject, public Rim3dPropertiesInterface, public RimWellPathCompletionInterface
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
@@ -81,9 +82,6 @@ public:
|
||||
double measuredDepth(size_t subIndex) const;
|
||||
double rotationAngle(size_t subIndex) const;
|
||||
|
||||
double startOfSubMD() const;
|
||||
double endOfSubMD() const;
|
||||
|
||||
double exitAngle() const;
|
||||
double buildAngle() const;
|
||||
|
||||
@@ -107,6 +105,14 @@ public:
|
||||
// Override from Rim3dPropertiesInterface
|
||||
virtual cvf::BoundingBox boundingBoxInDomainCoords() const override;
|
||||
|
||||
// Overrides from RimWellPathCompletionsInterface
|
||||
virtual RiaDefines::CompletionType type() const override;
|
||||
virtual double startMD() const override;
|
||||
virtual double endMD() const override;
|
||||
virtual QString completionLabel() const override;
|
||||
virtual QString completionTypeLabel() const override;
|
||||
|
||||
|
||||
public:
|
||||
caf::PdmField<cvf::Color3f> fishbonesColor;
|
||||
|
||||
|
||||
@@ -285,6 +285,60 @@ void RimFracture::clearCachedNonDarcyProperties()
|
||||
m_cachedFractureProperties = NonDarcyData();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaDefines::CompletionType RimFracture::type() const
|
||||
{
|
||||
return RiaDefines::FRACTURE;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFracture::startMD() const
|
||||
{
|
||||
if (fractureTemplate()->orientationType() == RimFractureTemplate::ALONG_WELL_PATH)
|
||||
{
|
||||
return fractureMD() - 0.5*perforationLength();
|
||||
}
|
||||
else
|
||||
{
|
||||
return fractureMD();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimFracture::endMD() const
|
||||
{
|
||||
if (fractureTemplate()->orientationType() == RimFractureTemplate::ALONG_WELL_PATH)
|
||||
{
|
||||
return startMD() + perforationLength();
|
||||
}
|
||||
else
|
||||
{
|
||||
return startMD() + fractureTemplate()->computeFractureWidth(this);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimFracture::completionLabel() const
|
||||
{
|
||||
return name();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimFracture::completionTypeLabel() const
|
||||
{
|
||||
return "Fracture";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#include "Rim3dPropertiesInterface.h"
|
||||
#include "RimCheckableNamedObject.h"
|
||||
#include "RimWellPathCompletionInterface.h"
|
||||
|
||||
#include "cvfBase.h"
|
||||
#include "cvfObject.h"
|
||||
@@ -73,7 +74,7 @@ public:
|
||||
///
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimFracture : public RimCheckableNamedObject, public Rim3dPropertiesInterface
|
||||
class RimFracture : public RimCheckableNamedObject, public Rim3dPropertiesInterface, public RimWellPathCompletionInterface
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
@@ -127,6 +128,13 @@ public:
|
||||
|
||||
friend class RimFractureTemplate;
|
||||
|
||||
// RimWellPathCompletionsInterface overrides.
|
||||
virtual RiaDefines::CompletionType type() const override;
|
||||
virtual double startMD() const override;
|
||||
virtual double endMD() const override;
|
||||
virtual QString completionLabel() const override;
|
||||
virtual QString completionTypeLabel() const override;
|
||||
|
||||
protected:
|
||||
virtual QList<caf::PdmOptionItemInfo> calculateValueOptions(const caf::PdmFieldHandle* fieldNeedingOptions, bool * useOptionsOnly) override;
|
||||
virtual void defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrdering) override;
|
||||
|
||||
@@ -127,22 +127,6 @@ void RimPerforationInterval::setSkinFactor(double skinFactor)
|
||||
m_skinFactor = skinFactor;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimPerforationInterval::startMD() const
|
||||
{
|
||||
return m_startMD();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimPerforationInterval::endMD() const
|
||||
{
|
||||
return m_endMD();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -221,6 +205,46 @@ void RimPerforationInterval::setUnitSystemSpecificDefaults()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RiaDefines::CompletionType RimPerforationInterval::type() const
|
||||
{
|
||||
return RiaDefines::PERFORATION_INTERVAL;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimPerforationInterval::startMD() const
|
||||
{
|
||||
return m_startMD();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RimPerforationInterval::endMD() const
|
||||
{
|
||||
return m_endMD();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimPerforationInterval::completionLabel() const
|
||||
{
|
||||
return QString("Perforation Interval\n%1").arg(name());
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimPerforationInterval::completionTypeLabel() const
|
||||
{
|
||||
return "Perforations";
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include "RimCheckableNamedObject.h"
|
||||
#include "Rim3dPropertiesInterface.h"
|
||||
#include "RimWellPathCompletionInterface.h"
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
|
||||
@@ -32,7 +33,7 @@
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimPerforationInterval : public RimCheckableNamedObject, public Rim3dPropertiesInterface
|
||||
class RimPerforationInterval : public RimCheckableNamedObject, public Rim3dPropertiesInterface, public RimWellPathCompletionInterface
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
public:
|
||||
@@ -50,8 +51,6 @@ public:
|
||||
|
||||
void setDiameter(double diameter);
|
||||
void setSkinFactor(double skinFactor);
|
||||
double startMD() const;
|
||||
double endMD() const;
|
||||
double diameter(RiaEclipseUnitTools::UnitSystem unitSystem) const;
|
||||
double skinFactor() const;
|
||||
|
||||
@@ -61,6 +60,13 @@ public:
|
||||
|
||||
void setUnitSystemSpecificDefaults();
|
||||
|
||||
// RimWellPathCompletionInterface overrides
|
||||
virtual RiaDefines::CompletionType type() const override;
|
||||
virtual double startMD() const;
|
||||
virtual double endMD() const;
|
||||
virtual QString completionLabel() const override;
|
||||
virtual QString completionTypeLabel() const override;
|
||||
|
||||
protected:
|
||||
virtual void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
virtual void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2018 Equinor ASA
|
||||
//
|
||||
// ResInsight is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||
// for more details.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "RiaDefines.h"
|
||||
|
||||
//==================================================================================================
|
||||
// Interface implemented by all well path completions
|
||||
//
|
||||
//
|
||||
//==================================================================================================
|
||||
class RimWellPathCompletionInterface
|
||||
{
|
||||
public:
|
||||
virtual RiaDefines::CompletionType type() const = 0;
|
||||
virtual double startMD() const = 0;
|
||||
virtual double endMD() const = 0;
|
||||
virtual QString completionLabel() const = 0;
|
||||
virtual QString completionTypeLabel() const = 0;
|
||||
};
|
||||
|
||||
|
||||
@@ -22,8 +22,12 @@
|
||||
|
||||
#include "RimFishbonesCollection.h"
|
||||
#include "RimFishboneWellPathCollection.h"
|
||||
#include "RimFishbonesMultipleSubs.h"
|
||||
#include "RimPerforationCollection.h"
|
||||
#include "RimPerforationInterval.h"
|
||||
#include "RimWellPathFractureCollection.h"
|
||||
#include "RimWellPathFracture.h"
|
||||
#include "RimWellPathCompletionInterface.h"
|
||||
|
||||
#include "cvfAssert.h"
|
||||
|
||||
@@ -165,6 +169,29 @@ RimWellPathFractureCollection* RimWellPathCompletions::fractureCollection() cons
|
||||
return m_fractureCollection;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<const RimWellPathCompletionInterface*> RimWellPathCompletions::allCompletions() const
|
||||
{
|
||||
std::vector<const RimWellPathCompletionInterface*> completions;
|
||||
|
||||
for (const RimWellPathFracture* fracture : fractureCollection()->allFractures())
|
||||
{
|
||||
completions.push_back(fracture);
|
||||
}
|
||||
for (const RimFishbonesMultipleSubs* fishbones : fishbonesCollection()->allFishbonesSubs())
|
||||
{
|
||||
completions.push_back(fishbones);
|
||||
}
|
||||
for (const RimPerforationInterval* perforation : perforationCollection()->perforations())
|
||||
{
|
||||
completions.push_back(perforation);
|
||||
}
|
||||
|
||||
return completions;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
class RimFishbonesCollection;
|
||||
class RimPerforationCollection;
|
||||
class RimWellPathFractureCollection;
|
||||
class RimWellPathCompletionInterface;
|
||||
|
||||
|
||||
//==================================================================================================
|
||||
@@ -45,6 +46,8 @@ public:
|
||||
RimPerforationCollection* perforationCollection() const;
|
||||
RimWellPathFractureCollection* fractureCollection() const;
|
||||
|
||||
std::vector<const RimWellPathCompletionInterface*> allCompletions() const;
|
||||
|
||||
void setWellNameForExport(const QString& name);
|
||||
QString wellNameForExport() const;
|
||||
QString wellGroupNameForExport() const;
|
||||
|
||||
Reference in New Issue
Block a user