My Project
Loading...
Searching...
No Matches
GSatProd.hpp
1
/*
2
Copyright 2024 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
#ifndef GSATPROD_H
21
#define GSATPROD_H
22
23
#include <map>
24
#include <string>
25
#include <array>
26
27
namespace
Opm
{
28
29
class
SummaryState;
30
31
class
GSatProd
{
32
public
:
33
struct
GSatProdGroup
{
34
enum
Rate { Oil, Gas, Water, Resv, GLift };
35
std::array<double, 5> rate{};
36
bool
operator==(
const
GSatProdGroup
& data)
const
{
37
return
rate == data.rate;
38
}
39
40
template
<
class
Serializer>
41
void
serializeOp(
Serializer
& serializer)
42
{
43
serializer(rate);
44
}
45
};
46
47
static
GSatProd
serializationTestObject();
48
49
bool
has(
const
std::string& name)
const
;
50
const
GSatProdGroup
& get(
const
std::string& name)
const
;
51
void
assign(
const
std::string& name,
const
double
oil_rate,
52
const
double
gas_rate,
const
double
water_rate,
53
const
double
resv_rate,
const
double
glift_rate);
54
std::size_t size()
const
;
55
56
bool
operator==(
const
GSatProd
& data)
const
;
57
58
template
<
class
Serializer>
59
void
serializeOp(
Serializer
& serializer)
60
{
61
serializer(groups_);
62
}
63
64
private
:
65
std::map<std::string, GSatProdGroup> groups_;
66
};
67
68
}
69
70
#endif
Opm::GSatProd
Definition
GSatProd.hpp:31
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::GSatProd::GSatProdGroup
Definition
GSatProd.hpp:33
opm
input
eclipse
Schedule
Group
GSatProd.hpp
Generated by
1.9.8