21#ifndef OPM_PHASEUSAGEFROMDECK_HEADER_INCLUDED
22#define OPM_PHASEUSAGEFROMDECK_HEADER_INCLUDED
25#include <opm/common/ErrorMacros.hpp>
27#include <opm/parser/eclipse/Deck/Deck.hpp>
28#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
29#include <opm/parser/eclipse/EclipseState/Runspec.hpp>
42 const auto& phase = eclipseState.runspec().phases();
49 int numActivePhases = 0;
63 OPM_THROW(std::runtime_error,
"Cannot handle cases with " << pu.
num_phases <<
" phases.");
69 OPM_THROW(std::runtime_error,
"Cannot handle cases with no OIL, i.e. water-gas systems.");
124 Runspec runspec( deck );
125 const auto& phase = runspec.phases();
133 int numActivePhases = 0;
139 pu.
phase_pos[phaseIdx] = numActivePhases;
147 OPM_THROW(std::runtime_error,
"Cannot handle cases with " << pu.
num_phases <<
" phases.");
153 OPM_THROW(std::runtime_error,
"Cannot handle cases with no OIL, i.e. water-gas systems.");
static const int MaxNumPhases
Definition: BlackoilPhases.hpp:30
static const int NumCryptoPhases
Definition: BlackoilPhases.hpp:37
@ Liquid
Definition: BlackoilPhases.hpp:40
@ Aqua
Definition: BlackoilPhases.hpp:40
@ Vapour
Definition: BlackoilPhases.hpp:40
@ Energy
Definition: BlackoilPhases.hpp:40
@ Solvent
Definition: BlackoilPhases.hpp:40
@ Polymer
Definition: BlackoilPhases.hpp:40
@ OIL
Definition: legacy_well.h:47
@ GAS
Definition: legacy_well.h:47
@ WATER
Definition: legacy_well.h:47
Definition: AnisotropicEikonal.hpp:44
PhaseUsage phaseUsageFromDeck(const Opm::EclipseState &eclipseState)
Definition: phaseUsageFromDeck.hpp:37
Definition: BlackoilPhases.hpp:44
bool has_polymer
Definition: BlackoilPhases.hpp:49
bool has_energy
Definition: BlackoilPhases.hpp:50
int phase_pos[MaxNumPhases+NumCryptoPhases]
Definition: BlackoilPhases.hpp:47
int phase_used[MaxNumPhases+NumCryptoPhases]
Definition: BlackoilPhases.hpp:46
bool has_solvent
Definition: BlackoilPhases.hpp:48
int num_phases
Definition: BlackoilPhases.hpp:45