My Project
Loading...
Searching...
No Matches
TLMixpar.hpp
1/*
2 Copyright (C) 2020 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 TLMIXPAR_HPP
21#define TLMIXPAR_HPP
22
23#include <cstddef>
24#include <vector>
25
26namespace Opm {
27class Deck;
28
30 double viscosity_parameter;
31 double density_parameter;
32
33 TLMixRecord() = default;
34 TLMixRecord(double v, double d) :
35 viscosity_parameter(v),
36 density_parameter(d)
37 {};
38
39
40 bool operator==(const TLMixRecord& other) const {
41 return this->viscosity_parameter == other.viscosity_parameter &&
42 this->density_parameter == other.density_parameter;
43 }
44
45 template<class Serializer>
46 void serializeOp(Serializer& serializer)
47 {
48 serializer(viscosity_parameter);
49 serializer(density_parameter);
50 }
51
52};
53
54
55class TLMixpar {
56public:
57
58 TLMixpar() = default;
59 explicit TLMixpar(const Deck& deck);
60 static TLMixpar serializationTestObject();
61 std::size_t size() const;
62 bool empty() const;
63 const TLMixRecord& operator[](const std::size_t index) const;
64
65 bool operator==(const TLMixpar& other) const {
66 return this->data == other.data;
67 }
68
69 template<class Serializer>
70 void serializeOp(Serializer& serializer)
71 {
72 serializer(data);
73 }
74
75private:
76 std::vector<TLMixRecord> data;
77};
78}
79
80
81#endif
Definition Deck.hpp:49
Class for (de-)serializing.
Definition Serializer.hpp:84
Definition TLMixpar.hpp:55
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30
Definition TLMixpar.hpp:29