Add alternative FieldPropsManager argument to THPRES constructor
This commit is contained in:
parent
8e76b1346a
commit
866aa5c5ca
@ -26,6 +26,7 @@ namespace Opm {
|
||||
|
||||
class Deck;
|
||||
class Eclipse3DProperties;
|
||||
class FieldPropsManager;
|
||||
|
||||
class SimulationConfig {
|
||||
|
||||
@ -33,6 +34,7 @@ namespace Opm {
|
||||
|
||||
SimulationConfig(bool restart,
|
||||
const Deck& deck,
|
||||
const FieldPropsManager& fp,
|
||||
const Eclipse3DProperties& gridProperties);
|
||||
|
||||
const ThresholdPressure& getThresholdPressure() const;
|
||||
|
@ -28,12 +28,14 @@ namespace Opm {
|
||||
|
||||
class Deck;
|
||||
class Eclipse3DProperties;
|
||||
class FieldPropsManager;
|
||||
|
||||
class ThresholdPressure {
|
||||
|
||||
public:
|
||||
ThresholdPressure(bool restart,
|
||||
const Deck& deck,
|
||||
const FieldPropsManager& fp,
|
||||
const Eclipse3DProperties& eclipseProperties);
|
||||
|
||||
|
||||
|
@ -141,7 +141,7 @@ void assert_field_properties(const EclipseGrid& grid, const FieldPropsManager& f
|
||||
#ifdef ENABLE_3DPROPS_TESTING
|
||||
field_props( deck, m_inputGrid, m_tables),
|
||||
#endif
|
||||
m_simulationConfig( m_eclipseConfig.getInitConfig().restartRequested(), deck, m_eclipseProperties ),
|
||||
m_simulationConfig( m_eclipseConfig.getInitConfig().restartRequested(), deck, field_props, m_eclipseProperties ),
|
||||
m_transMult( GridDims(deck), deck, m_eclipseProperties )
|
||||
{
|
||||
m_inputGrid.resetACTNUM(m_eclipseProperties.getIntGridProperty("ACTNUM").getData());
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
|
||||
#include <opm/parser/eclipse/Deck/Section.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Eclipse3DProperties.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/FieldPropsManager.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/SimulationConfig/SimulationConfig.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/SimulationConfig/ThresholdPressure.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserKeywords/C.hpp>
|
||||
@ -49,8 +50,9 @@ namespace Opm {
|
||||
|
||||
SimulationConfig::SimulationConfig(bool restart,
|
||||
const Deck& deck,
|
||||
const FieldPropsManager& fp,
|
||||
const Eclipse3DProperties& eclipseProperties) :
|
||||
m_ThresholdPressure( restart, deck, eclipseProperties ),
|
||||
m_ThresholdPressure( restart, deck, fp, eclipseProperties ),
|
||||
m_useCPR(false),
|
||||
m_DISGAS(false),
|
||||
m_VAPOIL(false),
|
||||
|
@ -19,6 +19,7 @@
|
||||
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
#include <opm/parser/eclipse/Deck/Section.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Grid/FieldPropsManager.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/Eclipse3DProperties.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/SimulationConfig/ThresholdPressure.hpp>
|
||||
#include <opm/parser/eclipse/Parser/ParserKeywords/E.hpp>
|
||||
@ -30,6 +31,7 @@ namespace Opm {
|
||||
|
||||
ThresholdPressure::ThresholdPressure(bool restart,
|
||||
const Deck& deck,
|
||||
const FieldPropsManager& fp,
|
||||
const Eclipse3DProperties& eclipseProperties) :
|
||||
m_active(false),
|
||||
m_restart(restart)
|
||||
|
@ -140,7 +140,8 @@ BOOST_AUTO_TEST_CASE(SimulationConfigGetThresholdPressureTableTest) {
|
||||
TableManager tm(deck);
|
||||
EclipseGrid eg(10, 3, 4);
|
||||
Eclipse3DProperties ep(deck, tm, eg);
|
||||
BOOST_CHECK_NO_THROW( SimulationConfig(false, deck, ep ) );
|
||||
FieldPropsManager fp(deck, eg, tm);
|
||||
BOOST_CHECK_NO_THROW( SimulationConfig(false, deck, fp, ep ) );
|
||||
}
|
||||
|
||||
|
||||
@ -149,7 +150,8 @@ BOOST_AUTO_TEST_CASE(SimulationConfigNOTHPRES) {
|
||||
TableManager tm(deck);
|
||||
EclipseGrid eg(10, 3, 4);
|
||||
Eclipse3DProperties ep(deck, tm, eg);
|
||||
SimulationConfig simulationConfig(false, deck, ep);
|
||||
FieldPropsManager fp(deck, eg, tm);
|
||||
SimulationConfig simulationConfig(false, deck, fp, ep);
|
||||
BOOST_CHECK( !simulationConfig.useThresholdPressure() );
|
||||
}
|
||||
|
||||
@ -158,7 +160,8 @@ BOOST_AUTO_TEST_CASE(SimulationConfigCPRNotUsed) {
|
||||
TableManager tm(deck);
|
||||
EclipseGrid eg(10, 3, 4);
|
||||
Eclipse3DProperties ep(deck, tm, eg);
|
||||
SimulationConfig simulationConfig(false, deck, ep);
|
||||
FieldPropsManager fp(deck, eg, tm);
|
||||
SimulationConfig simulationConfig(false, deck, fp, ep);
|
||||
BOOST_CHECK( ! simulationConfig.useCPR());
|
||||
}
|
||||
|
||||
@ -168,7 +171,8 @@ BOOST_AUTO_TEST_CASE(SimulationConfigCPRUsed) {
|
||||
EclipseGrid eg(10, 3, 4);
|
||||
Eclipse3DProperties ep(deck, tm, eg);
|
||||
SUMMARYSection summary(deck);
|
||||
SimulationConfig simulationConfig(false, deck, ep);
|
||||
FieldPropsManager fp(deck, eg, tm);
|
||||
SimulationConfig simulationConfig(false, deck, fp, ep);
|
||||
BOOST_CHECK( simulationConfig.useCPR() );
|
||||
BOOST_CHECK( ! summary.hasKeyword("CPR") );
|
||||
}
|
||||
@ -180,7 +184,8 @@ BOOST_AUTO_TEST_CASE(SimulationConfigCPRInSUMMARYSection) {
|
||||
EclipseGrid eg(10, 3, 4);
|
||||
Eclipse3DProperties ep(deck, tm, eg);
|
||||
SUMMARYSection summary(deck);
|
||||
SimulationConfig simulationConfig(false, deck, ep);
|
||||
FieldPropsManager fp(deck, eg, tm);
|
||||
SimulationConfig simulationConfig(false, deck, fp, ep);
|
||||
BOOST_CHECK( ! simulationConfig.useCPR());
|
||||
BOOST_CHECK( summary.hasKeyword("CPR"));
|
||||
}
|
||||
@ -192,7 +197,8 @@ BOOST_AUTO_TEST_CASE(SimulationConfigCPRBoth) {
|
||||
EclipseGrid eg(10, 3, 4);
|
||||
Eclipse3DProperties ep(deck, tm, eg);
|
||||
SUMMARYSection summary(deck);
|
||||
SimulationConfig simulationConfig(false, deck, ep);
|
||||
FieldPropsManager fp(deck, eg, tm);
|
||||
SimulationConfig simulationConfig(false, deck, fp, ep);
|
||||
BOOST_CHECK( simulationConfig.useCPR());
|
||||
BOOST_CHECK( summary.hasKeyword("CPR"));
|
||||
|
||||
@ -216,7 +222,8 @@ BOOST_AUTO_TEST_CASE(SimulationConfig_VAPOIL_DISGAS) {
|
||||
TableManager tm(deck);
|
||||
EclipseGrid eg(10, 3, 4);
|
||||
Eclipse3DProperties ep(deck, tm, eg);
|
||||
SimulationConfig simulationConfig(false, deck, ep);
|
||||
FieldPropsManager fp(deck, eg, tm);
|
||||
SimulationConfig simulationConfig(false, deck, fp, ep);
|
||||
BOOST_CHECK_EQUAL( false , simulationConfig.hasDISGAS());
|
||||
BOOST_CHECK_EQUAL( false , simulationConfig.hasVAPOIL());
|
||||
|
||||
@ -224,7 +231,8 @@ BOOST_AUTO_TEST_CASE(SimulationConfig_VAPOIL_DISGAS) {
|
||||
TableManager tm_vd(deck_vd);
|
||||
EclipseGrid eg_vd(10, 3, 4);
|
||||
Eclipse3DProperties ep_vd(deck_vd, tm, eg);
|
||||
SimulationConfig simulationConfig_vd(false, deck_vd, ep_vd);
|
||||
FieldPropsManager fp_vd(deck_vd, eg, tm);
|
||||
SimulationConfig simulationConfig_vd(false, deck_vd, fp_vd, ep_vd);
|
||||
BOOST_CHECK_EQUAL( true , simulationConfig_vd.hasDISGAS());
|
||||
BOOST_CHECK_EQUAL( true , simulationConfig_vd.hasVAPOIL());
|
||||
}
|
||||
@ -234,30 +242,33 @@ BOOST_AUTO_TEST_CASE(SimulationConfig_TEMP_THERMAL)
|
||||
{
|
||||
{
|
||||
const auto deck = createDeck(inputStr);
|
||||
const auto tm = Opm::TableManager(deck);
|
||||
const auto eg = Opm::EclipseGrid(10, 3, 4);
|
||||
const auto ep = Opm::Eclipse3DProperties(deck, tm, eg);
|
||||
const auto simulationConfig = Opm::SimulationConfig(false, deck, ep);
|
||||
const auto tm = TableManager(deck);
|
||||
const auto eg = EclipseGrid(10, 3, 4);
|
||||
const auto ep = Eclipse3DProperties(deck, tm, eg);
|
||||
const auto fp = FieldPropsManager(deck, eg, tm);
|
||||
const auto simulationConfig = Opm::SimulationConfig(false, deck, fp, ep);
|
||||
|
||||
BOOST_CHECK(! simulationConfig.isThermal());
|
||||
}
|
||||
|
||||
{
|
||||
const auto deck = createDeck(simDeckStringTEMP());
|
||||
const auto tm = Opm::TableManager(deck);
|
||||
const auto eg = Opm::EclipseGrid(10, 3, 4);
|
||||
const auto ep = Opm::Eclipse3DProperties(deck, tm, eg);
|
||||
const auto simulationConfig = Opm::SimulationConfig(false, deck, ep);
|
||||
const auto tm = TableManager(deck);
|
||||
const auto eg = EclipseGrid(10, 3, 4);
|
||||
const auto ep = Eclipse3DProperties(deck, tm, eg);
|
||||
const auto fp = FieldPropsManager(deck, eg, tm);
|
||||
const auto simulationConfig = Opm::SimulationConfig(false, deck, fp, ep);
|
||||
|
||||
BOOST_CHECK(simulationConfig.isThermal());
|
||||
}
|
||||
|
||||
{
|
||||
const auto deck = createDeck(simDeckStringTHERMAL());
|
||||
const auto tm = Opm::TableManager(deck);
|
||||
const auto eg = Opm::EclipseGrid(10, 3, 4);
|
||||
const auto ep = Opm::Eclipse3DProperties(deck, tm, eg);
|
||||
const auto simulationConfig = Opm::SimulationConfig(false, deck, ep);
|
||||
const auto tm = TableManager(deck);
|
||||
const auto eg = EclipseGrid(10, 3, 4);
|
||||
const auto ep = Eclipse3DProperties(deck, tm, eg);
|
||||
const auto fp = FieldPropsManager(deck, eg, tm);
|
||||
const auto simulationConfig = Opm::SimulationConfig(false, deck, fp, ep);
|
||||
|
||||
BOOST_CHECK(simulationConfig.isThermal());
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ const std::string& inputStr_RESTART2 = "RUNSPEC\n"
|
||||
"\n"
|
||||
"REGIONS\n"
|
||||
"EQLNUM\n"
|
||||
" 27*4 /\n"
|
||||
" 120*4 /\n"
|
||||
"SOLUTION\n"
|
||||
"RESTART\n"
|
||||
" CASE 100/\n"
|
||||
@ -87,7 +87,7 @@ const std::string& inputStrWithEqlNum =
|
||||
"\n"
|
||||
"REGIONS\n"
|
||||
"EQLNUM\n"
|
||||
" 27*3 /\n"
|
||||
" 120*3 /\n"
|
||||
"SOLUTION\n"
|
||||
"THPRES\n"
|
||||
"1 2 12.0/\n"
|
||||
@ -105,7 +105,7 @@ const std::string& inputStrWithEqlNumall0 =
|
||||
"\n"
|
||||
"REGIONS\n"
|
||||
"EQLNUM\n"
|
||||
" 27*0 /\n"
|
||||
" 120*0 /\n"
|
||||
"SOLUTION\n"
|
||||
"THPRES\n"
|
||||
"1 2 12.0/\n"
|
||||
@ -189,7 +189,7 @@ const std::string& inputStrMissingPressure = "RUNSPEC\n"
|
||||
"\n"
|
||||
"REGIONS\n"
|
||||
"EQLNUM\n"
|
||||
" 27*3 /\n"
|
||||
" 120*3 /\n"
|
||||
"SOLUTION\n"
|
||||
"THPRES\n"
|
||||
"1 2 12.0/\n"
|
||||
@ -211,6 +211,7 @@ struct Setup
|
||||
TableManager tablemanager;
|
||||
EclipseGrid grid;
|
||||
Eclipse3DProperties props;
|
||||
FieldPropsManager fp;
|
||||
InitConfig initConfig;
|
||||
ThresholdPressure threshPres;
|
||||
|
||||
@ -219,8 +220,9 @@ struct Setup
|
||||
tablemanager(deck),
|
||||
grid(10, 3, 4),
|
||||
props(deck, tablemanager, grid),
|
||||
fp(deck, grid, tablemanager),
|
||||
initConfig(deck),
|
||||
threshPres(initConfig.restartRequested(), deck, props)
|
||||
threshPres(initConfig.restartRequested(), deck, fp, props)
|
||||
{
|
||||
}
|
||||
|
||||
@ -229,8 +231,9 @@ struct Setup
|
||||
tablemanager(deck),
|
||||
grid(10, 3, 4),
|
||||
props(deck, tablemanager, grid),
|
||||
fp(deck, grid, tablemanager),
|
||||
initConfig(deck),
|
||||
threshPres(initConfig.restartRequested(), deck, props)
|
||||
threshPres(initConfig.restartRequested(), deck, fp, props)
|
||||
{
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user