My Project
Loading...
Searching...
No Matches
Aqudims.hpp
1/*
2 Copyright (C) 2017 TNO
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 AQUDIMS_HPP
21#define AQUDIMS_HPP
22
23#include <cstddef>
24
25/*
26 The Aqudims class is a small utility class designed to hold on to
27 the values from the AQUDIMS keyword.
28*/
29
30namespace Opm {
31
32 class Deck;
33
34 class Aqudims {
35 public:
36
37 Aqudims();
38
39 explicit Aqudims(const Deck& deck);
40
41 static Aqudims serializationTestObject()
42 {
43 Aqudims result;
44 result.m_mxnaqn = 1;
45 result.m_mxnaqc = 2;
46 result.m_niftbl = 3;
47 result.m_nriftb = 4;
48 result.m_nanaqu = 5;
49 result.m_ncamax = 6;
50 result.m_mxnali = 7;
51 result.m_mxaaql = 8;
52
53 return result;
54 }
55
56 size_t getNumAqunum() const
57 {
58 return m_mxnaqn;
59 }
60
61 size_t getNumConnectionNumericalAquifer() const
62 {
63 return m_mxnaqc;
64 }
65
66 size_t getNumInfluenceTablesCT() const
67 {
68 return m_niftbl;
69 }
70
71 size_t getNumRowsInfluenceTable() const
72 {
73 return m_nriftb;
74 }
75
76 size_t getNumAnalyticAquifers() const
77 {
78 return m_nanaqu;
79 }
80
81 size_t getNumRowsAquancon() const
82 {
83 return m_ncamax;
84 }
85
86 size_t getNumAquiferLists() const
87 {
88 return m_mxnali;
89 }
90
91 size_t getNumAnalyticAquifersSingleList() const
92 {
93 return m_mxaaql;
94 }
95
96 bool operator==(const Aqudims& data) const
97 {
98 return m_mxnaqn == data.m_mxnaqn &&
99 m_mxnaqc == data.m_mxnaqc &&
100 m_niftbl == data.m_niftbl &&
101 m_nriftb == data.m_nriftb &&
102 m_nanaqu == data.m_nanaqu &&
103 m_ncamax == data.m_ncamax &&
104 m_mxnali == data.m_mxnali &&
105 m_mxaaql == data.m_mxaaql;
106 }
107
108 template<class Serializer>
109 void serializeOp(Serializer& serializer)
110 {
111 serializer(m_mxnaqn);
112 serializer(m_mxnaqc);
113 serializer(m_niftbl);
114 serializer(m_nriftb);
115 serializer(m_nanaqu);
116 serializer(m_ncamax);
117 serializer(m_mxnali);
118 serializer(m_mxaaql);
119 }
120
121 private:
122 size_t m_mxnaqn , m_mxnaqc , m_niftbl , m_nriftb , m_nanaqu , m_ncamax , m_mxnali , m_mxaaql;
123
124 };
125}
126
127
128#endif
Definition Aqudims.hpp:34
Definition Deck.hpp:49
Class for (de-)serializing.
Definition Serializer.hpp:84
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30