Commit Graph

45 Commits

Author SHA1 Message Date
Arne Morten Kvarving
d076a18b85 add serialization template to TimeMap 2020-03-19 09:26:03 +01:00
Joakim Hove
4d01b85e99 Add operator<< support for TimeMap 2020-03-13 12:17:41 +01:00
Joakim Hove
cad54feafb Internalize the existence of SKIPREST in the TimeMap 2020-02-16 17:53:27 +01:00
Joakim Hove
79a75eba2a Add public accessor TimeMap::restart_offset() 2020-01-28 12:49:27 +01:00
Joakim Hove
db8ded1f09 Pass restart info to TimeMap constructor 2020-01-24 19:27:53 +01:00
Joakim Hove
fd698139f5 Remove special code for serialization 2020-01-22 18:50:59 +01:00
Joakim Hove
fc9958bb0c Remove TimeMap( start_time ) constructor 2020-01-22 16:56:42 +01:00
Joakim Hove
63e99fb807 Make mutable accessors in TimeMap private 2020-01-22 16:23:37 +01:00
Joakim Hove
2d8151808f Add TimeMap(std::vector<std::time_t>& ) constructor 2020-01-22 16:23:37 +01:00
Arne Morten Kvarving
6378d55fa9 allow constructing TimeMap from tables
also add accessors and equality operators
2019-12-17 16:33:46 +01:00
Atgeirr Flø Rasmussen
b787a1a259 Fix TimeMap::isTimestepInFirstOfMonthsYearsSequence() method. 2019-11-08 17:26:02 +01:00
Bård Skaflestad
428d4c41f0 Reimplement TimeMap in Terms of TimeStampUTC 2019-10-16 20:03:08 -05:00
Joakim Hove
9d45632628 Make Eclipse month indices available for use outside TimeMap 2018-11-07 09:25:02 +01:00
Joakim Hove
ee0d256a12 Add method seconds() to Schedule and TimeMap 2018-10-17 12:09:45 +02:00
Joakim Hove
b280ab9cdf Changed TimeMap::forward to use int64_t 2017-06-30 15:23:10 +02:00
Jens Ivar Jørdre
47bfce0f3a Remove Boost ptime and augment tests
Remove constructor and overloads using Boost ptime. Also remove methods
rendered obsolete by the removal of ptime dependency. Rename methods
whose name was initially set to differentiate from ptime counterparts,
an example of which being 'timeTFromEclipse' renamed to
'timeFromEclipse'.

Replace use of gmtime() with util_set_date_values_utc().

Change signature of addTStep(std::time_t) to addTStep(int64_t).

Change base of month indices returned from eclipseMonthIndices(). Now
indices are 1-based.

Simplify timeFromEclipse() (previously timeTFromEclipse()).

Add mkdatetime(), analogous to mkdate() but with also hour, minute
and second parameters.
2017-06-29 14:42:59 +02:00
Jens Ivar Jørdre
1646b3b994 Clean up code
Make use of static method mkdate() rather then using new static method
dateToTM().

Fix error in addTime(std::time_t)

Remove obsolete method dateToTm() and TODO comments.
2017-06-27 13:15:44 +02:00
Jens Ivar Jørdre
c9af992b71 Add support for 64 bit time steps
Replace internal use of boost::posix_time::ptime with std::time_t.
2017-06-26 14:37:35 +02:00
Joakim Hove
16e12b0a65 Added TimeMap::forward( ) 2017-06-19 10:54:34 +02:00
Joakim Hove
e802737ec4 Changed from boost datetim to std::time_t. 2017-06-19 10:54:33 +02:00
Joakim Hove
f299984280 Changed TimeMap::operator[] to return std::time_t 2017-06-19 10:54:33 +02:00
Jørgen Kvalsvik
239ef7a34c Remove shared_ptr typedef in TimeMap 2016-10-19 20:38:28 +02:00
Joakim Hove
8ee057eca5 Added method Schedule::posixEndTime() 2016-09-12 21:42:34 +02:00
Joakim Hove
0db0637ef7 RPTRST / TimeMap updates
- Fixed bug with RPTRST BASIC=4 terminated before a year.

 - Refactored machinery to keep track of first report step in every
   month/year.
