Using Value<double> for Well::m_refDepth
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
|
||||
#include <boost/date_time.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/EclipseState/Util/Value.hpp>
|
||||
#include <opm/parser/eclipse/Deck/DeckRecord.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/DynamicState.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Schedule/Well.hpp>
|
||||
@@ -27,7 +28,7 @@
|
||||
|
||||
namespace Opm {
|
||||
|
||||
Well::Well(const std::string& name_, int headI, int headJ, double refDepth, Phase::PhaseEnum preferredPhase,
|
||||
Well::Well(const std::string& name_, int headI, int headJ, Value<double> refDepth , Phase::PhaseEnum preferredPhase,
|
||||
TimeMapConstPtr timeMap, size_t creationTimeStep)
|
||||
: m_status(new DynamicState<WellCommon::StatusEnum>(timeMap, WellCommon::OPEN)),
|
||||
m_isAvailableForGroupControl(new DynamicState<bool>(timeMap, true)),
|
||||
@@ -42,7 +43,6 @@ namespace Opm {
|
||||
m_groupName( new DynamicState<std::string>( timeMap , "" )),
|
||||
m_headI(headI),
|
||||
m_headJ(headJ),
|
||||
m_refDepthDefaulted(false),
|
||||
m_refDepth(refDepth),
|
||||
m_preferredPhase(preferredPhase)
|
||||
{
|
||||
@@ -50,29 +50,6 @@ namespace Opm {
|
||||
m_creationTimeStep = creationTimeStep;
|
||||
}
|
||||
|
||||
Well::Well(const std::string& name_, int headI, int headJ, Phase::PhaseEnum preferredPhase,
|
||||
TimeMapConstPtr timeMap, size_t creationTimeStep)
|
||||
: m_status(new DynamicState<WellCommon::StatusEnum>(timeMap, WellCommon::OPEN)),
|
||||
m_isAvailableForGroupControl(new DynamicState<bool>(timeMap, true)),
|
||||
m_guideRate(new DynamicState<double>(timeMap, -1.0)),
|
||||
m_guideRatePhase(new DynamicState<GuideRate::GuideRatePhaseEnum>(timeMap, GuideRate::UNDEFINED)),
|
||||
m_guideRateScalingFactor(new DynamicState<double>(timeMap, 1.0)),
|
||||
m_isProducer(new DynamicState<bool>(timeMap, true)) ,
|
||||
m_completions( new DynamicState<CompletionSetConstPtr>( timeMap , CompletionSetConstPtr( new CompletionSet()) )),
|
||||
m_productionProperties( new DynamicState<WellProductionProperties>(timeMap, WellProductionProperties() )),
|
||||
m_injectionProperties( new DynamicState<WellInjectionProperties>(timeMap, WellInjectionProperties() )),
|
||||
m_polymerProperties( new DynamicState<WellPolymerProperties>(timeMap, WellPolymerProperties() )),
|
||||
m_groupName( new DynamicState<std::string>( timeMap , "" )),
|
||||
m_headI(headI),
|
||||
m_headJ(headJ),
|
||||
m_refDepthDefaulted(true),
|
||||
m_refDepth(-1e100),
|
||||
m_preferredPhase(preferredPhase)
|
||||
{
|
||||
m_name = name_;
|
||||
m_creationTimeStep = creationTimeStep;
|
||||
}
|
||||
|
||||
const std::string& Well::name() const {
|
||||
return m_name;
|
||||
}
|
||||
@@ -191,11 +168,11 @@ namespace Opm {
|
||||
}
|
||||
|
||||
bool Well::getRefDepthDefaulted() const {
|
||||
return m_refDepthDefaulted;
|
||||
return !m_refDepth.hasValue();
|
||||
}
|
||||
|
||||
double Well::getRefDepth() const {
|
||||
return m_refDepth;
|
||||
return m_refDepth.getValue();
|
||||
}
|
||||
|
||||
Phase::PhaseEnum Well::getPreferredPhase() const {
|
||||
|
||||
Reference in New Issue
Block a user