Expose PhaseUsage to clients

This is likely to be a hack, but it does facilitate creating the fully
implicit solver for arbitrary two- and three-phase fluid systems.
This commit is contained in:
Bård Skaflestad 2013-05-23 18:26:25 +02:00
parent 2621283f1d
commit 0c9cd6b901
3 changed files with 21 additions and 1 deletions

View File

@ -75,6 +75,17 @@ namespace Opm
// Fluid interface //
////////////////////////////
/// \return Number of active phases (also the number of components).
int BlackoilPropsAd::numPhases() const
{
return props_.numPhases();
}
/// \return Object describing the active phases.
PhaseUsage BlackoilPropsAd::phaseUsage() const
{
return props_.phaseUsage();
}
// ------ Density ------

View File

@ -71,6 +71,11 @@ namespace Opm
typedef ADB::V V;
typedef std::vector<int> Cells;
/// \return Number of active phases (also the number of components).
virtual int numPhases() const;
/// \return Object describing the active phases.
virtual PhaseUsage phaseUsage() const;
// ------ Canonical named indices for each phase ------

View File

@ -69,13 +69,17 @@ namespace Opm
typedef ADB::M M;
typedef std::vector<int> Cells;
/// \return Number of active phases (also the number of components).
virtual int numPhases() const = 0;
/// \return Object describing the active phases.
virtual PhaseUsage phaseUsage() const = 0;
// ------ 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.