opm-common
Toggle main menu visibility
Loading...
Searching...
No Matches
ScheduleDeck.hpp
1
/*
2
Copyright 2021 Equinor ASA.
3
4
This file is part of the Open Porous Media project (OPM).
5
6
OPM is free software: you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation, either version 3 of the License, or
9
(at your option) any later version.
10
11
OPM is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
15
16
You should have received a copy of the GNU General Public License
17
along with OPM. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
#ifndef SCHEDULE_DECK_HPP
20
#define SCHEDULE_DECK_HPP
21
22
#include <opm/common/OpmLog/KeywordLocation.hpp>
23
#include <opm/common/utility/TimeService.hpp>
24
25
#include <opm/input/eclipse/Deck/DeckKeyword.hpp>
26
27
#include <opm/input/eclipse/Schedule/ScheduleBlock.hpp>
28
29
#include <cstddef>
30
#include <iosfwd>
31
#include <vector>
32
33
34
namespace
Opm
{
35
36
struct
ScheduleRestartInfo
;
37
38
class
Deck
;
39
class
DeckOutput
;
40
struct
ScheduleDeckContext
;
41
class
Runspec
;
42
class
UnitSystem
;
43
44
/*
45
The purpose of the ScheduleDeck class is to serve as a container holding
46
all the keywords of the SCHEDULE section, when the Schedule class is
47
assembled that is done by iterating over the contents of the ScheduleDeck.
48
The ScheduleDeck class can be indexed with report step through operator[].
49
Internally the ScheduleDeck class is a vector of ScheduleBlock instances -
50
one for each report step.
51
*/
52
53
class
ScheduleDeck {
54
public
:
55
explicit
ScheduleDeck(time_point start_time,
const
Deck
& deck,
const
ScheduleRestartInfo
& rst_info);
56
ScheduleDeck();
57
void
add_block(ScheduleTimeType time_type,
const
time_point& t,
58
ScheduleDeckContext
& context,
const
KeywordLocation
& location);
59
void
add_TSTEP(
const
DeckKeyword
& TSTEPKeyword,
ScheduleDeckContext
& context);
60
ScheduleBlock
& operator[](
const
std::size_t index);
61
const
ScheduleBlock
& operator[](
const
std::size_t index)
const
;
62
std::vector<ScheduleBlock>::const_iterator begin()
const
;
63
std::vector<ScheduleBlock>::const_iterator end()
const
;
64
std::size_t size()
const
;
65
std::size_t restart_offset()
const
;
66
const
KeywordLocation
& location()
const
;
67
double
seconds(std::size_t timeStep)
const
;
68
69
bool
operator==(
const
ScheduleDeck& other)
const
;
70
static
ScheduleDeck serializationTestObject();
71
template
<
class
Serializer>
72
void
serializeOp(
Serializer
& serializer) {
73
serializer(m_restart_time);
74
serializer(m_restart_offset);
75
serializer(skiprest);
76
serializer(m_blocks);
77
serializer(m_location);
78
}
79
80
void
dump_deck(std::ostream& os,
const
UnitSystem
& usys)
const
;
81
82
void
clearKeywords(
const
std::size_t idx);
83
84
private
:
85
time_point m_restart_time{};
86
std::size_t m_restart_offset{};
87
bool
skiprest{
false
};
88
KeywordLocation
m_location{};
89
std::vector<ScheduleBlock> m_blocks{};
90
};
91
}
92
93
#endif
Opm::DeckKeyword
Definition
DeckKeyword.hpp:36
Opm::DeckOutput
Definition
DeckOutput.hpp:29
Opm::Deck
Definition
Deck.hpp:46
Opm::KeywordLocation
Definition
KeywordLocation.hpp:27
Opm::Runspec
Definition
Runspec.hpp:489
Opm::ScheduleBlock
Definition
ScheduleBlock.hpp:52
Opm::Serializer
Class for (de-)serializing.
Definition
Serializer.hpp:94
Opm::UnitSystem
Definition
UnitSystem.hpp:34
Opm
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition
Exceptions.hpp:30
Opm::ScheduleDeckContext
Definition
ScheduleDeck.cpp:47
Opm::ScheduleRestartInfo
Definition
ScheduleRestartInfo.hpp:31
opm
input
eclipse
Schedule
ScheduleDeck.hpp
Generated by
1.17.0