My Project
Tables.hpp
1 /*
2  Copyright 2019 Equinor.
3  Copyright 2017 Statoil ASA.
4  Copyright 2016 Statoil ASA.
5 
6  This file is part of the Open Porous Media project (OPM).
7 
8  OPM is free software: you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation, either version 3 of the License, or
11  (at your option) any later version.
12 
13  OPM is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with OPM. If not, see <http://www.gnu.org/licenses/>.
20  */
21 
22 #ifndef OUTPUT_TABLES_HPP
23 #define OUTPUT_TABLES_HPP
24 
25 #include <vector>
26 
27 #include <opm/input/eclipse/EclipseState/Tables/FlatTable.hpp>
28 
29 namespace Opm {
30  class UnitSystem;
31  class EclipseState;
32 
33  class Tables {
34  public:
35  explicit Tables( const UnitSystem& units);
36 
37  void addDensity(const DensityTable& density);
38 
46  void addPVTTables(const EclipseState& es);
47 
53  void addSatFunc(const EclipseState& es);
54 
56  const std::vector<int>& tabdims() const;
57 
59  const std::vector<double>& tab() const;
60 
61  private:
63  const UnitSystem& units;
64 
66  std::vector<int> m_tabdims;
67 
69  std::vector<double> data;
70 
71  void addData(const std::size_t offset_index,
72  const std::vector<double>& new_data);
73 
86  void addSatFunc_FamilyOne(const EclipseState& es,
87  const bool gas,
88  const bool oil,
89  const bool wat);
90 
103  void addSatFunc_FamilyTwo(const EclipseState& es,
104  const bool gas,
105  const bool oil,
106  const bool wat);
107 
114  void addGasPVTTables(const EclipseState& es);
115 
122  void addOilPVTTables(const EclipseState& es);
123 
130  void addWaterPVTTables(const EclipseState& es);
131  };
132 }
133 
134 #endif // OUTPUT_TABLES_HPP
Definition: EclipseState.hpp:55
Definition: Tables.hpp:33
const std::vector< double > & tab() const
Acquire read-only reference to internal TAB vector.
void addSatFunc(const EclipseState &es)
Add normalised saturation function tables to INIT file's TAB vector.
void addPVTTables(const EclipseState &es)
Add normalised PVT function tables to INIT file's TAB vector.
const std::vector< int > & tabdims() const
Acquire read-only reference to internal TABDIMS vector.
Definition: UnitSystem.hpp:33
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:29
Definition: FlatTable.hpp:130