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/input/eclipse/Deck/Deck.hpp>
31 #include <opm/common/utility/TimeService.hpp>
33 #include <opm/io/eclipse/rst/state.hpp>
37 enum class ScheduleTimeType {
47 struct ScheduleDeckContext;
59 std::size_t size()
const;
61 std::optional<DeckKeyword> get(
const std::string& kw)
const;
62 const time_point& start_time()
const;
63 const std::optional<time_point>& end_time()
const;
64 void end_time(
const time_point& t);
65 ScheduleTimeType time_type()
const;
67 const DeckKeyword& operator[](
const std::size_t index)
const;
68 std::vector<DeckKeyword>::const_iterator begin()
const;
69 std::vector<DeckKeyword>::const_iterator end()
const;
73 template<
class Serializer>
75 serializer(m_time_type);
76 serializer(m_start_time);
77 serializer(m_end_time);
78 serializer.vector(m_keywords);
79 m_location.serializeOp(serializer);
82 void dump_time(time_point current_time,
DeckOutput& output)
const;
83 void dump_deck(
DeckOutput& output, time_point& current_time)
const;
85 ScheduleTimeType m_time_type;
86 time_point m_start_time;
87 std::optional<time_point> m_end_time;
89 std::vector<DeckKeyword> m_keywords;
95 std::size_t report_step{0};
104 template<
class Serializer>
107 serializer(this->time);
108 serializer(this->report_step);
109 serializer(this->skiprest);
129 void add_block(ScheduleTimeType time_type,
const time_point& t, ScheduleDeckContext& context,
const KeywordLocation& location);
130 void add_TSTEP(
const DeckKeyword& TSTEPKeyword, ScheduleDeckContext& context);
132 const ScheduleBlock& operator[](
const std::size_t index)
const;
133 std::vector<ScheduleBlock>::const_iterator begin()
const;
134 std::vector<ScheduleBlock>::const_iterator end()
const;
135 std::size_t size()
const;
136 std::size_t restart_offset()
const;
138 double seconds(std::size_t timeStep)
const;
142 template<
class Serializer>
144 serializer(m_restart_time);
145 serializer(m_restart_offset);
146 serializer(skiprest);
147 serializer.vector(m_blocks);
148 m_location.serializeOp(serializer);
151 void dump_deck(std::ostream& os)
const;
154 time_point m_restart_time;
155 std::size_t m_restart_offset;
158 std::vector<ScheduleBlock> m_blocks;
Definition: DeckKeyword.hpp:36
Definition: DeckOutput.hpp:29
Definition: KeywordLocation.hpp:27
Definition: ScheduleDeck.hpp:55
Definition: ScheduleDeck.hpp:125
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:93