#include <TimeMap.hpp>

Public Member Functions

 TimeMap (boost::posix_time::ptime startDate)
 
 TimeMap (Opm::DeckConstPtr deck)
 
void addTime (boost::posix_time::ptime newTime)
 
void addTStep (boost::posix_time::time_duration step)
 
void addFromDATESKeyword (DeckKeywordConstPtr DATESKeyword)
 
void addFromTSTEPKeyword (DeckKeywordConstPtr TSTEPKeyword)
 
void initFirstTimestepsMonths ()
 
void initFirstTimestepsYears ()
 
size_t size () const
 
size_t numTimesteps () const
 
double getTotalTime () const
 
const boost::posix_time::ptime & operator[] (size_t index) const
 
boost::posix_time::ptime getStartTime (size_t tStepIdx) const
 Return the date and time where a given time step starts. More...
 
double getTimePassedUntil (size_t tLevelIdx) const
 Return the period of time in seconds which passed between the start of the simulation and a given point in time. More...
 
double getTimeStepLength (size_t tStepIdx) const
 Return the length of a given time step in seconds. More...
 
bool isTimestepInFirstOfMonthsYearsSequence (size_t timestep, bool years=true, size_t start_timestep=1, size_t frequency=1) const
 

Static Public Member Functions

static boost::posix_time::ptime timeFromEclipse (DeckRecordConstPtr dateRecord)
 
static boost::posix_time::ptime timeFromEclipse (int day, const std::string &month, int year, const std::string &eclipseTimeString="00:00:00.000")
 
static
boost::posix_time::time_duration 
dayTimeFromEclipse (const std::string &eclipseTimeString)
 

Constructor & Destructor Documentation

Opm::TimeMap::TimeMap ( boost::posix_time::ptime  startDate)
Opm::TimeMap::TimeMap ( Opm::DeckConstPtr  deck)

Member Function Documentation

void Opm::TimeMap::addFromDATESKeyword ( DeckKeywordConstPtr  DATESKeyword)
void Opm::TimeMap::addFromTSTEPKeyword ( DeckKeywordConstPtr  TSTEPKeyword)
void Opm::TimeMap::addTime ( boost::posix_time::ptime  newTime)
void Opm::TimeMap::addTStep ( boost::posix_time::time_duration  step)
static boost::posix_time::time_duration Opm::TimeMap::dayTimeFromEclipse ( const std::string &  eclipseTimeString)
static
boost::posix_time::ptime Opm::TimeMap::getStartTime ( size_t  tStepIdx) const

Return the date and time where a given time step starts.

double Opm::TimeMap::getTimePassedUntil ( size_t  tLevelIdx) const

Return the period of time in seconds which passed between the start of the simulation and a given point in time.

double Opm::TimeMap::getTimeStepLength ( size_t  tStepIdx) const

Return the length of a given time step in seconds.

double Opm::TimeMap::getTotalTime ( ) const
void Opm::TimeMap::initFirstTimestepsMonths ( )
void Opm::TimeMap::initFirstTimestepsYears ( )
bool Opm::TimeMap::isTimestepInFirstOfMonthsYearsSequence ( size_t  timestep,
bool  years = true,
size_t  start_timestep = 1,
size_t  frequency = 1 
) const

Return true if the given timestep is the first one of a new month or year, or if frequency > 1, return true for every n'th timestep of every first new month or first new year timesteps, starting from start_timestep-1.

size_t Opm::TimeMap::numTimesteps ( ) const
const boost::posix_time::ptime& Opm::TimeMap::operator[] ( size_t  index) const
size_t Opm::TimeMap::size ( ) const
static boost::posix_time::ptime Opm::TimeMap::timeFromEclipse ( DeckRecordConstPtr  dateRecord)
static
static boost::posix_time::ptime Opm::TimeMap::timeFromEclipse ( int  day,
const std::string &  month,
int  year,
const std::string &  eclipseTimeString = "00:00:00.000" 
)
static

The documentation for this class was generated from the following file: