My Project
RegionCache.hpp
1 /*
2  Copyright 2016 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_REGION_CACHE_HPP
21 #define OPM_REGION_CACHE_HPP
22 
23 #include <map>
24 #include <set>
25 #include <vector>
26 
27 namespace Opm {
28  class Schedule;
29  class EclipseGrid;
30  class FieldPropsManager;
31 
32 namespace out {
33  class RegionCache {
34  public:
35  RegionCache() = default;
36  RegionCache(const std::set<std::string>& fip_regions, const FieldPropsManager& fp, const EclipseGrid& grid, const Schedule& schedule);
37  const std::vector<std::pair<std::string,size_t>>& connections( const std::string& region_name, int region_id ) const;
38 
39  // A well is assigned to the region_id where the first connection is
40  std::vector<std::string> wells(const std::string& region_name, int region_id) const;
41  private:
42  std::vector<std::pair<std::string,size_t>> connections_empty;
43  std::map<std::pair<std::string, int> , std::vector<std::pair<std::string,size_t>>> connection_map;
44  std::map<std::pair<std::string, int>, std::vector<std::string>> well_map;
45  };
46 }
47 }
48 
49 #endif
About cell information and dimension: The actual grid information is held in a pointer to an ERT ecl_...
Definition: EclipseGrid.hpp:54
Definition: FieldPropsManager.hpp:38
Definition: Schedule.hpp:145
Definition: RegionCache.hpp:33
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:29