My Project
Loading...
Searching...
No Matches
WellMatcher.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#ifndef WELL_MATCHER_HPP
20#define WELL_MATCHER_HPP
21
22#include <opm/input/eclipse/Schedule/Well/NameOrder.hpp>
23#include <opm/input/eclipse/Schedule/Well/WListManager.hpp>
24
25#include <functional>
26#include <initializer_list>
27#include <memory>
28#include <optional>
29#include <string>
30#include <unordered_map>
31#include <vector>
32
33namespace Opm {
34
35class WellMatcher
36{
37public:
39 WellMatcher() = default;
40
47 explicit WellMatcher(NameOrder&& well_order);
48
58 explicit WellMatcher(const NameOrder* well_order);
59
63 explicit WellMatcher(std::initializer_list<std::string> wells);
64
68 explicit WellMatcher(const std::vector<std::string>& wells);
69
82 WellMatcher(const NameOrder* well_order, const WListManager& wlm);
83
87 WellMatcher(const WellMatcher& rhs);
88
92 WellMatcher(WellMatcher&& rhs);
93
95 ~WellMatcher();
96
102 WellMatcher& operator=(const WellMatcher& rhs);
103
109 WellMatcher& operator=(WellMatcher&& rhs);
110
118 std::vector<std::string> sort(std::vector<std::string> wells) const;
119
127 std::vector<std::string> wells(const std::string& pattern) const;
128
130 const std::vector<std::string>& wells() const;
131
132private:
133 // Note to maintainers: If you make any changes here, please carefully
134 // update the constructors and assignment operators accordingly.
135
143 std::unique_ptr<NameOrder> m_wo{};
144
151 const NameOrder* m_well_order{nullptr};
152
159 std::optional<std::reference_wrapper<const WListManager>> m_wlm{};
160};
161
162} // namespace Opm
163
164#endif // WELL_MATCHER_HPP
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30