19 #ifndef SCHEDULE_DECK_HPP
20 #define SCHEDULE_DECK_HPP
28 #include <opm/common/OpmLog/KeywordLocation.hpp>
29 #include <opm/input/eclipse/Deck/DeckKeyword.hpp>
30 #include <opm/common/utility/TimeService.hpp>
32 #include <opm/io/eclipse/rst/state.hpp>
36 enum class ScheduleTimeType {
46 struct ScheduleDeckContext;
58 std::size_t size()
const;
60 std::optional<DeckKeyword> get(
const std::string& kw)
const;
61 const time_point& start_time()
const;
62 const std::optional<time_point>& end_time()
const;
63 void end_time(
const time_point& t);
64 ScheduleTimeType time_type()
const;
66 const DeckKeyword& operator[](
const std::size_t index)
const;
67 std::vector<DeckKeyword>::const_iterator begin()
const;
68 std::vector<DeckKeyword>::const_iterator end()
const;
72 template<
class Serializer>
74 serializer(m_time_type);
75 serializer(m_start_time);
76 serializer(m_end_time);
77 serializer(m_keywords);
78 serializer(m_location);
81 void dump_time(time_point current_time,
DeckOutput& output)
const;
82 void dump_deck(
DeckOutput& output, time_point& current_time)
const;
84 ScheduleTimeType m_time_type;
85 time_point m_start_time;
86 std::optional<time_point> m_end_time;
88 std::vector<DeckKeyword> m_keywords;
94 std::size_t report_step{0};
103 template<
class Serializer>
106 serializer(this->time);
107 serializer(this->report_step);
108 serializer(this->skiprest);
128 void add_block(ScheduleTimeType time_type,
const time_point& t, ScheduleDeckContext& context,
const KeywordLocation& location);
129 void add_TSTEP(
const DeckKeyword& TSTEPKeyword, ScheduleDeckContext& context);
131 const ScheduleBlock& operator[](
const std::size_t index)
const;
132 std::vector<ScheduleBlock>::const_iterator begin()
const;
133 std::vector<ScheduleBlock>::const_iterator end()
const;
134 std::size_t size()
const;
135 std::size_t restart_offset()
const;
137 double seconds(std::size_t timeStep)
const;
141 template<
class Serializer>
143 serializer(m_restart_time);
144 serializer(m_restart_offset);
145 serializer(skiprest);
146 serializer(m_blocks);
147 serializer(m_location);
150 void dump_deck(std::ostream& os)
const;
153 time_point m_restart_time;
154 std::size_t m_restart_offset;
157 std::vector<ScheduleBlock> m_blocks;
Definition: DeckKeyword.hpp:36
Definition: DeckOutput.hpp:29
Definition: KeywordLocation.hpp:27
Definition: ScheduleDeck.hpp:54
Definition: ScheduleDeck.hpp:124
Class for (de-)serializing.
Definition: Serializer.hpp:75
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:29
Definition: ScheduleDeck.hpp:92