MULTREGTScanner.hpp
Go to the documentation of this file.
1 /*
2  Copyright 2014 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 
21 #ifndef MULTREGTSCANNER_HPP
22 #define MULTREGTSCANNER_HPP
23 
28 
29 
30 namespace Opm {
31 
32  namespace MULTREGT {
33 
34 
36  NNC = 1,
37  NONNC = 2,
38  ALL = 3,
40  };
41 
42  std::string RegionNameFromDeckValue(const std::string& stringValue);
43  NNCBehaviourEnum NNCBehaviourFromString(const std::string& stringValue);
44  }
45 
46 
47 
48 
50  public:
51  MULTREGTRecord(DeckRecordConstPtr deckRecord , const std::string& defaultRegion);
52 
59  };
60 
61  typedef std::map< std::pair<int , int> , const MULTREGTRecord * > MULTREGTSearchMap;
62  typedef std::tuple<size_t , FaceDir::DirEnum , double> MULTREGTConnection;
63 
64 
65 
67 
68  public:
69  MULTREGTScanner(std::shared_ptr<GridProperties<int> > cellRegionNumbers, const std::vector<DeckKeywordConstPtr>& keywords, const std::string& defaultRegion);
70  double getRegionMultiplier(size_t globalCellIdx1, size_t globalCellIdx2, FaceDir::DirEnum faceDir) const;
71 
72  private:
73  void addKeyword(DeckKeywordConstPtr deckKeyword , const std::string& defaultRegion);
74  void assertKeywordSupported(DeckKeywordConstPtr deckKeyword , const std::string& defaultRegion);
75  std::vector< MULTREGTRecord > m_records;
76  std::map<std::string , MULTREGTSearchMap> m_searchMap;
77  std::shared_ptr<GridProperties<int> > m_cellRegionNumbers;
78  };
79 
80 }
81 
82 #endif
int m_directions
Definition: MULTREGTScanner.hpp:56
MULTREGTScanner(std::shared_ptr< GridProperties< int > > cellRegionNumbers, const std::vector< DeckKeywordConstPtr > &keywords, const std::string &defaultRegion)
Definition: MULTREGTScanner.hpp:37
Definition: Deck.hpp:29
std::shared_ptr< const DeckKeyword > DeckKeywordConstPtr
Definition: DeckKeyword.hpp:71
Definition: MULTREGTScanner.hpp:38
Definition: GridProperties.hpp:51
DirEnum
Definition: FaceDir.hpp:30
Value< int > m_targetRegion
Definition: MULTREGTScanner.hpp:54
std::map< std::pair< int, int >, const MULTREGTRecord * > MULTREGTSearchMap
Definition: MULTREGTScanner.hpp:61
std::tuple< size_t, FaceDir::DirEnum, double > MULTREGTConnection
Definition: MULTREGTScanner.hpp:62
double getRegionMultiplier(size_t globalCellIdx1, size_t globalCellIdx2, FaceDir::DirEnum faceDir) const
NNCBehaviourEnum
Definition: MULTREGTScanner.hpp:35
Value< int > m_srcRegion
Definition: MULTREGTScanner.hpp:53
Definition: MULTREGTScanner.hpp:49
NNCBehaviourEnum NNCBehaviourFromString(const std::string &stringValue)
std::shared_ptr< const DeckRecord > DeckRecordConstPtr
Definition: DeckRecord.hpp:54
MULTREGT::NNCBehaviourEnum m_nncBehaviour
Definition: MULTREGTScanner.hpp:57
double m_transMultiplier
Definition: MULTREGTScanner.hpp:55
Value< std::string > m_region
Definition: MULTREGTScanner.hpp:58
MULTREGTRecord(DeckRecordConstPtr deckRecord, const std::string &defaultRegion)
Definition: MULTREGTScanner.hpp:66
std::string RegionNameFromDeckValue(const std::string &stringValue)
Definition: MULTREGTScanner.hpp:39
Definition: NNC.hpp:29