opm-common
SimulationConfig.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_SIMULATION_CONFIG_HPP
21 #define OPM_SIMULATION_CONFIG_HPP
22 
23 #include <opm/input/eclipse/EclipseState/SimulationConfig/BCConfig.hpp>
24 #include <opm/input/eclipse/EclipseState/SimulationConfig/DatumDepth.hpp>
25 #include <opm/input/eclipse/EclipseState/SimulationConfig/RockConfig.hpp>
26 #include <opm/input/eclipse/EclipseState/SimulationConfig/ThresholdPressure.hpp>
28 
29 namespace Opm {
30 
31  class Deck;
32  class FieldPropsManager;
33 
34 } // namespace Opm
35 
36 namespace Opm {
37 
39  {
40  public:
41  SimulationConfig() = default;
42  SimulationConfig(bool restart,
43  const Deck& deck,
44  const FieldPropsManager& fp);
45 
46  static SimulationConfig serializationTestObject();
47 
48  const RockConfig& rock_config() const;
49  const ThresholdPressure& getThresholdPressure() const;
50  const BCConfig& bcconfig() const;
51  const DatumDepth& datumDepths() const;
52 
53  bool useThresholdPressure() const;
54  bool useCPR() const;
55  bool useNONNC() const;
56  bool hasDISGAS() const;
57  bool hasDISGASW() const;
58  bool hasVAPOIL() const;
59  bool hasVAPWAT() const;
60  bool isThermal() const;
61  bool isTemp() const;
62  EnergyModules energyModuleType() const;
63  bool useEnthalpy() const;
64  bool isDiffusive() const;
65  bool hasPRECSALT() const;
66  bool anyTUNING() const;
67 
68  bool operator==(const SimulationConfig& data) const;
69  static bool rst_cmp(const SimulationConfig& full_config,
70  const SimulationConfig& rst_config);
71 
72  template<class Serializer>
73  void serializeOp(Serializer& serializer)
74  {
75  serializer(m_ThresholdPressure);
76  serializer(m_bcconfig);
77  serializer(m_rock_config);
78  serializer(this->m_datum_depth);
79  serializer(m_useCPR);
80  serializer(m_useNONNC);
81  serializer(m_DISGAS);
82  serializer(m_DISGASW);
83  serializer(m_VAPOIL);
84  serializer(m_VAPWAT);
85  serializer(m_energy_type);
86  serializer(m_useEnthalpy);
87  serializer(m_diffuse);
88  serializer(m_PRECSALT);
89  serializer(m_anyTUNING);
90  }
91 
92  private:
93  friend class EclipseState;
94 
95  ThresholdPressure m_ThresholdPressure{};
96  BCConfig m_bcconfig{};
97  RockConfig m_rock_config{};
98  DatumDepth m_datum_depth{};
99  EnergyModules m_energy_type = EnergyModules::NoTemperature;
100  bool m_useCPR{false};
101  bool m_useNONNC{false};
102  bool m_DISGAS{false};
103  bool m_DISGASW{false};
104  bool m_VAPOIL{false};
105  bool m_VAPWAT{false};
106  bool m_useEnthalpy{false};
107  bool m_diffuse{false};
108  bool m_PRECSALT{false};
109  bool m_anyTUNING{false};
110  };
111 
112 } // namespace Opm
113 
114 #endif // OPM_SIMULATION_CONFIG_HPP
Definition: ThresholdPressure.hpp:34
Definition: FieldPropsManager.hpp:42
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition: Exceptions.hpp:30
Definition: EclipseState.hpp:66
Definition: SimulationConfig.hpp:38
Definition: RockConfig.hpp:32
Definition: Deck.hpp:46
Class for (de-)serializing.
Definition: Serializer.hpp:94
Definition: BCConfig.hpp:34