mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Unifies the phase indices with the ones in opm-core.
The initial definition of the phase indices seems to be in opm/core/props/BlackoilPhases.hpp. Nevertheless there were several redefinitions of the same or similar enums (either Aqua, Liquid, and Vapor, or Water, Oil, and Gas). Surprisingly most often these definitions did not use the original values. This is bound to break if there is a change upstream. This patch limits the definition to one place in opm-autodiff, namely opm/autodiff/BlackoilPropsAdInterface.hpp. To avoid downstream confusion we define both the Water and Aqua triplets. In addition we define the maximum number of phases to use at compile time.
This commit is contained in:
parent
325ad95e80
commit
cb43fc5e94
@ -84,12 +84,6 @@ namespace Opm
|
||||
/// \return Object describing the active phases.
|
||||
virtual PhaseUsage phaseUsage() const;
|
||||
|
||||
// ------ Canonical named indices for each phase ------
|
||||
|
||||
/// Canonical named indices for each phase.
|
||||
enum PhaseIndex { Water = 0, Oil = 1, Gas = 2 };
|
||||
|
||||
|
||||
// ------ Density ------
|
||||
|
||||
/// Densities of stock components at surface conditions.
|
||||
|
@ -41,9 +41,6 @@ namespace Opm
|
||||
typedef BlackoilPropsAdFromDeck::ADB ADB;
|
||||
typedef BlackoilPropsAdFromDeck::V V;
|
||||
typedef Eigen::Array<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor> Block;
|
||||
enum { Aqua = BlackoilPhases::Aqua,
|
||||
Liquid = BlackoilPhases::Liquid,
|
||||
Vapour = BlackoilPhases::Vapour };
|
||||
|
||||
/// Constructor wrapping an opm-core black oil interface.
|
||||
BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck(Opm::DeckConstPtr deck,
|
||||
|
@ -109,12 +109,6 @@ namespace Opm
|
||||
/// \return Object describing the active phases.
|
||||
PhaseUsage phaseUsage() const;
|
||||
|
||||
// ------ Canonical named indices for each phase ------
|
||||
|
||||
/// Canonical named indices for each phase.
|
||||
enum PhaseIndex { Water = 0, Oil = 1, Gas = 2 };
|
||||
|
||||
|
||||
// ------ Density ------
|
||||
|
||||
/// Densities of stock components at surface conditions.
|
||||
|
@ -78,7 +78,12 @@ namespace Opm
|
||||
// ------ Canonical named indices for each phase ------
|
||||
|
||||
/// Canonical named indices for each phase.
|
||||
enum PhaseIndex { Water = 0, Oil = 1, Gas = 2 };
|
||||
enum PhaseIndex { Water = BlackoilPhases::Aqua, Oil = BlackoilPhases::Liquid,
|
||||
Gas = BlackoilPhases::Vapour,
|
||||
Aqua = BlackoilPhases::Aqua,
|
||||
Liquid = BlackoilPhases::Liquid,
|
||||
Vapour = BlackoilPhases::Vapour,
|
||||
MaxNumPhases = BlackoilPhases::MaxNumPhases};
|
||||
|
||||
// ------ Density ------
|
||||
|
||||
|
@ -156,9 +156,11 @@ namespace Opm {
|
||||
M p2w; // perf -> well (gather)
|
||||
};
|
||||
|
||||
enum { Water = BlackoilPropsAdInterface::Water,
|
||||
Oil = BlackoilPropsAdInterface::Oil ,
|
||||
Gas = BlackoilPropsAdInterface::Gas };
|
||||
enum { Water = BlackoilPropsAdInterface::Water,
|
||||
Oil = BlackoilPropsAdInterface::Oil ,
|
||||
Gas = BlackoilPropsAdInterface::Gas ,
|
||||
MaxNumPhases = BlackoilPropsAdInterface::MaxNumPhases
|
||||
};
|
||||
|
||||
enum PrimalVariables { Sg = 0, RS = 1, RV = 2 };
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user