mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-01-26 22:06:26 -06:00
remove the phase enums from BlackoilPropsAdInterface
since the enums in BlackoilModelEnums.hpp are namespace-global this does not require any code changes. (except replacing 'Liquid' by 'Oil', etc.)
This commit is contained in:
parent
ac4dcba7e0
commit
98b9e2ef58
@ -177,16 +177,16 @@ BlackoilPropsAdFromDeck::BlackoilPropsAdFromDeck(const BlackoilPropsAdFromDeck&
|
||||
|
||||
surfaceDensity_.resize(numRegions);
|
||||
for (int regionIdx = 0; regionIdx < numRegions; ++regionIdx) {
|
||||
if (phase_usage_.phase_used[Liquid]) {
|
||||
surfaceDensity_[regionIdx][phase_usage_.phase_pos[Liquid]]
|
||||
if (phase_usage_.phase_used[Oil]) {
|
||||
surfaceDensity_[regionIdx][phase_usage_.phase_pos[Oil]]
|
||||
= densityKeyword.getRecord(regionIdx).getItem("OIL").getSIDouble(0);
|
||||
}
|
||||
if (phase_usage_.phase_used[Aqua]) {
|
||||
surfaceDensity_[regionIdx][phase_usage_.phase_pos[Aqua]]
|
||||
if (phase_usage_.phase_used[Water]) {
|
||||
surfaceDensity_[regionIdx][phase_usage_.phase_pos[Water]]
|
||||
= densityKeyword.getRecord(regionIdx).getItem("WATER").getSIDouble(0);
|
||||
}
|
||||
if (phase_usage_.phase_used[Vapour]) {
|
||||
surfaceDensity_[regionIdx][phase_usage_.phase_pos[Vapour]]
|
||||
if (phase_usage_.phase_used[Gas]) {
|
||||
surfaceDensity_[regionIdx][phase_usage_.phase_pos[Gas]]
|
||||
= densityKeyword.getRecord(regionIdx).getItem("GAS").getSIDouble(0);
|
||||
}
|
||||
}
|
||||
|
@ -21,7 +21,7 @@
|
||||
#define OPM_BLACKOILPROPSADINTERFACE_HEADER_INCLUDED
|
||||
|
||||
#include <opm/autodiff/AutoDiffBlock.hpp>
|
||||
#include <opm/core/props/BlackoilPhases.hpp>
|
||||
#include <opm/autodiff/BlackoilModelEnums.hpp>
|
||||
|
||||
namespace Opm
|
||||
{
|
||||
@ -75,16 +75,6 @@ namespace Opm
|
||||
/// \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 = BlackoilPhases::Aqua, Oil = BlackoilPhases::Liquid,
|
||||
Gas = BlackoilPhases::Vapour,
|
||||
Aqua = BlackoilPhases::Aqua,
|
||||
Liquid = BlackoilPhases::Liquid,
|
||||
Vapour = BlackoilPhases::Vapour,
|
||||
MaxNumPhases = BlackoilPhases::MaxNumPhases};
|
||||
|
||||
// ------ Density ------
|
||||
|
||||
/// Densities of stock components at surface conditions.
|
||||
|
@ -116,17 +116,17 @@ BOOST_FIXTURE_TEST_CASE(SurfaceDensity, TestFixture<SetupSimple>)
|
||||
|
||||
typedef Opm::BlackoilPropsAdFromDeck::V V;
|
||||
|
||||
enum { Water = Opm::BlackoilPropsAdFromDeck::Water };
|
||||
enum { Water = Opm::Water };
|
||||
V rho0AD_Water = boprops_ad.surfaceDensity(Water, cells);
|
||||
BOOST_REQUIRE_EQUAL(rho0AD_Water.size(), cells.size());
|
||||
BOOST_CHECK_EQUAL(rho0AD_Water[0], 1000.0);
|
||||
|
||||
enum { Oil = Opm::BlackoilPropsAdFromDeck::Oil };
|
||||
enum { Oil = Opm::Oil };
|
||||
V rho0AD_Oil = boprops_ad.surfaceDensity(Oil, cells);
|
||||
BOOST_REQUIRE_EQUAL(rho0AD_Oil.size(), cells.size());
|
||||
BOOST_CHECK_EQUAL(rho0AD_Oil[0], 800.0);
|
||||
|
||||
enum { Gas = Opm::BlackoilPropsAdFromDeck::Gas };
|
||||
enum { Gas = Opm::Gas };
|
||||
V rho0AD_Gas = boprops_ad.surfaceDensity(Gas, cells);
|
||||
BOOST_REQUIRE_EQUAL(rho0AD_Gas.size(), cells.size());
|
||||
BOOST_CHECK_EQUAL(rho0AD_Gas[0], 1.0);
|
||||
|
Loading…
Reference in New Issue
Block a user