opm-common
Toggle main menu visibility
Loading...
Searching...
No Matches
Eqldims.hpp
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
#include <cstddef>
24
25
namespace
Opm
{
26
27
/*
28
The Eqldims class is a small utility class designed to hold on to
29
the values from the EQLDIMS keyword.
30
*/
31
32
class
Eqldims {
33
public
:
34
35
Eqldims();
36
37
Eqldims(
size_t
ntequl ,
size_t
depth_nodes_p ,
size_t
depth_nodes_tab ,
size_t
nttrvd ,
size_t
nstrvd) :
38
m_ntequl( ntequl ),
39
m_depth_nodes_p( depth_nodes_p ),
40
m_depth_nodes_tab( depth_nodes_tab ),
41
m_nttrvd( nttrvd ),
42
m_nstrvd( nstrvd )
43
{ }
44
45
static
Eqldims serializationTestObject()
46
{
47
return
Eqldims(1, 2, 3, 4, 5);
48
}
49
50
size_t
getNumEquilRegions()
const
51
{
52
return
m_ntequl;
53
}
54
55
size_t
getNumDepthNodesP()
const
56
{
57
return
m_depth_nodes_p;
58
}
59
60
61
size_t
getNumDepthNodesTable()
const
62
{
63
return
m_depth_nodes_tab;
64
}
65
66
size_t
getNumTracerTables()
const
67
{
68
return
m_nttrvd;
69
}
70
71
size_t
getNumDepthNodesTracer()
const
72
{
73
return
m_nstrvd;
74
}
75
76
bool
operator==(
const
Eqldims& data)
const
77
{
78
return
this->getNumEquilRegions() == data.getNumEquilRegions() &&
79
this->getNumDepthNodesP() == data.getNumDepthNodesP() &&
80
this->getNumDepthNodesTable() == data.getNumDepthNodesTable() &&
81
this->getNumTracerTables() == data.getNumTracerTables() &&
82
this->getNumDepthNodesTracer() == data.getNumDepthNodesTracer();
83
}
84
85
template
<
class
Serializer>
86
void
serializeOp(
Serializer
& serializer)
87
{
88
serializer(m_ntequl);
89
serializer(m_depth_nodes_p);
90
serializer(m_depth_nodes_tab);
91
serializer(m_nttrvd);
92
serializer(m_nstrvd);
93
}
94
95
private
:
96
size_t
m_ntequl , m_depth_nodes_p , m_depth_nodes_tab , m_nttrvd , m_nstrvd;
97
98
};
99
}
100
101
102
#endif
Opm::Serializer
Class for (de-)serializing.
Definition
Serializer.hpp:94
Opm
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition
Exceptions.hpp:30
opm
input
eclipse
EclipseState
Tables
Eqldims.hpp
Generated by
1.17.0