19 #ifndef SCHEDULE_DECK_HPP
20 #define SCHEDULE_DECK_HPP
27 #include <opm/common/OpmLog/KeywordLocation.hpp>
28 #include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
29 #include <opm/parser/eclipse/Deck/Deck.hpp>
30 #include <opm/common/utility/TimeService.hpp>
32 #include <opm/io/eclipse/rst/state.hpp>
33 #include <opm/parser/eclipse/Parser/ParserKeywords/S.hpp>
37 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.vector(m_keywords);
78 m_location.serializeOp(serializer);
81 ScheduleTimeType m_time_type;
82 time_point m_start_time;
83 std::optional<time_point> m_end_time;
85 std::vector<DeckKeyword> m_keywords;
91 std::size_t report_step{0};
98 const auto& [t,r] = rst->header.restart_info();
100 this->report_step = r;
101 this->skiprest = deck.hasKeyword<ParserKeywords::SKIPREST>();
107 return this->time == other.time &&
108 this->report_step == other.report_step &&
109 this->skiprest == other.skiprest;
115 rst_info.report_step = 12345;
116 rst_info.skiprest =
false;
121 template<
class Serializer>
124 serializer(this->time);
125 serializer(this->report_step);
126 serializer(this->skiprest);
146 void add_block(ScheduleTimeType time_type,
const time_point& t, ScheduleDeckContext& context,
const KeywordLocation& location);
147 void add_TSTEP(
const DeckKeyword& TSTEPKeyword, ScheduleDeckContext& context);
149 const ScheduleBlock& operator[](
const std::size_t index)
const;
150 std::vector<ScheduleBlock>::const_iterator begin()
const;
151 std::vector<ScheduleBlock>::const_iterator end()
const;
152 std::size_t size()
const;
153 std::size_t restart_offset()
const;
155 double seconds(std::size_t timeStep)
const;
159 template<
class Serializer>
161 serializer(m_restart_time);
162 serializer(m_restart_offset);
163 serializer(skiprest);
164 serializer.vector(m_blocks);
165 m_location.serializeOp(serializer);
169 time_point m_restart_time;
170 std::size_t m_restart_offset;
173 std::vector<ScheduleBlock> m_blocks;
Definition: DeckKeyword.hpp:36
Definition: KeywordLocation.hpp:27
Definition: Runspec.hpp:402
Definition: ScheduleDeck.hpp:54
Definition: ScheduleDeck.hpp:142
Definition: Serializer.hpp:38
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:29
Definition: ScheduleDeck.hpp:89