My Project
UDQFunctionTable.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 UDQFUNCTIONTABLE_HPP
21 #define UDQFUNCTIONTABLE_HPP
22 
23 #include <unordered_map>
24 #include <memory>
25 
26 #include <opm/input/eclipse/Schedule/UDQ/UDQFunction.hpp>
27 #include <opm/input/eclipse/Schedule/UDQ/UDQParams.hpp>
28 
29 namespace Opm {
30 
32 public:
33  using FunctionMap = std::unordered_map<std::string,
34  std::shared_ptr<UDQFunction>>;
35  explicit UDQFunctionTable(const UDQParams& params);
37  UDQFunctionTable(const UDQParams& param,
38  const FunctionMap& map);
39  bool has_function(const std::string& name) const;
40  const UDQFunction& get(const std::string& name) const;
41 
42  const UDQParams& getParams() const;
43  const FunctionMap& functionMap() const;
44 
45  bool operator==(const UDQFunctionTable& data) const;
46 
47 private:
48  void insert_function(std::shared_ptr<UDQFunction> func);
49  UDQParams params;
50  FunctionMap function_table;
51 };
52 }
53 #endif
Definition: UDQFunctionTable.hpp:31
Definition: UDQFunction.hpp:34
Definition: UDQParams.hpp:31
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:29