TransMult.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 
29 #ifndef TRANSMULT_HPP
30 #define TRANSMULT_HPP
31 
32 
33 #include <cstddef>
34 #include <map>
35 #include <memory>
36 
42 
43 
44 namespace Opm {
45  class TransMult {
46 
47  public:
48  TransMult(size_t nx , size_t ny , size_t nz);
49  double getMultiplier(size_t globalIndex, FaceDir::DirEnum faceDir) const;
50  double getMultiplier(size_t i , size_t j , size_t k, FaceDir::DirEnum faceDir) const;
51  double getRegionMultiplier( size_t globalCellIndex1, size_t globalCellIndex2, FaceDir::DirEnum faceDir) const;
52  bool hasDirectionProperty(FaceDir::DirEnum faceDir) const;
53  std::shared_ptr<GridProperty<double> > getDirectionProperty(FaceDir::DirEnum faceDir);
54  void applyMULT(std::shared_ptr<const GridProperty<double> > srcMultProp, FaceDir::DirEnum faceDir);
55  void applyMULTFLT( std::shared_ptr<const FaultCollection> faults);
56  void setMultregtScanner(std::shared_ptr<const MULTREGTScanner> multregtScanner);
57 
58  private:
59  size_t getGlobalIndex(size_t i , size_t j , size_t k) const;
60  void assertIJK(size_t i , size_t j , size_t k) const;
61  double getMultiplier__(size_t globalIndex , FaceDir::DirEnum faceDir) const;
62  void insertNewProperty(FaceDir::DirEnum faceDir);
63 
64  size_t m_nx , m_ny , m_nz;
65  std::map<FaceDir::DirEnum , std::shared_ptr<GridProperty<double> > > m_trans;
66  std::map<FaceDir::DirEnum , std::string> m_names;
67  std::shared_ptr<const MULTREGTScanner> m_multregtScanner;
68  };
69 
70 }
71 
72 #endif
void setMultregtScanner(std::shared_ptr< const MULTREGTScanner > multregtScanner)
Definition: Deck.hpp:29
bool hasDirectionProperty(FaceDir::DirEnum faceDir) const
DirEnum
Definition: FaceDir.hpp:30
Definition: TransMult.hpp:45
TransMult(size_t nx, size_t ny, size_t nz)
void applyMULT(std::shared_ptr< const GridProperty< double > > srcMultProp, FaceDir::DirEnum faceDir)
void applyMULTFLT(std::shared_ptr< const FaultCollection > faults)
double getMultiplier(size_t globalIndex, FaceDir::DirEnum faceDir) const
std::shared_ptr< GridProperty< double > > getDirectionProperty(FaceDir::DirEnum faceDir)
double getRegionMultiplier(size_t globalCellIndex1, size_t globalCellIndex2, FaceDir::DirEnum faceDir) const
Definition: GridProperty.hpp:153