My Project
Loading...
Searching...
No Matches
SimpleRPTIntegerControlHandler.hpp
1/*
2 Copyright 2025 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 OPM_SIMPLE_RPT_INTEGER_CONTROL_HANDLER_HPP_INCLUDED
21#define OPM_SIMPLE_RPT_INTEGER_CONTROL_HANDLER_HPP_INCLUDED
22
23#include <opm/input/eclipse/Schedule/RPTKeywordNormalisation.hpp>
24
25#include <initializer_list>
26#include <string>
27#include <vector>
28
29namespace Opm {
30
34{
35public:
42 explicit SimpleRPTIntegerControlHandler(std::initializer_list<const char*> keywords)
43 : keywords_ { keywords.begin(), keywords.end() }
44 {}
45
55 operator()(const std::vector<int>& controlValues) const;
56
57private:
59 std::vector<std::string> keywords_{};
60};
61
62} // namespace Opm
63
64#endif // OPM_OPM_SIMPLE_RPT_INTEGER_CONTROL_HANDLER_HPP_INCLUDED
std::vector< std::pair< std::string, int > > MnemonicMap
Mnemonic sequence. Preserves input ordering.
Definition RPTKeywordNormalisation.hpp:45
Report keyword integer control handler from sequence of mnemonic strings.
Definition SimpleRPTIntegerControlHandler.hpp:34
SimpleRPTIntegerControlHandler(std::initializer_list< const char * > keywords)
Constructor.
Definition SimpleRPTIntegerControlHandler.hpp:42
RPTKeywordNormalisation::MnemonicMap operator()(const std::vector< int > &controlValues) const
Function call operator.
Definition SimpleRPTIntegerControlHandler.cpp:30
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30