#include <TimeMap.hpp>

Public Member Functions

 TimeMap ()=default
 
 TimeMap (const Deck &deck, const std::pair< std::time_t, std::size_t > &restart=std::make_pair(std::time_t{0}, std::size_t{0}))
 
 TimeMap (const std::vector< std::time_t > &time_points)
 
size_t size () const
 
size_t last () const
 
size_t numTimesteps () const
 
double getTotalTime () const
 
double seconds (size_t timeStep) const
 
std::size_t restart_offset () const
 
std::time_t operator[] (size_t index) const
 
std::time_t getStartTime (size_t tStepIdx) const
 Return the date and time where a given time step starts. More...
 
std::time_t getEndTime () const
 
bool skiprest () const
 
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...
 
const std::vector< std::time_t > & timeList () const
 
bool operator== (const TimeMap &data) const
 
bool isTimestepInFirstOfMonthsYearsSequence (size_t timestep, bool years=true, size_t start_timestep=1, size_t frequency=1) const
 
template<class Serializer >
void serializeOp (Serializer &serializer)
 

Static Public Member Functions

static TimeMap serializeObject ()
 
static std::time_t timeFromEclipse (const DeckRecord &dateRecord)
 
static std::time_t forward (std::time_t t0, int64_t hours, int64_t minutes, int64_t seconds)
 
static std::time_t forward (std::time_t t0, int64_t seconds)
 
static std::time_t mkdate (int year, int month, int day)
 
static std::time_t mkdatetime (int year, int month, int day, int hour, int minute, int second)
 
static const std::map< std::string, int > & eclipseMonthIndices ()
 

Constructor & Destructor Documentation

◆ TimeMap() [1/3]

Opm::TimeMap::TimeMap ( )
default

◆ TimeMap() [2/3]

Opm::TimeMap::TimeMap ( const Deck deck,
const std::pair< std::time_t, std::size_t > &  restart = std::make_pair(std::time_t{0}, std::size_t{0}) 
)
explicit

◆ TimeMap() [3/3]

Opm::TimeMap::TimeMap ( const std::vector< std::time_t > &  time_points)
explicit

Member Function Documentation

◆ eclipseMonthIndices()

static const std::map< std::string, int > & Opm::TimeMap::eclipseMonthIndices ( )
static

◆ forward() [1/2]

static std::time_t Opm::TimeMap::forward ( std::time_t  t0,
int64_t  hours,
int64_t  minutes,
int64_t  seconds 
)
static

◆ forward() [2/2]

static std::time_t Opm::TimeMap::forward ( std::time_t  t0,
int64_t  seconds 
)
static

◆ getEndTime()

std::time_t Opm::TimeMap::getEndTime ( ) const

◆ getStartTime()

std::time_t Opm::TimeMap::getStartTime ( size_t  tStepIdx) const

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

◆ getTimePassedUntil()

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.

◆ getTimeStepLength()

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

Return the length of a given time step in seconds.

◆ getTotalTime()

double Opm::TimeMap::getTotalTime ( ) const

◆ isTimestepInFirstOfMonthsYearsSequence()

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 if the step is the first of each n-month or n-month period, starting from start_timestep - 1.

◆ last()

size_t Opm::TimeMap::last ( ) const

◆ mkdate()

static std::time_t Opm::TimeMap::mkdate ( int  year,
int  month,
int  day 
)
static

◆ mkdatetime()

static std::time_t Opm::TimeMap::mkdatetime ( int  year,
int  month,
int  day,
int  hour,
int  minute,
int  second 
)
static

◆ numTimesteps()

size_t Opm::TimeMap::numTimesteps ( ) const

◆ operator==()

bool Opm::TimeMap::operator== ( const TimeMap data) const

◆ operator[]()

std::time_t Opm::TimeMap::operator[] ( size_t  index) const

◆ restart_offset()

std::size_t Opm::TimeMap::restart_offset ( ) const

◆ seconds()

double Opm::TimeMap::seconds ( size_t  timeStep) const

◆ serializeObject()

static TimeMap Opm::TimeMap::serializeObject ( )
static

◆ serializeOp()

template<class Serializer >
void Opm::TimeMap::serializeOp ( Serializer serializer)
inline

◆ size()

size_t Opm::TimeMap::size ( ) const

◆ skiprest()

bool Opm::TimeMap::skiprest ( ) const

◆ timeFromEclipse()

static std::time_t Opm::TimeMap::timeFromEclipse ( const DeckRecord dateRecord)
static

◆ timeList()

const std::vector< std::time_t > & Opm::TimeMap::timeList ( ) const

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