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 
28 namespace Opm {
29 
30 class ALQState {
31 public:
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 
46 private:
47  std::map<std::string, double> current_alq_;
48  std::map<std::string, double> default_alq_;
49  std::map<std::string, int> alq_increase_count_;
50  std::map<std::string, int> alq_decrease_count_;
51 };
52 
53 
54 }
55 
56 #endif
57 
58 
59 
Definition: ALQState.hpp:30
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition: BlackoilPhases.hpp:26