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/core/grid.h>
27 #include <vector>
28 
29 namespace Opm
30 {
31 
34  {
35  public:
37 
38  virtual void init(const UnstructuredGrid& grid, int num_phases);
39 
40  virtual void init(int number_of_cells, int number_of_faces, int num_phases);
41 
46  void setFirstSat(const std::vector<int>& cells,
48  ExtremalSat es);
49 
50  virtual bool equals(const SimulatorState& other,
51  double epsilon = 1e-8) const;
52 
53  std::vector<double>& surfacevol () { return cellData()[ surfaceVolId_ ]; }
54  std::vector<double>& gasoilratio () { return cellData()[ gorId_ ] ; }
55  std::vector<double>& rv () {return cellData()[ rvId_ ] ; }
56 
57  const std::vector<double>& surfacevol () const { return cellData()[ surfaceVolId_ ]; }
58  const std::vector<double>& gasoilratio () const { return cellData()[ gorId_ ] ; }
59  const std::vector<double>& rv () const { return cellData()[ rvId_ ] ; }
60 
61  private:
62  int gorId_ ; // no entries = no cells (gas oil ratio id)
63  int rvId_ ; // no entries = no cells ( rv id )
64  int surfaceVolId_ ; // no entries = no cells * no phases (surfaceVol id )
65 
66  //std::vector<double> surfvol_; // no entries = no cells * no phases
67  //std::vector<double> gor_ ; // no entries = no cells
68  //std::vector<double> rv_ ; // no entries = no cells
69  };
70 } // namespace Opm
71 
72 
73 #endif // OPM_BLACKOILSTATE_HEADER_INCLUDED
const std::vector< double > & rv() const
Definition: BlackoilState.hpp:59
Definition: grid.h:98
Definition: AnisotropicEikonal.hpp:43
std::vector< double > & rv()
Definition: BlackoilState.hpp:55
const std::vector< double > & surfacevol() const
Definition: BlackoilState.hpp:57
Definition: SimulatorState.hpp:16
void setFirstSat(const std::vector< int > &cells, const Opm::BlackoilPropertiesInterface &props, ExtremalSat es)
Definition: BlackoilPropertiesInterface.hpp:37
const std::vector< double > & gasoilratio() const
Definition: BlackoilState.hpp:58
Simulator state for a blackoil simulator.
Definition: BlackoilState.hpp:33
std::vector< double > & surfacevol()
Definition: BlackoilState.hpp:53
std::vector< std::vector< double > > & cellData()
Definition: SimulatorState.hpp:75
virtual bool equals(const SimulatorState &other, double epsilon=1e-8) const
const UnstructuredGrid & grid
Definition: ColumnExtract.hpp:31
std::vector< double > & gasoilratio()
Definition: BlackoilState.hpp:54
virtual void init(const UnstructuredGrid &grid, int num_phases)
ExtremalSat
Definition: SimulatorState.hpp:24