Change Well constructors to avoid explicit bool arg.

Suggested by Joakim Hove.
This commit is contained in:
Atgeirr Flø Rasmussen
2014-08-07 16:59:40 +02:00
parent 6dfeadc229
commit 15ee739326
6 changed files with 70 additions and 44 deletions

View File

@@ -27,8 +27,7 @@
namespace Opm {
Well::Well(const std::string& name_, int headI, int headJ,
bool refDepthDefaulted, double refDepth, Phase::PhaseEnum preferredPhase,
Well::Well(const std::string& name_, int headI, int headJ, 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 +41,7 @@ namespace Opm {
m_groupName( new DynamicState<std::string>( timeMap , "" )),
m_headI(headI),
m_headJ(headJ),
m_refDepthDefaulted(refDepthDefaulted),
m_refDepthDefaulted(false),
m_refDepth(refDepth),
m_preferredPhase(preferredPhase)
{
@@ -50,6 +49,28 @@ 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_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;
}