20#ifndef OPM_INJECTED_PHASE_HPP_INCLUDED
21#define OPM_INJECTED_PHASE_HPP_INCLUDED
23#include <opm/input/eclipse/Schedule/ScheduleTypes.hpp>
24#include <opm/material/fluidsystems/PhaseUsageInfo.hpp>
33template <
class IndexTraits>
37 case InjectorType::WATER:
return IndexTraits::waterPhaseIdx;
38 case InjectorType::OIL:
return IndexTraits::oilPhaseIdx;
39 case InjectorType::GAS:
return IndexTraits::gasPhaseIdx;
40 case InjectorType::MULTI:
return std::nullopt;
49template <
class IndexTraits>
51 const InjectorType type)
53 const auto canonical = injectedCanonicalPhaseIdx<IndexTraits>(type);
54 if (!canonical.has_value() || !pu.phaseIsActive(*canonical)) {
57 return pu.canonicalToActivePhaseIdx(*canonical);
Definition: GasLiftGroupInfo.hpp:40
Definition: blackoilbioeffectsmodules.hh:45
std::optional< unsigned > injectedCanonicalPhaseIdx(const InjectorType type)
Definition: InjectedPhase.hpp:34
std::optional< int > injectedActivePhaseIdx(const PhaseUsageInfo< IndexTraits > &pu, const InjectorType type)
Definition: InjectedPhase.hpp:50