My Project
InitConfig.hpp
1 /*
2  Copyright 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 OPM_INIT_CONFIG_HPP
21 #define OPM_INIT_CONFIG_HPP
22 
23 #include <string>
24 
25 #include <opm/input/eclipse/EclipseState/InitConfig/Equil.hpp>
26 #include <opm/input/eclipse/EclipseState/InitConfig/FoamConfig.hpp>
27 
28 namespace Opm {
29 
30  class Deck;
31 
32  class InitConfig {
33 
34  public:
35  InitConfig();
36  explicit InitConfig(const Deck& deck);
37 
38  static InitConfig serializeObject();
39 
40  void setRestart( const std::string& root, int step);
41  bool restartRequested() const;
42  int getRestartStep() const;
43  const std::string& getRestartRootName() const;
44 
45  bool hasEquil() const;
46  const Equil& getEquil() const;
47 
48  bool hasGravity() const;
49 
50  bool hasFoamConfig() const;
51  const FoamConfig& getFoamConfig() const;
52 
53  bool filleps() const
54  {
55  return this->m_filleps;
56  }
57 
58  bool operator==(const InitConfig& config) const;
59 
60  static bool rst_cmp(const InitConfig& full_config, const InitConfig& rst_config);
61 
62 
63  template<class Serializer>
64  void serializeOp(Serializer& serializer)
65  {
66  equil.serializeOp(serializer);
67  foamconfig.serializeOp(serializer);
68  serializer(m_filleps);
69  serializer(m_gravity);
70  serializer(m_restartRequested);
71  serializer(m_restartStep);
72  serializer(m_restartRootName);
73  }
74 
75  private:
76  Equil equil;
77  FoamConfig foamconfig;
78  bool m_filleps;
79  bool m_gravity = true;
80 
81  bool m_restartRequested = false;
82  int m_restartStep = 0;
83  std::string m_restartRootName;
84  };
85 
86 } //namespace Opm
87 
88 #endif
Definition: Deck.hpp:63
Definition: Equil.hpp:55
Foam behaviour data for all SATNUM regions.
Definition: FoamConfig.hpp:73
Definition: InitConfig.hpp:32
Definition: Serializer.hpp:38
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:29