My Project
Loading...
Searching...
No Matches
ActionContext.hpp
1
/*
2
Copyright 2018 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
21
#ifndef ActionContext_HPP
22
#define ActionContext_HPP
23
24
#include <map>
25
#include <string>
26
#include <vector>
27
28
namespace
Opm
{
29
30
class
SummaryState;
31
class
WListManager;
32
33
namespace
Action {
34
35
/*
36
The Action::Context class is used as context when the ACTIONX condition is
37
evaluated. The Action::Context class is mainly just a thin wrapper around the
38
SummaryState class.
39
*/
40
41
class
Context
{
42
public
:
43
explicit
Context
(
const
SummaryState
& summary_state,
const
WListManager
& wlm);
44
45
/*
46
The get methods will first check the internal storage in the 'values' map
47
and then subsequently query the SummaryState member.
48
*/
49
double
get(
const
std::string& func,
const
std::string& arg)
const
;
50
void
add(
const
std::string& func,
const
std::string& arg,
double
value);
51
52
double
get(
const
std::string& func)
const
;
53
void
add(
const
std::string& func,
double
value);
54
55
std::vector<std::string> wells(
const
std::string& func)
const
;
56
const
WListManager
& wlist_manager()
const
;
57
58
private
:
59
const
SummaryState
& summary_state;
60
const
WListManager
& wlm;
61
std::map<std::string, double> values;
62
};
63
}
64
}
65
#endif
Opm::Action::Context
Definition
ActionContext.hpp:41
Opm::SummaryState
Definition
SummaryState.hpp:68
Opm::WListManager
Definition
WListManager.hpp:34
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
ActionContext.hpp
Generated by
1.9.8