Made phase mixing functors a class hierarchy.

In summary:
 - added RsFunction (base class),
 - made NoMixing, RsVD, RsSatAtContact inherit RsFunction,
 - RS and RV are no longer template arguments for EquilReg class,
 - EquilReg constructor now takes two shared_ptr<Miscibility::RsFunction>,
 - use of constructor updated, mostly using make_shared.
This commit is contained in:
Atgeirr Flø Rasmussen
2014-02-26 14:47:24 +01:00
parent 75ca41805e
commit 8ef54b7c64
3 changed files with 65 additions and 61 deletions

View File

@@ -76,8 +76,8 @@ BOOST_AUTO_TEST_CASE (PhasePressure)
Opm::Equil::EquilReg<RhoCalc>
region(record, calc,
Opm::Equil::Miscibility::NoMixing(),
Opm::Equil::Miscibility::NoMixing(),
std::make_shared<Opm::Equil::Miscibility::NoMixing>(),
std::make_shared<Opm::Equil::Miscibility::NoMixing>(),
props.phaseUsage());
std::vector<int> cells(G->number_of_cells);
@@ -139,23 +139,23 @@ BOOST_AUTO_TEST_CASE (CellSubset)
Opm::Equil::EquilReg<RhoCalc> region[] =
{
Opm::Equil::EquilReg<RhoCalc>(record[0], calc,
Opm::Equil::Miscibility::NoMixing(),
Opm::Equil::Miscibility::NoMixing(),
std::make_shared<Opm::Equil::Miscibility::NoMixing>(),
std::make_shared<Opm::Equil::Miscibility::NoMixing>(),
props.phaseUsage())
,
Opm::Equil::EquilReg<RhoCalc>(record[0], calc,
Opm::Equil::Miscibility::NoMixing(),
Opm::Equil::Miscibility::NoMixing(),
std::make_shared<Opm::Equil::Miscibility::NoMixing>(),
std::make_shared<Opm::Equil::Miscibility::NoMixing>(),
props.phaseUsage())
,
Opm::Equil::EquilReg<RhoCalc>(record[1], calc,
Opm::Equil::Miscibility::NoMixing(),
Opm::Equil::Miscibility::NoMixing(),
std::make_shared<Opm::Equil::Miscibility::NoMixing>(),
std::make_shared<Opm::Equil::Miscibility::NoMixing>(),
props.phaseUsage())
,
Opm::Equil::EquilReg<RhoCalc>(record[1], calc,
Opm::Equil::Miscibility::NoMixing(),
Opm::Equil::Miscibility::NoMixing(),
std::make_shared<Opm::Equil::Miscibility::NoMixing>(),
std::make_shared<Opm::Equil::Miscibility::NoMixing>(),
props.phaseUsage())
};
@@ -254,23 +254,23 @@ BOOST_AUTO_TEST_CASE (RegMapping)
Opm::Equil::EquilReg<RhoCalc> region[] =
{
Opm::Equil::EquilReg<RhoCalc>(record[0], calc,
Opm::Equil::Miscibility::NoMixing(),
Opm::Equil::Miscibility::NoMixing(),
std::make_shared<Opm::Equil::Miscibility::NoMixing>(),
std::make_shared<Opm::Equil::Miscibility::NoMixing>(),
props.phaseUsage())
,
Opm::Equil::EquilReg<RhoCalc>(record[0], calc,
Opm::Equil::Miscibility::NoMixing(),
Opm::Equil::Miscibility::NoMixing(),
std::make_shared<Opm::Equil::Miscibility::NoMixing>(),
std::make_shared<Opm::Equil::Miscibility::NoMixing>(),
props.phaseUsage())
,
Opm::Equil::EquilReg<RhoCalc>(record[1], calc,
Opm::Equil::Miscibility::NoMixing(),
Opm::Equil::Miscibility::NoMixing(),
std::make_shared<Opm::Equil::Miscibility::NoMixing>(),
std::make_shared<Opm::Equil::Miscibility::NoMixing>(),
props.phaseUsage())
,
Opm::Equil::EquilReg<RhoCalc>(record[1], calc,
Opm::Equil::Miscibility::NoMixing(),
Opm::Equil::Miscibility::NoMixing(),
std::make_shared<Opm::Equil::Miscibility::NoMixing>(),
std::make_shared<Opm::Equil::Miscibility::NoMixing>(),
props.phaseUsage())
};