Eqldims.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2015 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 EQLDIMS_HPP
21#define EQLDIMS_HPP
22
23/*
24 The Eqldims class is a small utility class designed to hold on to
25 the values from the EQLDIMS keyword.
26*/
27
29
30namespace Opm {
31 class Eqldims {
32 public:
33
35 m_ntequl( ParserKeywords::EQLDIMS::NTEQUL::defaultValue ),
36 m_depth_nodes_p( ParserKeywords::EQLDIMS::DEPTH_NODES_P::defaultValue ),
37 m_depth_nodes_tab( ParserKeywords::EQLDIMS::DEPTH_NODES_TAB::defaultValue ),
38 m_nttrvd( ParserKeywords::EQLDIMS::NTTRVD::defaultValue ),
39 m_nstrvd( ParserKeywords::EQLDIMS::NSTRVD::defaultValue )
40 { }
41
42
43 Eqldims( size_t ntequl , size_t depth_nodes_p , size_t depth_nodes_tab , size_t nttrvd , size_t nstrvd) :
44 m_ntequl( ntequl ),
45 m_depth_nodes_p( depth_nodes_p ),
46 m_depth_nodes_tab( depth_nodes_tab ),
47 m_nttrvd( nttrvd ),
48 m_nstrvd( nstrvd )
49 { }
50
52 {
53 return Eqldims(1, 2, 3, 4, 5);
54 }
55
56 size_t getNumEquilRegions() const
57 {
58 return m_ntequl;
59 }
60
61 size_t getNumDepthNodesP() const
62 {
63 return m_depth_nodes_p;
64 }
65
66
67 size_t getNumDepthNodesTable() const
68 {
69 return m_depth_nodes_tab;
70 }
71
72 size_t getNumTracerTables() const
73 {
74 return m_nttrvd;
75 }
76
78 {
79 return m_nstrvd;
80 }
81
82 bool operator==(const Eqldims& data) const
83 {
84 return this->getNumEquilRegions() == data.getNumEquilRegions() &&
85 this->getNumDepthNodesP() == data.getNumDepthNodesP() &&
87 this->getNumTracerTables() == data.getNumTracerTables() &&
89 }
90
91 template<class Serializer>
92 void serializeOp(Serializer& serializer)
93 {
94 serializer(m_ntequl);
95 serializer(m_depth_nodes_p);
96 serializer(m_depth_nodes_tab);
97 serializer(m_nttrvd);
98 serializer(m_nstrvd);
99 }
100
101 private:
102 size_t m_ntequl , m_depth_nodes_p , m_depth_nodes_tab , m_nttrvd , m_nstrvd;
103
104 };
105}
106
107
108#endif
Definition: Eqldims.hpp:31
static Eqldims serializeObject()
Definition: Eqldims.hpp:51
void serializeOp(Serializer &serializer)
Definition: Eqldims.hpp:92
Eqldims()
Definition: Eqldims.hpp:34
bool operator==(const Eqldims &data) const
Definition: Eqldims.hpp:82
size_t getNumDepthNodesP() const
Definition: Eqldims.hpp:61
size_t getNumEquilRegions() const
Definition: Eqldims.hpp:56
size_t getNumTracerTables() const
Definition: Eqldims.hpp:72
size_t getNumDepthNodesTracer() const
Definition: Eqldims.hpp:77
size_t getNumDepthNodesTable() const
Definition: Eqldims.hpp:67
Eqldims(size_t ntequl, size_t depth_nodes_p, size_t depth_nodes_tab, size_t nttrvd, size_t nstrvd)
Definition: Eqldims.hpp:43
Definition: Serializer.hpp:38
Definition: A.hpp:4
static std::string data()
Definition: exprtk.hpp:40022