Added createTimeStep to Group constructor to keep track of group creation time
This commit is contained in:
@@ -83,12 +83,13 @@ namespace Opm {
|
||||
|
||||
/*****************************************************************/
|
||||
|
||||
Group::Group(const std::string& name , TimeMapConstPtr timeMap) :
|
||||
Group::Group(const std::string& name , TimeMapConstPtr timeMap , size_t createTimeStep) :
|
||||
m_injection( new GroupInjection::InjectionData(timeMap) ),
|
||||
m_production( new GroupProduction::ProductionData( timeMap )),
|
||||
m_wells( new DynamicState<WellSetConstPtr>(timeMap , WellSetConstPtr(new WellSet() )))
|
||||
{
|
||||
m_name = name;
|
||||
m_createTimeStep = createTimeStep;
|
||||
}
|
||||
|
||||
|
||||
@@ -96,6 +97,15 @@ namespace Opm {
|
||||
return m_name;
|
||||
}
|
||||
|
||||
|
||||
bool Group::hasBeenDefined(size_t timeStep) const {
|
||||
if (timeStep < m_createTimeStep)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void Group::setInjectionPhase(size_t time_step , PhaseEnum phase){
|
||||
if (m_injection->phase->size() == time_step + 1) {
|
||||
|
||||
Reference in New Issue
Block a user