2016-07-01 17:04:58 +02:00
Joakim Hove
0c0cc14538 Removed TimeMap assemble from Schedule class. 2016-07-01 17:04:58 +02:00
Jørgen Kvalsvik
edb8cdc72d IOConfig creates TimeMap independently of Schedule
Completely remove the dependency between Schedule and IOConfig. IOConfig
will generate its own instance of TimeMap, rather than relying on
Schedule to construction and keeping it alive.
2016-06-06 09:04:30 +02:00
Jørgen Kvalsvik
6ce846ca0b TimeMap::last() support
Query the last time step of the map.
2016-03-29 14:34:00 +02:00
Jørgen Kvalsvik
f0ae5db131 opm-parser adoption of Deck automatic ownership
Since the Deck* family of classes have changed their interfaces to no
longer use shared_ptr, a lot of code broke. This patch fixes all
problems in tests, other signatures and accesses to now use the new Deck
interfaces.
2016-02-18 13:27:24 +01:00
Jørgen Kvalsvik
4b98943665 Replaces unecessary header includes with fwd decls
Every header is self-contained and includes only what it must to
function, relying on users include what they need in source files,
adopting a pay-what-you-use model (in particular for internal
dependencies).
2016-01-26 13:23:22 +01:00
Jørgen Kvalsvik
f404828d63 Cleans up headers to improve build preformance
This is an effort to improve build performance.  Several includes
scattered across the project are either unused or partially used (i.e.
just used to import a type name, not depending on the actual contents of
the header file).

Replaces a lot of these includes with forward declarations.
2016-01-21 09:22:06 +01:00
chflo
f7046ff8e0 OPM-218-fix: TimeMap: Added vectors and methods for timestep Years/Months, init only once 2015-09-25 10:28:23 +02:00
Joakim Hove
7152274be7 Added const& operator[] to TimeMap. 2015-08-04 14:40:54 +02:00
chflo
1156fb6a90 OPM-218: Fixed restart interval write for basic=4/5 2015-08-02 22:01:50 +02:00
chflo
a40d867704 OPM 199: Added new methods to TimeMap and corresponding tests 2015-05-26 09:43:58 +02:00
Andreas Lauser
30a16410aa TimeMap: fix the timePassedUntil() method
whoever wrote the original code must have his brain left in the bed
that day ;)...
2014-03-11 15:01:14 +01:00
Joakim Hove
f91229218e Moved the implementation of two micro functions from .hpp to .cpp file + changed one int -> size_t. 2014-02-26 23:24:31 +01:00
Andreas Lauser
b9956385ef fixup! TimeMap: Expose more data 2014-02-26 15:46:18 +01:00
Andreas Lauser
9b8c5d317e TimeMap: add constructor which takes a deck
this simplifies things considerably and hopefully avoids code
excessive code duplication..
2014-02-21 17:06:22 +01:00
Andreas Lauser
e6c0ff4546 TimeMap: Expose more data
basically, we now can access the beginning of a timestep its length
and the total time passed since the beginning of life, the universe
and all the rest.
2014-02-21 17:06:21 +01:00
Andreas Lauser
be137414c8 TimeMap: simplify the initialization of the eclipse month name map slightly 2014-02-21 17:06:21 +01:00
Andreas Lauser
18eb2fd8f4 TimeMap: replace boost::gregorian::date by boost::posix_time::ptime
this is necessary because boost::gregorian::date does not have a
notion of "time during a day" which is required to specify time step
lengths less than a day...
2014-02-21 17:06:21 +01:00
Kristian Flikka
1d0135da5e Removed use of boost::shared_ptr, replaced with std::shared_ptr 2013-12-02 13:07:01 +01:00
Joakim Hove
488782d8c5 TimeMap class can now be constructed from an Eclipse DECK 2013-10-25 17:26:37 +02:00
Joakim Hove
8cc555c5ac Added basic functionality to assemble a timeMap 2013-10-22 17:11:33 +02:00
Joakim Hove
2a09a6b2c1 Added (empty) TimeMap class 2013-10-22 14:24:31 +02:00