My Project
Loading...
Searching...
No Matches
netbalan.hpp
1/*
2 Copyright 2022 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 it under the
7 terms of the GNU General Public License as published by the Free Software
8 Foundation, either version 3 of the License, or (at your option) any later
9 version.
10
11 OPM is distributed in the hope that it will be useful, but WITHOUT ANY
12 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
13 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
14 details.
15
16 You should have received a copy of the GNU General Public License along
17 with OPM. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#ifndef RST_NETBALAN_HPP
21#define RST_NETBALAN_HPP
22
23#include <cstddef>
24#include <memory>
25#include <optional>
26#include <vector>
27
28namespace Opm {
29 class UnitSystem;
30} // namespace Opm
31
32namespace Opm { namespace RestartIO {
33
35 {
36 public:
37 explicit RstNetbalan(const std::vector<int>& intehead,
38 const std::vector<double>& doubhead,
39 const UnitSystem& usys);
40
41 double interval() const
42 {
43 return this->calc_interval_;
44 }
45
46 double pressureTolerance() const
47 {
48 return this->ptol_;
49 }
50
51 std::size_t pressureMaxIter() const
52 {
53 return this->pressure_max_iter_;
54 }
55
56 double thpTolerance() const
57 {
58 return this->thp_tolerance_;
59 }
60
61 std::size_t thpMaxIter() const
62 {
63 return this->thp_max_iter_;
64 }
65
66 const std::optional<double>& targetBalanceError() const
67 {
68 return this->target_branch_balance_error_;
69 }
70
71 const std::optional<double>& maxBalanceError() const
72 {
73 return this->max_branch_balance_error_;
74 }
75
76 const std::optional<double>& minTstep() const
77 {
78 return this->min_tstep_;
79 }
80
81 private:
82 double calc_interval_;
83 double ptol_;
84 std::size_t pressure_max_iter_;
85
86 double thp_tolerance_;
87 std::size_t thp_max_iter_;
88
89 std::optional<double> target_branch_balance_error_{};
90 std::optional<double> max_branch_balance_error_{};
91 std::optional<double> min_tstep_{};
92 };
93
94}} // namespace Opm::RestartIO
95
96#endif // RST_NETBALAN_HPP
Definition netbalan.hpp:35
Definition UnitSystem.hpp:34
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30