ECLRegionMapping.hpp
Go to the documentation of this file.
1/*
2 Copyright 2017 Statoil 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_ECLREGIONMAPPING_HEADER_INCLUDED
21#define OPM_ECLREGIONMAPPING_HEADER_INCLUDED
22
25
26#include <unordered_map>
27#include <vector>
28
29namespace Opm {
47 {
48 public:
74 ECLRegionMapping(const std::vector<int>& region,
75 const std::vector<int>& regSubset
76 = std::vector<int>());
77
82 const std::vector<int>& regionSubset() const;
83
86 std::vector<int> activeRegions() const;
87
91 AssembledConnections::Neighbours::const_iterator>;
92
103 IndexView getRegionIndices(const int region) const;
104
105 private:
107 int start_{1};
108
110 int next_{1};
111
113 std::vector<int> regSubset_;
114
116 std::unordered_map<int, int> activeID_;
117
119 AssembledConnections regionSubsetIndex_;
120
122 int activeID(const int regID);
123
126 int activeID(const int regID) const;
127 };
128} // Opm
129
130#endif // OPM_ECLREGIONMAPPING_HEADER_INCLUDED
Definition: ECLRegionMapping.hpp:47
std::vector< int > activeRegions() const
const std::vector< int > & regionSubset() const
IndexView getRegionIndices(const int region) const
ECLRegionMapping(const std::vector< int > &region, const std::vector< int > &regSubset=std::vector< int >())
Definition: A.hpp:4
Definition: AssembledConnectionsIteration.hpp:83