My Project
Loading...
Searching...
No Matches
WListManager.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 WLISTMANAGER_HPP
20#define WLISTMANAGER_HPP
21
22#include <cstddef>
23#include <map>
24#include <vector>
25#include <string>
26#include <opm/input/eclipse/Schedule/Well/WList.hpp>
27
28namespace Opm {
29
30namespace RestartIO {
31struct RstState;
32}
33
35public:
36 WListManager() = default;
37 explicit WListManager(const RestartIO::RstState& rst_state);
38 static WListManager serializationTestObject();
39
40 std::size_t WListSize() const;
41 bool hasList(const std::string&) const;
42 WList& getList(const std::string& name);
43 const WList& getList(const std::string& name) const;
44 WList& newList(const std::string& name, const std::vector<std::string>& wname);
45
46 const std::vector<std::string>& getWListNames(const std::string& wname) const;
47 std::size_t getNoWListsWell(std::string wname) const;
48 bool hasWList(const std::string& wname) const;
49 void addWListWell(const std::string& wname, const std::string& wlname);
50 void delWell(const std::string& wname);
51 void delWListWell(const std::string& wname, const std::string& wlname);
52
53 bool operator==(const WListManager& data) const;
54 std::vector<std::string> wells(const std::string& wlist_pattern) const;
55 template<class Serializer>
56 void serializeOp(Serializer& serializer)
57 {
58 serializer(wlists);
59 serializer(well_wlist_names);
60 serializer(no_wlists_well);
61 }
62
63private:
64 std::map<std::string, WList> wlists;
65 std::map<std::string, std::vector<std::string>> well_wlist_names;
66 std::map<std::string, std::size_t> no_wlists_well;
67};
68
69}
70#endif
Class for (de-)serializing.
Definition Serializer.hpp:84
Definition WListManager.hpp:34
Definition WList.hpp:29
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30
Definition state.hpp:54