opm-common
Toggle main menu visibility
Loading...
Searching...
No Matches
Regdims.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
MERCHANREGILITY 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 REGDIMS_HPP
21
#define REGDIMS_HPP
22
23
#include <cstddef>
24
25
namespace
Opm
{
26
27
class
Deck
;
28
class
DeckKeyword
;
29
class
DeckRecord
;
30
31
/*
32
The Regdims class is a small utility class designed to hold on to
33
the values from the REGDIMS keyword.
34
*/
35
36
class
Regdims {
37
public
:
38
39
Regdims();
40
41
explicit
Regdims(
const
Deck
& deck);
42
43
Regdims(
size_t
ntfip ,
size_t
nmfipr ,
size_t
nrfregr ,
size_t
ntfreg ,
size_t
nplmix) :
44
m_NTFIP( ntfip ),
45
m_NMFIPR( nmfipr ),
46
m_NRFREG( nrfregr ),
47
m_NTFREG( ntfreg ),
48
m_NPLMIX( nplmix )
49
{}
50
51
static
Regdims serializationTestObject()
52
{
53
return
Regdims(1, 2, 3, 4, 5);
54
}
55
56
57
size_t
getNTFIP()
const
{
58
return
m_NTFIP;
59
}
60
61
62
size_t
getNMFIPR()
const
{
63
return
m_NMFIPR;
64
}
65
66
67
size_t
getNRFREG()
const
{
68
return
m_NRFREG;
69
}
70
71
72
size_t
getNTFREG()
const
{
73
return
m_NTFREG;
74
}
75
76
77
size_t
getNPLMIX()
const
{
78
return
m_NPLMIX;
79
}
80
81
82
bool
operator==(
const
Regdims& data)
const
{
83
return
this->getNTFIP() == data.getNTFIP() &&
84
this->getNMFIPR() == data.getNMFIPR() &&
85
this->getNRFREG() == data.getNRFREG() &&
86
this->getNTFREG() == data.getNTFREG() &&
87
this->getNPLMIX() == data.getNPLMIX();
88
}
89
90
template
<
class
Serializer>
91
void
serializeOp(
Serializer
& serializer)
92
{
93
serializer(m_NTFIP);
94
serializer(m_NMFIPR);
95
serializer(m_NRFREG);
96
serializer(m_NTFREG);
97
serializer(m_NPLMIX);
98
}
99
100
private
:
101
size_t
m_NTFIP;
102
size_t
m_NMFIPR;
103
size_t
m_NRFREG;
104
size_t
m_NTFREG;
105
size_t
m_NPLMIX;
106
};
107
}
108
109
110
#endif
Opm::DeckKeyword
Definition
DeckKeyword.hpp:36
Opm::DeckRecord
Definition
DeckRecord.hpp:32
Opm::Deck
Definition
Deck.hpp:46
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
Regdims.hpp
Generated by
1.17.0