EndscaleWrapper.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2014 by Andreas Lauser
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 #ifndef OPM_PARSER_ENDSCALE_WRAPPER_HPP
20 #define OPM_PARSER_ENDSCALE_WRAPPER_HPP
21 
23 
24 #include <vector>
25 #include <algorithm>
26 
27 namespace Opm {
29  public:
35  : m_keyword(keyword)
36  {
37  }
38 
46  std::string directionSwitch() const
47  { return m_keyword->getRecord(0)->getItem(0)->getString(0); }
48 
52  bool isReversible() const
53  { return m_keyword->getRecord(0)->getItem(1)->getString(0) == "REVERS"; }
54 
58  int numEndscaleTables() const
59  { return m_keyword->getRecord(0)->getItem(2)->getInt(0); }
60 
64  int numMaxNodes() const
65  { return m_keyword->getRecord(0)->getItem(3)->getInt(0); }
66 
70  int combiningOptions() const
71  { return m_keyword->getRecord(0)->getItem(4)->getInt(0); }
72 
73  private:
74  Opm::DeckKeywordConstPtr m_keyword;
75  };
76 }
77 
78 #endif // OPM_PARSER_ENDSCALE_WRAPPER_HPP
79 
Definition: Deck.hpp:29
EndscaleWrapper(Opm::DeckKeywordConstPtr keyword)
A wrapper class to provide convenient access to the data of the 'ENDSCALE' keyword.
Definition: EndscaleWrapper.hpp:34
std::shared_ptr< const DeckKeyword > DeckKeywordConstPtr
Definition: DeckKeyword.hpp:71
Definition: EndscaleWrapper.hpp:28
int numMaxNodes() const
Return the maximum number of nodes in endpoint tables.
Definition: EndscaleWrapper.hpp:64
int combiningOptions() const
Return the options for combining temperature endpoint data.
Definition: EndscaleWrapper.hpp:70
std::string directionSwitch() const
Return the directional switch for endpoint scaling.
Definition: EndscaleWrapper.hpp:46
bool isReversible() const
Return whether the enpoint scaling should be reversible or not.
Definition: EndscaleWrapper.hpp:52
int numEndscaleTables() const
Return the number of endpoint (depending on depth) tables.
Definition: EndscaleWrapper.hpp:58