opm-common
BrineDensityTable.hpp
1 /*
2  Copyright (C) 2015 Statoil ASA.
3  2015 IRIS AS
4 
5  This file is part of the Open Porous Media project (OPM).
6 
7  OPM is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11 
12  OPM is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with OPM. If not, see <http://www.gnu.org/licenses/>.
19  */
20 #ifndef OPM_PARSER_BRINEDENSITY_TABLE_HPP
21 #define OPM_PARSER_BRINEDENSITY_TABLE_HPP
22 
23 #include <cstddef>
24 #include <vector>
25 
26 namespace Opm {
27 
28  class DeckRecord;
29 
30 } // namespace Opm
31 
32 namespace Opm {
33 
35  public:
36  static BrineDensityTable serializationTestObject();
37 
38  void init(const Opm::DeckRecord& record);
39  const std::vector<double>& getBrineDensityColumn() const;
40 
41  bool operator==(const BrineDensityTable& data) const;
42 
43  std::vector<double>::const_iterator begin() const {
44  return m_tableValues.begin();
45  }
46 
47  std::vector<double>::const_iterator end() const {
48  return m_tableValues.end();
49  }
50 
51  std::size_t size() const {
52  return this->m_tableValues.size();
53  }
54 
55  template<class Serializer>
56  void serializeOp(Serializer& serializer)
57  {
58  serializer(m_tableValues);
59  }
60 
61  private:
62  std::vector<double> m_tableValues;
63  };
64 }
65 
66 #endif
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30
Definition: BrineDensityTable.hpp:34
Definition: DeckRecord.hpp:33
Class for (de-)serializing.
Definition: Serializer.hpp:95