My Project
Loading...
Searching...
No Matches
ActionValue.hpp
1
/*
2
Copyright 2019 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
20
#ifndef ACTION_VALUE_HPP
21
#define ACTION_VALUE_HPP
22
23
#include <opm/input/eclipse/Schedule/Action/ActionResult.hpp>
24
25
#include <string>
26
#include <utility>
27
#include <vector>
28
29
namespace
Opm
{
namespace
Action {
30
31
enum class
TokenType
32
{
33
number,
// 0
34
ecl_expr,
// 1
35
open_paren,
// 2
36
close_paren,
// 3
37
op_gt,
// 4
38
op_ge,
// 5
39
op_lt,
// 6
40
op_le,
// 7
41
op_eq,
// 8
42
op_ne,
// 9
43
op_and,
// 10
44
op_or,
// 11
45
end,
// 12
46
error,
// 13
47
};
48
49
enum class
FuncType
50
{
51
none,
52
time,
53
time_month,
54
region,
55
field,
56
group,
57
well,
58
well_segment,
59
well_connection,
60
Well_lgr,
61
aquifer,
62
block,
63
};
64
65
class
Value
66
{
67
public
:
68
explicit
Value
(
double
value);
69
Value
(
const
std::string& wname,
double
value);
70
Value
() =
default
;
71
72
Result
eval_cmp(TokenType op,
const
Value
& rhs)
const
;
73
void
add_well(
const
std::string& well,
double
value);
74
double
scalar()
const
;
75
76
private
:
77
double
scalar_value{};
78
double
is_scalar{
false
};
79
std::vector<std::pair<std::string, double>> well_values{};
80
81
Result
eval_cmp_wells(TokenType op,
double
rhs)
const
;
82
};
83
84
}}
// namespace Opm::Action
85
86
#endif
// ACTION_VALUE_HPP
Opm::Action::Result
Definition
ActionResult.hpp:99
Opm::Action::Value
Definition
ActionValue.hpp:66
Opm
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition
Exceptions.hpp:30
opm
input
eclipse
Schedule
Action
ActionValue.hpp
Generated by
1.9.8