PolymerBlackoilState.hpp
Go to the documentation of this file.
1/*
2 Copyright 2012 SINTEF ICT, Applied Mathematics.
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_POLYMERBLACKOILSTATE_HEADER_INCLUDED
21#define OPM_POLYMERBLACKOILSTATE_HEADER_INCLUDED
22
23
24#include <opm/core/simulator/BlackoilState.hpp>
25#include <opm/core/grid.h>
26#include <vector>
27
28namespace Opm
29{
30
33 class PolymerBlackoilState : public BlackoilState
34 {
35 public:
36 void init(const UnstructuredGrid& g, int num_phases)
37 {
38 this->init(g.number_of_cells, g.number_of_faces, num_phases);
39 }
40
41 void init(int number_of_cells, int number_of_faces, int num_phases)
42 {
43 BlackoilState::init(number_of_cells, number_of_faces, num_phases);
44 concentration_.resize(number_of_cells, 0.0);
45 cmax_.resize(number_of_cells, 0.0);
46 }
47
48 std::vector<double>& concentration() { return concentration_; }
49 std::vector<double>& maxconcentration() { return cmax_; }
50
51 const std::vector<double>& concentration() const { return concentration_; }
52 const std::vector<double>& maxconcentration() const { return cmax_; }
53
54 private:
55 std::vector<double> concentration_;
56 std::vector<double> cmax_;
57 };
58
59} // namespace Opm
60
61
62
63
64#endif // OPM_POLYMERBLACKOILSTATE_HEADER_INCLUDED
Definition: PolymerBlackoilState.hpp:34
std::vector< double > & maxconcentration()
Definition: PolymerBlackoilState.hpp:49
void init(int number_of_cells, int number_of_faces, int num_phases)
Definition: PolymerBlackoilState.hpp:41
std::vector< double > & concentration()
Definition: PolymerBlackoilState.hpp:48
void init(const UnstructuredGrid &g, int num_phases)
Definition: PolymerBlackoilState.hpp:36
const std::vector< double > & maxconcentration() const
Definition: PolymerBlackoilState.hpp:52
const std::vector< double > & concentration() const
Definition: PolymerBlackoilState.hpp:51
Definition: CompressibleTpfaPolymer.hpp:33