opm-common
EclipseConfig.hpp
1 /*
2  Copyright 2016 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 OPM_ECLIPSE_CONFIG_HPP
21 #define OPM_ECLIPSE_CONFIG_HPP
22 
23 #include <opm/input/eclipse/EclipseState/InitConfig/InitConfig.hpp>
24 #include <opm/input/eclipse/EclipseState/IOConfig/FIPConfig.hpp>
25 #include <opm/input/eclipse/EclipseState/IOConfig/IOConfig.hpp>
26 
27 namespace Opm {
28 
29  class Deck;
30  class Phases;
31  class Runspec;
32 
34  {
35  public:
36  EclipseConfig() = default;
37  explicit EclipseConfig(const Deck& deck);
38  EclipseConfig(const Deck& deck, const Runspec& rspec);
39  EclipseConfig(const Deck& deck, const Phases& phases);
40  EclipseConfig(const Deck& deck, const Phases& phases, const bool compositional);
41  EclipseConfig(const InitConfig& initConfig,
42  const FIPConfig& fip_conf,
43  const IOConfig& io_conf);
44 
45  static EclipseConfig serializationTestObject();
46 
47  InitConfig& init();
48  IOConfig& io();
49  const IOConfig& io() const;
50  const InitConfig& init() const;
51  const FIPConfig& fip() const;
52 
53  bool operator==(const EclipseConfig& data) const;
54  static bool rst_cmp(const EclipseConfig& full_config, const EclipseConfig& rst_config);
55  template<class Serializer>
56  void serializeOp(Serializer& serializer)
57  {
58  serializer(m_initConfig);
59  serializer(fip_config);
60  serializer(io_config);
61  }
62 
63  private:
64  InitConfig m_initConfig;
65  FIPConfig fip_config;
66  IOConfig io_config;
67  };
68 }
69 
70 #endif // OPM_ECLIPSE_CONFIG_HPP
Settings for model initialisation.
Definition: InitConfig.hpp:39
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30
Definition: Runspec.hpp:608
Class holding FIP configuration from RPTSOL/RPTSCHED keyword.
Definition: FIPConfig.hpp:32
Definition: IOConfig.hpp:142
Definition: Deck.hpp:46
Definition: EclipseConfig.hpp:33
Class for (de-)serializing.
Definition: Serializer.hpp:95
Definition: Runspec.hpp:45