My Project
Loading...
Searching...
No Matches
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
28namespace Opm {
29
30 class Deck;
31
32 class InitConfig {
33
34 public:
35 InitConfig();
36 explicit InitConfig(const Deck& deck);
37
38 static InitConfig serializationTestObject();
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 hasStressEquil() const;
49 const StressEquil& getStressEquil() const;
50
51 bool hasGravity() const;
52
53 bool hasFoamConfig() const;
54 const FoamConfig& getFoamConfig() const;
55
56 bool filleps() const
57 {
58 return this->m_filleps;
59 }
60
61 bool operator==(const InitConfig& config) const;
62
63 static bool rst_cmp(const InitConfig& full_config, const InitConfig& rst_config);
64
65
66 template<class Serializer>
67 void serializeOp(Serializer& serializer)
68 {
69 serializer(equil);
70 serializer(stress_equil);
71 serializer(foamconfig);
72 serializer(m_filleps);
73 serializer(m_gravity);
74 serializer(m_restartRequested);
75 serializer(m_restartStep);
76 serializer(m_restartRootName);
77 }
78
79 private:
80 Equil equil;
81 StressEquil stress_equil;
82 FoamConfig foamconfig;
83 bool m_filleps;
84 bool m_gravity = true;
85
86 bool m_restartRequested = false;
87 int m_restartStep = 0;
88 std::string m_restartRootName;
89 };
90
91} //namespace Opm
92
93#endif
Definition Deck.hpp:49
Foam behaviour data for all SATNUM regions.
Definition FoamConfig.hpp:73
Definition InitConfig.hpp:32
Class for (de-)serializing.
Definition Serializer.hpp:84
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30