My Project
PAvg.hpp
1 /*
2  Copyright 2020 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 
20 
21 #ifndef PAVE_HPP
22 #define PAVE_HPP
23 
24 
25 namespace Opm {
26 class DeckRecord;
27 
28 class PAvg {
29 public:
30  enum class DepthCorrection {
31  WELL = 1,
32  RES = 2,
33  NONE = 3
34  };
35 
36  PAvg();
37  explicit PAvg(const DeckRecord& record);
38  PAvg(double inner_weight, double conn_weight, DepthCorrection depth_correction, bool use_open_connections);
39 
40  double inner_weight() const;
41  double conn_weight() const;
42  bool use_porv() const;
43  bool open_connections() const;
44  DepthCorrection depth_correction() const;
45 
46 
47  template<class Serializer>
48  void serializeOp(Serializer& serializer) {
49  serializer(m_inner_weight);
50  serializer(m_conn_weight);
51  serializer(m_depth_correction);
52  serializer(m_open_connections);
53  }
54 
55  static PAvg serializeObject();
56 
57  bool operator==(const PAvg& other) const;
58  bool operator!=(const PAvg& other) const;
59 
60 private:
61  double m_inner_weight;
62  double m_conn_weight;
63  DepthCorrection m_depth_correction;
64  bool m_open_connections;
65 };
66 
67 }
68 #endif
Definition: DeckRecord.hpp:32
Definition: PAvg.hpp:28
Definition: Serializer.hpp:38
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:29