My Project
ALQState.hpp
1/*
2 Copyright 2021 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 OPM_ALQ_STATE_HEADER_INCLUDED
21#define OPM_ALQ_STATE_HEADER_INCLUDED
22
23#include <map>
24#include <string>
25#include <vector>
26
27
28namespace Opm {
29
30class ALQState {
31public:
32
33 std::size_t pack_size() const;
34 std::size_t unpack_data(const double * data);
35 std::size_t pack_data(double * data) const;
36
37 double get(const std::string& wname) const;
38 void update_default(const std::string& wname, double value);
39 void set(const std::string& wname, double value);
40 bool oscillation(const std::string& wname) const;
41 void update_count(const std::string& wname, bool increase);
42 void reset_count();
43 int get_increment_count(const std::string& wname) const;
44 int get_decrement_count(const std::string& wname) const;
45 void set_debug_counter(int value);
46 int get_debug_counter();
47 int update_debug_counter();
48
49private:
50 std::map<std::string, double> current_alq_;
51 std::map<std::string, double> default_alq_;
52 std::map<std::string, int> alq_increase_count_;
53 std::map<std::string, int> alq_decrease_count_;
54 int debug_counter_ = 0;
55};
56
57
58}
59
60#endif
61
62
63
Definition: ALQState.hpp:30
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: BlackoilPhases.hpp:27