BlackoilState.hpp
Go to the documentation of this file.
1/*
2 Copyright 2012 SINTEF ICT, Applied Mathematics.
3 Copyright 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
21#ifndef OPM_BLACKOILSTATE_HEADER_INCLUDED
22#define OPM_BLACKOILSTATE_HEADER_INCLUDED
23
24#include <opm/common/data/SimulationDataContainer.hpp>
25
26#include <opm/core/grid.h>
28#include <vector>
29
30namespace Opm
31{
32
36 OilOnly = 2
37 };
38
40 class BlackoilState : public SimulationDataContainer
41 {
42 public:
43 static const std::string GASOILRATIO;
44 static const std::string RV;
45 static const std::string SURFACEVOL;
46 static const std::string SSOL;
47 static const std::string POLYMER;
48
56 BlackoilState(size_t num_cells, size_t num_faces, size_t num_phases);
57
63
69
70 std::vector<double>& surfacevol () { return *surfacevol_ref_; }
71 std::vector<double>& gasoilratio () { return *gasoilratio_ref_; }
72 std::vector<double>& rv () { return *rv_ref_; }
73 std::vector<HydroCarbonState>& hydroCarbonState() { return hydrocarbonstate_; }
74
75 const std::vector<double>& surfacevol () const { return *surfacevol_ref_; }
76 const std::vector<double>& gasoilratio () const { return *gasoilratio_ref_; }
77 const std::vector<double>& rv () const { return *rv_ref_; }
78 const std::vector<HydroCarbonState>& hydroCarbonState() const { return hydrocarbonstate_; }
79
80 private:
81 void setBlackoilStateReferencePointers();
82 std::vector<double>* surfacevol_ref_;
83 std::vector<double>* gasoilratio_ref_;
84 std::vector<double>* rv_ref_;
85
86 // A vector storing the hydro carbon state.
87 std::vector<HydroCarbonState> hydrocarbonstate_;
88
89
90 };
91} // namespace Opm
92
93
94#endif // OPM_BLACKOILSTATE_HEADER_INCLUDED
Simulator state for a blackoil simulator.
Definition: BlackoilState.hpp:41
BlackoilState(size_t num_cells, size_t num_faces, size_t num_phases)
static const std::string POLYMER
Definition: BlackoilState.hpp:47
std::vector< HydroCarbonState > & hydroCarbonState()
Definition: BlackoilState.hpp:73
const std::vector< double > & surfacevol() const
Definition: BlackoilState.hpp:75
std::vector< double > & rv()
Definition: BlackoilState.hpp:72
std::vector< double > & gasoilratio()
Definition: BlackoilState.hpp:71
BlackoilState(const BlackoilState &other)
const std::vector< double > & rv() const
Definition: BlackoilState.hpp:77
BlackoilState & operator=(const BlackoilState &other)
static const std::string GASOILRATIO
Definition: BlackoilState.hpp:43
std::vector< double > & surfacevol()
Definition: BlackoilState.hpp:70
const std::vector< double > & gasoilratio() const
Definition: BlackoilState.hpp:76
static const std::string SURFACEVOL
Definition: BlackoilState.hpp:45
static const std::string RV
Definition: BlackoilState.hpp:44
static const std::string SSOL
Definition: BlackoilState.hpp:46
const std::vector< HydroCarbonState > & hydroCarbonState() const
Definition: BlackoilState.hpp:78
Definition: AnisotropicEikonal.hpp:44
HydroCarbonState
Definition: BlackoilState.hpp:33
@ OilOnly
Definition: BlackoilState.hpp:36
@ GasOnly
Definition: BlackoilState.hpp:34
@ GasAndOil
Definition: BlackoilState.hpp:35