All Classes Namespaces Files Functions Variables Typedefs Enumerator Pages
DefaultBlackoilSolutionState.hpp
1 /*
2  Copyright 2013, 2015 SINTEF ICT, Applied Mathematics.
3  Copyright 2014, 2015 Statoil ASA.
4  Copyright 2014, 2015 Dr. Markus Blatt - HPC-Simulation-Software & Services
5  Copyright 2015 NTNU
6 
7  This file is part of the Open Porous Media project (OPM).
8 
9  OPM is free software: you can redistribute it and/or modify
10  it under the terms of the GNU General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  (at your option) any later version.
13 
14  OPM is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with OPM. If not, see <http://www.gnu.org/licenses/>.
21 */
22 #ifndef OPM_DEFAULTBLACKOILSOLUTIONSTATE_HEADER_INCLUDED
23 #define OPM_DEFAULTBLACKOILSOLUTIONSTATE_HEADER_INCLUDED
24 
25 #include <opm/autodiff/AutoDiffBlock.hpp>
26 
27 namespace Opm {
30  {
31  typedef AutoDiffBlock<double> ADB;
32  explicit DefaultBlackoilSolutionState(const int np)
33  : pressure ( ADB::null())
34  , temperature( ADB::null())
35  , saturation(np, ADB::null())
36  , rs ( ADB::null())
37  , rv ( ADB::null())
38  , qs ( ADB::null())
39  , bhp ( ADB::null())
40  , wellVariables ( ADB::null())
41  , canonical_phase_pressures(3, ADB::null())
42  {
43  }
44  ADB pressure;
45  ADB temperature;
46  std::vector<ADB> saturation;
47  ADB rs;
48  ADB rv;
49  ADB qs;
50  ADB bhp;
51  ADB wellVariables;
52  // Below are quantities stored in the state for optimization purposes.
53  std::vector<ADB> canonical_phase_pressures; // Always has 3 elements, even if only 2 phases active.
54  };
55 } // namespace Opm
56 
57 #endif // OPM_DEFAULTBLACKOILSOLUTIONSTATE_HEADER_INCLUDED
static AutoDiffBlock null()
Construct an empty AutoDiffBlock.
Definition: AutoDiffBlock.hpp:104
Struct for containing iteration variables.
Definition: DefaultBlackoilSolutionState.hpp:29