Tabdims.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2015 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 TABDIMS_HPP
21 #define TABDIMS_HPP
22 
23 /*
24  The Tabdims class is a small utility class designed to hold on to
25  the values from the TABDIMS keyword.
26 */
27 
28 #include <opm/parser/eclipse/Parser/ParserKeywords.hpp>
29 
30 namespace Opm {
31  class Tabdims {
32  public:
33 
34  /*
35  The TABDIMS keyword has a total of 25 items; most of them
36  are ECLIPSE300 only and quite exotic. Here we only
37  internalize the most common items.
38  */
39  Tabdims() :
40  m_ntsfun( ParserKeywords::TABDIMS::NTSFUN::defaultValue ),
41  m_ntpvt( ParserKeywords::TABDIMS::NTPVT::defaultValue ),
42  m_nssfun( ParserKeywords::TABDIMS::NSSFUN::defaultValue ),
43  m_nppvt( ParserKeywords::TABDIMS::NPPVT::defaultValue ),
44  m_ntfip( ParserKeywords::TABDIMS::NTFIP::defaultValue ),
45  m_nrpvt( ParserKeywords::TABDIMS::NRPVT::defaultValue )
46  { }
47 
48 
49  Tabdims(size_t ntsfun, size_t ntpvt, size_t nssfun , size_t nppvt, size_t ntfip , size_t nrpvt) :
50  m_ntsfun( ntsfun ),
51  m_ntpvt( ntpvt ),
52  m_nssfun( nssfun ),
53  m_nppvt( nppvt ),
54  m_ntfip( ntfip ),
55  m_nrpvt( nrpvt ) {}
56 
57 
58  size_t getNumSatTables() const {
59  return m_ntsfun;
60  }
61 
62  size_t getNumPVTTables() const {
63  return m_ntpvt;
64  }
65 
66  size_t getNumSatNodes() const {
67  return m_nssfun;
68  }
69 
70  size_t getNumPressureNodes() const {
71  return m_nppvt;
72  }
73 
74  size_t getNumFIPRegions() const {
75  return m_ntfip;
76  }
77 
78  size_t getNumRSNodes() const {
79  return m_nrpvt;
80  }
81 
82  private:
83  size_t m_ntsfun,m_ntpvt,m_nssfun,m_nppvt,m_ntfip,m_nrpvt;
84  };
85 }
86 
87 
88 #endif
Definition: Deck.hpp:29
Tabdims()
Definition: Tabdims.hpp:39
size_t getNumSatNodes() const
Definition: Tabdims.hpp:66
Definition: Tabdims.hpp:31
Tabdims(size_t ntsfun, size_t ntpvt, size_t nssfun, size_t nppvt, size_t ntfip, size_t nrpvt)
Definition: Tabdims.hpp:49
size_t getNumRSNodes() const
Definition: Tabdims.hpp:78
size_t getNumPVTTables() const
Definition: Tabdims.hpp:62
size_t getNumSatTables() const
Definition: Tabdims.hpp:58
size_t getNumPressureNodes() const
Definition: Tabdims.hpp:70
size_t getNumFIPRegions() const
Definition: Tabdims.hpp:74